APP下载

基于BP神经网络的温度传感器辐射误差分析

2019-04-04蔡晶晶刘清惓戴伟杨杰

现代电子技术 2019年2期
关键词:温度传感器

蔡晶晶 刘清惓 戴伟 杨杰

关键词: 计算流体动力学; 温度传感器; 太阳辐射误差; 仿真数据; BP神经网络算法; 误差修正

中图分类号: TN820.1?34                        文献标识码: A                     文章编号: 1004?373X(2019)02?0022?04

Radiation error analysis of temperature sensor based on BP neural network

CAI Jingjing1,2,3, LIU Qingquan1,2,3, DAI Wei4, YANG Jie5

(1. Jiangsu Collaborative Innovation Center of Atmospheric Environment and Equipment Technology, Nanjing University of Information Science & Technology, Nanjing 210044, China; 2. School of Electronics and Information Engineering, Nanjing University of Information Science & Technology, Nanjing 210044, China;

3. Jiangsu Key Laboratory of Meteorological Observation and Information Processing, Nanjing University of Information Science & Technology,

Nanjing 210044, China;4. Key Laboratory of MEMS of Ministry of Education, Southeast University, Nanjing 210096, China;

5. School of Atmospheric Physics, Nanjing University of Information Science & Technology, Nanjing 210044, China)

Abstract: The radiation errors of the temperature sensor under different air flow velocities and solar altitude angles are obtained by the simulation adopting the computational fluid dynamics (CFD) method, so as to reduce the influence of solar radiation on ground temperature measurement and correct solar radiation errors. The simulation data is fitted by using the BP neural network algorithm, to obtain the radiation error correction equation, and realize correction of measured ground temperature. The root mean square error between the fitting results of BP neural network and the simulation results is 0.05 °C. An error correction software is also designed in this paper, so as to apply the algorithm to solve the radiation errors of the temperature sensor in any environmental parameter condition.

Keywords: computational fluid dynamics; temperature sensor; solar radiation error; simulation data; BP neural network algorithm; error correction

大氣中的温度、湿度、气压、风向和风速等信息分布是气候变化和天气预报科学研究的重要条件,其中温度是最重要的指标之一[1]。目前用于观测大气温度的传感器测量误差主要来源于太阳辐射,鉴于太阳辐射对温度测量影响较大,故在大气温度测量时不得不采取措施来降低辐射误差。为了减少太阳辐射的影响,通常将测量温度的传感器探头安装在防辐射罩中,可在一定程度上阻挡太阳辐射对测温探头的直接照射,减小辐射误差[2]。国内外学者对太阳辐射影响温度传感器测量精度展开了一系列研究,发现辐射误差[3]可达到1 ℃量级。

本文采用计算流体动力学方法(Computational Fluid Dynamics,CFD)对温度传感器进行仿真模拟,并提出一种BP(Back Propagation)神经网络算法对仿真结果进行拟合,获得辐射误差修正方程的方法,为温度传感器的辐射误差修正和测量精度改善提供支撑[4]。

1  温度传感器的多物理场仿真分析

1.1  网格划分

本文采用自适应性较强的非结构化网格划分技术生成防辐射罩和外围空气域的网格模型,对不同计算区域采用不同的网格大小[5],防辐射罩的网格尺寸取0.5 cm,外围空气域网格尺寸取5 cm。为验证网格无关性,选50万~150万网格数量模型进行验证,仿真结果显示,60万~100万网格条件下仿真结果差距低于0.01,可认为达到网格无关性要求,因此选择60万的网格进行仿真[6],其非结构网格划分如图1所示。

1.2  多物理场仿真分析

温度传感器及其屏蔽装置防辐射罩的热平衡是由内部导热、太阳辐射、下垫面长波辐射、外部空气对流换热共同耦合作用下形成的[7]。防辐射罩结构、尺寸、材料的变化对这种热平衡有显著影响,从而引起内部温度传感器在同一物理环境下对应不同的辐射误差[8]。在仿真过程中,设定太阳辐射强度、下垫面长波辐射强度、太阳高度角、海拔高度、防辐射罩表面涂层反射率、环境气流速度和下垫面反射率分别为1 000 W/m2,300 W/m2,45°,0 km,0.87,2 m/s和0.2,物质材料导热系数、密度和比热容分别为0.2 W/(m·K)、110 kg/m3和1 591 J/(kg·K)。基于上述参数获得自然通风防辐射罩的温度场和速度场分布图,如图2所示。

为验证温度传感器测温结果受太阳高度角影响,利用计算流体动力学方法对不同的气流速度、太阳高度角条件下温度传感器进行多物理场仿真如图3所示。由图3可知,当海拔高度为0 km,太陽辐射强度为1 000 W/m2的条件下,辐射误差随气流速度增大而减小。

2  辐射误差修正算法

由于计算流体动力学方法仅能计算有限的离散值模型,难以分析连续变化的物理量,因此若能获得任意条件下温度传感器的辐射误差修正方程,则可解决上述问题[9]。本文提出利用BP神经网络算法在海拔高度为0 km,太阳辐射强度为1 000 W/m2时的仿真结果进行拟合处理,获得辐射误差修正方程。BP神经网络结构模型如图4所示。利用Matlab进行BP神经网络训练学习,由已完成训练学习的BP神经网络预测模型,得到预测输出量即辐射误差,并将其计算公式以及模型最终权值W和阈值θ传输至微处理器中[10]。

辐射误差ΔT与气流速度V、太阳高度角R三者之间关系式为:

[ΔT=purelin{tansig(V*Wi1+R*Wi2+θi)*Wki+ak}]

式中:[Wi1,Wi2]分别是气流速度V和太阳高度角R对应的由输入层到隐含层的权值;而输入层神经元为2,输出层为1,则j=2,k=1;Wki为隐含层到输出层的权值;θi为隐含层阈值;ak为输出层阈值。

具体值如下:

[Wij=0.599 20.021 60.228 00.350 48.834 3-0.166 4-0.366 9-0.305 0,Wki=0.029 23.249 9-0.076 14.362 9]

[θi=-6.710 90.561 9-4.996 8-0.528 7,ak=0.117 9]

为验证辐射误差修正方程(1)的准确性,选取不同气流速度、太阳高度角参数值代入辐射误差修正方程,得到修正值。在相同环境条件下,利用CFD方法进行仿真,得到仿真值[11]。将修正值与仿真值进行对比,对比结果如表1所示。

根据表1对比结果可知,修正方程计算值与仿真值的均方根误差为0.05 ℃。

3  辐射误差修正软件设计

为便于研究者获得任意环境参数下的辐射误差值,本文采用C#编程语言设计了一款基于BP神经网络算法的太阳辐射误差修正软件。该软件由用户登录模块、数据管理模块、数据查询及修正模块三部分组成。

当用户登录成功后,进入主窗体。主窗体分为系统菜单栏、选项卡控件、系统状态栏三部分。通过操作主窗体可以调用各个子模块。

图5是历史数据界面,主要功能是记录历史数据。用户可按物理环境参数查询历史数据,方便用户对气象参数进行批量分析。

4  结  语

为降低太阳辐射对地面温度测量造成的影响,修正太阳辐射误差。本文应用计算流体动力学的方法对温度传感器进行模拟分析,获得任意环境参数下的辐射误差值。通过BP神经网络算法对CFD仿真结果拟合处理获得修正方程,经验证,修正值与仿真结果的均方根误差值为0.05 ℃。最后设计开发了基于C#的自然通风温度传感器太阳辐射误差修正软件,可对辐射升温量进行修正,也可对辐射误差的历史数据进行查询。这种算法与软件在气象传感器数据处理领域具有一定的潜在应用前景。

参考文献

[1] 严家德,王成刚,金莲姬,等.百叶箱和通风防辐射罩气温观测系统的数据对比与订正[J].气候与环境研究,2015,20(5):533?543.

YAN Jiade, WANG Chenggang, JIN Lianji, et al. A comparative and modification study of louvred and aspirated shield temperature systems [J]. Climatic and environmental research, 2015, 20(5): 533?543.

[2] HUBBART J A. An inexpensive alternative solar radiation shield for ambient air temperature micro?sensors [J]. Journal of natural & environmental sciences, 2011, 2(2): 9?14.

[3] QIAN Z, HU J, FENG G, et al. Characteristics of the spatiotemporal distribution of daily extreme temperature events in China: minimum temperature records in different climate states against the background of the most probable temperature [J]. Chinese physics B, 2012, 21(10): 614?621.

[4] World Meteorological Organization. Guide to meteorological instruments and methods of observation [EB/OL]. [2017?08?11]. https://max.book118.com/html/2017/0727/124725191.shtm.

[5] 宋海賓,杨平,徐立波.MEMS传感器随机误差分析及分析处理[J].传感技术学报,2013,26(12):1719?1723.

SONG Haibin, YANG Ping, XU Libo. Analysis and processing on stochastic error of MEMS sensor [J]. Chinese journal of sensors and actuators, 2013, 26(12): 1719?1723.

[6] LOPARDO G, BERTIGLIA F, CURCI S, et al. Comparative analysis of the influence of solar radiation screen ageing on temperature measurements by means of weather stations [J]. International journal of climatology, 2014, 34(4): 1297?1310.

[7] HARRISON R G, WOOD C R. Ventilation effects on humidity measurements in thermometer screens [J]. Quarterly journal of the Royal Meteorological Society, 2012, 138(665): 1114?1120.

[8] 齐月,房世波,周文佐.近50年来中国东、西部地面太阳辐射变化及其与大气环境变化的关系[J].物理学报,2015,64(8):398?407.

QI Yue, FANG Shibo, ZHOU Wenzuo. Correlative analysis between the changes of surface solar radiation and its relationship with air pollution, as well as meteorological factor in East and West China in recent 50 years [J]. Acta Physica Sinica, 2015, 64(8): 398?407.

[9] 陈友良,盛可军,王阳阳.基于ASP.NET三层结构软件的研究与开发[J].现代电子技术,2010,33(6):58?60.

CHEN Youliang, SHENG Kejun, WANG Yangyang. Research and development of three?layer architecture software based on ASP.NET [J]. Modern electronics technique, 2010, 33(6): 58?60.

[10] 田东霞,郭建侠,陈挺,等.运用CFD方法分析障碍物对风场的影响[C/OL].[2016?01?08]. http://www.docin.com/p?1419915469.html.

TIAN Dongxia, GUO Jianxia, CHEN Ting, et al. Using the CFD method to analyze the influence of obstacles on wind field [C/OL]. [2016?01?08]. http://www.docin.com/p?1419915469.html.

[11] THOMAS C K, SMOOT A R. An effective, economic, aspirated radiation shield for air temperature observations and its spatial gradients [J]. Journal of atmospheric and oceanic technology, 2013, 30(3): 526?537.

猜你喜欢

温度传感器
气象用温度传感器检定结果的测量不确定度评定与应用
几种典型温度传感器跨超音速恢复特性校准
基于CFD技术的气流温度传感器数值校准虚拟风洞初探
温度传感器DS18B20在温度计设计中的应用
一种高性能CMOS温度传感器
XTR105电流变送器在温度传感器中的应用
铂电阻温度传感器现场检定的干扰故障及处理方法
数字温度传感器DS18B20的关键时序研究
一种自组网分布式无线温度传感器的设计
温度传感器在笔记本电脑散热系统中的应用