Fruit and vegetable greenhouse carbon dioxide concentration adjusting method based on neural network optimization and nonlinear dynamic inverse control

By combining deep neural networks and nonlinear dynamic inverse control technology, the problems of low control accuracy, poor adaptability and high energy consumption of traditional carbon dioxide concentration regulation methods have been solved. This has enabled precise regulation of carbon dioxide concentration and environmental adaptability in fruit and vegetable greenhouses, thereby improving the stability of the fruit and vegetable growth environment and yield.

CN121386370APending Publication Date: 2026-01-23UNIV OF SHANGHAI FOR SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511308933.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-06-25
Filing Date
2025-09-12
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Traditional methods for regulating carbon dioxide concentration in fruit and vegetable greenhouses suffer from problems such as low control precision, poor adaptability, high energy consumption, and lack of predictive ability, making it difficult to achieve precise regulation of carbon dioxide concentration and environmental adaptability.

Method used

By employing deep neural network (LSTM) and nonlinear dynamic inverse control (NDI) techniques, combined with a self-organizing memory optimization algorithm, the system collects data in real time through sensors, establishes a nonlinear mapping relationship between carbon dioxide concentration and environmental parameters, performs real-time control and predicts future trends, and optimizes the control process through feedback adjustment and model updates.

Benefits of technology

It enables precise regulation of carbon dioxide concentration in fruit and vegetable greenhouses, reduces energy consumption, improves regulation efficiency and stability, and optimizes the fruit and vegetable growing environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386370A_ABST
    Figure CN121386370A_ABST
Patent Text Reader

Abstract

The invention discloses a fruit and vegetable greenhouse carbon dioxide concentration adjusting method based on neural network optimization and nonlinear dynamic inverse control. According to the method, environmental parameters and fruit and vegetable growth information are collected in real time through a sensor, after data cleaning and Z-score standardization preprocessing, a nonlinear mapping relation between parameters and carbon dioxide concentration is established through an LSTM model, and LSTM hyper-parameters and NDI control parameters are synchronously optimized through a self-organizing memory optimization algorithm. And a system inverse model is constructed by combining nonlinear dynamic inverse control, nonlinear dynamic is counteracted, and real-time accurate adjustment of the carbon dioxide concentration is realized. The future concentration trend is predicted based on LSTM, ventilation equipment and carbon dioxide supply amount are dynamically adjusted, and the model is periodically updated to adapt to environmental changes. The problems that a traditional method is low in control precision, poor in adaptability, high in energy consumption and the like are solved, the regulation and control efficiency and stability are remarkably improved, and resource waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a carbon dioxide concentration regulation method, in particular to a carbon dioxide concentration regulation method for greenhouse based on neural network optimization and nonlinear dynamic inverse control. BACKGROUND

[0002] With the development of modern agricultural technology, greenhouse has been widely used as an efficient and controllable agricultural production method. Carbon dioxide concentration is one of the key environmental factors affecting the photosynthesis and growth of fruits and vegetables. Studies have shown that appropriate increase of carbon dioxide concentration in the greenhouse can significantly promote the growth of fruits and vegetables, improve yield and quality. However, traditional carbon dioxide concentration regulation methods usually rely on manual experience or simple control algorithms, which have the following problems:

[0003] 1. Low control accuracy: traditional methods are difficult to accurately control carbon dioxide concentration, resulting in large fluctuations in concentration and affecting the stability of fruit and vegetable growth.

[0004] 2. Poor adaptability: the greenhouse environment is complex and variable, and traditional methods are difficult to adapt to different environmental conditions and fruit and vegetable growth stages.

[0005] 3. High energy consumption: due to low control accuracy, traditional methods often need to supplement carbon dioxide in excess, resulting in resource waste and increased energy consumption.

[0006] 4. Lack of prediction ability: traditional methods can only adjust according to the current state, lack of prediction ability for future changes in carbon dioxide concentration, and difficult to achieve advanced control. SUMMARY

[0007] The purpose of the present application is to provide a carbon dioxide concentration regulation method for greenhouse based on neural network optimization and nonlinear dynamic inverse control, aiming to solve the shortcomings of traditional methods in control accuracy, adaptability, energy consumption and prediction ability. The method combines deep neural network (LSTM) and nonlinear dynamic inverse control (NDI) technology, and introduces self-organizing memory optimization algorithm, realizes accurate prediction and real-time control of carbon dioxide concentration in the greenhouse, improves fruit and vegetable yield and quality, reduces energy consumption and resource waste.

[0008] Technical scheme: the carbon dioxide concentration regulation method for greenhouse based on neural network optimization and nonlinear dynamic inverse control described in the present application, the specific steps are as follows:

[0009] S1, data acquisition: collect environmental and fruit and vegetable data through sensors and preprocess the data;

[0010] S2, data preprocessing: clean and normalize the collected data for preprocessing;

[0011] S3, Deep neural network model training: Train the LSTM model using historical data to establish a nonlinear mapping relationship between environmental parameters, fruit and vegetable growth information, and carbon dioxide concentration.

[0012] S4, Self-organizing memory optimization algorithm optimization: Use the self-organizing memory optimization algorithm to optimize the hyperparameters of the LSTM model and the control parameters of the nonlinear dynamic inverse control algorithm.

[0013] S5, Nonlinear dynamic inverse control NDI: Use the NDI control algorithm to control the carbon dioxide concentration in the greenhouse in real time to ensure that its concentration always remains at the optimal value.

[0014] S6, Carbon dioxide concentration prediction: Input the real-time collected data into the optimized LSTM model to predict the future carbon dioxide concentration trend.

[0015] S7, Feedback regulation: According to the prediction results and the target carbon dioxide concentration, use the optimized nonlinear dynamic inverse control algorithm to calculate the required carbon dioxide supply amount, and control the carbon dioxide generator and ventilation equipment for adjustment.

[0016] S8, Model update: Regularly add new data to the training set to update the LSTM model to improve the prediction accuracy and adaptability of the model.

[0017] Further, in S1, carbon dioxide concentration sensors, temperature sensors, humidity sensors, and light intensity sensors are used to collect environmental parameters and fruit and vegetable growth information. Sensor data is sent to the edge computing gateway NVIDIAXavierNX through the LoRa wireless module, and data storage uses the time series database InfluxDB.

[0018] Further, in S2, the normalization method used is Z-score standardization, which converts data to a distribution with a mean of 0 and a standard deviation of 1.

[0019] Further, in S3, the mean squared error is used as the loss function of the LSTM model to measure the difference between the model's predicted value and the true value, and its formula is:

[0020]

[0021] where y t is the true value, y t0 is the model's predicted value, and T is the number of time steps.

[0022]

[0023] where ρ q (u) = u*(q-||u<0 ), γ = 0.6, || u<0 is an indicator function, 1 if u < 0, otherwise 0.

[0024] Further, the main steps of the self-organizing memory optimization algorithm in S4 include the following stages:

[0025] S5.1, randomly generate an initial population, each individual represents a set of LSTM hyperparameters, i.e.

[0026] X i = [n i1 ,n i2 ,n i3 ], i = 1, 2, …, N

[0027] where N is the population size, X i is the hyperparameter combination of the i-th individual,

[0028] S5.2, use the memory strategy to make each individual remember the position information of the current optimal solution, i.e.

[0029] X i,new = X i,best

[0030] where X i,best is the position of the optimal individual in the current population,

[0031] use the forgetting and supplement strategy to make the individual forget and regenerate information in part of the dimensions, i.e.

[0032] X i,j = X i,j + α · (X k,j - X i,j )

[0033] where X i,j is the j-th dimension of the i-th individual, α is a random number, X k,j is the j-th dimension of another individual selected at random, and the individual can randomly obtain information from other individuals, i.e.

[0034] X i,j = X k,j

[0035] S5.3, make all individuals remember the position information of the global optimal solution, i.e.

[0036] X i,new = X global_best

[0037] where X global_best is the global optimal solution, and make the individual forget and regenerate information in part of the dimensions, i.e.

[0038]

[0039] where β is a random number,

[0040] S5.4, in one specific embodiment, the objective function is a double objective optimization function, namely:

[0041]

[0042] where η = 0.2 is the energy consumption weight coefficient, Energy(u(t)) = ∑|u(t)|,

