A method and system for temperature compensation of a pressure sensor
By using a constant current source or constant pressure source temperature compensation circuit and a multi-objective particle swarm optimization algorithm, combined with two-dimensional interpolation calculation, the problems of volume and cost in pressure sensor temperature compensation are solved, and high-precision temperature compensation effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 48TH RES INST OF CHINA ELECTRONICS TECH GROUP CORP
- Filing Date
- 2023-08-31
- Publication Date
- 2026-05-19
AI Technical Summary
Existing temperature compensation technologies for pressure sensors suffer from problems such as increased sensor size and cost, the need for extensive experimental data and manpower, and unsatisfactory compensation results.
A constant current source or constant voltage source temperature compensation circuit is used in combination with a multi-objective particle swarm optimization algorithm and a two-dimensional interpolation calculation method. By optimizing the temperature compensation resistor value, thermal zero-point drift and thermal sensitivity drift are balanced, thus replacing the temperature measurement module.
This reduces the difficulty and cost of sensor miniaturization, while improving temperature compensation accuracy, avoiding local optima, and enhancing the compensation effect.
Smart Images

Figure CN117147018B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pressure measurement technology, specifically to a method and system for temperature compensation of a pressure sensor. Background Technology
[0002] Pressure sensors are among the most widely used sensors, typically consisting of a pressure-sensitive element and a signal processing unit, and are now widely used across various industries. Since pressure detection and output correction in pressure sensors rely on resistance, and temperature is a key factor affecting resistance values, temperature compensation technology is a core technology for pressure sensors.
[0003] The existing temperature compensation technologies include the following:
[0004] 1. To achieve high-precision temperature compensation in pressure sensors, existing technologies typically integrate a temperature measurement module into the sensor's signal processing unit. This temperature measurement module is essentially a temperature sensor; its introduction not only increases the sensor's size and miniaturization difficulty but also raises production costs.
[0005] 2. To achieve output correction of pressure sensors and compensate for the influence of temperature, existing technologies generally use neural network correlation algorithms as the correction algorithm. The sensor output and temperature are used as inputs to the neural network, and the ideal sensor output is used as the output. The high accuracy of this algorithm relies on a large amount of experimental data. Since the static performance of the pressure-sensitive element of each pressure sensor differs, and their susceptibility to temperature varies, a separate correction algorithm model needs to be established for each sensor. Furthermore, in the calibration experiments for sensor output and temperature, due to the temperature factor, each experiment often requires approximately 2 hours to stabilize the sensor output to ensure consistency. The large amount of experimental data, the independent correction algorithm model for each sensor, and the long experimental time mean that using neural network correlation algorithms as the sensor output correction algorithm requires significant time, manpower, and resources.
[0006] 3. The compensation resistors of pressure sensors are generally connected in parallel or series on the resistor bridge arms. Sensors have multiple temperature-related performance indicators; therefore, there are usually two or more sets of compensation resistors, each needing to be compensated separately for different temperature drift indicators. Current compensation methods are generally manual. Technicians calculate multiple temperature drift indicators under different compensation resistors based on the bridge resistance at various temperature points, and then repeatedly correct them through high and low temperature balancing. Because each temperature drift indicator is coupled to each set of compensation resistors, changing one resistor will affect multiple temperature drift indicators. Therefore, this stage of temperature compensation calculation usually consumes a lot of manpower, and the final calculation and correction result is often not the optimal compensation scheme for the sensor. Summary of the Invention
[0007] The technical problem to be solved by this invention is: in view of the technical problems existing in the prior art, this invention provides a temperature compensation method and system for a pressure sensor that reduces the difficulty of product miniaturization, lowers the sensor production cost, and improves the temperature compensation accuracy.
[0008] To solve the above-mentioned technical problems, the technical solution proposed by this invention is as follows:
[0009] A temperature compensation method for a pressure sensor is provided, which uses a constant current source temperature compensation circuit or a constant pressure source temperature compensation circuit to achieve temperature compensation, wherein the temperature compensation resistor value in the temperature compensation circuit is searched by a multi-objective particle swarm optimization algorithm.
[0010] Preferably, taking a constant current source temperature compensation circuit as an example, the compensation circuit includes a Wheatstone bridge composed of pressure-sensitive resistors R1 to R4, wherein one pair of vertices of the Wheatstone bridge constitutes a signal input terminal and the other pair of vertices constitutes a signal output terminal; wherein a temperature compensation resistor Rp1 is connected in parallel with resistor R1, a temperature compensation resistor Rp2 is connected in parallel with resistor R4, and a temperature compensation resistor Rp3 is connected in parallel with the signal input terminal; the temperature compensation resistors Rp1-Rp3 balance the thermal zero-point drift N and thermal sensitivity drift M at high and low temperature points.
[0011] Preferably, the relationship between N and M at high and low temperatures is as follows:
[0012]
[0013] The subscripts l and h represent that the parameter is in a low-temperature and high-temperature environment, respectively; R1 l R2 l R3 l R4 l These represent the resistance values of resistors R1 to R4 under low-temperature conditions; R1 h R2 h R3 h R4 h These represent the resistance values of resistors R1 to R4 under high-temperature conditions; N l and M l These represent thermal zero-point drift and thermal sensitivity drift at low temperatures, respectively; N h and M h These represent thermal zero-point drift and thermal sensitivity drift under high-temperature conditions, respectively.
[0014] Preferably, the specific process of balancing the thermal zero-point drift N and thermal sensitivity drift M at high and low temperature points using temperature compensation resistors Rp1-Rp3 is as follows:
[0015] Let the objective function be Z1(x) i Z2(x) iZ3(x) i They are respectively:
[0016]
[0017] Where n represents the number of particles in the swarm;
[0018] To ensure balance among the three objective functions, each objective value is normalized to guarantee objectivity. The normalized objective function for individual x is set as follows:
[0019]
[0020] Among them, Z max and Z min Z represents the minimum and maximum values of the objective function for all individuals in the current population, respectively; j,norm The three objective functions Z1(x) represent each particle. i Z2(x) i Z3(x) i The normalized objective function is given by , where j∈(1,2,3); after normalization, the objective value Z is... j,norm The value range is [0,1].
[0021] Preferably, the specific process of searching for the temperature compensation resistor value of the temperature compensation circuit using a multi-objective particle swarm optimization algorithm is as follows:
[0022] Assume the decision space has a particle swarm size of n, the current evolution number is t, and the position of the i-th particle in the swarm is x. i (t)=[x i,1 (t),x i,2 (t),x i,3 (t)], the velocity of the i-th particle is: gbest i (t)=[g i,1 (t),g i,2 (t),g i,3 [(t)], the historical best position of particle i is pbest i (t)=[p i,1 (t),p i,2 (t),p i,3 [(t)];After the next evolution, the velocity and position update formulas for particle i are:
[0023]
[0024] In the formula, r1 and r2 are random numbers distributed in the interval [0,1] to increase the randomness of the algorithm; v i (t) represents the velocity of particle i at time t; x i(t) represents the position of particle i at time t; c1 and c2 are acceleration constants in [0,2], used to control the learning time; ω is the inertial weight, responsible for adjusting the degree of influence of the previous velocity on the current velocity.
[0025] Preferably, after the temperature compensation circuit outputs its results, the output results are corrected using an output correction algorithm based on two-dimensional interpolation calculation.
[0026] Preferably, taking a constant current source temperature compensation circuit as an example, the current I of the constant current source temperature compensation circuit is selected. t As a temperature-dependent factor; under constant output conditions, the current I t It is only affected by the internal temperature of the sensor; to increase the sensitivity of the parameters, I... t and u out Normalization to I t,norm and u out.norm The details are as follows:
[0027]
[0028] The subscripts min and max represent the minimum and maximum values of the parameter within the specified temperature range, respectively; I t,norm and u out.norm I t and u out The normalization parameter is in the range [0,1].
[0029] Ideally, the sensor output U is unaffected by temperature and has a linear relationship with the external environmental pressure P; therefore, let the interpolation formula be:
[0030] U(p)=g(u out,norm ,I t,norm (6)
[0031] Since the linearity of the sensor output is affected by temperature, the A I values can be set according to the required temperature operating range of the sensor. t,norm The interval, and B u out,norm The interval is given, therefore the interpolation points are as follows:
[0032]
[0033] The present invention also discloses a temperature compensation system for a pressure sensor, including a temperature compensation circuit and a temperature compensation resistance value search module. The temperature compensation circuit is used to achieve temperature compensation; the temperature compensation resistance value search module is used to search for the temperature compensation resistance value of the temperature compensation circuit through a multi-objective particle swarm optimization algorithm.
[0034] Preferably, the temperature compensation circuit includes a constant current source temperature compensation circuit or a constant voltage source temperature compensation circuit.
[0035] Preferably, it also includes a correction module, which is used to correct the output result after the temperature compensation circuit outputs the result by using an output correction algorithm based on two-dimensional interpolation calculation.
[0036] Compared with the prior art, the advantages of the present invention are as follows:
[0037] This invention uses a constant current source or a constant voltage source to indirectly reflect temperature, replacing the temperature measurement module. This not only reduces the difficulty of product miniaturization but also lowers the sensor production cost. Since the value of the constant current source or constant voltage source is affected not only by the external ambient temperature but also by the internal working heat of the sensor, it can stably reflect the changes in the internal ambient temperature of the sensor.
[0038] This invention employs a multi-objective particle swarm optimization algorithm to search for temperature compensation resistors, which can reduce the significant manpower required due to the coupling between various temperature drift indicators and each compensation resistor group. Since the three resistors Rp1, Rp2, and Rp3 have different emphases in their influence on N and M, Rp1 and Rp2 have opposite effects on the drift amount, and Rp3 mainly affects thermal sensitivity drift, the multi-objective particle swarm algorithm will not result in local optima in this problem. Furthermore, manually calculating the temperature compensation resistors is often not the optimal compensation solution.
[0039] This invention presents an output correction algorithm based on two-dimensional interpolation, which is more flexible than that of neural networks. While neural network training requires a large amount of experimental data, interpolation calculation only requires a minimum of four interpolation points. Since the accuracy of interpolation calculation is related to the number of interpolation points, it allows technicians to rationally set the number of interpolation points for sensor calibration based on actual accuracy requirements. Furthermore, given sufficient interpolation data, two-dimensional interpolation calculation achieves higher accuracy than neural networks. Attached Figure Description
[0040] Figure 1 This is a diagram illustrating an embodiment of the temperature compensation system of the present invention in a specific application.
[0041] Figure 2 This is a circuit diagram of the constant current source temperature compensation circuit of the present invention in an embodiment.
[0042] Figure 3 This is a flowchart of the multi-objective particle swarm algorithm in this invention. Detailed Implementation
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0044] like Figure 1As shown, the temperature compensation method for the pressure sensor in this embodiment of the invention uses a constant current source temperature compensation circuit or a constant pressure source temperature compensation circuit to achieve temperature compensation. The temperature compensation resistor value in the temperature compensation circuit is searched by a multi-objective particle swarm optimization algorithm, and after the compensation circuit outputs the result, the output result is corrected by an output correction algorithm based on two-dimensional interpolation calculation.
[0045] like Figure 2 As shown, taking a constant current source temperature compensation circuit as an example, the constant current source temperature compensation circuit includes a Wheatstone bridge composed of pressure-sensitive resistors R1 to R4. The two ports B+ and B- of the bridge are the signal input terminals of the circuit, denoted as U. in The two ports S+ and S- are the signal output terminals of this circuit, denoted as U. out R1 to R4 form a resistance bridge for pressure-sensitive elements, used to detect pressure changes. Theoretically, the four pressure-sensitive resistors R1 to R4 should be identical, but in reality, performance differences exist, causing the bridge resistance output to not be zero at high and low temperature points, resulting in thermal zero-point drift (N) and thermal sensitivity drift (M) (Note: Refer to GJB4409A-2011 General Specification for Pressure Sensors for details). Typically, three resistors Rp1, Rp2, and Rp3 are introduced in the constant current source temperature compensation circuit to balance N and M at high and low temperature points. Specifically, Rp1 is connected in parallel with resistor R1, Rp2 is connected in parallel with resistor R4, and Rp3 is connected in parallel at the signal input terminals (B+ and B-).
[0046] Combination Figure 2 From the circuit diagram, it can be seen that, given a fixed input current and high / low temperature bridge resistance, the relationship between N and M at high and low temperatures can be analytically derived, and can be set as:
[0047]
[0048] The subscripts l and h represent that the parameter is in a low-temperature and high-temperature environment, respectively; R1 l R2 l R3 l R4 l These represent the resistance values of resistors R1 to R4 under low-temperature conditions; R1 h R2 h R3 h R4 h These represent the resistance values of resistors R1 to R4 under high-temperature conditions; N l and M l These represent thermal zero-point drift and thermal sensitivity drift at low temperatures, respectively; N h and M h These represent thermal zero-point drift and thermal sensitivity drift under high-temperature conditions, respectively.
[0049] To balance N and M at high and low temperatures, the objective function can be set as follows:
[0050]
[0051] Where n represents the number of particles in the swarm.
[0052] To ensure balance among the three objectives, each objective value needs to be normalized to guarantee objectivity. The normalized objective function for individual x is set as follows:
[0053]
[0054] Among them, Z max and Z min Z represents the minimum and maximum values of the objective function for all individuals in the current population, respectively; j,norm The three objective functions Z1(x) represent each particle. i Z2(x) i Z3(x) i The normalized objective function is given by , where j∈(1,2,3); after normalization, the objective value ranges from [0,1].
[0055] Since the three resistors Rp1, Rp2 and Rp3 have different focuses of influence on N and M, Rp1 and Rp2 have opposite effects on the drift amount, and Rp3 mainly affects the thermal sensitivity drift, the multi-objective particle swarm algorithm will not result in local optima in this problem.
[0056] Specifically, assume that in the decision space, the particle swarm size is n, the current evolution number is t, and the position of the i-th particle in the swarm is x. i (t)=[x i,1 (t),x i,2 (t),x i,3 (t)], the velocity of the i-th particle is: gbest i (t)=[g i,1 (t),g i,2 (t),g i,3 [(t)], the historical best position of particle i is pbest i (t)=[p i,1 (t),p i,2 (t),p i,3 [(t)];After the next evolution, the velocity and position update formulas for particle i are:
[0057]
[0058] In the formula, r1 and r2 are random numbers distributed in the interval [0,1] to increase the randomness of the algorithm; v i(t) represents the velocity of particle i at time t; x i (t) represents the position of particle i at time t; c1 and c2 are acceleration constants in [0,2], used to control the learning time; ω is the inertial weight, responsible for adjusting the degree of influence of the previous velocity on the current velocity.
[0059] like Figure 3 As shown, the specific process of the multi-objective particle swarm optimization algorithm is as follows:
[0060] Initialize particle swarm position P t Calculate the objective function value and set the initial number of generations t = 1;
[0061] Pbest = Pt, obtain the external archive Archive;
[0062] Select the particle with the highest crowding density from the Archive as the Gbest based on the roulette wheel betting strategy;
[0063] Perform the operation to obtain the next generation particle swarm P. t+1 ;
[0064] Merge historical archives and P t+1 From this, a new Archive is obtained;
[0065] and particle swarm P t+1 Perform a comparison of dominance relationships and update Pbest;
[0066] How do we determine if t has reached the predetermined maximum number of iterations or if it has met the convergence condition?
[0067] If so, output the external archive Archive; otherwise, at t=t+1, reselect the particle with the highest crowding density from the Archive as Gbest according to the roulette wheel strategy, and execute the subsequent steps.
[0068] The output correction algorithm based on two-dimensional interpolation is mainly used to correct the output u of the sensor after temperature compensation. out External ambient temperature and heat generated inside the sensor can cause the sensor's output to deviate from the ideal output, and will also affect the constant current source current and constant voltage source voltage.
[0069] Taking a constant current source circuit as an example, the current parameter I of the constant current source circuit is selected. t As a temperature-dependent factor, under constant output conditions, the constant current source current I... t It is only affected by the internal temperature of the sensor. To increase the sensitivity of the parameters, I... t and u out Normalization to I tnorm and u out.norm The details are as follows:
[0070]
[0071] The subscripts min and max represent the minimum and maximum values of the parameter within the specified temperature range, respectively; I t,norm and u out.norm I t and u out The normalization parameter is in the range [0,1].
[0072] Ideally, the sensor output U is unaffected by temperature and has a linear relationship with the external environmental pressure P. Therefore, the interpolation formula can be set as follows:
[0073] U(p)=g(u out,norm ,I t,norm (6)
[0074] Since the linearity of the sensor output is affected by temperature, the A I values can be set according to the required temperature operating range of the sensor. t,norm The interval, and B u out,norm Given the interval, the interpolation points can be obtained as follows:
[0075]
[0076] This invention uses a constant current source or a constant voltage source to indirectly reflect temperature, replacing the temperature measurement module. This not only reduces the difficulty of product miniaturization but also lowers the sensor production cost. Since the value of the constant current source or constant voltage source is affected not only by the external ambient temperature but also by the internal working heat of the sensor, it can stably reflect the changes in the internal ambient temperature of the sensor.
[0077] This invention employs a multi-objective particle swarm optimization algorithm to search for temperature compensation resistors, which reduces the difficulty of temperature compensation caused by the coupling between various temperature drift indicators and the various compensation resistor groups. Since the three resistors Rp1, Rp2, and Rp3 have different emphases in their influence on N and M, Rp1 and Rp2 have opposite effects on the drift amount, and Rp3 mainly affects thermal sensitivity drift, the multi-objective particle swarm algorithm will not result in local optima in this problem. Furthermore, manually calculating the temperature compensation resistors is often not the optimal compensation solution.
[0078] This invention presents an output correction algorithm based on two-dimensional interpolation, which is more flexible than that of neural networks. While neural network training requires a large amount of experimental data, interpolation calculation only requires a minimum of four interpolation points. Since the accuracy of interpolation calculation is related to the number of interpolation points, it allows technicians to rationally set the number of interpolation points for sensor calibration based on actual accuracy requirements. Furthermore, given sufficient interpolation data, two-dimensional interpolation calculation achieves higher accuracy than neural networks.
[0079] This invention also provides a temperature compensation system for a pressure sensor, including a temperature compensation circuit and a temperature compensation resistor value search module. The temperature compensation circuit is used to achieve temperature compensation; the temperature compensation resistor value search module is used to search for the temperature compensation resistor value in the temperature compensation circuit using a multi-objective particle swarm optimization algorithm. The temperature compensation circuit may be a constant current source temperature compensation circuit or a constant voltage source temperature compensation circuit.
[0080] Furthermore, it also includes a correction module, which is used to correct the output result after the temperature compensation circuit outputs the result by using an output correction algorithm based on two-dimensional interpolation calculation.
[0081] The temperature compensation system for the pressure sensor of the present invention, corresponding to the temperature compensation method described above, also has the advantages described above.
[0082] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A temperature compensation method for a pressure sensor, characterized in that, Temperature compensation is achieved using a temperature compensation circuit, wherein the temperature compensation resistor value in the temperature compensation circuit is searched using a multi-objective particle swarm optimization algorithm. The temperature compensation circuit includes a Wheatstone bridge composed of pressure-sensitive resistors R1 to R4, wherein one pair of vertices of the Wheatstone bridge constitutes the signal input terminal and the other pair of vertices constitutes the signal output terminal; a temperature compensation resistor Rp1 is connected in parallel with resistor R1, a temperature compensation resistor Rp2 is connected in parallel with resistor R4, and a temperature compensation resistor Rp3 is connected in parallel with the signal input terminal; the temperature compensation resistors Rp1-Rp3 balance the thermal zero-point drift N and thermal sensitivity drift M at high and low temperature points; The relationship between N and M at high and low temperatures is as follows: (1) The subscripts l and h represent that the parameter is in a low temperature and a high temperature environment, respectively; These represent the resistance values of resistors R1 to R4 under low-temperature conditions. These represent the resistance values of resistors R1 to R4 under high-temperature conditions; and These represent thermal zero-point drift and thermal sensitivity drift under low-temperature conditions, respectively. and These represent thermal zero-point drift and thermal sensitivity drift under high-temperature conditions, respectively. The specific process of balancing the thermal zero-point drift N and thermal sensitivity drift M at high and low temperatures using temperature compensation resistors Rp1-Rp3 is as follows: Let the objective function be... , , They are respectively: (2) in n Represents the number of particles in the swarm; To ensure balance among the three objective functions, each objective value is normalized to guarantee objectivity; individual x The normalized objective function is set as follows: (3) Among them, Z max and Z min Z represents the minimum and maximum values of the objective function for all individuals in the current population, respectively; j,norm Three objective functions representing each particle , , The normalized objective function, where j ∈ (1,2,3); After normalization, the target value ranges from [0,1]; The specific process of searching for the temperature compensation resistor value of the constant current source temperature compensation circuit using the multi-objective particle swarm optimization algorithm is as follows: Assume the particle swarm size in the decision space is... n The current number of evolutions is t The first in the population i The position of each particle is , No. i The velocity of each particle is: ,particle i The best historical position is ;particle i After the next evolution, the formulas for updating speed and position are: (4) In the formula, and These are random numbers distributed in the interval [0,1] to increase the randomness of the algorithm; For particles i At t The speed of time; For particles i Position at time t; and ω is the acceleration constant in [0,2], used to control the learning time; ω is the inertial weight, responsible for adjusting the degree of influence of the previous velocity on the current velocity.
2. The temperature compensation method for a pressure sensor according to claim 1, characterized in that, After the temperature compensation circuit outputs its results, the output results are corrected using an output correction algorithm based on two-dimensional interpolation.
3. The temperature compensation method for a pressure sensor according to claim 2, characterized in that, Taking a constant current source temperature compensation circuit as an example, the current of the constant current source temperature compensation circuit is selected. As a temperature-dependent factor; under constant output conditions, the current It is only affected by the internal temperature of the sensor; to increase the sensitivity of the parameters, and Normalization processing and The details are as follows: (5) The subscripts min and max represent the minimum and maximum values of the parameter within the specified temperature range, respectively. and They are respectively and The normalization parameter has a range of . ; Ideal sensor output Unaffected by temperature, and unaffected by external environmental pressure There exists a linear relationship; therefore, let the interpolation formula be: (6) Since the linearity of the sensor output is affected by temperature, it can be set according to the required temperature operating range of the sensor. A indivual interval, and B indivual The interval is given, therefore the interpolation points are as follows: (7)。 4. A temperature compensation system for a pressure sensor, used to perform the steps of the temperature compensation method for a pressure sensor as described in any one of claims 1-3, characterized in that, It includes a temperature compensation circuit and a temperature compensation resistor value search module. The temperature compensation circuit is used to achieve temperature compensation. The temperature compensation resistor value search module is used to search for the temperature compensation resistor value of the temperature compensation circuit through a multi-objective particle swarm optimization algorithm.
5. The temperature compensation system for the pressure sensor according to claim 4, characterized in that, The temperature compensation circuit includes a constant current source temperature compensation circuit or a constant voltage source temperature compensation circuit.
6. The temperature compensation system for the pressure sensor according to claim 4 or 5, characterized in that, It also includes a correction module, which is used to correct the output result after the temperature compensation circuit outputs the result by using an output correction algorithm based on two-dimensional interpolation calculation.