资源描述:
《基于数字信号处理课程设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、1设低通DF的3dB带宽频率wc=0.2π,止带频率ws=0.4π,在w=ws处的止带衰减20lg
2、H(ejws)
3、=-15dB,试用脉冲响应不变法(冲激不变法)设计一个Butterworth低通DF。(设采样频率fs=20kHz)解:依题,程序如下:Wp=input('Normalizedpassbandedge=');Ws=input('Normalizedstopbandedge=');Rp=input('PassbandrippleindB=');Rs=input('MinimumstopbandattenuationindB=');[N,Wn]=but
4、tord(Wp,Ws,Rp,Rs);[b,a]=butter(N,Wn);[h,omega]=freqz(b,a,512);plot(omega/pi,20*log10(abs(h)));grid;xlabel('omega/pi');ylabel('GaindB');title('IIRButterworthLowpassFilter');仿真的图像如下:3、试设计一个模拟低通Butterworth滤波器解:经计算可知低通Butterworth滤波器的阶数为3用Matlab软件计算的程序如下:OmegaP=0.2*pi;OmegaS=0.3*pi;Rp=7
5、;As=16;N=ceil(log10((10.^(0.1*abs(Rp))-1)./(10.^(0.1*abs(As))-1))/(2*log10(OmegaP/OmegaS)))运行程序后出来的结果如下图:使用Matlab软件仿真的程序如下:Wp=input('Normalizedpassbandedge=');Ws=input('Normalizedstopbandedge=');Rp=input('PassbandrippleindB=');Rs=input('MinimumstopbandattenuationindB=');[N,Wn]=buttor
6、d(Wp,Ws,Rp,Rs);[b,a]=butter(N,Wn);[h,omega]=freqz(b,a,512);plot(omega/pi,20*log10(abs(h)));grid;xlabel('omega/pi');ylabel('GaindB');title('IIRButterworthLowpassFilter');得出的仿真波形如下:4试用双线性变换法设计Butterworth低通DF。已知低通DF的3dB带宽频率 ,止带起始频率 ,在处的止带衰减 解:使用Matlab软件仿真仿真的程序如下:clc;clearall;O
7、megaP=2*pi*2000;OmegaS=2*pi*4000;Rp=3;As=15;g=sqrt((10^(As/10)-1)/(10^(Rp/10)-1));OmegaR=OmegaS/OmegaP;N=ceil(log10(g+sqrt(g*g-1))/log10(OmegaR+sqrt(OmegaR*OmegaR-1)));OmegaC=OmegaS;[z0,p0,k0]=cheb2ap(N,As);a0=real(poly(p0));aNn=a0(N+1);p=p0*OmegaC;a=real(poly(p));aNu=a(N+1);b0=real(
8、poly(z0));M=length(b0);bNn=b0(M);z=z0*OmegaC;b=real(poly(z));bNu=b(M);k=k0*(aNu*bNn)/(aNn*bNu);b=k*bw0=[OmegaP,OmegaS];[H,w]=freqs(b,a);Hx=freqs(b,a,w0);dbHx=-20*log10(abs(Hx)/max(abs(H)))plot(w/(2*pi)/1000,20*log10(abs(H)));xlabel('f(kHz)');ylabel('dB');axis([-1,12,-55,1]);set(gca,'
9、xtickmode','manual','xtick',[0,1,2,3,4,5,6,7,8,9]);set(gca,'ytickmode','manual','ytick',[-50,-40,-30,-20,-10,0]);grid;得出的仿真波形如下:1设Chebyshev模拟滤波器的技术指标Wc=2´p2kHz,Ws=2´p4kHz,在W=Ws处的衰减小于-15dB,通带波动参数,e2=0.2,求其阶数。解:经计算可知切比雪夫模拟滤波器的阶数为4用matlab计算的程序如下:clc;clearall;OmegaP=2*pi*2000;OmegaS=2*pi
10、*4000;Rp=0.1