Next Article in Journal
Research on Transmission Line Vibration Based on the Dynamic Response of Strain in Straight Tower Cross Arm Structure Under Wind–Ice Loads
Next Article in Special Issue
A Methodology for Deriving Conversion Coefficients of Natural Infiltration Using Airtightness Data
Previous Article in Journal
Research on Load Forecasting Based on Bayesian Optimized CNN-LSTM Neural Network
Previous Article in Special Issue
Exploring Biomaterial-Based CoolRoofs: Empirical Insights into Energy Efficiency and CO2 Emissions Reduction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Greenhouse Climate Control at the Food–Water–Energy Nexus: An Analytic Hierarchy Process–Model Predictive Control (AHP–MPC) Approach

by
Hamza Benzzine
*,
Hicham Labrim
,
Ibtissam El Aouni
,
Abderrahim Bajit
,
Aouatif Saad
,
Driss Zejli
and
Rachid El Bouayadi
Advanced Systems Engineering Laboratory (ISA), National School of Applied Sciences (ENSA), Ibn Tofail University, Kenitra 14000, Morocco
*
Author to whom correspondence should be addressed.
Energies 2025, 18(23), 6219; https://doi.org/10.3390/en18236219
Submission received: 13 September 2025 / Revised: 12 October 2025 / Accepted: 28 October 2025 / Published: 27 November 2025

Abstract

The authors frame greenhouse operation as a Controlled Environment Agriculture (CEA) challenge involving multiple interdependent targets: air temperature and humidity, CO2 enrichment, photoperiod-constrained lighting, and irrigation under dynamic and limited energy availability. We propose a knowledge-driven, multi-objective Model Predictive Controller whose cost function integrates expert priorities elicited via an online Analytic Hierarchy Process (AHP) survey; these AHP-derived weights parameterize the controller’s objectives and are solved over two 72 h seasonal episodes, so the MPC can anticipate renewable availability and coordinate HVAC, (de)humidification, CO2 dosing, LED lighting, and irrigation alongside dispatch from photovoltaic and wind sources, battery storage, and the grid. By embedding the physical interdependence of climate variables directly into the decision layer, the controller schedules energy-intensive actions around renewable peaks and avoids counterproductive actuator conflicts. Seasonal case studies (summer/high solar and winter/low solar) demonstrate robust performance: temperature tracking errors of SMAPE 2.25%/3.05% and CO2 SMAPE 3.72–3.92%; humidity control with SMAPE 7.04–8.56%; lighting and irrigation following setpoints with low NRMSE (0.08–0.14). Summer energy was 59% renewable; winter was only 13%, increasing grid reliance to 77.5% (peaks: 4.57 kW/6.92 kW for 197.7/181.5 kWh). Under water or energy scarcity, the controller degrades gracefully, protecting high-priority agronomic variables while allowing bounded relaxation on lower-priority targets. This expert-informed, predictive, and resource-aware orchestration offers a scalable route to precision greenhouse control within the food–water–energy nexus.

1. Introduction

The progression toward intelligent agriculture has significantly revolutionized modern greenhouse management practices, enhancing productivity, sustainability, and resource efficiency. Early greenhouse cultivation primarily relied on manual control and basic environmental regulation, including passive or minimally automated temperature and humidity adjustments [1]. With technological advancement, these practices evolved into sophisticated automated control systems, integrating precise regulation of critical climatic factors such as temperature, humidity, carbon dioxide (CO2) concentration, and artificial lighting [2,3]. This evolution improved microclimatic precision and significantly influenced overall crop yield and quality, responding dynamically to internal plant physiological requirements and external climatic variability [4,5]. Recent work has, for example, combined reinforcement learning with MPC–LSTM to improve supervisory energy management under variable conditions, illustrating the value of hybrid, learning-augmented controllers [6].
Despite technological advances, managing greenhouse microclimates remains challenging due to complex interdependencies among various climatic parameters. Temperature fluctuations directly affect relative humidity levels and plant transpiration rates, thereby influencing photosynthesis efficiency and nutrient uptake [7,8]. Additionally, artificial lighting systems provide essential light energy for plant growth but also significantly impact thermal dynamics and CO2 assimilation processes within greenhouse environments [9,10]. Such couplings make simple on/off or relay strategies suboptimal; comparative studies in controlled horticulture environments have shown that MPC-based climate control outperforms traditional relay logic in tracking precision and energy efficiency, underscoring the need for predictive, constraint-aware control in CEA [11].
These challenges become particularly critical under constrained resource conditions, such as limited energy availability or water scarcity. Optimal simultaneous control of all parameters becomes impractical under such constraints, necessitating prioritization based on their relative importance to crop productivity and sustainability [12]. Prioritization aids decision-makers in effectively allocating limited resources to manage the most influential parameters optimally, thus maintaining critical environmental conditions even during extreme resource limitations [13].
In addressing these complex management scenarios, multi-criteria decision-making (MCDM) approaches, particularly the Analytical Hierarchy Process (AHP), have demonstrated significant effectiveness. AHP systematically structures complex decisions into a hierarchical model, utilizing expert evaluations to determine precise weighting and prioritization of multiple parameters [14,15]. García et al. [16] extensively reviewed the versatility of AHP, underscoring its successful implementation across various industries, notably agriculture. Recent applications in agriculture highlight AHP’s strength in systematically capturing and integrating expert knowledge to enhance decision-making quality and resource allocation efficiency [17,18].
In parallel, multi-criteria decision-making methods like the AHP offer structured frameworks to prioritize interdependent climate variables. AHP enables experts to evaluate and weigh parameters such as temperature, humidity, and CO2—whose interactions are critical to ensuring balanced and efficient climate control strategies [19]. This capacity to quantify expert judgment makes AHP particularly suited for greenhouse management, where multiple, often conflicting environmental variables must be managed simultaneously.
Parallel developments in Model Predictive Control (MPC) have further enhanced strategic greenhouse environmental management. MPC, characterized by its predictive and adaptive control capabilities, enables proactive adjustment of environmental management strategies based on predicted future conditions [19,20]. Numerous studies validate MPC’s effectiveness in optimizing energy usage, water resources, and improving overall environmental control compared to traditional control methods [21,22,23].
Despite the proven strengths of MPC and the AHP, their combined use in greenhouse management remains limited. Most MPC frameworks treat all climate variables equally, overlooking agronomic priorities. This often leads to inefficient resource use, especially under constraints like water scarcity or limited energy. While MPC excels in prediction and dynamic control, it is rarely guided by expert-informed weighting aligned with real agricultural needs.
Traditional rule-based systems also fall short, as they lack anticipation, adaptability, and the ability to handle conflicting objectives. In contrast, integrating AHP-derived priorities into MPC enables more intelligent, multi-objective control that dynamically allocates resources based on agronomic significance. Yet, such integration remains underexplored.
Building on these ideas, this study embeds expert-elicited AHP priorities directly into a multi-objective Model Predictive Controller that jointly manages microclimate, irrigation, and energy dispatch over a hybrid PV-wind-battery-grid system. This approach aligns control actions with agronomic priorities rather than purely technical balancing. Similar developments in other controlled agricultural environments (e.g., predictive control in poultry houses) support the broader applicability of optimization-based strategies for CEA [24].
The controller regulates HVAC, (de)humidification, CO2 dosing, LED lighting, and irrigation while coordinating energy flows from PV, wind, battery, and grid sources. It is evaluated over two 72 h seasonal episodes (Kenitra, Morocco) using tracking KPIs (NRMSE, SMAPE) and energy KPIs (source shares, peak grid import). Figure 1 and Figure 2 present the greenhouse architecture and the integrated AHP–MPC control scheme; each component is detailed in the following sections.

2. Optimal Greenhouse Practices

2.1. Control Approaches for Greenhouses

Effective greenhouse operation requires maintaining optimal microclimate conditions to support plant growth and resource efficiency [24,25].
While traditional manual methods often caused inefficiencies, recent advances—particularly the integration of IoT—have enabled real-time monitoring and control of key variables such as temperature, humidity, CO2, and lighting, thereby improving operational performance [26,27,28].
Among advanced control strategies, MPC stands out for its ability to forecast and proactively manage climatic conditions based on historical and real-time data, leading to improved energy efficiency and crop quality [29]. The synergy between MPC and IoT enhances responsiveness and minimizes resource waste [30].
Despite these advancements, most existing systems still treat climate variables with equal importance, ignoring expert prioritization. This often leads to suboptimal resource allocation, especially under constraints. The integration of AHP-derived priorities into MPC remains limited and represents a key research gap.
To address this, the present study introduces an AHP-weighted MPC framework, leveraging expert input to guide predictive control. This integration enhances climate regulation, optimizes energy and water use, and supports consistent productivity even in resource-limited conditions.

2.2. Proposed Greenhouse Architecture

The proposed greenhouse system integrates advanced technologies within an intelligent microgrid framework to support sustainable and efficient operations. Structurally, it is connected to the Distribution Network Operator (DNO) via electronic converters, enhancing system stability and addressing challenges posed by intermittent renewable energy and fluctuating loads.
Photovoltaic (PV) panels and wind turbines act as the primary energy sources, reducing dependence on conventional power and improving energy resilience. Internally, the greenhouse operates as a microgrid comprising key subsystems—HVAC, artificial lighting, CO2 dosing, dehumidification, fogging, irrigation, and thermal systems ensuring precise microclimate control tailored to plant needs and environmental changes [31].
At the core lies an MPC system that jointly regulates climate conditions and optimizes energy flow. By forecasting climatic and energy demands, the MPC enables anticipatory control and efficient energy allocation, ensuring stable and productive operation.
A wireless sensor network supports this system by continuously collecting and transmitting real-time data on temperature, humidity, CO2, and light levels, thereby enhancing the controller’s predictive accuracy and responsiveness.
In combination with AHP-based parameter prioritization, this architecture delivers an adaptive and intelligent solution to the interdependent challenges of climate regulation and energy management. It improves resource use, strengthens sustainability, and maintains crop productivity in diverse and constrained conditions. The system configuration is depicted in Figure 1.

2.3. MPC-AHP Integrated Control Scheme

The proposed integrated control scheme combines insights from a structured professional survey, the AHP, and MPC methodologies to effectively manage the microclimate and resource allocation within a greenhouse environment.

2.3.1. Survey and AHP Integration

Expert opinions from agricultural professionals are collected via a structured survey to assess the relative importance of key climatic and resource parameters—temperature, humidity, CO2 concentration, artificial lighting, and irrigation. These assessments are processed using the AHP to generate weighting coefficients (wx) that guide the MPC optimizer, aligning resource allocation with expert priorities.

2.3.2. MPC Architecture

The MPC approach in this study uses real-time dynamic modeling to proactively predict and control future greenhouse climate and irrigation conditions. At each time step, it forecasts variables over a prediction horizon [32] and calculates optimal control actions to meet desired setpoints. The framework consists of three modules:
Predictor Module: Uses historical and real-time data to forecast future climate states (d(k,k+N)), enabling proactive control.
Observer Module: Continuously monitors environmental parameters (xmeas) (temperature, humidity, CO2, lighting, irrigation) to provide accurate real-time data that improve prediction.
Optimizer Module: Integrates inputs from the AHP-derived weighting coefficients (wx), predictor module forecasts, and observer measurements (x^). By solving an online optimization problem at each time step, it determines the optimal control actions (u) for climatic and irrigation management systems—such as heating, cooling, lighting, CO2 injection, humidity regulation, and irrigation. The optimization aims to minimize the defined objective function while strictly adhering to operational constraints.

2.3.3. Greenhouse (Plant) Feedback

Calculated optimal actions (u) are implemented directly in the greenhouse environment through the actuators controlling HVAC systems, lighting, irrigation systems, CO2 injectors, and humidity regulators. Continuous feedback between the greenhouse and the observer module ensures real-time adjustments, quickly correcting deviations from targeted environmental and irrigation conditions.
This MPC-AHP integrated control strategy significantly enhances the operational efficiency and sustainability of greenhouse management by effectively anticipating and responding to environmental dynamics and resource constraints, thus achieving optimal performance in managing the interconnected elements of the Food-Energy-Water Nexus.
The overall structure and interaction of these components are illustrated clearly in Figure 2.

3. Study Design and Methods

This section describes the research materials and methodology used in the study, encompassing the expert survey and weighting procedure, the greenhouse–microgrid assets, the mathematical models of climate and energy subsystems, the predictive control setup, and the governing energy-balance equations.
The methodology follows a structured seven-step pipeline that connects expert knowledge to predictive control (see Figure 3). First, relevant greenhouse climate criteria are identified, and a detailed questionnaire is designed. The survey is then deployed online to professionals across multiple domains, and responses are collected. Pairwise judgments from experts are aggregated using a weighted geometric mean and converted into a priority vector ω via the principal eigenvector method. Logical coherence of the responses is verified through the Analytic Hierarchy Process (AHP) consistency index and ratio.
The resulting expert-informed weights are then embedded in a multi-objective Model Predictive Control (MPC) cost function, which balances climate tracking with energy consumption. This controller operates in a receding-horizon fashion over seasonal test episodes, dynamically scheduling HVAC, (de)humidification, CO2 dosing, lighting, and irrigation. Simultaneously, it orchestrates the operation of PV panels, wind turbines, battery storage, and grid interaction to achieve predictive optimization of the greenhouse–microgrid system.

3.1. AHP Survey Materials and Questionnaire Design

This study employed a structured methodology inspired by established multi-criteria decision-making techniques, specifically the AHP [33].
The primary objective was to identify and prioritize the key climatic parameters essential for effective greenhouse climate control. This process began with a literature review and expert consultations to select five core parameters: temperature, humidity, CO2 concentration, artificial lighting, and irrigation.
A diverse group of professionals—including agricultural engineers, technicians, researchers, PhD students, professors, farmers, and facility managers—participated in the survey. Their inclusion ensured a balanced representation of expertise across agriculture, horticulture, engineering, and greenhouse operations, providing a broad and practical perspective.
The questionnaire was administered online and consisted of two sections. The first section gathered information on the respondents’ profiles—including their role or sector, years of experience in greenhouse production, primary crop types, and key characteristics of their facilities—allowing for a contextualized interpretation of the responses. The second section implemented the AHP pairwise comparison procedure across the selected climate and irrigation criteria (temperature, irrigation, humidity, lighting, and CO2). For each pair, experts were asked to evaluate the relative importance of one criterion over another by assigning a value on Saaty’s 1–9 scale (as shown in Table 1). Only the upper triangle of the comparison matrix was completed manually; reciprocal values for the lower triangle were generated automatically to ensure consistency.
Experts were requested to make pairwise comparisons among the climatic parameters using this scale, enabling clear and structured quantification of expert judgments.
A total of 69 professionals participated in the survey. The participant group, predominantly composed of experts based in Morocco with a limited number of contributors from the Netherlands, encompassed a range of professional roles as summarized in Figure 4a.
The participants specialized predominantly in agronomy (35.3%), horticulture (22.4%), greenhouse management (7.1%), and plant biology (5.9%). Other specialized fields such as irrigation science, biotechnology, renewable energy, and agricultural data science were also represented.
Figure 5 presents a heatmap displaying the percentage distribution of respondents’ judgments for each pairwise comparison of climatic parameters. Each cell indicates the proportion of participants assigning a given AHP importance value (as defined in Table 1) to a parameter pair. This visualization reveals prevailing trends and areas of consensus or divergence among experts, offering a clear and intuitive interpretation of their prioritization preferences.
Following the collection of survey data, an analytical weighting procedure was applied to responses based on the respondents’ self-reported experience levels in two critical areas: greenhouse management and crop physiology. The experience was scored as described in Table 2.
Each respondent’s experience level in greenhouse management and crop physiology was individually assessed, and an average experience score was computed. These scores were then normalized so that their total equaled one, assigning higher weights (ω) to responses from more experienced experts.
The weighted scores were incorporated into the AHP analysis to enhance its accuracy by prioritizing expert judgments based on experience. This process produced refined AHP weighting coefficients that more precisely reflect collective expert insight. These coefficients are then integrated into the MPC system, aligning climate control strategies with expert-derived priorities to improve operational efficiency and sustainability.

3.2. Weight Derivation from Expert Judgments

To aggregate judgments from multiple respondents while accounting for their relative importance, we use a weighted geometric mean. For pair (i,j), denote by S i j the set of respondents who provided a valid judgment a i j k (Saaty scale), and by ω k the non-negative weight assigned to respondent K. We normalize these weights over the responding subset ω ~ k , i j = ω k l S i j ω l , and compute [34,35]
a i j = k S i j ( a i j k ) ω ~ k , i j = e x p k S i j ω ~ k , i j   l n   a i j k
a i j k is the judgment provided by respondent k for the pair (i,j).
ω k is the normalized weight of respondent k.
K is the number of respondents who provided a valid judgment for this comparison.
l S i j ω l   is the sum of the weights of respondents who rated the pair (i,j).
This multiplicative form preserves the AHP scale structure and reciprocity and reduces to the classical geometric mean when all respondents have equal weight. Judgments are strictly positive, ensuring that the logarithm is well-defined.
According to reference [36], a judgment matrix Ak (k = 1, 2, …, q) is constructed from the evaluations provided by the k-th respondent. As shown in Equation (2), Ak is a positive reciprocal matrix of order n.
The elements a i j k (for i,j = 1,2,…,n) represent the relative importance of the i-th objective compared to the j-th objective according to respondent k. In other words, a i j k indicates how much more important objective i is relative to objective j.
A k = a 11 k a 12 k a 1 n k a 21 k a 22 k a 2 n k a n 1 k a n 2 k a n n k
The matrix has reciprocal properties, which are
a i j k = 1 a j i k , i , j = 1,2 , 3 n
To determine the relative importance of the criteria, the aggregated pairwise comparison matrix was formed using the weighted geometric mean of individual expert judgments. The priority vector—which represents the criteria weights—was then computed using the principal eigenvector method.
This vector w   satisfies the eigenvalue equation [33]:
A · w = λ m a x · w
where
  • A is the aggregated comparison matrix.
  • λ m a x  is its largest eigenvalue.
  • w  is the corresponding eigenvector.
To ensure a consistent interpretation, the eigenvector is normalized so that the sum of weights equals 1:
w i = v i j = 1 n v j
where v i is the i-th component of the principal eigenvector and n is the total number of criteria.
This method provides a mathematically consistent and interpretable way to extract the relative weights of the criteria, aligning them with expert judgment.
The Consistency Index (CI) [37] evaluates the coherence of a pairwise comparison matrix. It is computed using the matrix’s principal eigenvalue λ m a x :
C I = λ m a x n n 1
where n is the number of criteria. Perfect consistency yields have λ m a x = n , resulting in C I = 0 .
The Consistency Ratio (CR) assesses this CI against a Random Index (RI)—the average CI of randomly generated matrices of the same order [38]:
C R = C I R I
For a matrix of order n = 5, the standard RI is 1.12. A CR value below 0.1 indicates acceptable consistency in the expert judgments

3.3. Advanced Predictive Energy Management Framework

The proposed framework autonomously manages and optimizes energy distribution in a greenhouse connected to a hybrid microgrid. It begins by assessing the current state of the greenhouse and energy system, including battery charge, water reserves, energy consumption, renewable production, climatic conditions (indoor/outdoor temperature, humidity, CO2, lighting), and vent status.
At each hourly time step, real-time sensor data covering temperature, humidity, CO2 levels, solar radiation, and wind speed feeds predictive models that forecast environmental conditions. These forecasts inform the Energy Management System (EMS), which estimates renewable generation from PV panels and wind turbines.
The central controller then applies optimization rules to generate control signals for actuators, ensuring climate conditions stay within optimal ranges while respecting system constraints. Its main objective is to allocate renewable energy efficiently, balancing greenhouse demands with supply variability.
When excess energy is available, it is either stored in batteries or fed back to the grid, improving energy resilience and reducing waste. This proactive control enhances both operational efficiency and sustainability.
The basic structure of the MPC is illustrated in Figure 6 [39]:
The implemented Model Predictive Control approach utilizes a dynamic model to forecast system behavior over a prediction horizon (Np) at each control step. Based on these forecasts, it evaluates the impact of different energy flow scenarios to align future conditions with target setpoints.
Following the receding horizon principle, only the first control action of each optimized sequence is applied, and the process is repeated at the next interval using updated data. This ensures continuous re-optimization and adherence to system constraints.
In this setup, the MPC manages lighting, heating, dehumidification, CO2 injection, irrigation, and grid interactions. It solves an online optimization problem over a control horizon (Nc) to minimize a multi-objective cost function, enabling efficient, predictive, and sustainable greenhouse and energy system management.

3.4. Mathematical Models of the System

The objective function is designed to minimize both the energy drawn from the main grid u g r i d and deviations from optimal environmental setpoints for greenhouse operation. These setpoints include internal temperature, soil moisture, artificial lighting, CO2 levels, and irrigation ensuring system reliability and high agricultural quality.
Formulated as a multi-objective quadratic cost function, the optimization balances microclimate control with operational efficiency. The first five terms penalize deviations from reference trajectories for each key variable, while an additional term minimizes reliance on grid energy, encouraging the use of local renewable sources.
The overall objective function to be minimized is defined as follows:
J = k = 1 N p ω ϕ ϕ t + k + ω γ γ t + k + ω φ φ t + k + ω β β t + k + ω η η t + k + u g r i d ( t + k )
where each deviation term is weighted by coefficients ω derived from an AHP based on expert input, ensuring that the prioritization of control objectives reflects agronomic needs.
The dynamic deviations are subject to a series of predictive constraints that maintain each state variable within a defined tolerance margin around its optimal reference:
  • Temperature constraint:
T o p t t + k ϕ t + k T i n t + k T o p t t + k + ϕ t + k
  • Soil water content constraint:
W o p t t + k γ t + k W i n t + k W o p t t + k + γ t + k
  • Artificial lighting constraint:
u l o p t t + k φ t + k u l i n t + k u l o p t t + k + φ t + k
  • CO2 concentration constraint:
C O 2 o p t t + k β t + k C O 2 i n t + k C O 2 o p t t + k + β t + k
  • Irrigation water supply constraint:
i r r o p t t + k η t + k i r r i n t + k i r r o p t t + k + η t + k
The predictive framework enables proactive environmental control by anticipating future climatic conditions, optimizing resource use, and supporting sustainable agriculture. This requires accurate dynamic models of the greenhouse microclimate and hybrid energy system. These models capture the behavior of key variables—temperature, humidity, CO2, lighting—and energy flows from PV, wind, storage, and grid interaction. The following section details their mathematical formulation, which forms the core of the MPC’s predictive engine.

3.4.1. Greenhouse Dynamic Modeling (GDM)

The greenhouse microclimate is represented by a coupled, discrete-time state model that captures heat and mass exchanges, gas balance, illumination, and water storage/transport. Indoor air temperature T i n evolves according to a lumped first-order RC relation with HVAC actuation (Equation (14)) [40]:
T i n ( t + Δ t ) = T i n ( t ) Δ t R b C a i r T i n ( t ) T out t u j R b u hvac   ( t )
where R b is the global thermal resistance, C a i r the air heat capacity, T out   the forecast outdoor temperature, u hvac   the HVAC power, and u j  ∈ {−1, 0, +1} encodes cooling/idle/heating.
Admissible temperatures are enforced by bounds:
T m i n T i n ( t ) T m a x
Moisture is modeled via the absolute water content of air w(t) [g/m3], updated by a mass balance that aggregates evapotranspiration, ventilation exchange, and active (de)humidification (Equation (16)). The ventilation term uses a ventilation conductance g v and a psychrometric saturation relation (Tetens-type) parameterized by (c1, …, c5) and Patm (Equation (17)). Fogging and dehumidification contributions are proportional to the greenhouse floor Area and the respective control inputs u h u m (t), u d e s h (t) with maxima W m a x f o g and W max_deh   (Equations (18) and (19)). To keep relative humidity within target comfort limits, w(t) is constrained between w m i n and  w m a x computed from the admissible indoor RH band and the predicted T i n ( t + Δ t ) (Equations (20)–(22)). Mutual exclusivity avoids simultaneous humidification and dehumidification (Equation (23)) [41].
w t + Δ t = w t + Δ t ρ V · W e v p ·   A r e a + V e n t i l a t i o n   i m p a c t + H u m i d i f i c a t i o n   i m p a c t     D e h u m i d i f i c a t i o n   i m p a c t
Ventilation   impact   = ρ · A r e a · g v · c 5 · R H o u t t · c 1 · c 2 + c 3 · e x p c 4 · T o u t ( t ) P a t m w ( t )
Impact   humidification   = A r e a · W m a x _ f o g · u h u m ( t )
Impact   dehumidification   = A r e a · W max_deh   · u d e s h ( t )
w m i n w ( t ) w m a x
w m i n = R H i n m i n · c 5 · c 1 × c 2 + c 3 · e x p · c 4 · T i n ( t + Δ t ) P a t m
                w m a x = R H i n m a x · c 5 · c 1 · c 2 + c 3 · e x p c 4 · T i n ( t + Δ t ) P a t m
          u h u m t · u d e s h t = 0
