APP下载

基于FPGA和Matlab的FIR数字滤波器

2015-10-22曹振吉何敏

现代电子技术 2015年19期

曹振吉 何敏

摘 要: 为了满足信号处理快速和灵活的要求,基于FPGA实现的FIR滤波器有这两方面的优势,使用Matlab中的FDATool计算出滤波器系数并分析其幅频特性,利用FPGA分别设计实现串行结构、全并行结构以及基于IP核的FIR数字滤波器。利用Matlab软件进行FIR滤波器仿真,并与基于FPGA实现滤波器的Modelsim仿真输出数据进行比较,结果表明,设计的FIR滤波器功能正确、滤波性能良好。通过对不同结构滤波器的资源占用情况和数据处理速度进行分析,得出不同应用场合可选择不同的滤波器结构的结论。

关键词: FIR; FPGA; 串行结构; 并行结构; IP核

中图分类号: TN713?34 文献标识码: A 文章编号: 1004?373X(2015)19?0098?04

Abstract: Since the actual signal processing has the requirements of real?time response and flexibility, the implementation of FPGA?based FIR filter has the two advantages. The filter coefficient is calculated and the magnitude?frequency characteristic is analyzed by FDATool in Matlab. The FIR digital filters of serial structure, parallel structure and IP core based were designed and realized respectively by FPGA. FIR filters are simulated by Matlab, and compared with the data output by Modelsim simulation of the filter implemented by FPGA, the results show that functions of the designed FIR filters are correct, and filtering performance is better. The resource occupation situation and data processing speed of different structure filters are analyzed, and the conclusion of filters with different structures can be chosen to apply to suitable situation was obtained.

Keywords: FIR; FPGA; serial structure; parallel structure; IP core

0 引 言

数字滤波器是一个按预定的有限精度算法实现的、将输入的数字信号转换为所要求的输出数字信号的线性时不变系统[1?2]。由于FPGA的并行处理特性和自上到下的编程思想,所以其实现的数字滤波器能够兼顾系统实时性和灵活性的要求[3?4]。

根据系统时域性能,数字滤波器分为有限长单位脉冲响应(Finite Impulse Response,FIR)数字滤波器和无限长单位脉冲响应(Infinite Impulse Response,IIR)数字滤波器。相对于IIR数字滤波器,FIR滤波器有较大的优越性[5?6],所以本文将对FIR滤波器进行设计。FIR滤波器系数的设计方法主要有3种,包括窗函数法、频率采样法和最优化方法[5]。

本文借助Matlab中的FDATool工具,针对滤波要求设置合适的参数,可以方便地求解出滤波器系数和响应曲线,然后利用FPGA分别设计实现串行结构、全并行结构以及基于IP核的FIR数字滤波器,利用Matlab软件进行FIR滤波器仿真,并与基于FPGA实现滤波器的Modelsim输出数据进行对比,以此判断3种结构滤波器设计的正确性。……

登录APP查看全文