Method for carrying out estimation and diffusion prediction on toxic cloud cluster based on ensemble Kalman filtering

By applying ensemble Kalman filtering technology in the diffusion prediction of toxic gases, the problem of error accumulation and real-time correction is solved, and the prediction accuracy and real-time performance are significantly improved.

CN119517206APending Publication Date: 2025-02-25XIAN UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411564821.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing toxic gas diffusion prediction methods have problems such as continuous accumulation of errors and difficulty in real-time correction, which leads to inconsistent with the actual situation.

Method used

The method based on ensemble Kalman filtering is used to estimate and diffusion prediction of toxic clouds. By constructing the system state vector and calculating the error covariance, the leakage location and leakage amount are inferred, and the prediction results are corrected using sensor data.

Benefits of technology

It improves the accuracy of toxic cloud diffusion prediction, reduces error accumulation, and realizes the ability to correct real-time deviations, making the prediction results closer to the actual situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517206A_ABST
    Figure CN119517206A_ABST
Patent Text Reader

Abstract

The invention discloses a method for carrying out estimation and diffusion prediction on a toxic cloud cluster based on ensemble Kalman filtering. The method comprises the following steps: S1, adopting basic data, and carrying out modeling on toxic gas diffusion through the basic data; s2, on the basis of the model established in the S1, generating concentration data of each discrete point in the grid region through model simulation; s3, on the basis of ensemble Kalman filtering, constructing a system state vector through the concentration data obtained in S2, and calculating a system state error covariance to deduce a leakage position and a leakage amount; and S4, performing toxic cloud cluster diffusion prediction by using ensemble Kalman filtering, and outputting a prediction result. According to the method for performing estimation and diffusion prediction on the toxic cloud cluster based on the ensemble Kalman filtering provided by the invention, the prediction result of the diffusion model can be corrected under the theoretical guidance, so that the final prediction result is more accurate, and the problems that errors are continuously accumulated and the diffusion track is difficult to rectify in real time in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of public safety prediction, and in particular relates to a method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering. Background Art

[0002] With the increasing development of industrial technology, chemical substances are widely used in various fields of human life. Although these products have brought many conveniences to society, they are also accompanied by potential risks. For example, improper production, natural disasters and other reasons may lead to the leakage of chemical substances, causing serious harm. In recent years, such accidents have been common, and safety issues have become increasingly prominent. Therefore, it is particularly important to accurately and quickly predict the leakage location, leakage amount and diffusion range of toxic clouds, so as to issue an alarm early and reduce the impact of the accident. However, after a toxic gas leakage accident occurs, due to the inaccuracy of the leakage source parameters (such as the leakage source location and leakage amount, etc.), the prediction errors will continue to accumulate, and ultimately the prediction results will not match the actual situation.

[0003] Existing methods for predicting the diffusion of toxic gases are mostly based on neural network prediction, which uses trained models to quickly predict toxic gases. The prediction method based on neural networks does not solve the problem of error accumulation in the iterative process of the gas diffusion model, and the final prediction result still has a large deviation from the true value.

[0004] The problems existing in the prior art are mainly as follows: First: Toxic gas leaks are sudden and spread quickly, so the amount of actual data used is small.

[0005] Second: There are many factors that affect gas diffusion, and errors continue to accumulate.

[0006] Third: When errors continue to accumulate, it is difficult to correct the diffusion trajectory in real time. Summary of the invention

[0007] The purpose of the present invention is to provide a method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering, which can correct the prediction results of the diffusion model under the guidance of theory, so that the final prediction results are more accurate, and solve the problem of continuous accumulation of existing errors and difficulty in real-time correction of diffusion trajectories.

[0008] The technical solution adopted by the present invention is a method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering, and the specific steps are as follows: Step 1: Take basic data and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point after discretization in the grid area is generated by model simulation; Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0009] The present invention is also characterized in that: Basic data includes the location of the leak source, meteorological data and grid information.

[0010] In step 1, the diffusion of toxic gases is modeled, and the model formula is as follows: (1) The model simulates the diffusion of smoke and rain flow by superimposing a series of smoke puffs, each of which can be represented by [ , Q] is represented by 7 parameters, among which represents the coordinates of the center of the puff. represents the diffusion coefficient of the smoke puff, which is related to the downwind movement distance of the smoke puff and the atmospheric stability. represents the mass of the puff, and the superscript in the formula represents the For a puff of smoke at any time and any position, the concentration is the sum of the concentrations of all the puffs at this position at that time.

[0011] The specific method of step 2 is: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter; Q is the mass of the puff. Assuming that the leaked substance does not react with the surrounding environment, the mass remains unchanged. Therefore, after a time interval, the concentration of each puff at a certain position is calculated according to the formula in step 1. Finally, the concentration at a certain position can be obtained by summing up the concentrations.

[0012] and Direction and The value is determined according to the atmospheric stability.

[0013] The process of inferring the leakage location based on the ensemble Kalman filter in step 3 is as follows: First construct the state vector: (9) In the formula, It is The moment The system state vector of samples, is the estimated leak location at the moment, They are Concentration data captured by the sensor at the optimal sensor position at all times; Secondly, the state error covariance of the system is calculated: (10) (11) Then obtain the Kalman gain matrix, and then construct the observation vector and observation value: (12) (13) Finally, update the sample: (14) During the iterative update of the ensemble Kalman filter, the latest data captured by the sensor is introduced in real time to correct the prediction results, so that the distribution range of the unknown leakage source is gradually reduced and finally converges to the vicinity of the true location. The leakage source estimation values ​​of all samples are averaged to obtain the optimal leakage source estimation result: (15).

[0014] When using the ensemble Kalman filter to estimate the leakage location, the system state vector is constructed to combine the predicted concentration data obtained by the diffusion model with the unknown leakage, so that the sensor data is used as the observation value to correct the diffusion model prediction results while allowing the leakage source in the sample to gradually move closer to the real leakage source.

[0015] The process of inferring the leakage amount based on the ensemble Kalman filter in step 3 is as follows: The unknown leakage amount is estimated using the following formula: (16) Where Q is the leakage rate, T is the leakage time, and the leakage time T is calculated by constructing a linear equation system based on the sensor concentration observation value and the leakage rate: When estimating the leakage rate in formula (16), the above-mentioned ensemble Kalman filter is used: First, In Convert to , and then the leakage rate is inferred according to the process. From the formula for inferring the leakage source location, it can be seen that the leakage rate and concentration are linearly related. The ensemble Kalman filter is continued to increase the calculation consumption. The following method is adopted to estimate the leakage rate. First, the concentration formula is converted into the following (17): (17) In the formula, is an extended term, which is the part of the diffusion formula after removing the leakage rate. When other parameters except the leakage rate are known, is a constant greater than zero, assuming that the actual leakage rate at this time , the sensor data at the optimal sensor position is , Indicates sensors, the Gaussian expansion term at the optimal sensor position is , at this time the sensor concentration With diffusion term The ratio between them is the leakage rate , ideally at any time However, due to the existence of errors in the model iteration process, there is a gap between the predicted value and the true value, which leads to fluctuations in the ratio between concentration and diffusivity. The least squares method reduces the impact of errors on the estimation results by minimizing the mean square error. Therefore, for a data set with observed data, the purpose of the least squares method is to obtain a fitting relationship between and by minimizing the sum of squares of the residuals between the model's predicted values ​​and the observed values, and finally averaging to obtain the final leakage rate estimate: (18) (19) (20) (twenty one).

[0016] The diffusion prediction process using ensemble Kalman filtering in step 4 is as follows: First, construct the system state vector: (twenty two) In the formula, For the The sensor position is The concentration data for each time step, is the concentration data of the center of the puff, for each system state vector The concentration diffusion state equation is constructed as follows: (twenty three) In the formula, is the state transfer matrix, is the input control matrix, is the system noise, represent The system input at time is not considered in the prediction of toxic cloud diffusion. is a zero matrix; then construct the model observation equation: (twenty four) In the formula is the observation matrix, is the observation noise. Since both the observed value and the predicted value are observations or predictions of the concentration, they are in the same state space. is the unit matrix; then make a prediction based on the optimal state at the previous moment: (25) (26) The update steps of the ensemble Kalman filter applied to the prediction of toxic cloud diffusion are as follows: (27) (28) (29) (30).

[0017] The beneficial effects of the present invention are: The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering of the present invention inverts the leakage source parameters through source term estimation before using the diffusion model for data simulation, so as to reduce the influence of the noise generated by the inaccurate leakage parameters on the diffusion accuracy, and after obtaining the accurate leakage source parameters, uses the diffusion model for simulation, combines multiple sensor data in the form of concentration weighting, and uses the ensemble Kalman filtering method to correct the prediction result, so as to improve the accuracy of the toxic cloud diffusion prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a logical hierarchical structure diagram of the estimation and diffusion prediction method of the present invention; Figure 2 It is a schematic diagram of data simulation layer decomposition of the estimation and diffusion prediction method of the present invention; Figure 3 It is a schematic diagram of the collective Kalman filter source term estimation and prediction decomposition of the estimation and diffusion prediction method of the present invention; Figure 4 is a relationship diagram among the model prediction value, sensor observation value and Kalman filter estimation value of the present invention; Figure 5 It is an initial schematic diagram of the leakage source location update process of the estimation and diffusion prediction method of the present invention; Figure 6 It is a schematic diagram showing the end of the leakage source position update process of the estimation and diffusion prediction method of the present invention; Figure 7 is a least squares leakage rate estimation graph of the estimation and diffusion prediction method of the present invention; Figure 8 is a diagram of the collective Kalman filter process of the estimation and diffusion prediction method of the present invention; Fig. 9 is a graph showing the variation of the error of the estimation and diffusion prediction method of the present invention over time; Fig.10 It is a schematic diagram of the diffusion trajectory of the estimation and diffusion prediction method of the present invention. DETAILED DESCRIPTION

[0019] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Figure 2As shown, basic data is taken, including the location of the leakage source, meteorological data and grid information. The diffusion of toxic gases is constructed through basic data. The model formula is as follows: (1) The model simulates the diffusion of smoke and rain flow by superimposing a series of smoke puffs, each of which can be represented by [ , Q] is represented by 7 parameters, among which x, y and z represents the coordinates of the center of the puff. represents the diffusion coefficient of the smoke puff, which is related to the downwind movement distance of the smoke puff and the atmospheric stability. represents the mass of the puff, and the superscript in the formula represents the For a puff of smoke at any time and any position, the concentration is the sum of the concentrations of all the puffs at this position at that time.

[0021] Step 2: Based on the model built in step 1, the model simulation is used to generate the concentration data of each point in the grid area after discretization. The specific method is as follows: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter, and Direction and The value is determined according to the atmospheric stability, please refer to Table 1 for details: Table 1 Atmospheric stability reference table

[0022] Q is the mass of the puff. Assuming that the leaked substance does not react with the surrounding environment, the mass remains unchanged. Therefore, after a time interval, the concentration of each puff at a certain position is calculated according to the formula in step 1. Finally, the concentration at a certain position can be obtained by summing up the concentrations.

[0023] Step 3: Figure 3 As shown, based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Using the concentration data, the ensemble Kalman filter is used to infer the location of the leak source and the amount of leakage, and to infer the location where the toxic gas is most likely to leak. The core concept of the Kalman filter is to combine prior knowledge with actual measurement data and continuously iterate to correct and optimize the system state estimate. In this process, the Kalman filter fully considers the influence of measurement error and process noise. It uses the Kalman gain to balance the model prediction and actual observation information, and dynamically adjusts the state estimate to make it closer to the actual system state. Figure 4 shown.

