Greenhouse space field environment simulation system based on machine learning
Through the greenhouse space field environment simulation system based on machine learning, the problems of low model accuracy, simple control strategy and insufficient energy consumption optimization in the existing technology are solved, high-precision environmental prediction and intelligent regulation are achieved, and the efficiency and economicality of greenhouse environmental management are improved.
Patent Information
- Application Number
- CN202411917662.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing greenhouse environmental control technology relies on simple rule control or empirical judgment, and cannot effectively describe the complex nonlinear environmental parameter coupling relationship, resulting in low model prediction accuracy, simple control strategy and insufficient energy consumption optimization.
Using a greenhouse space field environment simulation system based on machine learning, the environmental parameters and control equipment status data are obtained through the data acquisition module, and data preprocessing, model training and prediction analysis are used for data preprocessing, model training and prediction analysis, and control equipment operation instructions are dynamically generated to regulate the environment.
It improves the accuracy and real-time nature of greenhouse environmental control, enhances resource utilization efficiency, reduces equipment energy consumption, and realizes high-precision environmental prediction and intelligent regulation.
Smart Images

Figure CN119781553A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of greenhouse environment intelligent control, and in particular to a greenhouse space field environment simulation system based on machine learning. Background Art
[0002] With the rapid development of modern agriculture, greenhouse cultivation technology has played an important role in increasing crop yields, optimizing resource utilization, and coping with complex climatic conditions. At present, the main branches involved in the greenhouse environment model in China have been studied and corresponding models have been established, and simulation studies have been carried out. Including light, heat transfer of greenhouse cover, heat transfer of soil, mechanical ventilation and natural ventilation, water vapor transfer and humidity models in the greenhouse, etc. These studies focus too much on the relationship between greenhouse structure and environment, while there are few studies on the differences in spatial environment in greenhouses, which cannot meet the environmental needs of crop phenotyping or the needs of digital greenhouse environment. Therefore, it is necessary to establish a digital greenhouse environment model and study the relationship between the evolution of greenhouse environment and space and time, which is also an urgent need to promote the development of smart agriculture.
[0003] However, the current greenhouse environmental control technology relies on simple rule control or empirical judgment. This traditional model exposes significant technical deficiencies under complex and changing environmental conditions. First, in terms of environmental parameter collection and processing, the traditional system relies on only a small number of sensors, with single data types and uneven distribution, and cannot fully obtain the environmental spatial characteristics in the greenhouse. The collected data is often accompanied by missing values or outliers, which affects the prediction effect of the model. Secondly, the existing greenhouse environmental simulation model usually uses linear regression or empirical formulas for modeling, which is difficult to describe the complex nonlinear coupling relationship between temperature, humidity, light and carbon dioxide concentration, and the prediction accuracy is low. Thirdly, in terms of equipment control, traditional control strategies mostly use static threshold rules, which cannot dynamically adapt to future environmental changes, resulting in insufficient control accuracy and increased equipment operating costs. In addition, the optimization of energy consumption of control equipment has been neglected for a long time, resulting in excessive energy consumption, affecting the economy and sustainability of the system. Summary of the invention
[0004] In view of this, the present invention proposes a greenhouse space field environment simulation system based on machine learning to solve the problems of low model accuracy, simple control strategy and insufficient energy consumption optimization in the prior art.
[0005] The technical solution of the present invention is implemented as follows: The present invention provides a greenhouse space field environment simulation system based on machine learning, comprising:
[0006] A data acquisition module, used to collect environmental parameter data and control device operation data, wherein the control device operation data includes a combination of working states of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data;
[0007] A data processing cloud platform is connected to the data acquisition module for processing the collected environmental parameter data and control device status data and generating a greenhouse environment simulation model, simulating the greenhouse environment using the greenhouse environment simulation model, and dynamically generating operating instructions for the control device according to the simulation data and the optimization algorithm to regulate the working status of the control device;
[0008] The data processing cloud platform includes:
[0009] A data processing unit, used for preprocessing the collected environmental parameter data;
[0010] A model training unit is used to train and generate multiple greenhouse environment simulation sub-models using the pre-processed environmental parameter data, each simulation sub-model corresponds to a working state combination, and all greenhouse environment simulation sub-models constitute a greenhouse environment simulation model;
[0011] A prediction unit is used to select a corresponding simulation sub-model according to the working state combination of the current control device, and input the current indoor environment parameter data into the selected simulation sub-model to obtain the indoor environment parameter prediction data at a future moment;
[0012] A control instruction forming unit is used to generate the optimal working state of the control device by using an optimization algorithm according to the indoor environment parameter prediction data at a future moment and the working state of the current control device, and to form a corresponding switch instruction;
[0013] The greenhouse environment control system is connected to the data processing cloud platform for regulating the working state of the control equipment according to the switch instructions.
[0014] On the basis of the above technical solution, preferably, the data acquisition module includes:
[0015] Weather station sensors, used to collect data on outdoor environmental parameters;
[0016] Environmental sensors in the greenhouse are used to collect environmental parameter data at different locations; the environmental sensors in the greenhouse include temperature sensors, humidity sensors, light radiation sensors and carbon dioxide sensors. The greenhouse is divided into several layers in the longitudinal direction, and each layer is provided with several temperature sensors and humidity sensors. The light radiation sensors and carbon dioxide sensors are provided on the top layer of the greenhouse;
[0017] Control device sensors are used to collect control device operation data.
[0018] On the basis of the above technical solution, preferably, the control device includes a fan, a skylight, a side window, a sunshade net and an air conditioner, and the working state combination of the control device is expressed by the following formula:
[0019] S={(s1,s2,s3,s4,s5)|s i ∈{0,1},i=1,2,3,4,5}
[0020] Among them, s1 represents the fan, s2 represents the skylight, s3 represents the side window, s4 represents the sunshade net, s5 represents the air conditioner, 0 represents off, and 1 represents on.
[0021] On the basis of the above technical solution, preferably, when collecting environmental parameter data, the data acquisition module first collects the control device operation data, determines the working state combination of the control device, and then collects the environmental parameter data under the working state combination of the control device. After collecting the environmental parameter data, the working state combination of the control device and the corresponding environmental parameter data are matched into groups for storage, wherein the environmental parameter data includes:
[0022] Outdoor environmental parameter data: including wind force, wind speed, light radiation, rainfall, air temperature, air humidity and carbon dioxide concentration;
[0023] Indoor environmental parameter data: including air temperature, air humidity, light radiation and carbon dioxide concentration at different locations.
[0024] On the basis of the above technical solution, preferably, the preprocessing of the collected environmental parameter data specifically includes: using data cleaning and normalization processing for the outdoor environmental parameter data, and using the GWR algorithm for spatial interpolation filling for the indoor environmental parameters, wherein the GWR algorithm fills the missing values including the following steps:
[0025] (1) Establish a three-dimensional coordinate system for greenhouse space sampling points, determine the spatial position coordinates of each sensor sampling point, and select reference sampling points with complete data as reference points;
[0026] (2) Calculate the spatial distance between each sampling point and the reference point, determine the weight attenuation function based on the spatial distance, and generate a normalized weight matrix;
[0027] (3) Use the spatial weight matrix to interpolate and fill in missing data.
[0028] Based on the above technical solution, preferably, the execution process of the prediction unit includes:
[0029] X1. Obtain the current control device operation data, determine the working state combination of the control device, obtain the corresponding indoor environment parameter data according to the working state combination of the control device, and pre-process the indoor environment parameter data;
[0030] X2. Input the preprocessed indoor environment parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status combination of the control equipment, and predict the indoor environment parameter prediction data at the future moment.
[0031] On the basis of the above technical solution, preferably, the execution process of the control instruction forming unit is as follows:
[0032] A1. Initialize the working state combination of the current control device;
[0033] A2. Based on the deviation between the indoor environment parameter prediction data at the future moment and the set indoor environment parameter data target value, combined with the device energy consumption under the current working state combination of the control device, an objective function is constructed;
[0034] A3. Using an intelligent optimization algorithm, taking the initialized working state combination of the control device as the starting point, iteratively optimizing the objective function, and adjusting the working state combination of the control device, the intelligent optimization algorithm being any one of a genetic algorithm and a particle swarm optimization algorithm;
[0035] A4. Set the iteration termination condition, terminate the optimization after the iteration termination condition is met, output the working state of the optimal control device, and generate the corresponding control instructions based on the optimal solution.
[0036] Based on the above technical solution, preferably, in step A2, the calculation formula of the objective function is:
[0037]
[0038] Where k is the current moment; i is the number of future time steps, and i is between k and N; x(k+i|k) is the predicted data of indoor environmental parameters at future moments; x set (k+i) is the target value of the indoor environment parameter data at the set time k+i; α j (k+i-1) is the on state of the j-th control device at time k+i-1, and its value is 0 or 1, 1 means on, 0 means off; u j is the energy consumption of the jth control device when one sampling cycle is started; λ is the weighting coefficient of the control quantity; m is the total number of control devices; N is the time range of prediction and control; ||x(k+i|k)-x set (k+i)|| 2 It represents the sum of squares of deviations between the predicted environmental parameter value and the target value at the future time k+i; It represents the sum of squares of energy consumption of all control devices at the future time k+i-1, and adjusts its weight in the objective function through the weighting coefficient λ.
[0039] On the basis of the above technical solutions, preferably, the connection method between the greenhouse environment control system and the data processing cloud platform includes any one of the HTTP protocol, HTTPS protocol, TCP protocol and modbus protocol.
[0040] On the basis of the above technical solution, preferably, the method for constructing the greenhouse environment simulation sub-model includes:
[0041] S1. Obtain the current control device operation data, determine the working state combination of the control device, and obtain the corresponding environmental parameter data according to the working state combination of the control device, which is divided into training data and test data;
[0042] S2, preprocessing environmental parameter data;
[0043] S3, based on the preprocessed environmental parameter data, using BP neural network to construct a greenhouse environment simulation sub-model, and training the simulation sub-model based on training data;
[0044] S4. Use test data to verify the simulation accuracy of the simulation sub-model, optimize the model parameters by calculating the error between the predicted value and the measured value, and output the greenhouse environment simulation sub-model.
[0045] The greenhouse space environment simulation system based on machine learning of the present invention has the following beneficial effects compared with the prior art:
[0046] (1) By collecting environmental parameter data inside and outside the greenhouse and information on the working status of control equipment, combined with the simulation capabilities of multiple greenhouse environment simulation sub-models, the environmental parameters inside the greenhouse can be accurately predicted, and the optimal combination of working status of control equipment can be formulated, thereby realizing dynamic intelligent control of the greenhouse environment; through this solution, the accuracy and real-time performance of greenhouse environmental control can be effectively improved, resource utilization efficiency can be improved, and a reliable technical means can be provided for greenhouse management and crop yield improvement in smart agriculture;
[0047] (2) A hierarchical modeling approach was adopted to construct an overall environmental simulation model through multiple sub-models trained based on BP neural network, which enabled accurate prediction of the changing trends of greenhouse environmental parameters (such as air temperature and humidity) under different conditions. This effectively solved the nonlinear and complex relationship problems in environmental prediction, ensured the high accuracy of the prediction results, and provided accurate data support for subsequent equipment control optimization.
[0048] (3) Through intelligent optimization algorithms, the solution with the minimum objective function value is found among various combinations of greenhouse control equipment working states, which can minimize equipment energy consumption while meeting the set environmental parameter requirements. Compared with traditional manual control or simple logic rule control methods, this solution automatically selects the combination of control equipment working states through algorithm optimization, greatly reducing energy consumption and improving control efficiency;
[0049] (4) The geographically weighted regression algorithm is used to effectively solve the problem of missing data that may occur in greenhouse environmental data collection, and the accuracy of data modeling and the generalization ability of the model are improved through normalization processing. It not only overcomes the problem of incomplete environmental data caused by sensor anomalies or external interference during the data collection process, but also ensures high-quality data input and improves the stability of the greenhouse environment simulation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0051] Figure 1 It is a structural diagram of the greenhouse space field environment simulation system based on machine learning of the present invention;
[0052] Figure 2 A system architecture diagram of a greenhouse environment of the present invention;
[0053] Figure 3 The structure diagram of the weather station measurement of the present invention;
[0054] Figure 4 An array and diagram of temperature and humidity sensors arranged in a greenhouse according to an embodiment of the present invention;
[0055] Figure 5 The sensor slice model after the spatial decomposition in the greenhouse of the embodiment of the present invention;
[0056] Figure 6 A greenhouse environment simulation model diagram of the present invention;
[0057] Figure 7 The flowchart is a flow chart of the execution process of the control instruction forming unit of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] like Figure 1 and Figure 2 As shown, the present invention provides a greenhouse space environment simulation system based on machine learning, comprising:
[0060] A data acquisition module, used to collect environmental parameter data and control device operation data, wherein the control device operation data includes a combination of working states of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data;
[0061] A data processing cloud platform is connected to the data acquisition module for processing the collected environmental parameter data and control device status data and generating a greenhouse environment simulation model, simulating the greenhouse environment using the greenhouse environment simulation model, and dynamically generating operating instructions for the control device according to the simulation data and the optimization algorithm to regulate the working status of the control device;
[0062] The greenhouse environment control system is connected to the data processing cloud platform for regulating the working state of the control equipment according to the switch instructions.
[0063] The present invention provides a greenhouse space field environment simulation system based on machine learning, which realizes high-precision simulation and dynamic regulation of the greenhouse environment through a full-process architecture of data acquisition, simulation modeling, predictive analysis and intelligent optimization control.
[0064] Preferably, the data acquisition module includes a weather station sensor, a greenhouse environment sensor and a control device sensor. When collecting environmental parameter data, the data acquisition module first collects the control device operation data, determines the working state combination of the control device, and then collects the environmental parameter data under the working state combination of the control device. After collecting the environmental parameter data, the working state combination of the control device and the corresponding environmental parameter data are matched into groups for storage.
[0065] like Figure 3As shown, the weather station sensor is used to collect outdoor environmental parameter data, including but not limited to wind force, wind speed, light radiation, rainfall, air temperature, air humidity and carbon dioxide concentration. By arranging the weather station sensors outside the greenhouse, the changes in external meteorological conditions can be monitored in real time, wherein the weather station sensors include temperature sensors, light radiation sensors, humidity sensors, carbon dioxide sensors, wind speed sensors, wind direction sensors and rainfall sensors. The system adopts an integrated solution to connect various weather station sensors through 485. After the weather station sensors collect the above-mentioned outdoor environmental parameter data, they send the data to the cloud through the 4G / 5G module. The weather station sensor is installed on the top of the greenhouse and uses two modes of solar power supply or ordinary mains power supply to extend the operating time of the weather station.
[0066] The greenhouse environment sensor is used to collect indoor environment parameter data at different locations, and the control device sensor is used to collect control device operation sensors. The greenhouse environment sensor includes a temperature sensor, a humidity sensor, a light radiation sensor and a carbon dioxide sensor. The greenhouse is divided into several layers in the vertical direction, and each layer is provided with several temperature sensors and humidity sensors. The light radiation sensor and the carbon dioxide sensor are arranged on the top floor of the greenhouse.
[0067] In one embodiment, if Figure 4 and Figure 5 As shown in the figure, the greenhouse environment spatial information is set as follows: the length × width × height of the greenhouse are 19.2m × 12m × 5.3m respectively; the east-west direction (length direction) is 2m, 7m, 12m, and 17m from the east wall, the north-south direction is 2m, 6m, and 10m from the south wall, and the heights are 0.5m, 1.5m, 2.5m, 3.5m, and 4.5m respectively. A total of 60 data collection points are set, including 6 points for crop layer light radiation and 6 points for carbon dioxide concentration.
[0068] The control device sensor is used to collect the operating status data of the control devices in the greenhouse, where the control devices include fans, skylights, side windows, sunshade nets and air conditioners. The operating status of each control device includes two states: on and off. The sensor monitors the working status of each device in real time and converts it into a standardized binary state vector representation. For example, the on / off state of the fan can be represented as "1" or "0", and the states of all control devices are combined to form a multidimensional vector to describe the current control conditions of the greenhouse.
[0069] Specifically, the working state combination of the control device is expressed by the following formula:
[0070] S={(s1,s2,s3,s4,s5)|s i ∈{0,1},i=1,2,3,4,5}
[0071] Among them, s1 represents the fan, s2 represents the skylight, s3 represents the side window, s4 represents the sunshade net, s5 represents the air conditioner, 0 represents off, and 1 represents on.
[0072] The greenhouse environment control system can read and write control devices including: skylights, side windows, fans, sunshade nets, air conditioners. The connection method between the greenhouse environment control system and the control devices includes but is not limited to any one of the HTTP protocol, HTTPS protocol, TCP protocol and modbus protocol.
[0073] The system of the present invention comprehensively collects indoor and outdoor environmental parameters and the operating status data of the control equipment through weather station sensors, greenhouse environment sensors and control equipment sensors. By adopting a layered and multi-point arrangement of sensors, the temperature, humidity, light radiation and carbon dioxide concentration and other parameters at different locations in the greenhouse are accurately monitored, and the working status combination of the control equipment is obtained in real time. By matching the control equipment status with the corresponding environmental parameter data and storing them in groups, the relevance and integrity of the data are ensured, providing a high-quality data foundation for subsequent modeling and optimization.
[0074] Preferably, the data processing cloud platform includes:
[0075] A data processing unit, used for preprocessing the collected environmental parameter data;
[0076] A model training unit is used to train and generate multiple greenhouse environment simulation sub-models using the pre-processed environmental parameter data, each simulation sub-model corresponds to a working state combination, and all greenhouse environment simulation sub-models constitute a greenhouse environment simulation model;
[0077] A prediction unit is used to select a corresponding simulation sub-model according to the working state combination of the current control device, and input the current indoor environment parameter data into the selected simulation sub-model to obtain the indoor environment parameter prediction data at a future moment;
[0078] The control instruction forming unit is used to generate the optimal working state of the control device by using an optimization algorithm based on the indoor environmental parameter prediction data at a future moment and the working state combination of the current control device, and form a corresponding switch instruction.
[0079] Preferably, the collected environmental parameter data is preprocessed and classified according to different types of environmental parameter data, specifically including:
[0080] For outdoor environmental parameter data (such as wind speed, wind force, radiation, etc.), the original data obtained may have obvious abnormal values or inconsistent units. Therefore, data cleaning and normalization are used for outdoor environmental parameter data. Specifically, it includes:
[0081] 1.1 Perform outlier detection on the data collected from the outdoor environment and remove observations that do not meet the predetermined threshold range; for example, the outlier cleaning of wind speed can define a limit range (such as 0-50m / s), and outliers outside the range will be considered invalid and removed.
[0082] 1.2 In order to reduce the impact of dimensional differences of various outdoor parameters on model training, the normalization method is used to process each parameter.
[0083] Since indoor environmental sensors are densely distributed and have a large number of sampling points, the data of greenhouse temperature, humidity, etc. collected at certain times or locations may be missing due to hardware loss or interference. Therefore, the indoor environmental parameters are spatially interpolated using the Geographically Weighted Regression (GWR) algorithm, which includes the following steps:
[0084] (1) Establish a three-dimensional coordinate system for the greenhouse space sampling points, determine the spatial position coordinates of each sensor sampling point, and select reference sampling points with complete data as reference points.
[0085] The three-dimensional coordinate system of the greenhouse space field takes the bottom left front corner of the greenhouse as the origin, and defines the X-axis as the length direction of the greenhouse, the Y-axis as the width direction, and the Z-axis as the height direction. The spatial position of each sensor sampling point is represented by its position coordinates (x, y, z) in the three-dimensional coordinate system. For environmental sensors in the greenhouse (such as temperature sensors, humidity sensors, etc.), the coordinates of their sampling points are determined according to the actual installation position of the sensor. A reference sampling point with complete data is selected as the reference point. The principle of selecting the reference point is that the data of the point is complete and located in the central area of the greenhouse space field, so that the missing data of other sampling points can be interpolated.
[0086] (3) Calculate the spatial distance between each sampling point and the reference point, determine the weight attenuation function based on the spatial distance, and generate a normalized weight matrix.
[0087] Specifically, let the coordinates of the reference point be (x0, y0, z0), and the coordinates of a sampling point be (x i ,y i ,z i ), the spatial distance d between the two points i It can be calculated by the following formula:
[0088]
[0089] Among them, d i Indicates the spatial distance between the sampling point and the reference point;
[0090] According to the principle of geographical weighted regression, the closer the sampling points are, the greater the impact on the missing values, and the farther the sampling points are, the smaller the impact. The weight decay function adopts the form of Gaussian kernel function, and the specific expression is as follows:
[0091]
[0092] Among them, ω k is the weight of the sampling point, and h is the bandwidth parameter, which is used to control the decay speed of the weight. The choice of bandwidth parameter can be adjusted according to the actual size of the greenhouse space and the distribution density of sensors.
[0093] To ensure that the value range of the weight matrix is between 0 and 1, the weights of all sampling points are normalized. The normalization formula is:
[0094]
[0095] Among them, W i is the normalized weight, n is the total number of sampling points, Sum the weights of all sample points.
[0096] (3) Use the spatial weight matrix to interpolate and fill in missing data.
[0097] According to the weight relationship between the target point A and each reference sampling point, a geographically weighted regression model is constructed, with the temperature of the target point A as the independent variable and the temperature of the reference sampling point as the dependent variable. Finally, the indoor environmental parameter filling value T of sampling point A is A It can be expressed as:
[0098]
[0099] Among them, T i is the known indoor environmental parameter value of the i-th sampling point, W i is the normalized weight of the sampling point, α·(z A -z0) is the height error term. Considering the characteristic that the temperature in the greenhouse space increases with the increase of height, the height error term is introduced in the interpolation calculation for correction; α is the gradient coefficient of temperature change with height, which can be obtained by fitting historical data.
[0100] Through the above-mentioned preprocessing process, the present invention can effectively repair the missing values of the environmental acquisition parameters in the greenhouse and maintain the spatial consistency and temporal continuity of the data, especially in the scenario where the greenhouse space layout and environmental factors are highly dynamically changing, which significantly improves the data integrity and the prediction accuracy of the model.
[0101] like Figure 6As shown, the equipment works in different states, and the greenhouse climate input of the simulation model is the same. Therefore, when establishing the simulation model, the model establishes corresponding sub-simulation models for various working states of the control equipment under the influence of the climate environment. Then the greenhouse environment simulation model is a collection of simulation sub-models under different working states. Specifically, the construction method of the greenhouse environment simulation sub-model includes:
[0102] S1. Obtain the current control device operation data, determine the working state combination of the control device, and obtain the corresponding environmental parameter data according to the working state combination of the control device, which is divided into training data and test data; among them, the training data is used for model construction and training, and the test data is used to verify the simulation accuracy of the model.
[0103] S2. Preprocess the environmental parameter data. Clean and fill the data before model training to ensure data integrity, consistency and normalization. The outdoor environmental parameter data is processed by data cleaning and normalization, and the indoor environmental parameter data is interpolated and filled using the GWR algorithm.
[0104] S3. Based on the preprocessed environmental parameter data, a greenhouse environment simulation sub-model is constructed using a BP neural network, and the simulation sub-model is trained based on the training data.
[0105] Specifically, a greenhouse environment simulation sub-model is constructed based on the BP neural network. Its structure includes an input layer, a hidden layer, and an output layer. The input layer includes all environmental parameters (such as outdoor temperature and humidity, light radiation, etc.) and the state combination of control devices (such as the switch state vector of devices such as fans and skylights). The number of input layer nodes is the sum of the environmental parameter dimension and the control device working state dimension. Hidden layer: The number of hidden layer nodes is determined according to the empirical formula, which is:
[0106]
[0107] Where n is the number of input nodes, l is the number of output nodes, and μ is a regulation constant (generally 1-10). The specific number of hidden layers can be selected as a single hidden layer or a multi-hidden layer structure according to the complexity of the greenhouse environment.
[0108] During the network training process, the input layer receives processed training data, including greenhouse environmental parameters and control equipment working state combinations. In each iteration of training, the network performs calculations through forward propagation. After the forward propagation is completed, the network output value is compared with the actual value in the training data to calculate the prediction error; through the error back propagation algorithm, the weights and biases of each layer in the network are adjusted by gradient descent according to the error. The training process is carried out through multiple iterations until the network error function E converges or reaches the preset number of training times. After the training is completed, the optimized network model parameters are saved to form a greenhouse environment simulation sub-model under the current control equipment state combination.
[0109] S4. Use test data to verify the simulation accuracy of the simulation sub-model, optimize the model parameters by calculating the error between the predicted value and the measured value, and output the greenhouse environment simulation sub-model.
[0110] Specifically, the execution process of the prediction unit includes:
[0111] X1. Obtain the current control device operation data, determine the working state combination of the control device, obtain the corresponding indoor environment parameter data according to the working state combination of the control device, and preprocess the indoor environment parameter data, wherein the preprocessing process is the same as the preprocessing method of the data processing unit;
[0112] X2. Input the preprocessed indoor environment parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status combination of the control equipment, and predict the indoor environment parameter prediction data at the future moment.
[0113] It should be noted that, in one embodiment, the greenhouse environment simulation model constructed by the present invention can be a greenhouse environment simulation model based on a single environmental parameter, which predicts the change trend of the environmental parameter at multiple locations in the greenhouse. The input data of the model comes from the greenhouse environmental parameter data, and is mainly used to analyze and predict the changes of a single environmental parameter at different locations in the greenhouse, providing support for local environmental control. For example, a greenhouse temperature simulation model can simulate temperatures at different levels, or a greenhouse humidity simulation model, or a greenhouse light radiation simulation model, or a greenhouse carbon dioxide simulation model.
[0114] In another embodiment, the greenhouse environment simulation model constructed by the present invention can be a unified model of a greenhouse under different meteorological, environmental, and control conditions. Different from the greenhouse environment simulation model of a single environmental parameter, in the modeling stage, outdoor environmental parameter data, indoor environmental parameter data, and control plane are used as inputs to the modeling network, and the actual test values of the greenhouse are used as the true values of the modeling network to complete laboratory simulation and verification of the modeling network.
[0115] Based on the acquired control device working state combination S, the simulation sub-model that best matches the current state is selected in the unified greenhouse environment simulation model. Each greenhouse environment simulation sub-model is trained and optimized only for a specific control device state combination, and can more accurately reflect the changing law of indoor environmental parameters under this state. The predicted value of the indoor environmental parameters at a certain moment in the future is calculated by the greenhouse environment simulation sub-model. Specifically, it includes the indoor air temperature, humidity, light radiation and carbon dioxide concentration at the future moment. The prediction time interval can be flexibly adjusted according to actual needs. For example, the indoor environmental parameters can be predicted 1 minute later, 5 minutes later or 10 minutes later to provide decision support.
[0116] Through the execution of the prediction unit, the present invention can achieve short-term accurate prediction of greenhouse environmental parameters, dynamically combine the operating status of the current control equipment, select the most suitable simulation sub-model, and accurately infer future environmental change trends. This method significantly improves the accuracy and reliability of the greenhouse environment simulation system, and at the same time provides efficient data support for the intelligent control of the greenhouse internal environment.
[0117] Preferably, if Figure 7 As shown, the execution process of the control instruction forming unit is as follows:
[0118] A1. Initialize the working status combination of the current control device.
[0119] The control system monitors the working status of the greenhouse fans, skylights, sunshade nets, side windows, air conditioners and other control devices in real time, and maps the status of each device into a binary variable s j Indicates that s j =1 means that device j is in working state (on), s j = 0 means the device j is in the non-working state (off). All device state combinations are represented by vector S, that is: S = [s1, s2, ..., s m ], where m is the total number of control devices.
[0120] If the current system has no equipment operation records, a default initial state combination is generated based on historical data, or all equipment is defaulted to be in a non-working state (off).
[0121] The system also initializes the time range [k+1, k+2, …, k+N] that needs to be optimized, takes predicting the indoor environmental parameters at N future moments as the optimization goal, and clarifies the data input range required for optimization.
[0122] A2. Based on the deviation between the indoor environmental parameter prediction data at the future moment and the set indoor environmental parameter data target value, combined with the equipment energy consumption under the current working state combination of the control equipment, an objective function is constructed.
[0123] The objective function combines the environmental control goal with the energy consumption optimization goal. Its core is to minimize the deviation between the future environmental prediction value and the target value by optimizing the state combination of the control equipment, while reducing the total energy consumption of the equipment operation. The calculation formula of the objective function is as follows:
[0124]
[0125] Where k is the current moment; i is the number of future time steps, i is between k and N, that is, starting from the current moment k, the data of the next N time steps are predicted; x(k+i|k) is the predicted data of the indoor environment parameters at the future moment, that is, under the condition of the current moment k, the predicted indoor environment parameter value at the future k+i moment; x set (k+i) is the target value of the indoor environment parameter data at the set time k+i; α j (k+i-1) is the on state of the j-th control device at time k+i-1, and its value is 0 or 1, 1 means on, 0 means off; u j is the energy consumption of the jth control device when one sampling cycle is started; λ is the weighted coefficient of the control quantity, which is used to balance the weights of environmental parameter deviation and device energy consumption in the objective function; m is the total number of control devices; N is the time range for prediction and control, that is, the optimization target within the next N time steps starting from the current time k; ||x(k+i|k)-x set (k+i)|| 2 It represents the sum of squares of deviations between the predicted environmental parameter value and the target value at the future time k+i; It represents the sum of the squares of the energy consumption of all control devices at the future time k+i-1, and adjusts its weight in the objective function through the weighting coefficient λ.
[0126] A3. Use an intelligent optimization algorithm, take the initialized working state combination of the control device as the starting point, iteratively optimize the objective function, and adjust the working state combination of the control device. The intelligent optimization algorithm is any one of the genetic algorithm and the particle swarm optimization algorithm. The genetic algorithm gradually searches for a better working state combination of the control device through population evolution operations (selection, crossover, mutation); the particle swarm algorithm performs global and local searches through the speed and position update strategy of the particle group to quickly search for the optimal working state combination of the control device.
[0127] In one embodiment, the specific iterative optimization process is as follows:
[0128] B1. Generate an initial solution group using the current device state combination as the starting point;
[0129] B2, the prediction unit matches the corresponding greenhouse environment sub-model M(s) according to the current working state of the control device, and predicts the environmental parameters at the future time under the current device state;
[0130] B3. Evaluate the comprehensive effect on the predicted environmental deviation and energy consumption based on the predicted results and the set environmental target values;
[0131] B4. Adjust the control device state combination through the crossover mutation of genetic algorithm or the speed and position update mechanism of particle swarm algorithm;
[0132] B5. In each iteration, the device state combination is continuously updated to optimize the objective function value J and gradually approach the optimal solution.
[0133] When executing an optimization algorithm (such as a genetic algorithm or a particle swarm optimization algorithm), it is considered that the working state combination of the control device will be continuously adjusted in each round of iteration. Each adjusted state combination may correspond to a new operating scenario, and its environmental prediction characteristics will also change accordingly. Therefore, after each adjustment of the working state of the control device, it is necessary to dynamically select the corresponding greenhouse environment simulation sub-model based on the latest working state combination of the control device to obtain the future environmental parameter prediction results under the current working state combination of the control device. The details are as follows:
[0134] C1, using the current device state combination S as the starting point to generate an initial solution group;
[0135] C2, the prediction unit predicts the future environmental parameters x(k+i|S) under the current device state according to the current control device working state combination;
[0136] C3. Calculate the objective function value J(S) based on the prediction results and the set environmental target value to evaluate the fitness of the current equipment state combination S as the basis for the optimization algorithm to adjust the state;
[0137] C4. Based on the evaluation of the objective function, the working state of the current equipment is adjusted through an intelligent optimization algorithm (genetic algorithm or particle swarm algorithm) to generate a new control equipment working state combination S′;
[0138] C5. The prediction unit dynamically matches the corresponding greenhouse environment simulation sub-model M(S′) according to the adjusted control device working state combination S′, and outputs a new predicted future time environmental parameter x(k+i|S′);
[0139] C6. Calculate a new objective function value J(S′) based on the new prediction result and the set environmental target value;
[0140] C7. Until the iteration termination condition is met, if not, repeat steps C4-C6.
[0141] A4. Set the iteration termination condition, terminate the optimization after the iteration termination condition is met, output the working state of the optimal control device, and generate the corresponding control instructions based on the optimal solution.
[0142] The iteration termination condition is any of the following: ① the maximum number of iterations is reached; ② the change in the objective function value of the current round is less than the set threshold.
[0143] After the optimization is terminated, the model outputs the optimal control device working state combination, generates corresponding control instructions based on the optimal control device working state combination, and outputs them to the greenhouse environment control system. The greenhouse environment control system dynamically adjusts the current control device working state combination based on the optimal control device working state combination.
[0144] Through dynamic matching and optimization of the control equipment state combination, efficient, accurate and energy-saving greenhouse environmental control is achieved. On the basis of accurately predicting future environmental parameters, it ensures that equipment operation meets environmental goals while achieving the lowest energy consumption, providing an intelligent control solution for modern greenhouses.
[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A greenhouse space environment simulation system based on machine learning, characterized in that: include: A data acquisition module, used to collect environmental parameter data and control device operation data, wherein the control device operation data includes a combination of working states of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data; A data processing cloud platform is connected to the data acquisition module for processing the collected environmental parameter data and control device status data and generating a greenhouse environment simulation model, simulating the greenhouse environment using the greenhouse environment simulation model, and dynamically generating operating instructions for the control device according to the simulation data and the optimization algorithm to regulate the working status of the control device; The data processing cloud platform includes: A data processing unit, used for preprocessing the collected environmental parameter data; A model training unit is used to train and generate multiple greenhouse environment simulation sub-models using the pre-processed environmental parameter data, each simulation sub-model corresponds to a working state combination, and all greenhouse environment simulation sub-models constitute a greenhouse environment simulation model; A prediction unit is used to select a corresponding simulation sub-model according to the working state combination of the current control device, and input the current indoor environment parameter data into the selected simulation sub-model to obtain the indoor environment parameter prediction data at a future moment; A control instruction forming unit is used to generate the optimal working state of the control device by using an optimization algorithm according to the indoor environment parameter prediction data at a future moment and the working state of the current control device, and to form a corresponding switch instruction; The greenhouse environment control system is connected to the data processing cloud platform for regulating the working state of the control equipment according to the switch instructions.
2. A greenhouse space environment simulation system based on machine learning as claimed in claim 1, characterized in that: The data acquisition module includes: Weather station sensors, used to collect data on outdoor environmental parameters; Environmental sensors in the greenhouse are used to collect environmental parameter data at different locations; the environmental sensors in the greenhouse include temperature sensors, humidity sensors, light radiation sensors and carbon dioxide sensors. The greenhouse is divided into several layers in the longitudinal direction, and each layer is provided with several temperature sensors and humidity sensors. The light radiation sensors and carbon dioxide sensors are provided on the top layer of the greenhouse; Control device sensors are used to collect control device operation data.
3. A greenhouse space environment simulation system based on machine learning as claimed in claim 1, characterized in that: The control equipment includes fans, skylights, side windows, sunshades and air conditioners. The working status combination of the control equipment is expressed by the following formula: S={(s1,s2,s3,s4,s5)|s i ∈{0,1},i=1,2,3,4,5} Among them, s1 represents the fan, s2 represents the skylight, s3 represents the side window, s4 represents the sunshade net, s5 represents the air conditioner, 0 represents off, and 1 represents on.
4. The greenhouse space environment simulation system based on machine learning according to claim 1, characterized in that: When collecting environmental parameter data, the data acquisition module first collects the operating data of the control device, determines the working state combination of the control device, and then collects the environmental parameter data under the working state combination of the control device. After collecting the environmental parameter data, the working state combination of the control device and the corresponding environmental parameter data are matched into groups for storage, wherein the environmental parameter data includes: Outdoor environmental parameter data: including wind force, wind speed, light radiation, rainfall, air temperature, air humidity and carbon dioxide concentration; Indoor environmental parameter data: including air temperature, air humidity, light radiation and carbon dioxide concentration at different locations.
5. A greenhouse space environment simulation system based on machine learning as claimed in claim 4, characterized in that: The preprocessing of the collected environmental parameter data specifically includes: data cleaning and normalization processing for outdoor environmental parameter data, and spatial interpolation filling for indoor environmental parameters using the GWR algorithm, wherein the GWR algorithm fills missing values including the following steps: (1) Establish a three-dimensional coordinate system for greenhouse space sampling points, determine the spatial position coordinates of each sensor sampling point, and select reference sampling points with complete data as reference points; (2) Calculate the spatial distance between each sampling point and the reference point, determine the weight attenuation function based on the spatial distance, and generate a normalized weight matrix; (3) Use the spatial weight matrix to interpolate and fill in missing data.
6. A greenhouse space environment simulation system based on machine learning as claimed in claim 4, characterized in that: The execution process of the prediction unit includes: X1. Obtain the current control device operation data, determine the working state combination of the control device, obtain the corresponding indoor environment parameter data according to the working state combination of the control device, and pre-process the indoor environment parameter data; X2. Input the preprocessed indoor environment parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status combination of the control equipment, and predict the indoor environment parameter prediction data at the future moment.
7. A greenhouse space environment simulation system based on machine learning as claimed in claim 6, characterized in that: The execution process of the control instruction forming unit is as follows: A1. Initialize the working state combination of the current control device; A2. Based on the deviation between the indoor environment parameter prediction data at the future moment and the set indoor environment parameter data target value, combined with the device energy consumption under the current working state combination of the control device, an objective function is constructed; A3. Using an intelligent optimization algorithm, taking the initialized working state combination of the control device as the starting point, iteratively optimizing the objective function, and adjusting the working state combination of the control device, the intelligent optimization algorithm being any one of a genetic algorithm and a particle swarm optimization algorithm; A4. Set the iteration termination condition, terminate the optimization after the iteration termination condition is met, output the working state of the optimal control device, and generate the corresponding control instructions based on the optimal solution.
8. A greenhouse space environment simulation system based on machine learning as claimed in claim 7, characterized in that: In step A2, the calculation formula of the objective function is: Where k is the current moment; i is the number of future time steps, and i is between k and N; x(k+i|k) is the predicted data of indoor environmental parameters at future moments; x set (k+i) is the target value of the indoor environment parameter data at the set time k+i; α j (k+i-1) is the on state of the j-th control device at time k+i-1, and its value is 0 or 1, 1 means on, 0 means off; u j is the energy consumption of the jth control device when one sampling cycle is started; λ is the weighting coefficient of the control quantity; m is the total number of control devices; N is the time range of prediction and control; ||x(k+i|k)-x set (k+i)|| 2 It represents the sum of squares of deviations between the predicted environmental parameter value and the target value at the future time k+i; It represents the sum of squares of energy consumption of all control devices at the future time k+i-1, and adjusts its weight in the objective function through the weighting coefficient λ.
9. The greenhouse space environment simulation system based on machine learning as claimed in claim 1, characterized in that: The connection method between the greenhouse environment control system and the data processing cloud platform includes any one of HTTP protocol, HTTPS protocol, TCP protocol and modbus protocol.
10. The greenhouse space environment simulation system based on machine learning according to claim 1, characterized in that: The construction method of the greenhouse environment simulation sub-model includes: S1. Obtain the current control device operation data, determine the working state combination of the control device, and obtain the corresponding environmental parameter data according to the working state combination of the control device, which is divided into training data and test data; S2, preprocessing environmental parameter data; S3, based on the preprocessed environmental parameter data, using BP neural network to build a greenhouse environment simulation sub-model, and training the simulation sub-model based on training data; S4. Use test data to verify the simulation accuracy of the simulation sub-model, optimize the model parameters by calculating the error between the predicted value and the measured value, and output the greenhouse environment simulation sub-model.
Citation Information
Patent Citations
Greenhouse data synchronous simulation system and method based on cloud calculation
CN113283165A
Indoor environment comfort degree adjusting method and system based on deep learning
CN113485498A
Greenhouse environment control system
CN114489200A
Intelligent planting environment control system and method based on multi-network fusion and plant photosynthesis feedback
CN116224870A
Clean air conditioner control method based on neural network and MPC algorithm
CN118640562A
Cited By
Mechanical cold and cold release cooperative control system under greenhouse variable flow system
CN121501068A
Greenhouse environment man-machine cooperation optimal control system
CN121832670A