基于嵌入式控制系统的采样滤波优化算法
2021-07-27张超谢战洪毛学宇
张超 谢战洪 毛学宇



摘 要:针对嵌入式控制系统信号采样精度问题进行分析,提出了通过软件进行数字滤波,从而解决大范围电流传感器在小电流采样工况下精度不足的问题。并根据算法原理和内存结构做了算法优化,一共提出了三种滤波算法。通过引入新静态变量的方式,极大地提升了算法的运算速度,进而减小了滤波算法在采样和运算周期中占用的时间,为提高控制器的控制频率提供了可能。本文从问题分析入手,分析算法原理和优化方向,同时对三个算法进行了横向比较,罗列优缺点。同时通过DSP作为主控芯片,验证了三种滤波算法的可行性和运算周期。
关键词:数字滤波 信号采样 嵌入式控制系统 算法优化 时间复杂度 移位寄存器 空间复杂度
中图分类号:TP368.1 文献标识码:A 文章编号:1674-098X(2021)02(a)-0115-09
Optimization Methods of Signal Sampling and Digital Filtering Based on Embedded Control System
ZHANG Chao* XIE Zhanhong MAO Xueyu
(713th research institute of china shipbuilding indastry corporation, Zhengzhou, Henan Province, 450015 China)
Abstract: Focused on the signal sampling accuracy of embedded control system, a digital filtering method is proposed to deal with insufficient accuracy of little current sample based on large-range current sensor. And the method is optimized through algorithm principle and memory structure of chip, in all, three methods are proposed. By introducing extra static variables, the calculation speed is greatly improved, and the calculation cycles of filtering algorithm on sampling period are reduced, which makes it possible to improve the control frequency of the whole system. From problem analysis, the paper analyzes the algorithm principle and optimization method. Besides, the three filtering method are compared with merits and demerits. Based on DSP as the control chip, the feasibility of the three methods are verified and the operation cycle is tested.
Key Words: Digital Filtering; Signal Sampling; Embedded Control System; Optimization Methods; Time Complexity; Shift Register; Spatial Complexity
随着电子工业的不断发展,电控技术达到了空前的繁荣[1]。无论是在人民的生产生活,还是各种工业自动化加工场所,电气控制已经渗透到其中。其中包括新能源汽车整车控制和驱动技术[2]、永磁电机控制[3]、工业自动化生产线控制、计量检测部门各种检测设备、軍事领域各种自动火炮控制,更包括航空航天、船舶制造、机械加工、城市管道建设、地铁施工、道路抢险等各方面关系民生民情的领域。电气控制的飞速发展在解放了人类劳动力的同时,提升了施工效率、降低了劳动力成本。
电气工程实现了以下功能:一是监视功能,电气控制系统……
