信号与系统实验报告(川大版)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

实验报告课程名称信号与系统实验名称信号与LTI系统的时频域分析实验时间2017年6月15日学院电子信息学院指导教师周新志学生姓名班级学号学院(系)电子信息学院专业信息安全2实验报告实验名称信号与LTI系统的时频域分析指导教师周新志一、实验目的和要求1)熟悉和掌握实现常用信号的产生方法;;2)理解系统的单位冲激响应的概念,LTI系统的卷积表达式及其物理意义,卷积的计算方法;3)理解典型信号的频谱特征;4)理解系统的频率响应的概念及其物理意义,理解具有不同频率响应特性的滤波器对信号的滤波作用;5)学会利用编程实现卷积以求解系统响应,并绘制相应曲线;6)学会利用编程实现一些典型信号的频谱分析,并绘制相应曲线。二、实验环境(实验设备)计算机,Matlab2014a三、实验原理及内容已知一LTI系统如下:1)编程产生以下三个正弦信号,并画出波形图。1122312[]cos(2),[]cos(2),[][]+[],xnfnxnfnxnxnxn其中f1=1/8,f2=5/8;2)编程计算下面卷积:已知h1[n]={0.0031,0.0044,-0.0031,-0.0272,-0.0346,0.0374,0.1921,0.32790.3279,0.1921,0.0374,-0.0346,-0.0272,-0.0031,0.0044,0.0031},n=0,1,...,15;h2[n]={-0.0238,0.0562,-0.0575,-0.1302,0.5252,-0.6842,-0.3129,5.6197,5.6197,-0.3129,-0.6842,0.5252,-0.1302,-0.0575,0.0562,-0.0238},n=0,1,...,15。a、当h[n]=h1[n]时,输入分别为x1[n],x2[n]和x3[n]时系统的输出y[n],并画出波形图。b、当h[n]=h2[n]时,输入分别为x1[n],x2[n]和x3[n]时系统的输出y[n],并画出波形图。3)编程实现以下信号的频谱分析:a、输入信号x1[n],x2[n]和x3[n]的频谱,并画出频谱图;b、冲激响应h[n]=h1[n]时h[n]的频谱,三种输入信号下输出y[n]的频谱,并画出h[n]h[n]y[n]x[n]3和输出信号的频谱图;c、冲激响应h[n]=h2[n]时h[n的频谱,三种输入信号下输出y[n]的频谱,并画出h[n]和输出信号的频谱图。4)根据输入信号、h[n]和输出信号的频谱,验证输出信号的频谱与输入信号、h[n]的频谱关系(或卷积性质),即是否满足(e)(e)(e)jjjYXH。5)分析以上各种情况下,输出信号及频谱不同原因(1)clear;n=-4:4;x1=cos(0.25*pi*n);subplot(2,2,1),stem(n,x1),gridon;title('余弦信号x1[n]')xlabel('Timeindexn');x2=cos(1.25*pi*n);subplot(2,2,2),stem(n,x2),gridon;title('余弦信号x2[n]')xlabel('Timeindexn');x3=x1+x2;subplot(2,2,3),stem(n,x3),gridon;title('余弦相加信号x3[n]')xlabel('Timeindexn');4(2)a.clear;h1=[0.0031,0.0044,-0.0031,-0.0272,-0.0346,0.0374,0.1921,0.3279,0.3279,0.1921,0.0374,-0.0346,-0.0272,-0.0031,0.0044,0.0031];k1=0:15;n=-4:4;x1=cos(0.25*pi*n);y1=conv(h1,x1);%计算序列f1与f2的卷积和fk0=k1(1)+n(1);%计算序列f非零样值的起点位置k3=length(x1)+length(h1)-2;%计算卷积和f的非零样值的宽度k=k0:k0+k3;%确定卷积和f非零样值的序号向量subplot(2,2,1);stem(k,y1);title('x1[n]与h1[n]的卷积和y1[n]');xlabel('k');ylabel('y1[k]');x2=cos(1.25*pi*n);y2=conv(h1,x2);subplot(2,2,2);stem(k,y2);title('x2[n]与h1[n]的卷积和y2[n]');xlabel('k');ylabel('y2[k]');x3=x1+x2;y3=conv(h1,x3);subplot(2,2,3);stem(k,y3);title('x3[n]与h1[n]的卷积和y3[n]');xlabel('k');ylabel('y3[k]');b.5clear;h2=[-0.0238,0.0562,-0.0575,-0.1302,0.5252,-0.6842,-0.3129,5.6197,5.6197,-0.3129,-0.6842,0.5252,-0.1302,-0.0575,0.0562,-0.0238];k1=0:15;n=-4:4;x1=cos(0.25*pi*n);y1=conv(h2,x1);%计算序列f1与f2的卷积和fk0=k1(1)+n(1);%计算序列f非零样值的起点位置k3=length(x1)+length(h2)-2;%计算卷积和f的非零样值的宽度k=k0:k0+k3;%确定卷积和f非零样值的序号向量subplot(2,2,1);stem(k,y1);title('x1[n]与h2[n]的卷积和y1[n]');xlabel('k');ylabel('y1[k]');x2=cos(1.25*pi*n);y2=conv(h2,x2);subplot(2,2,2);stem(k,y2);title('x2[n]与h2[n]的卷积和y2[n]');xlabel('k');ylabel('y2[k]');x3=x1+x2;y3=conv(h2,x3);subplot(2,2,3);stem(k,y3);title('x3[n]与h2[n]的卷积和y3[n]');xlabel('k');ylabel('y3[k]');63.(a)fs=128;t=1/fs;L=256;n=0:1:L-1;x1=cos(0.25*pi*n);x2=cos(1.25*pi*n);x3=x2+x1;N=2^nextpow2(L);X1=fft(x1,N)/N*2;X2=fft(x2,N)/N*2;X3=fft(x3,N)/N*2;f=fs/N*(0:1:N-1);figure;subplot(2,1,1);plot(f,abs(X1));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(X1));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(X2));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(X2));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(X3));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(X3));title('相位频谱');7xlabel('频率(HZ)');ylabel('相位');8(b)fs=128;t=1/fs;L1=256;n=0:1:L1-1;h1=[0.0031,0.0044,-0.0031,-0.0272,-0.0346,0.0374,0.1921,0.3279,0.3279,0.1921,0.0374,-0.0346,-0.0272,-0.0031,0.0044,0.0031];x1=cos(0.25*pi*n);x2=cos(1.25*pi*n);x3=x2+x1;N=2^nextpow2(L1);X1=fft(x1,N)/N*2;X2=fft(x2,N)/N*2;X3=fft(x3,N)/N*2;H1=fft(h1,N)/N*2;Y11=fft(x1,N)/N.*2.*fft(h1,N)/N.*2;Y12=fft(x2,N)/N.*2.*fft(h1,N)/N.*2;Y13=fft(x3,N)/N.*2.*fft(h1,N)/N.*2;f=fs/N*(0:1:N-1);figure;subplot(2,1,1);plot(f,abs(H1));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(H1));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(Y11));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(Y11));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(Y12));9title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(Y12));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(Y13));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(Y13));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');1011fs=128;t=1/fs;L1=256;n=0:1:L1-1;h2=[-0.0238,0.0562,-0.0575,-0.1302,0.5252,-0.6842,-0.3129,5.6197,5.6197,-0.3129,-0.6842,0.5252,-0.1302,-0.0575,0.0562,-0.0238];x1=cos(0.25*pi*n);x2=cos(1.25*pi*n);x3=x2+x1;N=2^nextpow2(L1);H2=fft(h2,N)/N*2;Y21=fft(x1,N)/N.*2.*fft(h2,N)/N.*2;Y22=fft(x2,N)/N.*2.*fft(h2,N)/N.*2;Y23=fft(x3,N)/N.*2.*fft(h2,N)/N.*2;f=fs/N*(0:1:N-1);figure;subplot(2,1,1);plot(f,abs(H2));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(H2));title('相位频谱');xlabel('频率(HZ)');ylabel('相位');figure;subplot(2,1,1);plot(f,abs(Y21));title('幅值频谱');xlabel('频率(HZ)');ylabel('幅值');subplot(2,1,2);plot(f,angle(Y21));title('相位频谱');xlabel('频率(HZ)');ylabel('相位'

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功