数字信号处理实验四.docx
《数字信号处理实验四.docx》由会员分享,可在线阅读,更多相关《数字信号处理实验四.docx(13页珍藏版)》请在冰豆网上搜索。
![数字信号处理实验四.docx](https://file1.bdocx.com/fileroot1/2023-1/23/0f43b633-5790-4428-be79-ba4634811add/0f43b633-5790-4428-be79-ba4634811add1.gif)
数字信号处理实验四
实验报告
实验名称____数字信号处理实验____
课程名称______离散系统分析_____
院系部:
电气与电子工程学院专业班级:
学生姓名:
学号:
同组人:
实验台号:
指导教师:
成绩:
实验日期:
华北电力大学
一、实验目的及要求:
深刻理解离散时间系统的系统函数在分析离散系统的时域特性、频域特性以及稳定性中的重要作用及意义,熟练掌握利用MATLAB分析离散系统的时域响应、频响特性和零极点的方法。
掌握利用DTFT和DFT确定系统特性的原理和方法。
二、仪器用具:
仪器名称
规格/型号
数量
备注
电脑
清华同方
1
三、实验原理
可以在时域、复频域(Z域)及频域分析系统,在以上三种域表征系统固有特性的量分别为:
单位冲激响应h(n)(时域表征);
系统函数H(z)(Z域表征);
频率响应H(ej)(频域表征)。
MATLAB主要从以上三方面提供了许多可用于分析线性时不变系统的函数,包含系统时域响应、系统函数、系统频域响应等分析函数。
四、实验方法与步骤:
1.
(1)
N=100;
t=0:
1:
99;
a=[1,-1.143,0.412];
b=[0.0675,0.1349,0.0675];
x=ones(1,N);
zi=filtic(b,a,[1,2]);
y=filter(b,a,x,zi);
stem(t,y)
(2)
(一)
N=100;
k=0:
1:
99;
a=[1,-1.143,0.412];
b=[0.0675,0.1349,0.0675];
u=ones(1,N);
xi=u.*cos((pi/10).*k);
zi=filtic(b,a,[1,2]);
y=filter(b,a,xi,zi);
stem(k,y)
(二)
N=100;
k=0:
1:
99;
a=[1,-1.143,0.412];
b=[0.0675,0.1349,0.0675];
u=ones(1,N);
xi=u.*cos((pi/5).*k);
zi=filtic(b,a,[1,2]);
y=filter(b,a,xi,zi);
stem(k,y)
(三)
N=100;
k=0:
1:
99;
a=[1,-1.143,0.412];
b=[0.0675,0.1349,0.0675];
u=ones(1,N);
xi=u.*cos((7*pi/10).*k);
zi=filtic(b,a,[1,2]);
y=filter(b,a,xi,zi);
stem(k,y)
2.
(1)
N=40;
a=[1,-1.035,0.8264,-0.2605,0.04033];b=[0.03571,0.1428,0.2143,0.1428,0.03571];
y=impz(b,a,N);
stem(y);
xlabel('k');title('h[k]');
(2)
N=100;
k=0:
1:
99
b=[1,-1.035,0.8264,-0.2605,0.04033];
a=[0.03571,0.1428,0.2143,0.1428,0.03571];
u=ones(1,N);
x=u+cos((pi/4).*k).*u+cos((pi/2).*k).*u
y=filter(a,b,x);
stem(k,y);
xlabel('k');title('h[k]');
3.
(1)
(a)
(b)
(2)
4.
(1)
(a)
N=15;
t=0:
1:
14
x=[2,0.8333,0.3611,0.162,0.0748,0.0354,0.017,0.0083,0.0041,0.002,0.001,0.0005,0.0002,0.0001,0.0001];
stem(t,x)
(b)
N=31;
t=0:
1:
30
y=[0.0056,-0.0259,0.073,-0.1593,0.297,-0.4974,0.7711,-1.1267,1.5702,-2.1037,2.724,-3.4207,4.174,-4.9528,5.7117,-6.3889,6.9034,-7.1528,7.012,-6.3322,4.9416,-2.648,-0.7564,5.4872,-11.7557,19.7533,-29.6298,41.4666,-55.2433,70.7979,-87.7810]
stem(t,y)
(2)
N=100;
t=0:
1:
99;
x=[2,0.8333,0.3611,0.162,0.0748,0.0354,0.017,0.0083,0.0041,0.002,0.001,0.0005,0.0002,0.0001,0.0001];
y=[0.0056,-0.0259,0.073,-0.1593,0.297,-0.4974,0.7711,-1.1267,1.5702,-2.1037,2.724,-3.4207,4.174,-4.9528,5.7117,-6.3889,6.9034,-7.1528,7.012,-6.3322,4.9416,-2.648,-0.7564,5.4872,-11.7557,19.7533,-29.6298,41.4666,-55.2433,70.7979,-87.7810]
X=fft(x,N);
Y=fft(y,N);
H=Y./X;
h=ifft(H,N);
[H,w]=freqz(b,a);
plot(w,abs(H))
xlabel('Frequency(rad)');
ylabel('Magnitude');
title('Magnituderesponse');
stem(w,h)
5.
(1)
(一)
b=[0.6877,-2.509,3.664,-2.509,0.6877];
a=[1,-3.594,5.172,-3.494,0.945];
z=roots(b)
p=roots(a)
zplane(b,a)
(二)
b=[0.6877,-2.509,3.664,-2.509,0.6877];
a=[1,-3.594,5.172,-3.494,0.945];
[H,w]=freqz(b,a);
plot(w,abs(H))
xlabel('Frequency(rad)');
ylabel('Magnitude');
title('Magnituderesponse');
(三)
b=[0.6877,-2.509,3.664,-2.509,0.6877];
a=[1,-3.594,5.172,-3.494,0.945];
[H,w]=freqz(b,a);
plot(w,angle(H))
xlabel('Frequency(rad)');
ylabel('Angle');
title('Angleresponse');
五、实验结果与数据处理:
1.
(1)
(2)
(一)
(二)
(三)
2.
(1)
(2)
3.
(1)
(a)
(b)
4.
(1)
(a)
(b)
(2)
5.
(1)
(a)—幅频响应
(b)
六、讨论与结论(对实验现象、实验故障及处理方法、实验中存在的问题等进行分析和讨论,对实验的进一步想法或改进意见。
)
七、实验打印输出结果: