Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a temperature and pressure composite sensor pressure output correction method, device, medium and product with low cost, high accuracy and strong universality.
In order to solve the technical problems, the invention adopts the following technical scheme:
a temperature and pressure compound sensor pressure output correction method comprises the following steps:
step 1, extracting a bridge arm resistance temperature change factor;
monitoring the resistance change of bridge arm resistance in a temperature compensation circuit, and obtaining the temperature change rate of the resistance of each bridge arm resistance relative to the resistance of a reference state according to the functional relation between the pressure and the resistance of the bridge arm resistance, thereby obtaining the temperature change factor reflecting the environmental temperature condition of the sensor internal circuit;
step 2, pressure output correction based on thermal hysteresis effect;
and decoupling the temperature change factor by using a neural network model to obtain the working temperature of an internal circuit of the sensor, and generating an output error for correcting the temperature change according to the working temperature of the internal circuit and the external temperature of the sensor so as to correct the pressure output of the sensor.
In the step 1, the bridge arm is a Wheatstone bridge formed by resistors R1-R4, the resistance values of the resistors R1-R4 are related to the input pressure of the external environment and the temperature of the internal circuit environment, one pair of vertexes of the Wheatstone bridge form a signal input end, the other pair of vertexes form a signal output end, a temperature compensation resistor Rp1 is connected in parallel with the resistor R1, a temperature compensation resistor Rp2 is connected in parallel with the resistor R4, a temperature compensation resistor Rp3 is connected in parallel with the signal input end, the temperature compensation resistor Rp1/Rp2 is used for compensating the thermal zero drift of the pressure sensitive core, and the temperature compensation resistor Rp3 is used for compensating the thermal sensitivity drift of the pressure sensitive core.
As a further improvement of the method, the resistance value of the R1/R3 bridge arm is increased and the resistance value of the R2/R4 bridge arm is reduced when pressurizing.
As a further improvement of the method of the present invention, in the step 1, the temperature change factor is calculated by using the following formula:
,
Wherein, TR represents a temperature change factor of the temperature compensation circuit, TRn represents respective temperature change factors of the four bridge arm resistances, rn represents a resistance value of the bridge arm resistances, rnmin represents a minimum value of the bridge arm resistance values, and Rnmax represents a maximum value of the bridge arm resistance values.
In the step 2, the method further comprises offline training of the neural network model, and the offline training method comprises the following steps:
step 201, data acquisition;
Under the condition that the temperature of the internal environment and the external environment of the sensor are stable, acquiring expected output, the external temperature, a temperature change factor and original output of the sensor at different stable temperature points to obtain offline training set data of the sensor in a steady-state environment;
when the internal and external environment temperatures of the sensor are inconsistent and unstable, acquiring expected output of the sensor, the external temperature, a temperature change factor and original output of the sensor to obtain offline training set data of the sensor in a dynamic environment;
Step 202, model training;
and training the neural network model by using the offline training set data of the sensor in the steady-state environment and the offline training set data of the sensor in the dynamic environment, so that the neural network model learns the nonlinear relation between the temperature change factor and the sensor output.
The method is further improved by inputting the external temperature, the temperature change factor and the original output of the sensor acquired in real time into a trained neural network model to obtain the output error of the sensor under the current temperature condition, and correcting the original output of the sensor according to the output error to obtain corrected pressure output.
The invention also provides a pressure output correction device of the temperature and pressure compound sensor, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the processor is used for executing the computer program to execute the pressure output correction method of the temperature and pressure compound sensor.
The present invention also provides a computer readable storage medium having stored therein a computer program/instruction programmed or configured to perform the temperature and pressure compound sensor pressure output correction method by a processor.
The present invention also provides a computer program product comprising a computer program/instruction programmed or configured to perform the temperature and pressure compound sensor pressure output correction method by a processor.
Compared with the prior art, the invention has the advantages that:
According to the invention, the temperature change factor of the bridge arm resistance is designed through the relation among the pressure, the temperature and the resistance value in the bridge arm circuit of the pressure-sensitive core body. Based on neural network models trained by different internal and external temperature and pressure calibration points, under the condition of acquiring external temperature and temperature change factors of the sensor, the pressure output of the original sensor can be calibrated, and the thermal hysteresis effect caused by inconsistent internal and external temperature of the sensor is reduced, so that the accuracy and stability of measurement are improved, and the high accuracy and stability of the sensor under various temperature change conditions are ensured. Because the temperature and pressure composite sensor of the same model has almost consistent temperature field effect characteristics and internal bridge arm resistance change characteristics, the method does not need to calibrate and train each sensor, has strong universality, accords with the trend of the modern sensing technology towards intelligent development, and has higher practical value and technical prospective.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The influence of temperature on the output parameters of the pressure signals of the sensor mainly comprises thermal zero drift, thermal sensitivity drift and thermal hysteresis effect of the sensor, and the thermal hysteresis effect is a dynamic effect of temperature change of the pressure-sensitive core and is influenced by the direction and speed of the temperature change, different from the two static output influences of the thermal zero drift and the thermal sensitivity drift. According to the technical scheme, not only are the thermal zero drift and the thermal sensitivity drift considered, but also the influence of thermal hysteresis effect on the pressure output of the sensor is effectively solved. The invention relates to a temperature-pressure composite sensor pressure output correction method, which comprises a temperature change factor extraction method based on the internal temperature of a sensor and a temperature-pressure composite sensor pressure output correction method considering the thermal hysteresis effect, and the detailed scheme is as follows:
as shown in fig. 1, the pressure output correction method of the temperature and pressure composite sensor of the embodiment includes the following steps:
step 1, extracting a bridge arm resistance temperature change factor;
Monitoring the resistance change of each bridge arm in the temperature compensation circuit, and obtaining the temperature change rate of the resistance of each bridge arm relative to the resistance of the reference state according to the change relation between the pressure and the resistance of the bridge arm resistance, thereby obtaining a temperature change factor reflecting the environmental temperature condition of the sensor internal circuit;
As shown in FIG. 2, in this embodiment, the bridge arm of the pressure sensitive core is a Wheatstone bridge formed by resistors R1-R4, the resistance of the resistors R1-R4 is related to the input pressure of the external environment and the temperature of the internal circuit environment, one pair of vertexes of the Wheatstone bridge form a signal input end, and the other pair of vertexes form a signal output end, wherein a temperature compensation resistor Rp1 is connected in parallel to the resistor R1, a temperature compensation resistor Rp2 is connected in parallel to the resistor R4, a temperature compensation resistor Rp3 is connected in parallel to the signal input end, the temperature compensation resistor Rp1/Rp2 is used for compensating the thermal zero drift of the pressure sensitive core, the temperature compensation resistor Rp3 is used for compensating the thermal sensitivity drift of the pressure sensitive core, and the temperature compensation resistor Rp1/Rp2/Rp3 cannot influence the thermal hysteresis effect of the pressure sensitive core.
In this embodiment, the resistance of the R1/R3 arm increases and the resistance of the R2/R4 arm decreases during pressurization.
Specifically, in normal measurement work of the sensor pressure, main factors influencing resistance values of four bridge arm resistors of the temperature compensation circuit are ambient pressure and temperature, so that the resistance value ranges of the four bridge arm resistors can be determined when the pressure measurement range and the working temperature range of the sensor are given. When the sensor is pressurized, the change modes of the resistances of four bridge arms of the temperature compensation circuit can be divided into two types, the resistance becomes smaller when R1 and R3 are pressurized, and the resistance becomes larger when R2 and R4 are pressurized, and the change directions of the resistances R1, R3, R2 and R4 and the external pressure are opposite, so that the calculation process of the temperature change factors of the bridge arms is required to be calculated from two directions respectively for ensuring consistency, and finally the temperature change factors TR of the temperature compensation circuit are calculated in an average and summarized mode.
In this embodiment, the temperature change rate is calculated using the following formula:
,
Wherein, TR represents a temperature change factor of the temperature compensation circuit, TRn represents respective temperature change factors of the four bridge arm resistances, rn represents a resistance value of the bridge arm resistances, rnmin represents a minimum value of the bridge arm resistance values, and Rnmax represents a maximum value of the bridge arm resistance values.
Step 2, pressure output correction based on thermal hysteresis effect;
Based on the neural network model trained by different internal and external temperature and pressure calibration points, the corrected pressure sensor output can be obtained through the sensor external temperature, the temperature change factor and the sensor original output, and the thermal hysteresis effect caused by inconsistent internal and external temperature of the sensor is reduced.
Specifically, according to the calculation process of the temperature change factor TR, the magnitude of TR is mainly related to the working temperature and the measured pressure of the internal circuit of the sensor, so that when the measured pressure is roughly known, the working temperature of the internal circuit of the sensor can be reflected by TR in the training process of the neural network. The thermal hysteresis effect is mainly related to the internal and external temperature change of the sensor, namely, the influence of two parameters of the internal and external temperature on the output of the sensor is considered in the output correction link, so that the thermal hysteresis effect can be reduced.
In this embodiment, the method further includes offline training the neural network model, where the offline training method includes:
step 201, data acquisition;
Under the condition that the temperature of the internal environment and the external environment of the sensor are stable, acquiring expected output, the external temperature, a temperature change factor and original output of the sensor at different stable temperature points to obtain offline training set data of the sensor in a steady-state environment;
when the internal and external environment temperatures of the sensor are inconsistent and unstable, the expected output of the sensor, the external temperature, the temperature change factor and the original output of the sensor are obtained, so that offline training set data of the sensor in a dynamic environment is obtained.
In a specific application embodiment, the sensor dataset needs to be acquired through two modes of static temperature and pressure calibration and dynamic temperature and pressure monitoring. As shown in fig. 3 (a), when the static temperature and pressure are calibrated to be stable in the internal and external environment of the sensor, the expected output Vf, the external temperature T Outer part, the temperature change factor TR and the original output Vo of the sensor are determined at different stable temperatures, so as to collect the offline training set data of the sensor in the steady-state environment, and mainly compensate the temperature performance of the sensor in the static environment. As shown in fig. 3 (b), the dynamic temperature and pressure monitoring is that the sensor is in a temperature raising and reducing stage, the internal and external environment temperatures are inconsistent, and the expected output Vf, the external temperature T Outer part, the temperature change factor TR and the original output Vo of the sensor are determined under the unstable internal and external temperatures of the sensor, so as to collect the offline training set data of the sensor in the dynamic environment, and mainly compensate the thermal hysteresis performance of the sensor in the dynamic environment.
In the embodiment, the external temperature parameter and the internal bridge resistance data of the pressure sensor acquired by the temperature-pressure composite sensor are reasonably utilized, so that the thermal hysteresis effect of the sensor is reduced. Because of the bridging resistance of the pressure sensor during production, data is inherently collected during production. Therefore, the method does not increase the workload of the sensor production process due to the heat reduction hysteresis effect.
Step 202, model training;
And training the neural network model by using the offline training set data of the sensor in the steady-state environment and the offline training set data of the sensor in the dynamic environment, so that the neural network model learns the nonlinear relation between the temperature change factor and the sensor output.
In a specific application embodiment, the pressure measurement performance of the temperature-pressure composite sensor mainly depends on the manufacturing process of the pressure-sensitive core body, including film coating, oil filling, welding, film stamping and the like. The core body manufactured by the same production line and the same process route generally has consistency in bridge arm resistance and thermal hysteresis performance. Therefore, for the same pressure-sensitive core, the neural network parameters which can adapt to the same pressure-sensitive core can be obtained by acquiring a few pressure-sensitive core data for offline training through the method, and the temperature compensation, including the thermal hysteresis effect, can be carried out for most of the pressure-sensitive cores at the same time, so that the manpower and material resources can be greatly reduced.
As shown in fig. 4, in this embodiment, the external temperature, the temperature change factor and the sensor raw output acquired in real time are input into a trained neural network model to obtain the corrected pressure output of the sensor under the current temperature condition.
The embodiment also provides a pressure output correction device of the temperature-pressure composite sensor, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the processor is used for executing the computer program to execute the pressure output correction method of the temperature-pressure composite sensor.
As shown in fig. 5, the pressure output correction device of the temperature and pressure composite sensor of the present embodiment further includes:
the pressure sensitive module is used for converting a pressure signal in an external environment into an electric signal;
the temperature change factor extraction module is used for monitoring and extracting the influence of temperature fluctuation on the performance of the sensor;
The temperature change factor extraction module generally detects the temperature of the surrounding environment and the inside of the sensor by using a temperature sensor, and calculates a temperature change factor based on the data, wherein the temperature change factor reflects the influence of the temperature on the output of the pressure sensitive element and is the basis for subsequent correction;
and the output correction module is used for adjusting the original pressure signal output according to the temperature change factor so as to eliminate errors caused by temperature change.
The present embodiment also provides a computer readable storage medium having stored therein a computer program/instruction programmed or configured to perform a temperature and pressure compound sensor pressure output correction method by a processor.
The present embodiment also provides a computer program product comprising a computer program/instructions programmed or configured to perform a temperature and pressure compound sensor pressure output correction method by a processor.
It will be appreciated by those skilled in the art that the above-described embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. The foregoing is merely a preferred embodiment of the present application and is not intended to limit the present application in any way. While the application has been described with reference to preferred embodiments, it is not intended to be limiting. Therefore, any simple modification, equivalent variation and modification of the above embodiments according to the technical substance of the present application shall fall within the scope of the technical solution of the present application.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the present invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be within the scope of the present invention.