Next Article in Journal
Physiological and Biomechanical Characteristics of Inline Speed Skating: A Systematic Scoping Review
Previous Article in Journal
Monitoring the Time-Lagged Response of Land Subsidence to Groundwater Fluctuations via InSAR and Distributed Fiber-Optic Strain Sensing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

AI-Enhanced Nonlinear Predictive Control for Smart Greenhouses: A Performance Comparison of Forecast and Warm-Start Strategies

Faculty of Engineering and Technology, Thai Nguyen University of Information and Communication Technology, Thai Nguyen 250000, Vietnam
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(14), 7988; https://doi.org/10.3390/app15147988
Submission received: 31 May 2025 / Revised: 6 July 2025 / Accepted: 15 July 2025 / Published: 17 July 2025
(This article belongs to the Special Issue Future of Smart Greenhouses: Automation, IoT, and AI Applications)

Abstract

Accurate, energy-efficient climate regulation is crucial for scaling smart greenhouse production. While nonlinear model predictive control (NMPC) can co-optimize yield and resource use, its efficacy hinges on short-range weather information and real-time solver feasibility. This paper investigates the performance of advanced NMPC strategies for smart greenhouse climate control, with particular emphasis on the roles of AI-driven disturbance prediction and warm-start initialization for real-time optimization. Six controller configurations, including feedback-only, LSTM-based forecast, and ideal disturbance models, each with and without warm-start, were tested in a 40-day simulation of a lettuce smart greenhouse. Performance metrics included final biomass, constraint violations, resource costs, profit, and solver time. Results show that feedback-only controllers maximize yield and profit, incurring higher CO2 costs but lower heating costs, alongside greater constraint violations compared to the predictive strategies. Predictive and ideal disturbance-aware controllers effectively reduce resource consumption and improve constraint compliance at the expense of lower yields. Importantly, warm-start initialization significantly accelerates computation without affecting control quality. The study also demonstrates that penalty parameters, rather than economic weight settings, predominantly determine aggregate constraint violation. The findings provide actionable insights for designing and deploying NMPC-based greenhouse controllers, highlighting the importance of warm-start techniques and the trade-offs between productivity, resource efficiency, and environmental compliance.

1. Introduction

Smart greenhouse agriculture plays an increasingly critical role in addressing global challenges such as food security, climate change, and sustainable development. These systems integrate automation, IoT technologies, and AI-driven control strategies to enable year-round, resource-efficient crop production. To achieve precise climate regulation in smart greenhouses, advanced control techniques have become essential, allowing growers to optimize yield and quality while minimizing energy and CO2 consumption.
NMPC has emerged as a leading solution for greenhouse climate management, thanks to its capacity to handle nonlinear system dynamics, operational constraints, and multi-objective optimization [1,2,3]. Nevertheless, the effectiveness of NMPC relies heavily on the accurate prediction of environmental disturbances and the computational efficiency required for real-time implementation.
Recent advances in artificial intelligence and machine learning—especially deep neural networks such as Long Short-Term Memory (LSTM)—have enabled more accurate, data-driven forecasting of environmental variables [4,5]. Integrating such forecasts into NMPC frameworks offers the potential to anticipate and proactively mitigate external disturbances, improving both climate regulation and resource efficiency. However, most prior studies focus on single-variable prediction, and few have assessed the impact of multi-variable, AI-based forecasts on NMPC performance. In parallel, real-time NMPC is often hindered by the computational burden of repeatedly solving large-scale, constrained nonlinear optimization problems. Warm-start techniques, which leverage previous solutions to accelerate convergence, have shown significant promise in other application domains [6], but their practical impact in greenhouse NMPC—especially when coupled with advanced disturbance prediction—remains largely unexplored.
While progress has been made, there is still no systematic study that jointly evaluates the control and computational performance of NMPC under different disturbance forecasting strategies. To address these limitations, this study proposes an AI-enhanced NMPC framework in which a single multi-output LSTM network is trained to jointly forecast all major external disturbances—outdoor temperature, humidity, CO2 concentration, and solar radiation—relevant to greenhouse climate control. By capturing temporal dependencies and nonlinear relationships among these variables, the LSTM model delivers comprehensive, realistic forecasts for proactive climate regulation. Furthermore, to provide a thorough and fair assessment, this work conducts a unified comparative study of three NMPC configurations: (1) feedback-only NMPC, assuming constant disturbances; (2) LSTM-based predictive disturbance NMPC, utilizing joint multi-variable AI-based disturbance prediction; and (3) ideal predictive disturbance NMPC, using true future disturbance profiles as an upper-bound benchmark. The practical value of warm-start optimization is also systematically investigated across all configurations. Utilizing a detailed lettuce greenhouse model [7] and extensive 40-day simulations, the effectiveness of feedback-only, predictive, and ideal preview controllers—with and without warm-start—is rigorously assessed using comprehensive key performance indicators (KPIs) such as final biomass yield, setpoint adherence, resource consumption, net profit, and solver computation time.
The findings of this research are expected to provide valuable, actionable insights for both researchers in control engineering and agricultural systems, as well as practitioners seeking to implement advanced AI-enabled control solutions for optimal greenhouse environmental management. The remainder of this paper is organized as follows: Section 2 reviews related literature. Section 3 details the greenhouse model. Section 4 describes the NMPC formulation, controller variants, and performance metrics. Section 5 outlines the simulation setup. Section 6 presents and discusses the results, and Section 7 concludes the paper.

2. Related Work

This section reviews relevant literature to contextualize the present study. Key areas explored include NMPC strategies for greenhouses, AI-based disturbance prediction, and warm-start techniques for computational efficiency in smart agricultural applications. The review culminates by identifying current research gaps, thereby framing the contributions of this study.

2.1. NMPC Strategies for Greenhouse Climate Control

The optimal control of greenhouse climate has a long history, with foundational work by van Henten framing greenhouse climate regulation as an open-loop optimal control problem aimed at maximizing net revenue [7]. Subsequent sensitivity analyses by van Henten also highlighted that uncertainties in humidity and radiation typically lead to the largest profit losses [8]. Time-scale decomposition of the optimal control problem has also been explored [9]. However, open-loop trajectories are not feasible for autonomous operation in dynamic environments, as they cannot correct for actual disturbances.
NMPC has emerged as an advanced closed-loop solution, offering distinct advantages for handling the complex nonlinear dynamics and operational constraints of horticultural systems [1,2]. NMPC has been applied to diverse objectives, such as reducing energy and water consumption [10], improving temperature control and energy utilization [11], and enabling smart energy management in plant factories [12]. Other notable applications include NMPC based on Volterra series models for temperature regulation [13].
To address system uncertainties, more advanced NMPC formulations have been proposed, including multi-scenario MPC considering market price uncertainty [3] [García-Mañas et al.], robust MPC [14], and chance-constrained stochastic MPC [15]. Concepts like the advanced-step NMPC controller have also been explored [16]. In parallel, the integration of data-driven and AI-based methods—such as reinforcement learning (RL) [17,18] and deep neural networks [19]—has received increasing attention, aiming to enhance adaptability and performance. A recent comprehensive comparison between RL and NMPC on lettuce greenhouse climate control found that while RL can offer adaptability and lower computational demands, NMPC retains superior constraint handling and economic performance under certain scenarios [20]. While NMPC provides a robust framework, its real-world performance still heavily relies on effective disturbance handling and the integration of predictive intelligence of future uncertainties.

2.2. Approaches to Disturbance Handling and Prediction in Greenhouse Control

