Greenhouse environment data acquisition method and system based on improved ASCKF model
Through the improved ASCKF model and adaptive noise statistical estimator, the problem of environmental data collection in the greenhouse being susceptible to noise interference is solved, and high-precision and robust data collection is achieved to adapt to different noise environments.
Patent Information
- Application Number
- CN202411358827.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-21
AI Technical Summary
The data acquisition process in greenhouse environment is susceptible to interference from a variety of random noises, resulting in reduced data accuracy and poor robustness. Especially under the influence of strong air flow, the temperature fluctuates greatly and abnormal data are generated, and existing solutions are difficult to effectively eliminate wild values.
A greenhouse environment data collection method based on the improved ASCKF model is adopted, using singular value decomposition instead of traditional Cholesky decomposition, combined with volume rules to process the nonlinear greenhouse model, and iteratively correcting the covariance matrix through adaptive adjustment factors to simplify state update and covariance update. The process, combined with the improved Sage-Husa adaptive noise statistical estimator and sliding residual window factor, adaptively adjusts the system noise and observation noise covariance matrix.
It improves the robustness and perception accuracy of greenhouse environmental data collection, can effectively resist observation noise interference and system noise interference, maintain high accuracy and robustness, and adapt to different noise environments.
Smart Images

Figure CN119337068A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a greenhouse environment data acquisition method and system based on an improved ASCKF model, and belongs to the technical field of smart agriculture. Background Art
[0002] In modern agricultural technology, greenhouses are an important part of facility agriculture. The greenhouse is a system whose internal parameters are constantly changing. Environmental factors such as air temperature and humidity, carbon dioxide concentration, light intensity, and soil moisture in the greenhouse are closely related to the growth of crops. At the same time, the greenhouse is also a multivariable, nonlinear, uncertain system. Therefore, the accurate collection of environmental parameters is particularly important.
[0003] The traditional method of directly collecting environmental data using sensors is that the accuracy of data collection is limited by the accuracy of the sensors. The method of multi-sensor data fusion can effectively improve the transmission efficiency and accuracy of data by fusing the collected environmental information through multiple channels. Multi-source data fusion technology is an advanced processing technology that integrates and analyzes information from multiple data sources, aiming to improve decision-making, system performance and information reliability. It involves collecting data from multiple sources such as sensors, databases, and information systems, and fusing these data through advanced algorithms and calculation methods to produce more accurate, reliable and comprehensive information representation. The fundamental goal of multi-source data fusion technology is to utilize the complementarity and redundancy of different data sources, improve information quality and utility through efficient data fusion, reduce uncertainty, and make the final data analysis and decision-making process more accurate and effective.
[0004] In terms of the application of multi-source data fusion technology to greenhouse environmental data collection, Li Shaonan and others proposed a greenhouse Internet of Things acquisition system based on an improved Kalman data fusion algorithm. This scheme uses the Romanovsky criterion to pre-process the collected data, and then uses the Kalman filter algorithm to statically fuse the data at the coordinator node, which can effectively improve the accuracy of data acquisition (Li Shaonan, Li Yi, Wei Liejiang, et al. Research on Greenhouse Internet of Things Acquisition System Based on Improved Kalman Data Fusion Algorithm [J]. Journal of Sensor Technology, 2022, 35(4): 558-564.). However, in actual application, the data collection process in the greenhouse is susceptible to various random noise interferences, such as strong wind and airflow, which leads to large fluctuations in indoor temperature, thereby generating some abnormal data. Once a large number of wild values appear, the above existing schemes will have the problem of missing or even losing the ability to remove them, and the perception robustness is poor, and the perception performance and perception accuracy are reduced. Summary of the invention
[0005] In order to improve the robustness of greenhouse environment data collection, and improve perception performance and perception accuracy, the present invention provides a greenhouse environment data collection method and system based on an improved ASCKF model. The technical solution is as follows:
[0006] The greenhouse environment data collection method of the present invention performs fusion processing on the greenhouse environment data based on the improved ASCKF model;
[0007] The system status and observation models established for smart greenhouses include:
[0008] x k =f(x k-1 )+Γw k-1
[0009] z k =H k x k +v k
[0010] Where k represents discrete time, the system state x k 、x k-1 is the true value of environmental data, z k is the environmental data observation value, f(·) is the nonlinear transformation function, w k-1 is the system noise interference, and its covariance is recorded as Q k-1 And the mean is zero, v k is the observed noise interference, and its covariance is recorded as R k And the mean is zero, Γ is the system noise driving matrix, H k is the observation matrix, w k-1 With v k Independent of each other, Γ and H k All are unit arrays;
[0011] The calculation process of the improved ASCKF model includes:
[0012] (1) Prediction process:
[0013] Step 1: Input covariance matrix P k-1|k-1 Perform SVD decomposition:
[0014]
[0015] Where k represents the discrete moment, U k-1|k-1 P k-1|k-1 The left singular matrix, S k-1|k-1 P k-1|k-1 The singular value matrix, V k-1|k-1 P k-1|k-1 is a right singular matrix of .
[0016] Step 2: Calculate the state volume point:
[0017]
[0018] in, represents the optimal estimate at time k-1; is the volume point set, n is the system state dimension and i = 1, 2, …, 2n; [1] i represents the i-th column of point set [1], point set [1] is:
[0019]
[0020] Step 3: Calculate the nonlinear state function propagation volume points:
[0021]
[0022] Step 4: Calculate the prior prediction value of the system state through weighted fusion of volume points:
[0023]
[0024] Step 5: Calculate the prediction covariance matrix:
[0025]
[0026] Among them, Q k-1 represents the system noise covariance matrix;
[0027] (2) Update process:
[0028] Step 1: Forecast covariance matrix P k|k-1 Perform SVD decomposition:
[0029]
[0030] Among them, U k|k-1 Indicates P k|k-1 The left singular matrix, S k|k-1 Indicates P k|k-1 The singular value matrix, V k|k-1 Indicates P k|k-1 is a right singular matrix of .
[0031] Step 2: Calculate the observation volume points:
[0032]
[0033] Step 3: Calculate the linear observation function propagation volume points:
[0034]
[0035] Step 4: Calculate the predicted value of sensor observations:
[0036]
[0037] Step 5: Calculate the autocovariance:
[0038]
[0039] Among them, R k represents the observation noise covariance matrix.
[0040] Step 6: Calculate the cross-covariance:
[0041]
[0042] Step 7: Calculate observational innovation:
[0043]
[0044] Step 8: Calculate the observation innovation vector matrix:
[0045]
[0046] Step 9: If
[0047] δ k =I
[0048] Step 10: If
[0049]
[0050] Step 11: Correct the autocovariance matrix:
[0051]
[0052] Step 12: Modify the cross-covariance matrix:
[0053]
[0054] Step 13: Update the Kalman filter gain:
[0055]
[0056] Step 14: Simplify system status updates:
[0057]
[0058] Step 15: Simplified covariance matrix update:
[0059] P k|k =(IK k H k) k|k-1
[0060] Step 16: Calculate the sliding residual window factor:
[0061]
[0062] Among them, Θ k is the sliding residual window factor and ω=k-L+1; L is the window size for the innovation covariance matching;
[0063] Step 17: Adaptively adjust the observation noise covariance matrix:
[0064]
[0065] Step 18: Update observation information:
[0066]
[0067] Step 19: Calculate the weighting coefficient:
[0068] d k =(1-b)(1-b k ) -1
[0069] Where b is the forgetting factor and 0 <b<1;
[0070] Step 20: Adaptively adjust the system noise covariance matrix:
[0071]
[0072] Step 21: Update the temperature estimate Covariance matrix P k|k , observation noise covariance matrix R k+1 , system noise covariance matrix Q k The improved ASCKF model is input and the above prediction process and update process are executed again until the preset number of updates is met.
[0073] Optionally, the forgetting factor b is 0.95.
[0074] Optionally, the mean value of the observation noise is:
[0075]
[0076] Among them, r k represents the mean of the observation noise at time k.
[0077] Optionally, the mean value of the system noise is:
[0078]
[0079] Among them, q k represents the mean value of the system noise at time k.
[0080] Optionally, the greenhouse environment data includes: temperature, humidity, light, gas concentration, and soil moisture.
[0081] The present invention provides a greenhouse environment data acquisition system, comprising: a sensor module and a data fusion module;
[0082] The data acquisition module collects multi-source data of the greenhouse environment through sensors;
[0083] The data fusion module performs fusion processing on the greenhouse environment data based on the observation values of the sensors using the improved ASCKF model as described in any of the above items.
[0084] Optionally, the sensors include: a temperature sensor, a humidity sensor, a light intensity sensor, and a gas sensor.
[0085] Optionally, the data acquisition module adopts an STM32 microprocessor.
[0086] The present invention provides a greenhouse environment data acquisition device, characterized in that it includes a memory and a processor;
[0087] The memory is used to store computer programs;
[0088] The processor is used to implement the greenhouse environment data collection method as described in any one of the above items when executing the computer program.
[0089] The present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the greenhouse environment data collection method as described in any one of the above items is implemented.
[0090] The beneficial effects of the present invention are:
[0091] Aiming at the problems of low monitoring accuracy, weak local perception, and susceptibility to various random noises of various environmental sensors, a local robust perception method for temperature data based on multiple improved ASCKF models is proposed. Firstly, the traditional Cholesky decomposition is replaced by singular value decomposition (SVD), and the nonlinear greenhouse model is processed in combination with the volume rule; secondly, the covariance matrix is iteratively corrected by constructing an adaptive adjustment factor; thirdly, the state update and covariance update process are simplified according to the greenhouse observation model; finally, in view of the problem that the unknown statistical characteristics of time-varying noise may cause the perception accuracy to decrease or even diverge, an improved Sage-Husa adaptive noise statistical estimator combined with the greenhouse model is proposed, and a sliding residual window factor is constructed based on the covariance matching idea to achieve the purpose of adaptively adjusting the covariance matrix of system noise and observation noise at the same time.
[0092] Simulation results show that the present invention has strong robustness and high perception accuracy while also being able to adaptively observe noise interference and system noise interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0094] Figure 1 This is a picture of a smart greenhouse built in a vegetable research institute.
[0095] Figure 2 It is a diagram of SVD diagram.
[0096] Figure 3 This is a physical picture of the data collector used to verify the performance of the multiple improved ASCKF algorithm in Example 2 of the present invention.
[0097] Figure 4 It is a schematic diagram of a data acquisition circuit for verifying the performance of multiple improved ASCKF algorithms in the second embodiment of the present invention.
[0098] Figure 5 This is a comparison chart of the outlier perception accuracy between the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method.
[0099] Figure 6 It is a comparison chart of the three field value perception accuracy of the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method.
[0100] Figure 7 It is a comparison chart of the four-field value perception accuracy of the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method.
[0101] Figure 8 It is a comparison chart of the five-field value perception accuracy of the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method.
[0102] Fig. 9 This is a comparison chart of the six-field value perception accuracy of the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method.
[0103] Fig.10 It is a comparison chart of the seven field value perception accuracy of the greenhouse temperature data collection method based on the improved ASCKF model in Example 2 of the present invention and the existing method. DETAILED DESCRIPTION
[0104] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0105] Embodiment 1:
[0106] This embodiment provides a greenhouse environment data collection method, which performs fusion processing on the greenhouse environment data based on the improved ASCKF model;
[0107] The system status and observation models established for smart greenhouses include:
[0108] x k =f(x k-1 )+Γw k-1
[0109] z k =H k x k +v k
[0110] Where k represents discrete time, the system state x k 、x k-1 is the true value of environmental data, z k is the environmental data observation value, f(·) is the nonlinear transformation function, w k-1 is the system noise interference, and its covariance is recorded as Q k-1 And the mean is zero, v k is the observed noise interference, and its covariance is recorded as R k And the mean is zero, Γ is the system noise driving matrix, H k is the observation matrix, w k-1 With v kIndependent of each other, Γ and H k All are unit arrays;
[0111] The calculation process of the improved ASCKF model includes:
[0112] (1) Prediction process:
[0113] Step 1: Input covariance matrix P k-1|k-1 Perform SVD decomposition:
[0114]
[0115] Where k represents the discrete moment, U k-1|k-1 P k-1|k-1 The left singular matrix, S k-1|k-1 P k-1|k-1 The singular value matrix, V k-1|k-1 P k-1|k-1 is a right singular matrix of .
[0116] Step 2: Calculate the state volume point:
[0117]
[0118] in, represents the optimal estimate at time k-1; is the volume point set, n is the system state dimension and i = 1, 2, …, 2n; [1] i represents the i-th column of point set [1], point set [1] is:
[0119]
[0120] Step 3: Calculate the nonlinear state function propagation volume points:
[0121]
[0122] Step 4: Calculate the prior prediction value of the system state through weighted fusion of volume points:
[0123]
[0124] Step 5: Calculate the prediction covariance matrix:
[0125]
[0126] Among them, Q k-1 represents the system noise covariance matrix;
[0127] (2) Update process:
[0128] Step 1: Forecast covariance matrix P k|k-1 Perform SVD decomposition:
[0129]
[0130] Among them, U k|k-1 Indicates P k|k-1 The left singular matrix, S k|k-1 Indicates P k|k-1 The singular value matrix, V k|k-1 Indicates P k|k-1 is a right singular matrix of .
[0131] Step 2: Calculate the observation volume points:
[0132]
[0133] Step 3: Calculate the linear observation function propagation volume points:
[0134]
[0135] Step 4: Calculate the predicted value of sensor observations:
[0136]
[0137] Step 5: Calculate the autocovariance:
[0138]
[0139] Among them, R k represents the observation noise covariance matrix.
[0140] Step 6: Calculate the cross-covariance:
[0141]
[0142] Step 7: Calculate observational innovation:
[0143]
[0144] Step 8: Calculate the observation innovation vector matrix:
[0145]
[0146] Step 9: If
[0147] δ k =I
[0148] Step 10: If
[0149]
[0150] Step 11: Correct the autocovariance matrix:
[0151]
[0152] Step 12: Modify the cross-covariance matrix:
[0153]
[0154] Step 13: Update the Kalman filter gain:
[0155]
[0156] Step 14: Simplify system status updates:
[0157]
[0158] Step 15: Simplified covariance matrix update:
[0159] P k|k =(IK k H k ) k|k-1
[0160] Step 16: Calculate the sliding residual window factor:
[0161]
[0162] Among them, Θ k is the sliding residual window factor and ω=k-L+1; L is the window size for the innovation covariance matching;
[0163] Step 17: Adaptively adjust the observation noise covariance matrix:
[0164]
[0165] Step 18: Update observation information:
[0166]
[0167] Step 19: Calculate the weighting coefficient:
[0168] d k =(1-b)(1-b k ) -1
[0169] Where b is the forgetting factor and 0 <b<1;
[0170] Step 20: Adaptively adjust the system noise covariance matrix:
[0171]
[0172] Step 21: Update the temperature estimate Covariance matrix P k|k , observation noise covariance matrix R k+1 , system noise covariance matrix Q k The improved ASCKF model is input and the above prediction process and update process are executed again until the preset number of updates is met.
[0173] This embodiment aims to solve the problems of low monitoring accuracy, weak local perception, and susceptibility to various random noises of various environmental sensors, and proposes a local robust perception method for temperature data based on multiple improved ASCKF models. First, singular value decomposition is used instead of traditional Cholesky decomposition, and the nonlinear greenhouse model is processed in combination with the volume rule; second, the covariance matrix is iteratively corrected by constructing an adaptive adjustment factor; third, the state update and covariance update process are simplified according to the greenhouse observation model; finally, in view of the problem that the unknown statistical characteristics of time-varying noise may cause a decrease in perception accuracy or even divergence, an improved Sage-Husa adaptive noise statistical estimator combined with a greenhouse model is proposed, and a sliding residual window factor is constructed based on the covariance matching idea to achieve the purpose of simultaneously adaptively adjusting the covariance matrix of system noise and observation noise.
[0174] Embodiment 2
[0175] This embodiment takes the temperature data in the greenhouse as the observation object, and provides a method for collecting temperature data in the greenhouse based on a multiple improved adaptive simplified cubature Kalman filter (ASCKF) model. The improved ASCKF model is used to fuse the temperature data collected by sensors in the greenhouse to obtain more accurate and stable temperature collection data.
[0176] First, a system state and observation model is established for the smart greenhouse, including:
[0177] x k =f(x k-1 )+Γw k-1
[0178] z k =H k x k +v k
[0179] The system state x k 、x k-1 is the true temperature, z k is the observed value, f(·) is the temperature nonlinear transformation function, w k-1 is the system noise interference, and its covariance is recorded as Q k-1 And zero mean, vk is the observed noise interference, and its covariance is recorded as R k and zero mean, Γ is the system noise driving matrix, H k is the observation matrix, w k-1 With v k Independent of each other, Γ and H k They are all unit arrays.
[0180] The improved ASCKF model of this embodiment includes the following steps:
[0181] (1) Prediction process:
[0182] Step 1: Input covariance matrix P k-1|k-1 Perform SVD decomposition:
[0183]
[0184] Among them, k represents the discrete moment, U k-1|k-1 P k-1|k-1 The left singular matrix, S k-1|k-1 P k-1|k-1 The singular value matrix, V k-1|k-1 P k-1|k-1 is a right singular matrix of .
[0185] Step 2: Calculate the state volume point:
[0186]
[0187] in, represents the optimal estimate at time k-1; is the volume point set, n is the system state dimension and i = 1, 2, …, 2n; [1] i represents the i-th column of point set [1], point set [1] is:
[0188]
[0189] Step 3: Calculate the nonlinear state function propagation volume points:
[0190]
[0191] Step 4: Calculate the prior prediction value of the system state through weighted fusion of volume points:
[0192]
[0193] Step 5: Calculate the prediction covariance matrix:
[0194]
[0195] Among them, Q k-1represents the system noise covariance matrix.
[0196] (2) Update process
[0197] Step 1: Forecast covariance matrix P k|k-1 Perform SVD decomposition:
[0198]
[0199] Among them, U k|k-1 Indicates P k|k-1 The left singular matrix, S k|k-1 Indicates P k|k-1 The singular value matrix, V k|k-1 Indicates P k|k-1 is a right singular matrix of .
[0200] Step 2: Calculate the observation volume points:
[0201]
[0202] Step 3: Calculate the linear observation function propagation volume points:
[0203]
[0204] Step 4: Calculate the predicted value of sensor observations:
[0205]
[0206] Step 5: Calculate the autocovariance:
[0207]
[0208] Among them, R k represents the observation noise covariance matrix.
[0209] Step 6: Calculate the cross-covariance:
[0210]
[0211] Step 7: Calculate observational innovation:
[0212]
[0213] Step 8: Calculate the observation innovation vector matrix:
[0214]
[0215] Step 9: If
[0216] δ k =I
[0217] Step 10: If
[0218]
[0219] Step 11: Correct the autocovariance matrix:
[0220]
[0221] Step 12: Modify the cross-covariance matrix:
[0222]
[0223] Step 13: Update the Kalman filter gain:
[0224]
[0225] Step 14: Simplify system status updates:
[0226]
[0227] Step 15: Simplified covariance matrix update:
[0228] P k|k =(IK k H k ) k|k-1
[0229] Step 16: Calculate the sliding residual window factor:
[0230]
[0231] Among them, Θ k is the sliding residual window factor and ω=k-L+1; L is the window size for new information covariance matching, which can be flexibly adjusted according to actual observation conditions and is not a fixed value.
[0232] Step 17: Adaptively adjust the observation noise covariance matrix:
[0233]
[0234] Step 18: Update observation information:
[0235]
[0236] Step 19: Calculate weighting coefficients
[0237] d k =(1-b)(1-b k ) -1
[0238] Among them, b is the forgetting factor and 0 < b < 1. In this embodiment, b is taken as 0.95.
[0239] Step 20: Adaptively adjust the system noise covariance matrix:
[0240]
[0241] Step 21: Use the updated temperature estimate Covariance matrix P k|k and the observation noise covariance matrix R k+1 and the system noise covariance matrix Q k as the input to the improved ASCKF model, and execute the above prediction process and update process again until the preset number of updates is satisfied.
[0242] In this embodiment, multiple improvements are made to the ASCKF model, including: using singular value decomposition instead of traditional Cholesky decomposition; constructing an adaptive adjustment factor to iteratively update the auto-cross covariance matrix; simplifying the state update and covariance update processes according to the greenhouse observation model; adaptively adjusting the system noise and observation noise covariance matrices based on the improved Sage-Husa algorithm and the sliding residual window factor respectively.
[0243] Regarding singular value decomposition:
[0244] Traditional CKF performs Cholesky decomposition on the covariance matrix P, and the necessary condition for the Cholesky transformation is that P remains symmetric positive definite at all times. This condition restricts the value range of P, resulting in unstable data fusion; in practical applications, P may become a sparse matrix during the algorithm operation, destroying the necessary condition for the Cholesky transformation and directly causing the algorithm to abort.
[0245] To overcome the above problems, this embodiment uses singular value decomposition instead of traditional Cholesky decomposition. The specific formula is:
[0246]
[0247] where P is an arbitrary square matrix; S = diag(P1, P2,..., P n ) is the diagonal matrix composed of the singular values of matrix P; the column vectors of matrix U are the left singular vectors of P; the column vectors of matrix V are the right singular vectors of P; the SVD diagram is as shown in Figure 2 Figure.
[0248] Regarding constructing an adaptive adjustment factor to iteratively update the auto-cross covariance matrix:
[0249] The greenhouse is a semi-enclosed space, which is easily affected by strong wind and airflow, resulting in large fluctuations in indoor temperature. The fusion accuracy of the traditional CKF algorithm is low, and its fusion value is easily affected by abnormal data. In the traditional CKF, the dominant parameter affecting the final fusion accuracy is the cubature Kalman filter gain K. k , and K k It is composed of an autocovariance matrix and a cross-covariance matrix; therefore, in order to improve the robustness and accuracy of the perception algorithm and enhance the system's adaptability, this embodiment proposes an adaptive adjustment factor δ based on observation of new information and capable of iteratively correcting the auto-covariance matrix k , according to the observation innovation vector matrix and the autocovariance matrix The CKF adaptive adjustment factor δ is constructed based on the comparison results of the traces. k .
[0250] When the greenhouse multi-sensor system observes abnormal data, z k and The absolute error between the observations Φ k The purpose of indirectly comparing the two matrices is achieved by comparing the autocovariance matrix with the trace of the observation innovation vector matrix. The trace is greater than The trace of k Autocovariance matrix and the cross-covariance matrix Perform adaptive adjustment.
[0251] About adaptive adjustment of system noise:
[0252] The traditional Sage-Husa algorithm is an adaptive noise statistical estimator designed for the standard Kalman filter. It is used to solve the adaptive filtering problem with unknown noise statistical characteristics in the linear domain. However, the greenhouse system state model is a nonlinear system. Therefore, the traditional Sage-Husa algorithm is not suitable for volumetric Kalman filtering, and is even less conducive to processing nonlinear problems such as robust fusion of greenhouse data.
[0253] Therefore, this embodiment is based on the state and observation model of the smart greenhouse system and combines the gradually fading memory exponential weighting method to propose a Sage-Husa adaptive noise statistical estimator combined with the CKF volume rule, and its iterative formula is:
[0254] Observation noise mean:
[0255]
[0256] System noise mean:
[0257]
[0258] Observation noise covariance matrix:
[0259]
[0260] System noise covariance matrix:
[0261]
[0262] where d k is the weighting coefficient and d k =(1 - b) / (1 - b k ); is the updated observation innovation and b is the forgetting factor and 0 < b < 1. In this embodiment, b takes 0.95.
[0263] When there are multiple different types of sensors in the greenhouse, the system order is relatively high. When using the Sage - Husa algorithm, the problem of CKF divergence is often difficult to avoid. To address such problems, this embodiment further proposes an improved Sage - Husa algorithm with high universality in the greenhouse environment, and its recurrence formula is:
[0264] Observation noise mean:
[0265]
[0266] System noise mean:
[0267]
[0268] Observation noise covariance matrix:
[0269]
[0270] System noise covariance matrix:
[0271]
[0272] By introducing a forgetting factor into the traditional Sage - Husa algorithm, it gradually fades the old noise data while highlighting the new noise data more prominently; and based on the greenhouse model, the improved Sage - Husa algorithm is optimized to achieve the purpose of adaptively adjusting the greenhouse system noise covariance matrix Q k so as to effectively reduce the fusion error caused by the interference of the nonlinear stochastic system.
[0273] Regarding the adaptive adjustment of observation noise:
[0274] In actual agricultural production, since both Q k and R k are unknown time - varying data, so it cannot be simply assumed that Qk With R k is a constant value, otherwise a large fusion error will occur. Given that the Sage-Husa algorithm itself has certain theoretical limitations, it cannot simultaneously process the system noise covariance matrix Q k and the observation noise covariance matrix R k Therefore, the improved Sage-Husa algorithm is specifically used in this embodiment to process the system noise covariance matrix Q k Adaptive adjustment problem; for the observation noise covariance matrix R k Adaptive adjustment, this embodiment proposes an R based on sliding residual window factor according to the idea of new information covariance matching. k Redefine the correction method, the specific formula is:
[0275]
[0276]
[0277] where Θ k is the sliding residual window factor and ω=k-L+1; L is the window size for new information covariance matching, which can be flexibly adjusted according to actual observation conditions and is not a fixed value.
[0278] When the observed noise follows a normal distribution, the traditional CKF fusion accuracy is high. However, once abnormal data appears in the observed data, the traditional CKF is easily affected by it, resulting in serious degradation of its fusion performance. Therefore, in order to address the disadvantage of poor robustness of traditional CKF fusion, this embodiment calculates the sliding residual window factor θ k And redefine R k , which can make the fusion errors introduced by abnormal observation data offset each other. This redefinition method based on the idea of novel information covariance matching can greatly enhance the robustness and numerical stability of the algorithm and effectively suppress the adverse effects of abnormal data.
[0279] In order to prove the technical effect of the temperature data collection method of this embodiment, a comparative experiment was conducted, and the specific situation is as follows:
[0280] The data collector is designed to complete the multi-source data collection task of the smart greenhouse environmental factors through various sensor modules. The sensors include temperature sensors, humidity sensors, light sensors, carbon dioxide concentration sensors, etc. The physical picture of the data collector and the circuit schematic are as follows: Figure 3 and Figure 4 Shown
[0281] This embodiment takes the collected temperature data as the research object, and the temperature monitoring adopts the DS18B20 digital temperature sensor, whose measurement range is -55℃ to +125℃ and the observation accuracy can reach ±0.5℃, and the resolution is 0.1℃; at the same time, the MCU (Microcontroller Unit) reads the greenhouse temperature data through the 1-Wire communication protocol. This protocol allows multiple DS18B20 sensors to communicate with the main controller through a single data line, which is very suitable for temperature monitoring applications, and each DS18B20 module has a 64-bit exclusive serial number, so that the microcontroller can operate multiple sensors in parallel on the same bus without address conflicts; it has the advantages of high measurement accuracy.
[0282] right Figure 1 The smart greenhouse shown in the figure conducts multi-point field temperature monitoring. The observation time is from 7:00 to 9:00 a.m. on a certain day in September 2023, and the observation interval is 6 minutes. The real temperature data is obtained by a professional precision laser thermometer designed by Delixi Group, a top 500 enterprise brand in China. Its measurement range is -50℃ to 1680℃, the measurement accuracy is ±1%, the response time is 0.5s, and the infrared emissivity is adjustable in multiple levels. The temperature observation value is obtained by the data collector. The 20 sets of temperature observation values and the real temperature values are shown as follows:
[0283] Temperature observation values: [26.7℃, 26.2℃, 27.8℃, 28.4℃, 28℃, 25.9℃, 27.6℃, 26.6℃, 26.4℃, 25.8℃, 26.5℃, 27.3℃, 26.6℃, 26.0℃, 27.1℃, 26.2℃, 26.9℃, 26.3℃, 26.9℃, 26.2℃];
[0284] Actual temperature value: [26.5℃, 26.3℃, 26.5℃, 26.6℃, 26.7℃, 26.5℃, 26.7℃, 26.6℃, 26.5℃, 26.4℃, 26.4℃, 26.5℃, 26.5℃, 26.4℃, 26.5℃, 26.4℃, 26.5℃, 26.4℃, 26.5℃, 26.5℃].
[0285] (1) Comparison of perception accuracy
[0286] The observed values are used as the fusion input of the multiple improved ASCKF model, UKF model, CKF model and the model in reference 1. Q is 0.01 and R is 0.25. The comparison results of the perception accuracy of each model based on the measured data without outliers are as follows: Figure 5 shown.
[0287] Reference 1: Li Shao Nian, Li Yi, Wei Liejiang, et al. Research on greenhouse Internet of Things acquisition system based on improved Kalman data fusion algorithm[J]. Journal of Sensor Technology, 2022, 35(4): 558-564.
[0288] (2) Perceptual robustness comparison
[0289] First, the 7th and 17th observation values were converted into wild values of 32.5℃ and 32.6℃, and then the 12th, 3rd, 10th and 15th observation values were converted into wild values of 32.5℃, 32℃, 29℃ and 32.5℃ respectively. Figure 6-Figure 10 This is a comparison chart of outlier fusion accuracy based on measured data when there are three to seven outliers.
[0290] Depend on Figure 5-Figure 10 It can be seen that the traditional CKF and UKF models do not have any adaptive perception capabilities and have poor fusion robustness. When there are two or fewer outliers in the observed data, the model in Reference 1 perceives normally, but once there are three or more outliers, the model in Reference 1 gradually misses or even loses the ability to remove outliers. It can be seen that the perceptual robustness of the model in Reference 1 is completely dependent on the traditional Romanovsky outlier detection model, which is only applicable to cases with fewer outliers.
[0291] In contrast, the multiple improved ASCKF algorithm of this embodiment has the highest perception accuracy and the average error is only about 0.074°C; at the same time, through dual adaptation to various system noises and observation noises in the smart greenhouse, the multiple improved ASCKF algorithm of this embodiment maintains strong perception robustness from beginning to end, and its perception performance will not be affected by the number of outliers.
[0292] Embodiment three:
[0293] The present embodiment provides a greenhouse environment data acquisition system, including a data acquisition module and a data fusion module, wherein the data acquisition module performs multi-source data acquisition on the greenhouse environment through sensors; the data fusion module performs fusion processing on the greenhouse environment data based on the observation values of the sensors using the improved ASCKF model as described in Embodiment 1 or 2.
[0294] In this embodiment, the STM32F103C6T6 microprocessor is selected as the key chip of the data acquisition module. The operating main frequency of the microprocessor is as high as 72MHz. While supporting communication interfaces including I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface) and UART (Universal Asynchronous Receiver / Transmitter), it can also provide 32KB flash memory and 10KB static random access memory. Therefore, the chip is very suitable for processing homogeneous data collection tasks on multi-source environmental factors in actual greenhouses.
[0295] Secondly, the temperature monitoring adopts DS18B20 digital temperature sensor, which has a measurement range of -55℃ to +125℃ and an observation accuracy of ±0.5℃, with a resolution of 0.1℃; at the same time, MCU (Microcontroller Unit) reads the greenhouse temperature data through the 1-Wire communication protocol. This protocol allows multiple DS18B20 sensors to communicate with the main controller through a single data line, which is very suitable for temperature monitoring applications. Each DS18B20 module has a 64-bit exclusive serial number, so that the microcontroller can operate multiple sensors in parallel on the same bus without address conflicts; it has the advantages of high measurement accuracy.
[0296] Again, the humidity monitoring uses the DHT11 digital temperature and humidity sensor, which has a measurement range of 20% to 80% RH and an observation accuracy of up to ±5% RH, and a measurement resolution of up to 1% RH; at the same time, the MCU reads the greenhouse humidity data through the Single-Wire digital communication protocol, which allows the sensor to output 40-bit data through a single data line sequence, including the integer and decimal parts of the humidity data; in the process of communication between the DHT11 module and the microcontroller, the Single-Wire protocol allows it to transmit data through a single data line and provide a synchronization signal, thereby eliminating the need for an external clock; the simplicity of the single-wire communication protocol makes the DHT11 module very suitable for humidity monitoring applications.
[0297] From this, the GL5528 photoresistor is selected for light intensity monitoring, with a measurement range of 10-40000Lux, an observation accuracy of ±10Lux, and a measurement resolution of 1Lux.
[0298] Finally, the SGP30 gas sensor is used for carbon dioxide concentration monitoring, which has a measurement range of 400-60000ppm, an accuracy of ±15% of the measured value, and a resolution of 1ppm; at the same time, the greenhouse carbon dioxide concentration data is read through the I2C protocol.
[0299] The physical picture of the data logger and the circuit schematic are as follows: Figure 3 and Figure 4 shown.
[0300] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0301] 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 principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A greenhouse environment data collection method, characterized in that: The method performs fusion processing on greenhouse environment data based on the improved ASCKF model; The system status and observation models established for smart greenhouses include: x k =f(x k-1 )+Γw k-1 z k =H k x k +v k Where k represents discrete time, the system state x k 、x k-1 is the true value of environmental data, z k is the environmental data observation value, f(·) is the nonlinear transformation function, w k-1 is the system noise interference, and its covariance is recorded as Q k-1 And the mean is zero, v k is the observed noise interference, and its covariance is recorded as P k And the mean is zero, Γ is the system noise driving matrix, H k is the observation matrix, w k-1 With v k Independent of each other, Γ and H k All are unit arrays; The calculation process of the improved ASCKF model includes: (1) Prediction process: Step 1: Input covariance matrix P k-1|k-1 Perform SVD decomposition: Among them, k represents the discrete moment, U k-1|k-1 P k-1|k-1 The left singular matrix, S k-1|k-1 P k-1|k-1 The singular value matrix, V k-1|k-1 P k-1|k-1 is a right singular matrix of . Step 2: Calculate the state volume point: in, represents the optimal estimate at time k-1; is the volume point set, n is the system state dimension and i = 1, 2, …, 2n; [1] i represents the i-th column of point set [1], point set [1] is: Step 3: Calculate the nonlinear state function propagation volume points: Step 4: Calculate the prior prediction value of the system state through weighted fusion of volume points: Step 5: Calculate the prediction covariance matrix: Among them, Q k-1 represents the system noise covariance matrix; (2) Update process: Step 1: Forecast covariance matrix P k|k-1 Perform SVD decomposition: Among them, U k|k-1 Indicates P k|k-1 The left singular matrix, S k|k-1 Indicates P k|k-1 The singular value matrix, V k|k-1 Indicates P k|k-1 is a right singular matrix of . Step 2: Calculate the observation volume points: Step 3: Calculate the linear observation function propagation volume points: Step 4: Calculate the predicted value of sensor observations: Step 5: Calculate the autocovariance: Among them, R k represents the observation noise covariance matrix. Step 6: Calculate the cross-covariance: Step 7: Calculate observational innovation: Step 8: Calculate the observation innovation vector matrix: Step 9: If d k =I Step 10: If Step 11: Correct the autocovariance matrix: Step 12: Modify the cross-covariance matrix: Step 13: Update the Kalman filter gain: Step 14: Simplify system status updates: Step 15: Simplified covariance matrix update: P k|k =(I-K k H k )P k|k-1 Step 16: Calculate the sliding residual window factor: Among them, Θ k is the sliding residual window factor and ω=k-L+1; L is the window size for the innovation covariance matching; Step 17: Adaptively adjust the observation noise covariance matrix: Step 18: Update observation information: Step 19: Calculate the weighting coefficient: d k =(1-b)(1-b k ) -1 Where b is the forgetting factor and 0 <b<1; Step 20: Adaptively adjust the system noise covariance matrix: Step 21: Update the temperature estimate Covariance matrix P k|k , observation noise covariance matrix R k+1 , system noise covariance matrix Q k The improved ASCKF model is input and the above prediction process and update process are executed again until the preset number of updates is met.
2. The greenhouse environment data collection method according to claim 1, characterized in that: The forgetting factor b is set to 0.
95.
3. The greenhouse environment data collection method according to claim 1, characterized in that: The mean of the observation noise is: Among them, r k represents the mean of the observation noise at time k.
4. The greenhouse environment data collection method according to claim 1, characterized in that: The mean value of the system noise is: Among them, q k represents the mean value of the system noise at time k.
5. The greenhouse environment data collection method according to claim 1, characterized in that: The greenhouse environment data includes: temperature, humidity, light, gas concentration, and soil humidity.
6. A greenhouse environment data acquisition system, characterized in that: The system comprises: a data acquisition module and a data fusion module; The data acquisition module collects multi-source data of the greenhouse environment through sensors; The data fusion module performs fusion processing on the greenhouse environment data based on the observation values of the sensors using the improved ASCKF model as described in any one of claims 1 to 4.
7. The greenhouse environment data acquisition system according to claim 6, characterized in that: The sensors include: a temperature sensor, a humidity sensor, a light intensity sensor, and a gas sensor.
8. The greenhouse environment data acquisition system according to claim 6, characterized in that: The data acquisition module adopts STM32 microprocessor.
9. A greenhouse environment data acquisition device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the greenhouse environment data collection method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the greenhouse environment data collection method according to any one of claims 1 to 5 is implemented.