Carbon dioxide is the most vital gaseous nutrient after water, directly affecting photosynthesis. Although ambient levels average ~400 ppm, increasing internal CO2 in greenhouses significantly enhances crop growth, improving biomass, height, leaf and flower development, and branching in various species [42].
Indoor CO2 concentration follows a balance among injection, plant assimilation, and ventilation losses (Equation (24)). The injection term depends on the valve command u C O 2 t , the injected concentration C inj   , and the gas supply pressure P C O 2 (Equation (25)). Assimilation is captured by a saturating response to ambient CO2 and photosynthetically active radiation (PAR), combining the predicted global irradiance G t ( t ) and LED contribution   u light   ( t ) (Equation (26)). Ventilation induces dilution toward the outdoor level C out t with rate g v (Equation (27)). CO2 is kept within agronomic bounds (Equation (28)).
C O 2 ( t + Δ t ) = C O 2 ( t ) +   Area   ρ V ·   ( Gas   injection C O 2 A ssimilation V e n t i l a t i o n   l o s s e s )  
Gas   injection   C O 2 = C inj   · u C O 2 t P C O 2 × Area  
Assimilation = 2.2 · 10 3 · 1 1 + 0.42 C out ( t ) · 1 exp 0.003 · G t ( t ) + u light   ( t ) · 10 3   Area  
V e n t i l a t i o n   l o s s e s = g v · C O 2 t C out t  
C O 2 m i n C O 2 t C O 2 m a x
Light is a critical factor for plant growth, influencing both photosynthesis and key developmental processes such as germination, elongation, and flowering. These effects depend on light intensity, photoperiod, and spectral composition [33]. In greenhouses, artificial lighting especially energy-efficient and spectrum-adjustable LEDs is used to supplement natural light, particularly in low-radiation conditions, helping maintain optimal growth and productivity [27].
Artificial lighting supplements natural light to maintain the prescribed photoperiod. The required luminous flux scales with the illuminated area (Equation (29)). A threshold policy activates LEDs when predicted irradiance falls below   G min ; electrical power follows the fixture efficiency η l (Equation (30)).
F light   = L · A
  If   G t < G min   u light   = F light   η l ,   otherwise     u light   = 0
Water supply is represented by a storage-and-delivery chain. The reservoir state  r ( t ) integrates the inflow from a source pump and the outflow to irrigation (Equation (31)) [43], with hydraulic flows linked to pump powers u p s t , u p i r r t , heads d s , d i r r , efficiency η , and ( ρ ˇ , g ) (Equations (32) and (33)). Capacity limits (Equation (34)) prevent overflow and dry-tank operation. Together, Equations (14)–(34) define a compact, physically grounded model that the predictive controller uses to track climate references, schedule irrigation, and coordinate energy flows under operational constraints
r ( t + Δ t ) = r ( t ) + [ Q s ( t ) Q i r r ( t ) ]
            Q s ( t ) = u p s t · t 3600 ρ ˇ g d s η s
            Q i r r ( t ) = u p i r r t · t 3600 ρ ˇ g d i r r η i r r
r m i n r ( t ) r m a x

3.4.2. Microgrid Dynamic Modeling (MDM)

Wind Turbine Power Generation Model
Wind energy is a renewable and naturally abundant source; whose availability depends on the local wind profile. The electrical power output of a wind turbine varies non-linearly with wind speed and is governed by the turbine’s operational characteristics, such as cut-in, rated, and cut-out speeds.
The power output P w t t   at time t is determined according to the following piecewise model [44]:
P w t ( t ) = 0 , v ( t ) v c u t i n P r v ( t ) v c u t i n v r v c u t i n , v c u t i n < v ( t ) < v r P r , v r v ( t ) < v c u t o u t 0 , v ( t ) v c u t o u t
The power output of the WTPG module is limited between the upper and lower bounds.
P w t m i n P w t ( t ) P w t m a x
Photovoltaic Power Generation Model
Photovoltaic (PV) systems convert solar irradiance into electrical energy through semiconductor materials. The output power of a PV panel depends primarily on the level of solar irradiance, the ambient temperature, and the temperature sensitivity of the PV module.
In this work, the PV power output P p v   at time t is estimated using the following relation [44]:
P p v ( t ) = P N p v · G ( t ) G ref   · 1 + K t T a m b ( t ) + ( 0.0256 · G ( t ) ) T ref  
This model accounts for the nonlinear impact of ambient temperature on PV performance, where higher temperatures typically reduce module efficiency. The irradiance-normalized term ensures that output power scales with incident solar energy, and the thermal correction reflects real environmental operating conditions.
The power output of the PV module is limited between the upper and lower bounds:
P p v   m i n P p v   ( t ) P p v   m a x
Energy Storage System Dynamics
To balance supply and demand within the greenhouse microgrid, an Energy Storage Unit (ESU), typically a battery, is used to buffer renewable energy fluctuations and reduce grid dependence. Its energy level is modeled as a discrete-time state variable updated through charge/discharge actions, accounting for efficiency losses [45]:
E s t ( t + Δ t ) = E s t ( t ) + η C h a r · u C h a r ( t ) · Δ t η D i s · u Dis   ( t ) · Δ t
The energy level is constrained by the physical capacity of the battery:
E s t m i n E s t ( t ) E s t m a x
Likewise, the charging and discharging power rates are bounded by the inverter or battery specifications:
u C h a r m i n u C h a r t u C h a r m a x       ;   u Dis   m i n u Dis   t u Dis   m a x  
To avoid simultaneous charging and discharging, which is physically infeasible and energetically wasteful, the following constraint is imposed:
u C h a r t   ·   u Dis   t = 0
This logical constraint ensures that the controller selects either a charging or discharging mode at each time step, but never both. This ESU model is embedded into the predictive control framework to support optimal power flow and load balancing within the greenhouse energy system.
Electrical Grid Interaction Model
The electrical grid is modeled as an unlimited energy source and sink. It allows the greenhouse system to draw power at any time to meet energy deficits and inject surplus renewable generation without restrictions. No technical or capacity constraints are imposed on grid usage.
The grid exchange u g r i d t + k is directly embedded in the objective function as a cost-related term to discourage unnecessary dependence on the grid and to promote local energy autonomy. A higher weight on this term can encourage the controller to prioritize renewable sources and storage over grid usage.

3.5. Energy Balance and State Equations

At each prediction step t + k, the energy balance of the greenhouse system is enforced through the following algebraic equation, ensuring that the total power supplied by local sources and the grid equals the total power demanded by all actuators and charging systems:
P p v t + k + P w t t + k + u d i s t + k + u grid   t + k = i = 1 n u i load   t + k + u char   t + k
With u i load   ( t + k ) u h v a c ( t + k ) , u light   ( t + k ) , u C O 2 ( t + k ) , u h u m ( t + k ) , u d e s h ( t + k ) , u p irr   ( t + k ) , u p s ( t + k ) .
This compact formulation is essential for enforcing the energy conservation law in the predictive controller, ensuring feasible and efficient energy allocation across all systems at each control step.

4. Simulation Setup

The simulation spans 72 h (1 h resolution) to test an AHP-weighted Model Predictive Controller that optimally operates HVAC, LED lighting, CO2 injectors, humidification/dehumidification systems, and irrigation pumps (see Section 3.4.1, GDM). Energy is sourced from PV panels, a wind turbine, a lithium-ion battery, and the grid (see Section 3.4.2, MDM). Optimization uses the Sequential Least Squares Programming (SLSQP) algorithm from scipy.optimize.minimize [46,47].
The simulation is nonlinear, multi-objective, and subject to multiple constraints, aiming not only to test the stability of the controller but also to evaluate its energy efficiency and agronomic performance.
The test site is an 80 m2 even-span greenhouse (ridge height 4.3 m), with geometry feeding into the thermal, humidity, CO2, and ventilation models.
Climate and Irrigation Setpoints:
  • Temperature: 17 °C (night/early morning) and 22 °C (daytime).
  • Humidity: Maintained between 60–70%.
  • CO2: Varies from 500 to 920 ppm, peaking during peak photosynthesis.
  • Irrigation: Pulsed at 0/0.025 m3/h based on water demand.
  • Lighting: LEDs extend the photoperiod to 20 h/day, activating under low irradiance.
These parameters follow agronomic guidance for tomato production in Mediterranean greenhouses [48,49].
Seasonal Scenarios:
Figure 7 presents two contrasting 72 h weather scenarios in Kenitra, Morocco, showing six key climate variables: air temperature, relative humidity, CO2 concentration, wind speed, solar radiation, and vapor pressure deficit (VPD).
  • June (Summer): Displays higher temperatures, strong solar radiation, increased wind speed, and a higher VPD, indicating hot and dry conditions. The MPC system focuses on cooling and humidity regulation, while artificial lighting is rarely needed due to high natural irradiance.
  • December (Winter): Characterized by lower temperatures, reduced solar input, frequent high humidity, low wind, and lower VPD, reflecting cooler and more humid conditions. The MPC strategy shifts toward heating, dehumidification, and the use of supplemental lighting to maintain optimal indoor conditions.
Ambient CO2 levels remain stable across both seasons and primarily affect internal concentrations through the ventilation system.
Initial Conditions:
At t0, internal temperature is 18 °C, RH is 63%, CO2 is 500 ppm, and the battery is at 5 kWh. Sub-models handle each subsystem—thermal exchange (HVAC), latent/moisture balance (humidity), mass balance (CO2), crop-water dynamics (irrigation), and coulomb counting (battery). Renewable generation is updated hourly from irradiance and wind forecasts.
This setup evaluates how the AHP-guided MPC dynamically reallocates energy to meet crop needs amid seasonal fluctuations in renewable availability.

5. Results and Discussion

This section presents the main results of the intelligent greenhouse climate–energy management framework, structured into three parts: (i) priority weight derivation using the AHP, (ii) closed-loop performance in tracking climate setpoints (temperature, humidity, CO2, lighting, irrigation), and (iii) seasonal energy orchestration, highlighting how PV, wind, battery, and grid resources are allocated during summer and winter periods.
The decision weights used in the AHP-based control scenario were obtained through a structured multi-criteria analysis involving agricultural experts. Based on pairwise comparisons of the importance of five climatic parameters temperature, humidity, lighting, CO2 concentration, and irrigation, a judgment matrix was constructed. This matrix is presented in Figure 8, where each element a i j   represents the degree of importance of criterion i over criterion j, based on the collective opinion of all respondents.
The matrix displays a consistent preference toward temperature and irrigation over the other criteria. For instance, temperature was judged to be approximately 2.09 times more important than CO2, and 1.64 times more important than lighting, indicating strong perceived influence on crop productivity and energy consumption. Meanwhile, CO2 and lighting exhibited values closer to 1 when compared with each other or with humidity, suggesting they are seen as moderately important but less dominant.
To validate the coherence of expert judgments, the consistency index (CI) and consistency ratio (CR) were calculated. The matrix yielded a CI of 0.0195 and a CR of 0.0174, well below the threshold of 0.1. This confirms that the expert inputs were logically consistent and statistically acceptable.
The final normalized weights derived from the AHP matrix are summarized in Table 3 and were directly integrated into the objective function of the Model Predictive Controller (MPC) for the AHP-based control scenario. These weights define the relative priority of each actuator in the optimization process, allowing the controller to dynamically prioritize decisions based on expert-defined agronomic objectives rather than relying on purely technical balancing. Similar multi-criteria approaches in greenhouse control underscore the importance of such expert-informed weighting. For instance, Hu et al. note that simple weighted-sum control can be very sensitive to weight choice [50], so obtaining robust weights (as through AHP) is crucial. By incorporating the finalized weights into the MPC cost function, the control strategy explicitly reflects agronomic priorities rather than treating all deviations equally. This expert-driven prioritization is expected to yield more agronomically sensible control actions than a purely technical or ad hoc weighting.
These weights serve as a direct input to the MPC cost function and define the relative priority of each regulated deviation—temperature (ρ), humidity (λ), lighting/illuminance (φ), CO2 (β), and irrigation flow (ν)—together with the penalty on purchased electricity. Their integration allows the controller to allocate effort where it matters agronomically, rather than pursuing a purely technical balance among loops. Concretely, the optimizer will first suppress temperature and irrigation errors, then humidity excursions, and only thereafter tighten CO2 and artificial-lighting tracking if energy remains available.
Here, the priority structure couples with the anticipative nature of MPC to do more than just track setpoints—it schedules actuations in time to exploit renewable availability and respect crop physiology. This forward-looking characteristic of MPC makes it particularly well-suited for greenhouse climate control, as it enables optimization of control actions based on forecasted environmental conditions. Unlike traditional feedback-based strategies, MPC can anticipate diurnal and weather-related variations such as changes in solar radiation or external temperature and adjust internal conditions proactively. Prior research has demonstrated these advantages: for instance, Aaslyng et al. developed the IntelliGrow system, which employed MPC to optimize heating and lighting by leveraging natural sunlight, significantly reducing energy consumption while maintaining crop productivity [51]. Similarly, Markvart et al. introduced a multi-objective optimization approach using genetic algorithms (DynaLight) to minimize electricity costs while ensuring adequate lighting levels, prioritizing agronomic needs over purely technical criteria [52].
This integration of anticipative optimization with agronomic priorities is exemplified in seasonal control behavior. In June (high-PV) (Figure 9), the controller not only keeps Tin close to its day/night targets with short HVAC bursts, but it also shifts energy-intensive tasks into high-irradiance hours. The master irrigation pump is commanded primarily when PV power is abundant, while the local pump delivers fine pulses that track the flow reference. CO2 dosing is concentrated during bright periods, when photosynthesis is most responsive, and dehumidification operates in brief, targeted pulses to keep RH in the 60–70% band without overshoot. Artificial lighting is used sparingly to top-up the photoperiod: LEDs maintain the prescribed light window and then respect a dark rest period to avoid unnecessary energy use and to align with plant circadian needs.
In December (low-PV) (Figure 10), the same AHP-weighted MPC protects temperature and water status first (higher-priority terms), while leveraging forecasts for pre-conditioning: the battery is charged ahead of colder intervals, and the master pump is scheduled in the few daylight/PV windows to limit grid dependence. When renewable power is scarce, the controller gracefully relaxes lower-priority loops (slight, time-bounded deviations in CO2 or illuminance) rather than triggering long, energy-expensive actuation. RH is held near the target by combining predictive ventilation with selective dehumidification; LEDs enforce the photoperiod/rest alternation even if additional electrical energy is available, preventing light stress.
Across both seasons, the AHP-MPC therefore delivers explicit, expert-driven trade-offs plus temporal orchestration: (i) tight tracking of high-priority variables (temperature, irrigation/RH) remains intact; (ii) energy-heavy actuators (master pump, HVAC, LEDs, CO2 injector) are timed to renewable peaks; and (iii) lower-priority objectives are adjusted predictively and briefly to keep the whole microclimate within agronomic bounds with minimal energy cost.
Figure 11 shows how the electrical demand of all greenhouse loads—HVAC, LED lighting, CO2 injector, humidifier/dehumidifier, and the master/local irrigation pumps—is continuously satisfied by a time-varying mix of sources (PV, wind, battery, grid) orchestrated by the AHP-weighted MPC. At every hour, the controller follows a simple merit order guided by priorities and forecasts: use on-site renewables first, charge the battery when there is surplus, discharge it to cover expected shortfalls, and import from the grid only for the residual deficit. The split visible in the stacked bars depends jointly on (i) renewable availability (PV, wind), (ii) battery state of charge (SOC) and charge/discharge limits, and (iii) the instantaneous load profile driven by climate regulation (HVAC and RH control), photoperiod enforcement (LEDs), CO2 enrichment, and irrigation scheduling (master pump for filling/reserve transfers, local pump for plot delivery).
Summer (June): Solar peaks create PV output plateaus from late morning to mid-afternoon. The MPC directs most demand to PV Powerbursts at temperature changes, CO2 injection during high-light hours, and local irrigation pumps matching setpoints. Surplus PV charges the battery, which discharges after sunset to reduce grid imports. The energy-intensive master pump is scheduled to run during periods of abundant PV generation. Wind energy contributes occasionally but plays a secondary role. No renewable energy is exported to the grid because all excess generation is allocated to charging the battery, emphasizing local energy storage and consumption.
Winter (December): Reduced solar and wind result in limited renewables and increased heating and lighting demand. The MPC relies more on the grid to maintain temperature and humidity, while charging the battery during brief renewable availability and discharging to smooth peaks. LEDs are heavily used to maintain photoperiod; HVAC dominates heating; humidification is applied selectively. As in summer, no export occurs: renewable surplus is first stored in the battery.
Overall, Figure 11 illustrates a well-defined, season-aware power-flow policy: renewable energy covers a large share of the summer demand at specific hours (midday PV windows), enabling strategic activation of energy-hungry devices (e.g., master pump aligned with PV peaks); in winter, with low wind and solar potential, the grid carries the larger share, while the battery is managed predictively to buffer variability and protect the most agronomically critical services.
The AHP-weighted MPC maintains reliable climate control across seasons (Figure 9 and Figure 10). In summer, all variables exhibit low tracking errors; irrigation shows a high SMAPE due to pulsed setpoints, but remains well aligned in absolute terms (Table 4). In winter, performance slightly declines under renewable energy scarcity: temperature NRMSE increases to 0.14 (SMAPE = 3.05%), humidity remains at 0.19 (8.56%), lighting shows modest deviations (NRMSE = 0.10, SMAPE = 6.97%), and CO2 is tightly regulated (NRMSE = 0.11, SMAPE = 3.92%). These results reflect the controller’s prioritization scheme, which preserves temperature and water control while permitting bounded relaxations on CO2 and lighting.
The seasonal energy balance (Figure 10, Table 5) explains these results. Over three summer days, total demand is 197.66 kWh, mainly supplied by PV (47.10%) and wind (11.89%), with battery discharge (8.83%) smoothing evening peaks; grid supply accounts for 33.30%, with moderate peak import (4.57 kW). In winter, total demand falls slightly to 181.48 kWh, but renewable availability drops sharply at the Kenitra site (PV 10.92%, wind 1.99%), leading to greater reliance on battery discharge (9.93%) and grid supply (77.48%), with a higher peak import of 6.92 kW. No renewable export occurs in either season, as the MPC prioritizes charging the battery when surplus is present, then uses stored energy for upcoming loads rather than feeding the grid. This strategy of load shifting is mirrored in recent renewable-greenhouse research: Gholami et al. (2025) demonstrated that strategically charging a BESS during high PV output and discharging in the evening can markedly raise on-site autonomy and cut grid imports [53].
Figure 10 also reveals temporal orchestration: in summer, energy-intensive tasks align with PV peaks—such as master-pump refilling and CO2 dosing during bright hours—while LEDs provide only supplementary lighting to maintain photoperiod, respecting dark rest periods. Irradiance-aware scheduling of actuators and lighting has long been reported to reduce energy while maintaining crop performance; for example, Aaslyng et al. (2003) describe the IntelliGrow concept that times heating/lighting to natural sunlight availability [54]. In winter, with minimal wind and low irradiance, the grid covers a larger share to maintain temperature and photoperiod; the battery charges opportunistically during short renewable windows and discharges repeatedly to shave demand peaks. Across seasons, the AHP-MPC meets agronomic targets with expert-driven trade-offs: high-priority variables (temperature, irrigation/humidity) stay within target bands, while lower-priority loops (CO2, lighting) adjust predictively and briefly under energy scarcity—yielding the KPI profiles shown in Table 4 and Table 5.

