您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > 信号与系统Matlab实验报告模板
信号与系统实验报告4-1姓名:实验名称:连续系统的频率响应分析学号:实验时间:2010.5.19评语:一.实验目的1.深入理解系统频率响应的物理意义2.掌握利用Matlab分析系统频率响应的方法3.理解系统对信号的作用关系二.实验内容1.一RC电路如图:RC+-f(t)y(t)(1)对不同的RC值,用freqs画出系统的幅度响应曲线()Hj。(2)信号f(t)=cos(100t)+cos(3000t)包含一个低频分量和一个高频分量。试确定适当的RC值,滤除信号f(t)的高频分量,并画出信号f(t)和滤波后的信号y(t)在0-0.2s范围内的波形。(3)50Hz的交流信号经过全波整流后可表示为=10sin(100)f(t)t试取不同的RC值,计算并画出f(t)通过系统的响应y(t)。计算f(t)的直流分量。2.信号f1(t)和f2(t)见下图:1()ftt1011122()ftt0(1)取t:0.05:2.5,计算信号f(t)=f1(t)+f2(t)*cos(50t)的值,并画出波形;(2)一可实现的系统的频率响应函数为信号与系统实验报告4-2443210()()26.131()341.42()2613.1()10000Hjjjjj用freqs画出()Hj的幅度响应和相位响应曲线。(3)用lsim函数求出信号f(t)和f(t)*cos(50t)通过上述系统的响应y1(t)和y2(t),并根据理论知识解释所得结果。三.仿真分析1分析:由电路分析可得该RC电路的频率响应函数为:1/()1/RCHjjRC%(1)RC1=0.001;RC2=0.002;RC3=0.005;a1=1/RC1;a2=1/RC2;a3=1/RC3;A1=[1a1];A2=[1a2];A3=[1a3];B1=a1;B2=a2;B3=a3;w1=linspace(0,3000,200);w2=linspace(0,3000,400);w3=linspace(0,3000,500);H1=freqs(B1,A1,w1);H2=freqs(B2,A2,w2);H3=freqs(B3,A3,w3);figure(1)subplot(3,1,1);plot(w1,abs(H1));xlabel('\omega(rad/s)')title('RC=0.001')subplot(3,1,2);plot(w2,abs(H2));xlabel('\omega(rad/s)')title('RC=0.002')subplot(3,1,3);plot(w3,abs(H3));xlabel('\omega(rad/s)')title('RC=0.005')%(2)t=0:0.0001:0.2;f=cos(100*t)+cos(3000*t);Hw1=a3/(j*100+a3);Hw2=a3/(j*3000+a3);y=abs(Hw1)*cos(100*t)...+abs(Hw2)*cos(3000*t);figure(2)subplot(2,1,1);plot(t,f);xlabel('t(s)')ylabel('f(t)')title('f(t)=cos(100*t)+cos(3000*t)')subplot(2,1,2);plot(t,y);xlabel('t(s)')ylabel('y(t)')05001000150020002500300000.51(rad/s)RC=0.00105001000150020002500300000.51(rad/s)RC=0.00205001000150020002500300000.51(rad/s)RC=0.00500.020.040.060.080.10.120.140.160.180.2-2-1012t(s)f(t)f(t)=cos(100*t)+cos(3000*t)00.020.040.060.080.10.120.140.160.180.2-1-0.500.51t(s)y(t)信号与系统实验报告4-3%(3)clearRC31=0.01;RC32=0.02;RC33=0.05;a31=1/RC31;a32=1/RC32;a33=1/RC33;A31=[1a31];A32=[1a32];A33=[1a33];B31=a31;B32=a32;B33=a33;sys=[tf(B31,A31);tf(B32,A32);tf(B33,A33)];t3=0:0.0005:0.25;f3=abs(10*sin(100*pi*t3));y3=lsim(sys,f3,t3);figure(1)plot(t3,f3);xlabel('t(s)')title('f(t)=|10*sin(100*pi*t3)|')figure(2)plot(t3,y3);legend('RC=0.01时系统的输出',...'RC=0.02时系统的输出','RC=0.05时系统的输出',4)直流分量的计算:0.010120()=10sin(100)0.01DCfttdt6.372%(1)t=0:0.01:2.5;f1t=rectpuls(t-0.5,1);f2t=tripuls(t-1,2,0);ft=f1t+f2t.*cos(50*t);subplot(3,1,1);plot(t,f1t);axis([-0.52.6-0.51.2])ylabel('f1(t)');subplot(3,1,2);plot(t,f2t);axis([-0.52.6-0.51.2])ylabel('f2(t)')subplot(3,1,3);plot(t,ft);ylabel('f(t)')axis([-0.52.6-0.51.2])00.050.10.150.20.25012345678910t(s)f(t)=|10*sin(100*pi*t3)|00.050.10.150.20.2501234567RC=0.01时系统的输出RC=0.02时系统的输出RC=0.05时系统的输出-0.500.511.522.5-0.500.51f1(t)-0.500.511.522.5-0.500.51f2(t)-0.500.511.522.5-0.500.51f(t)信号与系统实验报告4-4%(2)a=[126.131341.422613.110000];b=[1000];w=linspace(0,15,500);w1=w*pi;H=freqs(b,a,w1);figure(2)subplot(2,1,1);plot(w,abs(H));xlabel('\omega(\pirad/s)')ylabel('|H(j\omega)|')subplot(2,1,2);plot(w,angle(H));xlabel('\omega(\pirad/s)')ylabel('\phi(\omega)')%(3)四.实验总结05101500.050.10.150.2(rad/s)|H(j)|051015-4-2024(rad/s)()0123-1012f(t)0123-1012f(t)cos(50t)0123-0.0500.050.10.15f(t)的输出0123-0.0200.020.040.06f(t)cos(50t)的输出
本文标题:信号与系统Matlab实验报告模板
链接地址:https://www.777doc.com/doc-5701741 .html