Piezoresistive sensor dynamic temperature compensation method based on thermal impedance analysis and IHHO algorithm
Through the dynamic temperature compensation method based on thermal impedance analysis and IHHO algorithm, the problem of poor temperature compensation effect of piezoresistive pressure sensor in dynamic environment is solved, and high-precision temperature compensation and measurement result correction are achieved.
Patent Information
- Application Number
- CN202510458858.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The piezoresistive pressure sensor has poor temperature compensation effect in dynamic environments, resulting in an increase in measurement error.
The dynamic temperature compensation method based on thermal impedance analysis and improved Harris Hawk optimization algorithm (IHHO) was adopted to obtain the parameter identification model for temperature compensation by constructing a transient thermal impedance network and surface fitting polynomial.
It significantly improves the measurement accuracy of the piezoresistive sensor in complex environments and the temperature compensation effect in dynamic environments, effectively eliminating temperature drift errors.
Smart Images

Figure CN119984622A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of piezoresistive pressure sensors, and in particular to a piezoresistive sensor dynamic temperature compensation method based on thermal impedance analysis and IHHO algorithm. Background Art
[0002] In industrial environments, accurate detection of pressure signals is crucial. Pressure sensors convert pressure signals into voltage signals for output, and are therefore widely used in industrial production and aerospace. According to different measurement principles, pressure sensors are mainly divided into different categories, such as piezoresistive, piezoelectric, capacitive, and resonant. Piezoresistive pressure sensors are widely used due to their high precision, high linearity, and fast response. However, due to the inherent characteristics of silicon devices, piezoresistive pressure sensors are susceptible to temperature influences and produce measurement errors, which are called temperature drift. In order to improve measurement accuracy, temperature compensation must be performed.
[0003] The temperature compensation methods of pressure sensors mainly include hardware compensation and software compensation. The hardware compensation method corrects temperature drift through hardware circuits, but the characteristics of the compensation element are difficult to keep consistent with the temperature characteristics of the varistor. Therefore, the hardware compensation method performs poorly over a wide temperature range. The software compensation method corrects the sensor output through an algorithm in the back-end circuit or host computer. The current software compensation method can achieve excellent static temperature compensation effects, but in the process of dynamic changes in ambient temperature, most temperature compensation methods perform poorly due to the thermal inertia of the pressure sensor itself. Summary of the invention
[0004] The present invention provides a dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and an IHHO algorithm, so as to overcome the problem that the temperature compensation effect of the current piezoresistive pressure sensor is poor in a dynamic environment.
[0005] In order to achieve the above object, the technical solution of the present invention is: A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm specifically includes the following steps: S1: Construct a transient thermal impedance network during the heat transfer process of the piezoresistive sensor, and obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature based on the transient thermal impedance network; S2: construct a surface fitting polynomial containing unknown polynomial coefficients; The surface fitting polynomial is used to correct the output signal of the piezoresistive sensor in combination with the temperature drift characteristics of the piezoresistive sensor, thereby realizing temperature compensation; S3: Obtain calibration data of the piezoresistive sensor; The calibration data is the output voltage of the piezoresistive sensor when different input pressures are applied after the temperature of the piezoresistive chip reaches the same temperature as the ambient temperature; The input pressure value, the output voltage and the temperature of the piezoresistive chip are used as the first data training set; Based on the IHHO algorithm, unknown polynomial coefficients in the surface fitting polynomial are trained and obtained according to the first data training set to obtain an optimized surface fitting polynomial; S4: Obtain thermal characteristic calibration data of the piezoresistive sensor; The thermal characteristic calibration data is a data curve of the ambient temperature changing with time and a data curve of the pressure sensor output voltage changing with time, while keeping the input pressure unchanged; Based on the optimized surface fitting polynomial, the temperature data curve of the piezoresistive chip is obtained according to the thermal characteristic calibration data, and the data curve of the ambient temperature changing with time and the temperature data curve of the piezoresistive chip are used as the second data training set; S5: Based on the parameter identification model and in combination with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then dynamic temperature compensation of the piezoresistive sensor is realized through the temperature compensation model.
[0006] Furthermore, the transient thermal impedance network of the piezoresistive sensor during heat transfer constructed in S1 includes a sequentially connected external environment heat source, a thermal resistance-thermal impedance module during the piezoresistive sensor heat transfer process, and a power source for the self-heating power loss of the piezoresistive chip. ; and the thermal resistance-thermal reactance module includes a first thermal resistance , the second thermal resistance , the third thermal resistance And the fourth thermal resistance , first heat capacity , the second heat capacity , the third heat capacity And the fourth heat capacity The first thermal resistance One end of the thermal resistor is connected to one end of the external environment heat source. The other end of the first heat One end and the second thermal resistance One end of the second thermal resistor The other end of the second heat One end and the third thermal resistance One end of the third thermal resistor The other end of the third heat One end and the fourth thermal resistance One end of the fourth thermal resistor The other end of the power source One end and the fourth heat capacity and the power source The other end of the first heat capacity The other end, the second heat capacity The other end of the third heat capacity The other end of the fourth heat capacity The other end of the heat source and the other end of the external environment are connected and grounded.
[0007] Furthermore, the method for obtaining a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature based on the transient thermal impedance network in S1 includes the following steps: S11: Obtain the network model of the transient thermal impedance network in the heat transfer process of the piezoresistive sensor. The expression of the network model is: (1) , Where: express The temperature of the piezoresistive chip at all times; Indicates the temperature of the piezoresistive chip; express The ambient temperature of the pressure sensor at all times; Indicates the ambient temperature of the pressure sensor; Indicates the intermediate parameter; Respectively represent Thermal resistance and thermal reactance of the first-order transient thermal impedance network; Represents time parameters; S12: Setting intermediate variables and , according to the intermediate variable The network model of the transient thermal impedance network is simplified to obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature; And the expression of the parameter identification model is (2) (3) Where: Represents the convolution operation; and represents the convolution kernel parameters, i.e. the parameters to be identified in the parameter identification model, and , ; S2: construct a surface fitting polynomial containing unknown polynomial coefficients; The surface fitting polynomial is used to correct the output signal of the piezoresistive sensor in combination with the temperature drift characteristics of the piezoresistive sensor, thereby realizing temperature compensation; In this embodiment, based on the analysis of the temperature drift of the pressure sensor, it can be known that the output voltage of the pressure sensor is determined by the input pressure and the chip temperature, so a surface fitting polynomial for correcting the sensor output is proposed; specifically, the constructed surface fitting polynomial containing unknown polynomial coefficients is: (4) (5) Where: Indicates the pressure of the piezoresistive sensor of Power; Represents the output voltage of the piezoresistive sensor of Power; Indicates the temperature of the piezoresistive chip of Power; and Represents the unknown polynomial coefficients in the surface fitting polynomial.
[0008] S3: Obtain calibration data of the piezoresistive sensor; The calibration data is obtained by uniformly sampling several temperatures within the operating temperature range of the pressure sensor, and leaving the pressure sensor at each temperature for more than 30 minutes until the working state of the pressure sensor reaches a thermal steady state, that is, the temperature of the piezoresistive chip With ambient temperature After reaching agreement, measure the piezoresistive sensor applying different input pressures Output voltage at , and record it as the calibration data of the pressure sensor; The input pressure value, the output voltage and the temperature of the piezoresistive chip are used as the first data training set; In a specific embodiment, a method for obtaining an IHHO algorithm is included, such as Figure 4 As shown, the IHHO algorithm is obtained by improving the HHO algorithm. In this embodiment, the IHHO algorithm introduces dynamic factors (such as attenuation factors) based on the original HHO algorithm. , Momentum Factor , Balance Factor etc.), so that the algorithm’s search strategy can change according to the passage of time or specific conditions, thereby improving the algorithm’s flexibility and optimization effect; The improved IHHO algorithm consists of two basic stages: exploration and development. S100: Initialize the hyperparameters of the IHHO algorithm and the positions of the individuals in the Harris Hawk population; S101: By introducing a decay factor, the prey escape energy in the IHHO algorithm is obtained to determine the hawk hunting strategy, that is, the IHHO algorithm is based on the prey's escape energy. The absolute value of Determine hunting strategy; And the improved prey escape energy The expression is (6) Where: represents the initial escape energy and changes randomly in the range of [-1,1] at each iteration; Indicates the current iteration number; Indicates the maximum number of iterations; represents the attenuation factor; The eagle hunting strategy: confirming the prey's escape energy The absolute value of |E|; like , then the Harris Hawk group in the IHHO algorithm enters the exploration phase and executes step S102; like , then the Harris Hawk group in the IHHO algorithm enters the development phase and executes step S103; S102: In this embodiment, the Harris hawk performs global exploration according to the position of the prey or the hawk group, constructs a position update mechanism by introducing a balance factor, and updates the position of the Harris hawk group according to the position update mechanism, obtains a new Harris hawk group and continues to execute step S104; And the location update mechanism constructed is (7) (8) Where: Respectively, Harris Hawk is in the The iteration and The position after iterations; Indicates The position of a random eagle in the eagle group after iterations; Indicates The average position of all eagles after iterations; Indicates The position of the prey after iterations; , Represents a random value uniformly distributed in the range [0,1]; Represent the variables to be optimized The upper and lower limits of represents the balance factor; S103: Based on the probability of prey escape Combined prey escape energy Constructing an attack strategy of the Harris hawk and updating the position of the Harris hawk group according to the attack strategy, obtaining a new Harris hawk group and continuing to execute step S104; And the offensive strategy is specifically: when and , Harris Hawks adopt the soft siege strategy to update the position, and the soft siege strategy is (9) , Where: Indicates the prey's jumping intensity; Represents a random number in the range [0,1]; when and , Harris hawks adopt a tough siege strategy to update their positions, and the tough siege strategy is (10) when and , Harris Hawks adopt a gradual dive soft siege strategy to update their positions, and the gradual dive soft siege strategy is (11) (12) (13) Where: express Random vectors; express function; Indicates the variable to be optimized The number of represents the fitness value of the individual position in the Harris hawk group; when and , Harris hawks adopt a progressive dive tough siege strategy to update their positions, and the progressive dive tough siege strategy is (14) (15) (16) S104: Introducing momentum factor into IHHO algorithm , and after each iteration Assign as the The final position of the Harris Hawk after the iteration is obtained to optimize the Harris Hawk group; wherein the position update of the Harris Hawk group in this embodiment depends not only on the current calculation, but also on the previous position; And confirm whether the current iteration has reached the maximum number of iterations; If yes, then the final position of the Harris Hawk in the optimized Harris Hawk group obtained at this time is the optimal solution of the IHHO algorithm; Otherwise, step S101 is repeated for the optimized Harris Hawk group; This embodiment is based on the IHHO algorithm, and trains and obtains the unknown polynomial coefficients in the surface fitting polynomial according to the first data training set to obtain an optimized surface fitting polynomial, such as Figure 5 As shown, the specific steps include: S31: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters include at least the first initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the first Harris Hawk population are used as unknown polynomial coefficients. or A solution to the unknown polynomial coefficients or Conduct training separately; S32: training / position updating the IHHO algorithm according to the first data training set to obtain a first updated Harris Hawk population, and obtaining individual position fitness values of the first updated Harris Hawk population based on the fitness function of the constructed polynomial coefficients; And the fitness function of the constructed polynomial coefficients includes the fitness function for training unknown polynomial coefficients The fitness function and training unknown polynomial coefficients The fitness function , i.e. training When is the fitness function, training At that time is the fitness function; Its expression is (17) (18) Where: represents the number of data points in the first data training set; Indicates the first data training set Input pressure value; Indicates that the corresponding The predicted value of Indicates the first data training set The temperature of the piezoresistive chip; Indicates that the corresponding The predicted value of When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the unknown polynomial coefficient The optimal solution of S4: Obtain thermal characteristic calibration data of the piezoresistive sensor; The thermal characteristic calibration data is obtained by controlling the ambient temperature to achieve multiple heating-cooling cycles, and maintaining the input pressure during the heating-cooling cycle. The data curve of the recorded ambient temperature changing with time The pressure sensor output voltage Over time Changing data curve and use it as thermal characteristic calibration data of the pressure sensor; Based on the optimized surface fitting polynomial (4), a temperature data curve of the piezoresistive chip is obtained according to the thermal characteristic calibration data, and the data curve of the ambient temperature changing with time and the temperature data curve of the piezoresistive chip are used as a second data training set; S5: Based on the parameter identification model and in combination with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then the dynamic temperature compensation of the piezoresistive sensor is realized through the temperature compensation model; In a specific embodiment, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, such as Figure 6 As shown, the following steps are included: S51: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters at least include the second initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the second Harris Hawk population are used as the parameters to be identified in the parameter identification model. A solution to ; S52: training / position updating the IHHO algorithm according to the second data training set to obtain a second updated Harris Hawk population, and obtaining individual position fitness values of the second updated Harris Hawk population based on the constructed fitness function of the parameter to be identified; And the fitness function of the parameters to be identified is constructed as (19) Where: represents the fitness function of the parameters to be identified; represents the number of data points in the second data training set; Indicates the first Chip temperature; Indicates the corresponding chip temperature prediction value obtained by calculating the parameter identification model; When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the parameter to be identified in the parameter identification model. The optimal solution of .
[0009] Beneficial effect: The present invention provides a dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and an IHHO algorithm. By analyzing the thermal convection process and the heat conduction process of the piezoresistive sensor, a transient thermal impedance network in the heat transfer process of the piezoresistive sensor is established to obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature. In addition, the present invention also optimizes and improves the Harris Eagle algorithm, and combines the improved algorithm with the surface fitting algorithm. By training the parameter identification model, a correction model for realizing dynamic temperature compensation of the piezoresistive sensor, namely, a temperature compensation model, is obtained. Based on the temperature compensation model, the pressure measurement result can be calibrated according to the output voltage of the piezoresistive sensor and the chip temperature. Under the condition of dynamic changes in ambient temperature, the temperature drift error can be eliminated to achieve excellent dynamic temperature compensation effect, which significantly improves the measurement accuracy of the piezoresistive sensor in complex environments and the temperature compensation effect in dynamic environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 It is a flow chart of the dynamic temperature compensation method of the piezoresistive sensor based on thermal impedance analysis and IHHO algorithm of the present invention; Figure 2 Schematic diagram of the heat transfer process of the piezoresistive sensor in this embodiment; Figure 3 is a schematic diagram of a transient thermal impedance network during heat transfer of the piezoresistive sensor in this embodiment; Figure 4 is a flow chart of the IHHO algorithm in this embodiment; Figure 5 This is a flow chart of using the IHHO algorithm to optimize the surface fitting polynomial parameters in this embodiment; Figure 6 This is a flow chart of using the IHHO algorithm to optimize the convolution kernel function parameters in this embodiment; Figure 7 This is a structural diagram of the temperature compensation hardware circuit in this embodiment; Figure 8 This is a simulation diagram of the output voltage of the piezoresistive sensor before temperature compensation under thermal steady-state conditions in this embodiment; Fig. 9 This is a diagram of the pressure measurement result after temperature compensation of the piezoresistive sensor under thermal steady-state conditions in this embodiment; Fig.10 This is a diagram of the pressure measurement results before and after temperature compensation of the pressure sensor under dynamic temperature conditions in this embodiment.
[0012] In the figure: 1. Piezoresistive sensor housing; 2. Piezoresistive chip. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] This embodiment provides a dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm. Figure 1 As shown, the specific steps include: S1: Construct a transient thermal impedance network during the heat transfer process of the piezoresistive sensor, and obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature based on the transient thermal impedance network; Specifically, by analyzing the heat convection process and heat conduction process of the pressure sensor, a transient thermal impedance network in the heat transfer process of the piezoresistive sensor is constructed, which includes a sequentially connected external environment heat source, a thermal resistance-thermal reactance module in the heat transfer process of the piezoresistive sensor, and a power source for the self-heating power loss of the piezoresistive chip. ; and the thermal resistance-thermal reactance module includes a first thermal resistance , the second thermal resistance , the third thermal resistance And the fourth thermal resistance , first heat capacity , the second heat capacity , the third heat capacity And the fourth heat capacity The first thermal resistance One end of the thermal resistor is connected to one end of the external environment heat source. The other end of the first heat One end and the second thermal resistance One end of the second thermal resistor The other end of the second heat One end and the third thermal resistance One end of the third thermal resistor The other end of the third heat One end and the fourth thermal resistance One end of the fourth thermal resistor The other end of the power source One end and the fourth heat capacity and the power source The other end of the first heat capacity The other end, the second heat capacity The other end, the third heat capacity The other end of the fourth heat capacity The other end of the external environment heat source is connected and grounded; Figure 2 The figure shows the heat transfer process from the external environment to the piezoresistive chip of the piezoresistive sensor, including heat convection and heat conduction. The black curve in the figure represents the ambient temperature. First, the sensor housing temperature is changed by convection heat transfer , and then change the temperature of the piezoresistive chip through heat conduction ;like Figure 3 As shown, represents the temperature reference point and ; and Represents the temperature of the second and third layers of the thermal impedance network of the pressure sensor; The self-heating power loss of the piezoresistive chip is ; Representative The thermal resistance and thermal reactance of the transient thermal impedance network are the thermal resistance and thermal capacitance in the transient thermal impedance network. , where in the piezoresistive sensor, ; In a specific embodiment, the method in S1 for obtaining a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature based on the transient thermal impedance network includes the following steps: S11: Obtain the network model of the transient thermal impedance network in the heat transfer process of the piezoresistive sensor. The expression of the network model is: (1) , Where: express The temperature of the piezoresistive chip at all times; Indicates the temperature of the piezoresistive chip; express The ambient temperature of the pressure sensor at all times; Indicates the ambient temperature of the pressure sensor; Indicates intermediate parameters; Respectively represent Thermal resistance and thermal reactance of the first-order transient thermal impedance network; Represents time parameters; S12: Setting intermediate variables and , according to the intermediate variable The network model of the transient thermal impedance network is simplified to obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature; And the expression of the parameter identification model is (2) (3) Where: Represents the convolution operation; and represents the convolution kernel parameters, i.e. the parameters to be identified in the parameter identification model, and , ; S2: construct a surface fitting polynomial containing unknown polynomial coefficients; The surface fitting polynomial is used to correct the output signal of the piezoresistive sensor in combination with the temperature drift characteristics of the piezoresistive sensor, thereby realizing temperature compensation; In this embodiment, based on the analysis of the temperature drift of the pressure sensor, it can be known that the output voltage of the pressure sensor is determined by the input pressure and the chip temperature, so a surface fitting polynomial for correcting the sensor output is proposed; specifically, the constructed surface fitting polynomial containing unknown polynomial coefficients is: (4) (5) Where: Indicates the pressure of the piezoresistive sensor of Power; Represents the output voltage of the piezoresistive sensor of Power; Indicates the temperature of the piezoresistive chip of Power; and Represents the unknown polynomial coefficients in the surface fitting polynomial.
[0015] S3: Obtain calibration data of the piezoresistive sensor; The calibration data is obtained by uniformly sampling several temperatures within the operating temperature range of the pressure sensor, and leaving the pressure sensor at each temperature for more than 30 minutes until the working state of the pressure sensor reaches a thermal steady state, that is, the temperature of the piezoresistive chip With ambient temperature After reaching agreement, measure the piezoresistive sensor applying different input pressures Output voltage at , and record it as the calibration data of the pressure sensor; The input pressure value, the output voltage and the temperature of the piezoresistive chip are used as the first data training set; In a specific embodiment, a method for obtaining an IHHO algorithm is included, such as Figure 4 As shown, the IHHO algorithm is obtained by improving the HHO algorithm. In this embodiment, the IHHO algorithm introduces dynamic factors (such as attenuation factors) based on the original HHO algorithm. , Momentum Factor , Balance Factor etc.), so that the algorithm’s search strategy can change according to the passage of time or specific conditions, thereby improving the algorithm’s flexibility and optimization effect; The improved IHHO algorithm consists of two basic stages: exploration and development. S100: Initialize the hyperparameters of the IHHO algorithm and the positions of the individuals in the Harris Hawk population; S101: By introducing a decay factor, the prey escape energy in the IHHO algorithm is obtained to determine the hawk hunting strategy, that is, the IHHO algorithm is based on the prey's escape energy. The absolute value of Determine hunting strategy; And the improved prey escape energy The expression is (6) Where: represents the initial escape energy and changes randomly in the range of [-1,1] at each iteration; Indicates the current iteration number; Indicates the maximum number of iterations; represents the attenuation factor; The eagle hunting strategy: confirming the prey's escape energy The absolute value of |E|; like , then the Harris Hawk group in the IHHO algorithm enters the exploration phase and executes step S102; like , then the Harris Hawk group in the IHHO algorithm enters the development phase and executes step S103; S102: In this embodiment, the Harris hawk performs global exploration according to the position of the prey or the hawk group, constructs a position update mechanism by introducing a balance factor, and updates the position of the Harris hawk group according to the position update mechanism, obtains a new Harris hawk group and continues to execute step S104; And the location update mechanism constructed is (7) (8) Where: Respectively, Harris Hawk is in the The iteration and The position after iterations; Indicates The position of a random eagle in the eagle group after iterations; Indicates The average position of all eagles after iterations; Indicates The position of the prey after iterations; , Represents a random value uniformly distributed in the range [0,1]; Represent the variables to be optimized The upper and lower limits of represents the balance factor; S103: Based on the probability of prey escape Combined prey escape energy Constructing an attack strategy of the Harris hawk and updating the position of the Harris hawk group according to the attack strategy, obtaining a new Harris hawk group and continuing to execute step S104; And the offensive strategy is specifically: when and , Harris Hawks adopt the soft siege strategy to update the position, and the soft siege strategy is (9) , Where: Indicates the prey's jumping intensity; Represents a random number in the range [0,1]; when and , Harris hawks adopt a tough siege strategy to update their positions, and the tough siege strategy is (10) when and , Harris Hawks adopt a gradual dive soft siege strategy to update their positions, and the gradual dive soft siege strategy is (11) (12) (13) Where: express Random vectors; express function; Indicates the variable to be optimized The number of represents the fitness value of the individual position in the Harris hawk group; when and , Harris hawks adopt a progressive dive tough siege strategy to update their positions, and the progressive dive tough siege strategy is (14) (15) (16) S104: Introducing momentum factor into IHHO algorithm , and after each iteration Assign as the The final position of the Harris Hawk after the iteration is obtained to optimize the Harris Hawk group; wherein the position update of the Harris Hawk group in this embodiment depends not only on the current calculation, but also on the previous position; And confirm whether the current iteration has reached the maximum number of iterations; If yes, then the final position of the Harris Hawk in the optimized Harris Hawk group obtained at this time is the optimal solution of the IHHO algorithm; Otherwise, step S101 is repeated for the optimized Harris Hawk group; This embodiment is based on the IHHO algorithm, and trains and obtains the unknown polynomial coefficients in the surface fitting polynomial according to the first data training set to obtain an optimized surface fitting polynomial, such as Figure 5 As shown, the specific steps include: S31: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters include at least the first initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the first Harris Hawk population are used as unknown polynomial coefficients. or A solution to the unknown polynomial coefficients or Conduct training separately; S32: training / position updating the IHHO algorithm according to the first data training set to obtain a first updated Harris Hawk population, and obtaining individual position fitness values of the first updated Harris Hawk population based on the fitness function of the constructed polynomial coefficients; And the fitness function of the constructed polynomial coefficients includes the fitness function for training unknown polynomial coefficients The fitness function and training unknown polynomial coefficients The fitness function , i.e. training When is the fitness function, training At that time is the fitness function; Its expression is (17) (18) Where: represents the number of data points in the first data training set; Indicates the first data training set Input pressure value; Indicates that the corresponding The predicted value of Indicates the first data training set The temperature of the piezoresistive chip; Indicates that the corresponding The predicted value of When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the unknown polynomial coefficient The optimal solution of S4: Obtain thermal characteristic calibration data of the piezoresistive sensor; The thermal characteristic calibration data is obtained by controlling the ambient temperature to achieve multiple heating-cooling cycles, and maintaining the input pressure during the heating-cooling cycle. The data curve of the recorded ambient temperature changing with time The pressure sensor output voltage Over time Changing data curve and use it as thermal characteristic calibration data of the pressure sensor; Based on the optimized surface fitting polynomial (4), a temperature data curve of the piezoresistive chip is obtained according to the thermal characteristic calibration data, and the data curve of the ambient temperature changing with time and the temperature data curve of the piezoresistive chip are used as a second data training set; S5: Based on the parameter identification model and in combination with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then the dynamic temperature compensation of the piezoresistive sensor is realized through the temperature compensation model; In a specific embodiment, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, such as Figure 6 As shown, the following steps are included: S51: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters at least include the second initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the second Harris Hawk population are used as the parameters to be identified in the parameter identification model. A solution to ; S52: training / position updating the IHHO algorithm according to the second data training set to obtain a second updated Harris Hawk population, and obtaining individual position fitness values of the second updated Harris Hawk population based on the constructed fitness function of the parameter to be identified; And the fitness function of the parameters to be identified is constructed as (19) Where: represents the fitness function of the parameters to be identified; represents the number of data points in the second data training set; Indicates the first Chip temperature; Indicates the corresponding chip temperature prediction value obtained by calculating the parameter identification model; When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the parameter to be identified in the parameter identification model. The optimal solution of .
[0016] The method of designing a temperature compensation circuit according to the temperature compensation model in this embodiment is a known technical means. The main content of this embodiment is the method of obtaining the temperature compensation model, such as Figure 7 As shown in the figure, the temperature compensation circuit designed based on the temperature compensation model includes three modules: a signal acquisition and processing module, a compensation module and a communication module; the signal acquisition and processing module amplifies the output voltage of the piezoresistive sensor, applies low-pass filtering and uses ADC to sample the signal; the compensation module uses MCU to realize dynamic temperature compensation, and MCU calculates the temperature according to the ambient temperature. The temperature of the piezoresistive chip is calculated by formula (3): ;according to and The calibrated pressure measurement result is calculated by formula (4): ; EEPROM is used to store the convolution kernel function And the surface fitting parameters and The communication module uses the UART interface to transmit data with the computer, and the set LCD screen displays the real-time temperature and compensation results. The design content will not be described in detail here.
[0017] like Figures 8 to 10 It can be known that the beneficial effects of the method described in this embodiment are: by analyzing the thermal convection process and heat conduction process of the piezoresistive sensor, a transient thermal impedance network in the heat transfer process of the piezoresistive sensor is established to obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature. In addition, the present invention also optimizes and improves the Harris Eagle algorithm, and combines the improved algorithm with the surface fitting algorithm. By training the parameter identification model, a correction model for realizing dynamic temperature compensation of the piezoresistive sensor, namely, a temperature compensation model, is obtained. Based on the temperature compensation model, the pressure measurement result can be calibrated according to the output voltage of the piezoresistive sensor and the chip temperature. Under the condition of dynamic change of ambient temperature, the temperature drift error can be eliminated and an excellent dynamic temperature compensation effect can be achieved, which significantly improves the measurement accuracy of the piezoresistive sensor in complex environments and the temperature compensation effect in dynamic environments.
[0018] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm, characterized in that: The specific steps include: S1: Construct a transient thermal impedance network during the heat transfer process of the piezoresistive sensor, and obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature based on the transient thermal impedance network; S2: construct a surface fitting polynomial containing unknown polynomial coefficients; The surface fitting polynomial is used to correct the output signal of the piezoresistive sensor in combination with the temperature drift characteristics of the piezoresistive sensor, thereby realizing temperature compensation; S3: Obtain calibration data of the piezoresistive sensor; The calibration data is the output voltage of the piezoresistive sensor when different input pressures are applied after the temperature of the piezoresistive chip reaches the same temperature as the ambient temperature; The input pressure value, the output voltage and the temperature of the piezoresistive chip are used as the first data training set; Based on the IHHO algorithm, unknown polynomial coefficients in the surface fitting polynomial are trained and obtained according to the first data training set to obtain an optimized surface fitting polynomial; S4: Obtain thermal characteristic calibration data of the piezoresistive sensor; The thermal characteristic calibration data is a data curve of the ambient temperature changing with time and a data curve of the pressure sensor output voltage changing with time, while keeping the input pressure unchanged; Based on the optimized surface fitting polynomial, the temperature data curve of the piezoresistive chip is obtained according to the thermal characteristic calibration data, and the data curve of the ambient temperature changing with time and the temperature data curve of the piezoresistive chip are used as the second data training set; S5: Based on the parameter identification model and in combination with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then dynamic temperature compensation of the piezoresistive sensor is realized through the temperature compensation model.
2. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 1, characterized in that: The transient thermal impedance network constructed in S1 during the heat transfer process of the piezoresistive sensor includes the external environment heat source, the thermal resistance-thermal reactance module during the heat transfer process of the piezoresistive sensor, and the power source of the self-heating power loss of the piezoresistive chip. ; and the thermal resistance-thermal reactance module includes a first thermal resistance , the second thermal resistance , the third thermal resistance And the fourth thermal resistance , first heat capacity , the second heat capacity , the third heat capacity And the fourth heat capacity The first thermal resistance One end of the thermal resistor is connected to one end of the external environment heat source. The other end of the first heat One end and the second thermal resistance One end of the second thermal resistor The other end of the second heat One end and the third thermal resistance One end of the third thermal resistor The other end of the third heat One end and the fourth thermal resistance One end of the fourth thermal resistor The other end of the power source One end and the fourth heat capacity and the power source The other end of the first heat capacity The other end, the second heat capacity The other end of the third heat capacity The other end of the fourth heat capacity The other end of the heat source and the other end of the external environment are connected and grounded.
3. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 1, characterized in that: The method for obtaining a parameter identification model for calculating the temperature of a piezoresistive chip according to the ambient temperature based on a transient thermal impedance network in S1 includes the following steps: S11: Obtain the network model of the transient thermal impedance network in the heat transfer process of the piezoresistive sensor. The expression of the network model is: (1) , Where: express The temperature of the piezoresistive chip at all times; express The ambient temperature of the pressure sensor at all times; Indicates the intermediate parameter; Respectively represent The thermal resistance and thermal reactance of the transient thermal impedance network are the thermal resistance and thermal capacitance in the transient thermal impedance network. ; Represents time parameters; S12: Setting intermediate variables and , according to the intermediate variable The network model of the transient thermal impedance network is simplified to obtain a parameter identification model for calculating the temperature of the piezoresistive chip according to the ambient temperature; And the expression of the parameter identification model is (2) (3) Where: Represents the convolution operation; and represents the convolution kernel parameters, i.e. the parameters to be identified in the parameter identification model, and , .
4. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 1, characterized in that: The surface fitting polynomial containing unknown polynomial coefficients constructed in S2 is expressed as (4) (5) Where: Indicates the pressure of the piezoresistive sensor of Power; Represents the output voltage of the piezoresistive sensor of Power; Indicates the temperature of the piezoresistive chip of Power; and Represents the unknown polynomial coefficients in the surface fitting polynomial.
5. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 1, characterized in that: The IHHO algorithm is obtained by introducing a dynamic factor into the HHO algorithm to improve the IHHO algorithm. And the dynamic factors include the attenuation factor , Momentum Factor and the balance factor ; The improved IHHO algorithm specifically includes S100: Initialize the hyperparameters of the IHHO algorithm and the positions of the individuals in the Harris Hawk population; S101: By introducing a decay factor, the prey escape energy in the IHHO algorithm is obtained to determine the hawk hunting strategy; And the improved prey escape energy The expression is (6) Where: represents the initial escape energy and changes randomly in the range of [-1,1] at each iteration; Indicates the current iteration number; Indicates the maximum number of iterations; represents the attenuation factor; The eagle hunting strategy: confirming the prey's escape energy The absolute value of |E|; like , then the Harris Hawk group in the IHHO algorithm enters the exploration phase and executes step S102; like , then the Harris Hawk group in the IHHO algorithm enters the development phase and executes step S103; S102: constructing a position update mechanism by introducing a balance factor, and updating the position of the Harris Hawk group according to the position update mechanism, obtaining a new Harris Hawk group and continuing to execute step S104; And the location update mechanism constructed is (7) (8) Where: Respectively, Harris Hawk is in the The iteration and The position after iterations; Indicates The position of a random eagle in the eagle group after iterations; Indicates The average position of all eagles after iterations; Indicates The position of the prey after iterations; , Represents a random value uniformly distributed in the range [0,1]; Represent the variables to be optimized The upper and lower limits of represents the balance factor; S103: Based on the probability of prey escape Combined prey escape energy Constructing an attack strategy of the Harris hawk and updating the position of the Harris hawk group according to the attack strategy, obtaining a new Harris hawk group and continuing to execute step S104; And the offensive strategy is specifically: when and , Harris Hawks adopt the soft siege strategy to update the position, and the soft siege strategy is (9) , Where: Indicates the prey's jumping intensity; Represents a random number in the range [0,1]; when and , Harris hawks adopt a tough siege strategy to update their positions, and the tough siege strategy is (10) when and , Harris Hawks adopt a gradual dive soft siege strategy to update their positions, and the gradual dive soft siege strategy is (11) (12) (13) Where: express Random vectors; express function; Indicates the variable to be optimized The number of represents the fitness value of the individual position in the Harris hawk group; when and , Harris Hawks adopt a progressive dive tough siege strategy to update their positions, and the progressive dive tough siege strategy is (14) (15) (16) S104: Introducing momentum factor into IHHO algorithm , and after each iteration Assign as the The final position of the Harris Hawk after iterations is obtained to optimize the Harris Hawk group; And confirm whether the current iteration has reached the maximum number of iterations; If yes, then the final position of the Harris Hawk in the optimized Harris Hawk group obtained at this time is the optimal solution of the IHHO algorithm; Otherwise, step S101 is repeated for the optimized Harris Hawk group.
6. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 5, characterized in that: In S3, based on the IHHO algorithm, unknown polynomial coefficients in the surface fitting polynomial are trained and obtained according to the first data training set to obtain an optimized surface fitting polynomial, which specifically includes the following steps: S31: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters include at least the first initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the first Harris Hawk population are used as unknown polynomial coefficients. or A solution to ; S32: training / position updating the IHHO algorithm according to the first data training set to obtain a first updated Harris Hawk population, and obtaining individual position fitness values of the first updated Harris Hawk population based on the fitness function of the constructed polynomial coefficients; And the fitness function of the constructed polynomial coefficients includes the function for training the unknown polynomial coefficients The fitness function and training unknown polynomial coefficients The fitness function , whose expression is (17) (18) Where: represents the number of data points in the first data training set; Indicates the first data training set Input pressure value; Indicates that the corresponding The predicted value of Indicates the first data training set The temperature of the piezoresistive chip; Indicates that the corresponding The predicted value of When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the unknown polynomial coefficient The optimal solution of .
7. The method for dynamic temperature compensation of a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 5, characterized in that: In S5, based on the parameter identification model combined with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, including the following steps: S51: Initialize algorithm parameters of the IHHO algorithm; The algorithm parameters at least include the second initial Harris Hawk population and the IHHO hyperparameters; the individual positions in the second Harris Hawk population are used as the parameters to be identified in the parameter identification model. A solution to ; S52: training / position updating the IHHO algorithm according to the second data training set to obtain a second updated Harris Hawk population, and obtaining individual position fitness values of the second updated Harris Hawk population based on the constructed fitness function of the parameter to be identified; And the fitness function of the parameters to be identified is constructed as (19) Where: represents the fitness function of the parameters to be identified; represents the number of data points in the second data training set; Indicates the first Chip temperature; Indicates the corresponding chip temperature prediction value obtained by calculating the parameter identification model; When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population is used as the parameter to be identified in the parameter identification model. The optimal solution of .
Citation Information
Patent Citations
Pressure sensor temperature compensation method based on improved grey wolf algorithm
CN114964571A
Traditional Chinese medicine syndrome type classification method and device based on improved Harris eagle optimization algorithm
CN117133446A
Dynamic temperature compensation method for diffused silicon water pressure sensor
CN118936695A
Silicon piezoresistive pressure sensor temperature compensation method and system based on IRIME-CNN-DD
CN119290221A
Thermal Compensation of Pressure Measurements
US20070186657A1
Cited By
Dynamic compensation processing method and system for thermocouple signal
CN120558419A
A dynamic compensation processing method and system for thermocouple signals
CN120558419B
Temperature compensation method of pressure sensor
CN121347052A
Temperature compensation method for pressure sensor
CN121347052B