您好,欢迎来到测品娱乐。
搜索
您的当前位置:首页《基于MATLAB的信号与系统实验指导》编程练习

《基于MATLAB的信号与系统实验指导》编程练习

来源:测品娱乐
《基于MATLAB的信号与系统实验指导》编程练习

2连续时间信号在M A T L A B中的表示2-1.利用MATLAB命令画出下列连续信号的波形图

(1)

>> t=0:0.01:3;

>> ft=2*cos(3*t+pi/4); >> plot(t,ft),grid on; >> axis([0 3 -2.2 2.2]); >> title('2cos(3t+pi/4)') (2)

>> t=0:0.01:3; >> ft=2-exp(-t); >> plot(t,ft),grid on; >> title('(2-exp(-t))u(t)') (3)

>> t=-1:0.01:1;

>> ft=t.*(uCT(t)-uCT(t-1)); >> plot(t,ft),grid on >> axis([-1 1 -0.2 1.2]); >> title('t[u(t)-u(t-1)]') (4)

>> t=-1:0.01:3;

>> ft=(1+cos(pi*t)).*(uCT(t)-uCT(t-2)); >> plot(t,ft),grid on >> axis([-1 3 -0.2 2.2]);

>> title('[1+cos(pi*t)][u(t)-u(t-2)]')

2-2.利用MATLAB命令画出下列复信号的实部、虚部、模和辐角 (1)

>> t=0:0.01:3;

>> ft=2+exp(i*(pi/4)*t)+exp(i*(pi/2)*t);

>> subplot(2,2,1);plot(t,real(ft));title('实部');axis([0 3 0 4]);grid on;

>> subplot(2,2,2);plot(t,imag(ft));title('虚部');axis([0 3 0 2]);grid on;

>> subplot(2,2,3);plot(t,abs(ft));title('模');axis([0 3 0 4]);grid on;

>> subplot(2,2,4);plot(t,angle(ft));title('相角');axis([0 3 0 2]);grid on;

(2) t=0:0.01:3;

>> ft=2*exp(i*(t+pi/4));

>> subplot(2,2,1);plot(t,real(ft));title('实部');axis([0 3 0 2]);grid on;

>> subplot(2,2,2);plot(t,imag(ft));title('虚部');axis([0 3 0 2]);grid on;

>> subplot(2,2,3);plot(t,abs(ft));title('模');axis([0 3 0 4]);grid on;

>> subplot(2,2,4);plot(t,angle(ft));title('相角');axis([0 3 0 4]);grid on;

2-3.利用MATLAB命令产生幅度为1、周期为1、占空比为0.5的一个周期矩形脉冲信号

>> t=-0.5:0.01:3; >> ft=square(2*pi*t,50);

>> plot(t,ft);grid on;axis([-0.5 3 -1.2 1.2]);

>> title('幅度为1、周期为1、占空比0.5的周期举行脉冲信号') 3连续时间信号在MATLAB中的运算 3-1.试用MATLAB命令绘出以下信号的波形图 (1) >> syms x t;

>> t=-1:0.01:1;

>> x=exp(-t).*sin(10*pi*t)+exp(-0.5*t).*sin(9*pi*t); >> plot(t,x) (2) >> syms x t; >> t=-1:0.01:1;

>> x=sinc(t).*cos(10*pi*t); >> plot(t,x)

3-2.已知连续时间信号f(t)的波形如图3-6所示,试用MATLAB命令画出下列信号的波形图

先画出图3-6: >> t=-2:0.01:2;

>>f=(-t-1).*(-uCT(t+2)+uCT(t+1))+uCT(t+1)+uCT(t)-uCT(t-1)-(t-1).*(uCT(t-1)-uCT(t-2))-uCT(t-2); >> plot(t,f)

>> axis([-4 4 -1 2]) >> title('图3-6') >> t=-2:0.01:2; >> f1=funct2(t-1); >> f2=funct2(2-t); >> f3=funct2(2*t+1); >> f4=funct2(4-t/2);

