好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

信号分析及处理实验(matlab).ppt

22页
  • 卖家[上传人]:第***
  • 文档编号:62858154
  • 上传时间:2018-12-23
  • 文档格式:PPT
  • 文档大小:302.51KB
  • / 22 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 基于MATLAB的,信号分析与处理实验,Matlab程序举例1:产生时域信号,t=0:0.01:1; x1=0.1*exp(-2*t); %指数信号 x2=2*cos(2*pi*4*t); %余弦信号 x3=[ones(1,10) zeros(1,90) ones(1,10) zeros(1,90)]; %矩形信号 subplot(3,1,1); plot(x1); title(‘指数信号’); subplot(3,1,2); plot(x2); title(‘余弦信号’); subplot(3,1,3); plot(x3); title(‘矩形信号’);,Matlab程序举例2:计算卷积,用卷积定理 X1=fft(x1,32); X2=fft(x2,32); Y=X1.*X2; y2=real(ifft(Y)); subplot(2,1,1); stem(y1); subplot(2,1,2); stem(y2);,直接计算 x1=[ones(1,5) zeros(1,27) ]; x2=[ones(1,10) zeros(1,22) ]; y1=conv(x1,x2);,实验安排,1、信号的产生与运算; 2、连续与离散信号的频谱分析; 3、连续与离散系统分析、滤波; 4、信号处理程序设计;(设计性) (卷积、相关、窗函数、DFT、FFT*) 5、数字滤波器的设计与滤波; 6、wav音频信号的读写与处理。

      1、信号的产生与运算,实验目的:掌握用Matlab产生基本信号、绘制波形、实现基本运算 实验指导:实验教材第一篇之实验一 实验内容: (1) 常用连续信号的产生与绘图; (2) 常用离散信号的产生与绘图; (3) 离散信号的基本运算(含卷积、相关); (4) 教材实验内容(P12)之4、5题交程序及结果),2、信号的频谱分析,实验目的:掌握用DFT分析离散与连续时间信号频谱,以及窗函数的波形与频谱特点 实验指导:实验教材第一篇之实验三、实验四、实验五 实验内容: (1) 离散信号的DFT(FFT)变换与频谱图(P27); (2) 分析5种窗函数的波形图与频谱图(不同窗宽); (3) 连续时间信号的频谱分析(P33); (4) 教材实验内容(P34)之4题3、系统分析与滤波,实验目的:掌握在已知系统函数或微分(差分)方程时,分析时域响应、频率响应、系统稳定性的方法 实验指导:实验教材第二篇之实验一、实验二 实验内容: (1) 连续、离散系统的时域响应与零极点分析; (2) 连续系统的频率响应特性(幅度、相位); (3) 离散系统的频率响应特性(幅度、相位); (4) 教材实验内容(P58)之4、5题(filter滤波)。

      4、信号处理程序设计,实验目的:掌握用matlab基本语句实现信号处理的方法,以及自定义函数的编制与调用 实验指导:实验教材附录二、《数字信号处理教程》 实验内容: (1) 根据定义公式编写程序实现序列卷积、相关运算; (2) 生成与DFT、fftshift同功能的自定义函数; (3) 由表达式生成5种窗信号,用自定义函数分析频谱; (4) 自己编程实现FFT(选做,参考教材P191)5、数字滤波器的设计与滤波,实验目的:掌握用Matlab设计IIR与FIR数字滤波器的方法,及实现对信号的滤波 实验指导:实验教材第二篇之实验三、实验四 实验内容: (1) 各种IIR数字滤波器的设计(直接法、原型变换法); (2) 窗口法和频率抽样法设计FIR数字滤波器; (3) 用设计结果和filter函数实现信号(mtlb)滤波; (4) 教材实验内容(P64之2、P72之5题) 6、wav音频信号的读写与处理,实验目的:掌握声音信号读写(wavread、wavwrite)、去噪滤波、限带滤波及变采样 实验指导:实验教材第三篇之实验五、实验七 实验内容: (1) 通过help学习wavread、wavwrite的使用; (2) 实验七的实验内容1、2、3(P110); (3) 教材实验内容(P72之6题); (4) 实验五的实验内容2 (P104,存为wav文件)。

      附:用冲激响应不变法、双线性变换法 设计IIR数字滤波器的具体步骤,(1) 按一定规则将给出的数字滤波器的技术指标转换成模拟低通滤波器的技术指标; (2) 根据转换后的技术指标使用滤波器阶数选择函数,确定最小阶数N和固有频率Wn,根据选用的模拟低通滤波器的类型可分别用函数:buttord, cheb1ord, cheb2ord, ellipord等; (3) 运用最小阶数N产生模拟滤波器原型,模拟低通滤波器的创建函数有:buttap, cheb1ap, cheb2ap, ellipap等; (4) 运用固有频率Wn把模拟低通滤波器原型转换成模拟低通、高通、带通、带阻滤波器,可分别用函数lp2lp、lp2hp, lp2bp, lp2bs; (5) 运用冲激响应不变法或双线性变换法把模拟滤波器转换成数字滤波器,分别用函数impinvar和bilinear实现例:Chebyshev I型数字滤波器设计,通带截止频率wp,阻带截止频率ws, 通带最大衰减rp,阻带最小衰减rs. 假设各参数: wp=30*2 *pi; ws=40*2* pi; Fs=100; rp=0.3; rs=80;,例1:Chebyshev I型数字滤波器设计,选择阶数: [N, Wn]=cheb1ord(wp, ws, rp, rs, 's'); 创建Chebyshev I型滤波器原型:[z,p,k]=cheb1ap(N,rp); 表达形式从零极点增益形式转换成状态方程形式: [A, B, C, D]=zp2ss(z,p,k); 把模拟低通滤波器原型转换成模拟低通滤波器: [At, Bt, Ct, Dt]=lp2lp(A, B, C, D, Wn); 表达形式从状态方程形式转换成传递函数形式: [num1 ,den 1]=ss2tf(At,Bt,Ct,Dt); 采用冲激响应不变法将模拟滤波器转换成数字滤波器: [num2,den2]=impinvar(num1 ,den1, Fs); 返回数字滤波器的频率响应: [H, W]=freqz(num2,den2,N),例2:Butterworth数字滤波器设计,[N,Wn]=buttord(Wp,Ws,Rp,Rs,'s'); %确定butterworth的最小介数N和频率参数Wn [z,p,k]=buttap(N); %设计模拟低通原型的零极点增益参数 [bp,ap]=zp2tf(z,p,k); %将零极点增益转换成分子分母参数 [bs,as]=lp2lp(bp,ap,Wn);%将低通原型转换为模拟低通 [bz,az]=impinvar(bs,as,Fs); %用脉冲响应不变法进行模数变换 [H,W]=freqz(bz,az,512,Fs); %生成频率响应参数,例3:用butter或cheby1函数,[N,wc]=buttord(wp,ws,ap,as,'s'); [bs,as]=butter(N,wc, 's'); %[bs,as]=cheby1(………); [bz,az]=impinvar(bs,as,Fs) % [bz,az]=bilinear(bs,as,Fs),help cheb1ord,CHEB1ORD Chebyshev Type I filter order selection. [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs) returns the order N of the lowest order digital Chebyshev Type I filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies, normalized from 0 to 1 (where 1 corresponds to pi radians/sample). For example, Lowpass: Wp = .1, Ws = .2 Highpass: Wp = .2, Ws = .1 Bandpass: Wp = [.2 .7], Ws = [.1 .8] Bandstop: Wp = [.1 .8], Ws = [.2 .7] CHEB1ORD also returns Wn, the Chebyshev natural frequency to use with CHEBY1 to achieve the specifications. [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs, 's') does the computation for an analog filter, in which case Wp and Ws are in radians/second.,help cheby1,CHEBY1 Chebyshev Type I digital and analog filter design. [B,A] = CHEBY1(N,R,Wn) designs an Nth order lowpass digital Chebyshev filter with R decibels of peak-to-peak ripple in the passband. CHEBY1 returns the filter coefficients in length N+1 vectors B (numerator) and A (denominator). The cutoff frequency Wn must be 0.0 Wn 1.0, with 1.0 corresponding to half the sample rate. Use R=0.5 as a starting point, if you are unsure about choosing R. If Wn is a two-element vector, Wn = [W1 W2], CHEBY1 returns an order 2N bandpass filter with passband W1 W W2. [B,A] = CHEBY1(N,R,Wn,'high') designs a highpass filter. [B,A] = CHEBY1(N,R,Wn,'low') designs a lowpass filter. [B,A] = CHEBY1(N,R,Wn,'stop') is a bandstop filter if Wn = [W1 W2]. When used with three left-hand arguments, as in [Z,P,K] = CHEBY1(.), the zeros and poles are returned in length N column vectors Z and P, and the gain in scalar K. When used with four left-hand arguments, as in [A,B,C,D] = CHEBY1(.), state-space matrices are returned. CHEBY1(N,R,Wn,'s'), CHEBY1(N,R,Wn,'high','s') and CHEBY1(N,R,Wn,'stop','s') design analog Chebyshev Type I filters. I。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.