[0043] Adaptive exploration rate, the exploration rate of individuals in the ith generation N max = 50,

[0044] Elite preservation strategy: the top 10% of individuals in each generation are directly entered into the next generation,

[0045] Parameter coupling constraint: force the number of LSTM layers n LSTM ≥ 2, Dropout rate p d ≥ 0.3.

[0046] Further, in the S5, the steps are:

[0047] S5.1, obtain the current carbon dioxide concentration C(t) and external disturbance d(t),

[0048] S5.2, calculate the error dynamics, that is, according to the target concentration C ref (t) and error gain K, calculate the error dynamic term C ref0 ,

[0049] C ref0 (t)-K(C(t)-C ref (t))

[0050] where C ref0 (t) is the dynamic change of the target carbon dioxide concentration,

[0051] S5.3, calculate the control input, calculate the control input u(t) through the inverse model,

[0052] S5.4, control input execution, the calculated control input u(t) is applied to the actuator to adjust the carbon dioxide concentration in the greenhouse.

[0053] Further, in the S8, the recursive least squares method (RLS) is used to update the system parameters in real time.

[0054] Further, in the S8, to prevent the actuator from being saturated, a dynamic amplitude limiting is introduced:

[0055]

[0056] where, κ = 0.5 is the recoil coefficient, u max = 100%.

[0057] Further, in the S8, the model feedback adjustment mechanism is as follows:

[0058] Event triggering mechanism: when the predicted concentration deviation |C(t)-C ref (t)|>50ppm, the NDI controller is immediately triggered to adjust,

[0059] According to the light intensity, the reference value is dynamically adjusted: where, σ is the activation function, which can realize smooth transition.

[0060] Further, in the S8, the model updating mechanism is as follows:

[0061] Knowledge distillation: the old model is used as the teacher model, and the student model is trained with new data, and the loss function is as follows:

[0062]

[0063] where, KL(p,q) is the Kullback-Leibler divergence.

[0064] Data normalization is a method of unifying data of different dimensions to the same scale, and its core purpose is to eliminate dimensional differences and prevent some features from dominating the model training process due to large values, thereby affecting the accuracy and stability of the model. In the present invention, the normalization method used is Z-score standardization. This method converts data to a distribution with a mean of 0 and a standard deviation of 1.

[0065] S3, deep neural network model training: using historical data to train the LSTM model, and establishing a nonlinear mapping relationship between environmental parameters, fruit and vegetable growth information and carbon dioxide concentration.

[0066] Further, nonlinear dynamic inverse control is a model-based control method that builds an inverse model of the system to offset the nonlinear dynamics, thereby converting the complex nonlinear system into a simple linear system. The steps are:

[0067] S5.1, obtain the current carbon dioxide concentration C(t) and external disturbance d(t).

[0068] S5.2, calculate the error dynamics, i.e. according to the target concentration C ref (t) and the error gain K, calculate the error dynamic term C ref0 .

[0069] S5.3, calculate control input, calculate control input u(t) by inverse model.

[0070] S5.4, control input execution, act the calculated control input u(t) on the actuator (such as carbon dioxide generator or ventilation equipment) to adjust the carbon dioxide concentration in the greenhouse.

[0071] Feedback regulation: according to the predicted carbon dioxide concentration trend and the set target carbon dioxide concentration value, the optimized nonlinear dynamic inverse control algorithm is used to accurately calculate the required carbon dioxide supply amount to achieve the target concentration. Then, the system will automatically control the carbon dioxide generator to release the corresponding amount of carbon dioxide according to the calculation result, and adjust the operation state of the ventilation equipment, so as to realize the dynamic regulation and accurate control of the carbon dioxide concentration in the environment, and ensure that it is maintained within the target concentration range.

[0072] Model updating: during the model maintenance process, the newly collected data is periodically included in the training set, and the LSTM model is updated accordingly to improve the prediction accuracy of the model, so that it can better adapt to the changing data environment and enhance the adaptability of the model.

[0073] Compared with the prior art, the present application has the following beneficial effects:

[0074] The method of the present application collects environmental parameters and fruit and vegetable growth information in real time through sensors, and after data cleaning and Z-score standardization preprocessing, establishes a nonlinear mapping relationship between parameters and carbon dioxide concentration using the LSTM model, and simultaneously optimizes the LSTM hyperparameters and NDI control parameters through the self-organizing memory optimization algorithm. Combined with nonlinear dynamic inverse control, the inverse model of the system is constructed to offset the nonlinear dynamics and realize real-time and accurate regulation of carbon dioxide concentration. Based on the LSTM prediction of future concentration trend, the ventilation equipment and carbon dioxide supply amount are dynamically adjusted, and the model is updated regularly to adapt to environmental changes. The present application solves the problems of low control accuracy, poor adaptability and high energy consumption of traditional methods, significantly improves the regulation efficiency and stability, reduces resource waste, and provides an optimized environment for fruit and vegetable growth. BRIEF DESCRIPTION OF DRAWINGS

[0075] Figure 1 is the flow principle diagram of the present application;

[0076] Figure 2 is the pseudo code diagram of the self-organizing memory optimization algorithm of the present application;

[0077] Figure 3 is the schematic diagram of the NDI control architecture;

[0078] Figure 4A schematic diagram of the model control architecture principles. DETAILED DESCRIPTION

[0079] To make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0080] The embodiments of the present application are further described in detail below with reference to the drawings:

[0081] In one specific embodiment, the specific principle flow of the present application is as shown in Figure 1 The sensor collects environmental data and pre-processes, autonomously constructs an LSTM network model training to establish a nonlinear mapping relationship, optimizes the LSTM model hyperparameters and nonlinear dynamic inverse control algorithm control parameters by using a self-organizing memory optimization algorithm, uses an NDI control algorithm to control the carbon dioxide concentration in the greenhouse to the optimal value in real time, finally predicts the carbon dioxide change trend, combines the trend feedback adjustment and updates the prediction model parameters.

[0082] S1. In one specific embodiment, the selection and layout of the sensor are performed:

[0083] A non-dispersive infrared (NDIR) CO2 concentration sensor (model SenseAir S8) is used, with a range of 0-5000 ppm, an accuracy of ±30 ppm, and a sampling frequency of 1 Hz. Eight sensors are uniformly arranged in the greenhouse, one every 5 meters.

[0084] A digital temperature and humidity sensor (model SHT35) is used, with a temperature range of -40-125℃, an accuracy of ±0.2℃, a humidity range of 0-100% RH, and an accuracy of ±1.5% RH. Four sensors are arranged every 10 meters, for a total of four.

[0085] A light quantum light sensor (model Apogee SQ-500) is used, with a range of 0-3000 μmol / m 2 / s, an accuracy of ±5%, and is installed at the central position of the top of the greenhouse.

[0086] A wide-angle camera (model Raspberry Pi CameraV2) is equipped for fruit and vegetable growth monitoring. Plant images are taken every 30 minutes, the leaf area index (LAI) and plant height are extracted by the ResNet-18 model, and the growth stage label (germination period, growth period, and mature period) is output.

[0087] S2、In one embodiment, the sensor data is transmitted to the edge computing gateway (NVIDIA Jetson XavierNX) through the LoRa wireless module (frequency band 868 MHz, transmission rate 5 kbps), and the data storage adopts the time series database (InfluxDB) with millisecond-level timestamp accuracy. The image data is transmitted to the cloud server (AWS EC2 instance) through Wi-Fi for asynchronous processing.

[0088] S3、Data preprocessing:

[0089] In one embodiment, the collected data is preprocessed by cleaning and normalization.

[0090] The CO2 concentration data is filtered by dynamic median filtering with a window size W = 10 (10 seconds of data), and the abnormal value determination rule is:

[0091]

[0092] where MAD is defined as: MAD = median(|x i median(x)|), and the abnormal value is replaced by the median value in the window.

[0093] The long-term missing data is filled by time series decomposition (STL decomposition):

[0094] The time series is decomposed into trend term T(t), seasonal term S(t) and residual term R(t). The residual term is predicted by ARIMA model, and the filled value is reconstructed:

[0095] x field (t) = T(t) + S(t) + R(t)

[0096] The data is fused by multi-modal fusion, and the data with different sampling frequencies is unified to 1 Hz timestamp by linear interpolation. The classification labels (germination period = 0, growth period = 1, mature period = 2) output by ResNet-18 are one-hot encoded.

