clc;
k=0.9;% Modulation Index
f1=50; %Fundamental freq.
fs=4000; % Switching freq.
vo=400/sqrt(3); %per phase
voh_avg=2; %%0.05*398/sqrt(3); %Harmonic voltage
io=20; %Nominal current
Vdc=630; % dc voltage
a=k^2;
b=(15/4)*k^4;
c=(64/(5*pi))*k^5;
d=(5/4)*k^6;
ke=sqrt((a-b+c-d)/1440);
aa=ke*(Vdc/voh_avg);
bb=vo/(io*fs);
cc=f1/fs;
Lf=bb*sqrt(aa*(1+4*pi^2*cc^2*aa))
Cf=ke*Vdc/(Lf*fs^2*voh_avg)





