Dynamic Temperature Compensation Method for Piezoresistive Sensors Based on Thermal Impedance Analysis and IHHO Algorithm
By building a transient thermal impedance network and an improved IHHO algorithm, combining the Harris Eagle Group optimization algorithm to train polynomial coefficients and parameters, the temperature compensation problem of piezoresistive sensors in dynamic environments is solved, and a high-precision temperature compensation effect is achieved.
Patent Information
- Application Number
- CN202510458858.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The piezoresistive pressure sensor has poor temperature compensation effect in dynamic environments, resulting in a decrease in measurement accuracy.
Based on thermal impedance analysis and improved IHHO algorithm, a transient thermal impedance network is constructed, and temperature compensation is performed through surface fitting polynomials and parameter identification models. Combined with the Harris Eagle Group optimization algorithm, unknown polynomial coefficients and parameters to be identified, to achieve dynamic temperature compensation.
Under the dynamic changes in ambient temperature, the temperature drift error is effectively eliminated, which significantly improves the measurement accuracy of the piezoresistive sensor and the temperature compensation effect in a dynamic environment.
Smart Images

Figure CN119984622B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of piezoresistive pressure sensors, and particularly to a dynamic temperature compensation method for piezoresistive sensors based on thermal impedance analysis and IHHO algorithm. Background Technique
[0002] In an industrial environment, the accurate detection of pressure signals is crucial. Pressure sensors convert pressure signals into voltage signals for output, and thus are widely used in industrial production, aerospace, and other fields. According to different measurement principles, pressure sensors are mainly divided into different categories such as piezoresistive, piezoelectric, capacitive, and resonant types. Among them, piezoresistive pressure sensors have been 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 prone to measurement errors caused by temperature effects, known as temperature drift. In order to improve the measurement accuracy, temperature compensation must be performed on them.
[0003] The temperature compensation methods for pressure sensors mainly include two methods: hardware compensation and software compensation. The hardware compensation method corrects temperature drift through a hardware circuit, but it is difficult for the characteristics of the compensation components to be consistent with the temperature characteristics of the piezoresistor. Therefore, in a wide temperature range, the hardware compensation method performs poorly. The software compensation method corrects the sensor output through an algorithm in the backend circuit or the upper computer. The current software compensation methods can achieve excellent static temperature compensation effects, but during the dynamic change of the ambient temperature, due to the thermal inertia of the pressure sensor itself, most temperature compensation methods perform poorly. Summary of the Invention
[0004] The present invention provides a dynamic temperature compensation method for piezoresistive sensors based on thermal impedance analysis and IHHO algorithm to overcome the problem that the current piezoresistive pressure sensors have poor temperature compensation effects in a dynamic environment.
[0005] To achieve the above object, the technical solution of the present invention is as follows:
[0006] A dynamic temperature compensation method for piezoresistive sensors based on thermal impedance analysis and IHHO algorithm specifically includes the following steps:
[0007] 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;
[0008] S2: Construct a surface fitting polynomial containing unknown polynomial coefficients;
[0009] And 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;
[0010] S3: Obtain the calibration data of the piezoresistive sensor;
[0011] And the calibration data is the output voltage when different input pressures are applied to the piezoresistive sensor after the temperature of the piezoresistive chip reaches the same as the ambient temperature;
[0012] And take the input pressure value, output voltage, and piezoresistive chip temperature as the first data training set;
[0013] Based on the IHHO algorithm, train and obtain the unknown polynomial coefficients in the surface fitting polynomial according to the first data training set to obtain an optimized surface fitting polynomial;
[0014] S4: Obtain the thermal characteristic calibration data of the piezoresistive sensor;
[0015] And the thermal characteristic calibration data is the data curve of the ambient temperature changing with time and the data curve of the output voltage of the pressure sensor changing with time recorded while keeping the input pressure unchanged;
[0016] Based on the optimized surface fitting polynomial, obtain the piezoresistive chip temperature data curve according to the thermal characteristic calibration data, and take the data curve of the ambient temperature changing with time and the piezoresistive chip temperature data curve as the second data training set;
[0017] S5: Based on the parameter identification model and combined with the IHHO algorithm, obtain the parameters to be identified in the parameter identification model according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then realize the dynamic temperature compensation of the piezoresistive sensor through the temperature compensation model.
[0018] Further, the transient thermal impedance network in the heat transfer process of the piezoresistive sensor constructed in S1 includes an external environmental heat source, a thermal resistance-thermal reactance module during the heat transfer process of the piezoresistive sensor, and a power source for the self-heating loss power of the piezoresistive chip connected in sequence ; and the thermal resistance-thermal reactance module includes a first thermal resistance , a second thermal resistance , a third thermal resistance and a fourth thermal resistance , a first heat capacity , a second heat capacity , a third heat capacity and a fourth heat capacity ; one end of the first thermal resistance is connected to one end of the external environmental heat source, and the other end of the first thermal resistance is connected to one end of the first heat capacity and one end of the second thermal resistance ; the other end of the second thermal resistance is connected to one end of the second heat capacity and one end of the third thermal resistance is connected to one end; the third thermal resistance The other end is connected to the third heat capacity One end of and the fourth thermal resistance One end is connected; the fourth thermal resistance The other end is connected to the power source One end of and the fourth heat capacity One end is connected; and the power source The other end, the first heat capacity The other end of, the second heat capacity The other end of, the third heat capacity The other end of, the fourth heat capacity The other end of and the other end of the external environmental heat source are connected and grounded.
[0019] Furthermore, the method for obtaining the parameter identification model for calculating the piezoresistive chip temperature according to the ambient temperature based on the transient thermal impedance network in S1 includes the following steps:
[0020] S11: Obtain the network model of the transient thermal impedance network during the heat transfer process of the piezoresistive sensor, and the expression of its network model is
[0021] (1)
[0022] ,
[0023] In the formula: represents The temperature of the piezoresistive chip at time represents the temperature of the piezoresistive chip; represents The ambient temperature at which the pressure sensor is located at time represents the ambient temperature at which the pressure sensor is located; represents an intermediate parameter; respectively represent the Order transient thermal impedance network thermal resistance and thermal reactance; represents the time parameter;
[0024] S12: Set the intermediate variable and , according to the intermediate variable Simplify the network model of the transient thermal impedance network to obtain the parameter identification model for calculating the piezoresistive chip temperature according to the ambient temperature;
[0025] And the expression of the parameter identification model is
[0026] (2)
[0027] (3)
[0028] In the formula: represents the convolution operation; and represents the convolution kernel parameter, i.e., the parameter to be identified in the parameter identification model, and , ;
[0029] S2: Construct a surface fitting polynomial including unknown polynomial coefficients;
[0030] And the surface fitting polynomial is used to combine the temperature drift characteristics of the piezoresistive sensor to correct the output signal of the piezoresistive sensor, thereby realizing temperature compensation;
[0031] In this embodiment, based on the analysis of the temperature drift of the pressure sensor, it is known that the output voltage of the pressure sensor is determined by the input pressure and the chip temperature. Therefore, a surface fitting polynomial for correcting the sensor output is proposed. Specifically, the constructed surface fitting polynomial including unknown polynomial coefficients is
[0032] (4)
[0033] (5)
[0034] In the formula: represents the pressure received by the piezoresistive sensor of power; represents the output voltage of the piezoresistive sensor of power; represents the piezoresistive chip temperature of power; and represent the unknown polynomial coefficients in the surface fitting polynomial.
[0035] S3: Obtain the calibration data of the piezoresistive sensor;
[0036] And the acquisition method of the calibration data is to uniformly sample several temperatures within the working temperature range of the pressure sensor. At each temperature, the pressure sensor is left stationary for more than 30 minutes until the working state of the pressure sensor reaches a thermal steady state, that is, the piezoresistive chip temperature and the ambient temperature reach consistency. Then, measure the output voltage when different input pressures are applied to the piezoresistive sensor, and record it as the calibration data of the pressure sensor;
[0037] And use the input pressure value, output voltage, and piezoresistive chip temperature as the first data training set;
[0038] In a specific embodiment, it includes a method for obtaining the IHHO algorithm, such as Figure 4 shown, and the IHHO algorithm is obtained by improving the HHO algorithm. In this embodiment, a dynamic factor (such as a decay factor , a momentum factor , a balance factor , etc.) is introduced on the basis of the original HHO algorithm, so that the search strategy of the algorithm can change according to the passage of time or specific conditions, thereby improving the flexibility and optimization effect of the algorithm;
[0039] The improved IHHO algorithm obtained includes two basic stages: the exploration stage and the exploitation stage. Specifically
[0040] S100: Initialize the hyperparameters of the IHHO algorithm and the population individual positions of the Harris hawk group;
[0041] S101: By introducing a decay factor, obtain the prey escape energy in the IHHO algorithm to determine the hunting strategy of the hawk group, that is, the IHHO algorithm determines the hunting strategy according to the absolute value of the prey escape energy ;
[0042] And the expression of the improved prey escape energy is
[0043] (6)
[0044] In the formula: represents the initial escape energy and randomly changes within the range of [-1, 1] at each iteration; represents the current iteration number; represents the maximum iteration number; represents the decay factor;
[0045] The hunting strategy of the hawk group: confirm the absolute value |E| of the prey escape energy ;
[0046] If , then the Harris hawk group in the IHHO algorithm enters the exploration stage and executes step S102;
[0047] If , then the Harris hawk group in the IHHO algorithm enters the exploitation stage and executes step S103;
[0048] S102: In this embodiment, the Harris hawks conduct global exploration based on the position of the prey or the hawk group. A position update mechanism is constructed by introducing a balance factor, and the position of the Harris hawk group is updated according to the position update mechanism to obtain a new Harris hawk group and then step S104 is continued;
[0049] And the constructed position update mechanism is
[0050] (7)
[0051] (8)
[0052] where: respectively represent the positions of the Harris hawk at the th iteration and the th iteration; represents the position of a randomly selected hawk in the hawk group after the th iteration; represents the average position of all hawks after the th iteration; represents the position of the prey after the th iteration; , represents a random value uniformly distributed in the range [0, 1]; respectively represent the upper and lower limits of the variable to be optimized; represents the balance factor;
[0053] S103: Based on the prey escape probability combined with the prey escape energy construct an attack strategy for the Harris hawks and update the position of the Harris hawk group according to the attack strategy to obtain a new Harris hawk group and then step S104 is continued;
[0054] And the specific attack strategy is:
[0055] When and , the Harris hawk group uses a soft siege strategy for position update, and the soft siege strategy is
[0056] (9)
[0057] ,
[0058] where: represents the jump intensity of the prey; represents a random number in the range [0, 1];
[0059] When and , the Harris hawks use a tough siege strategy for position update, and the tough siege strategy is
[0060] (10)
[0061] When and , the Harris hawks use a progressive dive soft siege strategy for position update, and the progressive dive soft siege strategy is
[0062] (11)
[0063] (12)
[0064] (13)
[0065] In the formula: represents a random vector; represents a function; represents the variable to be optimized the number of; represents the fitness value of the individual position in the Harris hawks;
[0066] When and , the Harris hawks use a progressive dive tough siege strategy for position update, and the progressive dive tough siege strategy is
[0067] (14)
[0068] (15)
[0069] (16)
[0070] S104: Introduce a momentum factor into the IHHO algorithm , and after each iteration, is assigned as the th iteration's final position of the Harris hawk to obtain an optimized Harris hawk group; where in this embodiment, the position update of the Harris hawk group depends not only on the current calculation but also on the previous position;
[0071] And confirm whether the current iteration has reached the maximum number of iterations;
[0072] If so, 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;
[0073] Otherwise, repeat step S101 for the optimized Harris hawk group;
[0074] This embodiment is based on the IHHO algorithm, trains according to the first data training set, and obtains the unknown polynomial coefficients in the surface fitting polynomial to obtain an optimized surface fitting polynomial. As Figure 5 shown, it specifically includes the following steps:
[0075] S31: Initialize the algorithm parameters of the IHHO algorithm;
[0076] And the algorithm parameters at least include the first initial Harris hawk population and the IHHO hyperparameters; Let the individual positions in the first Harris hawk population be used as a solution to the unknown polynomial coefficients or of, that is, train the unknown polynomial coefficients or respectively;
[0077] S32: Train / update the position of the IHHO algorithm according to the first data training set to obtain the first updated Harris hawk population, and based on the constructed fitness function of the polynomial coefficients, obtain the individual position fitness values of the first updated Harris hawk population.
[0078] And the constructed fitness function of the polynomial coefficients includes the fitness function for training the unknown polynomial coefficients and the fitness function for training the unknown polynomial coefficients That is, when training use as the fitness function, and when training use as the fitness function; When training use
[0079] Its expression is
[0080] (17)
[0081] (18)
[0082] In the formula: represents the number of data points in the first data training set; represents the th input pressure value in the first data training set; represents the predicted value obtained by calculation based on the surface fitting polynomial for the corresponding ; represents the th piezoresistive chip temperature in the first data training set; represents the predicted value obtained by calculation based on the surface fitting polynomial for the corresponding ;
[0083] When the maximum number of iterations is reached, the position of the Harris hawk individual corresponding to the fitness value of the optimal individual in the final Harris hawk population is taken as the unknown polynomial coefficient as the optimal solution;
[0084] S4: Obtain the thermal characteristic calibration data of the piezoresistive sensor;
[0085] The thermal characteristic calibration data is obtained by controlling the environmental temperature to achieve multiple heating-cooling cycles, and during the heating-cooling cycle, the input pressure is kept constant, and the data curve of the environmental temperature changing with time and the output voltage of the pressure sensor changing with time data curve are recorded and used as the thermal characteristic calibration data of the pressure sensor;
[0086] Based on the optimized surface fitting polynomial (4), the piezoresistive chip temperature data curve is obtained according to the thermal characteristic calibration data, and the data curve of the environmental temperature changing with time and the piezoresistive chip temperature data curve are used as the second data training set;
[0087] S5: Based on the parameter identification model and combined with the IHHO algorithm, the to-be-identified parameters 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;
[0088] In a specific embodiment, the to-be-identified parameters 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, as Figure 6 shown, including the following steps:
[0089] S51: Initialize the algorithm parameters of the IHHO algorithm;
[0090] The algorithm parameters at least include the second initial Harris hawk population and the IHHO hyperparameters; let the individual positions in the second Harris hawk population be used as one solution of the to-be-identified parameters in the parameter identification model ;
[0091] S52: Train / update the position of the IHHO algorithm according to the second data training set to obtain a second updated Harris hawk population, and based on the constructed fitness function of the to-be-identified parameters, obtain the individual position fitness values of the second updated Harris hawk population;
[0092] The constructed fitness function of the to-be-identified parameters is
[0093] (19)
[0094] In the formula: represents the fitness function of the parameter to be identified; represents the number of data points in the second data training set; represents the th chip temperature in the second data training set; represents the corresponding predicted value of the chip temperature obtained by calculation according to the parameter identification model;
[0095] And when the maximum number of iterations is reached, the position of the Harris hawk individual corresponding to the fitness value of the optimal individual position in the final Harris hawk population is used as the parameter to be identified in the parameter identification model optimal solution.
[0096] Beneficial effects: The present invention provides a dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm. By analyzing the heat 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 piezoresistive chip temperature according to the ambient temperature. In addition, the present invention also optimizes and improves the Harris hawk algorithm, combines the improved algorithm with the surface fitting algorithm, and obtains a calibration model for realizing the dynamic temperature compensation of the piezoresistive sensor, that is, a temperature compensation model, through training the parameter identification model. 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 the ambient temperature, the temperature drift error can be eliminated, and thus an excellent dynamic temperature compensation effect can be obtained, significantly improving the measurement accuracy of the piezoresistive sensor in a complex environment and the temperature compensation effect in a dynamic environment. Description of the Drawings
[0097] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0098] Figure 1 is a flowchart of the dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm of the present invention;
[0099] Figure 2 is a schematic diagram of the heat transfer process of the piezoresistive sensor in this embodiment;
[0100] Figure 3 is a schematic diagram of the transient thermal impedance network in the heat transfer process of the piezoresistive sensor in this embodiment;
[0101] Figure 4Flow chart of the IHHO algorithm in this embodiment;
[0102] Figure 5 Flow chart of using the IHHO algorithm to optimize the parameters of the surface fitting polynomial in this embodiment;
[0103] Figure 6 Flow chart of using the IHHO algorithm to optimize the parameters of the convolution kernel function in this embodiment;
[0104] Figure 7 Structural diagram of the temperature compensation hardware circuit in this embodiment;
[0105] Figure 8 Simulation diagram of the output voltage of the piezoresistive sensor before temperature compensation under thermal steady-state conditions in this embodiment;
[0106] Figure 9 Graph of the pressure measurement results of the piezoresistive sensor after temperature compensation under thermal steady-state conditions in this embodiment;
[0107] Figure 10 Graph of the pressure measurement results of the pressure sensor before and after temperature compensation under dynamic temperature conditions in this embodiment.
[0108] In the figure: 1. Piezoresistive sensor housing; 2. Piezoresistive chip. Detailed implementation manners
[0109] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0110] This embodiment provides a dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm, as Figure 1 shown, which specifically includes the following steps:
[0111] S1: Construct a transient thermal impedance network in 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;
[0112] 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 an external environmental heat source, a thermal resistance-thermal reactance module during the heat transfer process of the piezoresistive sensor, and a power source of the self-heating loss power of the piezoresistive chip connected in sequence ; 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 , the first heat capacity , the second heat capacity , the third heat capacity and the fourth heat capacity ; one end of the first thermal resistance is connected to one end of the external environmental heat source, and the other end of the first thermal resistance is connected to one end of the first heat capacity and one end of the second thermal resistance ; the other end of the second thermal resistance is connected to one end of the second heat capacity and one end of the third thermal resistance ; the other end of the third thermal resistance is connected to one end of the third heat capacity and one end of the fourth thermal resistance ; the other end of the fourth thermal resistance is connected to one end of the power source and one end of the fourth heat capacity ; and the other end of the power source , the other end of the first heat capacity , the other end of the second heat capacity , the other end of the third heat capacity , the other end of the fourth heat capacity and the other end of the external environmental heat source are connected and grounded; as Figure 2 shown, the heat transfer process from the external environment to the piezoresistive chip of the piezoresistive sensor includes a convective heat transfer process and a conductive heat transfer process. The black curve in the figure represents the ambient temperature First, the temperature of the sensor housing is changed through convective heat transfer , and then the temperature of the piezoresistive chip is changed through conductive heat transfer ; as Figure 3 shown, represents the temperature reference point and ; and represent the temperatures of the second and third layers of the thermal impedance network of the pressure sensor; represents the self-heating loss power of the piezoresistive chip and its ; represents the th-order transient thermal impedance network's thermal resistance and thermal reactance, that is, the thermal resistance and heat capacity in the transient thermal impedance network, and , where in the piezoresistive sensor, ;
[0113] In a specific embodiment, the method for obtaining a parameter identification model for calculating the piezoresistive chip temperature based on the ambient temperature using the transient thermal impedance network in S1 includes the following steps:
[0114] S11: Obtain the network model of the transient thermal impedance network during the heat transfer process of the piezoresistive sensor. The expression of the network model is
[0115] (1)
[0116] ,
[0117] In the formula: represents the temperature of the piezoresistive chip at time represents the temperature of the piezoresistive chip; represents the ambient temperature at which the pressure sensor is located at time represents the ambient temperature at which the pressure sensor is located; represents an intermediate parameter; respectively represent the thermal resistance and thermal reactance of the -th order transient thermal impedance network; represents the time parameter;
[0118] S12: Set the intermediate variable and . According to the intermediate variable , simplify the network model of the transient thermal impedance network to obtain a parameter identification model for calculating the piezoresistive chip temperature based on the ambient temperature;
[0119] And the expression of the parameter identification model is
[0120] (2)
[0121] (3)
[0122] In the formula: represents the convolution operation; and represent the convolution kernel parameters, i.e., the parameters to be identified in the parameter identification model, and , ;
[0123] S2: Construct a surface fitting polynomial containing unknown polynomial coefficients;
[0124] And 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 achieving temperature compensation;
[0125] In this embodiment, based on the analysis of the temperature drift of the pressure sensor, it is known that the output voltage of the pressure sensor is determined by the input pressure and the chip temperature. Therefore, a surface fitting polynomial is proposed for correcting the sensor output. Specifically, the surface fitting polynomial containing unknown polynomial coefficients is constructed as
[0126] (4)
[0127] (5)
[0128] In the formula: represents the pressure received by the piezoresistive sensor to the power; represents the output voltage of the piezoresistive sensor to the power; represents the piezoresistive chip temperature to the power; and represent the unknown polynomial coefficients in the surface fitting polynomial.
[0129] S3: Obtain the calibration data of the piezoresistive sensor;
[0130] And the acquisition method of the calibration data is to uniformly sample several temperatures within the working temperature range of the pressure sensor. At each temperature, the pressure sensor is left stationary for more than 30 minutes until the working state of the pressure sensor reaches thermal steady state, that is, the piezoresistive chip temperature is consistent with the ambient temperature After that, measure the output voltage when different input pressures are applied to the piezoresistive sensor, and record it as the calibration data of the pressure sensor;
[0131] And use the input pressure value, output voltage, and piezoresistive chip temperature as the first data training set;
[0132] In a specific embodiment, it includes the acquisition method of the IHHO algorithm, as Figure 4 shown, and the IHHO algorithm is obtained by improving the HHO algorithm. In this embodiment, a dynamic factor (such as a decay factor , a momentum factor , a balance factor , etc.) is introduced in the original HHO algorithm by IHHO, so that the search strategy of the algorithm can change according to the passage of time or specific conditions, thereby improving the flexibility and optimization effect of the algorithm;
[0133] The improved IHHO algorithm includes two basic stages: the exploration stage and the exploitation stage. Specifically,
[0134] S100: Initialize the hyperparameters of the IHHO algorithm and the population individual positions of the Harris hawks;
[0135] S101: By introducing a decay factor, obtain the prey escape energy in the IHHO algorithm to determine the hunting strategy of the hawk group, that is, the IHHO algorithm determines the hunting strategy according to the absolute value of the prey escape energy to determine the hunting strategy;
[0136] And the improved prey escape energy has the expression of
[0137] (6)
[0138] In the formula: represents the initial escape energy and randomly varies within the range of [-1, 1] at each iteration; represents the current iteration number; represents the maximum iteration number; represents the decay factor;
[0139] The hunting strategy of the hawk group: Confirm the absolute value |E| of the prey escape energy ;
[0140] If , then the Harris hawk group in the IHHO algorithm enters the exploration stage and executes step S102;
[0141] If , then the Harris hawk group in the IHHO algorithm enters the exploitation stage and executes step S103;
[0142] S102: In this embodiment, the Harris hawk conducts 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 to obtain a new Harris hawk group and continue to execute step S104;
[0143] And the constructed position update mechanism is
[0144] (7)
[0145] (8)
[0146] In the formula: respectively represent the positions of the Harris hawk after the th iteration and the th iteration; represents the The position of a randomly selected Harris hawk in the Harris hawk population after the -th iteration; represents the average position of all Harris hawks after the -th iteration; represents the position of the prey after the , represents a random value uniformly distributed in the range [0, 1]; respectively represent the upper and lower bounds of the variable to be optimized ; represents the balance factor;
[0147] S103: Based on the prey escape probability combined with the prey escape energy construct the attack strategy of the Harris hawks and update the positions of the Harris hawk population according to the attack strategy to obtain a new Harris hawk population and continue to execute step S104;
[0148] and the specific attack strategy is:
[0149] When and , the Harris hawk population uses the soft siege strategy for position update, and the soft siege strategy is
[0150] (9)
[0151] ,
[0152] where: represents the jump intensity of the prey; represents a random number in the range [0, 1];
[0153] When and , the Harris hawk population uses the tough siege strategy for position update, and the tough siege strategy is
[0154] (10)
[0155] When and , the Harris hawk population uses the progressive dive soft siege strategy for position update, and the progressive dive soft siege strategy is
[0156] (11)
[0157] (12)
[0158] (13)
[0159] where: denote random vector; denote function; denote the number of variables to be optimized ; denote the fitness value of the individual position in the Harris hawks optimization;
[0160] When and , the Harris hawks optimization adopts the progressive dive and tough siege strategy for position update, and the progressive dive and tough siege strategy is
[0161] (14)
[0162] (15)
[0163] (16)
[0164] S104: Introduce the momentum factor into the IHHO algorithm , and after each iteration, assign as the final position of the Harris hawk after the -th iteration to obtain the optimized Harris hawks optimization; where in this embodiment, the position update of the Harris hawks optimization depends not only on the current calculation but also on the previous position;
[0165] And confirm whether the current iteration reaches the maximum number of iterations;
[0166] If so, the final position of the Harris hawk in the optimized Harris hawks optimization obtained at this time is the optimal solution of the IHHO algorithm;
[0167] Otherwise, repeat step S101 for the optimized Harris hawks optimization;
[0168] This embodiment is based on the IHHO algorithm, trains according to the first data training set and obtains the unknown polynomial coefficients in the surface fitting polynomial to obtain the optimized surface fitting polynomial, as Figure 5 shown, and specifically includes the following steps:
[0169] S31: Initialize the algorithm parameters of the IHHO algorithm;
[0170] And the algorithm parameters at least include the first initial Harris hawk population and the IHHO hyperparameters; let the individual positions in the first Harris hawk population be used as a solution of the unknown polynomial coefficients or of, that is, train the unknown polynomial coefficients or respectively;
[0171] S32: Train the IHHO algorithm / Update the position according to the first data training set to obtain the first updated Harris hawk population, and based on the fitness function of the constructed polynomial coefficients, obtain the individual position fitness values of the first updated Harris hawk population;
[0172] And the fitness function of the constructed polynomial coefficients includes the fitness function for training unknown polynomial coefficients of the fitness function and the fitness function for training unknown polynomial coefficients of the fitness function , that is, when training , use as the fitness function, and when training , use as the fitness function;
[0173] Its expression is
[0174] (17)
[0175] (18)
[0176] In the formula: represents the number of data points in the first data training set; represents the th input pressure value in the first data training set; represents the predicted value obtained by calculating based on the surface fitting polynomial for the corresponding ; represents the th piezoresistive chip temperature in the first data training set; represents the predicted value obtained by calculating based on the surface fitting polynomial for the corresponding ;
[0177] And when reaching the maximum number of iterations, take the Harris hawk individual position corresponding to the optimal individual position fitness value in the final Harris hawk population as the optimal solution of the unknown polynomial coefficients ;
[0178] S4: Obtain the thermal characteristic calibration data of the piezoresistive sensor;
[0179] And the way to obtain the thermal characteristic calibration data is to control the environmental temperature to achieve multiple heating-cooling cycles, and during the heating-cooling cycle, keep the input pressure unchanged, record the data curve of the environmental temperature changing with time and the data curve of the output voltage of the pressure sensor changing with time changing , and take them as the thermal characteristic calibration data of the pressure sensor;
[0180] Based on the optimized surface fitting polynomial (4), the piezoresistive chip temperature data curve is obtained according to the thermal characteristic calibration data, and the data curve of the ambient temperature varying with time and the piezoresistive chip temperature data curve are used as the second data training set;
[0181] S5: Based on the parameter identification model and combined with the IHHO algorithm, the parameters to be identified in the parameter identification model are obtained according to the second data training set, so as to obtain a temperature compensation model for designing a temperature compensation circuit, and further, the dynamic temperature compensation of the piezoresistive sensor is realized through the temperature compensation model;
[0182] In a specific embodiment, the parameters to be identified in the parameter identification model are obtained according to the second data training set, so as to obtain a temperature compensation model for designing a temperature compensation circuit, as Figure 6 shown, including the following steps:
[0183] S51: Initialize the algorithm parameters of the IHHO algorithm;
[0184] And the algorithm parameters at least include the second initial Harris hawk population and the IHHO hyperparameters; Let the individual positions in the second Harris hawk population be used as a solution of the parameters to be identified in the parameter identification model ;
[0185] S52: Train / update the position of the IHHO algorithm according to the second data training set to obtain the second updated Harris hawk population, and based on the fitness function of the parameters to be identified constructed, obtain the individual position fitness values of the second updated Harris hawk population;
[0186] And the constructed fitness function of the parameters to be identified is
[0187] (19)
[0188] In the formula: represents the fitness function of the parameters to be identified; represents the number of data points in the second data training set; represents the th chip temperature in the second data training set; represents the corresponding chip temperature predicted value calculated according to the parameter identification model;
[0189] And 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 optimal solution of the parameters to be identified in the parameter identification model ;
[0190] The method of the temperature compensation circuit designed according to the temperature compensation model in this embodiment is a well-known prior art means. The main content of this embodiment lies in the method of obtaining the temperature compensation model, such as Figure 7 shown. 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 samples the signal using an ADC. The compensation module uses an MCU to achieve dynamic temperature compensation. The MCU calculates the piezoresistive chip temperature according to the ambient temperature through Equation (3) ; according to and calculates the calibrated pressure measurement result through Equation (4) ; The 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 result. The design content will not be elaborated here
[0191] As Figures 8 to 10 can be known, the beneficial effects of the method described in this embodiment are as follows: By analyzing the heat 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 piezoresistive chip temperature according to the ambient temperature. In addition, the present invention optimizes and improves the Harris hawk algorithm, combines the improved algorithm with the surface fitting algorithm, and obtains a calibration model for realizing the dynamic temperature compensation of the piezoresistive sensor, that is, the temperature compensation model, through training the parameter identification model. 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 the ambient temperature, the temperature drift error can be eliminated, and excellent dynamic temperature compensation effect can be obtained, significantly improving the measurement accuracy of the piezoresistive sensor in a complex environment and the temperature compensation effect in a dynamic environment
[0192] Finally, it should be noted that: The above embodiments are only used to illustrate the technical solutions of the present invention, not to limit them; Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: They can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some or all of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention
Claims
1. A dynamic temperature compensation method for piezoresistive sensors based on thermal impedance analysis and IHHO algorithm, characterized in that Specifically, it includes the following steps: S1: Construct a transient thermal impedance network in the heat transfer process of the piezoresistive sensor, and obtain a parameter identification model for calculating the piezoresistive chip temperature based on the environmental temperature based on the transient thermal impedance network; S2: Construct a surface fitting polynomial containing unknown polynomial coefficients; And the surface fitting polynomial is used to correct the output signal of the piezoresistive sensor in combination with the temperature drift characteristic of the piezoresistive sensor, so as to realize temperature compensation; S3: Obtain the calibration data of the piezoresistive sensor; And the calibration data is the output voltage when different input pressures are applied to the piezoresistive sensor after the temperature of the piezoresistive chip reaches the same as the environmental temperature; And the input pressure value, the output voltage, and the piezoresistive chip temperature are used as the first data training set; Based on the IHHO algorithm, train and obtain the unknown polynomial coefficients in the surface fitting polynomial according to the first data training set to obtain an optimized surface fitting polynomial; S4: Obtain the thermal characteristic calibration data of the piezoresistive sensor; And the thermal characteristic calibration data is the data curve of the environmental temperature changing with time and the data curve of the output voltage of the pressure sensor changing with time recorded while keeping the input pressure unchanged; Based on the optimized surface fitting polynomial, obtain the piezoresistive chip temperature data curve according to the thermal characteristic calibration data, and use the data curve of the environmental temperature changing with time and the piezoresistive chip temperature data curve as the second data training set; S5: Based on the parameter identification model and combined with the IHHO algorithm, obtain the to-be-identified parameters in the parameter identification model according to the second data training set to obtain a temperature compensation model for designing a temperature compensation circuit, and then realize the dynamic temperature compensation of the piezoresistive sensor through the temperature compensation model.
2. A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and IHHO algorithm according to claim 1, characterized in that, The transient thermal impedance network in the heat transfer process of the piezoresistive sensor constructed in S1 includes an external environmental heat source, a thermal resistance-thermal reactance module during the heat transfer process of the piezoresistive sensor, and a power source P for the self-heating loss power of the piezoresistive chip, which are connected in sequence. C ; and the thermal resistance-thermal reactance module includes a first thermal resistance R1, a second thermal resistance R2, a third thermal resistance R3, a fourth thermal resistance R4, a first heat capacity C1, a second heat capacity C2, a third heat capacity C3, and a fourth heat capacity C4; one end of the first thermal resistance R1 is connected to one end of the external environmental heat source, and the other end of the first thermal resistance R1 is connected to one end of the first heat capacity C1 and one end of the second thermal resistance R2; the other end of the second thermal resistance R2 is connected to one end of the second heat capacity C2 and one end of the third thermal resistance R3; the other end of the third thermal resistance R3 is connected to one end of the third heat capacity C3 and one end of the fourth thermal resistance R4; the other end of the fourth thermal resistance R4 is connected to one end of the power source P C and one end of the fourth heat capacity C4; and the other end of the power source P C is connected to the other ends of the first heat capacity C1, the second heat capacity C2, the third heat capacity C3, the fourth heat capacity C4, and the external environmental heat source and grounded.
3. A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm according to claim 1, characterized in that The method for obtaining the parameter identification model for calculating the piezoresistive chip temperature based on the environmental 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, and the expression of its network model is Where: T C (t) represents the temperature of the piezoresistive chip at time t; T A (t) represents the ambient temperature of the pressure sensor at time t; h i (t) represents an intermediate parameter; R i , C i respectively represent the thermal resistance and heat capacity of the i-th order transient thermal impedance network, where i = 1, 2, 3, 4; t represents the time parameter; S12: Set the intermediate variable τ i and τ i = R i · C i , simplify the network model of the transient thermal impedance network according to the intermediate variable τ i to obtain a parameter identification model for calculating the piezoresistive chip temperature based on the ambient temperature; And the expression of the parameter identification model is where: * represents the convolution operation; θ i and λ i represent the convolution kernel parameters, i.e., the parameters to be identified in the parameter identification model, and λ i = 1 / τ i .
4. A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm according to claim 1, characterized in that, The surface fitting polynomial containing unknown polynomial coefficients constructed in S2, its expression is Where: P j represents the j-th power of the pressure P applied to the piezoresistive sensor; represents the i-th power of the output voltage U out of the piezoresistive sensor; T C j represents the j-th power of the temperature T of the piezoresistive chip C ; a ij and b ij represent the unknown polynomial coefficients in the surface fitting polynomial.
5. A dynamic temperature compensation method for 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 to improve the HHO algorithm, And the dynamic factor includes a decay factor φ, a momentum factor α, and a balance factor γ; The improved IHHO algorithm specifically includes S100: Initialize the hyperparameters of the IHHO algorithm and the population individual positions of the Harris hawk group; S101: Obtain the prey escape energy in the IHHO algorithm by introducing a decay factor to determine the hunting strategy of the hawk group; And the expression of the improved prey escape energy E is In the formula: E0 represents the initial escape energy and randomly changes within the range of [-1, 1] each iteration; t represents the current iteration number; T represents the maximum number of iterations; φ represents the decay factor; The hunting strategy of the hawk group: confirm the absolute value |E| of the prey escape energy E; If |E|≥1, the Harris hawk group in the IHHO algorithm enters the exploration stage and executes step S102; If |E|<1, the Harris hawk group in the IHHO algorithm enters the exploitation stage and executes step S103; S102: Construct a position update mechanism by introducing a balance factor, and update the positions of the Harris hawks according to the position update mechanism to obtain a new Harris hawk population and continue to execute step S104; And the constructed position update mechanism is Where: X(t) and X(t + 1) respectively represent the positions of Harris hawks after the t-th iteration and the (t + 1)-th iteration; X rand (t) represents the position of a randomly selected hawk in the hawk group after the t-th iteration; X m (t) represents the average position of all hawks after the t-th iteration; X rabbit (t) represents the position of the prey after the t-th iteration; r1, r2, r3, r4, and q represent random values uniformly distributed within the range [0, 1]; UB and LB respectively represent the upper and lower limits of the variable X to be optimized; γ represents the balance factor; S103: Construct an attack strategy for the Harris hawks based on the prey escape probability r combined with the prey escape energy E, and update the positions of the Harris hawk population according to the attack strategy to obtain a new Harris hawk population and continue to execute step S104; And the specific attack strategy is: When r≥0.5 and |E|≥0.5, the Harris hawk population uses a soft siege strategy for position update, and the soft siege strategy is In the formula: J represents the jump intensity of the prey; r5 represents a random number within the range of [0,1]; When r≥0.5 and |E|<0.5, the Harris hawk population uses a tough siege strategy for position update, and the tough siege strategy is X(t + 1) = X rabbit (t) - E|X rabbit (t) - X(t)| (10) When r<0.5 and |E|≥0.5, the Harris hawk population uses a progressive dive soft siege strategy for position update, and the progressive dive soft siege strategy is X1 = X rabbit (t) - E|JX rabbit (t) - X(t)| (11) X2 = X1 + γ×rand(1,dim)×levy(dim) (12) In the formula: rand(1,dim) represents a 1×dim random vector; levy(dim) represents the Levy function; dim represents the number of variables X to be optimized; F(X1), F(X2) represent the fitness values of the individual positions in the Harris hawk population; When r<0.5 and |E|<0.5, the Harris hawk population uses a progressive dive tough siege strategy for position update, and the progressive dive tough siege strategy is X1 = X rabbit (t) - E|JX rabbit (t) - X m (t)| (14) X2 = X1 + rand(1,dim)×levy(dim) (15) S104: Introduce a momentum factor α into the IHHO algorithm, and assign X(t)+α[X(t)-X(t - 1)] as the final position of the Harris hawk after the t-th iteration to obtain an optimized Harris hawk population; And confirm whether the current iteration reaches the maximum number of iterations; If so, the final positions of the Harris hawks in the optimized Harris hawk population obtained at this time are the optimal solutions of the IHHO algorithm; Otherwise, repeat step S101 for the optimized Harris hawk population.
6. A dynamic temperature compensation method for a piezoresistive sensor based on thermal impedance analysis and the IHHO algorithm according to claim 5, characterized in that, In S3, based on the IHHO algorithm, train according to the first data training set and obtain the unknown polynomial coefficients in the surface fitting polynomial to obtain an optimized surface fitting polynomial, specifically including the following steps: S31: Initialize the algorithm parameters of the IHHO algorithm; And the algorithm parameters at least include a first initial Harris hawk population and IHHO hyperparameters; let the individual positions in the first Harris hawk population be a solution of the unknown polynomial coefficients a ij or b ij ; S32: Train / update the positions of the IHHO algorithm according to the first data training set to obtain the first updated Harris hawk population, and obtain the fitness values of the individual positions of the first updated Harris hawk population based on the constructed fitness function of the polynomial coefficients; And the fitness function of the constructed polynomial coefficients includes the fitness function fitness1 for training the unknown polynomial coefficient a ij and the fitness function fitness2 for training the unknown polynomial coefficient b ij whose expression is Where: N represents the number of data points in the first data training set; P i represents the i-th input pressure value in the first data training set; P pred,i represents the predicted value of the corresponding P obtained by calculating based on the surface fitting polynomial; T i represents the temperature of the i-th piezoresistive chip in the first data training set; T c,i represents the predicted value of the corresponding T obtained by calculating based on the surface fitting polynomial; T c,pred,i represents the predicted value of the corresponding T obtained by calculating based on the surface fitting polynomial; c,i And when the maximum number of iterations is reached, the Harris hawk individual position corresponding to the fitness value of the optimal individual in the final Harris hawk population is taken as the unknown polynomial coefficient a ij , b ij as the optimal solution.
7. A dynamic temperature compensation method for 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, obtain the parameters to be identified in the parameter identification model 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 the algorithm parameters of the IHHO algorithm; And the algorithm parameters at least include the second initial Harris hawk population and the IHHO hyperparameters; let the individual positions in the second Harris hawk population be the parameters to be identified θ in the parameter identification model i , λ i a solution of S52: Train the IHHO algorithm according to the second data training set / perform position update to obtain the second updated Harris hawk population, and based on the fitness function of the parameter to be identified constructed, obtain the individual position fitness values of the second updated Harris hawk population; And the fitness function of the parameter to be identified constructed is In the formula: denotes the fitness function of the parameter to be identified; N1 represents the number of data points in the second data training set; T i denotes the chip temperature of the i-th in the second data training set; T pred,i denotes the corresponding predicted chip temperature value obtained by calculation according to the parameter identification model; When the maximum number of iterations is reached, the Harris hawk individual position corresponding to the fitness value of the optimal individual in the final Harris hawk population is used as the parameter θ to be identified in the parameter identification model. i , λ i The optimal solution.
Citation Information
Patent Citations
Pressure sensor temperature compensation method based on improved grey wolf algorithm
CN114964571A
Dynamic temperature compensation method for diffused silicon water pressure sensor
CN118936695A