Návrh filtra vyšších harmonických

V programe je možné testovať rôzne nastavenia parametrov filtrov a vzájomne ich porovnávať.

Modul pre získanie parametrov filtra na základe nastavení

Filter[h_,Ih_,Un_,Qkomp_,Q_,typ_]:=Module[{a,Qcfmin,Qcf,Rhc,ω1,C1,C2,Lhc,Rtc,Ch,Lh,Rt,Rh,Xchar,z1,z2,z3,Z,f},
ω1=2*π*50.;
a=((h^2)/((h^2)-1));
Qcfmin=3*(Sqrt[(a/h)])*Ih*Un;
If[Qcfmin>Qkomp*a,Qcf=Qcfmin,Qcf=Qkomp];
C1=(Qcf/((Un^2)*ω1));
C2=((h^2)-1)*C1;
Ch=(Qcf/(a*(Un^2)*ω1));
Lh=((a*(Un^2))/((h^2)*ω1*Qcf));
Rh=((h*ω1*Lh)/Q);
Xchar=(Sqrt[(Lh/Ch)]);
Rt=Xchar*Q;
Lhc=(1/(C2*((ω1)^2)));
Rtc=((Q*(Un^2))/(h*Qcf));
Rhc=Lh*((ω1)/200);
z1=Rh+I*ω*Lh+(1/(I*ω*Ch));
z2=(1/(I*ω*Ch))+(((Rh+I*ω*Lh)*Rt)/(Rh+I*ω*Lh+Rt));
z3=(1/(I*ω*C1))+(((I*ω*Lhc+(1/(I*ω*C2))+Rhc)*Rtc)/(I*ω*Lhc+(1/(I*ω*C2))+Rtc+Rhc));
f[ty_]:=Switch[ty,1,Z=z1,2,Z=z2,3,Z=z3];
f[typ]
]

Dosadenie

char1=Filter[5,100,22000,30*(10^6),30,1]/.ω->2*π*50*h;
char2=Filter[5,100,22000,30*(10^6),5,2]/.ω->2*π*50*h;
char3=Filter[5,100,22000,30*(10^6),5,3]/.ω->2*π*50*h;

Frekvenčná amplitúdová charakteristika

Plot[{Abs[char1],Abs[char2],Abs[char3]},{h,0,19},PlotStyle->Table[{Thick,Hue[(1/(2i))+0.5]},{i,3}],PlotLegends->{"jednoduchy filter druheho radu","tlmeny filter druheho radu","C-type filter"},Frame->True,FrameLabel->{"h [-]","Abs((Subscript[Z, f])) [Ω]"},FrameStyle->Directive[13]]

Modul pre určenie vyšších harmonických napätí

prudy={143.2,44.6,58,26.8,40.6,18.4};
frekvencie={5,6,7,8,9,10};
naph[i_]:=Module[{list,sks,,Ls,isoust},
list={char1,char2,char3};
sks=600*(10^6);
Ls=((22000^2)/(sks*2*π*50.));
isoust=Table[prudy[[i]]*(((list[[j]])/((2*π*50*I*Ls+list[[j]]))))/.h->frekvencie[[i]],{j,3}];
isoust=Join[{prudy[[i]]},isoust];
usoust=Abs[i*2*π*50*frekvencie[[i]]*(Sqrt[3])*Ls*isoust](1/22000)*100
]

Výsledky účinnosti filtrácie

dat=Table[naph[k],{k,Length[prudy]}];
BarChart[dat,ChartLegends->{"bez filtrov","jednoduchy filter druheho radu","tlmeny filter druheho radu","C-type filter"},ChartLabels->{Placed[frekvencie,Above],None},Frame->True,FrameLabel->{None,"(Subscript[u, h]) [%]"},FrameTicks->{None,Automatic},PlotRange->{Automatic,{0,1.2*Max[Flatten[dat]]}},FrameStyle->Directive[13],ChartStyle->"SolarColors"]

Porovnanie činných strát

z1=char1/.h->1;
z2=char2/.h->1;
z3=char3/.h->1;
vykon=Conjugate[(1/({z1,z2,z3}))*22000]*22000*(1/1000);
BarChart[{Re[vykon]},ChartLabels->Placed[Re[vykon]//Floor,Above],ChartLegends->{"jednoduchy filter druheho radu","tlmeny filter druheho radu","C-type filter"},Frame->True,FrameLabel->{None,"ΔP [kW]"},FrameTicks->{None,Automatic},FrameStyle->Directive[13],PlotRange->{{0.5,3.5},{0,1.2Max[Re[vykon]]}},ChartStyle->"SolarColors"]