Environmental Monitoring Method, System and Storage Medium
By adopting an N-order Kalman filtering model method in environmental monitoring, considering the impact of historical state on future moments, the problems of low prediction accuracy and inappropriate equipment in traditional methods are solved, and more efficient and accurate PM2.5 concentration prediction is achieved.
Patent Information
- Application Number
- CN202410454669.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-04-16
AI Technical Summary
When there are abnormalities in the data acquisition and processing of traditional PM2.5 concentration prediction method, the prediction accuracy is low, the equipment is large in size and high in price, which is not conducive to popularization, and the data transmission delay leads to the prediction result delay.
An environmental monitoring method based on the N-order Kalman filtering model is adopted, and by obtaining a set of environmental parameters, including environmental parameter observations and historical state values, it is input to the prediction model to generate the environmental parameter state prediction correction value at the next moment. This method considers the impact of historical states on future moments, improving prediction accuracy and resistance to differences.
It improves the accuracy and reliability of PM2.5 concentration prediction, reduces the delay in prediction results, reduces equipment cost and volume, and makes environmental monitoring more popular and efficient.
Smart Images

Figure CN118311207B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental monitoring, and in particular to an environmental monitoring method, system and storage medium. Background Art
[0002] PM2.5 (Particulate Matter, 2.5, fine particulate matter) refers to particulate matter with a diameter less than or equal to 2.5 micrometers in the air, which is one of the main substances polluting the air. With the improvement of people's requirements for environmental quality, the monitoring of PM2.5 has become more and more strict. Traditional monitoring methods require professional personnel and cannot be popularized.
[0003] The prior art predicts the PM2.5 concentration through a traditional (integer-order) Kalman filter model. Among them, the traditional (integer-order) Kalman filter model is based on a first-order discrete state-space linear model. The first-order discrete state-space linear model calculates the PM2.5 concentration at the next moment through the current PM2.5 concentration, without considering the influence of historical states on future moments. However, if there are large anomalies in the data acquisition and processing process of the PM2.5 concentration at the current moment, such as missing, inaccurate or incomplete, the accuracy of the PM2.5 concentration prediction at the next moment will be low, and the prediction result will not be accurate and reliable enough. Secondly, the environmental monitoring equipment in the prior art is bulky and expensive, which is not conducive to popularization. And there is a delay in the transmission process after the PM2.5 concentration data is collected, so that the traditional (integer-order) Kalman filter model cannot obtain real-time PM2.5 concentration information in time, and further delays the prediction result. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide an environmental monitoring method, system and storage medium to solve at least one of the above problems, and realizes predicting the PM2.5 concentration at the next moment based on the PM2.5 concentration at the current moment and the PM2.5 concentration at historical moments, so as to improve the accuracy of the predicted PM2.5 concentration, and then effectively control environmental pollution.
[0005] In a first aspect, an embodiment of the present invention provides an environmental monitoring method, and the method includes:
[0006] Obtain an environmental parameter set of the environment to be measured; wherein, the environmental parameter set includes environmental parameter observation values and multiple historical environmental parameter state values, and the types of the environmental parameter set include one of the following: fine particulate matter PM2.5 concentration, inhalable particulate matter PM10 concentration, carbon dioxide CO2 concentration, sulfur dioxide SO2 concentration, nitrogen dioxide NO2 concentration, ozone O3 concentration, carbon monoxide CO concentration, temperature and humidity;
[0007] Input the set of environmental parameters into the prediction model so that the prediction model generates a predicted correction value of the environmental parameter state of the environment to be measured at the next moment according to the set of environmental parameters; wherein, the prediction model is obtained based on an N-order Kalman filter model.
[0008] Preferably, the prediction model includes a prediction sub-model and a correction sub-model;
[0009] The step of inputting the set of environmental parameters into the prediction model so that the prediction model generates a predicted correction value of the environmental parameter state of the environment to be measured at the next moment according to the set of environmental parameters includes:
[0010] Input the historical environmental parameter state value and the predicted correction value of the environmental parameter state at the current moment into the prediction sub-model so that the prediction sub-model outputs a predicted value of the environmental parameter state at the next moment;
[0011] Input the environmental parameter observation value at the next moment, the gain matrix at the next moment, and the predicted value of the environmental parameter state at the next moment into the correction sub-model so that the correction sub-model outputs the predicted correction value of the environmental parameter state at the next moment.
[0012] Preferably, the expression of the prediction sub-model is as follows:
[0013]
[0014] Wherein, is the predicted value of the environmental parameter state at the next moment, A d is the state transition matrix, is the predicted correction value of the environmental parameter state at the current moment, γ r is the order matrix of the prediction model, r = 1, 2, 3......k, x k-r is the historical environmental parameter state value;
[0015] The expression of the correction sub-model is as follows:
[0016]
[0017] Wherein, is the predicted correction value of the environmental parameter state at the next moment, is the predicted value of the environmental parameter state at the next moment, K k is the gain matrix at the next moment, y k is the environmental parameter observation value at the next moment, and C is the observation coefficient matrix.
[0018] Preferably, the prediction model further includes a prediction error sub-model and a gain sub-model, and the method further includes:
[0019] Input the first error matrix, the second error matrix, and the environmental parameter state noise covariance matrix at the current moment into the prediction error sub-model, so that the prediction error sub-model outputs a third error matrix; wherein, the first error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the current moment, the second error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the historical moment, and the third error matrix is the root mean square error matrix of the environmental parameter state prediction value at the next moment.
[0020] Input the third error matrix and the environmental parameter observation value noise covariance matrix at the next moment into the gain sub-model, so that the gain sub-model outputs the gain matrix at the next moment.
[0021] Preferably, the expression of the prediction error sub-model is as follows:
[0022]
[0023] Wherein, is the third error matrix, A d is the state transition matrix, γ r is the order matrix of the prediction model, r = 2, 3, 4......k, P k-1 is the first error matrix, Q k-1 is the environmental parameter state noise covariance matrix at the current moment, P k-r is the second error matrix;
[0024] The expression of the gain sub-model is as follows:
[0025]
[0026] Wherein, K k is the gain matrix at the next moment, is the third error matrix, C is the observation coefficient matrix, R k is the environmental parameter observation value noise covariance matrix at the next moment.
[0027] Preferably, the prediction model further includes a prediction error correction sub-model, and the method further includes:
[0028] Input the third error matrix and the gain matrix at the next moment into the prediction error correction sub-model, so that the prediction error correction sub-model outputs a fourth error matrix; wherein, the fourth error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the next moment.
[0029] Preferably, the expression of the prediction error correction sub-model is as follows:
[0030]
[0031] Where P k is the fourth error matrix, I is the identity matrix, K k is the gain matrix at the next moment, C is the observation coefficient matrix, is the third error matrix.
[0032] Preferably, the method further includes:
[0033] If the predicted correction value of the environmental parameter state at the next moment of the environment to be measured exceeds the threshold, generate an environmental alarm message to prompt the staff to manage the environment.
[0034] The environmental monitoring method provided by the embodiments of the present invention brings the following beneficial effects:
[0035] The embodiments of the present invention provide an environmental monitoring method. By inputting the set of environmental parameters of the environment to be measured into the prediction model, the prediction model predicts the predicted correction value of the environmental parameter state at the next moment according to the set of environmental parameters of the environment to be measured. This method improves the prediction accuracy of the predicted correction value of the environmental parameter state at the next moment, so as to effectively manage environmental pollution according to the predicted correction value of the environmental parameter state at the next moment.
[0036] In a second aspect, the embodiments of the present invention further provide an environmental monitoring system. The system includes a data acquisition device and a cloud server; wherein, the data acquisition device is communicatively connected to the cloud server;
[0037] The data acquisition device is configured to acquire a set of environmental parameters of the environment to be measured and send the set of environmental parameters to the cloud server;
[0038] The cloud server is configured to acquire the set of environmental parameters and determine the predicted correction value of the environmental parameter state at the next moment of the environment to be measured by using the environmental monitoring method described in any one of the above.
[0039] The environmental monitoring system provided by the embodiments of the present invention has the same technical features as the environmental monitoring method provided by the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0040] In a third aspect, the embodiments of the present invention further provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the beneficial effects in the method described in any one of the above are realized, which will not be elaborated here.
[0041] Other features and advantages of the present invention will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present invention. The objectives and other advantages of the present invention are achieved and attained by the structure particularly pointed out in the description and the drawings.
[0042] To make the above objectives, features, and advantages of the present invention more comprehensible, the following provides preferred embodiments in conjunction with the accompanying drawings and detailed descriptions are as follows. Description of the Drawings
[0043] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0044] Figure 1 A flowchart of an environmental monitoring method provided for an embodiment of the present invention;
[0045] Figure 2 Another flowchart of an environmental monitoring method provided for an embodiment of the present invention;
[0046] Figure 3 A schematic structural diagram of an environmental monitoring system provided for an embodiment of the present invention. Detailed Embodiments
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention in conjunction with the drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0048] To facilitate the understanding of this embodiment, the following provides a detailed introduction to the embodiments of the present invention.
[0049] Embodiment 1:
[0050] The embodiment of the present invention provides an environmental monitoring method, as Figure 1 shown, the method includes the following steps:
[0051] Step S102, obtaining an environmental parameter set of the environment to be measured;
[0052] Among them, the environmental parameter set includes environmental parameter observation values and multiple historical environmental parameter state values. The types of the environmental parameter set include one of the following: fine particulate matter PM2.5 concentration, inhalable particulate matter PM10 concentration, carbon dioxide CO2 concentration, sulfur dioxide SO2 concentration, nitrogen dioxide NO2 concentration, ozone O3 concentration, carbon monoxide CO concentration, temperature, and humidity. Specifically, in order to facilitate the detection of the environmental parameter observation values of the environment to be measured, multiple collection points are pre-set in the environment to be measured, and environmental monitoring sensors are set at each collection point. In practical applications, the environmental parameter observation values of any of the above types can be collected through the environmental monitoring sensors. It should be noted that the number of the above collection points can be set according to the actual situation, and the embodiments of the present invention do not make any restrictive explanations in this regard.
[0053] Step S104, input the environmental parameter set into the prediction model so that the prediction model generates a predicted correction value of the environmental parameter state of the environment to be measured at the next moment according to the environmental parameter set.
[0054] Among them, the prediction model is obtained based on the N-order Kalman filter model. Specifically, the N-order Kalman filter model is obtained based on the N-order discrete state space linear model and the traditional (integer-order) Kalman filter model. The N-order discrete state space linear model establishes the relationship between multiple historical environmental parameter state values and the predicted correction value of the environmental parameter state at the next moment based on the N-order differential equation, thereby obtaining the prediction model. Therefore, even if the environmental parameter observation value appears abnormal due to the failure of the environmental monitoring sensor at the current moment, the prediction model can predict the predicted correction value of the environmental parameter state at the next moment according to multiple historical environmental parameter state values. Compared with the first-order discrete state space linear model in the prior art, the prediction model has stronger robustness and can make the predicted correction value of the environmental parameter state at the next moment more accurate.
[0055] An environmental monitoring method provided by an embodiment of the present invention inputs the obtained environmental parameter set of the environment to be measured into the prediction model so that the prediction model predicts the predicted correction value of the environmental parameter state at the next moment according to the environmental parameter set of the environment to be measured. In this method, the prediction accuracy and robustness of the prediction model are higher, and the reliability is strong. During the prediction process of this method, the influence of multiple historical environmental parameter state values on the accuracy of the predicted correction value of the environmental parameter state at the next moment is considered. Even if the environmental parameter observation value at the current moment appears relatively abnormal, it can be ensured that the predicted correction value of the environmental parameter state at the next moment obtained by the prediction has a relatively high accuracy.
[0056] In one implementation, the above prediction model includes a prediction sub-model and a correction sub-model; the step of inputting the set of environmental parameters into the prediction model so that the prediction model generates a predicted correction value of the environmental parameter state of the environment to be measured at the next moment according to the set of environmental parameters includes: inputting the historical environmental parameter state value and the predicted correction value of the environmental parameter state at the current moment into the prediction sub-model so that the prediction sub-model outputs a predicted value of the environmental parameter state at the next moment; inputting the observed value of the environmental parameter at the next moment, the gain matrix at the next moment, and the predicted value of the environmental parameter state at the next moment into the correction sub-model so that the correction sub-model outputs a predicted correction value of the environmental parameter state at the next moment.
[0057] Specifically, the expression of the above prediction sub-model is as follows:
[0058]
[0059] Wherein, is the predicted value of the environmental parameter state at the next moment, A d is the state transition matrix, A d = A - I, I is the identity matrix, t is the time interval from the current moment to the next moment, is the predicted correction value of the environmental parameter state at the current moment,, γ r is the order matrix of the prediction model, r = 1, 2, 3......k, x k-r is the historical environmental parameter state value;
[0060] The expression of the correction sub-model is as follows:
[0061]
[0062] Wherein, is the predicted correction value of the environmental parameter state at the next moment, is the predicted value of the environmental parameter state at the next moment, K k is the gain matrix at the next moment, y k is the observed value of the environmental parameter at the next moment, C is the observation coefficient matrix, C = [1 0].
[0063] In this method, the prediction sub-model predicts the predicted value of the environmental parameter state at the next moment according to the historical environmental parameter state value and the predicted correction value of the environmental parameter state at the current moment; wherein, the predicted value of the environmental parameter state at the next moment is noisy, but compared with the predicted value of the environmental parameter state at the next moment obtained by the prediction sub-model alone according to the predicted correction value of the environmental parameter state at the current moment in the prior art, the noise is smaller, so that the noise of the predicted correction value of the environmental parameter state at the next moment predicted by the correction sub-model is smaller and the accuracy is higher. It can be seen that the filtering efficiency of this method is also higher.
[0064] In one embodiment, the above prediction model further includes a prediction error sub-model and a gain sub-model, and the method further includes: inputting a first error matrix, a second error matrix, and the environmental parameter state noise covariance matrix at the current moment into the prediction error sub-model, so that the prediction error sub-model outputs a third error matrix; wherein, the first error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the current moment, the second error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the historical moment, and the third error matrix is the root mean square error matrix of the environmental parameter state prediction value at the next moment; inputting the third error matrix and the environmental parameter observation value noise covariance matrix at the next moment into the gain sub-model, so that the gain sub-model outputs the gain matrix at the next moment.
[0065] Specifically, the expression of the prediction error sub-model is as follows:
[0066]
[0067] Wherein, is the third error matrix, A d is the state transition matrix, A d = A - I, I is the identity matrix, t is the time interval from the current moment to the next moment, γ r is the order matrix of the prediction model, r = 2, 3, 4......k, P k-1 is the first error matrix, Q k-1 is the environmental parameter state noise covariance matrix at the current moment, P k-r is the second error matrix;
[0068] The expression of the gain sub-model is as follows:
[0069]
[0070] Wherein, K k is the gain matrix at the next moment, is the third error matrix,, C is the observation coefficient matrix, C =
[10] , R k is the environmental parameter observation value noise covariance matrix at the next moment.
[0071] In this method, the prediction error sub-model predicts a third error matrix based on the first error matrix, the second error matrix, and the environmental parameter state noise covariance matrix at the current moment. Compared with the prior art where the third error matrix is obtained solely based on the first error matrix (the root mean square error matrix of the environmental parameter state prediction correction value at the current moment), since the second error matrix (the root mean square error matrix of the environmental parameter state prediction correction value at the historical moment) is incorporated, the error of the third error matrix (the root mean square error matrix of the environmental parameter state prediction value at the next moment) obtained by this prediction error sub-model is smaller, thus making the error of the gain matrix at the next moment obtained by the gain sub-model smaller and the accuracy higher. Since the next moment's gain matrix obtained by this method is incorporated into the above-mentioned correction sub-model, this method can also improve the accuracy of the environmental parameter state prediction correction value at the next moment obtained by the above-mentioned correction sub-model.
[0072] In one implementation, the above-mentioned prediction model further includes a prediction error correction sub-model, and the method further includes: inputting the third error matrix and the gain matrix at the next moment into the prediction error correction sub-model, so that the prediction error correction sub-model outputs a fourth error matrix; where the fourth error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the next moment.
[0073] Specifically, the expression of the prediction error correction sub-model is as follows:
[0074]
[0075] where P k is the fourth error matrix, I is the identity matrix, K k is the gain matrix at the next moment, C is the observation coefficient matrix, C = [1 0], is the third error matrix.
[0076] In this method, the prediction error correction sub-model obtains the fourth error matrix based on the third error matrix and the gain matrix at the next moment; as can be seen from the above, the accuracy of the third error matrix and the gain matrix at the next moment is relatively high compared with the prior art, so the accuracy of the fourth error matrix obtained by the prediction error correction sub-model in this method is also relatively high.
[0077] In one implementation, the above-mentioned method further includes: if the environmental parameter state prediction correction value at the next moment of the environment to be measured exceeds the threshold, generating an environmental alarm message to prompt the staff to manage the environment.
[0078] In this method, it is determined whether to control environmental pollution based on the predicted correction value of the environmental parameter state at the next moment in the environment to be measured. When the predicted correction value of the environmental parameter state at the next moment exceeds the threshold, the staff will receive an environmental alarm message. After receiving the environmental alarm message, the staff can take targeted measures in a timely manner to effectively control environmental pollution, so as to prevent further aggravation of environmental pollution.
[0079] Embodiment 2:
[0080] Based on the above method embodiments, an embodiment of the present invention provides another environmental monitoring method, as Figure 2 shown. This method includes the following steps:
[0081] S202, obtaining a set of environmental parameters of the environment to be measured;
[0082] Among them, the set of environmental parameters includes environmental parameter observation values and multiple historical environmental parameter states. The types of the set of environmental parameters include one of the following: fine particulate matter PM2.5 concentration, inhalable particulate matter PM10 concentration, carbon dioxide CO2 concentration, sulfur dioxide SO2 concentration, nitrogen dioxide NO2 concentration, ozone O3 concentration, carbon monoxide CO concentration, temperature, and humidity; specifically, reference can be made to the foregoing embodiments, and the embodiments of the present invention will not be elaborated in detail herein.
[0083] S204, obtaining an N-order discrete state space linear model according to the discrete state space linear model;
[0084] Specifically, the expression of the discrete state space linear model is as follows:
[0085]
[0086] Among them, A is the (n×n)-dimensional one-step transition matrix at the current moment, B is the (n×m)-dimensional control coefficient matrix at the current moment, C is the (q×n)-dimensional observation coefficient matrix at the next moment, x k is the n-dimensional state vector at the next moment, x k-1 is the n-dimensional state vector at the current moment, u k-1 is the m-dimensional control input vector at the current moment, w k-1 is the state noise vector at the current moment, v k is the noise vector of the observation value at the next moment, y k is the observation vector at the next moment.
[0087] Performing a difference operation on the above expression (6) to obtain the expression of the first-order n-dimensional state vector at the next moment as follows:
[0088] Δ 1 x k = x k -xk-1 (7)
[0089] Among them, Δ 1 x k is the first-order n-dimensional state vector at the next moment, x k is the n-dimensional state vector at the next moment, x k-1 is the n-dimensional state vector at the current moment.
[0090] From the above expressions (6) and (7), the following expression is obtained:
[0091] Δ 1 x k = A d x k-1 + Bu k-1 + w k-1 (8)
[0092] Among them, Δ 1 x k is the first-order n-dimensional state vector at the next moment, A d is the state transition matrix, A d = A - I, A is the (n×n)-dimensional one-step transition matrix at the current moment, I is the identity matrix, x k-1 is the n-dimensional state vector at the current moment, u k-1 is the m-dimensional control input vector at the current moment, w k-1 is the state noise vector at the current moment, B is the (n×m)-dimensional control coefficient matrix at the current moment.
[0093] From the above expressions (6), (7) and (8), the expression of the first-order discrete state space linear model is obtained as follows:
[0094]
[0095] Among them, Δ 1 x k is the first-order n-dimensional state vector at the next moment, A d is the state transition matrix, A d = A - I, A is the (n×n)-dimensional one-step transition matrix at the current moment, I is the identity matrix, x k-1 is the n-dimensional state vector at the current moment, u k-1 is the m-dimensional control input vector at the current moment, w k-1 is the state noise vector at the current moment, x k is the n-dimensional state vector at the next moment, B is the (n×m)-dimensional control coefficient matrix at the current moment, v k is the noise vector of the observation value at the next moment, y k is the observation vector at the next moment, C is the (q×n)-dimensional observation coefficient matrix at the next moment.
[0096] The expression for the N - th derivative of the n - dimensional state vector at the next moment obtained from the above expression (9) is as follows:
[0097]
[0098] where, Δ N x k is the N - th derivative of the n - dimensional state vector at the next moment, h is the sampling time interval, N is the order of the N - th derivative of the n - dimensional state vector at the next moment, x k-r is the n - dimensional state vector at the historical moment, r = 0, 1, 2, 3......k,
[0099] Let the sampling time interval h = 1 in the above expression (10), then the obtained expression is as follows:
[0100]
[0101] where, Δ N x k is the N - th derivative of the n - dimensional state vector at the next moment, N is the order of the N - th derivative of the n - dimensional state vector at the next moment, x k-r is the n - dimensional state vector at the historical moment, r = 1, 2, 3......k, x k is the n - dimensional state vector at the next moment.
[0102] The expression for the N - th order discrete - state - space linear model obtained from the above expressions (9) and (11) is as follows:
[0103]
[0104] where, Δ N x k is the N - th derivative of the n - dimensional state vector at the next moment, N is the order of the N - th derivative of the n - dimensional state vector at the next moment, x k-r is the n - dimensional state vector at the historical moment, r = 1, 2, 3......k, x k is the n - dimensional state vector at the next moment, A d is the state - transition matrix, A d = A - I, A is the (n×n) - dimensional one - step transition matrix at the current moment, I is the identity matrix, x k-1 is the n - dimensional state vector at the current moment, u k-1 is the m - dimensional control - input vector at the current moment, w k-1 is the state - noise vector at the current moment, B is the (n×m) - dimensional control - coefficient matrix at the current moment, v kis the noise vector of the observation value at the next moment, y k is the observation vector at the next moment, and C is the (q×n)-dimensional observation coefficient matrix at the next moment.
[0105] S206. Obtain a traditional (integer-order) Kalman filter model according to the first-order discrete state-space linear model;
[0106] Specifically, the traditional (integer-order) Kalman filter model includes a prediction process (time update) model and a correction process (measurement update) model; among them, the expression of the prediction process (time update) model is as follows:
[0107]
[0108] Among them, is the predicted value of the n-dimensional state vector at the next moment, A d is the state transition matrix, A d = A - I, where A is the (n×n)-dimensional one-step transition matrix at the current moment, and I is the identity matrix. is the corrected value of the n-dimensional state vector at the current moment, u k-1 is the m-dimensional control input vector at the current moment, B is the (n×m)-dimensional control coefficient matrix at the current moment, x k-1 is the n-dimensional state vector at the current moment. is the root mean square error matrix of the predicted value of the n-dimensional state vector at the next moment, P k-1 is the root mean square error matrix of the corrected value of the n-dimensional state vector at the current moment, Q k-1 is the state noise covariance matrix at the current moment.
[0109] The expression of the correction process (measurement update) model is as follows:
[0110]
[0111] Among them, is the corrected value of the n-dimensional state vector at the next moment. is the predicted value of the n-dimensional state vector at the next moment, K k is the gain matrix at the next moment, y k is the observation vector at the next moment, C is the (q×n)-dimensional observation coefficient matrix at the next moment, P k is the root mean square error matrix of the corrected value of the n-dimensional state vector at the next moment, I is the identity matrix. is the root mean square error matrix of the predicted value of the n-dimensional state vector at the next moment, R k is the observation value noise covariance matrix at the next moment.
[0112] S208. Obtain an N - order Kalman filter model based on the N - order discrete state - space linear model and the traditional (integer - order) Kalman filter model;
[0113] S210. Obtain a prediction model based on the N - order Kalman filter model;
[0114] S212. Input the environmental parameter set into the prediction model so that the prediction model generates a predicted correction value of the environmental parameter state of the environment to be measured at the next moment according to the environmental parameter set; specifically, reference can be made to the foregoing embodiments, and the embodiments of the present invention will not be elaborated in detail herein.
[0115] The embodiment of the present invention provides an environmental monitoring method. By inputting the environmental parameter set of the environment to be measured obtained into the prediction model, the prediction model predicts the predicted correction value of the environmental parameter state at the next moment according to the environmental parameter set of the environment to be measured. The prediction model in this method is obtained based on the N - order Kalman filter model. It can be seen that, compared with the traditional (integer - order) Kalman filter model obtained according to the first - order discrete state - space linear model in the prior art, the prediction model has stronger robustness, reliability, and applicability for predicting the predicted correction value of the environmental parameter state at the next moment, and the accuracy of the predicted correction value of the environmental parameter state at the next moment obtained by prediction is higher. This method can ensure that even if there are large anomalies in the observed values of environmental parameters at the current moment, the predicted correction value of the environmental parameter state at the next moment obtained by prediction also has high accuracy.
[0116] Embodiment III:
[0117] Based on the above - mentioned method embodiments, the embodiment of the present invention provides an environmental monitoring system, as Figure 3 shown. The system includes a data acquisition device 31 and a cloud server 32; wherein, the data acquisition device 31 is communicatively connected to the cloud server 32; the functions of each device are as follows:
[0118] The data acquisition device 31 is configured to obtain the environmental parameter set of the environment to be measured and send the environmental parameter set to the cloud server 32;
[0119] The cloud server 32 is configured to obtain the environmental parameter set and determine the predicted correction value of the environmental parameter state of the environment to be measured at the next moment by using any one of the above - mentioned environmental monitoring methods.
[0120] Specifically, the data acquisition device 31 in the system can achieve real-time monitoring of PM2.5 concentration, PM10 concentration, CO2 concentration, SO2 concentration, NO2 concentration, O3 concentration, CO concentration, temperature, and humidity. The data acquisition device 31 has a high time resolution, high instrument measurement accuracy, can simultaneously achieve synchronous sampling of particulate matter concentrations with different particle sizes in the environment, supports massive storage of measurement data (can store data collected over 10 years), has functions of hourly report query, daily report query, and USB (Universal Serial Bus) data export, supports 5G data remote transmission, adopts a modular design, has the characteristics of low failure rate, easy maintenance, and strong scalability. Due to the small size, low manufacturing cost, and low power consumption of the data acquisition device 31, it is widely used in related fields such as indoor and outdoor environmental monitoring; the cloud server 32 obtains the set of environmental parameters through the 5G transmission module, and displays the predicted correction value of the environmental parameter state of the environment to be measured at the next moment in the form of a statistical chart, and can adjust the data processing method in a timely manner according to the instruction input.
[0121] This embodiment also provides a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the above-mentioned environmental monitoring method.
[0122] The computer program product of the environmental monitoring system provided by the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments, and details are not described herein again.
[0123] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system and device can refer to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
[0124] In addition, in the description of the embodiments of the present invention, unless otherwise clearly defined and limited, the terms "installation", "connection", and "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0125] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0126] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0127] Finally, it should be noted that the above-mentioned embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the technical field of the present invention can still modify the technical solutions described in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. An environmental monitoring method, characterized in that: The method comprises: Obtain an environmental parameter set of the environment to be tested; wherein the environmental parameter set includes environmental parameter observation values and multiple historical environmental parameter state values, and the type of the environmental parameter set includes one of the following: fine particulate matter PM2.5 concentration, inhalable particulate matter PM10 concentration, carbon dioxide CO2 concentration, sulfur dioxide SO2 concentration, nitrogen dioxide NO2 concentration, ozone O3 concentration, carbon monoxide CO concentration, temperature and humidity; Inputting the environmental parameter set into a prediction model so that the prediction model generates a prediction correction value of the environmental parameter state of the measured environment at the next moment according to the environmental parameter set; wherein the prediction model is obtained based on an N-order Kalman filter model; The step of obtaining the prediction model based on the N-order Kalman filter model includes: the N-order Kalman filter model is obtained based on the N-order discrete state space linear model and the traditional Kalman filter model, and the N-order discrete state space linear model establishes the relationship between multiple historical environmental parameter state values and the predicted correction value of the environmental parameter state at the next moment based on the N-order differential equation to obtain the prediction model; The N-order discrete state space linear model expression is: The traditional Kalman filter model is obtained based on a first-order discrete state space linear model, including a prediction process model and a correction process model; The expression of the prediction process model is: The expression of the correction process model is: Among them, Δ N x k is the Nth derivative of the n-dimensional state vector at the next moment, N is the order of the Nth derivative of the n-dimensional state vector at the next moment, x k-r is the n-dimensional state vector at the historical moment, r=1,2,3......k, x k is the n-dimensional state vector at the next moment, A d is the state transfer matrix, A d =AI, A is the (n×n)-dimensional one-step transfer matrix at the current moment, I is the identity matrix, x k-1 is the n-dimensional state vector at the current moment, u k-1 is the m-dimensional control input vector at the current moment, w k-1 is the state noise vector at the current moment, B is the (n×m)-dimensional control coefficient matrix at the current moment, v k is the noise vector of the observation value at the next moment, y k is the observation vector at the next moment, and C is the (q×n)-dimensional observation coefficient matrix at the next moment; is the predicted value of the n-dimensional state vector at the next moment, is the corrected value of the n-dimensional state vector at the current moment, is the root mean square error matrix of the predicted value of the n-dimensional state vector at the next moment, P k-1 is the root mean square error matrix of the corrected value of the n-dimensional state vector at the current moment, Q k-1 is the state noise covariance matrix at the current moment; is the revised value of the n-dimensional state vector at the next moment, K k is the gain matrix at the next moment, P k is the root mean square error matrix of the corrected value of the n-dimensional state vector at the next moment, is the root mean square error matrix of the predicted value of the n-dimensional state vector at the next moment, R k is the noise covariance matrix of the observation value at the next moment.
2. The method according to claim 1, characterized in that The prediction model includes a prediction sub-model and a correction sub-model; The step of inputting the environmental parameter set into the prediction model so that the prediction model generates a prediction correction value of the environmental parameter state of the measured environment at the next moment according to the environmental parameter set includes: Inputting the historical environmental parameter state value and the environmental parameter state prediction correction value at the current moment into the prediction sub-model, so that the prediction sub-model outputs the environmental parameter state prediction value at the next moment; The environmental parameter observation value at the next moment, the gain matrix at the next moment and the environmental parameter state prediction value at the next moment are input into the correction sub-model, so that the correction sub-model outputs the environmental parameter state prediction correction value at the next moment.
3. The method according to claim 2, characterized in that The expression of the prediction sub-model is as follows: in, is the predicted value of the environmental parameter state at the next moment, A d is the state transfer matrix, is the predicted correction value of the environmental parameter state at the current moment, γ r is the order matrix of the prediction model, r=1,2,3...k, x k-r is the historical environmental parameter state value; The expression of the modified sub-model is as follows: in, is the predicted correction value of the environmental parameter state at the next moment, is the predicted value of the environmental parameter state at the next moment, K k is the gain matrix at the next moment, y k is the observed value of the environmental parameter at the next moment, and C is the observation coefficient matrix.
4. The method according to claim 3, characterized in that The prediction model further includes a prediction error sub-model and a gain sub-model, and the method further includes: Input the first error matrix, the second error matrix and the environmental parameter state noise covariance matrix at the current moment into the prediction error sub-model, so that the prediction error sub-model outputs a third error matrix; wherein the first error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the current moment, the second error matrix is the root mean square error matrix of the environmental parameter state prediction correction value at the historical moment, and the third error matrix is the root mean square error matrix of the environmental parameter state prediction value at the next moment; The third error matrix and the noise covariance matrix of the environmental parameter observation values at the next moment are input into the gain sub-model, so that the gain sub-model outputs the gain matrix at the next moment.
5. The method according to claim 4, characterized in that The expression of the prediction error sub-model is as follows: in, is the third error matrix, A d is the state transfer matrix, γ r is the order matrix of the prediction model, r=2,3,4...k, P k-1 is the first error matrix, Q k-1 is the environmental parameter state noise covariance matrix at the current moment, P k-r is the second error matrix; The expression of the gain sub-model is as follows: Among them, K k is the gain matrix at the next moment, is the third error matrix, C is the observation coefficient matrix, R k is the noise covariance matrix of the environmental parameter observations at the next moment.
6. The method according to claim 4, characterized in that The prediction model also includes a prediction error correction sub-model, and the method further includes: The third error matrix and the gain matrix at the next moment are input into the prediction error correction sub-model so that the prediction error correction sub-model outputs a fourth error matrix; wherein the fourth error matrix is the root mean square error matrix of the prediction correction value of the environmental parameter state at the next moment.
7. The method according to claim 6, characterized in that The expression of the prediction error correction submodel is as follows: Among them, P k is the fourth error matrix, I is the unit matrix, K k is the gain matrix at the next moment, C is the observation coefficient matrix, is the third error matrix.
8. The method according to claim 1, characterized in that The method further comprises: If the predicted correction value of the environmental parameter state of the tested environment at the next moment exceeds a threshold, an environmental alarm message is generated to prompt the staff to manage the environment.
9. An environmental monitoring system, characterized in that: The system includes a data acquisition device and a cloud server; wherein the data acquisition device is communicatively connected with the cloud server; The data acquisition device is used to obtain a set of environmental parameters of the environment to be tested, and send the set of environmental parameters to the cloud server; The cloud server is used to obtain the environmental parameter set and determine the predicted correction value of the environmental parameter state of the measured environment at the next moment using the environmental monitoring method described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Agricultural greenhouse data fusion processing method based on Kalman filtering algorithm
CN108616838A
Multi-model wheat seedling growth cabin optimal parameter prediction method based on Kalman filter
CN112947635A