A multi-agent based method for detecting and locating multiple pollution sources in buildings
Through the distributed Kalman filter method based on multi-agents, the gas diffusion model and regional residual information are used to achieve rapid detection and positioning of multiple pollution sources in the building in a noisy environment, solving the problems of slow detection and positioning speed and resource limitation in the prior art, and improving detection accuracy and communication efficiency.
Patent Information
- Application Number
- CN202410729230.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-06-06
AI Technical Summary
The prior art is difficult to quickly detect and locate multiple pollution sources in the building, and centralized design is limited by communication and computing resources and cannot be effectively applied to large buildings.
A distributed Kalman filter method based on multiple agents is adopted to establish a polluted gas diffusion model using the law of conservation of gas mass. The agent Agent in each region runs a Kalman filter, combines the residual information of local and associated regions, designs local and coupled gains, realizes the optimal estimation of polluted gas concentration, and performs pollution source detection by setting thresholds.
Quickly realize the detection and positioning of multiple pollution sources under noisy conditions, ensuring the accuracy of gas concentration estimation of pollution sources, and reducing communication consumption, making it suitable for large buildings.
Smart Images

Figure CN118837489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pollutant detection, and in particular to a method for detecting and locating multiple pollution sources in a building based on multi-agents. Background Art
[0002] With the deep integration of next-generation information technology and the construction industry, smart buildings offer significant advantages in comfort, convenience, safety, energy conservation, and emission reduction, making them a key element in the development of future smart cities. Among the many functions required of smart buildings, indoor air quality monitoring is a crucial and challenging task. This is because people spend over 80% of their lives indoors. Indoor air pollution can impact occupants' health at best, and even cause casualties and significant economic losses at worst. Therefore, rapid detection and location of pollution sources is crucial to ensure timely and effective remedial action.
[0003] Over the past decade, pollution source detection and location have garnered widespread attention. Conventional approaches employ probabilistic statistical methods. For example, the paper "Localization and characterization of intermittent pollutant source in buildings with ventilation systems: Development and validation of an inverse model" uses a Markov chain inverse model algorithm to identify the initial conditions of the pollution source and estimates its location using Bayesian inference. While this inverse model yields low estimation errors, it cannot directly locate the pollution source and fails to account for the impact of sensor noise on location accuracy. Measurement noise can bias the true gas concentrations of indoor pollutants collected by sensors, thereby affecting the ability to locate the source. The paper "Contaminant event monitoring in multi-zone buildings using the state-space method" uses multi-zone simulation techniques to establish a state-space model of indoor pollutant diffusion under measurement noise and modeling uncertainty. Based on this model, a centralized observer is designed to detect pollution sources, and a set of estimators is further designed to localize them. However, this approach can only detect single pollution sources, and the location logic based on fault estimation is complex. Furthermore, the centralized design is limited in communication and computing resources and cannot be applied to large buildings.
[0004] With the development of pollutant detection technology, a multi-agent based method for detecting and locating multiple pollution sources in buildings has been proposed to solve the above problems. Summary of the Invention
[0005] The present invention aims to provide a multi-agent-based method for detecting and locating multiple pollution sources within a building. This method addresses the technical problem of being unable to quickly detect and locate multiple pollution sources within a building. Even if pollution sources occur in multiple regions, the distributed Kalman filter designed in this invention can quickly locate the pollution sources. This method utilizes not only local regional information but also residual information from interconnected regions, ensuring accurate estimation of pollution source gas concentrations in the local region while minimizing communication costs. This method can achieve the goal of quickly detecting and locating multiple pollution sources using a decoupling strategy even under noisy conditions.
[0006] The inventive concept of the present invention is as follows: The present invention provides a multi-agent-based method for detecting and locating multiple pollution sources in a building. First, based on the typical multi-region simulation software CONTAM toolbox, an actual building with a large central HVAC system is constructed to simulate the diffusion direction and circulation speed of pollutant gases in the intelligent building. Then, a diffusion model of pollutant gases in the intelligent building is established based on the multi-region simulation method. Then, based on this model, a distributed pollutant monitoring and positioning scheme based on a multi-agent is constructed. Each agent uses a Kalman filter and, in the sense of minimum variance, uses the decoupling principle to design the local and associated gains of the filter to achieve a distributed optimal estimation of the pollutant concentration. Finally, based on the analysis of the dynamic characteristics of the residual signal when the pollution source occurs, a direct detection and positioning scheme for multiple pollution sources is proposed. The beneficial effect of the present invention is that even if pollution sources occur in multiple regions, the distributed Kalman filter designed by the present invention can quickly locate the pollution sources. It not only utilizes the information of the local region but also the residual information of the interconnected regions, ensuring the accuracy of the pollution source gas concentration estimation in the local region while ensuring low communication consumption.
[0007] In order to achieve the above-mentioned purpose, the present invention adopts a technical solution specifically as follows: a method for detecting and locating multiple pollution sources in a building based on a multi-agent system, comprising the following steps:
[0008] a. Establish a discretized mathematical model of pollutant gas diffusion based on the law of conservation of gas mass;
[0009] b. When there is no pollution source, based on the designed local gain and coupling gain, the distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area;
[0010] c. Calculate the test statistic online, set the corresponding threshold, and set the pollution source detection logic to complete the pollution source detection.
[0011] Furthermore, in step a:
[0012] The discretized mathematical model of the polluted gas diffusion is as follows:
[0013]
[0014] y [i] (k) = C i x [i] (k)+v [i] (k)
[0015] Where: x [i] (k) represents the gas concentration in region i at time k, y [i] (k) represents the gas concentration measured by the sensor in region i at time k. zii =I+TA ii ,B zi =TB i ,A zij =TA ij , C i =I, where I is the unit matrix of appropriate dimension. [i] (k) = F ui x i (k) represents the rate of increase of pollutant gas in area i controlled by the HVAC system at time k. T is the sampling period, f [i] (k) represents the generation rate of pollution source gas in area i at time k when there is a pollution source in the area i. Process noise w [i] (k) and measurement noise v [i] ( k ) are the variances ε[w [i] (k)w [i] T (k)]=Q wi ,ε[v [i] (k)v [i] T (k)]=Q vi Zero-mean Gaussian noise. N i represents the set of other indoor areas that are associated with the i-th area. F ij represents the natural flow rate of gas from area i to area j; F ui It represents the controlled flow rate of gas flowing from area i to the outside. i represents the volume of region i.
[0016] Furthermore, in step b:
[0017] Each area is equipped with an intelligent monitoring agent, which not only receives the measured values of the pollutant concentration in the local area, but also receives the estimated values and residual values of the pollutant concentration in the associated area. Specifically, each agent runs the following Kalman filter:
[0018]
[0019] in, is the one-step state prediction at time k+1, is the optimal estimate at time k+1, r [i] (k+1) is the residual information at time k+1, L ii (k) is the local Kalman filter gain, L ij (k) is the coupling gain of the interconnected system, is the residual information of the jth associated region at time k.
[0020] When there is no pollution source, that is, in step a, f [i] (k) = 0, the designed local gain and coupling gain are:
[0021]
[0022] in, The error covariance of sub-region i at time k satisfies:
[0023]
[0024] The distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area.
[0025] Furthermore, in step c:
[0026] The test statistic is set as follows:
[0027]
[0028] Among them, r [i] (k+1) represents the residual signal of the local region. represents the covariance of the local region residuals and is defined as:
[0029]
[0030] The threshold value is of the following form:
[0031]
[0032] Here, α is the given significance level.
[0033] The real-time decision logic judgment of the multi-agent-based method for detecting and locating multiple pollution sources in a building to determine whether a pollution source is generated in the building is as follows:
[0034]
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1) The present invention considers the influence of the HVAC system on the propagation of polluted gases and establishes a discretized mathematical model of polluted gas diffusion under the interference of process noise and measurement noise.
[0037] 2) The distributed Kalman filter designed in the present invention not only utilizes the information of the local area but also utilizes the residual information of the interconnected areas, which not only ensures the accuracy of the estimation of the pollution source gas concentration in the local area, but also uses the residual for information exchange to ensure low communication consumption.
[0038] 3) The present invention uses a decoupling strategy to ensure that the pollutant gas concentration estimation in the local area is not affected by the pollutant gas concentration in the associated area. Even if pollution sources occur in multiple areas, the distributed Kalman filter can quickly locate the pollution sources, which has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0040] Figure 1 This is a diagram of the internal structure of a certain experimental center in Changsha, which is the research object of an embodiment of the present invention.
[0041] Figure 2 This is a CONTAM multi-area simulation diagram of the experimental center, which is the research object of an embodiment of the present invention.
[0042] Figure 3 Schematic diagram of the diffusion direction of pollution source gas simulated by CONTAM according to an embodiment of the present invention.
[0043] Figure 4 This is a diagram of a design scheme for distributed detection and positioning of multiple pollution sources in an intelligent building according to an embodiment of the present invention.
[0044] Figure 5 Schematic diagram of comparison between estimated and actual concentrations of polluted gas in various areas of an intelligent building when no pollution source occurs according to an embodiment of the present invention; wherein, (a) is a schematic diagram of comparison between estimated and actual concentrations of polluted gas in areas 1, 2, 3, 4, and 11 of the intelligent building when no pollution source occurs; and (b) is a schematic diagram of comparison between estimated and actual concentrations of polluted gas in areas 5, 6, 7, 8, 9, and 10 of the intelligent building when no pollution source occurs.
[0045] Figure 6 Schematic diagram of comparison between estimated and actual concentrations of polluted gas in various areas of an intelligent building when a single pollution source occurs according to an embodiment of the present invention; wherein, (a) is a schematic diagram of comparison between estimated and actual concentrations of polluted gas in areas 1, 2, 3, 4, and 11 of the intelligent building when a single pollution source occurs; and (b) is a schematic diagram of comparison between estimated and actual concentrations of polluted gas in areas 5, 6, 7, 8, 9, and 10 of the intelligent building when a single pollution source occurs.
[0046] Figure 7 These are the enlarged diagram of the estimation results and the residual evaluation diagram of the intelligent building area 3 according to an embodiment of the present invention; wherein, (a) is the enlarged diagram of the estimation results of the intelligent building area 3; and (b) is the residual evaluation diagram of the intelligent building area 3.
[0047] Figure 8 These are the multi-pollution source detection and positioning maps for smart buildings in different time periods according to an embodiment of the present invention; wherein, (a) is the multi-pollution source detection and positioning map for smart building areas 1, 2, 3, 4, and 11 in different time periods; and (b) is the multi-pollution source detection and positioning map for smart building areas 5, 6, 7, 8, 9, and 10 in different time periods. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0049] Example 1
[0050] See also Figures 1 to 8 This embodiment provides a technical solution for detecting and locating multiple pollution sources in a building based on a multi-agent system, comprising the following steps:
[0051] Step a: Establish a discretized mathematical model of pollutant gas diffusion based on the law of conservation of gas mass;
[0052] Specifically, the discretized mathematical model of pollutant gas diffusion is as follows:
[0053]
[0054] y [i] (k) = C i x [i] (k)+v [i] (k)
[0055] Where: x [i] (k) represents the gas concentration in region i at time k, y [i](k) represents the gas concentration measured by the sensor in region i at time k. zii =I+TA ii ,B zi =TB i ,A zij =TA ij , C i =I, where I is the unit matrix of appropriate dimension. [i] (k) = F ui x i (k) represents the rate of increase of pollutant gas in area i controlled by the HVAC system at time k. T is the sampling period, f [i] (k) represents the generation rate of pollution source gas in area i at time k when there is a pollution source in the area i. Process noise w [i] (k) and measurement noise v [i] (k) are the variances ε[w [i] (k)w [i] T (k)]=Q wi ,ε[v [i] (k)v [i] T (k)]=Q vi Zero-mean Gaussian noise. N i represents the set of other indoor areas that are associated with the i-th area. F ij represents the natural flow rate of gas from area i to area j; F ui It represents the controlled flow rate of gas flowing from area i to the outside. i represents the volume of region i.
[0056] Step b: When there is no pollution source, based on the designed local gain and coupling gain, the distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area;
[0057] Each area is equipped with an intelligent monitoring agent, which not only receives the measured values of the pollutant concentration in the local area, but also receives the estimated values and residual values of the pollutant concentration in the associated area. Specifically, each agent runs the following Kalman filter:
[0058]
[0059] in, is the one-step state prediction at time k+1, is the optimal estimate at time k+1, r [i] (k+1) is the residual information at time k+1, L ii(k) is the local Kalman filter gain, L ij (k) is the coupling gain of the interconnected system, is the residual information of the jth associated region at time k.
[0060] When there is no pollution source, that is, in step a, f [i] (k) = 0, the designed local gain and coupling gain are:
[0061]
[0062] in, The error covariance of sub-region i at time k satisfies:
[0063]
[0064] The distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area.
[0065] Step c: Calculate the test statistic online, set the corresponding threshold, and set the pollution source detection logic to complete the pollution source detection;
[0066] Specifically, the test statistic is set as follows:
[0067]
[0068] Among them, r [i] (k+1) represents the residual signal of the local region. represents the covariance of the local region residuals and is defined as:
[0069]
[0070] The threshold value is set as follows:
[0071]
[0072] Here, α is the given significance level.
[0073] A multi-agent-based method for detecting and locating multiple pollution sources in buildings uses real-time decision-making logic to determine whether a pollution source is generated in the building. The following is an example:
[0074]
[0075] This embodiment is based on the MatlabR2024a environment. Figure 1The method designed in this embodiment is verified by taking the first floor of a certain experimental center in Changsha as an example. The total length of the experimental center is 41m, the width is 12m, and the floor height is 3m. The floor has 8 rooms (Z1-Z4, Z8-Z11), 1 hall (Z6), corridors (Z5, Z7) connected at both ends, and 28 leakage path openings such as windows and doors through which gas can only pass in one direction. The ventilation conditions are good, and there is also a central air-conditioning system to control the room temperature and ventilation. The specific volume, gas controlled flow rate and room initial polluted gas concentration parameters are shown in Table 1. In the CONTAM simulation software, the same areas and leakage paths are planned, the opening and closing degree of the paths, the initial polluted gas concentration in each area, and the air supply and return air outlets of the central HVAC in each area are set, and sensors are configured for each path to collect the polluted gas flow rate through each path, which can be obtained. Figure 2 The building schematic diagram shown in the figure shows the green line length indicating the velocity of polluted gas. After building the multi-zone model, the summer working conditions were simulated, including outdoor temperature of 35.8℃, air humidity of 61%, outdoor average wind speed of 2.6m / s, dominant wind direction of northwest wind (337.5°), wind pressure of 0.126Pa on the north-facing exterior wall, and wind pressure of -0.054Pa on the south-facing exterior wall. The diffusion direction of polluted gas was obtained, as shown in Figure 2. Figure 3 As shown in the figure, the black line represents the polluted gas naturally diffused by doors, gaps, windows, etc., and the red line represents the polluted gas diffused by the central HVAC system. Assume that the process noise and measurement noise are variances of Q wi =0.001,Q vi =0.001 zero mean Gaussian white noise. Figure 4 As shown in the figure, it can be seen that an intelligent monitoring agent is set up in each area. The agent not only receives the measured value of the polluted gas concentration in the local area, but also receives the estimated value and residual value of the polluted gas concentration in the associated area.
[0076] Table 1 Parameter values of volume of each area, controlled gas flow rate and initial polluted gas concentration
[0077]
[0078]
[0079] Combined with the diffusion direction and diffusion speed of the pollution source gas simulated by CONTAM, based on the mechanism model of pollution source diffusion in intelligent buildings, the state matrix A is obtained as follows:
[0080]
[0081] Result description:
[0082] The test results are as follows Figure 5 、 Figure 6 、 Figure 7 and Figure 8 As shown, Figure 5 The proposed distributed Kalman filtering-based estimation scheme is presented to obtain the estimated gas concentration of the pollution source and the actual pollutant gas concentration when there is no pollution source. It can be seen that the pollutant gas concentration in each area remains close to the initial concentration when there is no pollution source. At the same time, under noise conditions, the estimated pollutant gas concentration state in each area is basically consistent with the actual pollutant gas concentration, and the estimation is accurate. Figure 6 The estimated results and actual pollutant concentrations of each area are given when a pollution source with a generation rate of 126.6 (mg / s) is activated in room (Z3) of the experimental center 10 minutes later. It can be seen that the pollutant concentration in area 3 increases rapidly, and under the effects of HVAC and natural ventilation, the pollutant concentration in the associated area 7 also gradually increases. Figure 3 As the polluted gas spreads, the concentration of polluted gas in other areas associated with area 3, such as areas 5 and 6, also increases, making it more difficult to locate the pollution source; Figure 7 A magnified image of the estimation results and residual evaluation diagram for region 3 are shown. It can be seen that when a pollution source occurs, region 3 generates a certain estimation error. The proposed pollution source detection and location decision-making scheme can also provide timely and accurate alarms. Furthermore, for associated regions affected by the spread of pollution sources, the proposed scheme still maintains high estimation accuracy. This is because the proposed distributed Kalman filter solves the correlation gain based on a decoupling strategy, thus resolving the problem of inaccurate location caused by the spread of pollution sources. Figure 8 It is given that 20 minutes later, the corridor (Z5) of the experimental center also generated a pollution source with a rate of 126.6 (mg / s). 30 minutes later, when the pollution source in zone 3 was removed, a pollution source with a rate of 136.6 (mg / s) was generated in room (Z11). During the period from 10 minutes to 20 minutes, only Zone3 detected the existence of the pollution source, which verified the effectiveness of the method proposed in this embodiment. 20 minutes later, a pollution source occurred in zone 5. The solution proposed in this embodiment can quickly realize the detection and positioning of multiple pollution sources. 30 minutes later, after the pollution source in zone 3 was removed, Zone3 no longer alarmed, reflecting that the solution proposed in this embodiment did not cause false alarms. At the same time, a pollution source was generated in zone 11, and the distributed detection solution designed in this embodiment was also successfully detected, further verifying that the decoupling strategy can realize the detection and positioning of multiple pollution sources.
[0083] Example 2
[0084] Based on Example 1, Figure 8It is given that 20 minutes later, the corridor (Z5) of the experimental center also generated a pollution source with a rate of 126.6 (mg / s). 30 minutes later, when the pollution source in zone 3 was removed, a pollution source with a rate of 136.6 (mg / s) was generated in room (Z11). During the period from 10 minutes to 20 minutes, only Zone3 detected the existence of the pollution source, which verified the effectiveness of the method proposed in this embodiment. 20 minutes later, a pollution source occurred in zone 5. The solution proposed in this embodiment can quickly realize the detection and positioning of multiple pollution sources. 30 minutes later, after the pollution source in zone 3 was removed, Zone3 no longer alarmed, reflecting that the solution proposed in this embodiment did not cause false alarms. At the same time, a pollution source was generated in zone 11, and the distributed detection solution designed in this embodiment was also successfully detected, further verifying that the decoupling strategy can realize the detection and positioning of multiple pollution sources.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-agent based method for detecting and locating multiple pollution sources in a building, characterized in that: The following steps are involved: a. Establish a discretized mathematical model of pollutant gas diffusion based on the law of conservation of gas mass; The discretized mathematical model of the polluted gas diffusion in step a is as follows: Where: x [i] (k) represents the gas concentration in region i at time k, y [i] (k) represents the gas concentration measured by the sensor in region i at time k, A zii =I+TA ii ,B zi =TB i ,A zij =TA ij , C i =I, where I is the unit matrix of appropriate dimension, u [i] (k) = F ui x [i] (k) represents the rate of increase of pollutant gas in area i controlled by the HVAC system at time k, T is the sampling period, and f [i] (k) represents the generation rate of pollution source gas in region i when there is a pollution source in region i at time k, and the process noise w [i] (k) and measurement noise v [ i ] (k) are the variances of ε[w [i] (k)w [i] T (k)]=Q wi ,ε[v [i] (k)v [i] T (k)]=Q vi Zero-mean Gaussian noise, N i represents the set of other indoor areas that are related to the i-th area, F ij represents the natural flow rate of gas from area i to area j; F ui represents the controlled flow rate of gas flowing from area i to the outside, Q i represents the volume of region i; b. When there is no pollution source, based on the designed local gain and coupling gain, the distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area; In step b, an intelligent monitoring agent is set up in each area. The agent receives the measured value of the polluted gas concentration in the local area and also receives the estimated value and residual value of the polluted gas concentration in the associated area. Specifically, each agent runs the following Kalman filter: in, is the one-step state prediction at time k+1, is the optimal estimate at time k+1, r [i] (k+1) is the residual information at time k+1, L ii (k) is the local Kalman filter gain, L ij (k) is the coupling gain of the interconnected system, is the residual information of the jth associated region at time k; When there is no pollution source, that is, f [i] (k) = 0, given that the coupling gain and local gain are: L ij (k+1)=[I-L ii (k+1)C i ]A zij C j -1 in, is the error covariance of sub-region i at time k, satisfying: The distributed Kalman filter can achieve the optimal estimation of the pollutant gas concentration in each area; c. Calculate the test statistic online, set the corresponding threshold, and set the pollution source detection logic to complete the pollution source detection.
2. The multi-agent based method for detecting and locating multiple pollution sources in a building according to claim 1, characterized in that: The test statistic set in step c is as follows: Among them, r [i] (k+1) represents the residual signal of the local area, represents the covariance of the local region residuals and is defined as: The threshold value is of the following form: Where α is the given significance level; The real-time decision logic of the multi-agent-based method for detecting and locating multiple pollution sources in a building to determine whether a pollution source is generated in the building is as follows: