A Decision Support Tool for the Optimal Monitoring of the Microclimate Environments of Connected Smart Greenhouses

In this paper, a comprehensive decision support tool based advanced monitoring system is developed to support transition to smart greenhouses for sustainable and clean food production. The decision framework aims to optimally control and manage the microclimate environments of smart connected greenhouses, where each greenhouse is defined as a self-water producing through an enhanced water desalination process. The main advantage of the current approach lies in the ability of the greenhouses to produce their water loads locally. This paper aims to develop an efficient decision tool able of performing specific monitoring and control functionalities to optimize the operation of the greenhouses where the aim is the energy and water savings. A decision model is implemented for the precise regulation and control of the indoor microclimate defining the optimal growth conditions for the crops. Furthermore, a predictive algorithm is developed to simulate in real time the operation of the greenhouses under various conditions, to assess the response of the system to storage dynamics and renewable sources, as well to control the complex indoor microclimate, energy and water flows, as well to optimize the crops growth. The developed tool is tested through a case study where the influences of climate data on the operation of the whole network are analyzed via numerical results.


I. INTRODUCTION
Transition from traditional to precision and smart agriculture has opened new challenges and perspectives regarding the development of efficient decision-making approaches and management tools where the main objective is the energy and water saving. Smart grids and microgrids concepts have been applied and implemented in many sectors such as residential, industrial and institutional. While still limited applications have been initiated in the agriculture sector, even although this sector has critical impacts and contribution in developing the economy, security and quality of life. Microgrid applications in the agriculture sector, may lead to overcome the challenges facing the transition to smart and precision agriculture as well as meeting the increasing number of regulations on quality, environment, and climate changes. The adoption of The associate editor coordinating the review of this manuscript and approving it for publication was Valentina E. Balas . this approach may enhance sustainable water and energy supply as well as optimal exploitation of the renewable energy sources. The introduction of microgrids in agriculture can enable to environment preservation and economic welfares. Furthermore, they could offer a promising solution stimulating the modernization of agriculture sector by guaranteeing high efficiency, reliability, and cost-effective production.
In the prospect of smart and precision agriculture, smart greenhouses could be viewed as a promising solution and alternative that might change the traditional activities into precision and sustainable manners for food and crops production. These solutions may have a key role and decisive implication in making exhaustive transformation and revolution of the agriculture sector by securing effective decision-support frameworks, smart management practices, and advanced monitoring and control techniques. In this context, it is highly of interest to develop smart management solutions integrating artificial intelligence, advanced control techniques, metering and communication infrastructures and various technologies capable of accomplishing specific monitoring and control functionalities for smart greenhouses. Therefore, this will deliver results that affect automation, water, and energy efficiency methodologies for the smart management greenhouses. This is of significant importance for viable design and development of next-generation agriculture systems as well as it will improve transition to smart agriculture in terms of self-management, self-optimization as well as secure operation in a much more efficient way. Besides, it will provide researchers and scientific community with elaborate tools that empower them to develop methods and practices to resolve the challenging issues related to management and monitoring of smart greenhouses.
Development of control techniques and management practices have attracted several researchers, most of them focused on single microgrid or networked microgrids, [1]- [7], and [8]. Control and management of greenhouse microclimate is a hard task to achieve. In the literature, considerable efforts have been deployed in implementing control algorithms and management techniques. Authors in [9] designed a precision agriculture greenhouse based on IoT and fuzzy. The developed design utilizes a fuzzy control and ZigBee module for wireless communications. Reference [10] constructed a small-scale greenhouse. In their design, heater and piezoelectric transducer powers are defined as inputs, while the temperature and humidity are considered as outputs. The problem of data fusion of wireless sensor networks for system' monitoring of greenhouse is studied in [11]. Furthermore, the authors suggested a hierarchical structure of the wireless sensor networks considering local consistency and slow change of the information in the greenhouse. Authors [12] presented an optimal energy management strategy for greenhouses considering autonomous/grid-connected modes and controlling lighting, humidity, interior temperature and CO 2 rate. A multi-timescale Markov decision process-based energy management is expressed in [13] to cope with intermittencies of renewable energy sources.
The aforementioned works are focused mainly on monitoring a single greenhouse, show limitations from a decision-making viewpoint and lack of comprehensive control framework tacking into account stochastic behavior of the outside weather conditions and the complex interaction among microclimate environment and plants. Moreover, most of them were focused on controlling specific variables, while the greenhouse optimal operation is related to the optimal growing environment, the climate variables interaction, the energy and water consumption, which can be considered as a suboptimal solution. To the best of our knowledge, there are no research works that investigate the MPC for the optimal operation scheduling of interconnected smart greenhouses powered microgrid. This paper aims to fill this gap by suggesting a comprehensive and practical control framework based MPC to optimally control the network of smart greenhouses. Compared to the above-mentioned discussion, the main contribution of this paper can be summarized in: • proposing a new concept of a network of smart greenhouses self-water producing through an enhanced desalination process, which is considered as a microgrid that aims to enhance the quality and security of energy/water supply. In this respect, innovative and original multi-floor vertical greenhouses self-water producing via a modified water desalination process are considered. The considered multi-floor vertical greenhouse is composed by two main parts; the first one is a desalination unit dedicated to produce clean water locally for irrigation purpose, while the second one defines the microclimate environment. The desalination unit is devoted to guarantee the dynamic irrigation water load continuously. This unit uses a humidification-dehumidification process, to produce freshwater from seawater or brackish water. Furthermore, the microclimate unit that includes artificial lighting, CO 2 generator, heating, ventilation and air conditioning (HVAC), system, fans, local pump, and natural ventilation constitutes the optimal environment for crops development.
• developing a decision support tool for the optimal monitoring of the microclimate environments of connected smart greenhouses. The main aim is to implement a centralized control tool based predictive algorithm to optimally manage and monitor a network of interconnected smart greenhouses integrated microgrid coping with variations of renewable sources stochastic behavior of weather conditions.
• The proposed framework might deliver outcomes that impact automation and control schemes for the smart management of networked multi-floor vertical greenhouses. This is of remarkable importance for viable design and development of next-generation agriculture systems. Moreover, the developed techniques could improve conversion to smart agriculture in terms of self-management, self-monitoring as well as accurate operation in a much more feasible way. The developed approach could provide researchers and scientific community with elaborate tools that empower them to develop methods and practices to resolve the challenging issues related to optimization, and control of smart greenhouses. Furthermore, this framework may foster the dissemination of high-quality research toward smart agriculture.