>> f5=(funct2(t)+funct2(-t)).*uCT(t);

>> subplot(231);plot(t,f1);grid on;title('f(t-1)');axis([-3 3 -1 2]); >> subplot(232);plot(t,f2);grid on;title('f(2-t)');axis([-3 3 -1 2]); >> subplot(233);plot(t,f3);grid on;title('f(2t-1)');axis([-3 3 -1 2]);

>> subplot(234);plot(t,f4);grid on;title('f(4-t/2)');axis([-3 3 -1 2]);

>> subplot(235);plot(t,f5);grid on;title('(f(t)+f(-t))u(t)');axis([-3 3 -1 2]);

3-3.试用MATLAB命令绘出如图3-7所示信号的偶分量和奇分量 >> t=0:0.01:2;

>> f=(uCT(t)-uCT(t-2)).*(-t+1); >> plot(t,f);title('图3-7') >> f1=fliplr(f);

>> fe=(f+f1)/2;fo=(f-f1)/2; >> subplot(211),plot(t,fe);grid on >> title('fe')

>> subplot(212),plot(t,fo);grid on;title('fo') 4连续时间信号的卷积计算

4-1用MATLAB命令绘出下列信号的卷积积分f1(t)?f2(t)的时域波形图

>> dt=0.001;t1=-0.5:dt:3.5; >> f1=uCT(t1)-uCT(t1-2); >> t2=t1;

>> f2=uCT(t2)+uCT(t2-1)-uCT(t2-2)-uCT(t2-3); >> [t,f]=ctsconv(f1,f2,t1,t2,dt); 6周期信号的傅里叶级数及频谱分析

6-1已知周期三角信号如图6-5所示,试求出该信号的傅里叶级数,利用MATLAB编程实现其各次谐波的叠加,并验证其收敛性。

6-2 试用MATLAB分析图6-5中周期三角信号的频谱。当周期三角信号的周期和三角信号的宽度变化时,试观察分析其频谱的变化。

7 傅里叶变换及其性质

7-1试用MATLAB命令求下列信号的傅里叶变换,并绘出其幅度谱和相位谱。

(1)f1(t)=sin2π(t?1) π(t?1)(2)f2(t)=[sin?(πt) πt ]2

解:(1)ft1=sym('sin(2*pi*(t-1))/(pi*(t-1))');

>> Fw1=simplify(fourier(ft1)); >> subplot(211)

>> ezplot(abs(Fw1)),grid on >> title('幅度谱')

>> phase=atan(imag(Fw1)/real(Fw1)); >> subplot(212)

>> ezplot(phase);grid on >> title('相位谱') (2)

7-2.试用MATLAB命令求下列信号的傅里叶反变换,并绘出其时域信号图。

(1)F1(w)=10 3+wi ?4 5+wi

(2)F2(w)=e?4w2 解:(1)>> syms t

>> Fw=sym('10/(3+w*i)-4/(5+w*i)'); >> ft=ifourier(Fw,t); >> ezplot(ft),grid on (2)>> syms t

>> Fw2=sym('exp(-4*w^2)'); >> ft2=ifourier(Fw2,t) ft2 =

exp(-t^2/16)/(4*pi^(1/2))

3.试用MATLAB数值计算方法求图7-8所示信号的傅里叶变换,并画出其频谱图。

解:

4.已知两个门信号的卷积为三角波信号,试用MATLAB命令验证傅里叶变换的时域卷积定理。

解:将门函数先进行时域卷积运算,再将卷积后的结果做傅里叶

变换,程序和结果如下:

dt?=?0.01;?t?=?-2:dt:2.5; f1?=?uCT(t+0.5)-?uCT(t-0.5);? f?=?conv(f1,f1)*dt; ft=sym('f');? Fw?=?fourier(ft)? Fw?=2*i*pi*dirac(1,w)??

