Temperature sensor fusion compensation method and system based on Kalman filtering

The temperature measurement signals of multiple sensors are preprocessed and dynamically weighted through the Kalman filter algorithm, which solves the shortcomings of sensor fusion compensation in the existing technology and achieves higher compensation accuracy and system stability.

CN120445465BActive Publication Date: 2025-09-16GUANGDONG HUILONG ELECTRIC CO LTD

Patent Information

Application Number
CN202510949192.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-16
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

The existing temperature sensor fusion compensation technology based on Kalman filtering has deficiencies in dynamic weight allocation, multi-sensor confidence assessment, and self-healing compensation mechanism, resulting in insufficient compensation accuracy and system robustness.

Method used

The raw measurement signals of multiple temperature sensors are preprocessed using the Kalman filter algorithm to construct eigenvectors and diagonal eigenvalue matrices, calculate the residual distribution and KL divergence, dynamically adjust sensor weights, and reduce their impact when anomalies are detected to generate the final temperature measurement value.

Benefits of technology

It significantly improves the accuracy of temperature sensor data acquisition and the robustness of the system, enhances the resistance to high-frequency noise and equipment errors, and improves compensation accuracy and fault tolerance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120445465B_ABST
    Figure CN120445465B_ABST
Patent Text Reader

Abstract

The present application relates to the field of temperature control technology, and in particular to a temperature sensor fusion compensation method and system based on Kalman filtering. The method comprises collecting raw measurement signals and preprocessing them; constructing an eigenvector matrix and a diagonal eigenvalue matrix for each sensor based on the preprocessing results; updating the state vector and covariance matrix using a Kalman filter algorithm to generate an optimal state estimate; adjusting the weight of each sensor based on the residual distribution and KL divergence evaluation of each sensor; after adjusting the sensor weights of normal and abnormal sensors, performing a weighted summation of the weights of each sensor and the optimal state estimate to generate a final temperature measurement value. The present invention uses a Kalman filter algorithm to improve people's judgment of the degree of influence of high-frequency noise and equipment errors on sensors; and dynamically adjusts the weights of each sensor through residual value calculation and KL divergence evaluation, significantly improving the robustness and compensation accuracy of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of temperature control technology, and in particular to a temperature sensor fusion compensation method and system based on Kalman filtering. Background Art

[0002] With the widespread application of temperature sensors in fields such as industry, healthcare, and consumer electronics, temperature compensation technology has become increasingly important. Traditional temperature compensation methods typically rely on data from a single sensor for correction, making them difficult to handle in complex and changing environments, resulting in limited compensation accuracy. In recent years, multi-sensor fusion compensation methods based on Kalman filtering have become a research hotspot, as they can combine information from multiple sensors to improve system robustness and accuracy. However, existing related technical solutions still have shortcomings in dynamic weight allocation, sensor confidence assessment, and self-healing compensation mechanisms, which affect the overall performance of the system.

[0003] After searching, the Chinese invention patent with announcement number CN107276536B discloses an "adaptive temperature compensation" method. The patent proposes a method for deriving oscillator compensation data through an external reference frequency signal, and using a temperature tank and a temperature bin to compensate for frequency drift within the operating temperature range; this method corrects temperature-related frequency drift by measuring the operating temperature and accumulating oscillator compensation values; however, this technical solution is mainly aimed at temperature compensation of a single sensor, lacks support for multi-sensor data fusion, and cannot dynamically adjust the weights of different sensors; in addition, the solution does not take into account the dynamic changes in sensor confidence, which may lead to a decrease in compensation accuracy in certain abnormal situations (such as sensor failure or environmental interference).

[0004] After searching, the Chinese invention patent with announcement number CN103376162B discloses an "automatic temperature compensation method". The patent proposes a method for temperature compensation using two temperature clock signals, where the oscillation frequency of one signal is used for timing, and the oscillation frequency of the other signal is approximately linearly related to the temperature and is used for temperature measurement; the temperature compensation value is obtained by processing the temperature measurement value at the end of timing; however, this technical solution is only applicable to dual-sensor scenarios, and adopts a fixed weight distribution strategy, which cannot adapt to the needs of dynamic changes in the confidence of multiple sensors; in addition, the solution lacks a self-healing compensation mechanism. When the sensor has a short-term abnormality or failure, it cannot adjust the weight or perform calibration in time, which may lead to a significant decline in system performance.

[0005] The above problems show that the existing temperature sensor fusion compensation technology based on Kalman filtering still has certain shortcomings in dynamic weight allocation, multi-sensor confidence assessment and self-healing compensation mechanism. Summary of the Invention