[0097] Z-score standardization is used, and the mean and standard deviation are calculated for different growth stages, respectively, to convert the data to a distribution with mean 0 and standard deviation 1. The formula is:

[0098]

[0099] where μ is the mean of the data, σ is the standard deviation of the data, k ∈ {0, 1, 2} represents the growth stage, for example, the mean of CO2 concentration in the growth period (k = 1) is μ c (1) = 850 ppm, and the standard deviation σ c(1) = 120 ppm.

[0100] S4, Deep neural network model training:

[0101] In one specific embodiment, the LSTM model is trained with historical data to establish a nonlinear mapping relationship between environmental parameters, fruit and vegetable growth information, and carbon dioxide concentration.

[0102] S4.1, Constructing LSTM network architecture.

[0103] Input layer: time window length T in = 15 historical 15-second data), input feature dimension is 6 (CO2 concentration, temperature, humidity, light intensity, growth stage encoding, and hour period encoding of timestamp).

[0104] Hidden layer:

[0105] First layer LSTM: 128 neurons, activation function is a gated recurrent unit (GRU) variant:

[0106] z t = σ(W z *[h t-1 , x t ] + b z )

[0107] r t = σ(W r *[h t-1 , x t ] + b r )

[0108]

[0109] wherein z t is used to control the degree of preservation of the previous moment state information and the current input information. Its value range is between 0 and 1, 0 means no preservation, and 1 means complete preservation. W z is a weight matrix for calculating the weight of the input [h t-1 , x t ] related to the update gate, [h t-1 , x t ] represents the concatenation of the hidden state h t-1 of the previous moment and the input x t of the current moment. b z is the bias vector of the update gate, used to offset the weighted input.

[0110] Second layer LSTM: 64 neurons, output complete time series. Add a time attention layer to calculate the historical time step weight:

[0111]

[0112] Context vector

[0113] Output layer: Fully connected layer output future T out = 10s CO2 concentration prediction value, activation function is linear.

[0114] S4.2, combine MSE and quantile loss as hybrid loss function, improve prediction robustness:

[0115]

[0116] Where, y t is the true value, y t0 is the model prediction value, and T is the time step.

[0117]

[0118] Where, ρ q (u) = u * (q - || u<0 ), γ = 0.6, || u<0 is an indicator function, u < 0 is 1, otherwise 0.

[0119] S4.3, distributed training:

[0120] In one specific embodiment, 4 NVIDIA Tesla V100 GPUs are used for data parallel training with a batch size of 256. Ring-AllReduce algorithm is adopted, and the gradient aggregation period is synchronized once every 10 mini-batches.

[0121] S5, self-organizing memory optimization algorithm optimization: using self-organizing memory optimization algorithm to optimize the hyperparameters of LSTM model and the control parameters of nonlinear dynamic inverse control algorithm.

[0122] Wherein, the main steps of self-organizing memory optimization algorithm include the following stages:

[0123] S5.1, randomly generate initial population, each individual represents a set of LSTM hyperparameters, that is:

[0124] X i = [n i1 , n i2 , n i3 ], i = 1, 2, …, N

[0125] In the formula, N is the population size, X i is the hyperparameter combination of the i-th individual.

[0126] S5.2, each individual remembers the position information of the current optimal solution by using a memory strategy, i.e.:

[0127] X i,new = X i,best

[0128] where X i,best is the position of the optimal individual in the current population.

[0129] An individual forgets and regenerates information in some dimensions by using a forgetting and supplement strategy, i.e.:

[0130] X i,j = X i,j + a · (X k,j - X i,j )

[0131] where X i,j is the jthdimension of the ithindividual, a is a random number, and X k,j is the jthdimension of another individual selected randomly. An individual can obtain information from other individuals randomly, i.e.:

[0132] X i,j = X k,j

[0133] S5.3, all individuals remember the position information of the global optimal solution, i.e.:

[0134] X i,new = X dlobal_best

[0135] where X global_best is the global optimal solution. An individual forgets and regenerates information in some dimensions, i.e.:

[0136]

[0137] where β is a random number.

