(完整版)南理工数字信号处理课程实验报告

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

数字信号处理project

实验报告

学院:电子工程与光电技术学院专业:通信工程

学号:

姓名:

一、IIR 低通滤波器设计

1.滤波器要求:

Using bilinear transform methods ,design a IIR low-pass filter with the following specifications:

(1)Write a program to compute the required order of the

Butterworth or Chebyshev analog filters;

(2) Using bilinear transform methods ,transform the analog filters to the corresponding digital filters;

(3)Sketch the frequency response of the filters.

2.滤波器设计程序如下:

wp=0.25*pi;

ws=0.45*pi;

Wp=tan(wp/2);

Ws=tan(ws/2);

ap=0.5;

as=20;

[N,Wn]= cheb1ord(Wp,Ws,ap,as,

's');

[B,A]= cheby1(N,1,Wn,'s');

[num,den]= bilinear(B,A,0.5);

[h,w]=freqz(num,den);

subplot(211);

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

ylim([-50 5]);

xlim([0 1]);

xlabel('\Omega/\pi');

ylabel('增益(dB )');0.2A ,0.4A ; the passband ripple -0.5dB,

p s the stopband attenuation

20dB. where A is the last nomber of your student number

title('幅度响应曲线');

grid;

[h,w]=phasez(num,den);

subplot(212);

plot(w/pi,h/pi*180);

xlabel('\Omega/\pi');

ylabel('phase(degree)');

title('相位响应曲线');

grid;

其中,wp,ws是角频带边界频率,Wp,Ws是模拟低通滤波器的边带角频率,ap是通带波纹,as是阻带波纹,h是频率响应。

幅度相位响应波形如下:

二、FIR 低通滤波器设计

1.滤波器要求:

Design a low-pass FIR filter by windowing, the specifications of the filter are

Please using two different windows design the filter ,and sketch their frequency response.

2.滤波器设计程序如下:

clear;

fp=845;

fs=1005;

Fs=4000;

as=45;

wp=(fp*2*pi)/(Fs);

ws=(fs*2*pi)/(Fs);

wc=(wp+ws)/2;

dw= ws-wp;

%Hamming

M=ceil(3.32*pi/dw);

N=2*M+1;

b=fir1(N,ws/(2*pi));

[H,w]=freqz(b,1,512);

figure(1);

stem(b);

title('冲激响应');

xlabel('Time-index-n');800A ,A=last two numbers of your student number 1000+B ;B=the last number of your student number 0.5;

min

40+last nomber of the student number ;T f Hz p f Hz s passband ripple dB imum stopband attenuation dB f ();();()4.

kHz

ylabel('h[n]');

figure(2);

plot(w/pi,20*log10(abs(H)));

grid;

xlabel('\omega/\pi');

ylabel('增益(dB)');

title('幅度响应');

axis([0 1 -80 10]);

[H,w]=phasez(b,1,512);

figure(3);

plot(w/pi,H/pi*180);

grid;

xlabel('\omega/\pi'); ylabel('phase(degree)');

title('相位响应');

%Blackman

M=ceil(5.56*pi/dw);

N=2*M;

b=fir1(N,ws/(2*pi),blackman(N+1)); [H,w]=freqz(b,1,512);

figure(4);

stem(b);

title('冲激响应');

xlabel('Time-index-n'); ylabel('h[n]');

figure(5);

plot(w/pi,20*log10(abs(H)));

grid;

xlabel('\omega/\pi');

ylabel('增益(dB)');

title('幅度响应');

axis([0 1 -200 10]);

[H,w]=phasez(b,1,512);

figure(6);

plot(w/pi,H/pi*180);

grid;

xlabel('\omega/\pi'); ylabel('phase(degree)');

相关文档
最新文档