[0006] To solve the above problems, the present invention provides a temperature sensor fusion compensation method and system based on Kalman filtering. The Kalman filtering algorithm is used to improve people's judgment on the impact of high-frequency noise and equipment errors on sensors. The weight of each sensor is dynamically adjusted through residual value calculation and KL divergence evaluation, thereby significantly improving the robustness and compensation accuracy of the system.

[0007] The purpose of the present invention can be achieved through the following technical solutions:

[0008] In a first aspect, the present invention provides a temperature sensor fusion compensation method based on Kalman filtering, comprising the steps of:

[0009] Acquiring original measurement signals from a plurality of temperature sensors and preprocessing the original measurement signals to obtain standardized measurement signals;

[0010] constructing an eigenvector matrix and a diagonal eigenvalue matrix of each sensor according to the standardized measurement signal;

[0011] Based on the eigenvector matrix and the diagonal eigenvalue matrix, the state vector and the covariance matrix are updated by a Kalman filter algorithm to generate an optimal state estimate;

[0012] Calculating the residual distribution of each sensor based on the optimal state estimate, and evaluating the confidence of each sensor by KL divergence;

[0013] The step of calculating the weight adjustment value of each sensor based on the confidence level and generating a time-varying weight distribution matrix;

[0014] When a sensor anomaly is detected, the sensor weight is adjusted through a time-varying weight distribution matrix;

[0015] After adjusting the sensor weights of the normal sensors and the abnormal sensors, the adjusted weights are combined with the optimal state estimation value to generate a final temperature measurement value.

[0016] As a preferred technical solution of the present invention, the method of obtaining original measurement signals of multiple temperature sensors and preprocessing the original measurement signals includes the following steps:

[0017] The original measurement signal collected by the temperature sensor is output in the form of a wave;

[0018] Normalize the original measurement signal collected by each sensor so that the filtered measurement value signal of each sensor is distributed in a uniform interval;

[0019] The normalized original measurement signal is input into a low-pass filter for filtering;

[0020] The sliding window technique is used to average and segment the filtered original measurement signal;

[0021] The original measurement signal after average segmentation is exported to generate a standardized measurement signal.

[0022] As a preferred technical solution of the present invention, constructing the eigenvector matrix and diagonal eigenvalue matrix of each sensor according to the standardized measurement signal includes the following steps:

[0023] Performing arithmetic averaging on the standardized measurement signal to obtain a standardized measurement temperature;

[0024] Arranging the standardized measured temperatures in time series to form a measured temperature time series matrix;

[0025] A covariance analysis is performed on the measured temperature time series matrix to generate a covariance matrix of each sensor, and an eigenvector matrix and a diagonal eigenvalue matrix of each sensor are extracted using an eigendecomposition technique.

[0026] As a preferred technical solution of the present invention, the state vector and the covariance matrix are updated by a Kalman filter algorithm, including the steps of:

[0027] Initialize the initial state vector and initial covariance matrix according to the eigenvector matrix and diagonal eigenvalue matrix;

[0028] Based on the initial state vector, constructing a temperature dynamic evolution model;

[0029] Inputting the initial state vector into the temperature dynamic evolution model as initial data, the temperature dynamic evolution model establishes the evolution rule of the system state from the current moment to the next moment through the state transition equation;

[0030] Based on the initial covariance matrix, calculating the covariance matrix and Kalman gain at the next moment;

[0031] The optimal state estimate of the state vector at the next moment is calculated based on the Kalman gain.

[0032] As a preferred technical solution of the present invention,

[0033] The state transfer equation calculation formula is:

[0034] ;

[0035] The covariance matrix calculation formula is:

[0036] ;

[0037] The Kalman gain calculation formula is:

[0038] ;

[0039] The calculation formula of the optimal state estimation value is:

[0040] ;

[0041] in, for The state vector at the moment, the initial value is the initial state vector, for The state vector at time t, is the state transition matrix, describing the state from Time has come The transfer relationship of time, is the control input matrix. When there is no external control input, Can be set as the unit matrix. When there is a temperature control device, It represents the influence coefficient on the state, for The control input vector at time , for The covariance matrix at the moment, the initial value is the initial covariance matrix, the initial covariance matrix is ​​initialized by the diagonal eigenvalue matrix extracted by the eigendecomposition technique, for The covariance matrix of the time instant; is the Kalman gain, which is used to determine the contribution weight of the observation value to the state correction. is the observation matrix, which is a conversion matrix designed according to the sensor characteristics; for The observation value at the moment is composed of real-time measurement data output after the standardized measurement signal is low-pass filtered. for The optimal state estimate at time , The initial value of is the historical optimal state estimate.

