Sensor temperature compensation system and method based on BP neural network

文档序号:1446040 发布日期:2020-02-18 浏览:25次 中文

阅读说明:本技术 一种基于bp神经网络的传感器温度补偿系统及方法 (Sensor temperature compensation system and method based on BP neural network ) 是由 伍华林 肖甲 朱顺 于 2018-08-06 设计创作,主要内容包括:本发明公开了一种基于BP神经网络的传感器温度补偿系统及方法。所述系统包括PC上位机、温度控制系统、压力控制系统、压力测量单片机系统。PC上位机,发出温度控制指令设定传感器温度;发出压力控制指令设定传感器压力,与压力测量单片机系统通讯写入参数;温度控制系统,用于测量并输出传感器温度;压力控制系统,用于测量并输出传感器压力;压力测量单片机系统,用于实时测量、记录、输出传感器压力AD值、温度AD值,进行算法处理得到与温度无关的显示压力值。本发明解决如下技术问题:采用特殊算法通过软件系统进行温度漂移的补偿,在全温区(-40℃-+120℃),传感器的温度漂移补偿指标可达到±0.1%FS,提高传感器的精度。(The invention discloses a sensor temperature compensation system and method based on a BP neural network. The system comprises a PC upper computer, a temperature control system, a pressure control system and a pressure measurement single chip microcomputer system. The PC upper computer sends a temperature control instruction to set the temperature of the sensor; sending a pressure control instruction to set the pressure of the sensor, and writing parameters in the pressure control instruction in communication with the pressure measurement singlechip system; the temperature control system is used for measuring and outputting the temperature of the sensor; a pressure control system for measuring and outputting a sensor pressure; and the pressure measurement single chip microcomputer system is used for measuring, recording and outputting the pressure AD value and the temperature AD value of the sensor in real time, and performing algorithm processing to obtain a display pressure value irrelevant to the temperature. The invention solves the following technical problems: the compensation of temperature drift is carried out by adopting a special algorithm through a software system, the temperature drift compensation index of the sensor can reach +/-0.1% FS in a full-temperature region (-40 ℃ -120 ℃), and the accuracy of the sensor is improved.)

1. A sensor temperature compensation system based on a BP neural network is characterized by comprising:

the PC upper computer (1), the PC upper computer (1) is used for sending a temperature control instruction to the temperature control system (2) and setting the temperature of the sensor; the PC upper computer (1) is used for sending a pressure control instruction to the pressure control system (3) and setting the pressure of the sensor; the PC upper computer (1) and the pressure measurement single chip microcomputer system (4) are communicated to write parameters;

the temperature control system (2), the said temperature control system (2) is used for measuring the sensor temperature, and output the sensor temperature measured to the said PC upper computer (1);

the pressure control system (3), the said pressure control system (3) is used for measuring the sensor pressure, and output the sensor pressure measured to the said PC upper computer (1);

the pressure measurement single chip microcomputer system (4) is used for measuring and recording a sensor pressure AD value in real time, and outputting the pressure AD value to the PC upper computer (1); the pressure measurement single chip microcomputer system (4) is used for measuring and recording a sensor temperature AD value in real time and outputting the temperature AD value to the PC upper computer (1); and the pressure measurement single chip microcomputer system (4) obtains a display pressure value irrelevant to temperature after algorithm processing.

2. The BP neural network-based sensor temperature compensation system according to claim 1, wherein the sensor pressure AD value and the temperature AD value are determined by a sensor temperature output by the temperature control system (2) and a sensor pressure output by the pressure control system (3).

3. A method for compensating the temperature of a sensor based on the BP neural network-based sensor temperature compensation system of claim 1, comprising the steps of:

① the PC end upper computer (1) initializes the temperature control system (2), initializes the pressure control system (3), and sets the initialization temperature T1Initial pressure P1

② starting the temperature control system (2), detecting the sensor temperature T, if the detected sensor temperature is less than the maximum temperature T of the systemmaxThe PC end upper computer (1) sends a temperature control instruction, and the temperature of the sensor is set to be Tn

③ the temperature control system (2) detects that the sensor temperature has reached a set point TnThe PC end upper computer (1) sends a pressure control instruction, and the pressure of the sensor is set to be Pn

④ the pressure control system (3) detects that the sensor pressure has reached a set point PnIf the detected sensor pressure P isnLess than the maximum pressure P of the systemmaxIf so, the pressure measurement singlechip system (4) measures and records the pressure AD value of the sensor at the moment, and outputs (1) the pressure AD value to the PC upper computer;

⑤ setting sensor P for PC upper computer (1)n+1=Pn+ a, repeating ③ - ⑤ steps;

⑥ the pressure control system (3) detects a sensor pressure greater than or equal to a system maximum pressure PmaxIf so, the PC upper computer (1) sets a sensor Tn+1=Tn+ b, the pressure measurement singlechip system (4) measures and records the temperature AD value of the sensor at the moment, outputs the temperature AD value to the PC upper computer (1), and repeats the ② - ⑥ steps;