II. CONTROL AND MANAGEMENT OF MICROGRIDS
Recently, more interest is allowed to develop and investigate optimization methods, energy management systems, optimal control algorithms, and application of centralized, distributed, and decentralized schemes with specific applications to microgrids and interconnected network of microgrids. Authors [14] presented an energy management in microgrids based adaptive scheduling framework. The VOLUME 8, 2020 developed framework accounts renewable energy, load management and market contribution. A new method to manipulate the frequency in networked microgrids is presented in [15]. Authors suggested a predictive controller to control the frequency whereas keeping the constraints of voltage at the network level. Reference [16] proposed a distributed control strategy for battery and supercapacitor. The aim is regulation of voltage and compensation of imbalance of power. Optimal dispatch of isolated microgrids based on a distributed approach is presented in [17]. Authors aim to control frequency, optimal dispatch and congestion management. Authors in [18] presented a cluster-oriented cooperative control strategy for multiple AC microgrid clusters. Planning of interconnected microgrids based a two-stage chance constrained stochastic conic approach is investigated in [19]. Authors in [20] analyzed the frequency droop strategy in DC microgrids. A hierarchical control scheme for virtual oscillator control based microgrids is presented in [21]. Furthermore, authors investigate both cases islanded, and grid connected modes. Reference [22] presented a parametric cost framework considering on-line operation approach for microgrids. Authors in [23] introduced the concept of dc power exchange highway to interconnect a cluster of ac microgrids. Authors in [24] discussed a decentralized framework for distribution grids integrating microgrids. Reference [25] proposed a predictive approach for managing a grid connected microgrid.

