A quick self-adaptive decoupling method for temperature and pressure integrated composite sensor
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2024-05-11
- Publication Date
- 2026-08-07
AI Technical Summary
[0007]鉴于上述的分析,本发明实施例旨在提供一种温压一体化复合传感器快速自适应解耦方法,用以解决现有从温压一体化复合传感器的电信号中解耦出温度值或压力值精度低和速度慢的技术问题
[0057] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
Smart Images

Figure CN118468933B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent sensor technology, and in particular to a rapid adaptive decoupling method for an integrated temperature and pressure composite sensor. Background Technology
[0002] With the development of the times and the advancement of technology, sensors that measure single physical quantities can no longer meet the needs of daily research and practical use. Multi-parameter integrated composite measurement intelligent sensing systems and intelligent sensing elements have emerged as a result. Multi-parameter integrated composite sensors integrate sensitive chips that measure multiple physical quantities, enabling the sensor to meet various requirements such as functional diversity, accurate information acquisition, and size controllability.
[0003] Temperature and pressure measurement are among the largest measurement categories in the sensor field. Integrated temperature and pressure composite sensors have shown promising application prospects in industries such as aerospace, automobile manufacturing, and environmental monitoring.
[0004] However, due to errors in physical structure and manufacturing process, the sensor measurement parameters inevitably affect each other and produce mutual coupling, which greatly reduces the measurement accuracy of the sensor and fails to meet the needs of actual use. Therefore, it is necessary to decouple the sensor parameters.
[0005] Traditional sensor decoupling employs interpolation calibration. First, several sets of calibration electrical signals are acquired, and their corresponding calibration temperature and pressure values are measured, forming a standard data lookup table. Then, the electrical signals of the multi-parameter integrated composite measurement sensor are acquired, and n sets of the closest calibration electrical signals are selected from the standard data lookup table, where n is a preset constant. The corresponding temperature and pressure values of these n sets of calibration electrical signals are acquired and interpolated to obtain the temperature and pressure values measured by the integrated temperature and pressure measurement sensor. While interpolation calibration is fast, its accuracy is low, making it unsuitable for applications requiring high precision. Interpolation calibration relies on only a limited number of calibration points, while the operation of actual integrated temperature and pressure sensors is affected by many more factors, such as nonlinear effects and temperature gradients. Therefore, for applications requiring higher precision, traditional interpolation calibration methods cannot meet the requirements.
[0006] In summary, there is an urgent need for a decoupling method for integrated temperature and pressure measurement sensors based on an adaptive learning rate optimized BP neural network to solve the above problems, decouple temperature and pressure values from the electrical signals of the integrated temperature and pressure sensor, and enable the decoupling model to have high accuracy and fast calculation speed. Summary of the Invention
[0007] Based on the above analysis, the present invention aims to provide a fast adaptive decoupling method for an integrated temperature and pressure sensor, in order to solve the technical problems of low accuracy and slow speed in decoupling temperature or pressure values from the electrical signals of the integrated temperature and pressure sensor.
[0008] The rapid adaptive decoupling method for an integrated temperature and pressure sensor disclosed in this invention includes the following steps:
[0009] The bridge voltage signal and its corresponding temperature and pressure values are obtained using a data acquisition model of an integrated temperature and pressure measurement sensor. A first sample dataset is constructed based on the bridge voltage signal and the corresponding temperature value, and a second sample dataset is constructed based on the bridge voltage signal and the corresponding pressure value.
[0010] A temperature prediction BP neural network model and a pressure prediction BP neural network model are established. The temperature prediction BP neural network model is trained using the first sample dataset, and the pressure prediction BP neural network model is trained using the second sample dataset. During each training iteration, a loss function is calculated, and the learning rate of the weights and biases is optimized using the loss function. During backpropagation, the optimized learning rate is used to fine-tune the weights and biases. Training ends when the prediction accuracy meets the requirements, and the trained temperature prediction BP neural network model and pressure prediction BP neural network model are obtained as a fast adaptive decoupling model for the integrated temperature and pressure sensor.
[0011] The real-time bridge voltage signal is input into the rapid adaptive decoupling model of the integrated temperature and pressure sensor to obtain the real-time decoupled temperature and pressure values.
[0012] Further, the construction of the first sample dataset based on the bridge voltage signal and the corresponding temperature value, and the construction of the second sample dataset based on the bridge voltage signal and the corresponding pressure value, include:
[0013] The bridge voltage signal U = (U) is normalized using the Z-score method. ac U bd Normalize the signal to obtain the normalized bridge voltage signal. Among them, U ac U bd These are the bridge voltages obtained using a data acquisition model based on an integrated temperature and pressure sensor. and U ac U bd The bridge voltage after normalization;
[0014] Perturbations are applied to the temperature value T and pressure value P corresponding to the bridge voltage signal U to obtain the perturbed temperature value. and pressure value as follows:
[0015]
[0016] Among them, F T F P These represent the expected accuracy of temperature value T and pressure value P, respectively, and N is Gaussian white noise;
[0017] The samples in the first sample dataset were obtained respectively. Samples in the second sample dataset
[0018] Furthermore, optimizing the learning rate of the weights and biases using the loss function includes:
[0019] Calculate the derivatives of the loss function with respect to the weight matrix and the bias matrix;
[0020] Based on the derivatives i of the loss function with respect to the weight matrix and the bias matrix ω and i θ Calculate the learning rate for the weights and biases respectively.
[0021] Furthermore, the learning rate for the weights and biases is calculated as follows:
[0022]
[0023] Where η1 is the minimum learning rate, η2 is the maximum learning rate, k is the learning rate adjustment coefficient, and when calculating the learning rate for the weights, i is the derivative of the loss function E with respect to the weight matrix. ω Otherwise, when calculating the learning rate of the bias, i is the derivative of the loss function E with respect to the bias matrix. θ .
[0024] Furthermore, the mean square error E between the calibration data value and the output value of the temperature or pressure prediction BP neural network model is calculated as the loss function, as follows:
[0025]
[0026] Among them, the calibration data value y k The temperature value after perturbation in the sample or pressure value n is the number of nodes in the output layer;
[0027] In the temperature prediction BP neural network model, the output value β j To predict temperature values, y k The temperature value after perturbation in the sample
[0028] In the pressure prediction BP neural network model, the output value β j To predict pressure values, y k The pressure value after disturbance in the sample
[0029] Furthermore, the activation function of the hidden layer neurons in the temperature or pressure prediction BP neural network model is the Sigmoid function, denoted as g(), and the derivative of g() is as follows;
[0030]
[0031] Where x is the input of the hidden layer.
[0032] Furthermore, calculate the derivative i of the loss function E with respect to the weight matrix. ω ,as follows:
[0033]
[0034] Calculate the derivative of the loss function E with respect to the bias matrix. θ ,as follows:
[0035]
[0036] Among them, W (3) X (3) and θ (3) These are the weight matrix, input matrix, and bias matrix from the hidden layer to the output layer, respectively. (L) Let θ be the weight matrix from layer (L-1) to layer L. (L) Let X be the bias matrix from layer (L-1) to layer L. (L) Let Y be the input matrix of the Lth layer. k To calibrate the data value matrix, i.e., the temperature values in the first or second sample dataset after adding perturbation. or pressure value
[0037] Furthermore, the weights for the next training iteration are:
[0038]
[0039] Where, η W (i ω () represents the learning rate for the weights;
[0040] The bias for the next training iteration is:
[0041]
[0042] Where L is the number of layers in the BP neural network model, z is the number of iterations, and η θ (iθ ) represents the bias learning rate.
[0043] Furthermore, during training, the weights and biases of the temperature or pressure prediction BP neural network model are defined as follows:
[0044] When initializing the temperature and pressure BP neural network model, the initial values of the weights and biases are randomly generated.
[0045] The weights from the input layer to the hidden layer are ω ih (2) The bias is θ h (2) , where i is the input layer neuron and h is the hidden layer neuron;
[0046] The weights from the hidden layer to the output layer are ω hj (3) The bias is θ j (3) j represents the output layer neuron;
[0047] Based on the activation function of the hidden layer neurons, the output α of the h-th neuron in the hidden layer h ,as follows:
[0048]
[0049] Where, x i (2) The input to the hidden layer is the preprocessed bridge voltage signal, and the input matrix X is... (2) Matrix elements, ω ih (2) θ h 2 These represent the weights and biases from the input layer to the hidden layer, respectively, and W represents the weight matrix. (2) and bias matrix θ (2) The matrix elements are: n is the number of output layer nodes, and g() is the activation function of the hidden layer neurons.
[0050] The output β of the j-th neuron in the output layer j ,as follows:
[0051] x i (3) =α h
[0052]
[0053] Where, x i (3) The input to the output layer is represented by α, which is the output of the hidden layer. h ω hj(3) θ j (3) , where are the weights and biases from the hidden layer to the output layer, respectively; s is the number of nodes in the hidden layer; and g() is the activation function of the output layer.
[0054] Furthermore, the number of input and output values of the integrated temperature and pressure measurement sensor are respectively used as the number of input and output layer nodes of the temperature prediction BP neural network model or the pressure prediction BP neural network model;
[0055] The temperature or pressure prediction BP neural network models all include an input layer, a hidden layer, and an output layer;
[0056] The network model topology is msn; where m, s, and n are the number of nodes in the input layer, hidden layer, and output layer, respectively.
[0057] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0058] 1. The rapid adaptive decoupling method for the temperature and pressure integrated composite sensor disclosed in this invention adopts a BP neural network model, namely a temperature prediction BP neural network model and a pressure prediction BP neural network model. Based on the learning of the first sample dataset and the second sample dataset, decoupling training is performed, which can more accurately decouple temperature and pressure values. Compared with traditional interpolation calibration methods, the decoupling accuracy is improved, thereby enhancing the measurement performance of the sensor.
[0059] 2. An adaptive learning rate optimization method is introduced, which integrates the adaptive learning rate into the backpropagation process of the temperature prediction BP neural network model and the pressure prediction neural network model. This can improve the learning rate while ensuring decoupling accuracy and precision, thereby improving production efficiency and response speed.
[0060] 3. The network model was trained using a sample training set, and it was found that within a certain range, the accuracy of decoupling temperature and pressure values was high, reaching 99.27% and 98.18% respectively. This indicates that the technical solution can achieve high accuracy and reliability in practical applications.
[0061] 4. This invention improves both the accuracy of decoupling and the training speed, enabling the integrated temperature and pressure sensor to better adapt to the needs of different application scenarios and achieve a balance between the accuracy and efficiency of decoupling temperature and pressure values.
[0062] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0063] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0064] Figure 1 Flowchart of a rapid adaptive decoupling method for an integrated temperature and pressure sensor;
[0065] Figure 2 This is a schematic diagram of the original data acquisition model for the integrated temperature and pressure measurement sensor.
[0066] Figure 3 Bridge voltage U under different temperatures and pressures ac U bd Output table;
[0067] Figure 4 Topology diagram of a BP neural network model for temperature and pressure prediction;
[0068] Figure 5 A schematic diagram illustrating the temperature value decoupled from the rapid adaptive decoupling model of the integrated temperature and pressure sensor.
[0069] Figure 6 A schematic diagram illustrating the decoupling of pressure values from a rapid adaptive decoupling model of an integrated temperature and pressure sensor. Detailed Implementation
[0070] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0071] This invention proposes a fast adaptive decoupling method for an integrated temperature and pressure sensor. This method utilizes a BP neural network to learn from a large number of samples to improve decoupling accuracy, and uses an adaptive learning rate to optimize network parameters to improve network training speed, thereby achieving the goal of balancing decoupling accuracy and computational speed.
[0072] The present invention discloses a rapid adaptive decoupling method for an integrated temperature and pressure sensor. First, a digital model for data acquisition of the integrated temperature and pressure sensor is established. Simulation and fitting are used to generate data containing the relationship between electrical signals and temperature and pressure, thus generating a dataset. The training set is used to train an improved BP neural network based on an adaptive learning rate, and the test set is used to verify the decoupling effect of the neural network, thereby achieving the goal of rapid and accurate decoupling of the integrated temperature and pressure sensor.
[0073] like Figure 1 As shown in the figure, a specific embodiment of the present invention discloses a fast adaptive decoupling method for an integrated temperature and pressure sensor, comprising the following steps:
[0074] Step S1: Use the integrated temperature and pressure measurement sensor data acquisition model to obtain the bridge voltage signal and its corresponding temperature and pressure values. Construct a first sample dataset based on the bridge voltage signal and the corresponding temperature value, and construct a second sample dataset based on the bridge voltage signal and the corresponding pressure value.
[0075] Step S2: Establish a temperature prediction BP neural network model and a pressure prediction BP neural network model; train the temperature prediction BP neural network model using the first sample dataset and the pressure prediction BP neural network model using the second sample dataset; calculate the loss function during each training iteration, and optimize the learning rate of the weights and biases using the loss function; fine-tune the weights and biases using the optimized learning rate during backpropagation; training ends when the prediction accuracy meets the requirements, and the trained temperature prediction BP neural network model and pressure prediction BP neural network model are obtained as a fast adaptive decoupling model for the integrated temperature and pressure sensor.
[0076] Step S3: Input the real-time bridge voltage signal into the rapid adaptive decoupling model of the integrated temperature and pressure sensor to obtain the real-time decoupled temperature and pressure values.
[0077] Step S1 is divided into steps S11-S12, specifically.
[0078] By combining the digital model of the integrated temperature and pressure sensor, an adaptive learning rate-optimized BP neural network model is used to decouple temperature and pressure, and simultaneously obtain temperature and pressure values.
[0079] Step S11: Establish a temperature and pressure integrated composite measurement sensor acquisition model, obtain the bridge voltage signal U, and then fit the corresponding temperature value T and pressure value P.
[0080] Collect data from existing temperature and pressure composite sensors, including the voltage signals output by the sensors and the corresponding actual temperature and pressure values;
[0081] Based on circuit relationships and physical principles, a mathematical model of an integrated temperature and pressure measurement sensor is established, which shows the mathematical relationships between output voltage U and temperature T and pressure P, respectively.
[0082] A mathematical model of an integrated temperature and pressure measurement sensor was established, and a multi-parameter coupled simulation signal was generated by fitting the model. Data was collected to generate a sample dataset of bridge voltage signal U and temperature value T and pressure value P.
[0083] like Figure 2 As shown, a force-sensitive full-bridge sensor composed of four resistors is photolithographically etched on a semiconductor silicon wafer. This is the original data acquisition model diagram of the temperature and pressure integrated composite measurement sensor. R1, R2, R3, and R4 are the bridge arm resistors, and the bridge voltage U is acquired. bd and U ac The bridge voltage signal output by the sensor is measured as a temperature-pressure composite sensor.
[0084] Based on the bridge voltage signal U=(U ac U bd The temperature value T is fitted, as shown in formulas (1)-(3):
[0085]
[0086] ΔT=(U bd -U bd0 )T err.fs / U bd.fs Formula (2)
[0087] T = T1 + ΔT Formula (3)
[0088] Where T1 is the current temperature value, U bd0 The bridge voltage value U is the output measured at the current temperature T1 and pressure of 0 MPa. bd ;T err.fs This represents the maximum error value obtained when fitting temperature parameters at full scale under the current temperature T1; U bd.fs The bridge voltage value U is the output voltage when the pressure is at full scale at the current temperature T1. bd T represents the fitted temperature value of the actual environment.
[0089] Based on bridge voltage signal U(U) ac U bd The fitted temperature value T and the fitted pressure value P are shown in formulas (4)-(7):
[0090]
[0091]
[0092] e T=0.411×P Formula (6)
[0093] P = P1 + ΔP (Formula 7)
[0094] Where P1 is the current pressure value, This refers to the pressure error value at temperature T1 and pressure P1. The pressure error value is defined as follows: T'1 refers to the calibration temperature value that is less than T and has the smallest difference from T; T'2 refers to the calibration temperature value that is greater than T and has the largest difference from T; and P is the pressure value in the actual environment.
[0095] The unit for temperature is °C, and the unit for pressure is MPa.
[0096] Based on the digital model, and using the collected U... ac U bd A multi-parameter coupled simulation signal is fitted and generated. Temperature values T and pressure values P corresponding to the bridge voltage signal U are also fitted and generated. Based on the bridge voltage signal U and its corresponding temperature and pressure values T and P, a sample dataset is constructed. For example... Figure 3 As shown.
[0097] The bridge voltage signal U(U) is obtained through the above digital model simulation. ac U bd The data sets are accurate and can be fitted to obtain the corresponding temperature and pressure values T and P, which helps in the subsequent steps of training the temperature prediction BP neural network model and the pressure prediction BP neural network model.
[0098] The acquisition model can accurately fit the relationship between the bridge voltage signal and temperature and pressure values. The trained temperature prediction BP neural network model and pressure prediction BP neural network model will have better performance and generalization ability. If there are missing temperature or pressure values, the acquisition model can compensate for the missing temperature and pressure values by fitting the existing bridge voltage signal.
[0099] U=(U ac U bd ) is the voltage signal output by the temperature and pressure composite sensor.
[0100] U=(U ac U bd As input data for the subsequent step of the rapid adaptive decoupling network model of the temperature and pressure integrated composite sensor, T and P are the temperature and pressure values in the actual environment where the sensor is located, respectively.
[0101] The bridge voltage signal U and its corresponding temperature value T and pressure value P are obtained using a data acquisition model of an integrated temperature and pressure measurement sensor. Based on the bridge voltage signal U = (Uac U bd The first sample dataset is constructed based on the bridge voltage signal U = (U...) and the corresponding temperature value T. ac U bd The second sample dataset is constructed using the pressure values P and the corresponding pressure values.
[0102] For example, the first sample dataset and the second dataset each have 10,000 samples.
[0103] Step S12: Normalize the bridge voltage signal U and add perturbations to the temperature value T and pressure value P.
[0104] The construction of the first sample dataset based on the bridge voltage signal and the corresponding temperature value, and the construction of the second sample dataset based on the bridge voltage signal and the corresponding pressure value, include:
[0105] The bridge voltage signal U = (U) is normalized using the Z-score method. ac U bd Normalize the signal to obtain the normalized bridge voltage signal. Among them, U ac U bd These are the bridge voltages obtained using a data acquisition model based on an integrated temperature and pressure sensor. and U ac U bd The bridge voltage after normalization;
[0106] Perturbations are applied to the temperature value T and pressure value P corresponding to the bridge voltage signal U to obtain the perturbed temperature value. and pressure value as follows:
[0107]
[0108] Among them, F T F P These represent the expected accuracy of temperature value T and pressure value P, respectively, and N is Gaussian white noise;
[0109] The samples in the first sample dataset were obtained respectively. Samples in the second sample dataset
[0110] Data from commercially available temperature and pressure composite sensors reveals that the two voltage parameters, U... ac U bdThe dimensions of these metrics often differ by several orders of magnitude, which can significantly impact parameter updates. The larger the metric's dimension, the greater its influence on gradient updates. Therefore, data normalization is necessary before decoupling to eliminate the influence of different metric dimensions and bring all metrics to the same order of magnitude.
[0111] By using the Z-score normalization method to normalize the bridge voltage signal, normalized bridge voltage data can be obtained. and The normalized bridge voltage values are shown in formulas (9)-(10):
[0112]
[0113]
[0114] in, U represents the normalized value of the bridge voltage. aci U bdi Let μ be the value of the i-th bridge voltage. aci μ bdi U aci U bdi The mean of all sample data, σ aci σ bdi U aci U bdi The standard deviation of all sample data, where i is the i-th sample data.
[0115] For each sample data point, the temperature value T and pressure value P are respectively perturbed to simulate the error generated by data acquisition under real-world conditions, in order to prevent network overfitting and make the digital model of the integrated temperature and pressure sensor more robust.
[0116] Finally, the samples in the first sample dataset were obtained respectively. Samples in the second sample dataset
[0117] The preprocessed bridge voltage signal As inputs to the temperature prediction BP neural network model and the pressure prediction BP neural network model respectively, the corresponding temperature values Pressure values serve as calibration data for the BP neural network model for temperature prediction. As calibration data values for a pressure prediction BP neural network model.
[0118] Step S2 is divided into steps S21-S23, specifically.
[0119] Step S21: Establish a BP neural network model for temperature prediction and a BP neural network model for pressure prediction.
[0120] When establishing the temperature prediction BP neural network model and the pressure prediction neural network model, the topology of the temperature prediction BP neural network model and the pressure prediction neural network model is determined based on the number of input and output values of the integrated temperature and pressure measurement sensor.
[0121] The number of input and output values of the integrated temperature and pressure measurement sensor are used as the number of input and output layer nodes of the temperature prediction BP neural network model or the pressure prediction BP neural network model, respectively.
[0122] The temperature or pressure prediction BP neural network models all include an input layer, a hidden layer, and an output layer;
[0123] The model's topology is msn; where m, s, and n are the number of nodes in the input layer, hidden layer, and output layer, respectively.
[0124] The temperature prediction BP neural network model and the pressure prediction neural network model have completely identical topological structures. For example... Figure 4 As shown.
[0125] It consists of three layers: an input layer, a hidden layer, and an output layer.
[0126] The number of input layer nodes, n, is 2, which is equal to the number of input values of the integrated temperature and pressure measurement sensor.
[0127] The number of output layer nodes, m, is 1, which is the same as the number of output values of the integrated temperature and pressure measurement sensor.
[0128] Based on experience and practice, the number of hidden layer nodes, s, is set to 20.
[0129] The topology of the temperature prediction BP neural network model and the pressure prediction BP neural network model used in this invention is: nsm, where m, s and n are the number of nodes in the input layer, hidden layer and output layer, respectively.
[0130] The temperature prediction BP neural network model and the pressure prediction neural network model are initialized, and the initial values of the weights and biases of the two models are randomly generated.
[0131] Step S22: Train the temperature prediction BP neural network model using the first sample dataset, and train the pressure prediction BP neural network model using the second sample dataset.
[0132] 90% of the total number of samples in the first sample dataset were randomly read as the training set for the temperature prediction BP neural network model, and the remaining 10% was used as the test set to test the performance of the temperature prediction BP neural network model.
[0133] Similarly, 90% of the total number of samples in the second sample dataset were randomly read as the training set for the stress prediction BP neural network model, and the remaining 10% was used as the test set to test the performance of the stress prediction BP neural network model.
[0134] Step S23: During each training iteration, calculate the loss function and use the loss function to optimize the learning rate of the weights and biases. During backpropagation, use the optimized learning rate to fine-tune the weights and biases.
[0135] During each training iteration, the training set is forward propagated to calculate the loss function. Through backpropagation, the derivative of the loss function with respect to the weights and biases is calculated. Based on the derivative of the loss function with respect to the weights and biases, the learning rate of the weights and the learning rate of the biases are adaptively updated and adjusted, thereby adjusting the training speed of the BP neural network model until the prediction accuracy meets the requirements, at which point the training ends.
[0136] At this point, we obtain well-trained, high-performance temperature prediction BP neural network models and pressure prediction neural network models, and use a test set to verify the performance of the network models.
[0137] During training, the weights and biases of the temperature or pressure prediction BP neural network model are defined as follows:
[0138] When initializing the temperature and pressure BP neural network model, the initial values of the weights and biases are randomly generated.
[0139] The weights from the input layer to the hidden layer are ω ih (2) The bias is θ h (2) , where i is the input layer neuron and h is the hidden layer neuron;
[0140] The weights from the hidden layer to the output layer are ω hj (3) The bias is θ j (3) j represents the output layer neuron;
[0141] Based on the activation function of the hidden layer neurons, the output α of the h-th neuron in the hidden layer h ,as follows:
[0142]
[0143] Where, xi (2) The input to the hidden layer is the preprocessed bridge voltage signal, and the input matrix X is... (2) Matrix elements, ω ih (2) θ h 2 These represent the weights and biases from the input layer to the hidden layer, respectively, and W represents the weight matrix. (2) and bias matrix θ (2) The matrix elements are: n is the number of output layer nodes, and g() is the activation function of the hidden layer neurons.
[0144] The output β of the j-th neuron in the output layer j ,as follows:
[0145] x i (3) =α h Formula (11)
[0146]
[0147] Where, x i (3) The input to the output layer is represented by α, which is the output of the hidden layer. h ω hj (3) θ j (3) , where are the weights and biases from the hidden layer to the output layer, respectively; s is the number of nodes in the hidden layer; and g() is the activation function of the output layer.
[0148] Input matrix Where p is the number of samples.
[0149] The weight matrix between the input layer and the hidden layer is a 20-row, 2-column matrix, with the number of rows representing the number of hidden layer nodes and the number of columns representing the number of input layer nodes.
[0150] The bias matrix between the input layer and the hidden layer is a 20-row, 2-column matrix, with the number of rows representing the number of hidden layer nodes and the number of columns representing the number of output layer nodes.
[0151] The weight matrix between the hidden layer and the output layer is a 1-row, 20-column matrix, with the number of rows representing the number of output layer nodes and the number of columns representing the number of hidden layer nodes.
[0152] The bias matrix between the hidden layer and the output layer is a 1-row, 20-column matrix, with the number of rows representing the number of output layer nodes and the number of columns representing the number of hidden layer nodes.
[0153] The weights from the input layer to the hidden layer are ω ih The bias is θ h , where i is the input layer neuron and h is the hidden layer neuron;
[0154] The weights from the hidden layer to the output layer are ω hj The bias is θ j , where h represents hidden layer neurons and j represents output layer neurons.
[0155] The activation function for neurons in the hidden layer is the Sigmoid function, denoted as g().
[0156]
[0157] Where x is the input of the hidden layer.
[0158] Optimizing the learning rate of the weights and biases using a loss function includes:
[0159] Calculate the derivatives of the loss function with respect to the weight matrix and the bias matrix;
[0160] Based on the derivatives i of the loss function with respect to the weight matrix and the bias matrix ω and i θ Calculate the learning rate for the weights and biases respectively.
[0161] During the forward propagation of model training, the loss function is calculated.
[0162] The mean squared error E between the calibration data value and the output value of the temperature or pressure prediction BP neural network model is calculated as the loss function, as follows:
[0163]
[0164] Among them, the calibration data value y k The temperature value after perturbation in the sample or pressure value n is the number of nodes in the output layer;
[0165] In the temperature prediction BP neural network model, the output value β j To predict temperature values, y k The temperature value after perturbation in the sample
[0166] In the pressure prediction BP neural network model, the output value β j To predict pressure values, y k The pressure value after disturbance in the sample
[0167] For the temperature prediction BP network model, the output temperature value T is;
[0168] For the pressure prediction BP network model, the output pressure value P is determined.
[0169] The larger the loss function E, the faster the learning and training speed; the smaller the loss function E, the higher the training and learning accuracy.
[0170] In backpropagation, the weights and biases of the temperature prediction BP neural network model or the pressure prediction BP neural network model are adjusted. Gradient descent is used to adjust the weights and biases so that the loss function E continuously decreases, thereby achieving the training objective.
[0171] Training stops when the prediction accuracy meets the requirements.
[0172] For example, the required accuracy is set to 1×10. -3 The expected accuracy value can be set according to the specific business application.
[0173] In backpropagation, a small learning rate η can lead to slow convergence, while a large rate can negatively impact accuracy. During training, a fixed level of accuracy may not meet practical requirements. To accelerate convergence while maintaining accuracy, an adaptive learning rate is chosen, allowing it to be adjusted appropriately during training.
[0174] When the number of training iterations is small, the error is large, and the learning rate should be increased to achieve faster convergence; when the number of training iterations is large, the error is small, and the learning rate should be decreased to improve accuracy and avoid oscillations in the solution.
[0175] The learning rate for the weights and biases is calculated as follows:
[0176]
[0177] Where η1 is the minimum learning rate, η2 is the maximum learning rate, k is the learning rate adjustment coefficient, and when calculating the learning rate for the weights, i is the derivative of the loss function E with respect to the weight matrix. ω Otherwise, when calculating the learning rate of the bias, i is the derivative of the loss function E with respect to the bias matrix. θ .
[0178] When calculating the learning rate for the weights, i is the derivative of the loss function with respect to the weights;
[0179] When calculating the learning rate of the bias, i is the derivative of the loss function with respect to the bias.
[0180] k is the learning rate adjustment coefficient, a constant obtained from multiple experiments;
[0181] As the number of training epochs increases, the value of i approaches 0, and the change in the learning rate η(i) gradually decreases until training stagnates. Therefore, it is necessary to use 10... k Adjust the sensitivity of η(i) to i.
[0182] The activation function of the hidden layer neurons in the temperature or pressure prediction BP neural network model is the Sigmoid function, denoted as g(), and the derivative of g() is as follows;
[0183]
[0184] Where x is the input of the hidden layer.
[0185] In each iteration, the learning rates of the weights and biases are updated based on the derivatives of the loss function with respect to the weights and biases, respectively. The learning rate is adaptively adjusted by calculating the difference between the network output value and the calibration value.
[0186] Calculate the derivative of the loss function E with respect to the weight matrix, i. ω ,as follows:
[0187]
[0188] Right now
[0189]
[0190] Calculate the derivative of the loss function E with respect to the bias matrix. θ ,as follows:
[0191]
[0192] Right now
[0193]
[0194] Among them, W (3) X (3) and θ (3) The weight matrix, input matrix, and bias matrix from the hidden layer to the output layer, W, are respectively. (L) Let θ be the weight matrix from layer (L-1) to layer L. (L) Let X be the bias matrix from layer (L-1) to layer L. (L) Let Y be the input matrix of the Lth layer. k To calibrate the data value matrix, i.e., the temperature values in the first or second sample dataset after adding perturbation. or pressure value
[0195] During each training iteration, the derivative of the loss function E with respect to the weights and biases is calculated. ω and i θ The learning rates for the weights and biases are calculated separately. The learning rates for the weights and biases are adaptively adjusted by calculating the mean square error between the output values of the temperature prediction neural network model and the pressure prediction BP neural network model and the calibration data values.
[0196] The weights for the next training iteration are:
[0197]
[0198] Where, η W (i ω () represents the learning rate for the weights;
[0199] The bias for the next training iteration is:
[0200]
[0201] Where L is the number of layers in the BP neural network model, z is the number of iterations, and η θ (i θ ) represents the bias learning rate.
[0202] The network model is iterated until the prediction accuracy meets the requirements, at which point training stops, and a test set is used to verify the network performance.
[0203] The learning rate is a crucial hyperparameter for training a backpropagation (BP) neural network model. It determines the step size for updating the network parameters (weights and biases) in each iteration. BP neural network models use the gradient descent algorithm to optimize network parameters, and the learning rate is a key parameter within this algorithm.
[0204] Specifically, the learning rate controls the magnitude of each parameter's (weights and biases) update; that is, the size of the parameter update along the gradient direction in each iteration. If the learning rate is set too small, the network will converge slowly, potentially requiring more iterations to achieve the desired performance. Conversely, if the learning rate is set too large, it may lead to excessive parameter updates, missing the optimal solution, or even causing model instability or divergence.
[0205] The learning rate directly affects the update process of neural network parameters, thus affecting the network's convergence speed and performance.
[0206] The temperature prediction BP neural network model was tested and validated using the test set of the first sample dataset, and the corresponding temperature values were output.
[0207] The pressure prediction BP neural network model was tested and validated using the test set of the second sample dataset, and the corresponding pressure values were output.
[0208] Experiments show that within the 0.2% FS (Full Scale) range, the accuracy of the BP neural network model for predicting temperature decoupled is 99.27%; and the accuracy of the BP neural network model for predicting pressure decoupled is 98.18%.
[0209] After establishing a BP neural network model for temperature prediction and a neural network model for pressure prediction based on adaptive learning rate optimization, the two models serve as a rapid adaptive decoupling model for the integrated temperature and pressure sensor.
[0210] Therefore, it can be seen that the fast adaptive decoupling model of the temperature and pressure integrated composite sensor established by the fast adaptive decoupling method can achieve relatively accurate decoupling and improve the network training speed, thus achieving the goal of balancing decoupling accuracy and computational speed.
[0211] Step S3, specifically.
[0212] The real-time acquired bridge voltage signal is input into the rapid adaptive decoupling model of the integrated temperature and pressure sensor to obtain real-time decoupled temperature and pressure values.
[0213] Compared to traditional BP neural network models, the temperature prediction BP neural network model based on adaptive learning rate optimization is 3% faster when training on temperature data, and the stress prediction BP neural network model is 82.5% faster when training on stress data.
[0214] like Figure 5 As shown, this is a schematic diagram of the real-time decoupling of temperature values from the rapid adaptive decoupling model of the integrated temperature and pressure sensor; the horizontal axis represents the sample number, and the vertical axis represents the target and predicted temperature values. It can be seen that the predicted value matches the target value.
[0215] like Figure 6 The diagram shows the real-time decoupling of pressure values from the rapid adaptive decoupling model of the integrated temperature and pressure sensor. The horizontal axis represents the sample number, and the vertical axis represents the target and predicted pressure values. It can be seen that the predicted values match the target values.
[0216] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0217] 1. The rapid adaptive decoupling method for the temperature and pressure integrated composite sensor disclosed in this invention adopts a BP neural network model, namely a temperature prediction BP neural network model and a pressure prediction BP neural network model. Based on the learning of the first sample dataset and the second sample dataset, decoupling training is performed, which can more accurately decouple temperature and pressure values. Compared with traditional interpolation calibration methods, the decoupling accuracy is improved, thereby enhancing the measurement performance of the sensor.
[0218] 2. An adaptive learning rate optimization method is introduced, which integrates the adaptive learning rate into the backpropagation process of the temperature prediction BP neural network model and the pressure prediction neural network model. This can improve the learning rate while ensuring decoupling accuracy and precision, thereby improving production efficiency and response speed.
[0219] 3. The network model was trained using a sample training set, and it was found that within a certain range, the accuracy of decoupling temperature and pressure values was high, reaching 99.27% and 98.18% respectively. This indicates that the technical solution can achieve high accuracy and reliability in practical applications.
[0220] 4. This invention improves both the accuracy of decoupling and the training speed, enabling the integrated temperature and pressure sensor to better adapt to the needs of different application scenarios and achieve a balance between the accuracy and efficiency of decoupling temperature and pressure values.
[0221] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0222] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A rapid adaptive decoupling method for an integrated temperature and pressure sensor, characterized in that, Includes the following steps: The bridge voltage signal and its corresponding temperature and pressure values are obtained using a data acquisition model of an integrated temperature and pressure measurement sensor. A first sample dataset is constructed based on the bridge voltage signal and the corresponding temperature value, and a second sample dataset is constructed based on the bridge voltage signal and the corresponding pressure value. Establish a BP neural network model for temperature prediction and a BP neural network model for pressure prediction; train the BP neural network model for temperature prediction using the first sample dataset, and train the BP neural network model for pressure prediction using the second sample dataset; During each training iteration, a loss function is calculated, and the learning rate of the weights and biases is optimized using the loss function. During backpropagation, the optimized learning rate is used to fine-tune the weights and biases. Training ends when the prediction accuracy meets the requirements, and the trained temperature prediction BP neural network model and pressure prediction BP neural network model are obtained as a fast adaptive decoupling model for the integrated temperature and pressure sensor. During training, the weights and biases of the temperature or pressure prediction BP neural network model are defined as follows: When initializing the temperature and pressure BP neural network model, the initial values of the weights and biases are randomly generated. The weights from the input layer to the hidden layer are The bias is ,in For input layer neurons, These are hidden layer neurons; The weights from the hidden layer to the output layer are The bias is , For output layer neurons; Based on the activation function of the hidden layer neurons, the hidden layer's first... The output of each neuron ,as follows: in, The input to the hidden layer is the preprocessed bridge voltage signal, and the input matrix is... matrix elements, , These represent the weights and biases from the input layer to the hidden layer, respectively, and are the weight matrices. and bias matrix The matrix elements are: n is the number of output layer nodes, and g() is the activation function of the hidden layer neurons. Output layer The output of each neuron ,as follows: in, The input to the output layer is the output of the hidden layer. , , , where are the weights and biases from the hidden layer to the output layer, s is the number of nodes in the hidden layer, and g() is the activation function of the output layer; The number of input and output values of the integrated temperature and pressure measurement sensor are used as the number of input and output layer nodes of the temperature prediction BP neural network model or the pressure prediction BP neural network model, respectively. The temperature or pressure prediction BP neural network models all include an input layer, a hidden layer, and an output layer; The topology of the network model is Where m, s, and n are the number of nodes in the input layer, hidden layer, and output layer, respectively; The real-time bridge voltage signal is input into the rapid adaptive decoupling model of the integrated temperature and pressure sensor to obtain the real-time decoupled temperature and pressure values.
2. The method according to claim 1, characterized in that, The construction of the first sample dataset based on the bridge voltage signal and the corresponding temperature value, and the construction of the second sample dataset based on the bridge voltage signal and the corresponding pressure value, include: The bridge voltage signal was normalized using the Z-score method. Normalization is performed to obtain the normalized bridge voltage signal. ,in, These are the bridge voltages obtained using a data acquisition model based on an integrated temperature and pressure sensor. and They are respectively The bridge voltage after normalization; For the bridge voltage signal Corresponding temperature value Pressure value Each perturbation was applied, and the temperature values after perturbation were obtained. and pressure value ,as follows: in, , Temperature values and pressure value The expected accuracy It is Gaussian white noise; The samples in the first sample dataset were obtained respectively. Samples in the second sample dataset .
3. The method according to claim 2, characterized in that, Optimizing the learning rate of the weights and biases using a loss function includes: Calculate the derivatives of the loss function with respect to the weight matrix and the bias matrix; Based on the derivatives of the loss function with respect to the weight matrix and the bias matrix and Calculate the learning rate for the weights and biases respectively.
4. The method according to claim 3, characterized in that, The learning rate for the weights and biases is calculated as follows: in, To minimize the learning rate, To maximize the learning rate, This is the learning rate adjustment coefficient, used when calculating the learning rate for the weights. loss function Derivative with respect to the weight matrix Otherwise, when calculating the learning rate for the bias, loss function derivative with respect to the bias matrix .
5. The method according to claim 4, characterized in that, Calculate the mean square error between the calibration data value and the output value of the temperature or pressure prediction BP neural network model. The loss function is as follows: Among them, calibration data values The temperature value after perturbation in the sample or pressure value n is the number of output layer nodes; In the temperature prediction BP neural network model, the output value To predict temperature values, The temperature value after perturbation in the sample ; In the pressure prediction BP neural network model, the output value To predict pressure values, The pressure value after disturbance in the sample .
6. The method according to claim 5, characterized in that, The activation function of the hidden layer neurons in the BP neural network model for temperature or pressure prediction is the Sigmoid function, denoted as... , The derivative is as follows; Where x is the input of the hidden layer.
7. The method according to claim 4, characterized in that, Calculate the loss function Derivative with respect to the weight matrix ,as follows: Calculate the loss function derivative with respect to the bias matrix ,as follows: in, , These are the weight matrix, input matrix, and bias matrix from the hidden layer to the output layer, respectively. This is the weight matrix from layer L-1 to layer L. The bias matrix is from layer (L-1) to layer L. Let L be the input matrix of the Lth layer. To calibrate the data value matrix, i.e., the temperature values in the first or second sample dataset after adding perturbation. or pressure value .
8. The method according to claim 7, characterized in that, The weights for the next training iteration are: in, The learning rate is the weight. The bias for the next training iteration is: in, Let z be the number of layers in the BP neural network model, and z be the number of iterations. The learning rate is the bias.