📄 timedomaincountrange.m
字号:
%时域滤波的基波与二次谐波的验证公式
harmonicnumber=1;
f=50*harmonicnumber;
Ts=(5/4000);
w=2*pi*f;
%h1=2*abs(sin(w*Ts/2))
%z1=abs(1-(exp(-j*w*Ts)))
%h2=abs((cos(3/2*w*Ts))/(cos(w*Ts/2)))
%z2=abs(1-(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))
%h3=2*abs(cos(w*Ts))
%z3=abs(1+exp(-2*j*w*Ts))
%h4=abs(sin(3/2*w*Ts)/sin(w*Ts/2))
%z4=abs(1+exp(-j*w*Ts)+exp(-2*j*w*Ts))
%h5=2*abs(cos(w*Ts/2))
%z5=abs(1+sqrt(3)*exp(-j*w*Ts)+exp(-2*j*w*Ts))
%h6=sqrt((1+sqrt(3)*cos(w*Ts)+cos(2*w*Ts))^2+(-sin(2*w*Ts)-sqrt(3)*sin(w*Ts))^2)
%z6=abs(1+exp(-j*w*Ts))
%h=h1*h2*h3*h4*h5*h6
%z=z1*z2*z3*z4*z5*z6
%基波
s1=abs(1-(exp(-j*w*Ts)))*abs(1-sqrt(2)*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1-0.765*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+(exp(-2*j*w*Ts)))*abs(1+0.765*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+sqrt(2)*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+1.848*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+(exp(-j*w*Ts)))
s2=abs(1+1.848*(exp(-j*w*Ts))+2.415*(exp(-2*j*w*Ts))+2.615*(exp(-3*j*w*Ts))+2.415*(exp(-4*j*w*Ts))+1.848*(exp(-5*j*w*Ts))+(exp(-6*j*w*Ts))-(exp(-8*j*w*Ts))-1.848*(exp(-9*j*w*Ts))-2.415*(exp(-10*j*w*Ts))-2.615*(exp(-11*j*w*Ts))-2.415*(exp(-12*j*w*Ts))-1.848*(exp(-13*j*w*Ts))-(exp(-14*j*w*Ts)))
%二次谐波
s3=abs(1-(exp(-j*w*Ts)))*abs(1-1.848*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1-0.765*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+(exp(-2*j*w*Ts)))*abs(1+0.765*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+sqrt(2)*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+1.848*(exp(-j*w*Ts))+(exp(-2*j*w*Ts)))*abs(1+(exp(-j*w*Ts)))
s4=abs(1+(sqrt(2)*(exp(-j*w*Ts)))+(exp(-2*j*w*Ts))-(exp(-4*j*w*Ts))-(sqrt(2)*(exp(-5*j*w*Ts)))-(exp(-6*j*w*Ts))+(exp(-8*j*w*Ts))+(sqrt(2)*(exp(-9*j*w*Ts)))+(exp(-10*j*w*Ts))-(exp(-12*j*w*Ts))-(sqrt(2)*(exp(-13*j*w*Ts)))-(exp(-14*j*w*Ts)))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -