APP下载

Temperature Compensation Algorithm Based on Least Squares Curve Fitting in Flow Measurement*

2016-09-09SHAOXianheLUZhichengWANGZhuHarbinInstituteofTechnologyatWeihaiSchoolofInformationandElectricalEngineeringWeihaiShandong264209China

传感技术学报 2016年6期

SHAO Xianhe,LU Zhicheng,WANG Zhu(Harbin Institute of Technology at Weihai,School of Information and Electrical Engineering,Weihai Shandong 264209,China)



Temperature Compensation Algorithm Based on Least Squares Curve Fitting in Flow Measurement*

SHAO Xianhe*,LU Zhicheng,WANG Zhu
(Harbin Institute of Technology at Weihai,School of Information and Electrical Engineering,Weihai Shandong 264209,China)

There are serious non-linear errors in flow measurement of ultrasonic heat meter utilizing time difference method.This paper gives detailed calculation and analysis to explain that the errors are caused by the changes of flu⁃id temperature.To solve this problem,a temperature compensation algorithm based on least squares curve fitting is proposed.Temperature compensation is realized through establishing a non-linear mapping model between flow rate and fluid temperature.However,each meter has different metrological properties.So this paper puts forward an er⁃ror second-order correction algorithm further.The error of flow rate at current temperature is calculated according to the errors at two adjacent temperature spots and variable weight.The flow measurement global optimization is real⁃ized by second-order correction.Experimental verification showed that flow measurement error was between±2.0%. So this algorithm has definite value to engineering application.

ultrasonic heat meter;flow measurement;temperature compensation;least squares surface fitting;error correction

时差法超声波式热量表是通过测量超声波顺、逆两向的时间差计算流量,然后代入焓差法或K系数法公式计算出热量[1]。流量计量的精确度直接决定着热量计量的精确度[2]。超声波式热量表通常工作在30℃~80℃的环境下。而超声波在水中的传播速度随温度呈非线性变化,从而给流量计量带来非线性误差。因此,在用超声波进行流量计量时,必须要考虑温度对超声波传播速度的影响。同时,温度变化还会对管道内流体的流动形态产生影响。目前,超声波式热量表多采用查表法进行温度补偿。查表法速度快,但是数据量大,对单片机的存储容量要求高,而且只能实现局部最优。文献[3]通过建模仿真和现场实验,提出了基于BP神经网络的温度补偿算法,补偿效果较好,但是选取的样本点(温度和流量)少,而且没有考虑超声波式热量表自身计量特性的差异,不能进行二次修正,因此不适合在实际生产中推广应用。

针对上述问题,通过分析温度对时差法流量计量精确度的影响,提出了基于最小二乘曲面拟合的温度补偿算法和多温度点误差二次修正算法,不仅实现了对流量计量的温度补偿,而且可以对温度补偿后的每块超声波式热量表进行误差二次修正,提高了流量计量的精确度和稳定性,可在工业生产中推广应用。

1 时差法超声波式热量表流量计量误差分析

1.1时差法流量测量原理

U型声道时差法流量测量管道结构如图1所示[4]。

图1 U型声道时差法流量测量原理示意图

登录APP查看全文