III. CONTROL AND MANAGEMENT OF GREENHOUSES
In the literature, extensive efforts have been made in controlling and managing greenhouses microclimate. Author [26] investigated an agricultural cyber-physical-social system considering price of agricultural products and environment data. A comprehensive review is presented in [27] to show the roadmap of coupling agriculture-clean energy system. Reference [28] developed algorithms to optimize positioning data of agricultural machinery in greenhouse. Authors [29] developed a daylight harvesting controller consisting based multiple-input multiple output control system. Authors [30] developed greenhouse service control protocol using Python. Reference [31] adopted feedback linearization control technique to control the greenhouse inside temperature. Besides, a robust proportional integral controller is designed using quantitative feedback theory and evaluated in the real system. Authors [32] proposed a receding horizon control strategy for greenhouse. Reference [33] presented and implemented a management system for a greenhouse considering humidity, CO 2 , soil moisture, and indoor temperature. A layout optimization system for rapid and safe robot navigation in a greenhouse is presented in [34]. Reference [35] proposed an automated system to control a greenhouse. Authors [36] designed a controller for a greenhouse to control the inside temperature. Reference [37] presented a mobile monitoring framework based IoT. Besides, authors proposed a four-layer design aiming to offer a motion control function. Authors [38]  presented a load model based on converting crops development into electric power taking in consideration lighting and water needs in greenhouse. Prediction of crops development dynamics based embedded platform with AI is presented in reference [39]. Furthermore, authors investigated and assessed the efficacy of the developed solution and proved its reasonable accuracy for prediction horizon. Generally, greenhouses management approaches lack in expressing integrated methodologies considering dynamics and intermittencies of climate conditions, energy/water accessibility, and introduction of renewable energy. Furthermore, most of the existing works do not consider and take advantages of advances in microgrids modelling, optimization and control. Moreover, actual methods and models show limitations from a decision-making viewpoint. More attention is given to frameworks that investigate and monitor some of the variables defining the microclimate of crops development. The works in the literature are focused mainly on managing and monitoring indoor environment variables in a single greenhouse, while cooperative network of interconnected greenhouses powered microgrid seems more challenging and benefic.

IV. NETWORK OF GREENHOUSES DEFINITION
A. NETWORK ARCHITECTURE This paper proposes a new concept of a network of smart greenhouses self-water producing through an enhanced desalination process, which is considered as a microgrid that aims to enhance the quality and security of energy/water supply as stated in Fig. 1. The microgrid includes distributed renewable energy, energy storage system, sensors, electric and water loads, communication and metering infrastructure, advanced management and monitoring system. These sustainable microgrids may generate local socio-economic and environmental benefits.
Their main objective is balancing power productions and loads in a sustainable manner. In grid-connected configuration, the microgrid is connected to the distribution network operator making mutual benefits in selling/purchasing power. In islanded mode, the microgrid has to achieve renewable energy autonomy through an energy storage unit to ensure the stability and the continuity of the service. In the proposed approach, each greenhouse is considered as self-regulating climate for an optimal crop development. The main benefit that it offers is to allow farmers with two-ways communication infrastructure as well advanced management tools, to monitor the energy and water requirements, the excesses of the energy production, as well as for an optimum growth atmosphere.

B. MANAGEMENT AND MONITORING SYSTEM
In the proposed design, it is assumed that an energy management system is available to manage and monitor operation of such greenhouses self-water producing considering uncertainties and stochastic dynamics of weather data, renewable power production, and indoor environment variables.
The management unit purposes to improve the greenhouse's autonomous operation. The management unit utilizes information collected from diverse sensors existing in each greenhouse to calculate the forecast flow of renewable power produced, outside climate, and the electric power loads. The management unit sends these forecasts to the master controller, which is accountable to provide the optimal control signals. The master controller-based model predictive algorithm is available at the network level and is in charge of optimally controlling the whole network. The main objective of the master controller is to provide optimal set points for the sub-systems. The dynamics and uncertainties of wind speeds and solar irradiation are regulated through the master controller by pumping water or/and by sending surplus power to the main grid or alternatively sending the energy to the batteries. In general, the master controller decides about the optimal manner to dispatch the excess. Nevertheless, in case of shortage the master controller must satisfy the needs, by getting energy from main grid, or/and batteries.

