📄 afd_cheby.m
字号:
%Butterworth模拟滤波器原型设计子程序afd_buff.m
function[b,a]=afd_cheby(Wp,Ws,Rp,As,fs);
%Analog lowpass filter design:butterworth
%[b,a]=afd(Wp,Ws,Rp,As)
%b=Numerator coefficients of Ha(s)
%b=Denominator coefficients of Ha(s)
%Wp=Passband edge frequency in rad/sec;Wp>0
%Ws=Stopband edge frequency in rad/sec;Ws>Wp>0
%Rp=Passband ripple in +dB;(Rp>0)
%As=Stopband attenuation in +dB;(As>0)
if Wp<=0
error('Passband edge must be larger than 0')
end
if Ws<=Wp
error('Stopband edge must be larger than Passband edge')
end
if (Rp<0)|(As<0)
error('PB ripple and/or SB attanuation must be larger than 0')
end
epi=sqrt(10^(Rp/10)-1);
epsilon=epi
OmegaC=Wp;
N=ceil((acosh(sqrt(10^(0.1*As)-1)/epi))/(acosh(Ws/OmegaC)));
fprintf('\n***Chebyshev Filter Order=%2.0f\n',N)
[b,a]=g_bilinear(N,OmegaC,epi,fs);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -