您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > 用海明窗函数法设计数字FIR带阻滤波器
信号与系统课程设计论文题目用海明窗函数法设计数字FIR带阻滤波器学院通信与电子工程学院专业班级电子085班学生姓名朱彦春指导教师苗凤娟年月日信号与系统课程设计论文I摘要在用海明窗窗函数法设计FIR数字滤波器时,设计的优化主要是通过调整窗函数来进行的。文中提出一种新的优化算法,其基本思想是在窗函数和滤波器阶数不变的情况下,通过迭代运算寻找一个最佳的频率响应函数,对此频率响应函数的傅里叶反变换进行加窗所设计出的滤波器的频率响应相对于理想频率响应的逼近误差最小。关键词:数字滤波器;窗函数法;优化算法;逼近误差信号与系统课程设计论文IIAbstractInthewindowwithhammingwindowfunctionmethoddesignFIRdigitalfilters,designoptimizationismainlybyadjustingthewindowfunction,Thispaperpresentsanewoptimizationalgorithm,thebasicideaisinwindowfunctionandfilterordernumberundertheconditionofinvariable,throughtheiterativeoperationlookingforanoptimalfrequencyresponsefunction,tothisfrequencyresponsefunctionofFourierinversetransformaddwindowplacethatthedesignofthefrequencyresponseofthefilterrelativetotheidealfrequencyresponseapproximationerrorsmallest.Keywords:Digitalfilters;Windowfunctionmethod;Optimizationalgorithm;Approximationerror信号与系统课程设计论文III目录摘要·······································································································IAbstract·····································································································II第1章绪论·····························································································11.1概述······························································································11.2窗函数的定义··························································错误!未定义书签。1.2.1窗函数的应用···········································································21.2.2窗函数的选择···········································································2第2章实验设计·······················································································32.1设计FIR数字滤波器的基本方法·························································32.2FIR数字滤波器设计的步骤································································32.2.1确定技术指标········································································32.2.2逼近·······················································································32.2.3性能分析和计算机仿真·······························································3第3章运行及结果····················································································53.1实验环境························································································53.2开发工具和汇编语言·········································································53.3程序设计························································································53.4实验结果························································································9结论········································································································10附录·················································································错误!未定义书签。致谢·················································································错误!未定义书签。信号与系统课程设计论文1第1章绪论1.1概述数字信号处理是把许多经典的理论体系作为自己的理论基础,同时又使自己成为一系列新兴学科的理论基础。现如今随着电子设备工作频率范围的不断扩大,电磁干扰也越来也严重,接收机接收到的信号也越来越复杂。为了得到所需要频率的信号,就需要对接收到的信号进行过滤,从而得到所需频率段的信号,这就是滤波器的工作原理。对于传统的滤波器而言,如果滤波器的输入,输出都是离散时间信号,则该滤波器的冲激响应也必然是离散的,这样的滤波器定义为数字滤波器。它通过对采样数据信号进行数学运算来达到频域滤波的目的.。1.2窗函数的定义为了减少频谱能量泄漏,可采用不同的截取函数对信号进行截短,截短函数称为窗函数,简称为窗。信号截短以后产生的能量泄漏现象是必然的,因为窗函数w(t)是一个频带无限的函数,所以即使原信号x(t)是限带宽信号,而在截短以后也必然成为无限带宽的函数,即信号在频域的能量与分布被扩展了。又从采样定理可知,无论采样频率多高,只要信号一经截短,就不可避免地引起混叠,因此信号截短必然导致一些误差。泄漏与窗函数频谱的两侧旁瓣有关,如果两侧瓣的高度趋于零,而使能量相对集中在主瓣,就可以较为接近于真实的频谱,为此,在时间域中可采用不同的窗函数来截短信号。信号与系统课程设计论文21.2.1窗函数应用不同的窗函数对信号频谱的影响是不一样的,这主要是因为不同的窗函数,产生泄漏的大小不一样,频率分辨能力也不一样。信号的截短产生了能量泄漏,而用FFT算法计算频谱又产生了栅栏效应,从原理上讲这两种误差都是不能消除的,但是我们可以通过选择不同的窗函数对它们的影响进行抑制。(矩形窗主瓣窄,旁瓣大,频率识别精度最高,幅值识别精度最低;布莱克曼窗主瓣宽,旁瓣小,频率识别精度最低,但幅值识别精度最高)1.2.2窗函数的选择对于窗函数的选择,应考虑被分析信号的性质与处理要求。如果仅要求精确读出主瓣频率,而不考虑幅值精度,则可选用主瓣宽度比较窄而便于分辨的矩形窗,例如测量物体的自振频率等;如果分析窄带信号,且有较强的干扰噪声,则应选用旁瓣幅度小的窗函数,如汉宁窗、三角窗等;对于随时间按指数衰减的函数,可采用指数窗来提高信噪比,故此设计选用海明窗。信号与系统课程设计论文3第2章实验设计2.1设计FIR数字滤波器的基本方法:FIR数字滤波器的系统函数无分母,为1100()()NNiniiiHZbzhnz,系统频率响应可写成:10()()NjwjwnnHehne,令()jwHe=()()jwHwe,H(w)为幅度函数,()w称为相位函数。这与模和辐角的表示方法不同,H(w)为可为正可为负的实数,这是为了表达上的方便。如某系统频率响应()jwHe=sin4w3jwe,如果采用模和幅角的表示方法,sin4w的变号相当于在相位上加上(因-1=je),从而造成相位曲线的不连贯和表达不方便,用()()jwHwe则连贯而方便。窗函数法又称傅里叶级数法,其设计是在时域进行的。函数一般是无限长且非因果的,设计时需用一个合适的窗函数把截成有限长的因果序列,使对应的频率响应(的傅里叶变换)尽可能好地逼近理想频率响应。窗函数法的主要缺点是:一、不容易设计预先给定截止频率的滤波器;二、满足同样设计指标的情况下所设计出的滤波器的阶数通常偏大。2.2FIR数字滤波器设计的步骤2.2.1确定技术指标在设计一个滤波器之前,必须首先根据工程实际的需要确定滤波器的技术指标。在很多实际应用中,数字滤波器常被用来实现选频操作。因此,指标的形式一般在频域中给出幅度和相位响应。幅度指标主要以2种方式给出。第一种是绝对指标。他提供对幅度响应函数的要求,一般应用于FIR滤波器的设计。第二种指标是相对指标。他以分贝值的形式给出要求。本文中滤波器的设计就以线性相位FIR滤波器的设计为例。2.2.2逼近确定了技术指标后,就可以建立一个目标的数字滤波器模型(通常采用理想的数字滤波器模型)。之后,利用数字滤波器的设计方法(窗函数法、频率采样法等),设计出一个实际滤波器模型来逼近给定的目标。2.2.3性能分析和计算机仿真信号与系统课程设计论文4上两步的结果是得到以差分或系统函数或冲激响应描述的滤波器。根据这个描述就可以分析其频率特性和相位特性,以验证设计结果是否满足指标要求;或者利用计算机仿真实现设计的滤波器,再分析滤波结果来判断。开始↓读入窗口长度↓计算hd(n)(↓调用窗函数子程序我w(n)↓计算h(n)=hd(n)w(n)↓调用子程序计算H(k)=DFT[h(n)]↓↓程序流程图调用绘图子程序绘制H(k)幅度相位曲线结束信号与系统课程设计论文5第3章运行及结果3.1实验环境PC机MATLAB3.2开发工具和汇编语言MATLAB语言3.3程序设计functionFilterSignalDemo%ThisprogramdemonstrateBandstopfilter'frequencydomainresponse.%Then,acompondsignalisproducedbyaddingmiddlefrequencysignaland%aGaussianWhitenoise.Thefilteringprocesscanbeexplained
本文标题:用海明窗函数法设计数字FIR带阻滤波器
链接地址:https://www.777doc.com/doc-4106040 .html