




下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、信号与系统实验教程(只有答案)(实验报告)i* :实验二信号与系统的时域分析f 胸 I - X*-etaKHmMii - I三.也发内容如上料三用;1 *.-*附小.-刁M,叱用百强台归仁身,口巾帮Stiff讦位用ff早三国开断I,我五计=. K与踮E二克虬上反行曜花町班,以聚用星怵十号的殖郴医.并茗宫花海序应该元咸虹C作, Sfc= iWB-UM*93tiWflr逐一推分由fM?中Mitnim电从1033记段皮信X EJMlLrtI ;曜助,-If叶苒下勤减匕癖口爆好町日自甲助爵工作,回国事为HHI底的-SMBMWRI仁不和IT.三 seHPRSLMIJ .t h !j,*et骅g_二注击五
2、呆才I -QL1:陈怏程序|5乳加力收,HIU亍1理序-WREflJ- BBffifffflft-这么玩!目录实验一 信号与系统的时域分析 2三、实验内容及步骤 2实验二 连续时间信号的频域分析 13三、实验内容及步骤 13实验三 连续时间LTI系统的频域分析 32三、实验内容及步骤 32实验四通信系统仿真 35三、实验内容及步骤 35实验五 连续时间LTI系统的复频域分析 39三、实验内容及步骤 39实验一 信号与系统的时域分析三、实验内容及步骤实验前,必须首先阅读本实验原理,读懂所给出的全部范例程序。实验开始时,先在计算机上运行这些范例程序, 观察所得到的信号的波形图。 并结合范例程序应该
3、 完成的工作,进一步分析程序中各个语句的作用,从而真正理解这些程序。实验前,一定要针对下面的实验项目做好相应的实验准备工作,包括事先编写好相应的实验程序等事项。Q1-1:修改程序Program1_1,将dt改为0.2 ,再执行该程序,保存图形,看看所得图形的效果如何?dt = 0.01 时的信号波形时的信号波形这两幅图形有什么区别,哪一幅图形看起来号波形更像?答:Q1-2:修改程序Program1_1,并以Q1_2为文件名存盘,产生实指数信号x(t)=e -0.5t 。要求在图形中加上网格线,并使用函数axis()控制图形的时间范围在 02秒之间然后执行该程序,保存所的图形。信号x(t尸e-0
4、.5t的波形图figureof修改Program1_1后得到的程序 Q1_2如下: clear,% Clear allvariables close all, % Close all windows dt = 0.2;% Specify the steptime variablet = -2:dt:2;% Specify the interval of timex = exp(-0.5*t); % Generate the signal plot(t,x)grid on;axis (0 2 0 1 ) title('Sinusoidal signal x(t)') xlabel
5、('Time t (sec)')Q1-3:修改程序Program1_1,并以Q1_3为文件名存盘,使之能够仿真从键盘上任意EIMl h(1)D6V14i卜INih F F T. F E e p闻r 14JS.弋却1士一:一q口?一-iMy1- r-* >-0一-T"T- "I1- - -T- -1;-Hi-P-= =山E-.4_ _ _/=占a.E4iIiU.2 CU E121 41.&1.B2Time i信号x(t)=e -2t的输入的一个连续时间信号,并利用该程序仿真信号x(t)=e -2t0修改Program1_1后得到的程序 Q1_3如
6、下:波形图clear,close all,dt = 0.2;t = -2:dt:2;x=input('Input x(t):');plot(t,x)grid on;axis (0 2 -1 1 )title('Sinusoidal signal x(t)') xlabel('Time t (sec)')Q1-4:将实验原理中所给的单位冲激信号和单位阶跃信号的函数文件在MATLAB:件抄写函数文件u如下:编辑器中编写好,并分别以文件名delta和u存入work文件夹中以便于使用抄写函数文件delta如下:function y = delta(t)d
7、t = 0.01;y = (u(t)-u(t-dt)/dt;t > 0, else y = 0% Unit step functionfunction y = u(t)y = (t>=0); % y = 1 forQ1-5:修改程序Program1_4,并以Q1_5为文件名存盘,利用 axis()函数,将图形窗口的横坐标范围改为-20n&5,纵坐标范围改为-1.5& x <1.5 0修改Program1_4后得到的程序Q1_5如下:信号的波形图clear,close all,n = -5:5;x = zeros(1,4), 0.1, 1.1, -1.2, 0,
8、 1.3, zeros(1,2);stem (n,x,'.')grid on,axis(-2 5 -1.5 1.5);title ('A discrete-time sequence xn')xlabel ('Time index n')Q1-6:仿照前面的示例程序的编写方法,编写一个MATLA解序,以Q1_6为文件名存盘,使之能够在同一个图形窗口中的两个子图中分别绘制信号xn=0.5 |n| 和x(t)=cos(2 Tit)u(t)-u(t-3) o要求选择的时间窗能够表现出信号的主要部分(或特征) 。编写的程序Q1_6如下: 信号xn=0.5
9、 1n1的波形图和信号x(t)=cos(2 Tit)u(t)-u(t-3)的波形图clear,close all, t = -1:0.01:4;xt = cos(2*pi*t).*(u(t)-u(t-3);n=-5:5;xn=(0.5).Aabs(n);subplot(211)plot(t,xt)grid on,title ('Original signal x(t)')subplot(212)stem(n,xn,'.')grid on,title ('Original signal x(n)')xlabel ('Time t (sec)
10、')Q1-7:根据示例程序的编程方法,编写一个MATLA整序,以Q1_7为文件名存盘,由给定信号x(t) = e -0.5t u(t) 求信号 y(t) = x(1.5t+3) ,并绘制出x(t) 和 y(t) 的图形。编写的程序Q1_7如下:编写产生x(t) 的函数文件x.mfunction y=x(t)y=exp(-0.5*t).*u(t);clear,close all,t = -3:0.01:4;xt = x(t);% Generate the original signal x(t)yt=x(1.5*t+3);plot(t,xt)subplot(211)% Plot x(t)
11、grid on, title ('Original signal x(t)') subplot(212)plot(t,yt)% Plot x(t)grid on,title ('Original signal y(t)')xlabel ('Time t (sec)')信号 x(t) 的波形图信号 y(t) = x(1.5t+3) 的波形图Q1-8:给定一个离散时间信号xn = un - un-8,仿照示例程序Program1_5,编写程序Q1_8,产生xn的左移序列xin = xn+6 和右移序列X2n = xn-6, 并在同一个图形窗口的三个子
12、图中分别绘制这三个序列的图形。编写的程序Q1_8如下:编写产生x(t) 的函数文件xx.mfunction y=xx(n)y=u(n)-u(n-8);clear,close all, n = -10:15;x =xx(n);% Generate the original signal x(n)x1 = xx(n+6); % Shift x(t) to the left by 2 second to get x1(n+6)x2 =xx(n-6); % Shift x(t) to the right by 2 second to get x2(n-6) subplot(311)stem(n,x,&
13、#39;.')% Plot x(t)grid on,title ('Original signal x(n)')subplot (312)stem (n,x1,'.')% Plot x1(t)grid on,title ('Left shifted version of x(n)')subplot (313)stem (n,x2,'.')% Plot x2(t)grid on,title ('Right shifted version of x(n)')xlabel ('Time t (sec)
14、39;)信号波形图Q1-9:编写程序Q1_9,使之能够接受以键盘方式输入的定义在不同时间段 的两个不同连续时间信号并完成 卷积运算, 分别绘制这两个信号及其卷积的结果的图形,图形按照 2 2 分割成四个子图。编写的程序Q1_9如下:clear;close all;dt = 0.01;t0=input('Input first signal t0:');t1=input('Input first first signalt1:');tx = t0:dt:t1;x = input('Input first signal variable(tx) :'
15、);t2=input('Input second signal t0:');t3=input('Input second signal t1:');th=t2:dt:t3;h = input('Input second signal variable(th) :')y = dt*conv(x,h); % Compute the convolution of x(t) and h(t)subplot(221) plot(tx,x), grid on, title('Signal x(t)') xlabel('Time t s
16、ec') subplot(222)plot(th,h), grid on, title('Signal h(t)')xlabel('Time t sec')subplot(313)plot(y), grid on, title('The convolution of x(t) and h(t)')xlabel('Time t sec') 信号 x (t) 、 h(t) 和 x (t)*h(t) 的波形图Q1-10: 给定两个离散时间序列xn = 0.5nun-un-8hn = un-un-8编写程序Q1_10,计算它们的卷
17、积,并分别绘制xn、hn和它们的卷积yn的图形。编写的程序Q1_10如下:n=0:10;x = (0.5).An.*(u(n)-u(n-8);h = u(n)-u(n-8);y =conv(x,h); % Compute the convolution of x(t) and h(t)subplot(221)stem(n,x,'.'), grid on, title('Signal x(n)')subplot(222)stem(n,h,'.'), grid on, title('Signal h(n)')subplot(212)s
18、tem(y), grid on, title('The convolution of x(n) and h(n)'), xlabel('Time t sec');信号 xn 、 hn 和 yn 的波形图Q1-11 已知一个序列为编写MATLABg序Q1_11,能够将xn以N = 8为周期进行周期延拓得到一个周期为N =8 的周期序列yn ,并分别绘制xn 和 yn 图形。编 写的程序Q1_11 如下:U4.mfunction y=u4(n)y=n.*(u(n)-u(n-5);Q111.mclear, close all;n =-16:32x=u4(n);T =
19、8; y = 0;for k = -2:4;y =y+u4(n-k*T);endsubplot(211)stem(n,x,'.');grid on,title ('Original signal x(n)')xlabel('Time t sec')subplot(212)stem(n,y);title ('period signal x(n)')信号 yn 的波形图xlabel('Time t sec')grid on, 信号 xn 的波形图Q1-12仿照范例程序 Program1_7,编写程序示的系统在输入信号为
20、x(t) = (e -2t - e -3t )u(t)Q1_12,计算并绘制由如下微分方程表时的零状态响应和你手工计算得到的系统零状态响应曲线。编写的程序Q1_12如下:用MATLA聆制的手工计算的系统clear, close all;num = input('Type in the rightcoefficient vector of differential);响应equation :den = input('Type in the left coefficient vector of differential equation);t = 0:0.01:8;x = inpu
21、t('Type in the expression of the input signal x(t):');y=lsim(num,den,x,t);plot(t,y)执行程序Q112得到的系统响应Q1-13:利用程序Q1_9,验证卷积的相关性质。(a) 验证性质:x(t)* (t) x(t)选择信号x(t)的数学表达式为:sin(t)x(t) 、Mt)和x(t)* 6 (t)的波形验证所得(b) 验证0.5IJQTirrI 即日6WiqrM ,也结论是:性-irr 11 万BGx(t)* (t t0) x(t t0)选择信号x(t)的数学表达式为:手工计算得到的系统零状态响应的
22、数学表达式是:sin(t) t0=2x(t)、6 (t-t 0)和 x(t)* (t t0)的波形验证所得结验证性论是:质x(t tl)* (t t2)x(t t2)* (t ti) x(t ti t2)选择信号x(t)的数学表达式为:sin(t)选择的ti = 2秒,t2 = 3 秒。执行程序Qi_9,输入信号x(t-t i)和6(t -t 2)的数学表达式,得到的信号及其卷积的波形图执行程序(ignal*也iDDpjj印3Signa h(tj如下:Qi_9,输入信号x(t-t 2)和6 (t t i)号及其卷验证所得(d) 验证选择信号x(t)号)的数学表tx( )d的数-L <的数
23、学表达式,得到的信积的波形图如下:1结论是:0(建议选择一个时限信达式为:u(t)-u(t-3)x( )d波形如下:性质:Mt)* u(t) t x( )d学表达式为:手工绘制的t执行程序Qi_9,输入信号x(t)和u(t)的数学表达式,得到的信号及其卷积的波形图如下:验证所得结论是:(e)验证性质:x(t)*h(t to) x(t to)*h(t)选择信号x(t)的数学表达式为:sin(t)选择信号h(t)的数学表达式为:sin(t)选择的10=: 1T- a cjri'jfllution 讲或nd 睢)执行程序Q1_9,输入信号x(t)和h(t-t 0)的数学表达式,得到的信号及其
24、卷积的波 形图如下:Q1_9,输入信号x(t-t 0)和学表达式,得到的信号及其形图如下:结论是:如下总结:系统分析,就是基于信号的执行程序h(t) 的数 卷积的波 验证所得Tirir e t secQ1-14:做1、信号与分解,在时域中,信号主要分解成:2、写出卷积的运算步骤, 并谈谈你对卷积的一些基本性质的理解。利用MATLAB+算卷积的函数是什么?如何使用?3、在时域中,描述一个连续时间LTI系统的数学模型有:4、MATLA是如何表示一个由微分方程描述的连续时间LTI系统的?求解连续时间 LTI系统的单位冲激响应、单位阶跃响应以及系统在某一个输入信号作用下的零状态响应 的MATLABS数
25、有哪些?四、实验报告要求1、按要求完整书写你所编写的全部MATLAgg序2、详细记录实验过程中的有关信号波形图(存于自带的U盘中),图形要有明确的标题。全部的MATLABS形应该用打印机打印,然后贴在本实验报告中的相应位置, 禁止复印件。3、实事求是地回答相关问题,严禁抄袭。本实验完成时间:实验二连续时间信号的频域分析三、实验内容及步骤实验前,必须首先阅读本实验原理,读懂所给出的全部范例程序。实验开始时,先在计算机上运行这些范例程序,观察所得到的信号的波形图。并结合范例程序应该完成的工作,进一步分析程序中各个语句的作用,从而真正理解这些程序。实验前, 一定要针对下面的实验项目做好相应的实验准备
26、工作,包括事先编写好相应的实验程序等事项。Q2-1编写程序Q2_1,绘制下面的信号的波形图:其中,0 = 0.5兀,要求将一个图形窗口分割成四个子图,分别绘制cos( ot)、cos(3 0t) 、 cos(5 0t) 和 x(t) 的波形图,给图形加title ,网格线和x 坐标标签,并且程序能够接受从键盘输入的和式中的项数。抄 写程序 Q2_1 如下:clear,close allT = 2; dt = 0.00001; t = -2*pi:dt:2*pi; w0=0.5*pi;x1 = cos(w0*t);x3=(-1/3)*cos(3*w0*t);x5=(1/5)*cos(5*w0*t
27、);N = input('Type in the number of the harmonic components N = :');y=0;for q = 1:N;% Synthesiz the periodic signal y(t) from the finite Fourierseriesy = y+(1/q).*sin(q*pi)/2).*cos(q*w0*t);end;subplot(221), plot(t,x1), title('The original signal cos(w0t)');grid on; axis(-2*pi,2*pi,-1,
28、1), xlabel('Time t')subplot(223), plot(t,x5), title('The original signal (1/5)cos(5w0t)');grid on; axis(-2*pi,2*pi,-1,1), xlabel('Time t')subplot(222) plot(t,x3), title('The original signal (-1/3)cos(3w0t)');grid on; axis(-2*pi,2*pi,-1,1), xlabel('Time t') sub
29、plot(224) plot(t,y), title('The synthesis signal of x(t)');grid on; axis(-10,10,-1,1), xlabel('Index N')执行程序Q2_1所得到的图形如下:N=10增加盘,的周的系谱和Q2-2 给程序 Program2_1 适当的语句,并以Q2_2存 使之能够计算例题2-1中 期方波信号的傅里叶级数 数,并绘制出信号的幅度 相位谱的谱线图。通过增加适当的语句修改 Program2_1而成的程序Q2_2抄写如下: clear,close allT = 2; dt = 0.0000
30、1; t = -2:dt:2;x1 = u(t)-u(t-1-dt); x = 0;for m = -1:1x = x + u(t-m*T) - u(t-1-m*T-dt); % Periodically extend x1(t) to forma periodic signalendw0 = 2*pi/T;N = input('Type in the number of the harmonic components N = :');L = 2*N+1;for k = -N:1:N;ak(N+1+k) = (1/T)*x1*exp(-j*k*w0*t')*dt;end
31、phi = angle(ak);y=0;for q = 1:L;% Synthesiz the periodic signal y(t) from the finite Fourierseriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(221)plot(t,x),title('Theoriginalsignalx(t)'),axis(-2,2,-0.2,1.2),grid on;subplot(222)k=-N:N;stem(ak),title('Theakofx(t)'),axis(-1,1
32、,-0.4,0.4),grid on;subplot(223)k=-N:N;stem(k,abs(ak),'k.'),title('Theamplitude|ak| ofx(t)'),axis(-N,N,-0.1,0.6),grid on;subplot(224)stem(k,phi,'r.'), title('Thephase phi(k) of x(t)'), axis(-N,N,-2,2),xlabel('Index k'),grid on;执行程序Q2_2得到的图形Q2-3反复执行程序Program2_2,
33、每次执行该程序时,输入不同的N值,并观察所合成的周期方波信号。通过观察,你了解的吉伯斯现象的特点是:N=5N=101、周期信号的傅里叶级数与 G旧BS现象里为:给定如下两个周期信号:Q2-4分别手工计算 xi(t)和x2的傅 叶级数的系数。信号xi(t)在其主周期内的数学表达式t+1 -1<t<01-t 0<t<1计算x1(t)的傅里叶级数的系数的计算过程如下:k = -10:10;ak=0;ak = 1/2.* (sin(k)*pi/2)./(k)*pi/2)N=-10:10;stem(k,ak);通过计算得到的xi(t)的傅里叶级数的系数的数学表达式是:1/2*(s
34、in(k)*pi/2)./(k)*pi/2)信号X2(t)在其主周期内的数学表达式为:1 1|t|<0.200.2<|t|<1计算X2(t)的傅里叶级数的系数的计算过程如下:k = -10:10;ak=0;ak =sin(k*pi*0.2)./(k*pi)N=-10:10;stem(k,ak);通过计算得到的xi(t)的傅里叶级数的系数的数学表达式是:sin(k*pi*0.2)./(k*pi)用MATLA解助你计算出你手工计算的傅里叶级数的系数ak从-10到10共21个系数.从命令窗口上抄写X1(t)的21个系数如下:ak =Columns 1 through 80.0000
35、 0.0354 -0.0000 -0.0455 0.0000 0.0637 -0.0000-0.1061Columns 9 through 160.0000 0.3183 NaN 0.3183 0.0000 -0.1061 -0.00000.0637Columns 17 through 210.0000 -0.0455 -0.0000 0.0354 0.0000从命令窗口上抄写X2(t)的21个系数如下:Columns 1 through 8-0.0000 -0.0208 -0.0378 -0.0432 -0.0312 0.0000 0.04680.1009Columns 9 through
36、160.1514 0.1871 NaN 0.1871 0.1514 0.1009 0.04680.0000Columns 17 through 21-0.0312 -0.0432 -0.0378 -0.0208 -0.0000Q2-5仿照程序Program2_1 ,编写程序Q2_5,以11算xi(t)的傅里叶级数的系数。程序Q2_5如下:编写函数x1.mfunction y=x1(t)y1=t+1;y2=1-t;y=y1.*(-1<t&t<=0)+y2.*(0<t&t<1);Q2_5.mclear,close allT = 2; dt = 0.00001
37、; t = -8:dt:8;x11 = x1(t); x = 0;for m = -8:8x = x + x1(t-m*T); % Periodically extend x1(t) to form a periodic signal endw0 = 2*pi/T;N = 10;L = 2*N+1;for k = -N:1:N;ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t')*dt;endphi = angle(ak);y=0;for q = 1:L;% Synthesiz the periodic signal y(t) from the finite Fo
38、urier seriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(211),plot(t,x),title('Theoriginalsignal x(t)'),axis(-8,8,-0.2,1.2),grid on,subplot(212)k=-N:N; stem(k,ak,'k.'),title('The factor ak of x(t)'),axis(-N,N,-0.1,0.6),grid on,执行程序Q2_5所得到的xi(t)的傅里叶级数的ak从-10到10共21个系数
39、如下:Columns 1 through 50.0000+ 0.0000i 0.0025+ 0.0000i0.0000 - 0.0000iColumns 6 through 100.0081+ 0.0000i -0.0000- 0.0000i0.2026 + 0.0000iColumns 11 through 150.50000.2026- 0.0000i-0.0000 + 0.0000iColumns 16 through 200.0000+ 0.0000i 0.0041- 0.0000i0.0225- 0.0000i -0.0000- 0.0000i-0.0000+ 0.0000i 0.0
40、225+ 0.0000i0.0081- 0.0000i 0.0000+ 0.0000i 0.0041+ 0.0000i 0.00000.0000i0.0025 - 0.0000iColumn 210.0000 - 0.0000i与 你手工计算的ak 相比较,是否相同,如有不同,是何原因造成的?答:Q2-6 仿照程序Program2_1 , 编写程序Q2_6, 以计算x2(t) 的傅里叶级数的系数(不绘图) 。程序Q2_6如下:编写函数x2.mfunction y=x2(t)y1=1;y2=1;y=y1.*(-0.2<t&t<=0)+y2.*(0<t&t<
41、=0.2);Q2_6.mclear,close allT = 2; dt = 0.00001; t = -8:dt:8;x11 = x2(t); x = 0;for m = -8:8x = x + x2(t-m*T); % Periodically extend x1(t) to form a periodic signal endw0 = 2*pi/T;N = 10;L = 2*N+1;for k = -N:1:N;ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t')*dt;end phi = angle(ak);y=0;for q = 1:L;% Synthe
42、siz the periodic signal y(t) from the finite Fourier seriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(211),plot(t,x),title('Theoriginalsignal x(t)'),axis(-8,8,-0.2,1.2),grid on,subplot(212)k=-N:N; stem(k,ak,'k.'),title('The factor ak of x(t)'),axis(-N,N,-0.1,0.6),
43、grid on,执行程序Q2_6所得到的X2(t)的傅里叶级数的ak从-10到10共21个系数如下:Columns 1 through 50.0000- 0.0000i -0.0208+ 0.0000i-0.0312 + 0.0000iColumns 6 through 10-0.0000+ 0.0000i 0.0468+ 0.0000i0.1871 + 0.0000iColumns 11 through 150.20000.1871- 0.0000i0.0468 - 0.0000iColumns 16 through 20-0.0378- 0.0000i -0.0432+ 0.0000i0.
44、1009+ 0.0000i 0.1514- 0.0000i0.1514+ 0.0000i 0.1009- 0.0000i-0.0000- 0.0000i -0.03120.0000i -0.0432- 0.0000i -0.0378+ 0.0000i-0.0208 - 0.0000iColumn 210.0000 + 0.0000i与 你手工计算的ak 相比较,是否相同,如有不同,是何原因造成的?答:Q2-7仿照程序Program2_2,编写程序Q2_7,计算并绘制出原始信号xi(t)的波形图, 用有限项级数合成的y1(t) 的波形图,以及x1(t) 的幅度频谱和相位频谱的谱线图。编写程序Q2
45、_7如下:clear,close allT = 2; dt = 0.00001; t = -8:dt:8;x11 = x1(t); x = 0;for m = -8:8x = x + x1(t-m*T); % Periodically extend x1(t) to form a periodic signal endw0 = 2*pi/T;N = 5;L = 2*N+1;for k = -N:1:N;ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t')*dt;endphi = angle(ak);y=0;for q = 1:L;% Synthesiz the p
46、eriodic signal y(t) from the finite Fourierseriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;phi = angle(ak);y=0;for q = 1:L;% Synthesiz the periodic signal y(t) from the finite Fourierseriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(221),plot(t,x), title('The original signal x(t)
47、'), axis(-8,8,-0.2,1.2),subplot(223),plot(t,y), title('The synthesis signal y(t)'), axis(-8,8,-0.2,1.2),xlabel('Time t'),subplot(222)k=-N:N; stem(k,abs(ak),'k.'),title('The amplitude |ak| of x(t)'),axis(-N,N,-0.1,0.6)subplot(224)stem(k,phi,'r.'), title(
48、9;Thephase phi(k) of x(t)'), axis(-N,N,-2,2),xlabel('Index k')执行程序Q2_7,输入N = 5所得到的图形如下:反复执行程序Q2_7,输入不同的N值,观察合成的信号波形中,是否会产生 Gibbs 现象?为什么?;答:2. 连续时间非周期信号的傅里叶变换给定两个时限信号:Q2-8 利用单位阶跃信号u(t) ,将x1(t) 表示成一个数学闭式表达式,并手工绘制x1(t) 和x2(t)的时域波形图。信号x1(t)的闭式数学表达式为:x1(t)=:y1=t+2;y2=1;y3=-t+2;y=y1.*(-2<=t
49、&t<-1)+y2.*(-1<=t&t<1)+y3.*(1<=t&t<2); 手工绘制的x1(t) 的时域波形图手工绘制的x2(t) 的时域波形图function y=x28(t)y1=t+2;y2=1;y3=-t+2;y=y1.*(-2<=t&t<-1)+y2.*(-1<=t&t<1)+y3.*(1<=t&t<2);clear,close allT = 2; dt = 0.00001; t = -5:dt:5;x1 = x28(t).*(u(t+2)-u(t-2);x2=cos(
50、pi/2*t).*(u(t+1)-u(t-1);subplot(211),plot(t,x1,'.'),title('Theoriginal signal x1(t)'),axis(-5,5,-1,1),xlabel('Time t')subplot(212),plot(t,x2,'.'),title('Theoriginal signal x2(t)'),axis(-5,5,-1,1),xlabel('Time t')Q2-9手工计算xi(t)和X2的傅里叶变换(如能够用傅里叶变换的性质计算最好)
51、,并手工绘制出它们的幅度谱和相位谱;计 算x1(t)的傅里叶变换的过程:计算得到的x1(t)的傅里叶变换的数学表达式为:clear,close allT = 0.01; dw = 0.1;%时间和频率变化的步长t = -10:T:10;w = -4*pi:dw:4*pi;傅里叶变换xx=x28(t);X=x28(t)*exp(-j*t'*w)*T; %X1=abs(X);计算幅度谱phai=angle(X); %计算相位谱subplot(221);plot(t,xx),title('Theoriginalsignalx1(t)'),axis(-10,10,-1,2),x
52、label('Time t'),grid on;subplot(222)plot(w,X),title('TheFourierTransformofx1'),axis(-4*pi,4*pi,-1,3.5),xlabel('f(jw)'),grid on;subplot(223);plot(w,X1),title('Theamplitudeoff(jw),axis(-4*pi,4*pi,-1,3.5),xlabel('f(jw)'),grid on;subplot(224);plot(w,phai),title('T
53、hephaseoff(jw)'),axis(-pi,pi,-4,4),xlabel('f(jw)'),grid on;x2(t)的傅里叶变换的过程:The 卜 nUIj Trah与orri cri h 1 p)clear,close allIDdDli nOThf nginai sighol h11101)20.01; dw = 0.1;% 时间和-10 石。 EIrl jdJ erf "i频率变化的步长t = -10:T:10;w = -4*pi:dw:4*pi;xx=cos(pi/2*t).*(u(t+1)-u(t-1);X=xx*exp(-j*t'
54、;*w)*T; % 傅里叶变换X1=abs(X); % 计算幅度谱 phai=angle(X); % 计算相位谱 subplot(221);plot(t,xx),title('Theoriginalsignalx1(t)'),axis(-10,10,-1,2),xlabel('Time t'),grid on;subplot(222)plot(w,X),title('TheFourierTransformofx1(t)'),axis(-4*pi,4*pi,-1,3.5),xlabel('f(jw)'),grid on;subplo
55、t(223);plot(w,X1),title('Theamplitudeof f(jw)'),axis(-4*pi,4*pi,-1,3.5),xlabel('f(jw)'),grid on;subplot(224);plot(w,phai),title('Thephaseof f(jw)'),axis(-pi,pi,-4,4),xlabel('f(jw)'),grid on;计 算得到的x2(t)的傅里叶变换的数学表达式为:手工绘制的x1(t) 的幅度频谱图手工绘制的x2(t) 的幅度频谱图Q2-10编写MATLABS序Q2_1
56、0,能够接受从键盘输入的时域信号表达式,计算并绘 制出信号的时域波形、幅度谱。程序Q2_10抄写如下clear,close allT = 0.01; dw = 0.1;%时间和频率变化的步长t = -10:T:10;w = -4*pi:dw:4*pi;xx= input('Input the signal (t):');X=xx*exp(-j*t'*w)*T; % 傅里叶变换X1=abs(X); % 计算幅度谱phai=angle(X); % 计算相位谱subplot(211);signalplot(t,xx),title('Theoriginal x(t)'),axis(-10,10,-1,2),xlabel('Time t'),grid on;subplot(223)plot(w,X1),title('The amplitude o
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《内分泌系统调节》课件
- 盾构机施工中的隧道工程地质灾害应急响应考核试卷
- 精神康复效果评估考核试卷
- 禽类产品加工过程中的食品安全保障考核试卷
- 电池性能检测技术考核试卷
- 纸质家居用品设计原理考核试卷
- 电池制造过程中的生产调度与优化考核试卷
- 纺织品品质管理与改进考核试卷
- 2025年中国监护仪配件数据监测报告
- 日用杂品店品牌定位考核试卷
- 电子书 -《商业的底层逻辑》
- 农贸市场消防应急预案演练总结
- 2023年湖北宜昌高新区社区专职工作人员(网格员)招聘考试真题及答案
- 外贸谈判知识分享课件
- 《患者疼痛管理》课件
- 基于AI人工智能的智慧园区融合感知平台建设方案
- JB T 7689-2012悬挂式电磁除铁器
- 课件-错账更正
- 现代汉语语料库词频表CorpusWordlist
- GB/T 5465.2-2023电气设备用图形符号第2部分:图形符号
- 学校德育活动安排表
评论
0/150
提交评论