# 基于LabVIEW逐点数字滤波实验设计Experimental Design of Point-by-Point Digital Filtering Based on LabVIEW

DOI: 10.12677/CSA.2021.112043, PDF, HTML, XML, 下载: 53  浏览: 113  科研立项经费支持

Abstract: In order to solve the problem that it is not easy to build a virtual instrument system to design filter in MATLAB environment, this paper uses LabVIEW point by point analysis tool to design digital filter teaching demonstration and experimental system to realize dynamic point by point signal generation and filtering. The front panel parameters of the system can be set freely, and the filtering process is dynamically visible. Moreover, based on the LabVIEW’s event state machine mode, this system is convenient for the subsequent increase and decrease of experimental projects. We argue that by using this system, it is easier for students to understand the design and application process of digital filtering, and also real-time requirements of the signal system.

1. 引言

“数字信号处理”是高校信息类专业重要的专业基础课，具有理论性、实践性和应用性强的特点，其知识体系严谨、概念抽象、理论推导繁琐复杂、理论与实际联系紧密 [1] [2] [3]。FIR/IIR是课程主要内容与难点之一，教学中对其理论推导和仿真验证缺乏交互性与动态性，学生对众多参数及其实际效应没有直观认识、难以理解 [1]。另外，教材中数字滤波是基于数据缓存数组进行推导、分析和验证的，信号实时逐点的特性被模糊或弱化，不利于学生理解实时滤波的过程。

2. LabVIEW滤波与逐点滤波

2.1. 逐点滤波工具

2.2. 逐点滤波函数

Figure 1. Partial point-wise filtering function

Figure 2. Advanced signal processing toolbox

DFD Classical Design函数提供三种FIR和四种IIR滤波器设计方法，依次为Kaiser Window、Dolph-Chebyshev Window、Equi-Ripple、Butterworth、Chebyshev、Inverse Chebyshev、Elliptic。可实现低通、高通、带通、带阻四种滤波器类型。函数需要四个主要输入参数，滤波器设计方法、滤波器类型，滤波器设计规范参数(Filter Specifications)，即采样频率 ${f}_{s}$，通带频率 ${f}_{pass1}$${f}_{pass2}$，阻带频率 ${f}_{stop1}$${f}_{stop2}$，和滤波器纹波规范参数(Ripple Specifications)，即通带纹波与阻带衰减。

DFD Filtering函数可实现单通道单采样、多通道多采样信号的连续逐点滤波，其输入端为滤波器类型数据。

$P\left(f\right)=\frac{FFT\left(*x\left(n\right)\right)×FFT\left(x\left(n\right)\right)}{{n}^{2}}$

3. 逐点FIR/IIR滤波

3.1. FIR/IIR原理

FIR传递函数极点固定在原点，仅能改变零点位置来改变性能，达到高的频率选择性时必须用较高阶数。IIR传递函数包括零点和极点两组可调因素，对极点唯一限制是在单位圆内，可用较低阶数获得高的频率选择性。一般同样的设计指标，FIR阶数比IIR高5~10倍。FIR非递归结构使其在有限精度运算中不存在稳定性问题，频率特性误差相对IIR要小。

3.2. FIR/IIR逐点滤波

LabVIEW中FIR、IIR逐点滤波公式为：

$y\left[i\right]=\underset{j=0}{\overset{n-1}{\sum }}\left\{b\left[j\right]x\left[i-j\right]\right\}$

${y}_{i}=\frac{1}{{a}_{0}}{\left(\underset{j=0}{\overset{{N}_{b}-1}{\sum }}{b}_{j}{x}_{i-j}-\underset{k=0}{\overset{{N}_{a}-1}{\sum }}{a}_{k}{y}_{i-k}\right)}_{i}$

4. 系统设计和案例演示

4.1. 程序框架和功能

Figure 3. Filter design and filter characteristic program realization part

Figure 4. Point-by-point filtering and filtering effect program realization

Figure 5. Digital filter visual demonstration system operation process

4.2. 案例实验及演示效果

4.3. 实验结果

Figure 6. FIR filter design results

Figure 7. System interface and filter design results

Figure 8. Signal point-by-point filtering result ((a) Original signal; (b) Random pulse and Gaussian noise; (c) Point-by-point filtering; (d) Power spectrum before filtering; (e) Interference and noise power spectrum; (f) Filtered power spectrum)

5. 结语

NOTES

*通讯作者。