V. MODELLING AND PROBLEM FORMULATION
This paper considers a network of interconnected greenhouses integrated microgrid defining a small internal power grid connected to the main electric utility allowing a bidirectional power exchange. The microgrid includes renewable energy generators, energy storage system, loads, pump and a brackish water reservoir, management unit, as well advanced metering infrastructure. In the proposed approach, an innovative and original greenhouse self-water producing via an enhanced water desalination process is considered.
The considered greenhouse is composed by two main parts; the first one is desalination unit dedicated to produce clean water locally for irrigation purpose, while the second one defines the microclimate environment. Fig. 2 displays the Simulink model of the desalination unit devoted to guarantee the dynamic irrigation water load continuously. This unit uses a humidification-dehumidification process, to produce freshwater from seawater or brackish water. Furthermore, the microclimate unit that includes artificial lighting, CO 2 generator, HVAC system, fans, local pump, and natural venti-lation constitutes the optimal environment for crops development. Fig. 3 shows the model used to define the microclimate unit.
The proposed framework has been formulated as a predictive tracking control problem (see Fig. 4), where the main objective is to optimally control the dynamic variables defining the optimal indoor environment for crops development as well as securing acceptable quality of services minimizing the energy and water uses. The objective function is mainly composed by the following terms: • Monitoring and manipulating the internal environment variables in the greenhouses defining optimal settings and conditions for plants growth. In the proposed design, these variables are defined as dynamic references affected to each crop characterizing its optimal development conditions. Consequently, the problem is formulated to follow the references as close as possible considering the complex interactions and dependences among the variables, stochastic behavior of renewable resources and the impact of the external conditions. The variables considered in this case study are, internal temperature, CO 2 rate, artificial lighting power load, humidity, and water load. VOLUME 8, 2020  • Maximizing the state of the energy storage system. In order to secure and provide an acceptable quality of service, the energy storage system should compensate the dynamics and variabilities of the renewable power production. Furthermore, the energy storage system should support the microgrid in balancing power production and loads. This is a decisive task since the objective here is to maximize the use of the local renewable energy production and minimize the power exchanges with the main electric grid.
• Minimizing power exchanges with the main electric grid. One of the objectives is the limitation of power exchanges by affecting high weighting cost. The priority is given to charging/discharging the energy storage system.

VI. APPLICATION TO A CASE STUDY A. SIMULATION SET UP
The developed design is applied to a case study to demonstrate its efficacy and ability to face and compensate the dynamics and variabilities of renewable resources and power loads. In this context, a microgrid powered a cooperative network of five greenhouses self-water producing is considered.  The main objective is balancing the time-varying production and loads as well as following the references defining the optimal environment development of crops. The approach has been implemented using MATLAB Simulink tool. The microgrid is supposed to include a 6 kWp photovoltaic field composed by 20 x 300 Wp photovoltaic (PV) modules, a wind turbine of 30 kW and a battery bank with a capacity of 2600 Ah and starting with an initial state of 78 %. Sophisticated inverter/charger units with integrated transfer switches are installed to ensure an uninterrupted electricity supply despite the transition between the different AC and DC sources. Moreover, the network is connected to the main grid allowing the power exchanges.
In the current case study, it is supposed that each greenhouse guarantees its irrigation water load through the integrated desalination unit, measuring 10 meters long and 3 meters wide. This unit uses an adapted desalination process, based on humidification-dehumidification technology combined with solar water heaters. The seawater or  brackish water is pumped for the entire network in a centralized way. The produced freshwater is stored in a reservoir with a capacity of 8 m 3 and containing an initial water amount of 2 m 3 . Furthermore, it is assumed that each greenhouse includes HVAC, CO 2 generator, pumps, artificial lighting, fans, sensors, metering, and communication infrastructure.
The outdoor temperature is reported in Fig. 5 and the outdoor humidity is presented in Fig. 6. While the references characterizing the optimal desired microclimate in each greenhouse are defined as follow (see Fig. 7, Fig. 8, and Fig. 9): -Greenhouse 1 (temperature: 18 • C from 05h to 19h and 22 • C from 19h to 05h, lighting power: 0kW from 05h to 19h15 and 6.875 kW from 19h to 05h, water need: 1.6 m 3 during 15min once each hour, all 24h-day long). -Greenhouse 2 (temperature: 20 • C from 05h to 19h and 25 • C from 19h to 05h, lighting power: 0 kW from 05h  to 19h15 and 3.5 kW from 19h to 05h, water need: 1 m 3 during 15min once each hour, all 24h-day long). -Greenhouse 3 (temperature: 22 • C all 24h-day long, lighting power: 0 kW from 05h to 19h15 and 4.05kW from 19h to 05h, water need: 1.2 m 3 during 15min once each hour, all 24h-day long). -Greenhouse 4 (temperature: 16 • C from 05h to 19h and 18 • C from 19h to 05h, lighting power: 0kW from 05h to 19h15 and 5 kW from 19h to 05h, water need: 0.8 m 3 during 15min once each hour, all 24h-day long). -Greenhouse 5 (temperature: 21 • C all 24h-day long, lighting power: 0 kW from 05h to 19h15 and 3 kW from 19h to 05h, water need: 0.95 m3 during 15min once each hour, all 24h-day long). Furthermore, the CO 2 generators work for maintaining the optimal level of each greenhouse. Fig. 10 and Fig. 11 show respectively the freshwater production of a desalination unit and the production evolution VOLUME 8, 2020   during time horizon. The freshwater production follows the evolution of the outdoor temperature and the evolution of the   solar irradiance. It can be observed that the desalination unit can produce until 47 ml/s, and an average of 2200 liters per day and per greenhouse, produced from 05h30 to 20h. The dynamic power production from the renewable energy sources is illustrated in Fig. 12. It can be seen that wind   turbine supplies most of the power loads. The excess of the energy is sent to the storage system specifically during the day, when the load consumption is low, and the electricity supply is strengthened by solar power. Thereby, we can reach a charge rate of over 81% at 19h as shown in Fig. 13.  The electric power load reaches its consumption peak at night as it is illustrated in Fig. 14. Thus, the battery bank is in discharging mode from 20h to 05h as shown in Fig. 13.