[0042] As a preferred technical solution of the present invention, the residual distribution of each sensor is calculated based on the optimal state estimation value, and the confidence of each sensor is evaluated by KL divergence, including the steps of:

[0043] Calculate the residual value based on the sensor's measurement value and the optimal state estimate;

[0044] A rolling window is used to calculate the mean and variance of each sensor residual to capture the dynamic changes of the residual;

[0045] Performing probability density distribution fitting on the residual value to generate a residual probability distribution curve;

[0046] Divide the real axis of the residual probability distribution curve into several equal-width intervals and calculate the probability mass of each interval;

[0047] The KL divergence of the residuals of each sensor is evaluated.

[0048] As a preferred technical solution of the present invention, the KL divergence evaluation of the residuals of each sensor includes the following steps:

[0049] The standard normal distribution was selected as the reference distribution;

[0050] The residual distribution curve of each sensor is used as input;

[0051] Calculate the KL divergence between the residual distribution of each sensor and the reference distribution, that is, the confidence of each sensor;

[0052] The KL divergence calculation formula is:

[0053] ;

[0054] in, For sensors The residual value of is the reference distribution, For sensors The KL divergence of the residual value relative to the reference distribution, For sensors The residual distribution of In the The probability mass of the interval; M is the total number of equal-width intervals divided by the real axis, The reference distribution is The probability mass of an interval.

[0055] As a preferred technical solution of the present invention, the weight adjustment value of each sensor is calculated based on the confidence level, and a time-varying weight distribution matrix is ​​generated, including the steps of:

[0056] Set the initial weight matrix, where each element corresponds to the initial weight of a sensor;

[0057] Set the confidence threshold of the sensor and calculate the weight adjustment value of each sensor;

[0058] Generate updated weights for each sensor based on the initial weights and weight adjustment values ​​of each sensor;

[0059] The generated updated weights of each sensor are used to replace the initial weights to obtain a time-varying weight distribution matrix;

[0060] The sensor weight adjustment formula is:

[0061] ;

[0062] in, is the sensor weight adjustment value, is the initial weight of the sensor, Adjust the parameters for positive excitation, is the negative penalty attenuation parameter, is the confidence threshold of the sensor.

[0063] As a preferred technical solution of the present invention, the method of adjusting the influence of abnormal sensors by using a time-varying weight distribution matrix includes the following steps:

[0064] Monitor the residual change rate of each sensor;

[0065] When the residual change rate of a sensor exceeds a preset threshold, the sensor is determined to be an abnormal sensor;

[0066] The weight value of the abnormal sensor is reduced to half of the original value, further reducing the weight of the abnormal sensor.

[0067] In a second aspect, the present invention provides a temperature sensor fusion compensation system based on Kalman filtering, which executes the temperature sensor fusion compensation method based on Kalman filtering. The system includes a data preprocessing module, a state estimation module, a residual analysis module, a weight distribution module, a self-healing compensation module, and a compensation value generation module.

[0068] Data preprocessing module: used to obtain original measurement values ​​of multiple temperature sensors and preprocess the original measurement values ​​to obtain standardized measurement values;

[0069] State estimation module: used to construct the eigenvector matrix and diagonal eigenvalue matrix of each sensor based on the standardized measurement value, and generate the optimal state estimation value through the Kalman filter algorithm;

[0070] Residual analysis module: used to calculate the residual distribution of each sensor based on the optimal state estimate and evaluate the confidence of each sensor using KL divergence;

[0071] Weight allocation module: Based on the confidence level of each sensor, it calculates the weight adjustment value of each sensor and generates a time-varying weight allocation matrix;

[0072] Self-healing compensation module: used to adjust the weight of abnormal sensors when abnormal sensors are detected to reduce the impact of abnormal sensors;

[0073] Compensation value generation module: After adjusting the sensor weights of normal sensors and abnormal sensors, it is used to perform weighted summation on the weight of each sensor and the optimal state estimation value to generate a final temperature measurement value.

[0074] The present invention provides a temperature sensor fusion compensation method and system based on Kalman filtering, which has the following beneficial effects:

[0075] The present invention converts the original measurement signal into a standardized measurement signal through normalization, filtering and sliding window technology, which is used to weaken environmental noise and high-frequency interference, retain the signal components reflecting the essential characteristics of temperature, and improve the accuracy of temperature sensor data acquisition; the state vector and covariance matrix are updated by the Kalman filtering algorithm to generate an optimal state estimate, which significantly reduces the problems of noise interference and insufficient environmental adaptability of a single sensor, and improves people's judgment on the degree of influence of high-frequency noise and equipment errors on the sensor; the confidence of the sensor is quantified by calculating the residual value and KL divergence of each sensor, and then the weight of each sensor can be dynamically adjusted, and the final temperature measurement value is generated based on the adjusted weight of each sensor and the optimal state estimate, thereby significantly improving the robustness and compensation accuracy of the system;

[0076] The present invention breaks through the limitations of traditional fixed weight distribution. By dynamically adjusting the sensor weights, it flexibly adjusts the impact of each sensor on the system. When an abnormality is detected in a sensor, the weight value of the abnormal sensor can be reduced, thereby reducing the impact of the abnormal sensor and enhancing the system's fault tolerance and continuous operation stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0078] Figure 1 A schematic diagram of a first flow chart of a temperature sensor fusion compensation method based on Kalman filtering provided in an embodiment of the present invention;

[0079] Figure 2 A second flow chart of the temperature sensor fusion compensation method based on Kalman filtering provided in an embodiment of the present invention;

[0080] Figure 3 This is a structural diagram of a temperature sensor fusion compensation system based on Kalman filtering provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0081] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings. It should be understood that the described embodiments are only some of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this application without inventive effort are also within the scope of protection of this application.

[0082] The following further describes the preferred embodiment of the present invention with reference to the accompanying drawings;

[0083] Example 1

[0084] See also Figure 1 This embodiment provides a temperature sensor fusion compensation method based on Kalman filtering, including:

[0085] S1. Acquire original measurement signals from multiple temperature sensors and preprocess the original measurement signals to obtain standardized measurement signals;

[0086] S2. Constructing an eigenvector matrix and a diagonal eigenvalue matrix of each sensor according to the standardized measurement signal;

[0087] S3. Based on the eigenvector matrix and the diagonal eigenvalue matrix, the initial state estimation matrix is ​​updated by a Kalman filter algorithm to generate an optimal state estimation value;

[0088] S4. Calculate the residual distribution of each sensor based on the optimal state estimate, and evaluate the confidence of each sensor using KL divergence;

[0089] S5, calculating the weight adjustment value of each sensor based on the confidence level, and generating a time-varying weight distribution matrix;

[0090] S6. When a sensor abnormality is detected, the sensor weight is adjusted using a time-varying weight allocation matrix; after the sensor weights of the normal sensor and the abnormal sensor are adjusted, the weights adjusted by the time-varying weight allocation matrix are combined with the optimal state estimate to generate a final temperature measurement value.

[0091] It can be understood that this embodiment uses a variety of temperature sensors to collect the original measurement signals of the equipment and the environment, and converts the original measurement signals into standardized measurement signals through normalization, filtering and sliding window technology, which is used to weaken environmental noise and high-frequency interference, retain the signal components that reflect the essential characteristics of temperature, and improve the accuracy of temperature sensor data acquisition; by performing covariance analysis on the standardized measurement signals, the eigenvector matrix and diagonal eigenvalue matrix of each sensor are generated, providing a theoretical source for the initialization of the state vector and covariance matrix in the Kalman filter algorithm; the state vector and covariance matrix are updated by the Kalman filter algorithm to generate the most accurate The optimal state estimate is the most likely approximation to the true system state, which can significantly improve people's judgment of the impact of high-frequency noise and equipment errors on sensors. The confidence of the sensor can be quantified by calculating the residual value and evaluating the KL divergence of each sensor. A high KL divergence of a sensor indicates low sensor confidence. The weight of each sensor is dynamically adjusted by setting the sensor confidence threshold. For sensors with high weight, the final temperature measurement value is generated based on the updated weight and the optimal state estimate. For sensors with low weight or faults, their weight value is reduced, thereby reducing the impact of abnormal sensors on acquisition accuracy.

[0092] Specifically, the method of obtaining original measurement signals from a plurality of temperature sensors and preprocessing the original measurement signals includes the following steps:

[0093] The original measurement signal collected by the temperature sensor is output in the form of a wave;

[0094] Normalize the original measurement signal collected by each sensor so that the filtered measurement value signal of each sensor is distributed in a uniform interval;

[0095] The normalized original measurement signal is input into a low-pass filter for filtering;

[0096] The sliding window technique is used to average and segment the filtered original measurement signal;

[0097] The original measurement signal after average segmentation is exported to generate a standardized measurement signal.

[0098] Specifically, constructing the eigenvector matrix and diagonal eigenvalue matrix of each sensor according to the standardized measurement signal includes the following steps:

[0099] Performing arithmetic averaging on the standardized measurement signal to obtain a standardized measurement temperature;

[0100] Arranging the standardized measured temperatures in time series to form a measured temperature time series matrix;

[0101] Performing covariance analysis on the measured temperature time series matrix to generate a correlation characteristic matrix between the sensors, and using eigendecomposition technology to extract the eigenvector matrix and diagonal eigenvalue matrix of each sensor;

[0102] According to the eigenvector matrix and the diagonal eigenvalue matrix, theoretical support is provided for the state vector and the covariance matrix.

[0103] It can be understood that the arithmetic averaging of the standardized measurement signals is mainly used to convert the waveform signals into numerical data that are convenient for subsequent processing, thereby enhancing the comparability of data collected by different sensors; the standardized measurement temperatures are arranged in a time series to facilitate capturing the temporal and spatial correlation of the data;

[0104] The measured temperature time series matrix is ​​a T×N sequence matrix. Assume that the measured temperature time series matrix is ​​as follows:

[0105] ;

[0106] The rows in the measured temperature time series matrix represent the standardized measured temperatures of each sensor, for example, the first row represents the standardized measured temperatures of the three sensors at the first moment, and the second row represents the standardized measured temperatures of the three sensors at the second moment; the columns represent the sensor numbers, and X represents the measured temperature time series matrix;

[0107] Calculate the mean and standard deviation of each sensor and use the formula Standardization processing is performed; and are the mean and standard deviation of each sensor respectively, and Z is the standardized measured temperature time series matrix;

[0108] ;

[0109] Calculate the covariance matrix of the standardized measured temperature time series matrix, then perform eigendecomposition on the covariance matrix to generate the eigenvalues ​​of each sensor, including the following steps:

[0110] The covariance matrix calculation formula is:

[0111]

[0112] The characteristic decomposition formula is:

[0113] ;

[0114] in, is the covariance matrix of each sensor, express The variance of the normalized measured temperature collected by the sensor, Indicates sensor and The covariance between The eigenvector matrix representing the direction of the principal components, Represents the diagonal eigenvalue matrix; assuming the decomposition result is , ;

[0115] Sort by eigenvalue in descending order, select the first eigenvalues, and get the projection matrix; assuming , then the projection matrix is , project the projection matrix onto the standardized measured temperature time series matrix to obtain the correlation feature matrix between each sensor;

[0116] According to the correlation feature matrix between each sensor, the main feature vectors are extracted by arithmetic mean method;

[0117] ;

[0118] in, express Sensors and The main characteristic vector of the sensor is used to describe the current state of the sensor and to initialize the initial state vector; the initial state vector is ; The initial covariance matrix is ; The initial covariance matrix is ​​used to quantify the confidence of the initial state; this step is used to provide benchmark parameters for subsequent iterations to ensure that the algorithm evolves from a reasonable starting point.

[0119] Specifically, the updating of the initial state estimation matrix by the Kalman filter algorithm includes the following steps:

[0120] Based on the initial state vector, constructing a temperature dynamic evolution model;

[0121] Inputting the initial state vector into a temperature dynamic evolution model, the temperature dynamic evolution model establishes an evolution rule of the system state from the current moment to the next moment through a state transfer equation;

[0122] Based on the initial covariance matrix, calculating the covariance matrix and Kalman gain at the next moment;

[0123] The optimal state estimate of the state vector at the next moment is calculated based on the Kalman gain.

[0124] Based on the foregoing, the updating of the initial state estimation matrix by the Kalman filter algorithm includes:

[0125] Based on the initial state vector and the initial covariance matrix; using a temperature dynamic evolution model to predict the state vector at the next moment, including:

[0126] Constructing a temperature dynamic evolution model, inputting the initial state vector into the temperature dynamic evolution model; the temperature dynamic evolution model establishes an evolution rule of the system state from the current moment to the next moment through a state transition equation;

[0127] The state transfer equation calculation formula is:

[0128] ;

[0129] in, for The state vector at time -1, the initial value is the initial state vector, for The state vector at time t, is the state transition matrix, describing the state from Time has come The transfer relationship of time, is the control input matrix, for The control input vector at time t;

[0130] Calculate the covariance matrix of the next moment according to the initial covariance matrix and calculate the Kalman gain;

[0131] The covariance matrix and Kalman gain calculation formulas are:

[0132] ;

[0133] ;

[0134] in, for The covariance matrix at the moment -1, the initial value is the initial covariance matrix, and the initial covariance matrix is ​​initialized by the diagonal eigenvalue matrix extracted by the eigendecomposition technique, for The covariance matrix of the time instant; is the Kalman gain, which is used to determine the contribution weight of the observation value to the state correction. is the observation matrix;

