实验4离散系统地分析报告.docx
《实验4离散系统地分析报告.docx》由会员分享,可在线阅读,更多相关《实验4离散系统地分析报告.docx(15页珍藏版)》请在冰豆网上搜索。
![实验4离散系统地分析报告.docx](https://file1.bdocx.com/fileroot1/2023-6/20/3e59d5ac-d4a3-4222-9ea4-0ea771f07d2f/3e59d5ac-d4a3-4222-9ea4-0ea771f07d2f1.gif)
实验4离散系统地分析报告
实验四离散系统分析
一、实验目的
深刻理解离散时间系统的系统函数在分析离散系统的时域特性、频域特性以
及稳定性中的重要作用及意义,熟练掌握利用MATLA分析离散系统的时域响应、频响特性和零极点的方法。
掌握利用DTFT和DFT确定系统特性的原理和方法。
二、实验原理
可以在时域、复频域(Z域)及频域分析系统,在以上三种域表征系统固有特性的量分别为:
单位冲激响应h(n)(时域表征);
系统函数H(z)(Z域表征);
频率响应H(ej)(频域表征)。
MATLA吐要从以上三方面提供了许多可用于分析线性时不变系统的函数,包含系统时域响应、系统函数、系统频域响应等分析函数。
本实验通过调用各种系统预置函数来求系统的以上几个表征量以及零极点图。
三、实验内容
1.已知某LTI系统的差分方程为:
y[k]1.143y[k1]0.412y[k2]0.0675x[k]0.1349x[k1]0.0675x[k2]
(1)初始状态y[1]1,y[2]2,输入x[k]u[k],计算系统的全响应。
程序段:
N=40;
b=[0.0675,0.1349,0.0675];
a=[1,-1.143,0.412];
x=ones(1,N);
zi=filtic(b,a,[1,2]);
y=filter(b,a,x,zi);
stem(y)
xlabel('k');
title('y[k]');
结果:
川】
7
xdk]cos(-k)u[k];x2【k]cos^k)u[k];X3【k]cos(-k)u[k]
10510
程序
N=30;
k=O:
N;
b=[0.0675,0.1394,0.0675];
a=[1,-1.143,0.412];
x1=cos(pi*0.1.*k);
x2=cos(pi*0.2*k);
x3=cos(pi*0.7*k);
y1=filter(b,a,x1);
y2=filter(b,a,x2);
y3=filter(b,a,x3);
subplot(3,1,1);
stem(y1)
subplot(3,1,2);
stem(y2)
subplot(3,1,3);stem(y3):
结果:
(3)该系统具有什么特性?
答:
因果稳定。
2.已知某因果LTI系统的系统函数为:
H(z)
1234
0.035710.1428z10.2143z20.1428z30.03571z4
11.035z10.8264Z20.2605z30.04033z4
(1)计算系统的单位冲激响应程序:
N=50;
k=1:
N;
b=[0.0357,0.1428,0.2143,0.1428,0.0357];a=[1,-1.035,0.8264,-0.2605,0.04033];
y1=impz(b,a,N);
stem(yl)
结果为:
(2)当信号通过系统时,c计算4系统的零状态2响应。
程序为:
N=50;
k=1:
N;
b=[0.0357,0.1428,0.2143,0.1428,0.0357];a=[1,-1.035,0.8264,-0.2605,0.04033];
x=ones(1,N)+cos(pi*0.25*k)+cos(0.5*pi*k);y1=impz(b,a,N);
y2=filter(b,a,x);
subplot(2,1,1);
stem(y1)
subplot(2,1,2);
stem(y2)
结果为:
CF
0.2-
V':
'。
百rU07乞七今七导OiJOdoO牛
>导:
卜yM<'t.--oc
JO4fso
in
3.已知LTI系统的输入输出序列分别为x[k]u[k]cosqk)u[k]cos(?
k)u[k]
(a)x[k]
(1)ku[k],y[k]1
(1)ku[k](!
)ku[k]
2424
(b)x[k]
(1)ku[k],y[k](4)ku[k](4)k1u[k1]
(1)利用解析方法分别求解系统的单位取样响应。
程序:
N=20;
a仁[1,-0.75];
b仁[1.25,-19/16];
h1=impz(b1,a1,N);
subplot(2,1,1);
stem(h1)
b2=[1,-1];
a2=[1];
h2=impz(b2,a2,N);
subplot(2,1,2);
stem(h2)
结果为:
(2)利用系统辨识原理确定并求出系统的单位脉冲响应h[k]。
比较解析方法
与系统辨识方法得到的系统单位冲激响应,分析误差原因。
程序:
N=50;
k=O:
N;
x1=0.5.Ak;
y1=0.25*0.5.Ak+0.25.Ak;
X1=fft(x1);
丫仁fft(y1);
H仁Y1/X1;
h1=ifft(H1)
n=1:
50;
x2=0.25.an;
y2=0.25.An-4*0.254n;
X2=fft(x2);
Y2=fft(y2);
H2=Y2/X2;
h2=ifft(H2)
结果:
hi二H(ej)
1.10F1十O.OOOOih2二
-3.0000-O.OOOOi
»l
误差原因:
取样点数不够多引起的误差,而且不易与k对应
4.已知某离散系统的输入输出序列。
输入序列:
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,后面的数值均趋于0;
输出序列:
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
(1)绘出输入输出信号的波形。
程序:
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,zeros(1,16)];
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];subplot(2,1,1);
stem(x)
subplot(2,1,2);stem(y)结果:
100
(2)计算该系统的频率响应,并绘出其幅频特性。
程序:
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,zeros(1,16)];
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,128);
Y=fft(y,128);
H=Y./X;
H0=abs(H);
plot(H0)
结果为:
3)计算该系统的单位冲激响应,并绘出其波形
程序:
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,zeros(1,16)];
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,64);
Y=fft(y,64);
H=Y./X;
H0=abs(H);
h0=ifft(H0)
stem(h0)
结果为:
hO=
Colujims1through5
66.52S1-35.561420.0669-12.27466.7&I6
CoIujips昌through10
-3.2976
0,8766
Q.691S
-1.6B71
2.2493
CqIujiuis11
through
15
-2.5037
2*5529
4537
2.2«3S
-2.0228
CoIujuis16
throneh
20
1.7587
-1,4926
k2395
-1.0€85
0-B048
Coltunns21
through
25
-0.6306
0,4E63
-0.3703
0.230^
-0.2136
ColmnsZBthrough30
0*3604
-0.1353
0.H5o
-0.1071
CL1033
Colrnns31
through
35
-fl.1027
C.1030
-0.1034
0-1030
-0.1027
Columns36
-through
40
0-1033
*0.1071
0.LI56
-0.1353
0.1664
匚oliimns41
through
45
-0-2136
0.2804
-0,3703
0.4863
-0.6306
Colwns46
■throvieh
50
0.8048
-1.C0B5
1.2395
-i・1926
1+7537
Colunins£1through&5
-2.0228
2.2639
-2.4637
Z.5529
K5087
CdIujiltls56
through
60
2.2493
-1.6871
0.691S
0.3766
-3.2976
ColUUITLS61
through
64
6+7916■
-12.274S
2'0.0669
-38.56U
图形为:
5.利用loadmtlb命令读入一段语音信号得到序列,然后在该段语音信号
中加入500Hz的正弦型干扰信号得到信号,利用FFT分析其频谱。
(1)下列数字滤波器能够滤除信号中500Hz正弦型干扰信号。
利用zplane命令做出其零极点分布图,利用freqz命令分析该滤波器的幅频特性和相频特性,比较零极点分布与滤波器频率特性的关系。
程序:
a=[1,-3.594,5.17,-3.494,0.945];
b=[0.6877,-2.509,3.664,-2.509,0.6877];
z=roots(b);
p=roots(a);
subplot(2,2,1);
zplane(b,a)
title('零极点分布')
[H,w]=freqz(b,a);subplot(2,2,2);plot(w,abs(H))xlabel('\omega(rad)');ylabel('HO');
title('幅频特性');subplot(2,2,3);plot(w,angle(H))xlabel('\omega(rad)');ylabel('\phi');
title('相频特性');结果:
关系:
系统零点越接近1贝肿畐频响应的波谷越低,即滤波器的滤波衰减最低点越低;系统极点越接近1贝肿畐频响应的波峰越高,即滤波器的滤波通带最高点越高。
极点主要影响频率响应的峰值,极点愈靠近单位圆,峰值愈尖锐;零点主要影响频率特性的谷值,零点愈靠近单位圆,谷值愈深,当零点在单位圆上时,频率特性为零,一个传递函数有几个极点幅度响应就有几个峰值,对应出现一些谷值。
(2)利用该数字滤波器滤除信号中的噪声,利用FFT观察其频谱,利用sound
函数播放处理前后的信号,比较处理前后的效果。
程序;
loadmtlb
N=150;
x=mtlb(1:
N);
k=1:
N;
subplot(1,2,1);
plot(k,x);title('处理前');X=fft(x,150);h=ifft(H);H=fft(H,150);Y=X.*H;y=ifft(Y);subplot(1,2,2);plot((1:
N),y);title('处理后');
结果:
实验思考题
1.系统函数的零极点对系统频率特性有何影响?
ANS系统零点越接近1,贝肿畐频响应的波谷越低,即滤波器的滤波衰减最低点越低;系统极点越接近1,贝肿畐频响应的波峰越高,即滤波器的滤波通带最高点越高。
极点主要影响频率响应的峰值,极点愈靠近单位圆,峰值愈尖锐;零点主要影响频率特性的谷值,零点愈靠近单位圆,谷值愈深,当零点在单位圆上时,频率特性为零,一个传递函数有几个极点幅度响应就有几个峰值,对应出现一些谷值。
2.对于因果稳定实系数的低通、高通、带通、带阻数字滤波器,零极点分布有何特点?
ANS:
因为是因果稳定系统,所以极点都在单位圆内。
若为最小相位系统,其零点也在单位圆内。
3.离散系统的系统函数的零极点对系统脉冲响应有何影响?
ANS系统函数的极点位置决定序列包络的变化趋势和变化频率,极点的半径决定了序列包络的变化趋势,而极点的幅角决定序列包络的变化频率,而零点位置只影响冲激响应的幅度大小和相位。
4.若某因果系统不稳定,有哪些主要措施可使之稳定?
ANS改变参数,让极点在单位圆内。
5.从频域利用DFT确定离散LTI系统的特性,一般会产生哪些误差,如何改善?
大全
ANS:
频谱混叠,对于带限连续信号,只要提高抽样频率使之满足时域抽样定理;对于非带限信号,更具实际情况对其进行低通滤波,使之成为带限信号;频谱泄露,时域加窗使之成为有限长序列;栅栏现象,在序列后补零,构成新序列后再求频谱
6.若使用DFT对连续LTI系统进行辨识,需要解决哪些问题?
ANS循环卷积长度的确定。