B. RESULTS AND DISCUSSION
Comparing the outdoor temperature and the needed indoor temperature, we can already deduce that the HVAC system should set in the heating mode only for all the greenhouses. This has been confirmed by the HVACs operation as stated in their power curves (Figs 15, 16, 17, 18 and 19). The HVACs regulate their operation and respond to the variations of the outdoor temperature. Furthermore, the operation of the HVACs is regulated to follow and track the temperature references.
The dynamics of the total electric power load dispatch at the network level is displayed in Fig. 20. The battery bank is in a discharging mode when the power is insufficient, it switches to the charging phase to absorb the excess energy production caused by the unbalance of the production/consumption profiles. Indeed, Fig. 21 shows that the wind energy holds the biggest part of the energy mix of the microgrid, with the 62% of the total power consumed, where the solar energy covers 10% of the power needs, 12% comes from battery and 16% purchased from the main electric grid. The performance of following the temperature references is reported in Fig. 22. While a comparison between the optimal and references defining artificial lighting loads is performed in Fig. 23. Furthermore, the water load references satisfaction in stated in Fig. 24. The Figures confirm the effectiveness and aptitude of the developed management framework to follow all the references at the network level and to manage the operation of the microgrid.

VII. CONCLUSION
In this paper, we proposed a network of interconnected greenhouses self-water producing via a local desalination unit and driven by a microgrid. The energy supply of the network is ensured by an on-grid hybrid system (wind turbines, photovoltaic, battery bank and main utility). The greenhouses are assumed to define different microclimates. The model predictive control (MPC) technique is adopted to manage the network energy and water use, and to control the greenhouses indoor environment. Thus, the MPC bloc was added to the Matlab Simulink model to act on several variables: the irrigation flow, the indoor temperature and the lighting power, with the objective to keep the storage system charged and to minimize the grid use. A case study was implemented considering an adapted framework, and after carrying out various simulations we get a water production average of 2200 liters per day and per greenhouse, which is enough for the greenhouses irrigation needs. Furthermore, the energy supply was guaranteed at 84% by the renewable energy system. The wind energy holds the biggest part of the energy mix of the microgrid, with 62% of the total power consumption, where the PV modules cover 10% of the total load and 12% comes from battery.