[0135] The optimal state estimation value of the state vector at the next moment is calculated according to the Kalman gain; the calculation formula of the optimal state estimation value is:

[0136] ;

[0137] Among them, the for The observation value at the moment is composed of real-time measurement data output after the standardized measurement signal is low-pass filtered. for The optimal state estimate at time t;

[0138] Already obtained The covariance matrix and optimal state estimate at the moment can enter the next moment for an update cycle.

[0139] The optimal state estimate is the optimal weighted fusion result of the predicted value and the observed value, which is used to retain more prediction information. For example, when a temperature sensor suddenly fails, the optimal estimate can still maintain a reasonable output based on historical trends.

[0140] Specifically, the residual distribution of each sensor is calculated according to the optimal state estimation value, and the confidence of each sensor is evaluated by KL divergence, including the steps of:

[0141] A residual value is calculated based on the sensor's measured value and the optimal state estimate; the residual value is the difference between the sensor's measured value and the optimal state estimate; when the residual value is greater than 0, the sensor reading is higher than the current estimate, indicating that the sensor may be drifting or the environment may have suddenly changed during measurement; when the residual value is less than or equal to 0, the sensor reading is lower than the current estimate, indicating that the sensor may have failed or there is a lot of noise interference during measurement;

[0142] A rolling window method is used to calculate the mean and variance of each sensor residual to capture the dynamic changes of the residual. When the mean deviates from zero, it indicates that the sensor has a systematic bias; when the variance increases, it reflects an increase in sensor noise interference or an increase in environmental interference.

[0143] Performing probability density distribution fitting on the residual to generate a residual probability distribution curve;

[0144] Divide the real axis of the residual probability distribution curve into a number of equal-width intervals and calculate the probability mass of each interval; the probability mass of each interval is equal to the number of residuals falling in the interval divided by the total number of residuals;

[0145] The KL divergence evaluation of the residual of each sensor is used to quantify the sensor confidence, including the following steps:

[0146] The standard normal distribution is selected as the reference distribution; the standard normal distribution is a normal distribution with a mean of 0 and a variance of 1;

[0147] The residual distribution curve of each sensor is used as input;

[0148] Calculate the KL divergence between the residual distribution of each sensor and the reference distribution; the KL divergence calculation formula is:

[0149] ;

[0150] in, For sensors The residual value of is the reference distribution, For sensors The KL divergence of the residual value relative to the reference distribution, For sensors The residual distribution of In the The probability mass of the interval; M is the total number of equal-width intervals divided by the real axis, The reference distribution is The probability mass of an interval;

[0151] Specifically, the step of calculating the weight adjustment value of each sensor based on the confidence level and generating a time-varying weight distribution matrix includes the following steps:

[0152] Set the initial weight matrix, where each element corresponds to the initial weight of a sensor;

[0153] Set the confidence threshold of the sensor and calculate the weight adjustment value of each sensor. When the confidence of the sensor is greater than the confidence threshold, the weight of the sensor is increased. When the confidence of the sensor is less than or equal to the confidence threshold, the weight of the sensor is reduced.

[0154] Generate updated weights for each sensor based on the initial weights and weight adjustment values ​​of each sensor;

[0155] The generated updated weights of each sensor are used to replace the initial weights to obtain a time-varying weight distribution matrix;

[0156] The sensor weight adjustment formula is:

[0157] ;

[0158] in, is the sensor weight adjustment value, is the initial weight of the sensor, is the forward excitation gain coefficient, is the negative penalty attenuation coefficient, is the confidence threshold of the sensor.

[0159] Specifically, adjusting the influence of abnormal sensors by using a time-varying weight distribution matrix includes the following steps:

[0160] Monitor the residual change rate of each sensor;

[0161] When the residual change rate of a sensor exceeds a preset threshold, the sensor is determined to be an abnormal sensor;

[0162] The weight value of the abnormal sensor is reduced to half of the original value, thereby reducing the influence of the abnormal sensor.

[0163] Specifically, after adjusting the sensor weights of normal sensors and abnormal sensors, the weights of each sensor are weighted and summed with the optimal state estimation value to generate a final temperature measurement value; the final temperature measurement value is the final temperature value obtained by the temperature sensor after fusion compensation via the Kalman filter algorithm.

[0164] Example 2

[0165] See also Figure 3 This embodiment provides a temperature sensor fusion compensation system based on Kalman filtering, which executes the temperature sensor fusion compensation method based on Kalman filtering described above. The system includes a data preprocessing module, a state estimation module, a residual analysis module, a weight distribution module, a self-healing compensation module, and a compensation value generation module;