[0024] The process of inferring the leak location based on the ensemble Kalman filter is as follows: First construct the state vector: (9) In the formula, It is The moment The system state vector of samples, is the estimated leak location at the moment, They are Concentration data captured by the sensor at the optimal sensor position at all times; Secondly, the state error covariance of the system is calculated: (10) (11) Then obtain the Kalman gain matrix, and then construct the observation vector and observation value: (12) (13) Finally, update the sample: (14) During the iterative update of the ensemble Kalman filter, the latest data captured by the sensor is introduced in real time to correct the prediction results, so that the distribution range of the unknown leakage source is gradually reduced and finally converges to the vicinity of the true location. The leakage source estimation values ​​of all samples are averaged to obtain the optimal leakage source estimation result: (15) When the ensemble Kalman filter is used to estimate the leakage location, the system state vector is constructed to combine the predicted concentration data obtained by the diffusion model with the unknown leakage, so that the sensor data is used as the observation value to correct the diffusion model prediction result, and the leakage source in the sample is gradually brought closer to the real leakage source, such as Figure 5 , 6 The predicted position shown is close to the actual leakage position.

[0025] When estimating the unknown leakage amount, the original problem can be converted into the estimation of the leakage rate. Finally, the estimated value of the leakage amount is obtained by multiplying the leakage time T. The leakage time T is obtained by inverse calculation by constructing a linear equation system through the sensor concentration observation value and the leakage rate: The formula is as follows: (16) Where Q is the leakage rate, T is the leakage time, and the leakage time T is calculated by constructing a linear equation system based on the sensor concentration observation value and the leakage rate: When estimating the leakage rate in formula (16), the above-mentioned ensemble Kalman filter is still used: First, In Convert to , and then the leakage rate is inferred according to the process. From the formula (9-15) for inferring the leakage source location, it can be seen that the leakage rate and concentration are linearly related. The ensemble Kalman filter is continued to increase the calculation consumption. The following method is adopted to estimate the leakage rate. First, the concentration formula is converted as shown below (17): (17) In the formula, is an extended term, which is the part of the diffusion formula after removing the leakage rate. When other parameters except the leakage rate are known, is a constant greater than zero, assuming that the actual leakage rate at this time , the sensor data at the optimal sensor position is , Indicates sensors, the Gaussian expansion term at the optimal sensor position is , at this time the sensor concentration With diffusion term The ratio between them is the leakage rate , ideally at any time However, due to the existence of errors in the model iteration process, there is a gap between the predicted value and the true value, which leads to fluctuations in the ratio between concentration and diffusivity. The least squares method reduces the impact of errors on the estimation results by minimizing the mean square error.

[0026] Therefore, for a data set with observed data, the purpose of the least squares method is to obtain a fitting relationship between the predicted value of the model and the observed value by minimizing the sum of squares of the residuals. Figure 7 As shown, the final average is taken to obtain the final leakage rate estimate: (18) (19) (20) (twenty one) Step 4: Figure 8 Use ensemble Kalman filtering to predict the spread of toxic clouds and output the prediction results. As a filtering method based on ensemble samples, the covariance of the samples is calculated instead of the covariance matrix update in the traditional Kalman filter, which reduces the amount of calculation and greatly reduces the error. Fig. 9 As shown, the model prediction value is corrected by sensor observation data to achieve accurate prediction of toxic gas diffusion, such as Fig.10 As shown in Figure 1, the specific process of using ensemble Kalman filtering to predict the diffusion of toxic clouds is as follows: First, construct the system state vector: (twenty two) In the formula, For the The sensor position is The concentration data for each time step, is the concentration data of the center of the puff, for each system state vector The concentration diffusion state equation is constructed as follows: (twenty three) In the formula, is the state transfer matrix, is the input control matrix, is the system noise, represent The system input at time is not considered in the prediction of toxic cloud diffusion. is a zero matrix; then construct the model observation equation: (twenty four) In the formula is the observation matrix, is the observation noise. Since both the observed value and the predicted value are observations or predictions of the concentration, they are in the same state space. is the unit matrix; then make a prediction based on the optimal state at the previous moment: (25) (26) The update steps of the ensemble Kalman filter applied to the prediction of toxic cloud diffusion are as follows: (27) (28) (29) (30) Example 1 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has the following specific steps: Step 1: Take basic data and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point after discretization in the grid area is generated by model simulation; Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0027] Example 2 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Take basic data, including the location of the leakage source, meteorological data and grid information, and model the diffusion of toxic gases through the basic data; The diffusion of toxic gases is modeled as follows: (1) The model simulates the diffusion of smoke and rain flow by superimposing a series of smoke puffs, each of which can be represented by [ , Q] is represented by 7 parameters, among which represents the coordinates of the center of the puff. represents the diffusion coefficient of the smoke puff, which is related to the downwind movement distance of the smoke puff and the atmospheric stability. represents the mass of the puff, and the superscript in the formula represents the For a puff of smoke at any time and any position, the concentration is the sum of the concentrations of all the puffs at this position at that time.