[0138] S5.4, in one embodiment, the objective function is a double-objective optimization function, i.e.:

[0139]

[0140] where η = 0.2 is a weight coefficient of energy consumption, and Energy(u(t)) = ∑|u(t)|.

[0141] In one embodiment, the above process contains the following improved strategies:

[0142] Adaptive exploration rate, the exploration rate of an individual in the ithgeneration N max = 50.

[0143] Elite retention strategy: The top 10% of individuals in each generation are retained and directly enter the next generation.

[0144] Parameter coupling constraint: Force the number of LSTM layers n LSTM When ≥2, the Dropout rate p d ≥0.3.

[0145] In one specific embodiment, after 50 generations of optimization, the optimal parameter combination is: LSTM learning rate α = 8.7 × 10⁻⁶. -4 Dropout rate p d =0.35, NDI error gain K=1.42.

[0146] In one specific embodiment, the algorithm execution flow is as follows: Figure 2 As shown in the pseudocode.

[0147] S6. Nonlinear Dynamic Inverse Control (NDI):

[0148] In one specific embodiment, the NDI control algorithm is used to control the carbon dioxide concentration in the greenhouse in real time, ensuring system stability and robustness.

[0149] Nonlinear dynamic inverse control is a model-based control method that uses an inverse model of the system to counteract nonlinear dynamics, thereby transforming a complex nonlinear system into a simple linear system. Its steps are as follows:

[0150] S6.1 Obtain the current carbon dioxide concentration C(t) and external disturbance d(t).

[0151] S6.2 Calculate the dynamic error, i.e., based on the target concentration C ref Given (t) and error gain K, calculate the error dynamic term:

[0152] C ref0 (t)-K(C(t)-C ref (t))

[0153] In the formula, C ref0 (t) represents the dynamic change of the target carbon dioxide concentration.

[0154] S6.3 Calculate the control input. The control input u(t) is calculated using the inverse model, i.e.:

[0155]

[0156] In the formula, u(t) is the control input, and f(·) is a nonlinear function that describes the dynamic changes of carbon dioxide.

[0157] S6.4, Control input execution. The calculated control input u(t) is applied to the actuator (such as a carbon dioxide generator or ventilation equipment) to adjust the carbon dioxide concentration in the greenhouse.

[0158] In one specific embodiment, the NDI control model is as shown in Figure 3

[0159] S7, Carbon dioxide concentration prediction: The system collects real-time carbon dioxide concentration data from the environment through high-precision sensors. These data contain time series information and environmental dynamic change characteristics. Then, these real-time collected data are input into the optimized LSTM model. The model effectively captures short-term fluctuations and long-term trends in the data, and combines historical data for deep learning and analysis, outputting predicted values of carbon dioxide concentration in the future, including short-term (such as future hours) and long-term (such as future days) trends.

[0160] S8, Feedback regulation: Based on the future carbon dioxide concentration trend obtained by the prediction model, combined with the pre-set target carbon dioxide concentration value, an optimized nonlinear dynamic inverse control algorithm is used to accurately calculate the amount of carbon dioxide supplement required to make the carbon dioxide concentration in the environment reach the target value through complex mathematical models and optimization strategies.

[0161] After the calculation is completed, the system will automatically control the working state of the carbon dioxide generator according to this accurate supplement amount, so that it can release the corresponding amount of carbon dioxide according to the calculation result. At the same time, the system will also synchronously adjust the operating parameters of the ventilation equipment, such as wind speed, wind volume and ventilation mode, etc., to ensure that the carbon dioxide can be evenly distributed and the excess carbon dioxide can be effectively discharged.

[0162] S9, Model update: In order to ensure that the long short-term memory model can continuously maintain high efficient and accurate prediction ability and adapt to the data fluctuations caused by environmental changes, the system adopts a dynamic updating mechanism. Specifically, the system will regularly incorporate the latest collected carbon dioxide concentration data into the training data set. These new data not only contain the latest environmental characteristics, but also reflect the latest change trend in the time series, which can provide more abundant learning materials for the model.

[0163] In one specific embodiment, the recursive least squares method (RLS) is used to update the system parameters in real time:

[0164] θ(t) = θ(t-1) + K(t)(y(t) - φ T (t)θ(t-1))

[0165] Where φ(t) = [C(t), u(t), d(t)] T The covariance matrix P(t) update formula is:​

[0166]

[0167] where λ = 0.98 is the forgetting factor.

[0168] In one embodiment, to prevent actuator saturation, dynamic clipping is introduced:

[0169]

[0170] where κ = 0.5 is the kickback coefficient, u max = 100%.

[0171] In one embodiment, after integrating new data into the training set, the system re-trains and optimizes the LSTM model. In this way, the LSTM model can better capture the dynamic characteristics of carbon dioxide concentration changes, whether short-term fluctuations or long-term trend changes, and make more accurate predictions.

[0172] In addition, this periodic updating mechanism can effectively deal with the problem of data drift. By continuously introducing new data and updating the model, the system can ensure that the LSTM model is always in the best performance state, providing reliable guarantee for carbon dioxide concentration prediction.

[0173] In one embodiment, the above model feedback adjustment mechanism is as follows:

[0174] Event trigger mechanism: when the predicted concentration deviation |C(t)-C ref (t)|>50ppm, the NDI controller is immediately adjusted.

[0175] Adjust the reference value dynamically according to the light intensity: where σ is the activation function, which can achieve smooth transition.

[0176] In one embodiment, the above model updating mechanism is as follows:

[0177] Knowledge distillation: the old model is used as the teacher model, and the new data is used to train the student model, and the loss function is as follows:

[0178]

[0179] where KL(p,q) is the Kullback-Leibler divergence.

[0180] Version rollback mechanism: if the updated model's MAE on the validation set rises by more than 10%, it will automatically roll back to the previous version.

[0181] In one embodiment, the control flow of the entire model is as followsFigure 4 as shown.

[0182] In one embodiment, an experimental test is performed on an experimental plot of 50m long x 20m wide x 4m high, with tomatoes planted at a density of 3 plants / m 2 The traditional PID control is compared with the method of the present application, and the monitoring is continued for 30 days.

[0183] In one embodiment, the model is tested for robustness.

[0184]

Claims

1. A method for adjusting carbon dioxide concentration in a fruit and vegetable greenhouse based on neural network optimization and nonlinear dynamic inverse control, characterized in that, It comprises the following steps: S1, data collection: collecting environmental and fruit and vegetable data through sensors and preprocessing the data; S2, data preprocessing: cleaning and normalizing the collected data; S3, deep neural network model training: training the LSTM model using historical data to establish a nonlinear mapping relationship between environmental parameters, fruit and vegetable growth information, and carbon dioxide concentration; S4, self-organizing memory optimization algorithm optimization: using the self-organizing memory optimization algorithm to optimize the hyperparameters of the LSTM model and the control parameters of the nonlinear dynamic inverse control algorithm; S5, nonlinear dynamic inverse control NDI: using the NDI control algorithm to control the carbon dioxide concentration in the greenhouse in real time to ensure that its concentration always remains at the optimal value; S6, carbon dioxide concentration prediction: inputting the real-time collected data into the optimized LSTM model to predict the carbon dioxide concentration trend in the future period of time; S7, feedback regulation: according to the prediction result and the target carbon dioxide concentration, the required carbon dioxide supply amount is calculated by using the optimized nonlinear dynamic inverse control algorithm, and the carbon dioxide generator and ventilation equipment are controlled for adjustment; S8, model updating: periodically adding new data to the training set to update the LSTM model to improve the prediction accuracy and adaptability of the model.

2. The method of claim 1, wherein the method is a method of optimizing a carbon dioxide concentration in a greenhouse for fruits and vegetables based on a neural network and a nonlinear dynamic inverse control. In S1, carbon dioxide concentration sensors, temperature sensors, humidity sensors, and light intensity sensors are used to collect environmental parameters and fruit and vegetable growth information. The sensor data is sent to the edge computing gateway NVIDIAXavier NX through the LoRa wireless module, and the data storage uses the time series database InfluxDB.

3. The method of claim 1, wherein the method is characterized by: In S2, the normalization method used is Z-score standardization, which converts the data to a distribution with a mean of 0 and a standard deviation of 1.