[0166] Data preprocessing module: used to obtain original measurement values ​​of multiple temperature sensors and preprocess the original measurement values ​​to obtain standardized measurement values;

[0167] State estimation module: used to construct the eigenvector matrix and diagonal eigenvalue matrix of each sensor based on the standardized measurement value, and generate the optimal state estimation value through the Kalman filter algorithm;

[0168] Residual analysis module: used to calculate the residual distribution of each sensor based on the optimal state estimate and evaluate the confidence of each sensor using KL divergence;

[0169] Weight allocation module: Based on the confidence level of each sensor, it calculates the weight adjustment value of each sensor and generates a time-varying weight allocation matrix;

[0170] Self-healing compensation module: used to adjust the weight of abnormal sensors when abnormal sensors are detected to reduce the impact of abnormal sensors;

[0171] Compensation value generation module: After adjusting the sensor weights of normal sensors and abnormal sensors, it is used to perform weighted summation on the weight of each sensor and the optimal state estimation value to generate a final temperature measurement value.

[0172] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A temperature sensor fusion compensation method based on Kalman filtering, characterized by: The following steps are involved: Acquiring original measurement signals from a plurality of temperature sensors and preprocessing the original measurement signals to obtain standardized measurement signals; constructing an eigenvector matrix and a diagonal eigenvalue matrix of each sensor according to the standardized measurement signal; Based on the eigenvector matrix and the diagonal eigenvalue matrix, the state vector and covariance matrix are updated through the Kalman filter algorithm to generate the optimal state estimate; Calculating the residual distribution of each sensor based on the optimal state estimate, and evaluating the confidence of each sensor by KL divergence; Based on the confidence level, calculating a weight adjustment value for each sensor and generating a time-varying weight distribution matrix; When a sensor anomaly is detected, the sensor weight is adjusted through a time-varying weight distribution matrix; After adjusting the sensor weights of the normal sensors and the abnormal sensors, the adjusted weights are combined with the optimal state estimate to generate a final temperature measurement value; Among them, the state vector and covariance matrix are updated by the Kalman filter algorithm, including the steps: Initialize the initial state vector and initial covariance matrix according to the eigenvector matrix and diagonal eigenvalue matrix; Based on the initial state vector, constructing a temperature dynamic evolution model; Inputting the initial state vector into the temperature dynamic evolution model as initial data, the temperature dynamic evolution model establishes the evolution rule of the system state from the current moment to the next moment through the state transition equation; Based on the initial covariance matrix, calculating the covariance matrix and Kalman gain at the next moment; Calculate the optimal state estimate of the state vector at the next moment according to the Kalman gain; The state transfer equation calculation formula is: ; The covariance matrix calculation formula is: ; The Kalman gain calculation formula is: ; The calculation formula of the optimal state estimation value is: ; in, for The state vector at the moment, the initial value is the initial state vector, for The state vector at time t, is the state transition matrix, describing the state from Time has come The transfer relationship of time, is the control input matrix. When there is no external control input, Can be set as the unit matrix. When there is a temperature control device, It represents the influence coefficient on the state, for The control input vector at time , for The covariance matrix at the moment, the initial value is the initial covariance matrix, the initial covariance matrix is ​​initialized by the diagonal eigenvalue matrix extracted by the eigendecomposition technique, for The covariance matrix of the time instant; is the Kalman gain, which is used to determine the contribution weight of the observation value to the state correction. is the observation matrix, which is a conversion matrix designed according to the sensor characteristics; for The observation value at the moment is composed of real-time measurement data output after the standardized measurement signal is low-pass filtered. for The optimal state estimate at time , The initial value of is the historical optimal state estimate.

2. The temperature sensor fusion compensation method based on Kalman filtering according to claim 1 is characterized in that: The method of obtaining original measurement signals from a plurality of temperature sensors and preprocessing the original measurement signals comprises the following steps: The original measurement signal collected by the temperature sensor is output in the form of a wave; Normalize the original measurement signal collected by each sensor so that the filtered measurement value signal of each sensor is distributed in a uniform interval; The normalized original measurement signal is input into a low-pass filter for filtering; The sliding window technique is used to average and segment the filtered original measurement signal; The original measurement signal after average segmentation is exported to generate a standardized measurement signal.

