Pressure Sensor Error Compensation Algorithm Based on MEA-BP Neural Network
-
摘要: 针对压阻式压力传感器对环境条件变化较为敏感, 温度变化时会产生热漂移, 影响传感器性能的不足, 文中采用思维进化(MEA)-反向传播(BP)神经网络算法对压阻式压力传感器建立误差补偿模型, 该模型利用MEA算法对神经网络的初始权值和阈值进行优化, 减少了由于初值的不确定性导致训练陷入局部最优的可能性, 并采用Levenberg-Marquardt算法代替梯度下降法加快神经网络的收敛速度, 增加补偿算法的可靠性。仿真试验结果表明, MEA-BP算法与原始BP神经网络补偿法和遗传算法-BP神经网络补偿法相比, 均方根误差期望值分别降低了48.7%和8.29%, 且标准差分别降为其他2种算法的5%和4%, 证明经过MEA算法优化的BP神经网络补偿方法能更加精确地补偿温度造成的影响, 且补偿结果更为可靠。Abstract: Piezoresistive pressure sensors are sensitive to environmental changes. Ambient temperature changes would produce thermal drift, which affects sensor performance. This study entailed the use of the mind evolutionary algorithm(MEA)-back propagation(BP) neural network algorithm to establish an error compensation model for piezoresistive pressure sensors. The model uses the MEA algorithm to optimize the initial weight and threshold of the neural network, which reduces the possibility of the training falling into local optimization owing to the uncertainty of the initial value. The Levenberg–Marquardt algorithm replaces the gradient descent method to accelerate the convergence speed of the neural network and increase the reliability of the compensation algorithm. The results of the simulation show that, compared with those of the BP neural network compensation algorithm and genetic algorithm(GA)-BP neural network, the expectation of the root mean square error of the MEA-BP algorithm is lower by 48.7% and 8.29%, respectively. The standard deviations are reduced to 5% and 4% of those of the BP and GA-BP neural networks, respectively. This demonstrates that the BP neural network compensation method optimized by the MEA algorithm can compensate for the influence of temperature more accurately and that the compensation result is more reliable.
-
表 1 不同误差补偿算法比较
Table 1. Comparison among different error compensation algorithms
补偿方法 优点 缺点 最小二乘法及插值法 算法简单,
实时性好精度低 BP神经网络法 精度高 收敛速度慢, 易陷入
局部最优解RBF神经网络法 精度高 网络庞大, 实时性差 表 2 压力传感器采集的数据值
Table 2. The data value collected by the pressure sensor
施加压力/MPa 环境温度/℃ 输出电压/μV 0.225 5 26.11 3 882 0.410 0 26.13 6 425 0.611 0 26.21 9 194 0.801 0 26.23 11 812 1.002 0 26.25 14 583 1.204 0 26.28 17 368 1.391 0 26.35 19 947 1.591 0 26.36 22 703 1.804 0 26.30 25 640 2.111 0 26.39 29 873 1.551 0 26.41 3 882 0.760 0 26.47 6 425 0.410 0 26.42 9 194 表 3 BP神经网络及MEA算法参数设置
Table 3. Parameter setting of BP neural network and MEA algorithm
算法 参数名称 数值 BP神经网络 迭代次数 100 学习率 0.01 目标误差 1×10−5 种群大小 500 MEA算法 优胜子种群个数 5 临时子种群个数 5 MEA算法迭代次数 10 表 4 不同算法10次训练均方根误差对比
Table 4. RMSE of neural network training for 10 times
单位: MPa MEA-BP算法 BP算法 GA-BP算法 5.494×10−4 2.419×10−4 4.995×10−4 5.442×10−4 9.962×10−4 5.204×10−4 5.403×10−4 8.581×10−4 2.478×10−4 4.957×10−4 1.942×10−3 5.349×10−4 5.058×10−4 1.485×10−3 1.303×10−4 5.224×10−4 5.706×10−4 1.501×10−3 5.275×10−4 6.253×10−4 6.406×10−4 5.382×10−4 8.276×10−4 1.101×10−4 5.286×10−4 1.386×10−3 2.599×10−4 4.713×10−4 1.239×10−3 1.788×10−3 -
[1] 孙以材, 刘玉玲, 孟庆浩, 等. 压力传感器的设计制造与应用[M]. 北京: 冶金工业出版社, 2000. [2] Aryafar M, Hamedi M, Ganjeh M M. A novel temperature compensated piezoresistive pressure sensor[J]. Measurement, 2015, 63: 25-29. doi: 10.1016/j.measurement.2014.11.032 [3] 丁华泽, 胡育昱, 魏智, 等. 基于最小二乘法的地磁传感器轻量级温补机制设计与实现[J]. 传感器与微系统, 2022, 41(2): 78-81. [4] 李战, 冀邦杰, 国琳娜, 等. 光纤陀螺温度误差建模及补偿方法[J]. 鱼雷技术, 2008, 16(4): 15-18.Li Zhan, Ji Bangjie, Guo Linna, et al. Modeling and compensating method of temperature error for fiber-optic gyroscope[J]. Torpedo Technology, 2008, 16(4): 15-18. [5] 胡永建. 一种超宽温度补偿高精度压力传感器设计[J]. 传感器世界, 2017, 23(11): 28-33. [6] 张挺, 李红志, 兰卉, 等. 海洋专用高精度压力传感器温度特性及补偿算法研究[J]. 海洋技术学报, 2016, 35(6): 36-40. [7] 段杰, 李辉, 陈自立, 等. 基于RBF与OS-ELM神经网络的AUV传感器在线故障诊断[J]. 水下无人系统学报, 2018, 26(2): 157-165.Duan Jie, Li Hui, Chen Zili, et al. Online fault diagnosis of AUV sensor based on RBF and OS-ELM neural networks[J]. Journal of Unmanned Undersea System, 2018, 26(2): 157-165. [8] Rath S K, Patra J C, Kot A C. An intelligent pressure sensor with self-calibration capability using artificial neural networks[C]//2000 International conference on systems, man and cybernetics. Nashville, TN, USA: IEEE, 2000, [9] 李佳君, 卢文科. 用BP神经网络法对压力传感器进行温度补偿[J]. 工程与试验, 2015, 55(1): 66-69, 79.Li Jiajun, Lu Wenke. Temperature compensation of pressure sensor based on BP neural network[J]. Engineering and Test, 2015, 55(1): 66-69, 79. [10] 郎琦. 基于RBF神经网络矿用红外甲烷传感器补偿方法研究[J]. 自动化与仪器仪表, 2021(3): 55-57.Lang Qi. Study on compensation method of mine infrared methane sensor based on RBF neural network[J]. Automation and Instrumentation, 2021(3): 55-57. [11] Yu J, Li J, Dai Q, et al. Temperature compensation and data fusion based on a multifunctional gas detector[J]. IEEE Transactions on instrumentation and measurement, 2015, 64(1): 204-11. doi: 10.1109/TIM.2014.2332242 [12] Haykin S O. Neural networks and learning machines[M]. Upper Saddle River: Prentice Hall, 2009. [13] 丛爽. 神经网络理论与应用[M]. 合肥: 中国科学技术大学出版社, 2017. [14] 罗峥, 张学谦. 基于思维进化算法优化S-Kohonen神经网络的恶意域名检测模型[J]. 信息网络安全, 2020, 20(6): 82-89.Luo Zheng, Zhang Xueqian. A malicious domain name detection model based on S-Kohonen neural network optimized by evolutionary thinking algorithm[J]. Netinfo Security, 2020, 20(6): 82-89.