4. The method for greenhouse carbon dioxide concentration regulation based on neural network optimization and nonlinear dynamic inverse control according to claim 1, characterized in that: In S3, the mean square error is used as the loss function of the LSTM model to measure the difference between the predicted value and the true value, and its formula is: where y t is the true value, y t0 is the model predicted value, and T is the time step number. where p q (u) = u * (q - || u<0 ), γ = 0.6,|| u<0 is an indicator function, 1 if u < 0 and 0 otherwise.

5. The method for greenhouse carbon dioxide concentration regulation based on neural network optimization and nonlinear dynamic inverse control according to claim 1, characterized in that: In S4, the main steps of the self-organizing memory optimization algorithm include the following stages: S5.1, randomly generate an initial population, each individual represents a set of LSTM hyperparameters, i.e.: X i = [n i1 , n i2 , n i3 ], i = 1, 2,..., N where N is the population size, X i is the hyperparameter combination of the i-th individual, S5.2, use the memory strategy to make each individual remember the position information of the current optimal solution, i.e.: X i.new = X i,best where X i,best is the position of the best individual in the current population, Use the forgetting and supplement strategy to make the individual forget and regenerate information in part of the dimensions, i.e.: X i,j = X i,j + a · (X k,j - X i,j ) where X i,j is the jth dimension of the ith individual, a is a random number, X k,j is the jth dimension of another individual chosen at random, and individuals can acquire information from other individuals at random, i.e.: X i,j = X k,j S5.3, make all individuals remember the position information of the global optimal solution, i.e.: X i,new = X global_best In the formula, X global_best is a global optimal solution, and the individual forgets and regenerates information in part dimensions, that is: where β is a random number, S5.4, in one specific embodiment, the objective function is a double-objective optimization function, i.e.: where η = 0.2 is the energy consumption weight coefficient, Energy(u(t)) = ∑|u(t)|, Adaptive exploration rate, exploration rate of individuals in the i-th generation N max = 50, Elite retention strategy: retain the top 10% of individuals in each generation directly to the next generation, Parameter coupling constraint: force the number of LSTM layers n LSTM Dropout rate p ≥ 2 d Dropout rate p ≥ 0.

3.

6. The method for greenhouse carbon dioxide concentration regulation based on neural network optimization and nonlinear dynamic inverse control according to claim 1, characterized in that: In S5, the steps are: S5.1, obtain the current carbon dioxide concentration C(t) and external disturbance d(t), S5.2, calculating the error dynamics, i.e. from the target concentration C ref (t) and the error gain K, calculating the error dynamics term C ref0 , C ref0 (t)-K(C(t)-C ref (t)) In the formula, C ref0 (t) is the dynamic change in the target carbon dioxide concentration, S5.3, calculate the control input, calculate the control input u(t) through the inverse model, S5.4, control input execution, apply the calculated control input u(t) to the actuator to adjust the carbon dioxide concentration in the greenhouse.

7. The method for greenhouse carbon dioxide concentration regulation based on neural network optimization and nonlinear dynamic inverse control according to claim 1, characterized in that: In the S8, the recursive least square (RLS) is used to update the system parameters in real time. 8.The greenhouse carbon dioxide concentration adjustment method based on neural network optimization and nonlinear dynamic inverse control according to claim 1, wherein: In the S8, a dynamic limiting is introduced to prevent the actuator saturation. where k = 0.5 is the coefficient of restitution, u max = 100%. 9.The greenhouse carbon dioxide concentration adjustment method based on neural network optimization and nonlinear dynamic inverse control according to claim 1, wherein: In the S8, the model feedback adjustment mechanism is as follows: Event trigger mechanism: When the predicted concentration deviation |C(t) - C ref (t)| > 50 ppm, the NDI controller is immediately triggered to adjust, Adjusting the reference value dynamically according to the light intensity: Wherein, sigma is an activation function, which can realize smooth transition.

10. The method for greenhouse carbon dioxide concentration regulation based on neural network optimization and nonlinear dynamic inverse control according to claim 1, characterized in that: In the S8, the model update mechanism is as follows: Knowledge distillation: the old model is used as a teacher model, and the new data is used to train a student model, and the loss function is as follows: Wherein, KL(p, q) is the Kullback-Leibler divergence.