基于MATLAB在线数字滤波器设计与误差分析
2014-10-17王倢婷
王倢婷
摘要:为了获取高精度有效信号在信号检测系统中,常常需要进行滤波,将设置频率以外的信号彻底清除,数字滤波器广泛应用于各种测量系统。基于MATLAB的在线数字滤波器设计过程简单易行,不仅具有较高的精度和稳定性,还有运算速度快,延迟小的特点,可以满足测量要求。但在实际应用时如果采样数据长度选择不当,输出波形会出现失真。通过实验分析了采样数据长度与波形失真的关系,在使用时要兼顾误差与延迟,保证数字滤波测量精度。
关键词:MATLAB;数字滤波器;在线测量;误差分析;信号失真
中图分类号:TP302 文献标识码:A 文章编号:1009-3044(2014)26-6242-04
Abstract: In order to acquire high quality signal in the sensing and data acquisition system, it is needed to perform filtering to get rid of the frequency band which isn't wanted. As a result, digital filters are widely used in all kinds of measuring systems. The real-time online digital filter that based on MATLAB is easy to design. It also possesses high accuracy and stability, fast speed and low delay, which means it satisfy the demands of most measuring system. However, the distortion occurs when the length of sample string is too short in the application. This work analyzes the relation between sample string length and the distortion by the experiments and tries to reach a balance between errors and delay to ensure the high quality of filter performance.
Key words: MATLAB; digital filter; online measuring; error analyze; signal distortion
1 概述
在信号测量与采编系统中,为了提高采编系统的信噪比,经常使用滤波器对采集的信号进行滤波,在某些情况下,测量系统在信号处理时要求信号精度高、信号识别率高,使得系统对滤波器的性能提出了很高的要求,比如要求滤波器满足通带不平度小、带外衰减快、系统延迟低等。
MATLAB,又称矩阵实验室,是美国MathWorks公司出品的一款功能强大的数学软件,可以用于数据分析、算法研发和数值计算,在科学研究以及工程上应用十分广泛。然而MATLAB虽然功能强大,但其本身的设计主要是面向离线的数据分析,所以鲜有人尝试利用MATLAB进行低延迟,高性能的在线滤波。该文以脑电信号处理中的theta波(4~12Hz)为例,利用MATLAB中的数字滤波器实现实时滤波。
2 数字滤波器设计
2.1 滤波器类型选择
工程上常用的滤波器有四种:切比雪夫I型滤波器、切比雪夫II型滤波器、巴特沃兹滤波器和椭圆滤波器。……
