当前位置:
文档之家› 数字信号处理 第六章课后MATLAB答案 华工
数字信号处理 第六章课后MATLAB答案 华工
%Program 6_3 num = input('Type in numerator coefficients = '); den = input('Type in denominator coefficients = '); [r,p,k] = residuez(num,den); disp('Residues');disp(r') disp('Poles');disp(p') disp('Constants');disp(k) (a) 输入: Type in numerator coefficients = [7,0,0] Type in denominator coefficients = [1,0.3,-0.1] 输出: Residues 5 2 Poles -0.500000000000000
=4−
5+2������ −1 1+0.36 ������ −2 2 0.5−0.4������
+
1−0.48 ������ −1
−
+
0.5+0.4������
逆 Z 变换:
������2 (z)=4 δ [n]-2* (−0.4)������ *u[n]- ( 5-0.4i ) * (−0.6������)������ *u[n] + (5+0.4i)*(0.6������)������ *u[n]
������������ =
7.2222 15.9877 + -16 1−0.5������ −1 1+0.4������ −1 (1+0.4������ −1 )2
7.2346
逆变换: ROC1:|z|<源自.4,������������ [n]=-16δ[n]-7.2346*0.5������ *[-n-1]+7.222*(−0.4)������ *[-n-1]-15.9877*(n+1)*(−0.4)������ *[-n-1]
0.200000000000000
Constants 0 Z 变换的部分分式展开式:
������������ =
5
1+0.5������
−1 +
2
1 −0.2������ −1
其极点为 z=-0.5,z=0.2
逆变换: ROC1:|z|<0.2, x[n]=-5*(−0.5)������ *u[-n-1]-2*0.2������ ∗u[-n-1]; ROC2:0.2<|z|<0.5, x[n]=-5*(−0.5)������ *u[-n-1]+2*0.2������ ∗u[n]; ROC3:|z|>0.5, x[n]=5*(−0.5)������ *u[n]-2*0.2������ ∗u[n];
Columns 25 through 30 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000
可见这前 30 个样本与准确求逆 Z 变换而得到的样本一致!
(������)������2 (z)=4-
10
=
1+0.4 ������ −1 1+0.6������������ −1 1−0.6������������ −1 3+ 2+0.48 ������ ������ −1 + −0.72+0.192 ������ ������ −2 −0.576 ������ −3 1+0.4������ −1 −0.36 ������ −2 −0.144 ������ −3
15.987654320987650 + 0.000000130231862i Column 3 -7.222222222222222 - 0.000000130231862i Poles Column 1 0.500000000000000 Column 2 -0.400000000000000 - 0.000000003258311i Column 3 -0.400000000000000 + 0.000000003258311i Constants -16 Z 变换的部分分式展开式:
调用函数: % Program 6_5 L = input('Type in the length of output vector = '); num = input('Type in the numerator coefficients = '); den = input('Type in the denominator coefficients = '); [y,t] = impz(num,den,L); disp('Coefficients of the power series expansion'); disp(y') 输入: Type in the length of output vector = 30 Type in the numerator coefficients = [0,-3.5,-0.4] Type in the denominator coefficients = [1,0.1,-0.2] 输出: Coefficients of the power series expansion Columns 1 through 6 0 -3.5000 -0.0500 -0.6950 0.0595 -0.1450
M6.1
Program: num = input('Type in the numerator coefficients = '); den = input('Type in the denominator coefficients = '); K = num(1)/den(1); Numfactors = factorize(num) Denfactors = factorize(den) disp('Numerator factors');disp(Numfactors); disp('Denominator factors');disp(Denfactors); disp('Gain constant');disp(K); zplane(num,den) 输入:Type in the numerator coefficients = [3,-2.4,15.36,3.84,9] Type in the denominator coefficients = [5,-8.5,17.6,4.7,-6] 输出: Numerator factors 1.000000000000000 -1.199999999999999 4.999999999999989 1.000000000000000 0.399999999999999 0.600000000000011 Denominator factors 1.000000000000000 -1.800000000000000 4.000000000000000 1.000000000000000 0.600000000000000 0 1.000000000000000 -0.500000000000000 0 Gain constant 0.600000000000000 Z 变换的因式形式:
G(z)=0.6*
零极点图:
(1−2������ −1 +5������ −2 )(1+0.4������ −1 +0.6������ −2 )
(1−1.8������ −1 +4������ −2 )(1+0.6������ −1 )(1−0.5������ −1 )
2 1.5 1
Imaginary Part
0.5 0 -0.5 -1 -1.5 -2 -3 -2 -1 0 Real Part 1 2 3
ROC: R1:∞ ≥|Z|>2; R2:2>|Z|>0.6; R3:0.6> |������| >0.5 ; R4:0.5 >|Z|≥ 0 R1:右边序列; R2,R3:双边序列; R4:左边序列
M6.2
1+0.5 ������
−1 −
5 1−0.4������ −1
可以得到������1 (z)=
−3.5������ −1 −0.4������ −2 1+0.1������ −1 −0.2 ������ −2
,|z|>0.5
逆Z变换:������1 (z)=2δ[n]+3*(−0.5)������ *u[n]-5*0.4������ *u[n]
ROC2:0.4<|z|<0.5, ROC3:|z|>0.5,
������������ [n]=-16δ[n]-7.2346*0.5������ *[-n-1]+7.222*(−0.4)������ *[n]-15.9877*(n+1)*(−0.4)������ *[n] ������������ [n]=-16δ[n]-7.2346*0.5������ *[n]+7.222*(−0.4)������ *[n]-15.9877*(n+1)*(−0.4)������ *[n]
(b) 输入: Type in numerator coefficients = [0,3,1.8,1.28] Type in denominator coefficients = [1,0.3,-0.24,-0.08] 输出: Residues Column 1 7.234567901234567 Column 2
Columns 7 through 12 0.0264 -0.0316 0.0084 -0.0072 0.0024 -0.0017