In greenhouse NMPC, disturbance management can be approached either reactively (feedback-only) or proactively (predictive). While traditional NMPC often relies on current disturbance measurements (feedback-only), incorporating multi-step forecasts from AI models enables proactive adaptation and can significantly enhance control performance. The importance of weather forecast horizons has been investigated, for instance, in Jansen’s work, which, although RL-focused, highlights the impact of forecast horizons [21]. Kuijpers et al. have modeled weather forecast errors and analyzed their impact on automated greenhouse climate control systems [22].
ML has demonstrated significant advancements in general weather forecasting, as indicated in recent surveys [5,23]. For specific greenhouse applications, Esparza-Gómez et al. successfully applied a Recurrent Neural Network (RNN) with an LSTM model for temperature prediction, further illustrating the promise of ML for microclimate forecasting in precision agriculture [4]. Hybrid models that integrate neural networks with first-principles dynamics offer promising accuracy and robustness for real-time disturbance and state prediction in complex systems [23]. Recent advances in Bayesian deep learning, such as Bayesian Neural ODEs, have enabled greenhouse models to quantify prediction uncertainty, supporting robust decision-making and stochastic control [24]. However, the effective integration of these advanced ML-based predictions into NMPC and the quantification of their benefits alongside other operational aspects, such as computational load, remain active areas of research. Furthermore, robust NMPC formulations that inherently attempt to handle uncertainty can increase computational demands, raising concerns for real-time feasibility in smart greenhouse automation.

2.3. Techniques for Improving the Computational Performance of NMPC

A barrier to the widespread adoption of NMPC is its computational burden, particularly for nonlinear optimization problems that need to be solved in real-time [25]. Numerical methods such as direct multiple shooting are commonly employed to solve NMPC problems [26,27]. Efficient structure-exploiting approaches, such as block structured factorization and condensing, offer distinct computational advantages depending on the problem characteristics [27].
To accelerate the solution process, warm-start initialization is a key strategy. Diehl et al. discussed real-time iteration schemes for NMPC, where warm-starting is a crucial component for achieving efficiency [6]. The real-time iteration scheme leverages shifting and warm-starting of previous solutions to enable fast convergence, even for nonlinear problems [28]. The general NMPC literature also acknowledges the benefits of warm-starts in reducing computation time for successive optimization problems. While the computational benefits of warm-starting are recognized in the general NMPC context, its specific impact on long-cycle smart agricultural applications, when systematically compared with different disturbance prediction strategies, requires more detailed investigation.
As the above review demonstrates, while prior studies have made important advances in NMPC, AI-based disturbance prediction, and real-time optimization techniques, a unified, long-term comparative evaluation integrating these strategies under practical smart greenhouse scenarios remains missing. By addressing this gap, the present work delivers a comprehensive analysis and actionable insights for both research and practical greenhouse management.

3. Lettuce Greenhouse Model

This work uses a validated greenhouse model by van Henten [7,8] to describe climate dynamics and lettuce growth. An overview of the model is presented in Figure 1. The model includes four state variables: lettuce dry weight (biomass), indoor CO2 concentration, air temperature, and humidity. The control inputs are CO2 injection rate, ventilation opening, and heating power. In Figure 1, labels and connections distinguish the control inputs, system measurements (derived from state variables), and external disturbances, with interactions represented by dashed lines. The discrete-time state-space model is formulated as:
x k + 1 = f x k , u k , d k , p y k = g x k , p
Here, k Z + denotes the discrete time, x k R 𝟜 represents the state variables, y k R 𝟜 is the output, u k R 𝟛 denotes the control inputs, and d k R 𝟜 represents the (weather) disturbances. Table 1 provides the meaning of all signals. The parameter vector p R 𝟚𝟠 , along with the nonlinear functions f and g , is detailed in (2) and (4), respectively.
The dynamic model of the lettuce greenhouse is detailed with the nonlinear functions f   a s :
d x 1 t d t = p 1 ϕ p h o t , c t p 2 x 1 t 2 x 3 t / 10 5 / 2 d x 2 t d t = 1 p 9 ϕ p h o t , c t + p 10 x 1 t 2 x 3 t / 10 5 / 2 + 10 6 u 1 t ϕ vent , c t d x 3 t d t = 1 p 16 u 3 t 10 3 p 17 u 2 t + p 18 x 3 t d 3 t + p 19 d 1 t d x 4 t d t = 1 p 20 ϕ transp , h t ϕ vent , h t
with the flux terms are defined as:
ϕ phot , c t = 1 e p 3 x 1 t p 4 d 1 t p 5 x 3 2 t + p 6 x 3 t p 7 x 2 t p 8 p 4 d 1 t + p 5 x 3 2 t + p 6 x 3 t p 7 x 2 t p 8 ϕ transp , h t = p 21 1 e p 3 x 1 t p 22 p 23 x 3 t + p 24 e p 25 x 3 t x 3 t + p 26 x 4 t ϕ vent , c t = 10 3 u 2 t + p 11 x 2 t d 2 t ϕ vent , h t = 10 3 u 2 t + p 11 x 4 t d 4 t
Here, t R represents continuous time. The terms ϕ phot , c t ,   ϕ vent , c t , ϕ transp , h t , and ϕ vent , h   t correspond to the gross photosynthesis rate, C O 2 mass exchange through ventilation, canopy transpiration, and H 2 O exchange through ventilation, respectively.
The output equations g are defined as:
y 1 t = 10 3 x 1 t g   m 2 y 2 t = 10 6 p 12 x 3 t + p 13 p 14 p 15 x 2 t , p p m y 3 t = x 3 t , °C y 4 t = 10 2 p 12 x 3 t + p 13 11 e p 27 x 3 t x 3 t + p 28 x 4 t , %
The specific values adopted for the model parameters p are summarized in Table 2.

4. NMPC Formulation

This section details the NMPC framework employed for precision climate control in smart greenhouse environments. It outlines the specific control objectives, describes the economic and operational constraints, and the strategies used to integrate AI-based disturbance forecasting and real-time computational acceleration.

4.1. Control Objectives and Constraints