6. Conclusions

This work shows that combining expert knowledge with optimization effectively manages greenhouse climate’s multiple objectives. By integrating AHP-derived priorities—ranking temperature, irrigation, humidity, lighting, and CO2 into an MPC—we created a balanced, adaptive control aligned with expert input. A key advance is explicitly handling interactions between climate variables, avoiding conflicts and focusing on what matters most for crops. When resources are limited, the controller maintains temperature and water within limits while allowing brief relaxations on lower-priority factors. The controller maintained high tracking accuracy for critical agronomic variables across two seasonal 72 h episodes (Kenitra, Morocco). Temperature and CO2 were tightly regulated (NRMSE ≤ 0.14; SMAPE ≤ 4%), while humidity, lighting, and irrigation remained within acceptable bounds despite variable references and pulsed setpoints.
On the energy side, the system intelligently synchronized energy-intensive actions with local renewable availability. In summer, 59.99% of the total demand (197.66 kWh) was met by PV, wind, and battery, limiting peak grid import to 4.57 kW. In winter, local sources covered 22.84% of 181.48 kWh demand, with controlled peak grid use at 6.92 kW. No renewable energy was exported; instead, surplus was stored and strategically dispatched to support agronomic priorities. Seasonal tests confirm it optimizes energy use by aligning heavy tasks with solar peaks in summer and protecting critical functions with battery and grid support in winter.
Our intent here was to isolate the value of weighting and orchestration; accordingly, the prediction engine feeding the MPC was kept generic. Future work will benchmark statistical, machine-learning and hybrid forecasters and quantify their impact on closed-loop performance [55]; extend experiments to the full tomato production cycle (≈3–4 months); deploy real-time implementations with IoT sensing; and investigate adaptive re-weighting across phenological stages, price-responsive operation, and coordination of multiple greenhouses within a renewable microgrid.
Overall, integrating survey-based priorities into a predictive, anticipatory controller offers a practical path to knowledge-driven, resource-aware greenhouse operation—capable of maintaining agronomic quality while intelligently arbitraging scarce energy and water.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/en18236219/s1. The complete survey is shared as a supplementary file uploaded with the article. It is also available online at the following link: https://hbenzzine.limesurvey.net/125259?newtest=Y&lang=en (accessed on 12 September 2025).

Author Contributions

Conceptualization, H.B., H.L. and D.Z.; Methodology, H.B.; Software, H.B.; Validation, D.Z. and A.S.; Formal Analysis, I.E.A. and H.L.; Investigation, all authors; Resources, A.B. and R.E.B.; Data Curation, H.B. and I.E.A.; Writing—Original Draft Preparation, H.B.; Writing—Review and Editing, all authors; Visualization, H.L. and A.S.; Supervision, D.Z. and R.E.B.; Project Administration, D.Z. and R.E.B.; Funding Acquisition, D.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data supporting the findings of this study, including the full survey, are contained within the article and its Supplementary Material. Further inquiries can be directed to the corresponding author.

Acknowledgments

We would like to thank the Moroccan Ministry of Higher Education, Scientific Research and Innovation, the OCP Foundation, the UM6P, and the CNRST who supported this work through the APRD research program.

Conflicts of Interest

The authors declare no conflicts of interest.

Nomenclature

LSTMLong Short-Term Memory
HVACHeating, Ventilation, and Air Conditioning
LEDLight Emitting Diode
w(t)absolute air water content
ρ Air density
C a i r Air heat capacity
T a m b Ambient temperature
AreaArea of the greenhouse
P a t m Atmospheric pressure
η C h a r Battery charging efficiency
η D i s Battery discharging efficiency
W e v p Crop evaporation at each hour
β Dynamic deviation of CO2
γ Dynamic deviation of Humidity
η Dynamic deviation of Irrigation
φ Dynamic deviation of Lighting
ϕ Dynamic deviation of temperature
c 5 Empirical coefficients Constant [kgwater/kgair] 0.6228
c 4 Empirical coefficients Constant [1/K] 1/17.0789
c 2 Empirical coefficients Constant [Pa] 1.7001
c 3 Empirical coefficients Constant [Pa] 7.7835
c 1 Empirical coefficients related to saturation vapor pressure calculation
Constant 100
P C O 2 Energy consumption for CO2 injection
g Gravitational acceleration on earth
Q i r r ( t ) Irrigation water flow rate to the greenhouse
L Light intensity [lux] 5500
η l Lighting efficiency
W max_deh   Max. rate of dehumidifier
W m a x f o g Max. water rate of fogging system
P N p v Nominal power output of the PV panels
d i r r Pressure head (pumping height) for irrigation pump
d s Pressure head (pumping height) for source pump
η i r r Pumping efficiency for irrigation pump
η s Pumping efficiency for source pump
K t PV efficiency factor
P r Rated power of the wind turbine
G ref   Reference solar irradiance
T ref   Reference temperature for PV operation
G ( t ) Solar irradiance
 optSubscript indicating the optimal value of a variable
R b Thermal resistance
C inj   Total mass of CO2 to be injected
g v Ventilation rate
V Volume greenhouse
ρ ˇ Water density
Q i r r ( t ) Water flow rate supplied by the irrigation pump
Q s ( t ) Water flow rate supplied by the source pump
r ( t ) Water stored in the reservoir
v ( t ) Wind speed
v c u t i n Wind turbine cut-in speed
v c u t o u t Wind turbine cut-out speed