[0028] Step 2: Based on the model built in step 1, the concentration data of each point after discretization in the grid area is generated by model simulation; Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0029] Example 3 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Take basic data, including the location of the leakage source, meteorological data and grid information, and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point in the grid area after discretization is generated by model simulation; the specific method is: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter, and Direction and The value is determined according to the atmospheric stability.

[0030] Step 3: construct a system state vector based on the concentration data obtained in step 2 through the ensemble Kalman filter and calculate the system state error covariance to infer the leakage location and leakage amount; Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0031] Example 4 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Take basic data, including the location of the leakage source, meteorological data and grid information, and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point in the grid area after discretization is generated by model simulation; the specific method is: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter, and Direction and The value is determined according to the atmospheric stability, please refer to Table 1 for details: Table 1 Atmospheric stability reference table

[0032] Q is the mass of the puff. Assuming that the leaked substance does not react with the surrounding environment, the mass remains unchanged. Therefore, after a time interval, the concentration of each puff at a certain position is calculated according to the formula in step 1. Finally, the concentration at a certain position can be obtained by summing up the concentrations.

[0033] Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Using the concentration data, the ensemble Kalman filter is used to infer the location of the leak source and the amount of leakage, and to infer the location where the toxic gas is most likely to leak. The core concept of the Kalman filter is to combine prior knowledge with actual measurement data and continuously iterate to correct and optimize the system state estimate. In this process, the Kalman filter fully considers the influence of measurement error and process noise. It uses the Kalman gain to balance the model prediction and actual observation information, and dynamically adjusts the state estimate to make it closer to the actual system state.

[0034] The process of inferring the leak location based on the ensemble Kalman filter is as follows: First construct the state vector: (9) In the formula, It is The moment The system state vector of samples, is the estimated leak location at the moment, They are Concentration data captured by the sensor at the optimal sensor position at all times; Secondly, the state error covariance of the system is calculated: (10) (11) Then obtain the Kalman gain matrix, and then construct the observation vector and observation value: (12) (13) Finally, update the sample: (14) During the iterative update of the ensemble Kalman filter, the latest data captured by the sensor is introduced in real time to correct the prediction results, so that the distribution range of the unknown leakage source is gradually reduced and finally converges to the vicinity of the true location. The leakage source estimation values ​​of all samples are averaged to obtain the optimal leakage source estimation result: (15) When the ensemble Kalman filter is used to estimate the leakage location, a system state vector is constructed to combine the predicted concentration data obtained by the diffusion model with the unknown leakage, so that the sensor data is used as the observation value to correct the diffusion model prediction result while allowing the leakage source in the sample to gradually move closer to the real leakage source.

[0035] Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0036] Example 5 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Take basic data, including the location of the leakage source, meteorological data and grid information, and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point in the grid area after discretization is generated by model simulation; the specific method is: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter; Q is the mass of the puff. Assuming that the leaked substance does not react with the surrounding environment, the mass remains unchanged. Therefore, after a time interval, the concentration of each puff at a certain position is calculated according to the formula in step 1. Finally, the concentration at a certain position can be obtained by summing up the concentrations.

[0037] Step 3: construct a system state vector based on the concentration data obtained in step 2 through the ensemble Kalman filter and calculate the system state error covariance to infer the leakage location and leakage amount; Using the concentration data, the ensemble Kalman filter is used to infer the location of the leak source and the amount of leakage, and to infer the location where the toxic gas is most likely to leak. The core concept of the Kalman filter is to combine prior knowledge with actual measurement data and continuously iterate to correct and optimize the system state estimate. In this process, the Kalman filter fully considers the influence of measurement error and process noise. It uses the Kalman gain to balance the model prediction and actual observation information, and dynamically adjusts the state estimate to make it closer to the actual system state.

[0038] The process of inferring the leak location based on the ensemble Kalman filter is as follows: First construct the state vector: (9) In the formula, It is The moment The system state vector of samples, is the estimated leak location at the moment, They are Concentration data captured by the sensor at the optimal sensor position at all times; Secondly, the state error covariance of the system is calculated: (10) (11) Then obtain the Kalman gain matrix, and then construct the observation vector and observation value: (12) (13) Finally, update the sample: (14) During the iterative update of the ensemble Kalman filter, the latest data captured by the sensor is introduced in real time to correct the prediction results, so that the distribution range of the unknown leakage source is gradually reduced and finally converges to the vicinity of the true location. The leakage source estimation values ​​of all samples are averaged to obtain the optimal leakage source estimation result: (15) When the ensemble Kalman filter is used to estimate the leakage location, a system state vector is constructed to combine the predicted concentration data obtained by the diffusion model with the unknown leakage, so that the sensor data is used as the observation value to correct the diffusion model prediction result while allowing the leakage source in the sample to gradually move closer to the real leakage source.

[0039] When estimating the unknown leakage amount, the original problem can be converted into the estimation of the leakage rate. Finally, the estimated value of the leakage amount is obtained by multiplying the leakage time T. The leakage time T is obtained by inverse calculation by constructing a linear equation system through the sensor concentration observation value and the leakage rate: The formula is as follows: (16) Where Q is the leakage rate, T is the leakage time, and the leakage time T is calculated by constructing a linear equation system based on the sensor concentration observation value and the leakage rate: When estimating the leakage rate in formula (16), the above-mentioned ensemble Kalman filter is still used: First, In Convert to , and then the leakage rate is inferred according to the process. From the formula (9-15) for inferring the leakage source location, it can be seen that the leakage rate and concentration are linearly related. The ensemble Kalman filter is continued to increase the calculation consumption. The following method is adopted to estimate the leakage rate. First, the concentration formula is converted as shown below (17): (17) In the formula, It is an extended term, which is the part of the diffusion formula after removing the leakage rate. When other parameters except the leakage rate are known, is a constant greater than zero, assuming that the actual leakage rate at this time , the sensor data at the optimal sensor position is , Indicates sensors, the Gaussian expansion term at the optimal sensor position is , at this time the sensor concentration With diffusion term The ratio between them is the leakage rate , ideally at any time However, due to the existence of errors in the model iteration process, there is a gap between the predicted value and the true value, which leads to fluctuations in the ratio between concentration and diffusivity. The least squares method reduces the impact of errors on the estimation results by minimizing the mean square error.

[0040] Therefore, for a data set with observed data, the purpose of the least squares method is to obtain a fitting relationship between and by minimizing the sum of squares of the residuals between the model's predicted values ​​and the observed values, and finally averaging to obtain the final leakage rate estimate: (18) (19) (20) (twenty one) Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

[0041] Example 6 The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering has a logical hierarchy as shown in the figure below. Figure 1 As shown, the specific steps are as follows: Step 1: Take basic data, including the location of the leakage source, meteorological data and grid information, and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point after discretization in the grid area is generated by model simulation; Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Step 4: Use the ensemble Kalman filter to predict the diffusion of toxic clouds and output the prediction results. As a filtering method based on ensemble samples, the covariance of the samples is calculated instead of the covariance matrix update in the traditional Kalman filter, which greatly reduces the amount of calculation. The model prediction value is corrected through sensor observation data to achieve accurate prediction of toxic gas diffusion. The specific process of using the ensemble Kalman filter to predict the diffusion of toxic clouds is as follows: First, construct the system state vector: (twenty two) In the formula, For the The sensor position is The concentration data for each time step, is the concentration data of the center of the puff, for each system state vector The concentration diffusion state equation is constructed as follows: (twenty three) In the formula, is the state transfer matrix, is the input control matrix, is the system noise, represent The system input at time is not considered in the prediction of toxic cloud diffusion. is a zero matrix; then construct the model observation equation: (twenty four) In the formula is the observation matrix, is the observation noise. Since both the observed value and the predicted value are observations or predictions of the concentration, they are in the same state space. is the unit matrix; then make a prediction based on the optimal state at the previous moment: (25) (26) The update steps of the ensemble Kalman filter applied to the prediction of toxic cloud diffusion are as follows: (27) (28) (29) (30)

Claims

1. A method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering, characterized in that: The specific steps are as follows: Step 1: Take basic data and model the diffusion of toxic gases through the basic data; Step 2: Based on the model built in step 1, the concentration data of each point after discretization in the grid area is generated by model simulation; Step 3: Based on the ensemble Kalman filter, the system state vector is constructed through the concentration data obtained in step 2 and the system state error covariance is calculated, so as to infer the leakage location and leakage amount; Step 4: Use ensemble Kalman filtering to predict the diffusion of toxic clouds and output the prediction results.

2. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 1 is characterized in that: The basic data includes the location of the leakage source, meteorological data and grid information.

3. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 1 is characterized in that: In step 1, the diffusion of toxic gases is modeled, and the model formula is as follows: (1) The model simulates the diffusion of smoke and rain flow by superimposing a series of smoke puffs, each of which can be represented by [ , Q] is represented by 7 parameters, among which represents the coordinates of the center of the puff. represents the diffusion coefficient of the smoke puff, which is related to the downwind movement distance of the smoke puff and the atmospheric stability. represents the mass of the puff, and the superscript in the formula represents the For a puff of smoke at any time and any position, the concentration is the sum of the concentrations of all the puffs at this position at that time.

4. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 1 is characterized in that: The specific method of step 2 is: 200 leakage sources are randomly selected with uniform distribution and 200 wind directions are randomly selected with Gaussian distribution. Then, the leakage sources and wind directions are matched one by one to achieve an approximate simulation of the real leakage environment. In the process of concentration generation, [ , Q] is used as the parameter for each iteration. At the beginning, the previously randomly generated leakage source position is used as the initial position. , Q is taken as a constant, and then the downwind distance that the smoke moves with the wind within a time interval is calculated based on the wind speed. The formula is as follows: (2) in is the wind speed; Then update the center coordinates of the smoke cloud according to the wind direction and wind speed [ ], the formula is as follows: (3) (4) (5) in The wind speed is Directional weight; Update later The update formula is as follows: (6) (7) (8) in and is the diffusion parameter; Q is the mass of the puff. Assuming that the leaked substance does not react with the surrounding environment, the mass remains unchanged. Therefore, after a time interval, the concentration of each puff at a certain position is calculated according to the formula in step 1. Finally, the concentration at a certain position can be obtained by summing up the concentrations.

5. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 4 is characterized in that: Said and Direction and The value is determined according to the atmospheric stability.