The primary objective of the NMPC controller is to maximize crop profitability while ensuring precision environmental control. This profit is defined as the revenue from the accumulated shoot biomass minus the operational costs associated with CO2 injection and heating power usage. To formulate this control objective, an NMPC problem is defined as follows.
At each time instant t , the NMPC controller solves the following finite-horizon optimization problem:
m i n { u ( t + k | t ) , ε ( t + k | t ) } k = 0 N p 1 J subject   to :          x ( t + k + 1 | t ) = f x ( t + k | t ) , u ( t + k | t ) , d ( t + k | t ) ,          y ( t + k | t ) = g x ( t + k | t ) ,          u m i n u ( t + k | t ) u m a x ,          u ( t + k | t ) u ( t + k 1 | t ) Δ u m a x ,          y m i n ( t + k ) ε ( t + k | t ) y ( t + k | t ) y m a x ( t + k ) + ε t + k t          ε ( t + k | t ) 0 , for   k = 0 , , N p 1 .
Here, x ( t + k | t ) denotes the predicted state at time t + k based on information available at time t , u ( t + k | t ) is the control input, d ( t + k | t ) is the disturbance prediction, y ( t + k | t ) is the predicted output, and ε j ( t + k | t ) are slack variables associated with the soft output constraints.
The cost function J to be minimized is given by:
J = k = 0 N p 1 q y 1 y 1 t + k + 1 t y 1 t + k t + i = 1 3 q u i u i t + k t + i = 1 4 ρ i ε i 2 t + k + 1 t
where
y 1 ( t + k | t ) is the predicted shoot dry biomass at stage t + k ( k = 0 , , N p 1 ).
q y 1 > 0 is the economic weight associated with incremental biomass production.
q u i > 0 are economic weights reflecting the costs of CO2 injection ( u 1 ) and heating ( u 3 ); ventilation ( u 2 ) is omitted from penalization, as the employed model assumes natural ventilation with the ventilation rate determined by the window opening actuated by a motor; consequently, the energy cost associated with ventilation control is considered negligible [7,8,9].
ρ i > 0 are penalty weights on the squared slack variables ε i to regulate the extent and frequency of output constraint violations.
Penalty weight selection: In this study, the slack penalty weights for output constraints were not set to a single large value for all outputs, as is common in some related works. Instead, we assigned penalty weights inversely proportional to the amplitude of each output’s constraint bounds. This normalization ensures balanced treatment of constraint violations, regardless of output units or scales. For instance, outputs with large feasible ranges (e.g., biomass) are assigned smaller penalty weights, while those with narrow ranges (e.g., temperature, humidity) are assigned higher penalties. This strategy allows the optimizer to penalize relative violations consistently, improving interpretability and controlling fairness across heterogeneous outputs. Notably, the biomass constraint was always satisfied in all simulations, consistent with biological principles and the model structure; hence, its penalty was set arbitrarily high, with no effect on control outcomes. As a result, the penalties were set as follows: ρ1 = 105, ρ2 = 103, ρ3 = 105, ρ4 = 104.
Output Constraints: Time-varying constraints on temperature, humidity, and CO2—adapted dynamically based on solar radiation—reflect horticultural best practices for energy-efficient regulation. The bounds for the full output vector are given by:
y m i n ( t + k ) = 0 , f c o 2 , m i n ( t + k ) , f t e m p , m i n ( t + k ) , 50 T y m a x ( t + k ) = , f c o 2 , m a x ( t + k ) , f t e m p , m a x ( t + k ) , 80 T
Temperature bounds are time-varying functions of solar radiation d 1 ( t + k | t ) :
f temp , min   t + k = 10   if   d 1 ( t + k | t ) < 10   W / m 2 22   otherwise   f temp , max   t + k = 15   if   d 1 ( t + k | t ) < 10   W / m 2 27   otherwise  
CO2 bounds are time-varying functions of solar radiation d 1 ( t + k | t ) :
f co 2 , min   t + k = 0   if   d 1 ( t + k | t ) < 10   W / m 2 500   otherwise   f co 2 , max   t + k = 1600
This radiation-dependent setpoint strategy aims to optimize crop growth conditions while promoting energy conservation, based on established horticultural principles. During periods of low incident solar radiation ( d 1 ( t + k | t )  < 10 W / m 2 ), typically corresponding to night-time or heavily overcast conditions where photosynthetic activity is minimal, a cooler temperature range (10–15 °C for lettuce, as per Equation (8)) is maintained to reduce heating costs [29,30,31]. Conversely, under higher solar radiation levels, the permissible temperature range is elevated (22–27 °C, as per Equation (8)) to better support active photosynthesis, aligning with reported optimal daytime temperatures [29,30,31].
For CO2 management (as Equation (9), a radiation-dependent approach sets the minimum concentration ( f co 2 , min   ) at 0 ppm during very low light conditions ( d 1 ( t + k | t ) < 10 W / m 2 ), and 500 ppm otherwise, with an upper limit ( f co 2 , max   ) of 1600 ppm. This strategy, particularly the enrichment up to 1600 ppm during active photosynthesis, aligns with horticultural recommendations for optimal lettuce growth, which often suggest levels between 1000 and 1500 ppm [29,30], while reducing enrichment in low light conserves resources [30].
Furthermore, the relative humidity range of 50–80% is supported by findings suggesting optimal ranges within this span [29,30].

4.2. Disturbance Handling Approaches

Three approaches for handling external weather disturbances d ( k ) within the NMPC framework are implemented:
  • Feedback-Only Control (NMPC-C): This approach incorporates the currently measured disturbance d ( t ) and assumes it remains constant over the entire prediction horizon N p : d ( t + k t ) = d ( t ) , for k = 0 , , N p 1 . This represents a reactive control strategy with no foresight.
  • ML-Based Preview (NMPC-P): This controller utilizes current disturbance measurements d ( t | t ) = d ( t ) for the initial control step ( k = 0 ). For the remainder of the prediction horizon ( k = 1 , , N p 1 ), it integrates multivariate disturbance forecasts generated by an LSTM neural network. Thus, the combined sequence matches the full NMPC prediction horizon.
    The LSTM leverages a sequence of recent historical disturbance measurements (defined by a lookback window of L steps) to predict the future evolution of key weather variables ( d 1 , , d 4 ) over the subsequent N p 1 steps.
    At each control interval, the NMPC controller collects the most recent L measurements of all disturbance variables, feeds them to the LSTM, receives a multi-step forecast of length N p 1 , and concatenates this forecast with the current measured disturbance to form the disturbance trajectory of length N p used in the NMPC optimization problem:
    [ d ( t | t ) , d ( t + 1 | t ) , , d ( t + N p 1 | t ) ]
    Here, d ( t | t ) is the current measured disturbance, and d ( t + k | t ) ( k = 1 , , N p 1 ) are the LSTM-generated forecasts. Details on the LSTM architecture, input features, and training data are provided in Section 5.1.
  • Ideal Preview (NMPC-I): This ideal scenario assumes perfect, error-free knowledge of future disturbances d ( t + k ) over the prediction horizon. This serves as an upper-bound benchmark for the potential benefits of disturbance prediction.
The implementation of these strategies allows for a direct comparison of feedback, data-driven preview, and ideal disturbance information in greenhouse NMPC.

4.3. Warm-Start Initialization

To improve computational efficiency and solver convergence, a warm-start initialization strategy is employed for selected NMPC configurations (CW, PW, IW). At each control interval at time t , the optimal solution from the previous time step t 1 is used as the initial guess for the current optimization problem. The solution horizon shifted forward by one step, and the last value was duplicated to maintain horizon length.
Formally, if the previous solution was:
U t 1 = [ u ( t 1 ) , , u ( t 1 + N p 1 ) ]
then the warm start at time t is constructed as, denoted with a superscript (0):
U t ( 0 ) = [ u ( t ) , , u ( t + N p 2 ) , u ( t + N p 2 ) ]
This warm-start mechanism preserves the temporal structure of the control sequence and has been shown to substantially reduce solver iterations and computation time, particularly in scenarios with slow system dynamics or small setpoint changes. In this study, both cold-start and warm-start options are systematically compared across all disturbance-handling strategies to assess their impacts on computational and control performance.

5. Simulation Setup

This section details the generation of environmental disturbances, the performance metrics, the controller comparison approaches, and the parameters used for the NMPC simulations for evaluating the different control strategies.

5.1. Disturbance Generation and Pre-Processing

The NMPC controllers were evaluated using realistic environmental disturbances generated as follows:
Outdoor air temperature, relative humidity, and global solar radiation data were retrieved from the NASA POWER (Prediction Of Worldwide Energy Resources) database [32] for the location of Thai Nguyen, Vietnam (21.5962° N, 105.8471° E). This database served as the source for two distinct datasets:
Simulation Dataset: For the purpose of controller evaluation via simulation, data were collected for the period 1 November 2020 to 10 December 2020 (40 days). This period was selected as it represents typical conditions for an early winter cultivation cycle in this region. The original hourly data for this 40-day period were linearly interpolated to achieve a 15 min resolution, matching the NMPC control interval.
LSTM Training and Validation Dataset: The LSTM model, responsible for generating weather previews (as described in Section 4.2), was trained and validated using historical data from the period 12 November 2016 to 31 October 2020 (i.e., all data prior to the simulation/test period). This extensive dataset was also processed to a 15 min resolution.
Daily averaged atmospheric CO2 concentrations were initially extracted from OCO-2 (Orbiting Carbon Observatory 2) Level 3 data products [33]. To introduce more realistic diurnal variations crucial for greenhouse control, a Gaussian-modulated model was applied to these daily averages:
CO 2 t = C b a s e + A e T o u t T o p t 2 2 σ 2 α R t
where
CO 2 t is the synthesized outdoor CO2 concentration (ppm) at time t;
C b a s e : Base CO2 concentration (daily averages) (ppm);
A : Scaling factor for temperature impact;
T o u t ( t ) is the outdoor temperature (°C);
T o p t : Optimal temperature for photosynthesis (°C);
σ : Standard deviation for temperature effect;
α : Sensitivity factor for solar radiation impact;
R t : Incident solar radiation (W/m2).
The parameters were set as: A = 100, Topt = 22 °C, σ = 5, α = 0.04 ppm/(W/m2), chosen to reflect typical ambient variations and plant uptake influences, consistent with literature values for similar environments [29]. The resulting disturbance profiles used for the 40-day NMPC simulations are shown in Figure 2.
LSTM-based Weather Preview (for NMPC-P/PW): The 5.75 h (23-step) weather preview for the four disturbance variables ( d 1 , d 2 , d 3 , d 4 ) was generated using an LSTM model. The model architecture consisted of three LSTM layers with 128, 64, and 32 units, respectively. Dropout layers with a rate of 0.2 were included after the first two LSTM layers for regularization. These were followed by a separate dense output layer with a ReLU activation function for each predicted disturbance variable. The model used a lookback window of L = 20 steps (5 h) with 15 min interval data to predict the next W = 23 steps. The LSTM model was trained using an 80/10/10 train/validation/test split and optimized with the Adam algorithm, minimizing the mean squared error loss function. Training was conducted for up to 50 epochs, with a batch size of 32.
Upon completion of training, the LSTM disturbance forecast model demonstrated robust predictive performance across all weather variables. Table 3 summarizes the MAE and RMSE metrics for the train, validation, and test sets. Low error values were achieved for temperature, humidity, and CO2, whereas higher errors were observed for solar radiation due to its greater variability.

5.2. Controller Comparison Approaches

To facilitate direct comparison, Table 4 summarizes the six NMPC controller variants evaluated in this study. These configurations differ in their approaches to disturbance handling (feedback, ML-based preview, ideal preview) and solver initialization (cold-start, warm-start). This systematic classification enables a clear assessment of the individual and combined effects of forecast strategy and warm-start initialization on greenhouse control performance. Detailed analysis and discussion of these variants are provided in Section 6.

5.3. Performance Metrics

Controller performance was evaluated using the following KPIs:
Final Biomass ( B f , g/m2)
Total shoot dry mass of lettuce at harvest (end of simulation):
B f = y 1 ( N s )
where y 1 ( k ) is the shoot dry mass (g/m2) at simulation step k , and N s is the total number of simulation steps.
Net Profit ( P n e t , Hfl/m2)
Net profit is calculated as the revenue from harvested lettuce minus the total operating costs for CO2 and heating:
P n e t = R b i o ( C CO 2 + C h e a t )
where
Revenue from biomass ( R b i o , Hfl/m2):
R b i o = c p B f 10 3
CO2 cost ( C C O 2 , Hfl/m2):
C C O 2 = c C O 2 k = 0 N s 1 u 1 ( k ) Δ t 10 6
Heating cost ( C h e a t , Hfl/m2):
C h e a t = c h k = 0 N s 1 u 3 ( k ) Δ t
where c p is the lettuce price (Hfl/kg), c C O 2 the CO2 cost (Hfl/kg), and c h the heating cost (Hfl/J). The term B f 10 3 converts biomass from g/m2 to kg/m2; u 1 ( k ) Δ t 10 6 is total CO2 supplied (kg/m2); and u 3 ( k ) Δ t is total heating energy used (J/m2). All other variables are as defined in Section 2.
Biomass Cost ( C b i o , Hfl/kg)
Operating cost per kilogram of harvested biomass:
C b i o = C C O 2 + C h e a t B f 10 3
Constraint Violation Index ( V i , %)
The average normalized violation of each output constraint y i , i [ 1 , 4 ] , is calculated as:
V i = 100 N s k = 0 N s 1 v i ( k )
where the normalized violation at each time step v i ( k ) is defined as:
v i ( k ) = 0 , if   y i , m i n ( k ) y i ( k ) y i , m a x ( k ) y i ( k ) y i , m a x ( k ) y i , m a x ( k ) y i , m i n ( k ) , if   y i ( k ) > y i , m a x ( k ) y i , m i n ( k ) y i ( k ) y i , m a x ( k ) y i , m i n ( k ) , if   y i ( k ) < y i , m i n ( k )
where y i ( k ) is the value of output i at time step k , and y i , m a x ( k ) , y i , m i n ( k ) are its time-varying upper and lower bounds, respectively.
The primary indices reported are: V B = V 1 , V C = V 2 , V T = V 3 , V H = V 4 .
Aggregated Constraint Violation Index ( V t o t a l ,   % )
An aggregated measure of all individual constraint violation indices:
V t o t a l = i = 1 4 V i
This value provides an overall measure of constraint adherence.
Average Solver Time ( T s o l , s)
The mean CPU time required by the IPOPT solver to find the solution to the NMPC optimization problem at each control interval.

5.4. Simulation Parameters

Key parameters for the NMPC simulations are summarized in Table 5. The prediction horizon ( N p = 24 steps, 6 h) was selected to effectively capture daily environmental variability, enabling proactive climate control while maintaining computational feasibility at a 15 min control interval. This horizon also aligns with the effective forecast window of typical short-term weather prediction models [21,23].
Economic weights in the objective function were chosen to prioritize biomass accumulation ( q y 1 ) , while relatively smaller weights for CO2 injection ( q u 1 ) and heating input ( q u 3 ) were assigned to penalize excessive resource consumption, reflecting their operational costs and promoting resource efficiency (Equation (6)). The control signal ranges and rate limits are based on standard actuator capacities and established horticultural practices for lettuce production [18,20,21]. Cost coefficients for profit calculation, including lettuce price and unit costs for heating energy and CO2, are adopted from the literature [18,20].
The nonlinear optimization problem arising from the NMPC formulation is solved using a direct multiple shooting approach, implemented in Python (version 3.11.9) via the CasADi automatic differentiation framework [34]. The IPOPT solver [35] is used for nonlinear programming. The system dynamics (Equations (1)–(3)) are discretized using a fixed-step forward Euler method with a sampling time of 15 min (900 s), which also corresponds to the control interval. For controller configurations that employ warm-start initialization (Section 4.3), IPOPT’s warm-start features are activated by providing the shifted solution from the previous time step as the initial guess. All simulations are run on an Intel i7-4810MQ CPU with 20GB RAM.

6. Results and Discussion

This section presents and discusses the comparative performance of the six NMPC configurations (C, CW, P, PW, I, and IW) detailed in Section 5.2. The evaluation focuses on agronomic outcomes (biomass yield, constraint satisfaction), economic efficiency (net profit, operational costs), and computational performance (solver time). The discussion is organized based on two primary timescales: short-term (first 3 days) and full-cycle (40 days), followed by a general discussion of trade-offs and controller selection.

6.1. Short-Term (3-Day) Performance

Figure 3 presents the time evolution of four key system outputs—biomass, internal CO2 concentration, temperature, and relative humidity—over a 72 h simulation for six NMPC configurations (C, CW, P, PW, I, IW). The biomass plot shows similar growth patterns among all controllers, indicating comparable crop development. The CO2 concentration plot reveals that C and CW maintain higher and more stable daytime CO2 levels, supporting enhanced photosynthetic activity, while the other configurations regulate CO2 more conservatively. The temperature and humidity plots demonstrate that all controllers keep these variables within safe bounds, with some fluctuations corresponding to environmental changes and control actions. Overall, this figure highlights the ability of all NMPC configurations to maintain suitable conditions for crop growth, with clear differences in resource management and environmental stability.
Figure 4 illustrates the control signals generated by the NMPC controllers for CO2 injection, ventilation, and heating during the same simulation period for the six configurations. The C and CW controllers apply CO2 in large, stable pulses, while the predictive configurations (P, PW, I, IW) use smaller, more frequent, and dispersed doses to optimize CO2 usage. Ventilation signals show that C and CW often adopt an on/off approach, whereas the predictive controllers adjust ventilation with higher frequency and smaller amplitude to more precisely regulate the internal climate. Heating is activated in cycles, mainly during cooler periods, with predictive controllers exhibiting more frequent and flexible power adjustments. These results demonstrate distinct control strategies, where C and CW focus on maximizing growth, while P, PW, I, and IW prioritize efficient resource utilization and operational cost savings.
Table 6 summarizes the short-term performance (first 72 h) of all six NMPC controllers. Final biomass after 3 days is highest for NMPC-C and NMPC-CW controllers (7.489 and 7.490 g/m2), slightly higher than for the predictive (P, PW: 7.369 g/m2) and ideal controllers (I, IW: 7.347, 7.348 g/m2). Total constraint violation ( V t o t a l ) is similar across all controllers (≈8.7%). The average solver time is substantially reduced in warm-started controllers (CW: 0.299 s, PW: 0.404 s, IW: 0.302 s) compared to their non-warm-started counterparts (C: 0.489 s, P: 1.188 s, I: 0.897 s). Furthermore, for each pair of controllers with and without warm-start, the output values are nearly identical, as visually confirmed by the almost overlapping trajectories in Figure 3 and Figure 4, and quantitatively reinforced by the summarized data in Table 6, where performance metrics such as biomass, constraint violations, and profit differ by less than 0.1% between each pair. This demonstrates that, under the tested conditions, the use of warm-start mainly improves computational efficiency without significantly affecting the control quality or agronomic outcomes. For subsequent full-cycle analysis, only the warm-started controllers (CW, PW, IW) are visualized for clarity.

6.2. Full Horizon (40-Day) Performance

The full 40-day cultivation cycle simulation provided comprehensive performance data for all six NMPC controller variants. Table 7 presents the KPIs, including final biomass, constraint violation indices, net profit, and average solver times. Figure 5, Figure 6, Figure 7, Figure 8, Figure 9, Figure 10 and Figure 11 offer detailed visualizations of the system’s dynamic behavior, economic outcomes, constraint adherence, resource utilization, and computational performance across these configurations.

6.2.1. Disturbance Handling Strategy Performance

As detailed in Table 7, NMPC-C and NMPC-CW achieved the highest final biomass (approximately 217.4 g m−2 and 217.5 g m−2, respectively) and, consequently, the highest net profit (approximately 2.658 Hfl m−2 and 2.663 Hfl m−2, respectively). This superior productivity can be attributed to the controllers’ tendency to maintain high CO2 concentrations during periods of sufficient light, thereby maximizing photosynthetic activity, as evidenced by the higher assimilation rates shown in Figure 10. However, this reactive and aggressive approach—due to the controllers’ lack of future disturbance information—resulted in the highest rates of constraint violations among all strategies, particularly for temperature and humidity setpoints (Figure 8). While these controllers incurred the greatest operational costs related to CO2 injection (Figure 7 and Figure 9), their heating costs were lower than those of the predictive controllers (Figure 7). This suggests that C and CW responded only to current conditions and did not proactively increase heating in anticipation of future humidity or temperature violations. Despite higher CO2 consumption, their biomass cost ( C b i o ) remains competitive due to substantial yield gains.
The integration of future disturbance information, whether from an ML-based preview (P, PW) or an ideal forecast (I, IW), enabled these controllers to proactively adjust control actions in anticipation of upcoming environmental fluctuations. As a result, they achieved lower overall constraint violations—particularly for temperature and relative humidity—compared to the feedback-only controllers (Figure 8). This improved constraint adherence was primarily accomplished through more conservative CO2 dosing as well as strategic increases in heating to preempt periods of elevated humidity or temperature (Figure 6). While these controllers reduced total CO2 costs (Figure 7 and Figure 9), they exhibited slightly higher heating costs than their feedback-only counterparts (Figure 7), reflecting a deliberate trade-off between resource efficiency and stricter climate control.

6.2.2. Warm-Start Initialization Performance

Across all disturbance handling approaches, warm-starting the solver (CW, PW, IW) consistently yielded substantial improvements in computational efficiency without adverse effects on agronomic or economic outcomes. Average solver times, as shown in Table 7 and Figure 11, were reduced by approximately 30–60% compared to their cold-start counterparts. For instance, NMPC-CW (0.320 s) was considerably faster than NMPC-C (0.457 s), and NMPC-IW (0.308 s) outperformed NMPC-I (0.908 s). This reduction in both the mean and variance of solver times is crucial for ensuring the feasibility and reliability of NMPC in real-time greenhouse operations. The warm-started controllers (CW, PW, IW) exhibited both lower average solver times and a more concentrated distribution of solution times compared to their non-warm-started counterparts, as illustrated in Figure 11.

6.3. Discussion of Trade-Offs and Controller Selection

The comparative analysis conducted in Section 6.2 clearly reveals a fundamental trade-off inherent in the selection of NMPC strategies. On one hand, feedback-only controllers (C, CW) excel at maximizing final yield and profit by aggressively managing CO2 enrichment and overall climate conditions to consistently favor robust plant growth. However, this approach inherently leads to higher CO2 consumption and a greater tendency for the system to operate at or occasionally slightly beyond predefined operational constraint boundaries (Figure 8 and Figure 9). Heating expenditures for these controllers are generally lower, as they do not proactively compensate for future environmental changes (Figure 7). On the other hand, predictive controllers (P, PW, I, IW) demonstrate superior performance in minimizing constraint violations and reducing CO2 costs (Figure 7 and Figure 8). This enhanced efficiency and constraint safety is achieved through more cautious and anticipatory control actions, supported by access to future disturbance information, albeit typically involving a modest sacrifice in maximum potential yield, and consequently, net profit (Table 7). This observed trade-off between productivity and strict constraint adherence is a common challenge in greenhouse climate control, as highlighted by recent studies [15,20].
The choice of an optimal NMPC strategy should therefore be guided by the specific operational priorities and economic context of the greenhouse. If maximizing output is paramount and the system can tolerate minor deviations from setpoints, NMPC-CW presents a compelling option due to its high yield, profitability, and computational efficiency. This aligns with recent research emphasizing yield optimization in horticulture [20]. If, however, strict adherence to climate setpoints, energy conservation, or CO2 emission reduction is the primary concern, a predictive strategy such as NMPC-PW may be more suitable, offering a favorable balance between proactive control, resource savings, and computational feasibility. The ideal preview controllers (I, IW) serve as important theoretical benchmarks, highlighting the potential gains from perfect foresight. The results also suggest that while the economic weights in the NMPC objective function influence the trade-off between productivity and resource use, the penalty factors for constraint violations predominantly determine the overall degree of constraint violation and play a crucial role in ensuring system safety. With appropriately tuned penalties, all evaluated controllers maintained the greenhouse environment within broadly acceptable limits for lettuce cultivation.
To evaluate the practical implications of measurement uncertainty, we conducted a sensitivity analysis examining how a ±10% error in final biomass ( B f ) estimation impacts net profit calculations for each NMPC controller. Our findings, summarized in Table 8, show that while net profit is linearly related to B f (Equations (14) and (15)) and, thus, fluctuates directly with measurement error, the relative ranking of controller performance remains robust. This indicates that our main conclusions are valid even under realistic measurement uncertainties in crop yield, reinforcing the robustness of the proposed NMPC strategies for practical application.

7. Conclusions

This study comprehensively evaluated advanced NMPC strategies integrating AI-driven components for climate control in smart greenhouse systems, emphasizing the impacts of disturbance prediction and warm-start initialization through extensive 40-day simulations of a lettuce greenhouse model across six distinct controller configurations. The findings revealed a clear trade-off: controllers employing only real-time feedback (NMPC-C, NMPC-CW) consistently maximized final biomass and profit by maintaining elevated CO2 levels, which facilitated greater CO2 assimilation; however, this approach also increased constraint violations. Conversely, strategies utilizing LSTM-based disturbance prediction (NMPC-P, NMPC-PW) or ideal foresight (NMPC-I, NMPC-IW) demonstrated improved resource efficiency and enhanced adherence to operational constraints, often by adopting more cautious CO2 supplementation, albeit at the expense of slightly lower yields. Crucially, warm-start initialization proved highly effective across all controller types, significantly reducing average solver computation times by up to 60% without any discernible impact on control performance or output quality, thereby underscoring its practical value for real-time automation in smart greenhouse control. Furthermore, the study highlighted that while economic objective weights influence the balance between productivity and resource expenditure, the satisfaction of operational constraints is predominantly governed by the selection of appropriate penalty parameters. The selection of an optimal NMPC strategy should therefore be guided by specific operational priorities, whether that is maximizing yield and economic returns, minimizing resource consumption and environmental impact, or strictly enforcing climate setpoints; regardless of the chosen control logic, the adoption of warm-start techniques is strongly recommended to ensure computational feasibility in practical real-time AI-driven smart greenhouse applications.
While this research provides valuable insights, its foundation on simulation-based evaluations using a specific lettuce crop model, a validated greenhouse climate model from Wageningen Agricultural University, and particular environmental conditions (Thai Nguyen, Vietnam) underscores the necessity for further investigation. Key limitations include the simplification of real-world atmospheric CO2 dynamics and microclimate variations by the synthetic CO2 model and gridded NASA POWER weather data, respectively, as well as the use of a pre-trained, static ML-based weather predictor. Additionally, the NMPC formulation did not incorporate online model parameter adaptation to address potential model–plant mismatch over extended cultivation periods, focused on a single set of tuning parameters (economic weights and constraint penalties), excluded the energy cost associated with natural ventilation as it is considered negligible in the assumed model, and excluded considerations of external economic factors like market price volatility or detailed physiological aspects such as air circulation’s impact on tipburn. Building upon these limitations, future research should prioritize on-site experimental validation in diverse greenhouse settings and across different crop types. Developing adaptive NMPC frameworks that integrate online learning for both process models and disturbance predictors, performing comprehensive sensitivity analyses for tuning parameters, and incorporating broader economic and parametric uncertainties will be crucial for advancing more resilient, efficient, and economically optimal greenhouse control systems for sustainable horticulture.

Author Contributions

Conceptualization, H.L.L. and V.-T.B.; methodology, H.L.L. and V.-T.B.; software, V.-T.B.; validation, H.L.L. and V.-T.B.; formal analysis, H.L.L. and V.-T.B.; resources, V.-T.B.; data curation, V.-T.B.; writing—original draft preparation, V.-T.B.; writing—review and editing, H.L.L.; visualization, H.L.L. and V.-T.B.; project administration, H.L.L.; funding acquisition, H.L.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Ministry of Education and Training, Vietnam, under grant number B2023-TNA-21.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The input data for environmental drivers and atmospheric CO2 concentrations are publicly available from the NASA POWER Project (https://power.larc.nasa.gov, accessed on 15 April 2025) and the NASA OCO-2 Science Team (https://oco2.gesdisc.eosdis.nasa.gov, accessed on 15 April 2025), respectively, as cited in the manuscript. The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Findeisen, R.; Allgöwer, F. An Introduction to Nonlinear Model Predictive Control. In Proceedings of the 21st Benelux Meeting on Systems and Control, Veldhoven, The Netherlands, 19–21 March 2002; pp. 119–141. [Google Scholar]
  2. Kouvaritakis, B.; Cannon, M. Model Predictive Control: Classical, Robust and Stochastic; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
  3. García-Mañas, F.; Rodríguez, F.; Berenguel, M.; Maestre, J.M. Multi-Scenario Model Predictive Control for Greenhouse Crop Production Considering Market Price Uncertainty. IEEE Trans. Autom. Sci. Eng. 2024, 21, 2936–2948. [Google Scholar] [CrossRef]
  4. Esparza-Gómez, J.M.; Guerrero-Osuna, H.A.; Ornelas-Vargas, G.; Luque-Vega, L.F. RNN-LSTM Applied in a Temperature Prediction Model for Greenhouses. Res. Comput. Sci. 2021, 150, 31–41. [Google Scholar]
  5. Chen, L.; Han, B.; Wang, X.; Zhao, J.; Yang, W.; Yang, Z. Machine Learning Methods in Weather and Climate Applications: A Survey. Appl. Sci. 2023, 13, 12019. [Google Scholar] [CrossRef]
  6. Diehl, M.; Bock, H.G.; Schlöder, J.P. A Real-Time Iteration Scheme for Nonlinear Optimization in Optimal Feedback Control. SIAM J. Control Optim. 2005, 43, 1714–1736. [Google Scholar] [CrossRef]
  7. Van Henten, E.J. Greenhouse Climate Management: An Optimal Control Approach; Landbouwuniversiteit Wageningen: Wageningen, The Netherlands, 1994. [Google Scholar]
  8. Van Henten, E.J. Sensitivity Analysis of an Optimal Control Problem in Greenhouse Climate Management. Biosyst. Eng. 2003, 85, 355–364. [Google Scholar] [CrossRef]
  9. Van Henten, E.J.; Bontsema, J. Time-Scale Decomposition of an Optimal Control Problem in Greenhouse Climate Management. Control Eng. Pract. 2009, 17, 88–96. [Google Scholar] [CrossRef]
  10. Blasco, X.; Martinez, M.; Herrero, J.M.; Ramos, C.; Sanchis, J. Model-Based Predictive Control of Greenhouse Climate for Reducing Energy and Water Consumption. Comput. Electron. Agric. 2007, 55, 49–70. [Google Scholar] [CrossRef]
  11. Mahmood, F.; Govindan, R.; Bermak, A.; Yang, D.; Al-Ansari, T. Data-Driven Robust Model Predictive Control for Greenhouse Temperature Control and Energy Utilisation Assessment. Appl. Energy 2023, 343, 121190. [Google Scholar] [CrossRef]
  12. Hu, G.; You, F. AI-Enabled Cyber-Physical-Biological Systems for Smart Energy Management and Sustainable Food Production in a Plant Factory. Appl. Energy 2024, 356, 122334. [Google Scholar] [CrossRef]
  13. Gruber, J.K.; Guzmán, J.L.; Rodríguez, F.; Bordons, C.; Berenguel, M.; Sánchez, J.A. Nonlinear MPC Based on a Volterra Series Model for Greenhouse Temperature Control Using Natural Ventilation. Control Eng. Pract. 2011, 19, 354–366. [Google Scholar] [CrossRef]
  14. Boersma, S.; Sun, C.; Van Mourik, S. Robust Sample-Based Model Predictive Control of a Greenhouse System with Parametric Uncertainty. In Proceedings of the IFAC AGRICONTROL 2022, Munich, Germany, 14–16 September 2022. [Google Scholar]
  15. Svensen, J.L.; Cheng, X.; Boersma, S.; Sun, C. Chance-Constrained Stochastic MPC of Greenhouse Production Systems with Parametric Uncertainty. Comput. Electron. Agric. 2024, 217, 108578. [Google Scholar] [CrossRef]
  16. Zavala, V.M.; Biegler, L.T. The Advanced-Step NMPC Controller: Optimality, Stability and Robustness. Automatica 2009, 45, 86–93. [Google Scholar] [CrossRef]
  17. Gros, S.; Zanon, M. Data-Driven Economic NMPC Using Reinforcement Learning. IEEE Trans. Automat. Control 2020, 65, 636–648. [Google Scholar] [CrossRef]
  18. Mallick, S.; Airaldi, F.; Dabiri, A.; Sun, C.; De Schutter, B. Reinforcement Learning-Based Model Predictive Control for Greenhouse Climate Control. Smart Agric. Technol. 2025, 10, 100751. [Google Scholar] [CrossRef]
  19. Mallick, S.; Airaldi, F.; Dabiri, A.; Sun, C.; De Schutter, B. Deep Neural Network Based Optimal Control of Greenhouses. In Proceedings of the 2024 European Control Conference (ECC), Stockholm, Sweden, 25–28 June 2024. [Google Scholar] [CrossRef]
  20. Morcego, B.; Yin, W.; Boersma, S.; Van Henten, E.; Puig, V.; Sun, C. Reinforcement Learning Versus Model Predictive Control on Greenhouse Climate Control. Comput. Electron. Agric. 2023, 215, 108372. [Google Scholar] [CrossRef]
  21. Jansen, Y.T.G. Optimal Control of Lettuce Greenhouse Horticulture Using Model-Free Reinforcement Learning: An Investigation on the Effect of Short-Term Weather Forecast Horizons. Master’s Thesis, Utrecht University, Utrecht, The Netherlands, 2022. [Google Scholar]
  22. Kuijpers, W.J.P.; Antunes, D.J.; Van Mourik, S.; Van Henten, E.J.; Van De Molengraft, M.J.G. Weather Forecast Error Modelling and Performance Analysis of Automatic Greenhouse Climate Control. Biosyst. Eng. 2022, 214, 207–229. [Google Scholar] [CrossRef]
  23. Zhang, H.; Liu, Y.; Zhang, C.; Li, N. Machine Learning Methods for Weather Forecasting: A Survey. Atmosphere 2025, 16, 82. [Google Scholar] [CrossRef]
  24. Boersma, S.; Cheng, X. A Bayesian Neural ODE for a Lettuce Greenhouse. In Proceedings of the 2024 IEEE Conference on Control Technology and Applications (CCTA), Newcastle upon Tyne, UK, 21–23 August 2024; pp. 782–786. [Google Scholar] [CrossRef]
  25. Zavala, V.M.; Anitescu, M. Real-Time Nonlinear Optimization as a Generalized Equation. SIAM J. Control Optim. 2010, 48, 5444–5467. [Google Scholar] [CrossRef]
  26. Quirynen, R.; Vukov, M.; Zanon, M.; Diehl, M. Autogenerating Microsecond Solvers for Nonlinear MPC: A Tutorial Using ACADO Integrators. Optim. Control Appl. Methods 2014, 36, 685–704. [Google Scholar] [CrossRef]
  27. Kirches, C.; Wirsching, L.; Bock, H.G.; Schlöder, J.P. Efficient Direct Multiple Shooting for Nonlinear Model Predictive Control on Long Horizons. J. Process. Control 2012, 22, 540–550. [Google Scholar] [CrossRef]
  28. Gros, S.; Mario, Z.; Rien, Q.; Alberto, B.; Diehl, M. From Linear to Nonlinear MPC: Bridging the Gap via the Real-time Iteration. Int. J. Control 2016, 93, 62–80. [Google Scholar] [CrossRef]
  29. Ahmed, H.A.; Yu-Xin, T.; Qi-Changa, Y. Optimal Control of Environmental Conditions Affecting Lettuce Plant Growth in a Controlled Environment with Artificial Lighting: A Review. S. Afr. J. Bot. 2020, 130, 75–89. [Google Scholar] [CrossRef]
  30. Brechner, M.; Both, A.J.; Staff, C.E.A. Hydroponic Lettuce Handbook; Cornell University CEA Program: Ithaca, NY, USA, 2013. [Google Scholar]
  31. Dai, M.; Tan, X.; Ye, Z.; Ren, J.; Chen, X.; Kong, D. Optimal Light Intensity for Lettuce Growth, Quality, and Photosynthesis in Plant Factories. Plants 2024, 13, 2616. [Google Scholar] [CrossRef] [PubMed]
  32. Zhang, T.; Chandler, W.S.; Hoell, J.M.; Westberg, D.; Whitlock, C.H.; Stackhouse, P.W. A Global Perspective on Renewable Energy Resources: Nasa’s Prediction of Worldwide Energy Resources (Power) Project. In Proceedings of the Proceedings of ISES World Congress 2007 (Vol. I–Vol. V), Beijing, China, 8–21 September 2007; Goswami, D.Y., Zhao, Y., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; pp. 2636–2640. [Google Scholar]
  33. Brad Weir, L.O. and O.-2 S.T. OCO-2 GEOS Level 3 Daily, 0.5×0.625 Assimilated CO2 V10r. Available online: https://oco2.gesdisc.eosdis.nasa.gov/ (accessed on 15 April 2025).
  34. Andersson, J.A.E.; Gillis, J.; Horn, G.; Rawlings, J.B.; Diehl, M. CasADi: A Software Framework for Nonlinear Optimization and Optimal Control. Math. Program. Comput. 2019, 11, 1–36. [Google Scholar] [CrossRef]
  35. Wächter, A.; Biegler, L.T. On the Implementation of an Interior-Point Filter Line-Search Algorithm for Large-Scale Nonlinear Programming. Math Program. 2006, 106, 25–57. [Google Scholar] [CrossRef]
Figure 1. The employed lettuce greenhouse model [7].
Figure 1. The employed lettuce greenhouse model [7].
Applsci 15 07988 g001
Figure 2. Disturbance Profiles used in 40-day greenhouse NMPC simulations. Dashed gray lines indicate lower and upper operational limits for CO2, temperature, and RH, enabling direct visual assessment of when and how much the external disturbances violate desired setpoints.
Figure 2. Disturbance Profiles used in 40-day greenhouse NMPC simulations. Dashed gray lines indicate lower and upper operational limits for CO2, temperature, and RH, enabling direct visual assessment of when and how much the external disturbances violate desired setpoints.
Applsci 15 07988 g002
Figure 3. System outputs for all six NMPC controllers over the first 3 days of simulation. Gray dashed lines indicate operational bounds for CO2, temperature, and RH.
Figure 3. System outputs for all six NMPC controllers over the first 3 days of simulation. Gray dashed lines indicate operational bounds for CO2, temperature, and RH.
Applsci 15 07988 g003
Figure 4. System control signals for all six NMPC controllers over the first 3 days of simulation.
Figure 4. System control signals for all six NMPC controllers over the first 3 days of simulation.
Applsci 15 07988 g004
Figure 5. System outputs over the full 40-day cycle for three representative warm-started NMPC controllers (CW, PW, IW). Gray dashed lines show operational constraints for CO2, temperature, and RH.
Figure 5. System outputs over the full 40-day cycle for three representative warm-started NMPC controllers (CW, PW, IW). Gray dashed lines show operational constraints for CO2, temperature, and RH.
Applsci 15 07988 g005
Figure 6. System control actions over the full 40-day cycle for three representative warm-started NMPC controllers (CW, PW, IW).
Figure 6. System control actions over the full 40-day cycle for three representative warm-started NMPC controllers (CW, PW, IW).
Applsci 15 07988 g006
Figure 7. Bar chart of key economic performance indicators for all NMPC controllers: CO2 cost, heating cost, and total biomass revenue.
Figure 7. Bar chart of key economic performance indicators for all NMPC controllers: CO2 cost, heating cost, and total biomass revenue.
Applsci 15 07988 g007
Figure 8. Stacked bar chart of constraint violations for all NMPC controllers, decomposed into CO2, temperature, and relative humidity components.
Figure 8. Stacked bar chart of constraint violations for all NMPC controllers, decomposed into CO2, temperature, and relative humidity components.
Applsci 15 07988 g008
Figure 9. Trade-off between final biomass yield and total CO2 cost for all NMPC controllers over the 40-day cycle.
Figure 9. Trade-off between final biomass yield and total CO2 cost for all NMPC controllers over the 40-day cycle.
Applsci 15 07988 g009
Figure 10. CO2 budget decomposition for each NMPC configuration, showing total CO2 supplied, CO2 lost through ventilation, and CO2 assimilated by the crop.
Figure 10. CO2 budget decomposition for each NMPC configuration, showing total CO2 supplied, CO2 lost through ventilation, and CO2 assimilated by the crop.
Applsci 15 07988 g010
Figure 11. Histogram of solver times for each NMPC configuration over the 40-day simulation horizon. Warm-started controllers (CW, PW, IW) achieve lower and more concentrated solve times.
Figure 11. Histogram of solver times for each NMPC configuration over the 40-day simulation horizon. Warm-started controllers (CW, PW, IW) achieve lower and more concentrated solve times.
Applsci 15 07988 g011
Table 1. Explanation of the state variables x , system outputs y , control inputs u , and weather disturbances d .
Table 1. Explanation of the state variables x , system outputs y , control inputs u , and weather disturbances d .
CategorySymbolDescriptionUnit
State variables x 1 Lettuce dry weightkg/m2
x 2 Indoor CO2 concentrationkg/m3
x 3 Indoor Air temperature°C
x 4 Indoor Humiditykg/m3
Measurement variables y 1 Lettuce dry weightg/m2
y 2 Indoor CO2 concentrationppm
y 3 Indoor Air temperature°C
y 4 Indoor Humidity%
Disturbances d 1 Solar radiationW/m2
d 2 Outdoor CO2 concentrationkg/m3
d 3 Outdoor Air temperature°C
d 4 Outdoor Humiditykg/m3
Control inputs u 1 CO2 supplymg/m2/s
u 2 Ventilationmm/s
u 3 HeatingW/m2
Table 2. Model parameters and their values [7].
Table 2. Model parameters and their values [7].
SymbolValueUnitExplanation
p10.544Yield Factor
p22.65 × 10−7s−1Maintenance Respiration
p353m2·kg−1Effective Canopy Area
p43.55 × 10−9kg·J−1PAR to total radiation conversion
p55.11 × 10−6m·s−1·°C−2Temp effect CO2, 2nd order
p62.3 × 10−4m·s−1·°C−1Temp effect CO2, 1st order
p76.29 × 10−4m·s−1Temp effect CO2, 0th order
p85.2 × 10−5kg·m−3CO2 compensation point
p94.1mVolumetric Capacity (CO2)
p104.87 × 10−7s−1Maintenance Respiration Weighted
p117.45 × 10−6m·s−1Leakage Greenhouse Cover
p128.314J·K−1·mol−1Gas Constant
p13273.15KAbsolute Temperature
p1410,1325PaStandard Atmospheric Pressure
p150.044kg·mol−1Molar Mass of CO2
p163 × 104J·m−3·°C−1Heat Capacity Greenhouse Air
p171290J·m−3·°C−1Heat Capacity Volume
p186.1W·m−2·°C−1Heat Transfer Coefficient
p190.2Sun Heat Load Coefficient
p204.1mVolumetric Capacity (Humidity)
p210.0036m·s−1Canopy Transpiration Coefficient
p229348J·kg−1·m−3·K−1Water Molar Value (for transpiration)
p238314J·K−1·mol−1Gas Constant (water vapor)
p24273.15KAbsolute Temperature (humidity)
p2517.4Saturation Vapor Pressure (Canopy Transpiration)
p26239°CSaturation Vapor Temp (Canopy Transpiration)
p2717.269Saturation Vapor Pressure (Humidity)
p28238.3°CSaturation Vapor Temp (Humidity)
Table 3. Predictive performance of the LSTM model on train, validation, and test sets.
Table 3. Predictive performance of the LSTM model on train, validation, and test sets.
VariableMAE
(Train)
RMSE
(Train)
MAE
(Valid)
RMSE
(Valid)
MAE
(Test)
RMSE
(Test)
Solar Radiation (W/m2)13.7528.5017.7735.5716.1034.41
CO2 (ppm)4.857.766.099.814.977.30
Temperature (°C)0.580.930.621.010.701.17
Humidity (% RH)2.233.542.453.992.924.61
Table 4. Summary of the NMPC controller variants evaluated.
Table 4. Summary of the NMPC controller variants evaluated.
ModelDisturbance HandlingSolver Initialization
NMPC-CFrozen current disturbance d ( t ) Cold-start
NMPC-CWFrozen current disturbance d ( t ) Warm-start
NMPC-PLSTM-based disturbance prediction d ( t + k | t ) Cold-start
NMPC-PWLSTM-based disturbance prediction d ( t + k | t ) Warm-start
NMPC-IIdeal disturbance d ( t + k ) Cold-start
NMPC-IWIdeal disturbance d ( t + k ) Warm-start
Table 5. Core simulation parameters for NMPC evaluation.
Table 5. Core simulation parameters for NMPC evaluation.
ParameterSymbolValue
1. Time-related parameters
Sampling time Δ t 15 min (900 s)
NMPC Prediction horizon N p 24 steps (6 h)
NMPC Control horizon N c 24 steps (6 h)
Simulation duration N s 40 days (3840 control steps)
2. Model/Controller parameters
Numerical solver-IPOPT (via CasADi)
Initial crop dry weight x 1 ( t 0 ) 0.0035 kg/m2 (3.5 g/m2)
Initial indoor CO2 concentration x 2 ( t 0 ) 0.001 kg/m3 (~400 ppm at 15 °C)
Initial indoor temperature x 3 ( t 0 ) 15 °C
Initial indoor humidity x 4 ( t 0 ) 0.008 kg/m3 (~65% RH)
Initial state of control inputs u ( t 0 1 ) (0, 0, 0)T
Economic weight: Biomass q y 1 2800
Economic weight: CO2 input q u 1 66
Economic weight: Heating input q u 3 1
Slack variable penalty: Biomass ρ 1 105
Slack variable penalty: CO2 ρ 2 103
Slack variable penalty: Temp. ρ 3 105
Slack variable penalty: Humid. ρ 4 104
Lower bounds for control inputs u m i n (0, 0, 0)T
Upper bounds for control inputs u m a x (12 mg/m2/s, 75 mm/s, 150 W/m2)T
Max. rate of change inputs Δ u m a x (1.2, 7.5, 15)T (units/step)
3. Economic cost coefficients
Lettuce price c p 1.6 Hfl kg−1
Heating energy cost c h 6.35 × 10 9 Hfl J−1
CO2 cost c C O 2 0.42 Hfl kg−1
Table 6. KPIs over the first 3 days.
Table 6. KPIs over the first 3 days.
Model B f
(g m−2)
V t o t a l
(%)
V C
(%)
V T
(%)
V H
(%)
C b i o
(Hfl/kg)
P n e t
(Hfl m−2)
T s o l
(s)
NMPC-C7.4898.7100.0224.3284.3605.5330.0980.489
NMPC-CW7.4908.7070.0224.3234.3625.5340.0980.299
NMPC-P7.3698.7850.0305.6883.0677.9310.0871.188
NMPC-PW7.3698.7850.0305.6893.0667.9520.0870.404
NMPC-I7.3478.6610.0305.6832.9488.3210.0860.897
NMPC-IW7.3488.6610.0305.6832.9488.3220.0860.302
Table 7. Full-cycle (40-day) performance of all controller strategies.
Table 7. Full-cycle (40-day) performance of all controller strategies.
Model B f
(g m−2)
V t o t a l (%) V C
(%)
V T
(%)
V H
(%)
C b i o
(Hfl/kg)
P n e t
(Hfl m−2)
T s o l
(s)
NMPC-C217.3626.8610.0543.7583.0493.8332.6580.457
NMPC-CW217.4596.8660.0543.7003.1123.8152.6630.320
NMPC-P213.5846.6300.0553.7562.8193.9322.5911.041
NMPC-PW213.5856.6280.0543.7552.8193.9312.5920.396
NMPC-I212.4726.4790.0463.5942.8393.8942.5860.908
NMPC-IW212.4926.4800.0463.5982.8363.8992.5850.308
Table 8. Net profit ( P n e t ) intervals for all controller strategies, accounting for ±10% biomass measurement error.
Table 8. Net profit ( P n e t ) intervals for all controller strategies, accounting for ±10% biomass measurement error.
Controller Nominal   P n e t (Hfl/m2) P n e t + 10 % (Hfl/m2) P n e t 10 % (Hfl/m2)
NMPC-C2.6582.8932.423
NMPC-CW2.6632.8982.428
NMPC-P2.5912.8212.361
NMPC-PW2.5922.8222.362
NMPC-I2.5862.8152.356
NMPC-IW2.5852.8152.356
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Le, H.L.; Bui, V.-T. AI-Enhanced Nonlinear Predictive Control for Smart Greenhouses: A Performance Comparison of Forecast and Warm-Start Strategies. Appl. Sci. 2025, 15, 7988. https://doi.org/10.3390/app15147988

AMA Style

Le HL, Bui V-T. AI-Enhanced Nonlinear Predictive Control for Smart Greenhouses: A Performance Comparison of Forecast and Warm-Start Strategies. Applied Sciences. 2025; 15(14):7988. https://doi.org/10.3390/app15147988

Chicago/Turabian Style

Le, Hung Linh, and Van-Tung Bui. 2025. "AI-Enhanced Nonlinear Predictive Control for Smart Greenhouses: A Performance Comparison of Forecast and Warm-Start Strategies" Applied Sciences 15, no. 14: 7988. https://doi.org/10.3390/app15147988

APA Style

Le, H. L., & Bui, V.-T. (2025). AI-Enhanced Nonlinear Predictive Control for Smart Greenhouses: A Performance Comparison of Forecast and Warm-Start Strategies. Applied Sciences, 15(14), 7988. https://doi.org/10.3390/app15147988

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop