資源簡介
我想很多學習電子和通信的朋友一定對于MATLAB很是熟悉,做課程設計的時候會需要一些經典的源程序來進行學習和修改,現在就提供一個基于雙線性變換的切比雪夫II型高通濾波器設計源代碼歡迎大家下載學習。
代碼片段和文件信息
%?Design?of?a?Cheby2?Highpass?Digital?Filter?by?using?bilinear?method
clc;clear?all
Rp?=?1;?%?bandpass?attenuation?in?dB
Rs?=?40;?%?bandstop?attenuation?in?dB
OmegaP1_1=500;?%?bandpass?edge?frequency
OmegaS1_1=400;?%?bandstop?edge?frequency
Fp=2000;?%?samling?frequency
Wp1=2*pi*OmegaP1_1/Fp;?%?change?analogy?frequency?to?digital?angular?frequency
Ws1=2*pi*OmegaS1_1/Fp;?%?change?analogy?frequency?to?digital?angular?frequency
OmegaP1=2*Fp*tan(Wp1/2);?%?nonlinearlization
OmegaS1=2*Fp*tan(Ws1/2);?%?nonlinearlization
Eta_P=OmegaP1/OmegaP1;?%?Normalization
Eta_S=OmegaS1/OmegaP1;?%?Normalization
Lemta_P_EquivalentLowPass=1/Eta_P;?%?change?to?the?equivalent?Lowpass?patameter
Lemta_S_EquivalentLowPass=1/Eta_S;?%%?change?to?the?equivalent?Lowpass?patameter
%?Estimate?the?Filter?Order
[N?Wn]?=?cheb2ord(Lemta_P_EquivalentLowPass?Lemta_S_EquivalentLowPass?Rp?Rs‘s‘);?
%?Design?the?Filter
[num1den1]?=?cheby2(NRsWn‘s‘);?
[num2den2]=lp2hp(num1den1OmegaP1);
[numden]=bilin
評論
共有 條評論