信号与线性系统答案.doc

上传人:s****u 文档编号:12739668 上传时间:2020-05-20 格式:DOC 页数:30 大小:838.50KB
返回 下载 相关 举报
信号与线性系统答案.doc_第1页
第1页 / 共30页
信号与线性系统答案.doc_第2页
第2页 / 共30页
信号与线性系统答案.doc_第3页
第3页 / 共30页
点击查看更多>>
资源描述
实验一 信号的MATLAB表示三、 实验内容:1. 用MATLAB表示连续信号:,。t=0:001:10;A=1;a=-0.4;ft=A*exp(a*t);plot(t,ft)t=0:0.1:10;A=1;a=1;b=pi/4;ft=A*sin(a*t+b);plot(t,ft)t=0:0.1:10;A=1;a=1;b=pi/4;ft=A*cos(a*t+b);plot(t,ft)2. 用信号处理工具箱提供的函数表示抽样信号、矩形脉冲信号及三角脉冲信号。y=sinc(t)y=sinc(t);plot(t,y)y=rectpuls(t, width)t=0:0.01:4;T=1;y=rectpuls(t-2*T, 2*T);plot(t,y) y=tripuls(t, width, skew)t=-5:0.01:5;width=2;skew=0.6;y=tripuls(t, width, skew);plot(t,y)3. 编写如图所示的MATLAB函数,并画出,的图形。t=-2:0.01:3;ft=rectpuls(t+0.5, 1)+(1-t).*rectpuls(t-0.5,1)-rectpuls(t-1.5, 1);plot(t,ft)function ft=f(t)ft=rectpuls(t+0.5, 1)+(1-t).*rectpuls(t-0.5,1)-rectpuls(t-1.5, 1);plot(t,ft)t=-5:0.01:5;y=f(0.5*t);plot(t,y)t=-2:0.01:8;y=f(2-0.5*t);plot(t,y)4. 用MATLAB表示离散信号:,。k=0:0.2:10;a=2;y=a.k;stem(k,y)k=0:0.2:10;A=2;y=A*sin(k);stem(k,y)实验二 连续时间系统的时域分析三、实验内容:1. 分别用函数lsim和卷积积分两种方法求如图所示系统的零状态响应。其中L=1,R=2,。用函数lsimL=1;R=2;sys=tf(1,L R);t=0:0.1:10;f=exp(-t);y=lsim(sys,f,t);plot(t,y);xlabel(Time(sec)ylabel(y(t)用卷积积分L=1;R=2;sys=tf(1,L R);t=0:0.001:10;f=exp(-t);y=impulse(sys,t);z=conv(y,f);plot(z)2. 求上述系统的冲激响应与阶跃响应。冲激响应L=1;R=2;sys=tf(1,L R);t=0:0.1:10;f=exp(-t);y=impulse(sys,t);plot(t,y)xlabel(Time(sec)ylabel(y(t)阶跃响应L=1;R=2;sys=tf(1,L R);t=0:0.1:10;f=exp(-t);y=step(sys,t);plot(t,y)xlabel(Time(sec)ylabel(y(t)实验三 信号的Fourier分析三、实验内容:1. 求如图所示周期矩形脉冲信号的Fourier级数表达式,画出频谱图,并用前N次谐波合成的信号近似。画出周期矩形脉冲信号的频谱图N=8;n1=-N:-1;c1=-2*j*sin(n1*pi/2)/pi./n1;c0=0;n2=1:N;c2=-2*j*sin(n2*pi/2)/pi./n2;cn=c1 c0 c2;n=-N:N;subplot(1,2,1);stem(n,abs(cn);ylabel(Cn的幅度);xlabel(Omega);subplot(1,2,2);stem(n,angle(cn);ylabel(Cn的相位);xlabel(Omega);用前N次谐波合成的信号近似建立M函数f.mfunction s=f(m)s=0;p=0;t=0:0.01:10;for n=1:2:m p=p+1/n*(sin(n*t);ends=(4/pi)*p;plot(t,s)f(20);xlabel(Time(sec)ylabel(f(t)2. 求信号的幅度谱。w=-2*pi:0.2:2*pi;c=(2+j*w).(-2);plot(w,abs(c);ylabel(C的幅度);xlabel(Omega);实验四 连续系统的频域分析三、实验内容:如图所示系统:(1) 对不同的RC值,用freqs函数画出系统的幅频曲线。for rc=0:200:1000b=1;a=rc,1;Hz,w=freqs(b,a);w=w./pi;magh=abs(Hz);zeroslndx=find(magh=0);magh(zeroslndx)=1;magh=20*log10(magh);magh(zeroslndx)=-inf;subplot(3,2,(rc+200)/200);plot(w,magh);grid onxlabel(特征角频率(timespi rads/sample))title(幅频特性曲线|H(w)|(dB);end(2) 信号包含了一个低频分量和一个高频分量。确定适当的RC值,滤除信号中的高频分量并画出信号和在s范围内的波形。确定RC的值Hz(1)=0;RC=1;while abs(Hz(1) ifourier(1/40*pi*(-heaviside(-w-120)+heaviside(w-80)+heaviside(-w-80)-heaviside(w-120)+40*dirac(w+100)+40*dirac(w-100),t) ans = cos(100*t)+1/80*(-i*exp(-80*i*t)+i*exp(80*i*t)+i*exp(-120*i*t)-i*exp(120*i*t)/tclear,syms t;et2=(cos(100*t)+1/80*(-i*exp(-80*i*t)+i*exp(80*i*t)+i*exp(-120*i*t)-i*exp(120*i*t)/t)/cos(100*t)-1;ezplot(et2,-2 2);axis(-2 2 -0.5 1.5)实验六 无失真传输与滤波三、实验内容:1. 信号任选,分析以下几种情况下信号的频谱和波形变化:(1) 系统满足线性不失真条件时;t0=-3*pi;ts=3*pi;dt=0.01;t=t0:dt:ts;T=2*pi;Et=0.5*tripuls(t,2,0);plot(t,Et)(2) 系统只满足恒定幅值条件时;t0=-3*pi-1000;ts=3*pi-1000;dt=0.01;t=t0:dt:ts;T=2*pi;E1t=0.5.*(0.5*tripuls(t+1000,2*T,0)+0.5*tripuls(t-1000,2*T,0);subplot(1,2,1);plot(t,E1t)t0=-3*pi+1000;ts=3*pi+1000;dt=0.01;t=t0:dt:ts;T=2*pi;E1t=0.5.*(0.5*tripuls(t+1000,2*T,0)+0.5*tripuls(t-1000,2*T,0);subplot(1,2,2);plot(t,E1t)(3) 系统只满足相位条件时;clear;t0=-3*pi-1000;ts=3*pi-1000;dt=0.01;t=t0:dt:ts;figure(1);T=2*pi;T1=2;Rt=0.5*(0.5.*tripuls(t+1000,2*T,0)+0.5.*tripuls(t+1000,2*T,0).*(tripuls(t-1000,2*T1,0)+tripuls(t+1000,2*T1,0);subplot(1,2,1);plot(t,Rt)t0=-3*pi+1000;ts=3*pi+1000;dt=0.01;t=t0:dt:ts;Rt=0.5*(0.5.*tripuls(t-1000,2*T,0)+0.5.*tripuls(t-1000,2*T,0).*(tripuls(t-1000,2*T1,0)+tripuls(t+1000,2*T1,0);subplot(1,2,2);plot(t,Rt)(4)系统两个条件均不满足时。t0=-2*pi;ts=2*pi;dt=0.01;t=t0:dt:ts;e=sinc(2*pi*t);plot(t,e)2. 如图1所示,已知,画出、的频谱图,并比较与。系统中理想带通滤波器的传输特性如图2所示,其相位特性。 理想带通 图 1 1 图 2 -1001 -999 0 999 1001 的频谱图syms t w;figure(1);f=sin(2*pi*t)/(2*pi*t);F=fourier(f);ezplot(F,-10,10);的频谱图figure(2);f1=f*cos(1000*t);F1=fourier(f1)subplot(1,2,1);ezplot(F1,-1010,-990);subplot(1,2,2);ezplot(F1,990,1010); F1 = -1/4*heaviside(-w-2*pi-1000)+1/4*heaviside(w+2*pi-1000)+1/4*heaviside(-w+2*pi-1000)-1/4*heaviside(w-2*pi-1000)的频谱图figure(3);F2=-1/4*heaviside(w-1-1000)+1/4*heaviside(w+1+1000)-1/4*heaviside(w-1+1000)+1/4*heaviside(w+1-1000);subplot(1,2,1);ezplot(F2,-1010,-990);subplot(1,2,2);ezplot(F2,990,1010);实验七 信号采样与重建三、实验内容:1. 已知,以为采样频率,对进行采样得到,观察随着由小变大,频谱的变化,最后得出与两者频谱之间的关系。t=0:0.01:4;figure(1);f=2;xa=sinc(f*t);subplot(2,1,1)plot(t,xa);grid;axis(0 4 -1 1)subplot(2,1,2);fs=0.2;n=0:fs:4;xs=sinc(f*n);k=0:length(n)-1;stem(k,xs);grid;axis(0 (length(n)-1) -1 1);figure(2)subplot(2,1,1);fs=0.1;n=0:fs:4;xs=sinc(f*n);k=0:length(n)-1;stem(k,xs);grid;axis(0 (length(n)-1) -1 1);subplot(2,1,2);fs=0.05;n=0:fs:4;xs=sinc(f*n);k=0:length(n)-1;stem(k,xs);grid;axis(0 (length(n)-1) -1 1);2. 由实验1中采样得到的离散信号重建对应的连续时间信号:情况一、;情况二、。情况一:wm=3;wc=wm;ws=10*wm;ts=2*pi/ws;n=-100:100;nts=n*ts;f=sinc(2*nts/pi);t=-20:0.005:20;fa=f*ts*wc/pi*sinc(2*wc/pi)*(ones(length(nts),1)*t-nts*ones(1,length(t);plot(t,fa);xlabel(t);ylabel(f(at);grid on;情况二:wm=3;wc=wm;ws=2*wm;ts=2*pi/ws;n=-100:100;nts=n*ts;f=sinc(2*nts/pi);t=-20:0.005:20;fa=f*ts*wc/pi*sinc(2*wc/pi)*(ones(length(nts),1)*t-nts*ones(1,length(t);plot(t,fa);xlabel(t);ylabel(f(at);grid on;
展开阅读全文
相关资源
相关搜索

当前位置:首页 > 图纸专区 > 考试试卷


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!