A dynamic calibration and error compensation system for multiple sensors of emergency detection of dangerous chemicals
By constructing an extended-dimensional state vector and using Kalman filtering technology, the sensor weights are dynamically adjusted and abnormal sensors are isolated, solving the problems of sensor drift and misjudgment in emergency detection of hazardous chemicals, and achieving high accuracy and reliability of concentration measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF URBAN SAFETY & ENVIRONMENTAL SCI BEIJING ACAD OF SCI & TECH
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-05
Smart Images

Figure CN122149555A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas detection technology, and more specifically, to a multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals. Background Technology
[0002] Emergency detection scenarios for hazardous chemicals are characterized by complex environments, dynamic changes in air masses, and the inability to pre-calibrate. Existing single-sensor detection solutions suffer from issues such as zero-point drift, sensitivity decay, and cross-interference, making it difficult to guarantee measurement accuracy. Although multi-sensor fusion solutions have been proposed, most employ static fusion strategies based on fixed weights or prior signal-to-noise ratios. These strategies cannot diagnose sudden sensor drift or poisoning failures online and lack adaptive compensation capabilities for dynamic error factors such as temperature and humidity changes and gas cross-interference. When some sensors malfunction, the fusion results are easily contaminated, leading to a significantly increased risk of misjudgment.
[0003] To address the aforementioned issues, existing dynamic calibration techniques primarily rely on periodic calibration or temperature and humidity lookup table corrections. The former is impractical in emergency situations due to the lack of standard gas sources, while the latter can only compensate for static environmental deviations and cannot handle random drift in sensor zero point and sensitivity, nor can it achieve real-time assessment of sensor health status and adaptive weight adjustment. Therefore, there is an urgent need for a system capable of dynamic calibration and error compensation for multiple sensors under emergency detection conditions. This system should improve the accuracy and reliability of hazardous chemical concentration measurements by estimating sensor drift parameters online and dynamically adjusting fusion weights. Summary of the Invention
[0004] This application provides a multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals. By constructing an extended-dimensional state vector containing the actual gas concentration and the zero-point drift and sensitivity drift parameters of each sensor, and establishing state transition and observation equations, the system uses Kalman filtering to recursively estimate the optimal fused concentration and real-time drift parameters. Simultaneously, based on the statistical characteristics of the observation residuals, the system dynamically adjusts the weights of sensors in the fusion update and deweights, isolates, and alarms abnormal sensors. This solves the technical problems of existing technologies in emergency detection scenarios of hazardous chemicals, such as the inability to estimate and compensate for sensor dynamic drift online, difficulty in coping with sudden failures and drastic environmental changes, and lack of adaptive weight adjustment capabilities, which lead to poor measurement accuracy and high risk of misjudgment. This system improves the accuracy of hazardous chemical concentration measurement.
[0005] To achieve the above objectives, the present invention provides a multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals, comprising: The data acquisition module uses an array of temperature sensors, humidity sensors, and at least two gas sensors with different detection principles to simultaneously acquire response signals of the target hazardous chemical and related interfering gases, and performs time registration and filtering preprocessing on each signal. The spatial modeling module constructs extended-dimensional state vectors and establishes state transition equations and observation equations with multi-sensor observations as input. The data determination module determines the optimal fusion concentration and the real-time drift parameters of each sensor based on the state estimate from the previous moment and the sensor observations from the current moment. The weighting module calculates the observation residuals and statistics of each sensor. When the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and the abnormal state is marked. The data output module uses the drift parameters of each sensor to correct the original measurement values online, and finally outputs the dynamically calibrated concentration of hazardous chemicals and the confidence interval.
[0006] Furthermore, the response signals of the target hazardous chemical and related interfering gases are acquired simultaneously, and time registration and filtering preprocessing are performed on each signal, specifically including: Based on the inherent response delay time of different sensors, the signals of each channel are time-delay aligned so that the measured values of all sensors correspond to the air mass state at the same sampling time. Identify and eliminate pulse-type abnormal data caused by instantaneous sensor disturbances or external electromagnetic interference; Sliding window averaging or weighted averaging is performed on continuously acquired signal sequences to suppress high-frequency random noise; By using data from ambient temperature and humidity sensors, a first-order correction is applied to the output values of each gas sensor to reduce the impact of sudden temperature and humidity changes on the initial deviation of the measurement results.
[0007] Furthermore, based on the inherent response delay times of different sensors, time delay alignment is performed on each signal, specifically including: In a laboratory environment, a standard gas with a step change in concentration is applied to each sensor. The time required for each sensor to reach a stable percentage of the change in concentration is recorded as the reference response delay time for each sensor and stored in the delay parameter table. In the actual detection process, the sensor with the longest response delay time is used as the time reference. Based on the delay difference between each sensor and the reference sensor in the delay parameter table, the signal sequences of other sensors are time-shifted so that the measured values of all sensors correspond to the air mass state at the same sampling time. When the wind speed at the detection site is high or the air mass flow direction is known, the transmission time difference between the air mass and each installation position of the sensor array is calculated by combining the wind speed sensor data. The transmission time difference is then added to the inherent response delay time of each sensor to form the total delay compensation. For sensor combinations with response speed differences exceeding a preset multiple, the signal from the fast-response sensor is downsampled or accumulated via a sliding window to match the effective response timescale with that of the slow-response sensor.
[0008] Furthermore, an extended-dimensional state vector is constructed, and state transition equations and observation equations with multi-sensor observations as input are established, specifically including: Construct a joint state vector that includes the real gas concentration, the zero-point drift parameters of each sensor, and the sensitivity drift parameters of each sensor; A state transition equation is established to describe the dynamic relationship between the true concentration and the evolution of each drift parameter over time, wherein the evolution of the drift parameter incorporates the changes in temperature and humidity as driving terms. An observation equation is established with multi-sensor observations as input. The theoretical output value of each sensor is expressed as the sensor's sensitivity drift parameter multiplied by the true concentration plus the zero-point drift parameter, with a cross-interference term and a nonlinear correction factor superimposed.
[0009] Furthermore, the evolution of the drift parameters incorporates changes in temperature and humidity as driving terms, specifically including: The data from the temperature sensor and humidity sensor are read in real time, and the rate of temperature change and rate of humidity change at adjacent sampling times are calculated. The temperature change rate and humidity change rate are used as external driving inputs, multiplied by preset temperature drift coefficient and humidity drift coefficient respectively, and then superimposed on the state transition equations of the zero drift parameters and sensitivity drift parameters of each sensor. The temperature drift coefficient and humidity drift coefficient of different gas sensors are determined in advance through laboratory environmental experiments and stored in the system parameter table. During the detection process, the corresponding coefficient is dynamically called according to the type of sensor currently in use.
[0010] Furthermore, the superimposed cross-interference term and nonlinear correction factor specifically include: In a laboratory environment, the response coefficients of each target sensor to typical interfering gases that may coexist are measured in advance, and a cross-interference matrix is formed and stored in the system parameter table. In actual testing, auxiliary sensors or known prior information are used to identify the types and concentration ranges of interfering gases present in the current environment. Based on the identified types of interfering gases, the corresponding interference coefficients are retrieved from the cross-interference matrix, multiplied by the estimated concentration of the interfering gas, and then added to the observation equation as cross-interference terms. When the actual concentration of the interfering gas cannot be directly measured, the equivalent concentration of the interfering gas can be inferred by using the response differences of multiple sensors in the main sensor array through linear decoupling or principal component analysis.
[0011] Furthermore, when the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and an abnormal state is marked, specifically including: A sliding residual window is maintained for each sensor, the observed residual values are recorded for multiple consecutive sampling periods, and the mean and standard deviation of the residuals within the window are calculated. When the absolute value of the observation residual of a certain sensor in the current sampling period exceeds a preset first threshold, and the mean value of the residual in the sliding window exceeds a preset second threshold for a specified number of consecutive times, the sensor is determined to be in an abnormal drift state. After an anomaly is determined, the fusion weight is reduced by increasing the corresponding element of the observation noise covariance matrix of the sensor in the abnormal drift state in the Kalman filter update. The increase is positively correlated with the degree to which the residual mean exceeds the threshold. Once the residuals return to normal and remain stable for more than the recovery time, gradually reduce the observation noise covariance matrix and restore the weights. When the abnormal drift state continues for more than a preset time threshold, the sensor is marked as permanently abnormal and the observation value is completely excluded in the subsequent fusion, while the sensor failure alarm information is output.
[0012] Furthermore, the preset first threshold and the preset second threshold specifically include: During the initial stabilization phase after system startup, the observation residuals of each sensor are collected under clean air or no target gas conditions, and the standard deviation is calculated as the baseline noise level. The first threshold is set to a higher multiple of the reference noise level to identify single-point abnormal jumps caused by transient disturbances or electromagnetic interference. The second threshold is set to a lower multiple of the reference noise level to identify persistent, minor deviations caused by slow sensor drift or poisoning. During the detection process, the multipliers of the first and second thresholds are dynamically adjusted according to the severity of changes in ambient temperature and humidity. The more severe the environmental changes, the larger the multiplier, in order to reduce the risk of misjudgment. For gas sensors with different detection principles, different reference noise levels and multipliers are set to adapt to the inherent noise characteristics of each sensor.
[0013] Furthermore, the initial stabilization phase after system startup specifically includes: The system continuously monitors the outputs of the ambient temperature and humidity sensors. When the rate of change of temperature and the rate of change of humidity are both below their respective stable thresholds within a preset continuous sampling period, the system determines that the environment has reached a stable state. Simultaneously, the standard deviation of the observation residuals of each gas sensor within the sliding window is calculated. When the fluctuation range between the standard deviations of multiple consecutive sliding windows is lower than the preset convergence threshold, it is determined that the sensor signal has entered a stable stage. If both environmental stability and signal stability are met, the system is determined to have entered the initial stabilization phase, and residual data is collected and the baseline noise level is calculated. If the above two conditions are not met simultaneously after the system starts up and the preset maximum initialization time is exceeded, the initial stabilization phase will be forcibly terminated. The reference noise level will be calculated based on the currently collected data, and a prompt message indicating large environmental fluctuations will be output to remind on-site personnel that the current calibration reference confidence level is low.
[0014] Furthermore, the fusion weights are reduced by increasing the corresponding elements of the observation noise covariance matrix of the sensor in the abnormal drift state during the Kalman filter update. Specifically, this includes: In the observation noise covariance matrix of the Kalman filter, a diagonal element is assigned to each sensor, and the element represents the uncertainty of the sensor's observation. When a sensor is determined to be in an abnormal drift state, the diagonal element corresponding to the sensor is multiplied by an amplification factor greater than one. The value of the amplification factor is positively correlated with the multiple by which the current residual mean exceeds the second threshold. The more severe the residual deviation, the larger the amplification factor. Once the abnormal drift state is resolved and the residual returns to normal, the diagonal elements corresponding to the sensor are gradually divided by the increase factor or reduced periodically according to the preset attenuation step size until they return to normal levels, thus avoiding sudden changes in the filter output caused by weight abrupt changes.
[0015] Compared with existing technologies, the advantages of this invention are as follows: by constructing an extended-dimensional state vector containing the true concentration and sensor drift parameters and combining it with Kalman filtering, online estimation and compensation of sensor dynamic drift under conditions without a standard gas source are realized; by introducing temperature and humidity driving terms, cross-interference terms and nonlinear correction factors, the error adaptability under complex environments is enhanced; at the same time, the adaptive weight adjustment mechanism based on the statistical characteristics of observation residuals can dynamically reduce the fusion weight and isolate abnormal sensors when the sensor experiences instantaneous disturbances, slow drift or sudden failure, thus avoiding contamination of the fusion results by faulty sensors. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1A schematic diagram of a multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals is shown in an embodiment of the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0018] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0019] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0020] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0021] The following is a description of preferred embodiments of the present invention in conjunction with the accompanying drawings.
[0022] like Figure 1 As shown, an embodiment of the present invention discloses a multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals, comprising: 1. Data acquisition module: It uses an array of temperature sensor, humidity sensor and at least two gas sensors with different detection principles to synchronously acquire the response signals of the target hazardous chemical and related interfering gases, and performs time registration and filtering preprocessing on each signal. In this embodiment, response signals of the target hazardous chemical and related interfering gases are acquired simultaneously, and time registration and filtering preprocessing are performed on each signal, specifically including: Based on the inherent response delay time of different sensors, the signals of each channel are time-delay aligned so that the measured values of all sensors correspond to the air mass state at the same sampling time. Identify and eliminate pulse-type abnormal data caused by instantaneous sensor disturbances or external electromagnetic interference; Sliding window averaging or weighted averaging is performed on continuously acquired signal sequences to suppress high-frequency random noise; By using data from ambient temperature and humidity sensors, a first-order correction is applied to the output values of each gas sensor to reduce the impact of sudden temperature and humidity changes on the initial deviation of the measurement results.
[0023] In this embodiment, time delay alignment is performed on each signal based on the inherent response delay time of different sensors, specifically including: In a laboratory environment, a standard gas with a step change in concentration is applied to each sensor. The time required for each sensor to reach a stable percentage of the change in concentration is recorded as the reference response delay time for each sensor and stored in the delay parameter table. In the actual detection process, the sensor with the longest response delay time is used as the time reference. Based on the delay difference between each sensor and the reference sensor in the delay parameter table, the signal sequences of other sensors are time-shifted so that the measured values of all sensors correspond to the air mass state at the same sampling time. When the wind speed at the detection site is high or the air mass flow direction is known, the transmission time difference between the air mass and each installation position of the sensor array is calculated by combining the wind speed sensor data. The transmission time difference is then added to the inherent response delay time of each sensor to form the total delay compensation. For sensor combinations with response speed differences exceeding a preset multiple, the signal from the fast-response sensor is downsampled or accumulated via a sliding window to match the effective response timescale with that of the slow-response sensor.
[0024] In this embodiment, the preset percentage is set according to the response characteristics of different sensors. For sensors with slower response speeds, a higher preset percentage is used to record the time required for them to reach most of their steady-state changes; for sensors with faster response speeds, an even higher preset percentage is used to more accurately capture the main change range of their rapid response; for sensors whose response characteristics approximate a first-order system, the preset percentage is taken as the characteristic value of the time constant corresponding to the first-order system. The preset percentage value of each sensor is positively correlated with the time constant of the sensor to reach its steady-state change; the larger the time constant, the higher the preset percentage value, to ensure that the response delay time can truly reflect the dynamic response characteristics of the sensor in actual detection. The preset percentage values of all sensors are determined in advance through laboratory testing and stored in a delay parameter table. During actual detection, the corresponding preset percentage is dynamically called according to the type of sensor currently used.
[0025] The beneficial effects of the above technical solution are as follows: by calibrating the reference response delay time of each sensor in the laboratory and performing time shifting, combined with wind speed compensation and response speed matching, the inherent response speed differences of multiple sensors and the time misalignment caused by airflow transmission delay are effectively solved; at the same time, pulse anomaly elimination, sliding window filtering and first-order temperature and humidity correction suppress high-frequency noise and instantaneous disturbances, reduce the initial deviation of the measurement caused by sudden environmental changes, and provide high-quality and highly time-consistent input data for subsequent dynamic calibration.
[0026] 2. Spatial modeling module: Construct extended-dimensional state vectors and establish state transition equations and observation equations with multi-sensor observations as input; In this embodiment, an extended-dimensional state vector is constructed, and state transition equations and observation equations with multi-sensor observations as input are established, specifically including: Construct a joint state vector that includes the real gas concentration, the zero-point drift parameters of each sensor, and the sensitivity drift parameters of each sensor; A state transition equation is established to describe the dynamic relationship between the true concentration and the evolution of each drift parameter over time, wherein the evolution of the drift parameter incorporates the changes in temperature and humidity as driving terms. An observation equation is established with multi-sensor observations as input. The theoretical output value of each sensor is expressed as the sensor's sensitivity drift parameter multiplied by the true concentration plus the zero-point drift parameter, with a cross-interference term and a nonlinear correction factor superimposed.
[0027] In this embodiment, the evolution of the drift parameters incorporates temperature and humidity changes as a driving factor, specifically including: The data from the temperature sensor and humidity sensor are read in real time, and the rate of temperature change and rate of humidity change at adjacent sampling times are calculated. The temperature change rate and humidity change rate are used as external driving inputs, multiplied by preset temperature drift coefficient and humidity drift coefficient respectively, and then superimposed on the state transition equations of the zero drift parameters and sensitivity drift parameters of each sensor. The temperature drift coefficient and humidity drift coefficient of different gas sensors are determined in advance through laboratory environmental experiments and stored in the system parameter table. During the detection process, the corresponding coefficient is dynamically called according to the type of sensor currently in use.
[0028] In this embodiment, the superposition of the cross-interference term and the nonlinear correction factor specifically includes: In a laboratory environment, the response coefficients of each target sensor to typical interfering gases that may coexist are measured in advance, and a cross-interference matrix is formed and stored in the system parameter table. In actual testing, auxiliary sensors or known prior information are used to identify the types and concentration ranges of interfering gases present in the current environment. Based on the identified types of interfering gases, the corresponding interference coefficients are retrieved from the cross-interference matrix, multiplied by the estimated concentration of the interfering gas, and then added to the observation equation as cross-interference terms. When the actual concentration of the interfering gas cannot be directly measured, the equivalent concentration of the interfering gas can be inferred by using the response differences of multiple sensors in the main sensor array through linear decoupling or principal component analysis.
[0029] In this embodiment, the state transition of the real gas concentration adopts a random walk model, that is, the real concentration at the current moment is equal to the real concentration at the previous moment plus a Gaussian white noise with zero mean. The variance of the white noise is preset according to the expected drastic change in concentration in the emergency scenario. In the case of a sudden leak of hazardous chemicals, when the concentration is detected to be monotonically increasing for multiple consecutive sampling periods, the variance of the Gaussian white noise is temporarily increased to improve the Kalman filter's ability to track rapid changes in concentration. When the concentration change tends to be gentle or stable, the variance is gradually restored to the preset value to avoid the filter being overly sensitive to stable signals.
[0030] The beneficial effects of the above technical solution are as follows: by constructing an extended-dimensional state vector containing the true concentration and sensor drift parameters, online synchronous estimation of drift parameters is achieved; the temperature and humidity change rate as a driving term enables drift estimation to respond to sudden environmental changes; the cross-interference term and nonlinear correction factor compensate for the cross-response and nonlinear error when multiple gases coexist; at the same time, the true concentration adopts an adaptive random walk model, which maintains filtering stability when the concentration is stable and automatically enhances the tracking capability when there are rapid changes such as leakage, thereby improving the accuracy and dynamic response capability of concentration estimation in emergency scenarios.
[0031] 3. Data determination module: Based on the state estimate from the previous moment and the sensor observations from the current moment, determine the optimal fusion concentration and the real-time drift parameters of each sensor at the current moment. 4. Weighting module: Calculates the observation residuals and statistics of each sensor. When the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and the abnormal state is marked. In this embodiment, when the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and the abnormal state is marked, specifically including: A sliding residual window is maintained for each sensor, the observed residual values are recorded for multiple consecutive sampling periods, and the mean and standard deviation of the residuals within the window are calculated. When the absolute value of the observation residual of a certain sensor in the current sampling period exceeds a preset first threshold, and the mean value of the residual in the sliding window exceeds a preset second threshold for a specified number of consecutive times, the sensor is determined to be in an abnormal drift state. After an anomaly is determined, the fusion weight is reduced by increasing the corresponding element of the observation noise covariance matrix of the sensor in the abnormal drift state in the Kalman filter update. The increase is positively correlated with the degree to which the residual mean exceeds the threshold. Once the residuals return to normal and remain stable for more than the recovery time, gradually reduce the observation noise covariance matrix and restore the weights. When the abnormal drift state continues for more than a preset time threshold, the sensor is marked as permanently abnormal and the observation value is completely excluded in the subsequent fusion, while the sensor failure alarm information is output.
[0032] In this embodiment, the preset first threshold and the preset second threshold specifically include: During the initial stabilization phase after system startup, the observation residuals of each sensor are collected under clean air or no target gas conditions, and the standard deviation is calculated as the baseline noise level. The first threshold is set to a higher multiple of the reference noise level to identify single-point abnormal jumps caused by transient disturbances or electromagnetic interference. The second threshold is set to a lower multiple of the reference noise level to identify persistent, minor deviations caused by slow sensor drift or poisoning. During the detection process, the multipliers of the first and second thresholds are dynamically adjusted according to the severity of changes in ambient temperature and humidity. The more severe the environmental changes, the larger the multiplier, in order to reduce the risk of misjudgment. For gas sensors with different detection principles, different reference noise levels and multipliers are set to adapt to the inherent noise characteristics of each sensor.
[0033] In this embodiment, the initial stabilization phase after system startup specifically includes: The system continuously monitors the outputs of the ambient temperature and humidity sensors. When the rate of change of temperature and the rate of change of humidity are both below their respective stable thresholds within a preset continuous sampling period, the system determines that the environment has reached a stable state. Simultaneously, the standard deviation of the observation residuals of each gas sensor within the sliding window is calculated. When the fluctuation range between the standard deviations of multiple consecutive sliding windows is lower than the preset convergence threshold, it is determined that the sensor signal has entered a stable stage. If both environmental stability and signal stability are met, the system is determined to have entered the initial stabilization phase, and residual data is collected and the baseline noise level is calculated. If the above two conditions are not met simultaneously after the system starts up and the preset maximum initialization time is exceeded, the initial stabilization phase will be forcibly terminated. The reference noise level will be calculated based on the currently collected data, and a prompt message indicating large environmental fluctuations will be output to remind on-site personnel that the current calibration reference confidence level is low.
[0034] In this embodiment, the fusion weight is reduced by increasing the corresponding elements of the observation noise covariance matrix of the sensor in the abnormal drift state during the Kalman filter update. Specifically, this includes: In the observation noise covariance matrix of the Kalman filter, a diagonal element is assigned to each sensor, and the element represents the uncertainty of the sensor's observation. When a sensor is determined to be in an abnormal drift state, the diagonal element corresponding to the sensor is multiplied by an amplification factor greater than one. The value of the amplification factor is positively correlated with the multiple by which the current residual mean exceeds the second threshold. The more severe the residual deviation, the larger the amplification factor. Once the abnormal drift state is resolved and the residual returns to normal, the diagonal elements corresponding to the sensor are gradually divided by the increase factor or reduced periodically according to the preset attenuation step size until they return to normal levels, thus avoiding sudden changes in the filter output caused by weight abrupt changes.
[0035] In this embodiment, the length of the sliding residual window is set according to the response speed of different sensors. The slower the response speed of the sensor, the longer the window length is, so as to accumulate sufficient statistical samples. When a violent signal fluctuation is detected, the window length is automatically shortened to improve the response speed, and the length is gradually restored to the initial length after the signal stabilizes.
[0036] In this embodiment, the recovery time is adaptively determined based on the severity of the anomaly and the sensor type. The recovery time is shorter for minor anomalies and longer for severe anomalies. The recovery time is correspondingly longer for sensors with slower response speeds. If an anomaly is detected again during the recovery period, the recovery timer is reset.
[0037] The beneficial effects of the above technical solution are as follows: By maintaining a sliding residual window for each sensor and calculating the mean and standard deviation of the residuals, combined with the hierarchical judgment mechanism of the first and second thresholds, it is possible to effectively distinguish between instantaneous disturbances and persistent drift, avoiding misjudgment; by increasing the corresponding elements of the observation noise covariance matrix of abnormal sensors in Kalman filtering to reduce the fusion weight, and the increase is positively correlated with the degree of residual deviation, soft weight reduction and smooth recovery of abnormal sensors are achieved, avoiding filter jumps caused by sudden weight changes; at the same time, by adaptively adjusting the sliding window length and recovery time, as well as isolating and alarming permanently abnormal sensors, the reliability of the multi-sensor fusion system in emergency scenarios for abnormal states such as sudden drift and poisoning failure is significantly improved, ensuring the continuity and accuracy of hazardous chemical concentration output.
[0038] 5. Data output module: The original measured values are corrected online using the drift parameters of each sensor, and finally the dynamically calibrated concentration of hazardous chemicals and confidence interval are output.
[0039] In this embodiment, the data output module uses the drift parameters of each sensor to correct the original measurement value online. Specifically, this includes: obtaining the zero-point drift parameter and sensitivity drift parameter of each sensor at the current time from the data judgment module; subtracting the corresponding zero-point drift parameter from the original measurement value of each sensor and then dividing by the corresponding sensitivity drift parameter to obtain the corrected concentration measurement value of that sensor; then weighting the corrected concentration measurement values of all sensors according to their current fusion weights in the Kalman filter to obtain the final output of the dynamically calibrated hazardous chemical concentration; simultaneously, based on the updated state covariance matrix of the Kalman filter, extracting the variance of the true concentration estimate as the uncertainty, calculating the confidence interval in combination with the preset confidence level, and outputting it.
[0040] The beneficial effects of the above technical solution are as follows: by obtaining the real-time estimated zero-point drift and sensitivity drift parameters from the data judgment module, the original measurement values of each sensor are reverse-corrected, and then weighted averaged using the current fusion weights, the concentration output after dynamic calibration is realized; at the same time, uncertainty is extracted based on the state covariance matrix and confidence interval is calculated, providing a reliable quantitative basis for concentration measurement values for emergency decision-making, and enhancing the interpretability and practicality of the output results.
[0041] In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0042] Although the invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the embodiments disclosed in this invention can be combined with each other in any way. The fact that not all of these combinations are described in this specification is merely for the sake of brevity and resource conservation.
[0043] It will be understood by those skilled in the art that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals, characterized in that, include: The data acquisition module uses an array of temperature sensors, humidity sensors, and at least two gas sensors with different detection principles to simultaneously acquire response signals of the target hazardous chemical and related interfering gases, and performs time registration and filtering preprocessing on each signal. The spatial modeling module constructs extended-dimensional state vectors and establishes state transition equations and observation equations with multi-sensor observations as input. The data determination module determines the optimal fusion concentration and the real-time drift parameters of each sensor based on the state estimate from the previous moment and the sensor observations from the current moment. The weighting module calculates the observation residuals and statistics of each sensor. When the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and the abnormal state is marked. The data output module uses the drift parameters of each sensor to correct the original measurement values online, and finally outputs the dynamically calibrated concentration of hazardous chemicals and the confidence interval.
2. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 1, characterized in that, The response signals of the target hazardous chemical and related interfering gases are acquired synchronously, and time registration and filtering preprocessing are performed on each signal, specifically including: Based on the inherent response delay time of different sensors, the signals of each channel are time-delay aligned so that the measured values of all sensors correspond to the air mass state at the same sampling time. Identify and eliminate pulse-type abnormal data caused by instantaneous sensor disturbances or external electromagnetic interference; Sliding window averaging or weighted averaging is performed on continuously acquired signal sequences to suppress high-frequency random noise; By using data from ambient temperature and humidity sensors, a first-order correction is applied to the output values of each gas sensor to reduce the impact of sudden temperature and humidity changes on the initial deviation of the measurement results.
3. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 2, characterized in that, Based on the inherent response delay time of different sensors, time delay alignment is performed on each signal, specifically including: In a laboratory environment, a standard gas with a step change in concentration is applied to each sensor. The time required for each sensor to reach a stable percentage of the change in concentration is recorded as the reference response delay time for each sensor and stored in the delay parameter table. In the actual detection process, the sensor with the longest response delay time is used as the time reference. Based on the delay difference between each sensor and the reference sensor in the delay parameter table, the signal sequences of other sensors are time-shifted so that the measured values of all sensors correspond to the air mass state at the same sampling time. When the wind speed at the detection site is high or the air mass flow direction is known, the transmission time difference between the air mass and each installation position of the sensor array is calculated by combining the wind speed sensor data. The transmission time difference is then added to the inherent response delay time of each sensor to form the total delay compensation. For sensor combinations with response speed differences exceeding a preset multiple, the signal from the fast-response sensor is downsampled or accumulated via a sliding window to match the effective response timescale with that of the slow-response sensor.
4. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 1, characterized in that, Construct an extended-dimensional state vector and establish state transition equations and observation equations with multi-sensor observations as input, specifically including: Construct a joint state vector that includes the real gas concentration, the zero-point drift parameters of each sensor, and the sensitivity drift parameters of each sensor; A state transition equation is established to describe the dynamic relationship between the true concentration and the evolution of each drift parameter over time, wherein the evolution of the drift parameter incorporates the changes in temperature and humidity as driving terms. An observation equation is established with multi-sensor observations as input. The theoretical output value of each sensor is expressed as the sensor's sensitivity drift parameter multiplied by the true concentration plus the zero-point drift parameter, with a cross-interference term and a nonlinear correction factor superimposed.
5. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 4, characterized in that, The evolution of drift parameters incorporates temperature and humidity changes as driving terms, specifically including: The data from the temperature sensor and humidity sensor are read in real time, and the rate of temperature change and rate of humidity change at adjacent sampling times are calculated. The temperature change rate and humidity change rate are used as external driving inputs, multiplied by preset temperature drift coefficient and humidity drift coefficient respectively, and then superimposed on the state transition equations of the zero drift parameters and sensitivity drift parameters of each sensor. The temperature drift coefficient and humidity drift coefficient of different gas sensors are determined in advance through laboratory environmental experiments and stored in the system parameter table. During the detection process, the corresponding coefficient is dynamically called according to the type of sensor currently in use.
6. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 4, characterized in that, Superimposed cross-interference terms and nonlinear correction factors, specifically including: In a laboratory environment, the response coefficients of each target sensor to typical interfering gases that may coexist are measured in advance, and a cross-interference matrix is formed and stored in the system parameter table. In actual testing, auxiliary sensors or known prior information are used to identify the types and concentration ranges of interfering gases present in the current environment. Based on the identified types of interfering gases, the corresponding interference coefficients are retrieved from the cross-interference matrix, multiplied by the estimated concentration of the interfering gas, and then added to the observation equation as cross-interference terms. When the actual concentration of the interfering gas cannot be directly measured, the equivalent concentration of the interfering gas can be inferred by using the response differences of multiple sensors in the main sensor array through linear decoupling or principal component analysis.
7. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 1, characterized in that, When the residual of any sensor continuously exceeds a preset threshold, the fusion weight of the sensor in the Kalman filter update is reduced, and the abnormal state is marked, specifically including: A sliding residual window is maintained for each sensor, the observed residual values are recorded for multiple consecutive sampling periods, and the mean and standard deviation of the residuals within the window are calculated. When the absolute value of the observation residual of a certain sensor in the current sampling period exceeds a preset first threshold, and the mean value of the residual in the sliding window exceeds a preset second threshold for a specified number of consecutive times, the sensor is determined to be in an abnormal drift state. After an anomaly is determined, the fusion weight is reduced by increasing the corresponding element of the observation noise covariance matrix of the sensor in the abnormal drift state in the Kalman filter update. The increase is positively correlated with the degree to which the residual mean exceeds the threshold. Once the residuals return to normal and remain stable for more than the recovery time, gradually reduce the observation noise covariance matrix and restore the weights. When the abnormal drift state continues for more than a preset time threshold, the sensor is marked as permanently abnormal and the observation value is completely excluded in the subsequent fusion, while the sensor failure alarm information is output.
8. The multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 7, characterized in that, The preset first threshold and preset second threshold specifically include: During the initial stabilization phase after system startup, the observation residuals of each sensor are collected under clean air or no target gas conditions, and the standard deviation is calculated as the baseline noise level. The first threshold is set to a higher multiple of the reference noise level to identify single-point abnormal jumps caused by transient disturbances or electromagnetic interference. The second threshold is set to a lower multiple of the reference noise level to identify persistent, minor deviations caused by slow sensor drift or poisoning. During the detection process, the multiplier coefficients of the first and second thresholds are dynamically adjusted according to the severity of changes in ambient temperature and humidity. The more severe the environmental changes, the larger the multiplier coefficient, in order to reduce the risk of misjudgment. For gas sensors with different detection principles, different reference noise levels and multipliers are set to adapt to the inherent noise characteristics of each sensor.
9. A multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 8, characterized in that, The initial stabilization phase after system startup specifically includes: The system continuously monitors the outputs of the ambient temperature and humidity sensors. When the rate of change of temperature and the rate of change of humidity are both lower than their respective stable thresholds within a preset continuous sampling period, the system determines that the environment has reached a stable state. Simultaneously, the standard deviation of the observation residuals of each gas sensor within the sliding window is calculated. When the fluctuation range between the standard deviations of multiple consecutive sliding windows is lower than the preset convergence threshold, it is determined that the sensor signal has entered a stable stage. If both environmental stability and signal stability are met, the system is determined to have entered the initial stabilization phase, and residual data is collected and the baseline noise level is calculated. If the above two conditions are not met simultaneously after the system starts up and the preset maximum initialization time is exceeded, the initial stabilization phase will be forcibly terminated. The reference noise level will be calculated based on the currently collected data, and a prompt message indicating large environmental fluctuations will be output to remind on-site personnel that the current calibration reference confidence level is low.
10. A multi-sensor dynamic calibration and error compensation system for emergency detection of hazardous chemicals according to claim 7, characterized in that, The fusion weights are reduced by increasing the corresponding elements of the observation noise covariance matrix of the sensor in the abnormal drift state during the Kalman filter update. Specifically, this includes: In the observation noise covariance matrix of the Kalman filter, a diagonal element is assigned to each sensor, and the element represents the uncertainty of the sensor's observation. When a sensor is determined to be in an abnormal drift state, the diagonal element corresponding to the sensor is multiplied by an amplification factor greater than one. The value of the amplification factor is positively correlated with the multiple by which the current residual mean exceeds the second threshold. The more severe the residual deviation, the larger the amplification factor. Once the abnormal drift state is resolved and the residual returns to normal, the diagonal elements corresponding to the sensor are gradually divided by the increase factor or reduced periodically according to the preset attenuation step size until they return to normal levels, thus avoiding sudden changes in the filter output caused by weight abrupt changes.