推荐-基于数字信号处理课程设计 精品

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1 设低通DF的3dB带宽频率wc=0.2π,止带频率ws=0.4π,在w=ws处的止带衰减20lg|H(ejws)|=-15dB,试用脉冲响应不变法(冲激不变法)设计一个Butterworth低通DF。(设采样频率fs=20kHz)

解:依题,

程序如下:

Wp=input('Normalized passband edge =');

Ws=input('Normalized stopband edge =');

Rp=input('Passband ripple in dB =');

Rs=input('Minimum stopband attenuation in dB =');

[N,Wn]=buttord (Wp,Ws,Rp,Rs);

[b,a]=butter(N,W

n);

[h,omega]=freqz(b,a,512);

plot(omega/pi,20*log10(abs(h)));

grid;

xlabel('\omega/\pi');

ylabel('Gain dB');

title('IIR Butterworth Lowpass Filter');

仿真的图像如下:

3、试设计一个模拟低通Butterworth 滤波器

求阶数,,,16,3.072.0dB A s

dB p A p s ==Ω==Ωππ

解:经计算可知低通Butterworth 滤波器的阶数为3 用Matlab 软件计算的程序如下: OmegaP=0.2*pi;

OmegaS=0.3*pi; Rp=7; As=16;

N=ceil(log10((10.^(0.1*abs(Rp))-1)./(10.^(0.1*abs(As))-1))/(2*log10(OmegaP/OmegaS)))

运行程序后出来的结果如下图:

使用Matlab软件仿真的程序如下:

Wp=input('Normalized passband edge =');

Ws=input('Normalized stopband edge =');

Rp=input('Passband ripple in dB =');

Rs=input('Minimum stopband attenuation in dB ='); [N,Wn]=buttord (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('Gain dB');

title('IIR Butterworth Lowpass Filter');

得出的仿真波形如下:

4 试用双线性变换法设计Butterworth 低通DF 。

已知低通DF 的3dB 带宽频率 ,止带起始频率 ,在 处的止带衰减

解:使用Matlab 软件仿真仿真的程序如下:

clc;

clear all;

OmegaP=2*pi*2000; OmegaS=2*pi*4000; Rp=3; As=15;

g=sqrt((10^(As/10)-1)/(10^(Rp/10)-1)); OmegaR=OmegaS/OmegaP;

πω2.0=

c π

ω4.0=s s ωω=dB

e H s jw 15)(lg 20-=

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(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*b

w0=[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,'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模拟滤波器的技术指标Ωc=2⨯π2kHz, Ωs=2⨯π4kHz,在Ω=Ωs处的衰减小于-15dB,通带波动参数,ε2 =0.2,求其阶数。解:经计算可知切比雪夫模拟滤波器的阶数为4

用matlab计算的程序如下:

clc;

clear all;

OmegaP=2*pi*2000;

OmegaS=2*pi*4000;

Rp=0.17;

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)))

其计算结果显示如下:

使用matlab软件仿真程序如下:

clc;

clear all;

OmegaP=2*pi*2000;

OmegaS=2*pi*4000;

Rp=0.17;

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(poly(z0));M=length(b0);

bNn=b0(M);z=z0*OmegaC;b=real(poly(z));

bNu=b(M);k=k0*(aNu*bNn)/(aNn*bNu);

相关文档
最新文档