References

  1. Raj, J.S.; Ananthi, J.V. Automation Using IoT in Greenhouse Environment. J. Inf. Technol. Digit. World 2019, 1, 38–47. [Google Scholar] [CrossRef]
  2. Riahi, J.; Nasri, H.; Mami, A.; Vergura, S. Effectiveness of the Fuzzy Logic Control to Manage the Microclimate Inside a Smart Insulated Greenhouse. Smart Cities 2024, 7, 1304–1329. [Google Scholar] [CrossRef]
  3. Shamshiri, R. A Review of Greenhouse Climate Control and Automation Systems in Tropical Regions. J. Agric. Sci. Appl. 2013, 2, 175–182. [Google Scholar] [CrossRef]
  4. Hoque, E.M.J.; Ahmed, M.; Hannan, S. An Automated Greenhouse Monitoring and Controlling System using Sensors and Solar Power. Eur. J. Eng. Technol. Res. 2020, 5, 510–515. [Google Scholar] [CrossRef]
  5. Danita, M.; Mathew, B.; Shereen, N.; Sharon, N.; Paul, J.J. IoT Based Automated Greenhouse Monitoring System. In Proceedings of the 2018 Second International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, 14–15 June 2018; pp. 1933–1937. [Google Scholar] [CrossRef]
  6. Azzi, A.; Abid, M.; Hanif, A.; Bensag, H.; Tabaa, M.; Hachimi, H.; Youssfi, M. A Hybrid Control Strategy Combining Reinforcement Learning and MPC-LSTM for Energy Management in Building. Energies 2025, 18, 4783. [Google Scholar] [CrossRef]
  7. 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]
  8. 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]
  9. Chen, L.; Du, S.; He, Y.; Liang, M.; Xu, D. Robust model predictive control for greenhouse temperature based on particle swarm optimization. Inf. Process. Agric. 2018, 5, 329–338. [Google Scholar] [CrossRef]
  10. Mahmood, F.; Govindan, R.; Al-Ansari, T. Efficient energy management and temperature control of a high-tech greenhouse using an improved data-driven model predictive control. Energy Convers. Manag. X 2025, 26, 100939. [Google Scholar] [CrossRef]
  11. Bersani, C.; Fossa, M.; Priarone, A.; Sacile, R.; Zero, E. Model Predictive Control versus Traditional Relay Control in a High Energy Efficiency Greenhouse. Energies 2021, 14, 3353. [Google Scholar] [CrossRef]
  12. Chen, W.-H.; Mattson, N.S.; You, F. Intelligent control and energy optimization in controlled environment agriculture via nonlinear model predictive control of semi-closed greenhouse. Appl. Energy 2022, 320, 119334. [Google Scholar] [CrossRef]
  13. Blasco, X.; Martínez, 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]
  14. Pazek, K.; Rozman, Č. Application of Analytical Hierarchy Process in Agriculture. Poljoprivreda 2005, 11, 67–73. [Google Scholar]
  15. Kumar, A.; Pant, S. Analytical hierarchy process for sustainable agriculture: An overview. MethodsX 2023, 10, 101954. [Google Scholar] [CrossRef]
  16. García, J.L.; Alvarado, A.; Blanco, J.; Jiménez, E.; Maldonado, A.A.; Cortés, G. Multi-attribute evaluation and selection of sites for agricultural product warehouses based on an Analytic Hierarchy Process. Comput. Electron. Agric. 2014, 100, 60–69. [Google Scholar] [CrossRef]
  17. Zandi, P.; Mosavi, A.; Khanian, M. Agricultural Risk Management Using Fuzzy TOPSIS Analytical Hierarchy Process (AHP) and Failure Mode and Effects Analysis (FMEA). Agriculture 2020, 10, 504. Available online: https://www.academia.edu/44386900/Agricultural_Risk_Management_Using_Fuzzy_TOPSIS_Analytical_Hierarchy_Process_AHP_and_Failure_Mode_and_Effects_Analysis_FMEA (accessed on 22 March 2025). [CrossRef]
  18. Veisi, H.; Liaghati, H.; Alipour, A. Developing an ethics-based approach to indicators of sustainable agriculture using analytic hierarchy process (AHP). Ecol. Indic. 2016, 60, 644–654. [Google Scholar] [CrossRef]
  19. Farooq, M.S.; Javid, R.; Riaz, S.; Atal, Z. IoT Based Smart Greenhouse Framework and Control Strategies for Sustainable Agriculture. IEEE Access 2022, 10, 99394–99420. [Google Scholar] [CrossRef]
  20. Chen, W.-H.; You, F. Semiclosed Greenhouse Climate Control Under Uncertainty via Machine Learning and Data-Driven Robust Model Predictive Control. IEEE Trans. Control. Syst. Technol. 2022, 30, 1186–1197. [Google Scholar] [CrossRef]
  21. Lin, D.; Zhang, L.; Xia, X. Hierarchical model predictive control of Venlo-type greenhouse climate for improving energy efficiency and reducing operating cost. J. Clean. Prod. 2020, 264, 121513. [Google Scholar] [CrossRef]
  22. Chavez, M.D.; Berentsen, P.B.M.; Lansink, A.G.J.M.O. Assessment of criteria and farming activities for tobacco diversification using the Analytical Hierarchical Process (AHP) technique. Agric. Syst. 2012, 111, 53–62. [Google Scholar] [CrossRef]
  23. Kim, D.; Lee, J.; Do, S.; Mago, P.J.; Lee, K.H.; Cho, H. Energy Modeling and Model Predictive Control for HVAC in Buildings: A Review of Current Research Trends. Energies 2022, 15, 7231. [Google Scholar] [CrossRef]
  24. Achour, Y.; Ouammi, A.; Zejli, D. A predictive control strategy for optimal operation of a chicken coop integrated microgrid. Smart Agric. Technol. 2025, 12, 101239. [Google Scholar] [CrossRef]
  25. Bersani, C.; Ruggiero, C.; Sacile, R.; Soussi, A.; Zero, E. Internet of Things Approaches for Monitoring and Control of Smart Greenhouses in Industry 4.0. Energies 2022, 15, 3834. [Google Scholar] [CrossRef]
  26. Tawfeek, M.A.; Alanazi, S.; El-Aziz, A.A.A. Smart Greenhouse Based on ANN and IOT. Processes 2022, 10, 2402. [Google Scholar] [CrossRef]
  27. Muñoz, M.; Guzmán, J.L.; Sánchez-Molina, J.A.; Rodríguez, F.; Torres, M.; Berenguel, M. A New IoT-Based Platform for Greenhouse Crop Production. IEEE Internet Things J. 2020, 9, 6325–6334. [Google Scholar] [CrossRef]
  28. Feng, J.; Hu, X. An IoT-based Hierarchical Control Method for Greenhouse Seedling Production. Procedia Comput. Sci. 2021, 192, 1954–1963. [Google Scholar] [CrossRef]
  29. Moghaddam, J.J.; Zarei, G. Application of model predictive control via crop dry weight model in greenhouse climate control. Int. J. Model. Simul. 2025, 1–16. [Google Scholar] [CrossRef]
  30. Maraveas, C.; Piromalis, D.; Arvanitis, K.G.; Bartzanas, T.; Loukatos, D. Applications of IoT for optimized greenhouse environment and resources management. Comput. Electron. Agric. 2022, 198, 106993. [Google Scholar] [CrossRef]
  31. Allali, F.E.; Fatnassi, H.; Demrati, H.; Errais, R.; Wifaya, A.; Aharoune, A. Greenhouse cooling systems: A systematic review of research trends, challenges, and recommendations for improving sustainability. Clean. Eng. Technol. 2025, 26, 100973. [Google Scholar] [CrossRef]
  32. Achour, Y.; Ouammi, A.; Zejli, D.; Sayadi, S. Supervisory Model Predictive Control for Optimal Operation of a Greenhouse Indoor Environment Coping With Food-Energy-Water Nexus. IEEE Access 2020, 8, 211562–211575. [Google Scholar] [CrossRef]
  33. Desbalo, M.T.; Woldesenbet, A.K. Enhancing strategic decision-making in built asset management through BIM-Enabled asset information modelling (AIM) for public buildings in Ethiopia: A fuzzy-AHP analysis. Heliyon 2024, 10, e40824. [Google Scholar] [CrossRef]
  34. Aczél, J.; Saaty, T.L. Procedures for synthesizing ratio judgements. J. Math. Psychol. 1983, 27, 93–102. [Google Scholar] [CrossRef]
  35. Forman, E.; Peniwati, K. Aggregating individual judgments and priorities with the analytic hierarchy process. Eur. J. Oper. Res. 1998, 108, 165–169. [Google Scholar] [CrossRef]
  36. Erdoğan, E.M.; Yılmaz, H.; Topuz, E.; Özkan, M. Decision making with analytical hierarchy process approach to select feedstock type for bioethanol production: Is 3G more sustainable than others? Renew. Energy 2024, 236, 121464. [Google Scholar] [CrossRef]
  37. Saaty, T.L. Decision making with the analytic hierarchy process. Int. J. Serv. Sci. 2008, 1, 83–98. [Google Scholar] [CrossRef]
  38. Saaty, T.L. How to Make a Decision: The Analytic Hierarchy Process. Aestimum 1994, 75–105. [Google Scholar] [CrossRef]
  39. Benzzine, H.; Labrim, H.; el Aouni, I.; Achour, Y.; Bajit, A.; Saad, A.; Ettahri, H.; Balli, M.; Zejli, D.; El Bouayadi, R. MATLAB-TRNSYS Simulation Framework for MPC-Based Optimization of Hybrid Renewable Energy Systems. Sci. Afr. 2025, 28, e02751. [Google Scholar] [CrossRef]
  40. Bozchalui, M.C.; Cañizares, C.A.; Bhattacharya, K. Optimal Energy Management of Greenhouses in Smart Grids. IEEE Trans. Smart Grid 2015, 6, 827–835. [Google Scholar] [CrossRef]
  41. Mortensen, L.M. Review: CO2 enrichment in greenhouses. Crop responses. Sci. Hortic. 1987, 33, 1–25. [Google Scholar] [CrossRef]
  42. Arellano-Beltrán, J.; Rico-García, E.; Hernández-Pérez, C.I. A new simple canopy photosynthesis measurement system. In Proceedings of the 2017 XIII International Engineering Congress (CONIIN), Santiago de Queretaro, Mexico, 15–19 May 2017; pp. 1–5. [Google Scholar] [CrossRef]
  43. Notton, G.; Muselli, M.; Poggi, P.; Louche, A. Decentralized wind energy systems providing small electrical loads in remote areas. Int. J. Energy Res. 2001, 25, 141–164. [Google Scholar] [CrossRef]
  44. Borhanazad, H.; Mekhilef, S.; Ganapathy, V.G.; Modiri-Delshad, M.; Mirtaheri, A. Optimization of micro-grid system using MOPSO. Renew. Energy 2014, 71, 295–306. [Google Scholar] [CrossRef]
  45. Ouammi, A.; Dagdougui, H.; Dessaint, L.; Sacile, R. Coordinated Model Predictive-Based Power Flows Control in a Cooperative Network of Smart Microgrids. IEEE Trans. Smart Grid 2015, 6, 2233–2244. [Google Scholar] [CrossRef]
  46. Ran, Q.; Li, M.; Peng, F.; Du, Y.; Shen, Y.; Ma, Y. Multi-objective optimization design of an umbilical cross-sectional layout based on the sequential least squares quadratic programming algorithm. Ocean Eng. 2025, 321, 120365. [Google Scholar] [CrossRef]
  47. Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nat. Methods 2020, 17, 261–272. [Google Scholar] [CrossRef]
  48. Adams, S.R.; Cockshull, K.E.; Cave, C.R.J. Effect of Temperature on the Growth and Development of Tomato Fruits. Ann. Bot. 2001, 88, 869–877. [Google Scholar] [CrossRef]
  49. Dorais, M.; Papadopoulos, A.P.; Gosselin, A. Greenhouse Tomato Fruit Quality. In Horticultural Reviews; John Wiley & Sons: Hoboken, NJ, USA, 2000; pp. 239–319. [Google Scholar] [CrossRef]
  50. Hu, H.; Xu, L.; Zhu, B.; Wei, R. Compatible Control Algorithm for Greenhouse Environment Control Based on MOCC Strategy. Sensors 2011, 11, 3281–3302. [Google Scholar] [CrossRef]
  51. Bersani, C.; Ouammi, A.; Sacile, R.; Zero, E. Model Predictive Control of Smart Greenhouses as the Path towards Near Zero Energy Consumption. Energies 2020, 13, 3647. [Google Scholar] [CrossRef]
  52. Qu, Y.; Clausen, A.; Jørgensen, B.N. A multi-objective optimization platform for artificial lighting system in commercial greenhouses. Energy Inform. 2021, 4, 44. [Google Scholar] [CrossRef]
  53. Gholami, M.; Arefi, A.; Hasan, A.; Li, C.; Muyeen, S.M. Enhancing energy autonomy of greenhouses with semi-transparent photovoltaic systems through a comparative study of battery storage systems. Sci. Rep. 2025, 15, 2213. [Google Scholar] [CrossRef]
  54. Aaslyng, J.M.; Lund, J.B.; Ehler, N.; Rosenqvist, E. IntelliGrow: A greenhouse component-based climate control system. Environ. Model. Softw. 2003, 18, 657–666. [Google Scholar] [CrossRef]
  55. Allouhi, A.; Choab, N.; Hamrani, A.; Saadeddine, S. Machine learning algorithms to assess the thermal behavior of a Moroccan agriculture greenhouse. Clean. Eng. Technol. 2021, 5, 100346. [Google Scholar] [CrossRef]
