资源描述:
《信号处理实验指导书》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、信号处理实验指导书数字信号处理实验电子信息科学与技术实验室2016年7月目录实验一实验二实验三实验四实验五实验六实验七实验八实验九离散时间信号的时域表示··················································································1序列的基本运算和时域变换··············································································6离散信号的卷积和····························
2、··································································8离散傅立叶变换及其特性验证········································································10信号处理中FFT的应用···················································································13离散系统的Z域分析···························
3、····························································20无限冲激响应数字滤波器的三种结构·····················································24冲激响应不变法IIR数字滤波器设计······························································28双线性变换法IIR数字滤波器设计························································
4、··········31实验一离散时间信号的时域表示一、实验目的1、熟悉MATLAB命令,掌握离散时间信号-序列的时域表示方法。2、掌握用MATLAB描绘二维图像的方法。二、实验原理与计算方法序列的表示方法有列举法、解析法和图形法,相应的用MATLAB也可以有这样几种表示方法,分别介绍如下:1、列举法在MATLAB中,用一个列向量来表示一个有限长序列,由于一个列向量并不包含位置信息,因此需要用表示位置的n和表示量值的x两个向量来表示任意一个序列,如:例:n=[-3,-2,-1,0,1,2,3,4];x=[2,1,-1,0,1,4,3,7];如果不对向量的位置进行定义
5、,则MATLAB默认该序列的起始位置为n=0。由于内存有限,MATLAB不能表示一个无限序列。2、解析法对于有解析表达式的确定信号,首先定义序列的范围即n的值,然后直接写出该序列的表达式,如:例:实现实指数序列x?,0?n?10的MATLAB程序为:n=[0:10];x=.;例:实现正余弦序列x?3cos?2sin,5?n?15的MATLAB程序为:n=[5:15];x=3*cos+2*sin;3、图形法在MATLAB中用图形法表示一个序列,是在前两种表示方法的基础上将序列的各个量值描绘出来,即首先对序列进行定义,然后用相应的画图语句画图,如:例:绘制在1中用列举
6、法表示的序列的图形,则在向量定义之后加如下绘图语句:stem;此时得到的图形的横坐标范围由向量n的值决定,为-3到4,纵坐标的范围由向量x的值决定,为-1到7。应用stem函数时应确保自变量n和函数值x的个数相等。此外可用函数axis对横纵坐标进行限定,以完善图形,其中x1和x2分别为横坐标的起始和截止位置,y1和y2分别为纵坐标的起始和截止位置。也可用xlabel、ylabeln和title为该图添加横、纵坐标说明和标题。subplot函数可以将当前窗口分成m行n列个子窗口,并在第k个子窗口绘图。窗口的排列顺序为从左至右,从上至下分别为1,2,…m*n。以上为几个
7、常用绘图函数的基本用法,有关各函数的其他参数可参考MATLAB的帮助文件。下面给出产生单位抽样序列和单位阶跃序列的两个函数,供参考。例:产生单位抽样序列的函数impseq。function[n,x]=impseq%Generatesx=delta;n1%----------------------------------------------%[x,n]=impseq%if
8、
9、)endn=[n1:n2];%x=[zeros),1,zeros)];x=[==0];该函数产生一个抽样位置在n0,序列范围在n1和n2之间的单位抽样序列。例:产生单位阶跃序列的函数st