3. The temperature sensor fusion compensation method based on Kalman filtering according to claim 2, characterized in that: The step of constructing the eigenvector matrix and the diagonal eigenvalue matrix of each sensor according to the standardized measurement signal comprises the following steps: Performing arithmetic averaging on the standardized measurement signal to obtain a standardized measurement temperature; Arranging the standardized measured temperatures in time series to form a measured temperature time series matrix; A covariance analysis is performed on the measured temperature time series matrix to generate a covariance matrix of each sensor, and an eigenvector matrix and a diagonal eigenvalue matrix of each sensor are extracted using an eigendecomposition technique.

4. The temperature sensor fusion compensation method based on Kalman filtering according to claim 3 is characterized in that: The method of calculating the residual distribution of each sensor according to the optimal state estimation value and evaluating the confidence of each sensor by KL divergence includes the following steps: Calculate the residual value based on the sensor's measurement value and the optimal state estimate; A rolling window is used to calculate the mean and variance of each sensor residual to capture the dynamic changes of the residual; Performing probability density distribution fitting on the residual value to generate a residual probability distribution curve; Divide the real axis of the residual probability distribution curve into several equal-width intervals and calculate the probability mass of each interval; The KL divergence of the residuals of each sensor is evaluated.

5. The temperature sensor fusion compensation method based on Kalman filtering according to claim 4 is characterized in that: The KL divergence evaluation of the residuals of each sensor includes the following steps: The standard normal distribution was selected as the reference distribution; The residual distribution curve of each sensor is used as input; Calculate the KL divergence between the residual distribution of each sensor and the reference distribution, that is, the confidence of each sensor; The KL divergence calculation formula is: ; in, For sensors The residual value of is the reference distribution, For sensors The KL divergence of the residual value relative to the reference distribution, For sensors The residual distribution of In the The probability mass of the interval; M is the total number of equal-width intervals divided by the real axis, The reference distribution is The probability mass of an interval.

6. The temperature sensor fusion compensation method based on Kalman filtering according to claim 5, characterized in that: The method of calculating the weight adjustment value of each sensor based on the confidence level and generating a time-varying weight distribution matrix includes the following steps: Set the initial weight matrix, where each element corresponds to the initial weight of a sensor; Set the confidence threshold of the sensor and calculate the weight adjustment value of each sensor; Generate updated weights for each sensor based on the initial weights and weight adjustment values ​​of each sensor; The generated updated weights of each sensor are used to replace the initial weights to obtain a time-varying weight distribution matrix; The sensor weight adjustment formula is: ; in, is the weight adjustment value of the sensor, is the initial weight of the sensor, is the forward excitation gain coefficient, is the negative penalty attenuation coefficient, is the confidence threshold of the sensor.

7. The temperature sensor fusion compensation method based on Kalman filtering according to claim 6, characterized in that: The method of adjusting the weight of abnormal sensors by using a time-varying weight distribution matrix includes the following steps: Monitor the residual change rate of each sensor; When the residual change rate of a sensor exceeds a preset threshold, the sensor is determined to be an abnormal sensor; The weight value of the abnormal sensor is reduced by half, thereby further reducing the weight of the abnormal sensor.

8. A temperature sensor fusion compensation system based on Kalman filtering, which implements the temperature sensor fusion compensation method based on Kalman filtering according to any one of claims 1 to 7, characterized in that: The system includes a data preprocessing module, a state estimation module, a residual analysis module, a weight distribution module, a self-healing compensation module and a compensation value generation module connected in communication; Data preprocessing module: used to obtain original measurement values ​​of multiple temperature sensors and preprocess the original measurement values ​​to obtain standardized measurement values; State estimation module: used to construct the eigenvector matrix and diagonal eigenvalue matrix of each sensor based on the standardized measurement value, and generate the optimal state estimation value through the Kalman filter algorithm; Residual analysis module: used to calculate the residual distribution of each sensor based on the optimal state estimate and evaluate the confidence of each sensor using KL divergence; Weight allocation module: Based on the confidence level of each sensor, it calculates the weight adjustment value of each sensor and generates a time-varying weight allocation matrix; Self-healing compensation module: used to adjust the weight of abnormal sensors when sensor abnormalities are detected; Compensation value generation module: After adjusting the sensor weights of normal sensors and abnormal sensors, it is used to perform weighted summation on the weight of each sensor and the optimal state estimation value to generate a final temperature measurement value.

Citation Information

Patent Citations

  • Automatic temperature compensation method

    CN103376162B

  • Adaptive temperature compensation

    CN107276536B

  • Fusion algorithm based on improved weighted Kalman data

    CN119720068A

  • Dynamic data fusion method and system for similar monitoring sensors

    CN119808005A

Cited By

  • Digital filtering method for temperature sensor

    CN122119581A