A machine learning based greenhouse space field environment simulation system
The greenhouse space field environment simulation system based on machine learning solves the problems of low model accuracy and high energy consumption in greenhouse environment control, realizes high-precision environmental simulation and dynamic control, and supports the development of smart agriculture.
Patent Information
- Application Number
- CN202411917662.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing greenhouse environmental control technologies suffer from low model accuracy, simplistic control strategies, and insufficient energy consumption optimization, resulting in inadequate environmental control precision and excessive energy consumption, which fails to meet the needs of smart agriculture.
A greenhouse space field environment simulation system based on machine learning is adopted. Through data acquisition modules, data processing cloud platforms, and greenhouse environment control systems, it can accurately collect, process, and simulate environmental parameters. Combined with intelligent optimization algorithms, it can dynamically generate the working status of control equipment, construct multiple greenhouse environment simulation sub-models, and carry out dynamic intelligent control.
It enables high-precision simulation and dynamic control of the greenhouse environment, improves resource utilization efficiency, reduces energy consumption, ensures the accuracy and real-time nature of environmental control, and supports the development of smart agriculture.
Smart Images

Figure CN119781553B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology for greenhouse environments, and in particular to a greenhouse space environment simulation system based on machine learning. Background Technology
[0002] With the rapid development of modern agriculture, greenhouse cultivation technology has played a crucial role in increasing crop yields, optimizing resource utilization, and coping with complex climatic conditions. Currently, domestic research on the main branches of greenhouse environment models has been conducted, with corresponding models established and simulation studies carried out. These include models of light intensity, heat transfer through the greenhouse covering, soil heat transfer, mechanical and natural ventilation, water vapor transfer within the greenhouse, and humidity. However, these studies have focused heavily on the relationship between greenhouse structure and the environment, with limited research on the differences in the spatial environment within greenhouses. This fails to meet the environmental needs for crop phenotyping or the requirements of digital greenhouse environments. Therefore, establishing digital greenhouse environment models to study the evolution of the greenhouse environment in relation to space and time is an urgent need for promoting the development of smart agriculture.
[0003] However, current greenhouse environmental control technologies rely on simple rule-based control or empirical judgment, and this traditional model exposes significant technical shortcomings under complex and ever-changing environmental conditions. First, in terms of environmental parameter acquisition and processing, traditional systems rely on only a small number of sensors, resulting in limited data types and uneven distribution, failing to fully capture the environmental spatial characteristics within the greenhouse. Furthermore, the collected data often contains missing or outlier values, affecting the model's predictive performance. Second, existing greenhouse environmental simulation models typically use linear regression or empirical formulas for modeling, making it difficult to describe the complex nonlinear coupling relationships between factors such as temperature, humidity, light intensity, and carbon dioxide concentration, leading to low prediction accuracy. Third, in terms of equipment control, traditional control strategies mostly employ static threshold rules, unable to dynamically adapt to future environmental changes, resulting in insufficient control precision and increased equipment operating costs. In addition, the optimization of control equipment energy consumption has long been neglected, causing excessive energy consumption and impacting the system's economic viability and sustainability. 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 this invention is implemented as follows: This invention provides a greenhouse space field environment simulation system based on machine learning, comprising:
[0006] The data acquisition module is used to collect environmental parameter data and control equipment operation data. The control equipment operation data includes a combination of the working status of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data.
[0007] The data processing cloud platform is connected to the data acquisition module and is used to process the collected environmental parameter data and control equipment status data to generate a greenhouse environment simulation model. The greenhouse environment is simulated using the greenhouse environment simulation model, and the operating instructions of the control equipment are dynamically generated based on the simulation data and optimization algorithm to regulate the working status of the control equipment.
[0008] The data processing cloud platform includes:
[0009] The data processing unit is used to preprocess the collected environmental parameter data;
[0010] The model training unit is used to train and generate multiple greenhouse environment simulation sub-models using preprocessed environmental parameter data. Each simulation sub-model corresponds to a combination of working states, and all greenhouse environment simulation sub-models constitute the greenhouse environment simulation model.
[0011] The prediction unit is used to select the corresponding simulation sub-model based on the current operating status of the control equipment, and input the current indoor environmental parameter data into the selected simulation sub-model to obtain the predicted indoor environmental parameter data for future times.
[0012] The control command generation unit is used to generate the optimal operating state of the control equipment based on the combination of predicted indoor environmental parameters for future times and the current operating state of the control equipment using an optimization algorithm, and to generate corresponding switching commands.
[0013] The greenhouse environment control system communicates with the data processing cloud platform and is used to adjust the working status of the control equipment according to the switching commands.
[0014] Based on the above technical solutions, the preferred data acquisition module includes:
[0015] Weather station sensors are used to collect outdoor environmental parameter data;
[0016] The greenhouse environment sensors are used to collect environmental parameter data at different locations. The greenhouse environment sensors include temperature sensors, humidity sensors, light radiation sensors and carbon dioxide sensors. The greenhouse is divided into several layers along the longitudinal direction. Each layer is equipped with several temperature sensors and humidity sensors. The light radiation sensors and carbon dioxide sensors are installed on the top layer of the greenhouse.
[0017] Control equipment sensors are used to collect operating data from control equipment.
[0018] Based on the above technical solutions, preferably, the control equipment includes a fan, skylight, side window, sunshade net, and air conditioner. The combination of operating states of the control equipment is expressed by the following formula:
[0019] S={(s1,s2,s3,s4,s5)|s i ∈{0,1},i=1,2,3,4,5}
[0020] In this context, 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] Based on the above technical solutions, preferably, when the data acquisition module collects environmental parameter data, it first collects the operating data of the control equipment to determine the combination of operating states of the control equipment, and then collects the environmental parameter data under the combination of operating states of the control equipment. After collecting the environmental parameter data, the combination of operating states of the control equipment is matched with the corresponding environmental parameter data and stored in groups. The environmental parameter data includes:
[0022] Outdoor environmental parameters include wind force, wind speed, solar radiation, rainfall, air temperature, air humidity, and carbon dioxide concentration.
[0023] Indoor environmental parameters include air temperature, air humidity, light radiation, and carbon dioxide concentration at different locations.
[0024] Based on the above technical solutions, the preferred method for preprocessing the collected environmental parameter data specifically includes: data cleaning and normalization of outdoor environmental parameter data, and spatial interpolation filling of indoor environmental parameters using the GWR algorithm. The GWR algorithm for filling missing values includes the following steps:
[0025] (1) Establish a three-dimensional coordinate system for greenhouse space sampling points, determine the spatial location coordinates of each sensor sampling point, and select a reference sampling point with complete data as the benchmark point.
[0026] (2) Calculate the spatial distance between each sampling point and the reference point, determine the weight decay function based on the spatial distance, and generate a normalized weight matrix;
[0027] (3) Use the spatial weight matrix to interpolate and fill in the missing data.
[0028] Based on the above technical solutions, preferably, the execution process of the prediction unit includes:
[0029] X1. Obtain the current operating data of the control equipment, determine the combination of the working states of the control equipment, obtain the corresponding indoor environmental parameter data according to the combination of the working states of the control equipment, and preprocess the indoor environmental parameter data.
[0030] X2. Input the preprocessed indoor environmental parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status of the control equipment, and predict the indoor environmental parameter prediction data at future times.
[0031] Based on the above technical solutions, the preferred execution process of the control instruction forming unit is as follows:
[0032] A1. Initialize the current operating state combination of the controlled device;
[0033] A2. Based on the deviation between the predicted indoor environmental parameters at future times and the set target values of the indoor environmental parameters, and combined with the energy consumption of the equipment under the current working state combination of the control equipment, construct the objective function;
[0034] A3. Using an intelligent optimization algorithm, starting from the initial combination of working states of the control equipment, iteratively optimize the objective function and adjust the combination of working states of the control equipment. The intelligent optimization algorithm is either a genetic algorithm or 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 command based on the optimal solution.
[0036] Based on the above technical solutions, preferably, in step A2, the formula for calculating the objective function is as follows:
[0037]
[0038] Where k is the current time; i is the future time step, with i ranging from k to N; x(k+i|k) is the predicted indoor environmental parameter data for the future time step; x set (k+i) represents the target value of the indoor environmental parameter data at time k+i; α j (k+i-1) represents the on / off state of the j-th control device at time k+i-1, taking a value of 0 or 1, where 1 indicates on and 0 indicates off; u j Energy consumption for starting one sampling cycle for the j-th control device; λ is the weighting coefficient of the control quantity; m is the total number of control devices; N is the time range for prediction and control; ||x(k+i|k)-x set (k+i)|| 2 This represents the sum of squared deviations between the predicted environmental parameter values and the target values at future time k+i; It represents the sum of squared energy consumption of all control devices at future time k+i-1, and its weight in the objective function is adjusted by the weighting coefficient λ.
[0039] Based on 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 following protocols: HTTP, HTTPS, TCP, and Modbus.
[0040] Based on the above technical solutions, the preferred method for constructing a greenhouse environment simulation sub-model includes:
[0041] S1. Obtain the current operating data of the control equipment, determine the combination of the working states of the control equipment, and obtain the corresponding environmental parameter data based on the combination of the working states of the control equipment, which is divided into training data and test data.
[0042] S2. Preprocess the environmental parameter data;
[0043] 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.
[0044] S4. Verify the simulation accuracy of the simulation sub-model using test data, 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 machine learning-based greenhouse space environment simulation system of the present invention has the following advantages over the prior art:
[0046] (1) By collecting environmental parameter data inside and outside the greenhouse and the working status information of control equipment, and combining the simulation capabilities of various 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 scheme, the accuracy and real-time performance of greenhouse environment control can be effectively improved, resource utilization efficiency can be increased, and reliable technical means can be provided for greenhouse management and crop yield improvement in smart agriculture.
[0047] (2) A hierarchical modeling approach was adopted, and an overall environmental simulation model was constructed by multiple sub-models trained based on BP neural network. This enabled accurate prediction of the changing trends of environmental parameters (such as air temperature and humidity) in the greenhouse under different conditions, effectively solving the nonlinear and complex relationship problems in environmental prediction, ensuring the high accuracy of the prediction results, and providing accurate data support for subsequent equipment control optimization.
[0048] (3) By using intelligent optimization algorithms, the solution with the minimum objective function value is found among various combinations of working states of greenhouse control equipment, which can minimize equipment energy consumption while meeting the requirements of set environmental parameters. Compared with traditional manual control or simple logic rule control methods, this solution automatically selects the combination of working states of control equipment through algorithm optimization, which greatly reduces energy consumption and improves control efficiency;
[0049] (4) The geographically weighted regression algorithm effectively solved the problem of data loss that may occur in greenhouse environmental data collection. The normalization process improved the accuracy of data modeling and the generalization ability of the model. It not only overcame the problem of incomplete environmental data caused by sensor anomalies or external interference during data collection, but also ensured high-quality data input and improved the stability of greenhouse environmental simulation model. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a structural diagram of the greenhouse space field environment simulation system based on machine learning according to the present invention;
[0052] Figure 2 This is a system architecture diagram of the greenhouse environment of the present invention;
[0053] Figure 3 This is a diagram illustrating the structure of the meteorological station measurement system of this invention.
[0054] Figure 4 This is an example of a greenhouse temperature and humidity sensor array and view according to an embodiment of the present invention;
[0055] Figure 5 This is a sensor slice model after the decomposition of the greenhouse space according to an embodiment of the present invention;
[0056] Figure 6 This is a diagram of the greenhouse environment simulation model of the present invention;
[0057] Figure 7 This is a flowchart illustrating the execution process of the control instruction forming unit of the present invention. Detailed Implementation
[0058] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort 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 field environment simulation system based on machine learning, comprising:
[0060] The data acquisition module is used to collect environmental parameter data and control equipment operation data. The control equipment operation data includes a combination of the working status of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data.
[0061] The data processing cloud platform is connected to the data acquisition module and is used to process the collected environmental parameter data and control equipment status data to generate a greenhouse environment simulation model. The greenhouse environment is simulated using the greenhouse environment simulation model, and the operating instructions of the control equipment are dynamically generated based on the simulation data and optimization algorithm to regulate the working status of the control equipment.
[0062] The greenhouse environment control system communicates with the data processing cloud platform and is used to adjust the working status of the control equipment according to the switching commands.
[0063] This invention provides a greenhouse space environment simulation system based on machine learning. Through a full-process architecture of data acquisition, simulation modeling, predictive analysis and intelligent optimization control, it achieves high-precision simulation and dynamic regulation of the greenhouse environment.
[0064] Preferably, the data acquisition module includes a weather station sensor, a greenhouse environment sensor, and a control equipment sensor. When collecting environmental parameter data, the data acquisition module first collects the control equipment operation data to determine the combination of operating states of the control equipment, and then collects the environmental parameter data under the combination of operating states of the control equipment. After collecting the environmental parameter data, the control equipment operating state combination and the corresponding environmental parameter data are matched and stored in groups.
[0065] like Figure 3As shown, the weather station sensors are used to collect outdoor environmental parameter data, including but not limited to wind force, wind speed, solar radiation, rainfall, air temperature, air humidity, and carbon dioxide concentration. By deploying the weather station sensors outside the greenhouse, changes in external weather conditions can be monitored in real time. These sensors include temperature sensors, solar radiation sensors, humidity sensors, carbon dioxide sensors, wind speed sensors, wind direction sensors, and rainfall sensors. The system adopts an integrated approach, connecting the various weather station sensors via RS-485. After collecting the aforementioned outdoor environmental parameter data, the sensors transmit the data to the cloud via 4G / 5G modules. The weather station sensors are installed on the greenhouse roof and can be powered by either solar energy or conventional mains power, extending the weather station's operating time.
[0066] The greenhouse's environmental sensors are used to collect indoor environmental parameter data at different locations, while the control equipment sensors are used to collect data on the operation of the control equipment. The greenhouse's environmental sensors include temperature sensors, humidity sensors, light radiation sensors, and carbon dioxide sensors. The greenhouse is divided into several layers along its length, with several temperature and humidity sensors installed on each layer. The light radiation and carbon dioxide sensors are located on the top layer of the greenhouse.
[0067] In one embodiment, such as Figure 4 and Figure 5 As shown, the greenhouse environmental spatial information settings are as follows: the greenhouse length × width × height are 19.2m × 12m × 5.3m; the distances from the east wall in the east-west direction (length direction) are 2m, 7m, 12m, and 17m, and the distances from the south wall in the north-south direction are 2m, 6m, and 10m, with heights of 0.5m, 1.5m, 2.5m, 3.5m, and 4.5m respectively, with a total of 60 data collection points, collecting 6 points of light radiation from the crop layer and 6 points of carbon dioxide concentration.
[0068] Sensors are used to collect operational status data from control equipment within the greenhouse, including fans, skylights, side windows, shading nets, and air conditioners. Each control device has two operating states: on and off. Sensors monitor the operational status of each device in real time and convert it into a standardized binary state vector representation. For example, the on / off state of a fan can be represented as "1" or "0". The combined states of all control devices form a multi-dimensional vector describing the current control conditions of the greenhouse.
[0069] Specifically, the combination of operating states of the control equipment is represented by the following formula:
[0070] S={(s1,s2,s3,s4,s5)|s i ∈{0,1},i=1,2,3,4,5}
[0071] In this context, 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 environmental control system can read and write control devices including: skylights, side windows, fans, shading nets, and air conditioners. The connection methods between the greenhouse environmental control system and the control devices include, but are not limited to, any one of the following protocols: HTTP, HTTPS, TCP, and Modbus.
[0073] The system of this invention comprehensively collects indoor and outdoor environmental parameters and operational status data of the control equipment through meteorological station sensors, greenhouse environment sensors, and control equipment sensors. By employing a layered, multi-point sensor deployment, it accurately monitors parameters such as temperature, humidity, light radiation, and carbon dioxide concentration at different locations within the greenhouse, while simultaneously acquiring real-time combinations of control equipment operating statuses. By matching and storing control equipment statuses with corresponding environmental parameter data in groups, the system ensures data correlation and integrity, providing a high-quality data foundation for subsequent modeling and optimization.
[0074] Preferably, the data processing cloud platform includes:
[0075] The data processing unit is used to preprocess the collected environmental parameter data;
[0076] The model training unit is used to train and generate multiple greenhouse environment simulation sub-models using preprocessed environmental parameter data. Each simulation sub-model corresponds to a combination of working states, and all greenhouse environment simulation sub-models constitute the greenhouse environment simulation model.
[0077] The prediction unit is used to select the corresponding simulation sub-model based on the current operating status of the control equipment, and input the current indoor environmental parameter data into the selected simulation sub-model to obtain the predicted indoor environmental parameter data for future times.
[0078] The control command generation unit is used to generate the optimal operating state of the control equipment based on the combination of predicted indoor environmental parameters for future times and the current operating state of the control equipment using an optimization algorithm, and to generate corresponding switching commands.
[0079] Preferably, the collected environmental parameter data is preprocessed and classified according to different types of environmental parameter data, specifically including:
[0080] The raw data for outdoor environmental parameters (such as wind speed, wind force, and radiation) may contain significant outliers or inconsistent units. Therefore, data cleaning and normalization are performed on the outdoor environmental parameter data. Specifically, this includes:
[0081] 1.1 Perform outlier detection on outdoor environmental data and remove observations that do not meet the predetermined threshold range; for example, outlier cleaning of wind speed can define a limited range (such as 0-50m / s), and outliers outside the range will be considered invalid and removed.
[0082] 1.2 To reduce the impact of the dimensional differences of various outdoor parameters on model training, a normalization method is used to process each parameter.
[0083] Due to the dense distribution of indoor environmental sensors and the large number of sampling points, data such as greenhouse temperature and humidity may be missing at certain times or locations due to hardware wear and tear or interference. Therefore, the Geographically Weighted Regression (GWR) algorithm is used to fill in the spatial differences for indoor environmental parameters, including the following steps:
[0084] (1) Establish a three-dimensional coordinate system for the sampling points in the greenhouse space, determine the spatial coordinates of each sensor sampling point, and select a reference sampling point with complete data as the benchmark point.
[0085] The three-dimensional coordinate system of the greenhouse space field has its origin at the bottom left front corner of the greenhouse. The X-axis is defined 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 inside 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 sensors. A reference sampling point with complete data is selected as the benchmark point. The selection principle for the benchmark point is: the data of this point is complete and it is located in the central area of the greenhouse space field, so as to interpolate the missing data of other sampling points.
[0086] (3) Calculate the spatial distance between each sampling point and the reference point, determine the weight decay 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 certain sampling point be (x0, y0, z0). i ,y i ,z i The spatial distance d between two points i It can be calculated using the following formula:
[0088]
[0089] Where, d i This indicates the spatial distance between the sampling point and the reference point;
[0090] According to the principle of geographically weighted regression, closer sampling points have a greater impact on missing values, while farther sampling points have a smaller impact. The weight decay function adopts the form of a Gaussian kernel function, and its specific expression is as follows:
[0091]
[0092] Where, ω k Here, represents the weight of the sampling points, and h represents the bandwidth parameter, used to control the decay rate of the weights. The bandwidth parameter can be adjusted according to the actual size of the greenhouse space and the sensor distribution density.
[0093] To ensure that the values of the weight matrix are between 0 and 1, the weights of all sampling points are normalized. The normalization formula is as follows:
[0094]
[0095] Among them, W i The weights are the normalized weights, and n is the total number of sampling points. Sum the weights of all sampling points.
[0096] (3) Use the spatial weight matrix to interpolate and fill in the missing data.
[0097] Based on the weighted relationship between target point A and each reference sampling point, a geographically weighted regression model is constructed, with the temperature of target point A as the independent variable and the temperatures of the reference sampling points as the dependent variable. Finally, the indoor environmental parameter T of sampling point A is calculated. A It can be represented as:
[0098]
[0099] Among them, T i Let W be the known indoor environmental parameter value of the i-th sampling point. i The normalized weight for this sampling point is α·(z). A -z0) represents the height error term. Considering the characteristic that the temperature inside the greenhouse space increases with increasing height, the height error term is introduced into 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 preprocessing, the present invention can effectively repair missing values of environmental parameters collected in greenhouses, maintain spatial consistency and temporal continuity of data, and significantly improve data integrity and model prediction accuracy, especially in scenarios where greenhouse spatial layout and environmental factors are highly dynamic.
[0101] like Figure 6As shown, the external climate input to the greenhouse remains the same regardless of the equipment's operating state. Therefore, when establishing the simulation model, for each operating state of the control equipment under the influence of the climate environment, corresponding sub-simulation models are created. Thus, the greenhouse environment simulation model is a collection of simulation sub-models under different operating states. Specifically, the methods for constructing the greenhouse environment simulation sub-models include:
[0102] S1. Obtain the current operating data of the control equipment, determine the combination of the control equipment's working states, and obtain the corresponding environmental parameter data based on the combination of the control equipment's working states. This data is divided into training data and test data. The training data is used for model construction and training, while the test data is used to verify the simulation accuracy of the model.
[0103] S2. Preprocessing of environmental parameter data. Before model training, the data is cleaned and filled to ensure data integrity, consistency, and normalization. Outdoor environmental parameter data is cleaned and normalized, while 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 a BP neural network. Its structure includes an input layer, a hidden layer, and an output layer. The input layer includes all environmental parameters (e.g., outdoor temperature and humidity, light radiation) and combinations of control device states (e.g., on / off state vectors of fans, skylights, etc.). The number of nodes in the input layer is the sum of the environmental parameter dimension and the control device operating state dimension. The number of nodes in the hidden layer is determined using an empirical formula:
[0106]
[0107] Where n is the number of input nodes, l is the number of output nodes, and μ is an adjustment constant (generally ranging from 1 to 10). The specific number of hidden layers can be selected based on the complexity of the greenhouse environment, choosing either a single hidden layer or a multi-hidden layer structure.
[0108] During network training, the input layer receives processed training data, including greenhouse environmental parameters and combinations of control equipment operating states. In each training iteration, the network performs calculations through forward propagation. After forward propagation, the network output value is compared with the actual values in the training data to calculate the prediction error. Using the error backpropagation algorithm, gradient descent is applied to adjust the weights and biases of each layer in the network based on the error. The training process is repeated multiple times until the network's error function E converges or the preset number of training iterations is reached. After training, the optimized network model parameters are saved, forming a greenhouse environment simulation sub-model under the current control equipment state combination.
[0109] S4. Verify the simulation accuracy of the simulation sub-model using test data, 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 operating data of the control equipment, determine the combination of the working states of the control equipment, obtain the corresponding indoor environmental parameter data according to the combination of the working states of the control equipment, and preprocess the indoor environmental parameter data. The preprocessing process is the same as the preprocessing method of the data processing unit.
[0112] X2. Input the preprocessed indoor environmental parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status of the control equipment, and predict the indoor environmental parameter prediction data at future times.
[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, predicting the changing trend of that environmental parameter at multiple locations within the greenhouse. The input data of this model comes from greenhouse environmental parameter data and is mainly used to analyze and predict the changes of a single environmental parameter at different locations within the greenhouse, providing support for local environmental regulation. 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 the greenhouse under different meteorological, environmental and control conditions. Unlike the greenhouse environment simulation model with 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 measured value of the greenhouse is used as the true value of the modeling network to complete the laboratory simulation and verification of the modeling network.
[0115] Based on the acquired combination of control equipment operating states S, the simulation sub-model that best matches the current state is selected from a unified greenhouse environment simulation model. Each greenhouse environment simulation sub-model is trained and optimized only for a specific combination of control equipment states, which can more accurately reflect the changing patterns of indoor environmental parameters under that state. The predicted values of indoor environmental parameters at a future time are calculated through the greenhouse environment simulation sub-model. Specifically, these include the indoor air temperature, humidity, light radiation, and carbon dioxide concentration at the future time. The prediction time interval can be flexibly adjusted according to actual needs, for example, predicting indoor environmental parameters 1 minute, 5 minutes, or 10 minutes later to provide decision support.
[0116] By executing the prediction unit, this invention enables accurate short-term prediction of environmental parameters within a greenhouse. It dynamically combines the current operating status of the control equipment to select the most suitable simulation sub-model, accurately inferring future environmental trends. This method significantly improves the accuracy and reliability of greenhouse environment simulation systems, while providing efficient data support for intelligent control of the greenhouse environment.
[0117] Preferably, such as Figure 7 As shown, the execution process of the control instruction generation unit is as follows:
[0118] A1. Initialize the current working state combination of the control device.
[0119] The control system monitors the operating status of control equipment such as fans, skylights, shading nets, side windows, and air conditioners in the greenhouse in real time, and maps the status of each device to a binary variable s. j It means that s j =1 indicates that device j is in a working state (on), s j =0 indicates that device j is in a non-working state (off). All combinations of device states are represented by a vector S, i.e.: S = [s1, s2, ..., s...]. m ], where m is the total number of control devices.
[0120] If there are no device operation records in the current system, a default initial state combination will be generated based on historical data, or all devices will be in a non-working state (off) by default.
[0121] The system simultaneously initializes the time range [k+1,k+2,…,k+N] that needs to be focused on for optimization, with the goal of predicting indoor environmental parameters at N future times, and clarifies the data input range required for optimization.
[0122] A2. Based on the deviation between the predicted indoor environmental parameters at future times and the set target values of the indoor environmental parameters, and combined with the energy consumption of the equipment under the current working state combination of the control equipment, construct the objective function.
[0123] The objective function combines environmental control objectives with energy consumption optimization objectives. Its core is to optimize the state combinations of control equipment to minimize the deviation between future environmental predictions and target values, while simultaneously reducing the total energy consumption of equipment operation. The formula for calculating the objective function is as follows:
[0124]
[0125] Where k is the current time; i is the future time step, with a value between k and N, meaning the data for the next N time steps is predicted starting from the current time k; x(k+i|k) is the predicted indoor environmental parameter data for the future time, that is, the predicted indoor environmental parameter values for the next k+i time steps given the current time k; x set (k+i) represents the target value of the indoor environmental parameter data at time k+i; α j (k+i-1) represents the on / off state of the j-th control device at time k+i-1, taking a value of 0 or 1, where 1 indicates on and 0 indicates off; u j The energy consumption for starting one sampling cycle for the j-th control device; λ is the weighting coefficient of the control quantity, used to balance the weights of environmental parameter deviations 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, i.e., the optimization objective within N time steps from the current time k; ||x(k+i|k)-x set (k+i)|| 2 This represents the sum of squared deviations between the predicted environmental parameter values and the target values at future time k+i; It represents the sum of squared energy consumption of all control devices at future time k+i-1, and its weight in the objective function is adjusted by the weighting coefficient λ.
[0126] A3. Using an intelligent optimization algorithm, starting from the initial combination of operating states of the control equipment, iteratively optimize the objective function and adjust the combination of operating states of the control equipment. The intelligent optimization algorithm can be either a genetic algorithm or a particle swarm optimization algorithm. The genetic algorithm gradually finds a better combination of operating states of the control equipment through population evolution operations (selection, crossover, mutation); the particle swarm optimization algorithm performs global and local searches through the velocity and position update strategy of the particle swarm to quickly search for the optimal combination of operating states of the control equipment.
[0127] In one embodiment, the specific iterative optimization process is as follows:
[0128] B1. Starting with the current combination of device states, generate an initial solution group;
[0129] B2. The prediction unit combines and matches the corresponding greenhouse environment sub-model M(s) based on the current operating state of the control equipment, and predicts the environmental parameters at future times under the current equipment state.
[0130] B3. Based on the prediction results and the set environmental target values, evaluate its comprehensive effect on the prediction of environmental deviation and energy consumption;
[0131] B4. Adjust the combination of control device states through the crossover and mutation mechanism of genetic algorithm or the speed and position update mechanism of particle swarm algorithm;
[0132] B5. In each iteration, continuously update the device state combination, optimize the objective function value J, and gradually approach the optimal solution.
[0133] When executing optimization algorithms (such as genetic algorithms or particle swarm optimization), it's important to consider that the operating state combinations of the control equipment are continuously adjusted in each iteration. Each adjusted state combination may correspond to a new operating scenario, and its environmental prediction characteristics will change accordingly. Therefore, after each adjustment of the control equipment's operating state, it's necessary to dynamically select the corresponding greenhouse environment simulation sub-model based on the latest control equipment operating state combination to obtain the predicted future environmental parameters under the current control equipment operating state combination. Specifically:
[0134] C1. Starting from the current combination of device states S, generate an initial solution group;
[0135] C2. The prediction unit predicts the environmental parameters x(k+i|S) at future times under the current control device state based on the combination of the current control device working state.
[0136] C3. Based on the prediction results and the set environmental target values, calculate the objective function value J(S) to evaluate the fitness of the current equipment state combination S, and use it as the basis for the optimization algorithm to adjust the state.
[0137] C4. Based on the evaluation of the objective function, adjust the current working state of the device through an intelligent optimization algorithm (genetic algorithm or particle swarm algorithm) to generate a new combination of working states of the control device S′.
[0138] C5. The prediction unit dynamically matches the corresponding greenhouse environment simulation sub-model M(S′) based on the adjusted control equipment working state combination S′, and outputs new predicted environmental parameters x(k+i|S′) for future moments.
[0139] C6. Calculate the new objective function value J(S′) based on the new prediction results and the set environmental target values;
[0140] C7. Continue 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 command based on the optimal solution.
[0142] The iteration termination condition is any one 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 optimization is terminated, the model outputs the optimal combination of operating states of the control equipment, generates corresponding control commands based on the optimal combination of operating states of the control equipment, and outputs them to the greenhouse environment control system. The greenhouse environment control system dynamically adjusts the current combination of operating states of the control equipment based on the optimal combination of operating states of the control equipment.
[0144] By dynamically matching and optimizing the state combinations of control equipment, high efficiency, precision, and energy saving in greenhouse environmental control are achieved. Based on accurate prediction of future environmental parameters, the system ensures that equipment operation meets environmental objectives while achieving minimal 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 within the protection scope of the present invention.
Claims
1. A greenhouse space field environment simulation system based on machine learning, characterized in that, include: The data acquisition module is used to collect environmental parameter data and control equipment operation data. The control equipment operation data includes a combination of the working status of multiple control devices, and the environmental parameter data includes outdoor environmental parameter data and indoor environmental parameter data. The data processing cloud platform is connected to the data acquisition module and is used to process the collected environmental parameter data and control equipment status data to generate a greenhouse environment simulation model. The greenhouse environment is simulated using the greenhouse environment simulation model, and the operating instructions of the control equipment are dynamically generated based on the simulation data and optimization algorithm to regulate the working status of the control equipment. The data processing cloud platform includes: The data processing unit is used to preprocess the collected environmental parameter data; The model training unit is used to train and generate multiple greenhouse environment simulation sub-models using preprocessed environmental parameter data. Each simulation sub-model corresponds to a combination of working states, and all greenhouse environment simulation sub-models constitute the greenhouse environment simulation model. The prediction unit is used to select the corresponding simulation sub-model based on the current operating status of the control equipment, and input the current indoor environmental parameter data into the selected simulation sub-model to obtain the predicted indoor environmental parameter data for future times. The control command generation unit is used to generate the optimal operating state of the control equipment based on the combination of predicted indoor environmental parameters for future times and the current operating state of the control equipment using an optimization algorithm, and to generate corresponding switching commands. The greenhouse environment control system communicates with the data processing cloud platform and is used to adjust the working status of the control equipment according to the switching commands. The execution process of the prediction unit includes: X1. Obtain the current operating data of the control equipment, determine the combination of the working states of the control equipment, obtain the corresponding indoor environmental parameter data according to the combination of the working states of the control equipment, and preprocess the indoor environmental parameter data. X2. Input the preprocessed indoor environmental parameter data into the greenhouse environment simulation model, select the corresponding greenhouse environment simulation sub-model according to the current working status of the control equipment, and predict the indoor environmental parameter prediction data at future times. The execution process of the control instruction generation unit is as follows: A1. Initialize the current operating state combination of the controlled device; A2. Based on the deviation between the predicted indoor environmental parameters at future times and the set target values of the indoor environmental parameters, and combined with the energy consumption of the equipment under the current working state combination of the control equipment, construct the objective function; A3. Using an intelligent optimization algorithm, starting from the initial combination of working states of the control equipment, iteratively optimize the objective function and adjust the combination of working states of the control equipment. The intelligent optimization algorithm is either a genetic algorithm or 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 generated optimal control device, and generate the corresponding control command based on the optimal solution. In step A2, the formula for calculating the objective function is: Where k is the current time; i is the future time step, with i ranging from k to N; x(k+i|k) is the predicted indoor environmental parameter data for the future time step; x set (k+i) represents the target value of the indoor environmental parameter data at time k+i; α j (k+i-1) represents the on / off state of the j-th control device at time k+i-1, taking a value of 0 or 1, where 1 indicates on and 0 indicates off; u j Energy consumption for activating one sampling cycle for the j-th control device; λ is the weighting coefficient of the control quantity; m is the total number of control devices; N is the time range for prediction and control; ||x(k+i|k)-x set (k+i)‖ 2 This represents the sum of squared deviations between the predicted environmental parameter values and the target values at future time k+i; It represents the sum of squared energy consumption of all control devices at future time k+i-1, and its weight in the objective function is adjusted by the weighting coefficient λ.
2. The greenhouse space field environment simulation system based on machine learning as described in claim 1, characterized in that, The data acquisition module includes: Weather station sensors are used to collect outdoor environmental parameter data; The greenhouse environment sensors are used to collect environmental parameter data at different locations. The greenhouse environment sensors include temperature sensors, humidity sensors, light radiation sensors and carbon dioxide sensors. The greenhouse is divided into several layers along the longitudinal direction. Each layer is equipped with several temperature sensors and humidity sensors. The light radiation sensors and carbon dioxide sensors are installed on the top layer of the greenhouse. Control equipment sensors are used to collect operating data from control equipment.
3. The greenhouse space field environment simulation system based on machine learning as described in claim 1, characterized in that, The control equipment includes fans, skylights, side windows, sunshades, and air conditioners. The combination of operating states 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} In this context, 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 field environment simulation system based on machine learning as described in claim 1, characterized in that, When collecting environmental parameter data, the data acquisition module first collects the operating data of the control equipment to determine the combination of operating states of the control equipment. Then, it collects the environmental parameter data under that combination of operating states. After collecting the environmental parameter data, the module groups and stores the control equipment's operating state combinations with the corresponding environmental parameter data. The environmental parameter data includes: Outdoor environmental parameters include wind force, wind speed, solar radiation, rainfall, air temperature, air humidity, and carbon dioxide concentration. Indoor environmental parameters include air temperature, air humidity, light radiation, and carbon dioxide concentration at different locations.
5. The greenhouse space field environment simulation system based on machine learning as described in claim 4, characterized in that, The preprocessing of the collected environmental parameter data specifically includes: data cleaning and normalization of outdoor environmental parameter data, and spatial interpolation filling of indoor environmental parameters using the GWR algorithm. The GWR algorithm for filling missing values includes the following steps: (1) Establish a three-dimensional coordinate system for greenhouse space sampling points, determine the spatial location coordinates of each sensor sampling point, and select a reference sampling point with complete data as the benchmark point. (2) Calculate the spatial distance between each sampling point and the reference point, determine the weight decay function based on the spatial distance, and generate a normalized weight matrix; (3) Use the spatial weight matrix to interpolate and fill in the missing data.
6. The greenhouse space field environment simulation system based on machine learning as described in claim 1, characterized in that, The connection between the greenhouse environmental control system and the data processing cloud platform can be any one of the following protocols: HTTP, HTTPS, TCP, and Modbus.
7. The greenhouse space field environment simulation system based on machine learning as described in claim 1, characterized in that, The methods for constructing greenhouse environment simulation sub-models include: S1. Obtain the current operating data of the control equipment, determine the combination of the working states of the control equipment, and obtain the corresponding environmental parameter data based on the combination of the working states of the control equipment, which is divided into training data and test data. S2. Preprocess the environmental parameter data; 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. S4. Verify the simulation accuracy of the simulation sub-model using test data, 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 environment control system
CN114489200A
Environment intelligent control system based on far infrared heating technology
CN118963448A