信号与系统实验实验报告

上传人:第*** 文档编号:33367921 上传时间:2018-02-15 格式:DOCX 页数:19 大小:726.05KB
返回 下载 相关 举报
信号与系统实验实验报告_第1页
第1页 / 共19页
信号与系统实验实验报告_第2页
第2页 / 共19页
信号与系统实验实验报告_第3页
第3页 / 共19页
信号与系统实验实验报告_第4页
第4页 / 共19页
信号与系统实验实验报告_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《信号与系统实验实验报告》由会员分享,可在线阅读,更多相关《信号与系统实验实验报告(19页珍藏版)》请在金锄头文库上搜索。

1、实验五 连续系统分析1、实验目的深刻理解连续时间系统的系统函数在分析连续系统的时域特性、频域特性及稳定性中的重要作用及意义,掌握根据系统函数的零极点设计简单的滤波器的方法。掌握利用MATLAB 分析连续系统的时域响应、频响特性和零极点的基本方法。 2、实验原理MATLAB 提供了许多可用于分析线性时不变连续系统的函数,主要包含有系统函数、系统时域响应、系统频域响应等分析函数。三、实验内容1. 已知描述连续系统的微分方程为 ,输入 ,初始状态,计算该系统的响应,并与理论结果比较,列出系统响应分析的步骤。实验代码:a=1 10;b=2;A B C D=tf2ss(b,a);sys=ss(A,B,C

2、,D);t=0:0.001 :5;xt=t0;sta=1;y=lsim(sys,xt,t,sta);subplot(3,1,1);plot(t,y);xlabel(t);title(系统完全响应 y(t); subplot(3,1,2);plot(t,y,-b);hold onyt=4/5*exp(-10*t)+1/5;plot(t,yt, : r);legend(数值计算 ,理论计算); hold offxlabel(t);subplot(3, 1 ,3);k=y-yt;plot(t,k);k(1)title(误差);实验结果:0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t

3、012 系统完全响应 y(t)0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t012数值计算理论计算0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 500.51 误差结果分析:理论值 y(t)=0. 8*exp(-10t)*u(t)+0.2程序运行出的结果与理论预期结果相差较大误差随时间增大而变小, 初始值相差最大,而后两曲线基本吻合,表明该算法的系统响应在终值附近有很高的契合度,而在初值附近有较大的误差。2. 已知连续时间系统的系统函数为 ,求输入 分别为 , 时,系统地输出 ,并与理论结果比较。实验代码:a=1,3,2,0; b=4,1; sys=tf(b,a)

4、;t=0:0.001 :5;x1=t0;x2=(sin(t).*(t0);x3=(exp(-t).*(t0);y1=lsim(sys,x1,t);y2=lsim(sys,x2,t);y3=lsim(sys,x3,t);subplot(3,1,1);plot(t,y1);xlabel(t);title(X(t)=u(t);subplot(3,1,2);plot(t,y2);xlabel(t);title(X(t)=sint*u(t);subplot(3, 1 ,3);plot(t,y3);xlabel(t);title(X(t)=exp(-t)u(t);实验结果:0 0.5 1 1.5 2 2.

5、5 3 3.5 4 4.5 5t024 X(t)=u(t)0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t012 X(t)=sint*u(t)0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t00.51 X(t)=exp(-t)u(t)结果分析:a=1,3,2,0; b=4,1; sys=tf(b,a);t=0:0.001 :5;x1=t0;x2=(sin(t).*(t0);x3=(exp(-t).*(t0);y1=lsim(sys,x1,t);y2=lsim(sys,x2,t);y3=lsim(sys,x3,t);subplot(3,1,1);plot(t,y1

6、,-b);hold onyt1=5/4+0.5*t.*(t0)+7/4*exp(-2*t).*(t0)-3*exp(-t).*(t0);plot(t,yt1, : r);legend(数值计算 ,理论计算); hold offxlabel(t);subplot(3,1,2);plot(t,y2,-b);hold onyt2=0.5+1.5*exp(-t).*(t0)-0.7*exp(-2*t).*(t0)-1.3*cos(t).*(t0)+0.1*sin(t).*(t0);plot(t,yt2, : r);legend(数值计算 ,理论计算); hold offxlabel(t);subplo

7、t(3,1,3);plot(t,y3,-b);hold onyt3=0.5-4*exp(-t).*(t0)+7/2*exp(-2*t).*(t0)+3*t.*exp(-t).*(t0);plot(t,yt3, : r);legend(数值计算 ,理论计算); hold offxlabel(t);0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t024数值计算理论计算0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t012数值计算理论计算0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5t00.51数值计算理论计算可见数值计算和理论计算曲线基本重合。误差分

8、析:可见误差小于 0.001, 计算值与理论值契合度很高。3. 研究具有以下零极点的连续系统:(a) 1 个极点 s=0.1,增益 k=1。(b) 1 个极点 s=0,增益 k=1。(c) 2 个共轭极点 ,增益 k=1。(d) 2 个共轭极点 ,增益 k=1。(e) 零点在 ,极点在 ,增益 k=1。(f) 零点在 ,极点在 ,增益 k=1。完成下列任务:(1) 利用 zpk 和 tf 命令建立系统的系统函数,画出系统的零极点图。(2) 分析系统是否稳定。若稳定,画出系统的幅频特性曲线。(3) 画出系统的冲激响应波形。(4) 详细列出根据零极点分析系统特性的过程。实验代码:(a )%零极点图

9、subplot(3,1,1)b=1;a=1,0.1;z=roots(b);p=roots(a);sys=tf(b,a);pzmap(sys)%幅频响应subplot(3,1,2)b=1;a=1,0.1;H,w =freqs(b,a);plot(w,abs(H);xlabel(w);ylabel(幅频响应);%冲激响应subplot(3,1,3)b=1;a=1,0.1;sys=tf(b,a);t=0:0.1:10;h=impulse(sys,t);plot(h);xlabel(t); ylabel(h(t)0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1w0510幅

10、频响应0 20 40 60 80 100 120t00.51h(t)-0.1 -0.09-0.08-0.07-0.06-0.05-0.04-0.03-0.02-0.01 0-101 Pole-Zero MapReal Axis (seconds-1)ImaginaryAxis(seconds-1)(b)%零极点图subplot(3,1,1)b=1;a=1,0;z=roots(b);p=roots(a);sys=tf(b,a);pzmap(sys)%幅频响应subplot(3,1,2)b=1;a=1,0;H,w =freqs(b,a);plot(w,abs(H);xlabel(w);ylabel

11、(幅频响应);%冲激响应subplot(3,1,3)b=1;a=1,0;sys=tf(b,a);t=0:0.1:10;h=impulse(sys,t);plot(h);xlabel(t); ylabel(h(t)0 1 2 3 4 5 6 7 8 9 10w050100幅频响应0 20 40 60 80 100 120t012h(t)-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-101 Pole-Zero MapReal Axis (seconds-1)ImaginaryAxis(seconds-1)(c )%零极点图subplot(3,1,1)b=1;

12、a=conv(1,5j,1,-5j);z=roots(b);p=roots(a);sys=tf(b,a);pzmap(sys)%幅频响应subplot(3,1,2)b=1;a=conv(1,5j,1,-5j);H,w =freqs(b,a);plot(w,abs(H);xlabel(w);ylabel(幅频响应);%冲激响应subplot(3,1,3)b=1;a=conv(1,5j,1,-5j);sys=tf(b,a);t=0:0.1:10;h=impulse(sys,t);plot(h);xlabel(t); ylabel(h(t)0 1 2 3 4 5 6 7 8 9 10w0246幅频响

13、应0 20 40 60 80 100 120t-0.200.2h(t)-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-505 Pole-Zero MapReal Axis (seconds-1)ImaginaryAxis(seconds-1)(d)%零极点图subplot(3,1,1)b=1;a=conv(1,0.5+5j,1,0.5-5j);z=roots(b);p=roots(a);sys=tf(b,a);pzmap(sys)%幅频响应subplot(3,1,2)b=1;a=conv(1,0.5+5j,1,0.5-5j);H,w =freqs(b,a)

14、;plot(w,abs(H);xlabel(w);ylabel(幅频响应);%冲激响应subplot(3,1,3)b=1;a=conv(1,0.5+5j,1,0.5-5j);sys=tf(b,a);t=0:0.1:10;h=impulse(sys,t);plot(h);xlabel(t); ylabel(h(t)1 2 3 4 5 6 7 8 9 10w00.10.2幅频响应0 20 40 60 80 100 120t-0.200.2h(t)-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1-505 Pole-Zero MapReal Axis (seconds-1)Imaginar

15、yAxis(seconds-1)(e)%零极点图subplot(3,1,1)b=1,-0.5;a=conv(1,0.1+5j,1,0.1-5j);z=roots(b);p=roots(a);sys=tf(b,a);pzmap(sys)%幅频响应subplot(3,1,2)b=1,-0.5;a=conv(1,0.1+5j,1,0.1-5j);H,w =freqs(b,a);plot(w,abs(H);xlabel(w);ylabel(幅频响应);%冲激响应subplot(3,1,3)b=1,-0.5;a=conv(1,0.1+5j,1,0.1-5j);sys=tf(b,a);t=0:0.1:10;h=impulse(sys,t);plot(h);xlabel(t); ylabel(h(t)0 1 2 3 4 5 6 7 8 9 10w0246幅频响应0 20 40 60 80 100 120t-101h(t)-0.1 0 0.1 0.2 0.3 0.4 0.5-505 Pole-Zero MapReal Axis (seconds-

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号