- 16
- 0
- 约 5页
- 2017-08-11 发布于重庆
- 举报
用双线性变换法设计切比雪夫II型的数字IIR带通滤波器
用双线性变换法设计切比雪夫II型的数字IIR带通滤波器用双线性变换法设计原型低通为切比雪夫II型的数字IIR带通滤波器,要求通带边界频率为400Hz,500Hz,阻带边界频率分别为350Hz,550Hz,通带最大衰减1dB,阻带最小衰减40dB,抽样频率为2000Hz,用MATLAB画出幅频特性,画出并分析滤波器传输函数的零极点;信号经过该滤波器,其中450Hz,600Hz,滤波器的输出是什么?用Matlab验证你的结论并给出的图形。Matlab 详细设计:% Design of a Cheb II Bandpass Digital Filter by using bilinear methodclc;clear all;Rp = 1; % bandpass attenuation in dBRs = 40; % bandstop attenuation in dBOmegaS1_1=350; OmegaS1_2=550;OmegaP1_1=400; OmegaP1_2=500;Fp=2000; % samling frequencyWp1=2*pi*OmegaP1_1/Fp; Wp2=2*pi*OmegaP1_2/Fp; Ws1=2*pi*OmegaS1_1/Fp; Ws2=2*pi*OmegaS1_2/Fp; OmegaP1=2*Fp*tan(Wp1/2); % nonlinearlizationOmegaP2=2*Fp*tan(Wp2/2); % nonlinearlizationOmegaS1=2*Fp*tan(Ws1/2); % nonlinearlizationOmegaS2=2*Fp*tan(Ws2/2); % nonlinearlizationOmegaP0=sqrt(OmegaP1*OmegaP2);% equivalent mid frequencyBw=OmegaP2-OmegaP1; % bandwithEta_P0=OmegaP0/Bw; % NormalizationEta_P1=OmegaP1/Bw; % NormalizationEta_P2=OmegaP2/Bw; % NormalizationEta_S1=OmegaS1/Bw; % NormalizationEta_S2=OmegaS2/Bw; % NormalizationLemta_P_EquivalentLowPass=Eta_P2/(Eta_P2^2-Eta_P0^2); % change to the equivalent Lowpass patameterLemta_S1_EquivalentLowPass=-Eta_S1/(Eta_S1^2-Eta_P0^2); % change to the equivalent Lowpass patameterLemta_S2_EquivalentLowPass=Eta_S2/(Eta_S2^2-Eta_P0^2); % change to the equivalent Lowpass patameterLemta_S_EquivalentLowPass=min(Lemta_S1_EquivalentLowPass,Lemta_S2_EquivalentLowPass); % get the smallest % Estimate the Filter Order[N, Wn]=cheb2ord(Lemta_P_EquivalentLowPass, Lemta_S_EquivalentLowPass, Rp, Rs,s); % Design the Filter[num1,den1]=cheby2(N,Rs,Wn,s); [num2,den2]=lp2bp(num1,den1,OmegaP0,Bw);[num,den]=bilinear(num2,den2,Fp);% Compute the gain responsew = 0:pi/255:pi;h = freqz(num,den,w);g = 20*log10(abs(h));% Plot the gain responsefigure;plot(w/pi,g);grid axis([0 1 -60 5]);xlabel(\omega /\pi); ylabel(Gain in dB);title(Gain Response of a Cheb II Bandpass Filter);%Plot the poles and zeros[z,p,k]=tf2zp(num,den);figure;zplane(z,p); %????′?ê?oˉêyá???μ?title(′?ê?oˉêyμ?á???μ?)f1=450;f2=600;t=
原创力文档

文档评论(0)