Figure 1. Greenhouse architecture.
Figure 1. Greenhouse architecture.
Energies 18 06219 g001
Figure 2. Control Scheme for Greenhouse Management.
Figure 2. Control Scheme for Greenhouse Management.
Energies 18 06219 g002
Figure 3. AHP–MPC study workflow.
Figure 3. AHP–MPC study workflow.
Energies 18 06219 g003
Figure 4. Distribution of survey participants by (a) professional occupation and (b) main field of expertise.
Figure 4. Distribution of survey participants by (a) professional occupation and (b) main field of expertise.
Energies 18 06219 g004
Figure 5. Survey Response Distribution (%).
Figure 5. Survey Response Distribution (%).
Energies 18 06219 g005
Figure 6. Predictive Energy Management Workflow.
Figure 6. Predictive Energy Management Workflow.
Energies 18 06219 g006
Figure 7. 72 h weather forecast for two seasons (June and December).
Figure 7. 72 h weather forecast for two seasons (June and December).
Energies 18 06219 g007
Figure 8. AHP pairwise comparison matrix of climate criteria.
Figure 8. AHP pairwise comparison matrix of climate criteria.
Energies 18 06219 g008
Figure 9. Microclimatic Monitoring (72 h) with Control Actions—Summer Period (3 Days in June).
Figure 9. Microclimatic Monitoring (72 h) with Control Actions—Summer Period (3 Days in June).
Energies 18 06219 g009
Figure 10. Microclimatic Monitoring (72 h) with Control Actions—Winter Period (3 Days in December).
Figure 10. Microclimatic Monitoring (72 h) with Control Actions—Winter Period (3 Days in December).
Energies 18 06219 g010
Figure 11. Seasonal energy dispatch and load satisfaction (AHP-MPC).
Figure 11. Seasonal energy dispatch and load satisfaction (AHP-MPC).
Energies 18 06219 g011
Table 1. Analytical Hierarchy Process Scale.
Table 1. Analytical Hierarchy Process Scale.
Scale ValueDescriptionPractical Interpretation
1Equal importancei and j contribute equally
3Moderate importanceOne criterion is slightly more important than the other
5Strong importanceOne criterion is clearly more important than the other
7Very strong importanceOne criterion is strongly favored and dominates in importance
9Extreme importanceOne criterion is absolutely more important with overwhelming dominance
1/3, 1/5, 1/7, 1/9Reciprocal values indicating inverse relationshipsThe inverse; indicates that j is more important than i by the corresponding level
Table 2. Experience Level Scoring.
Table 2. Experience Level Scoring.
Experience LevelScore
No experience1
Less than 2 years2
Between 2 and 5 years3
More than 5 years4
Table 3. AHP-Derived Priority Weights for Climatic Control Parameters.
Table 3. AHP-Derived Priority Weights for Climatic Control Parameters.
Control ParameterSymbol Weight AHP   Weight   ω Interpretation
Temperature ω ϕ 0.2623Highest priority; directly influences plant physiology
Irrigation ω η 0.2383Critical for water efficiency and yield stability
Humidity ω γ 0.1829Important for transpiration and disease control
Lighting ω φ 0.1664Essential to support extended photoperiod
CO2 ω β 0.1500Necessary for photosynthesis, but lower priority by experts
Table 4. Climate KPIs: NRMSE (Normalized Root Mean Square Error) and SMAPE (Symmetric Mean Absolute Percentage Error).
Table 4. Climate KPIs: NRMSE (Normalized Root Mean Square Error) and SMAPE (Symmetric Mean Absolute Percentage Error).
Summer Period (3 Days in June)Winter Period (3 Days in December)
VariableNRMSE SMAPE NRMSESMAPE
Temperature0.132.250.143.05
Humidity0.197.040.198.56
CO20.103.720.113.92
Lighting0.084.800.106.97
Irrigation0.0841.770.1421.54
Table 5. Energy KPIs.
Table 5. Energy KPIs.
Summer Period (3 Days in June)Winter Period (3 Days in December)
MetricValueValue
Total demand (kWh)197.66181.48
Grid import (kWh)65.83140.61
Peak grid import (kW)4.576.92
PV share (%)47.1010.92
Wind share (%)11.891.99
Battery share (%)8.839.93
Grid share (%)33.3077.48
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

Benzzine, H.; Labrim, H.; El Aouni, I.; Bajit, A.; Saad, A.; Zejli, D.; El Bouayadi, R. Greenhouse Climate Control at the Food–Water–Energy Nexus: An Analytic Hierarchy Process–Model Predictive Control (AHP–MPC) Approach. Energies 2025, 18, 6219. https://doi.org/10.3390/en18236219

AMA Style

Benzzine H, Labrim H, El Aouni I, Bajit A, Saad A, Zejli D, El Bouayadi R. Greenhouse Climate Control at the Food–Water–Energy Nexus: An Analytic Hierarchy Process–Model Predictive Control (AHP–MPC) Approach. Energies. 2025; 18(23):6219. https://doi.org/10.3390/en18236219

Chicago/Turabian Style

Benzzine, Hamza, Hicham Labrim, Ibtissam El Aouni, Abderrahim Bajit, Aouatif Saad, Driss Zejli, and Rachid El Bouayadi. 2025. "Greenhouse Climate Control at the Food–Water–Energy Nexus: An Analytic Hierarchy Process–Model Predictive Control (AHP–MPC) Approach" Energies 18, no. 23: 6219. https://doi.org/10.3390/en18236219

APA Style

Benzzine, H., Labrim, H., El Aouni, I., Bajit, A., Saad, A., Zejli, D., & El Bouayadi, R. (2025). Greenhouse Climate Control at the Food–Water–Energy Nexus: An Analytic Hierarchy Process–Model Predictive Control (AHP–MPC) Approach. Energies, 18(23), 6219. https://doi.org/10.3390/en18236219

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