⑦ the temperature control system (2) detects the sensor temperature if it is greater than or equal to the maximum system temperature TmaxAnd if the data acquisition of the PC end upper computer (1) is finished, calculating related parameters through an independent software system, writing the parameters into the PC end upper computer (1) and the pressure measurement single chip microcomputer system (4) in a communication manner, and processing the pressure measurement single chip microcomputer system (4) through an algorithm to obtain a display pressure value irrelevant to temperature so as to finish the correction of the temperature compensation system.

4. The method for performing sensor temperature compensation by the BP neural network-based sensor temperature compensation system according to claim 3, wherein the T is1Taking the lowest temperature T of the systemminSaid P is1Taking the lowest pressure P of the systemmin

5. The method for performing sensor temperature compensation by the BP neural network-based sensor temperature compensation system according to claim 3, wherein the value range of a is 10Kpa to 100Kpa, and the value range of b is 10 ℃ to 50 ℃.

Technical Field

The invention relates to a sensor temperature compensation system based on a BP neural network, which comprises a PC upper computer, a temperature control system, a pressure control system and a pressure measurement single chip microcomputer system.

The invention also relates to a sensor temperature compensation method based on the BP neural network.

Background

The silicon piezoresistive pressure sensor has the characteristics of high sensitivity, good dynamic response, high measurement accuracy, good stability and the like, but the output pressure of the silicon piezoresistive pressure sensor is influenced by temperature and changes due to the temperature characteristic of a semiconductor and additional pressure caused by packaging, so that the silicon piezoresistive pressure sensor needs to be subjected to temperature compensation.

The traditional silicon piezoresistive pressure sensor adopts a hardware system to compensate temperature drift, and compensates a sensor bridge circuit, and adopts the hardware compensation method, so that the temperature drift compensation index of the sensor is larger at the full temperature zone (-40 ℃ to +120 ℃), namely about +/-1% FS to +/-3% FS, and the precision of the pressure sensor is reduced.

Disclosure of Invention

In view of the above disadvantages in the prior art, the present invention is directed to a system and method for compensating a sensor temperature based on a BP neural network.

A sensor temperature compensation system based on a BP neural network comprises a PC upper computer, a temperature control system, a pressure control system and a pressure measurement single chip microcomputer system.

The PC upper computer is used for sending a temperature control instruction and setting the temperature of the sensor; the PC upper computer is used for sending a pressure control instruction and setting the pressure of the sensor; the PC upper computer is communicated with the pressure measurement singlechip system to write parameters;

the temperature control system is used for measuring the temperature of the sensor and outputting the measured temperature of the sensor to the PC upper computer;

the pressure control system is used for measuring the pressure of the sensor and outputting the measured pressure of the sensor to the PC upper computer;

the pressure measurement single chip microcomputer system is used for measuring and recording a pressure AD value of the sensor in real time and outputting the pressure AD value to the PC upper computer; the pressure measurement single chip microcomputer system is used for measuring and recording a temperature AD value of the sensor in real time and outputting the temperature AD value to the PC upper computer; and the pressure measurement single chip microcomputer system obtains a display pressure value irrelevant to the temperature through algorithm processing.

Preferably, the sensor pressure AD value and the temperature AD value are determined by a sensor temperature output by a temperature control system and a sensor pressure output by a pressure control system.

A sensor temperature compensation method based on a BP neural network comprises the following steps.

① initializing temperature control system and pressure control system of PC upper computer, setting initialization temperature T1Initial pressure P1

② the temperature control system detects the temperature of the sensor, if the detected temperature is less than the maximum temperature T of the systemmaxThe PC end upper computer sends a temperature control instruction and sets the temperature of the sensor to be Tn

③ the temperature control system detects that the sensor temperature has reached a set point TnThe PC end upper computer sends a pressure control instruction and sets the pressure of the sensor to be Pn

④ the pressure control system detects that the sensor pressure has reached a set point PnIf the detected sensor pressure P isnLess than the maximum pressure P of the systemmaxIf so, the pressure measurement singlechip system measures and records the pressure AD value of the sensor at the moment, and outputs the pressure AD value to the PC upper computer;

⑤ setting sensor P of PC upper computern+1=Pn+ a, repeating ③ - ⑤ steps;

⑥ the pressure control system detects a sensor pressure greater than or equal to a system maximum pressure PmaxAnd then PC upper computer sets sensor Tn+1=Tn+ b, repeating the ② - ⑥ steps, measuring and recording the temperature AD value of the sensor at the moment by the pressure measurement single-chip microcomputer system, and outputting the temperature AD value to the PC upper computer;

⑦ the temperature control system detects the temperature of the sensor if the detected temperature is greater than or equal to the maximum temperature T of the systemmaxIf the data acquisition of the PC end upper computer is finished, related parameters are calculated through an independent software system, the PC end upper computer and the pressure measurement single chip microcomputer system are communicated and written in the parameters, and the pressure measurement single chip microcomputer system is processed through an algorithm to obtain the data which is not consistent with the temperatureAnd (5) closing the display pressure value, and finishing the correction of the temperature compensation system.

Preferably, T is1Taking the lowest temperature T of the systemminSaid P is1Taking the lowest pressure P of the systemmin

Preferably, the value range of a is 10Kpa to 100Kpa, and the value range of b is 10 ℃ to 50 ℃.

Compared with the prior art, the invention has the beneficial effects that: the temperature drift compensation is carried out by adopting a special algorithm through a software system, the temperature drift compensation index of the sensor is lower in a full temperature zone (-40 ℃ to +120 ℃), the +/-0.1% FS can be achieved, and the precision of the pressure sensor is improved.

Drawings

Fig. 1 is a schematic diagram of a sensor temperature compensation system based on a BP neural network according to the present invention.

In the figure: 1-PC host computer, 2-temperature control system, 3-pressure control system, 4-pressure measurement singlechip system.

Fig. 2 is a schematic diagram of a sensor temperature compensation method based on a BP neural network according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.

Referring to fig. 1, a sensor temperature compensation system based on a BP neural network includes:

the PC upper computer (1), the PC upper computer (1) is used for sending a temperature control instruction to the temperature control system (2) and setting the temperature of the sensor; the PC upper computer (1) is used for sending a pressure control instruction to the pressure control system (3) and setting the pressure of the sensor; the PC upper computer (1) and the pressure measurement single chip microcomputer system (4) are communicated to write parameters;

the temperature control system (2), the said temperature control system (2) is used for measuring the sensor temperature, and output the sensor temperature measured to the said PC upper computer (1);

the pressure control system (3), the said pressure control system (3) is used for measuring the sensor pressure, and output the sensor pressure measured to the said PC upper computer (1);

the pressure measurement single chip microcomputer system (4) is used for measuring and recording a sensor pressure AD value in real time, and outputting the pressure AD value to the PC upper computer (1); the pressure measurement single chip microcomputer system (4) is used for measuring and recording a sensor temperature AD value in real time and outputting the temperature AD value to the PC upper computer (1); and the pressure measurement single chip microcomputer system (4) obtains a display pressure value irrelevant to temperature after algorithm processing.

The sensor pressure AD value and the temperature AD value are determined by the sensor temperature output by the temperature control system (2) and the sensor pressure output by the pressure control system (3).

Referring to fig. 2, a method for performing sensor temperature compensation by a sensor temperature compensation system based on a BP neural network includes the following steps:

① the PC end upper computer (1) initializes the temperature control system (2), initializes the pressure control system (3), and sets the initialization temperature T1Initial pressure P1

② starting the temperature control system (2), detecting the sensor temperature T, if the detected sensor temperature is less than the maximum temperature T of the systemmaxThe PC end upper computer (1) sends a temperature control instruction, and the temperature of the sensor is set to be Tn

③ the temperature control system (2) detects that the sensor temperature has reached a set point TnThe PC end upper computer (1) sends a pressure control instruction, and the pressure of the sensor is set to be Pn

④ the pressure control system (3) detects that the sensor pressure has reached a set point PnIf the detected sensor pressure P isnLess than the maximum pressure P of the systemmaxIf so, the pressure measurement singlechip system (4) measures and records the pressure AD value of the sensor at the moment, and outputs (1) the pressure AD value to the PC upper computer;

⑤ setting sensor P for PC upper computer (1)n+1=Pn+ a, repetition③ - ⑤;

⑥ the pressure control system (3) detects a sensor pressure greater than or equal to a system maximum pressure PmaxIf so, the PC upper computer (1) sets a sensor Tn+1=Tn+ b, the pressure measurement singlechip system (4) measures and records the temperature AD value of the sensor at the moment, outputs the temperature AD value to the PC upper computer (1), and repeats the ② - ⑥ steps;

⑦ the temperature control system (2) detects the sensor temperature if it is greater than or equal to the maximum system temperature TmaxAnd if the data acquisition of the PC end upper computer (1) is finished, calculating related parameters through an independent software system, writing the parameters into the PC end upper computer (1) and the pressure measurement single chip microcomputer system (4) in a communication manner, and processing the pressure measurement single chip microcomputer system (4) through an algorithm to obtain a display pressure value irrelevant to temperature so as to finish the correction of the temperature compensation system.

The T is1Taking the lowest temperature T of the systemminSaid P is1Taking the lowest pressure P of the systemmin

The value range of a is 10Kpa-100Kpa, and the value range of b is 10-50 ℃.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种内置混凝土结构物的无源超微功耗的形变压力传感器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类