6. The method for estimating and predicting the spread of toxic clouds based on ensemble Kalman filtering according to claim 5 is characterized in that: The process of inferring the leakage location based on the ensemble Kalman filter in step 3 is as follows: First construct the state vector: (9) In the formula, It is The moment The system state vector of samples, is the estimated leak location at the moment, They are Concentration data captured by the sensor at the optimal sensor position at all times; Secondly, the state error covariance of the system is calculated: (10) (11) Then obtain the Kalman gain matrix, and then construct the observation vector and observation value: (12) (13) Finally, update the sample: (14) During the iterative update of the ensemble Kalman filter, the latest data captured by the sensor is introduced in real time to correct the prediction results, so that the distribution range of the unknown leakage source is gradually reduced and finally converges to the vicinity of the true location. The leakage source estimation values ​​of all samples are averaged to obtain the optimal leakage source estimation result: (15)。 7. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 6 is characterized in that: When using the ensemble Kalman filter to estimate the leakage location, the system state vector is constructed to combine the predicted concentration data obtained by the diffusion model with the unknown leakage, so that the sensor data is used as the observation value to correct the diffusion model prediction results while allowing the leakage source in the sample to gradually move closer to the real leakage source.

8. The method for estimating and predicting the spread of toxic clouds based on ensemble Kalman filtering according to claim 7, characterized in that: The process of inferring leakage amount based on ensemble Kalman filtering in step 3 is as follows: The unknown leakage amount is estimated using the following formula: (16) Where Q is the leakage rate, T is the leakage time, and the leakage time T is calculated by constructing a linear equation system based on the sensor concentration observation value and the leakage rate: When estimating the leakage rate in formula (16), the above-mentioned ensemble Kalman filter is used: First, In Convert to , and then the leakage rate is inferred according to the process. From the formula for inferring the leakage source location, it can be seen that the leakage rate and concentration are linearly related. The ensemble Kalman filter is continued to increase the calculation consumption. The following method is adopted to estimate the leakage rate. First, the concentration formula is converted into the following (17): (17) In the formula, is an extended term, which is the part of the diffusion formula after removing the leakage rate. When other parameters except the leakage rate are known, is a constant greater than zero, assuming that the actual leakage rate at this time , the sensor data at the optimal sensor position is , Indicates sensors, the Gaussian expansion term at the optimal sensor position is , at this time the sensor concentration With diffusion term The ratio between them is the leakage rate , ideally at any time However, due to the existence of errors in the model iteration process, there is a gap between the predicted value and the true value, which leads to fluctuations in the ratio between concentration and diffusivity. The least squares method reduces the impact of errors on the estimation results by minimizing the mean square error. Therefore, for a data set with observed data, the purpose of the least squares method is to obtain a fitting relationship between and by minimizing the sum of squares of the residuals between the model's predicted values ​​and the observed values, and finally averaging to obtain the final leakage rate estimate: (18) (19) (20) (21)。 9. The method for estimating and predicting the diffusion of toxic clouds based on ensemble Kalman filtering according to claim 1, characterized in that: The diffusion prediction process using ensemble Kalman filtering in step 4 is as follows: First, construct the system state vector: (22) In the formula, For the The sensor position is The concentration data for each time step, is the concentration data of the center of the puff, for each system state vector The concentration diffusion state equation is constructed as follows: (23) In the formula, is the state transfer matrix, is the input control matrix, is the system noise, represent The system input at time is not considered in the prediction of toxic cloud diffusion. is a zero matrix; then construct the model observation equation: (24) In the formula is the observation matrix, is the observation noise. Since both the observed value and the predicted value are observations or predictions of the concentration, they are in the same state space. is the unit matrix; then make a prediction based on the optimal state at the previous moment: (25) (26) The update steps of the ensemble Kalman filter applied to the prediction of toxic cloud diffusion are as follows: (27) (28) (29) (30)。

Citation Information

Cited By

  • Toluene gas leakage diffusion range prediction simulation method and system

    CN122452369A

  • A simulation method and system for predicting the diffusion range of toluene gas leakage

    CN122452369B