将一个门函数先进行傅里叶变换,再将结果与自身相乘,程序和结果如下:

dt?=?0.01;?t?=?-2:dt:2.5;? f1?=?uCT(t+0.5)-?uCT(t-0.5);?

ft=sym('f1');? Fw?=?fourier(ft);? Fw=Fw*Fw? Fw?=-4*pi^2*dirac(1,w)^2? 由此来验证傅里叶变换的时域卷积定理

第8章 连续时间LTI 系统的频率特性及频域分析

8.1试用MATLAB 命令求图8-8所示电路系统的幅频特性和相频特性。已知R=10Ω,L=2H ,C=0.1F

解:由电路知识可得,该电路系统的频率响应为H (ω)= jω

0.2(jω)+0.2(jω)+jω

MATLAB 源程序: >> w=-6*pi:0.01:6*pi; >> b=[1 0]; >> a=[0.2 0.2 1 0]; >> H=freqs(b,a,w); >> subplot(211) >> plot(w,abs(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('|H(\\omega)|') >> title('电路系统的幅频特性') >> subplot(212)

>> plot(w,angle(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('\\phi(\\omega)') >> title('电路系统的相频特性')

8.2已知系统微分方程和激励信号如下,试用MATLAB 命令求系统的稳态响应。

(1)dy(t)dt +32y (t )=df(t)dt ,f (t )=cos2t ; (2) d 2y(t) dt +2 dy(t)dt +3y (t )=? df (t )dt

+2f(t),f (t )=3+cos2t +cos5t 。 解:(1)频率响应为H (ω)=jωjω+ 3 2

>> t=0:0.01:20; >> H=(w*i)/(w*i+3/2); >> f=cos(2*t); >> y=abs(H)*cos(2*t+angle(H)); >> subplot(211) >> plot(t,f),grid on

>> ylabel('f(t)'),xlabel('Time(s)') >> title('激励信号的波形') >> subplot(212) >> plot(t,y),grid on

>> ylabel('y(t)'),xlabel('Time(s)') >> title('稳态响应的波形') (2)频率响应为H(ω)= jω+2 (jω)2+2jω+3 MATLAB源程序: >> t=0:0.01:20; >> w1=2;w2=5;

>> H1=((-i*w1+2)./((i*w1)^2+2*i*w1+3)); >> H2=(-i*w2+2)./((i*w2)^2+2*i*w2+3); >> f=3+cos(2*t)+cos(5*t); >>

y=3+abs(H1)*cos(w1*t+angle(H1))+abs(H2)*cos(w2*t+angle(H2

)); >> subplot(211);

>> plot(t,f);grid on

>> ylabel('f(t)'),xlabel('Time(s)') >> title('激励信号的波形') >> subplot(212); >> plot(t,y),grid on

>> ylabel('y(t)'),xlabel('Time(s)') >> title('稳态响应的波形') 第9章信号抽样及抽样定理

9.1设有三个不同频率的正弦信号,频率分别为f1=100Hz,f2=200Hz,f3=3800Hz。现在用抽样频率f s=4000Hz对这三个正弦信号进行抽样,用MATLAB命令画出各抽样信号的波形及其频谱,并分析其频率混叠现象。

解:>> Ts=0.00025; >> dt=0.0001; >> t1=-0.1:dt:0.1; >> ft=sin(200*pi*t1); >> subplot(221) >> plot(t1,ft),grid on >> axis([-0.01 0.01 -1.1 1.1]) >> xlabel('Time(sec)'),ylabel('f(t)') >> title('f1信号') >> N=100; >> k=-N:N; >> W=pi*k/(N*dt); >> Fw=ft*exp(-i*t1'*W)*dt; >> subplot(222)

>> plot(W,abs(Fw)),grid on >> axis([-5000 5000 -0.1 0.2]) >> t2=-0.1:Ts:0.1;

>> fst=sin(200*pi*t2); >> subplot(223) >> plot(t1,ft,':'),hold on >> stem(t2,fst),grid on >> axis([-0.01 0.01 -1.1 1.1]) >> xlabel('Time(sec)'),ylabel('fs(t)') >> title('抽样后的信号'),hold off >> Fsw=fst*exp(-i*t2'*W)*Ts; >> subplot(224)

>> plot(W,abs(Fsw)),grid on >> axis([-5000 5000 -0.1 0.2]) >> xlabel('\\omega'),ylabel('Fs(w)') >> title('抽样信号的频谱')

9.2结合抽样定理,用MATLAB编程实现Sa(t)信号经冲激脉冲抽样后得到的抽样信号fs(t)及其频谱,并利用fs(t)重构Sa(t)信号。

解:首先,画出Sa(t)信号的波形和频谱: >> syms t; >> Sa(t)=(sin(t))/t; >> subplot(211) >> ezplot(Sa(t)),grid on

>> xlabel('Time(sec)'),ylabel('Sa(t)') >> title('Sa(t)的波形')

>> Fw=simplify(fourier(Sa(t))); >> subplot(212)

>> ezplot(abs(Sa(t))),grid on >> xlabel('\\omega'),ylabel('H(jw)') >> title('Sa(t)的频谱')

由图可知,Sa(t)的频谱大部分集中在[0,6]之间,设其截止频率为w m=6,因而奈奎斯特间隔T s=

1 2f m =π

6

,采用截止频率w c=1.2×w m的低通滤波器对抽样信号滤波后重建信号f(t),并计算重建信号与

原Sa(t)信号的绝对误差: >> wm=6; >> wc=1.2*wm; >> Ts=0.4; >> n=-100:100; >> nTs=n*Ts; >> fs=sinc(nTs/pi); >> t=-6:0.1:6; >>

ft=Ts*wc/pi*fs*sinc((wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t)))); >> t1=-6:0.1:6;

>> f1=sinc(t1/pi); >> subplot(311) >> plot(t1,f1,':'),hold on >> stem(nTs,fs),grid on >> axis([-6 6 -0.5 1])

>> xlabel('nTs'),ylabel('f(nTs)');

>> title('抽样间隔Ts=0.4时的抽样信号f(nTs)') >> hold off >> subplot(312) >> plot(t,ft),grid on >> axis([-6 6 -0.5 1]) >> xlabel('t'),ylabel('f(t)');

>> title('由f(nTs)信号重建得到Sa(t)信号') >> error=abs(ft-f1); >> subplot(313) >> plot(t,error),grid on >> xlabel('t'),ylabel('error(t)');

>> title('重建信号与原信号的绝对误差') 第10章拉普拉斯变换

10.1试用MATLAB命令求下列函数的拉普拉斯变换。(1)te?3t(2)(1+3t+5t2)e?2t

解:(1)>> f=sym('t*exp(-3*t)'); >> L=laplace(f) L = 1/(s + 3)^2

(2)>> f=sym('(1+3*t+5*t^2)*exp(-2*t)'); >> L=laplace(f) L =

1/(s + 2) + 3/(s + 2)^2 + 10/(s + 2)^3

10.2试用MATLAB命令求下列函数的拉普拉斯反变换。 (1)1 2s+3(2)3 (s+5)(s+2) (3)3s

(s+5)(s+2)(4)1 s2(s2+2s+2)

解:(1)>> F=sym('1/(2*s+3)'); >> f=ilaplace(F) f =

exp(-(3*t)/2)/2

(2)>> F=sym('3/((s+5)*(s+2))'); >> f=ilaplace(F) f =

exp(-2*t) - exp(-5*t)

(3)>> F=sym('3*s/((s+5)*(s+2))'); >> f=ilaplace(F) f =

5*exp(-5*t) - 2*exp(-2*t)

(4)>> F=sym('1/(s^2*(s^2+2*s+2))'); >> f=ilaplace(F) f =

t/2 + (exp(-t)*cos(t))/2 - 1/2

10.3已知某线性时不变系统的系统函数为 H(s)=4s2+4s+4 32

利用MATLAB的拉普拉斯变换法求系统的单位阶跃响应。 解:输入信号x(t)=u(t)的拉普拉斯变换为X(s)=1 s ,故

Y(s)=H(s)?X(s)= 4s2+4s+4 s4+3s3+2s2

>> F=sym('(4*s^2+4*s+4)/(s^4+3*s^3+2*s^2)'); >> f=ilaplace(F) f =

2*t + 4*exp(-t) - 3*exp(-2*t) - 1

所以单位阶跃响应为y(t)=(2t+4e?t?3e?2t?1)u(t). 第11章连续时间LTI系统的零极点分析

11.1试用MATLAB命令画出下列系统函数的零极点分布图,并判断其稳定性。

(1)H(s)=s(s+2) s+8(2)H(s)=s(s?2) s+8 (3)H(s)=s 2 s+4s+8 (4)H(s)=s 2 s?4s+8(5)H(s)=s s?4s+8s

解:(1)>> b=[1 2 0]; >> a=[1 0 8]; >> sys=tf(b,a) >> pzmap(sys)

因为极点在虚轴上,所以系统临界稳定。(2)>> b=[1 -2 0]; >> a=[1 0 8]; >> sys=tf(b,a); >> pzmap(sys) 系统临界稳定。 (3)>> b=[1 0 0]; >> a=[1 4 8]; >> sys=tf(b,a); >> pzmap(sys) 系统稳定。 (4)>> b=[1 0 0]; >> a=[1 -4 8]; >> sys=tf(b,a); >> pzmap(sys) 系统不稳定。 (5)>> b=[1 0]; >> a=[1 -4 8 0]; >> sys=tf(b,a); >> pzmap(sys) 系统不稳定。

11.2试用MATLAB命令实现下列含有二阶极点的系统函数所对应的时域冲击响应的波形,并分析系统函数对时域波形的影响。

(1)H1(s)=1 s2(2)H2(s)=1 (s+1)2

(3)H3(s)=14s

(s2+49)2

解:(1)>> b1=[1]; >> a1=[1 0 0]; >> sys1=tf(b1,a1); >> subplot(121) >> pzmap(sys1) >> subplot(122) >> impulse(b1,a1)

系统在虚轴上有二阶极点,系统不稳定。(2)>> b2=[1]; >> a2=[1 2 1]; >> sys2=tf(b2,a2); >> subplot(121) >> pzmap(sys2)

ROC为Re{s}>-1,系统稳定。(3)>> b3=[14 0]; >> a3=[1 0 98 0 2401]; >> sys3=tf(b3,a3); >> subplot(121) >> pzmap(sys3) >> subplot(122) >> impulse(b3,a3) >> axis([0 10 -20 20])

s右半平面有极点,系统不稳定。 11.3已知系统函数为H(s)=1

,试用MATLAB画出a=0、14、1、2 s+2as+1

时系统的零极点分布图。如果系统是稳定的,画出系统的幅频特性曲线,并分析系统极点位置对系统的幅频特性有何影响?(提示:利用freqs 函数。)

解:(1)a=0时: >> b1=[1];

>> a1=[1 0 1]; >> sys1=tf(b1,a1); >> pzmap(sys1) 系统是不稳定的。 时: (2)a=1 4

>> b2=[1]; >> a2=[1 0.5 1]; >> sys2=tf(b2,a2); >> subplot(121) >> pzmap(sys2) >> w=-8*pi:0.01:8*pi; >> H=freqs(b2,a2,w) >> subplot(122)

>> plot(w,abs(H)),grid on >> plot(w,abs(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('|H(\\omega)|') >> axis([-10 10 0 2.5])

>> title('H(s)=1/(s^2+0.5s+1)的幅频特性') (3)a=1时: >> b3=[1]; >> a3=[1 2 1]; >> sys3=tf(b3,a3); >> subplot(121) >> pzmap(sys3) >> w=-8*pi:0.01:8*pi; >> H=freqs(b3,a3,w); >> subplot(122)

>> plot(w,abs(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('|H(\\omega)|') >> title('H(s)=1/(s^2+2s+1)的幅频特性') (4)a=2时: >> b4=[1]; >> a4=[1 4 1]; >> sys4=tf(b4,a4);

>> subplot(121) >> pzmap(sys4)

>> w=-8*pi:0.01:8*pi; >> H=freqs(b4,a4,w); >> subplot(122) >> plot(w,abs(H)),grid on >>

xlabel('\\omega(rad/s)'),ylabel('|H(\\omega)|')

>>

title('H(s)=1/(s^2+4s+1)的幅频特性')

综上可知,极点离虚轴距离越远,冲激响应波形变化越快,但越快稳定。

第12章 离散时间信号的表示及运算

12.1 试用MATLAB 命令分别绘出下列各序列的波形图。 (1)x (n )=(12)n u(n)

(2)x (n )=2n u(n) (3)x (n )=(?12 )n u(n)

(4)x (n )=(?2)n u(n)

(5)x (n )=2 n?1

u(n ?1) (6)x (n )=(12) n?1 u(n)

解:>> n=-10:10;

>> x1=(0.5).^n.*uDT(n); >> x2=2.^n.*uDT(n); >> x3=(-

0.5).^n.*uDT(n); >> x4=(-2).^n.*uDT(n); >> x5=2.^(n-1).*uDT(n-1); >> x6=(0.5).^(n-1).*uDT(n); >> subplot(321);

>> stem(n,x1,'fill'),grid on

>> title('x(n)=(1/2)^nu(n)'),xlabel('n') >> subplot(322); >> stem(n,x2,'fill'),grid on

>> title('x(n)=(2)^nu(n)'),xlabel('n') >> subplot(323); >> stem(n,x3,'fill'),grid on

>> title('x(n)=(-1/2)^nu(n)'),xlabel('n') >> subplot(324); >> stem(n,x4,'fill'),grid on

>> title('x(n)=(-2)^nu(n)'),xlabel('n') >> subplot(325); >> stem(n,x5,'fill'),grid on

>> title('x(n)=2^(n-1)u(n)'),xlabel('n') >> subplot(326); >> stem(n,x6,'fill'),grid on

>> title('x(n)=(1/2)^(n-1)u(n)'),xlabel('n') 12.2试用MATLAB 分别绘出下列各序列的波形图 (1)x (n )=sin (nπ 5 )

(2)x (n )=cos ( nπ 10?π 5

) (3)x (n )=(56 )n sin?(nπ 5

) (4)x (n )=(32 )n sin?(nπ5 )

解:>> n=-10:10; >> x1=sin(n*pi/5);

>> x2=cos((n*pi)/10-pi/5); >> x3=(5/6).^n.*sin((n.*pi)/5); >> x4=(3/2).^n.*sin((n.*pi)/5); >> subplot(221)

>> stem(n,x1,'fill'),grid on

>> title('x(n)=sin(n*pi/5)'),xlabel('n'); >> subplot(222); >> stem(n,x2,'fill'),grid on;

>> title('x(n)=cos(n*pi/10-pi/5)'),xlabel('n'); >> subplot(223); >> stem(n,x3,'fill'),grid on; >> subplot(224);

>> stem(n,x4,'fill'),grid on;

>> title('x(n)=(3/2)^nsin(n*pi/5)'),xlabel('n'); 12 离散时间LTI 系统的时域分析

13.1试用MATLAB 命令求解以下离散时间系统的单位取样响应。 (1)3y (n )+4y (n ?1)+y (n ?2)=x (n )+x(n ?1) (2)5

2

y (n )+6y (n ?1)+10y (n ?2)=x(n) 解:(1)>> a=[3 4 1];

>> b=[1 1]; >> n=-5:15; >> x=impDT(n); >> y=filter(b,a,x); >> stem(n,y,'fill'),grid on

>> xlabel('n'),title('3y(n)+4y(n-1)+y(n-2)=x(n)+x(n-1)的单位取样响应')

(2)>> a=[5/2 6 10]; >> b=[1]; >> n=0:30; >> impz(b,a,30),grid on

>> xlabel('n'),title('5/2y(n)+6y(n-1)+10y(n-2)=x(n)的单位取样响应')

13.2已知某系统的单位取样响应为h(n)=(7 8

)n[u(n)?u(n?10)],试用

MATLAB求当激励信号为x(n)=u(n)?u(n?5)时,系统的零状态响

title('x(n)=(5/6)^nsin(n*pi/5)'),xlabel('n');

>>

应。

解:>> nx=-2:7; >> nh=-4:14;

>> x=uDT(nx)-uDT(nx-5);

>> h=(7/8).^nh.*(uDT(nh)-uDT(nh-10)); >> y=conv(x,h); >> ny1=nx(1)+nh(1);

>> ny=ny1+(0:(length(nx)+length(nh)-2)); >> subplot(311)

>> stem(nx,x,'fill'),grid on >> xlabel('n'),title('x(n)'); >> subplot(312)

>> stem(nh,h,'fill'),grid on >> xlabel('n'),title('h(n)'); >> subplot(313)

>> stem(ny,y,'fill'),grid on

>> xlabel('n'),title('y(n)=x(n)*h(n)'); 第14章 z变换及离散时间LTI系统的z域分析

14.1试用MATLAB的residuez函数,4+16z3+44z2+56z+32

3z4+3z3?15z2+18z?12 的部分分式展开和。 解:>> b=[2 16 44 56 32]; >> a=[3 3 -15 18 -12]; >> [r,p,k]=residuez(b,a) r =

-0.0177 + 0.0000i 9.4914 + 0.0000i -3.0702 + 2.3398i -3.0702 - 2.3398i

求出X(z)=2z p =

-3.2361 + 0.0000i 1.2361 + 0.0000i 0.5000 + 0.8660i 0.5000 - 0.8660i k = -2.6667

所以部分分式展开和为X(z)=?2.6667? 0.0177 1+3.2361z +9.4914 1?1.2361z 3.0702?2.3398i 1?(0.5+0.866i)z

3.0702+2.3398i 1?(0.5?0.866i)z .

14.2试用MATLAB画出下列因果系统的系统函数零极点分布图,并判断系统的稳定性。

(1)H(z)=2z 2?1.6z?0.9 z?2.5z+1.96z?0.48(2)H(z)=z?1 z?0.9z?0.65z+0.873z 解:(1)>> b=[2 -1.6 -0.9]; >> a=[1 -2.5 1.96 -0.48]; >> zplane(b,a),grid on >> legend('零点','极点') >> title('零极点分布图')

因为该系统有极点在单位圆之外,所以不稳定。(2)>> b=[1 -1];

>> a=[1 -0.9 -0.65 0.873 0]; >> zplane(b,a),grid on >> legend('零点','极点') >> title('零极点分布图')

因为极点都位于单位圆内,所以系统稳定。 14.3试用MATLAB绘制系统H(z)=z 2 z2?3 4z+1 8

的频率响应曲线。 解:>> b=[1 0 0]; >> a=[1 -3/4 1/8];

>> [H,w]=freqz(b,a,400,'whole'); >> subplot(211)

>> plot(w,abs(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('幅度') >> title('离散系统幅频特性曲线')

>> subplot(212)

>> plot(w,angle(H)),grid on

>> xlabel('\\omega(rad/s)'),ylabel('相位') >> title('离散系统相频特性曲线')

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- cepb.cn 版权所有 湘ICP备2022005869号-7

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务