Linear matrix inequalities tool to design predictive model control for greenhouse climate

Modeling and regulating the internal climate of a greenhouse have been a challenge as it is a complex and time variant system. The main goal is to regulate the internal climate considering the difference between nighttime and diurnal phases of the day. To depict the comportment of the greenhouse, a multi model approach based on two multivariable black box models have been proposed representing the diurnal and nighttime phases of the day. The least-squares method is utilized to identify the parameters of these two models based on an experimental collected data. We have shown that these two models are more representative than one model to describe the dynamic behavior of the greenhouse. The second contribution is to control the internal temperature and hygrometry respecting constraints on actuators and controlled variables. For this purpose, a constrained model predictive control scheme based on the multi-modeling approach have been developed. The optimization problem of the control law is transformed to a convex optimization problem includes linear matrix inequalities (LMI). The simulation results show that the adopted control method of indoor climate allows rapid and precise tracking of set points and rejects effectively the external disturbances affecting the greenhouse.


INTRODUCTION
In recent years, the greenhouse control has attracted considerable interest and the use of advanced controllers have been a huge necessity to provide adequate internal climate conditions and improve the agricultural production. Greenhouse process is a system of safeguarding and improvement of culture development. In order to provide a proper space for plants growing and ensure the biological needs of cultivation, the internal climate of the greenhouse should be controlled [1], [2]. The regulation system consists of a near tracking of the set points values and reducing the effect of the strong external disturbances. In this study, the main goal is to achieve a stable operation by maintaining the internal parameters of the greenhouse near to the desired values. in spite of the interdependencies of the indoor climate with external weather. Greenhouse is multi-inputs/outputs (MIMO) complex system. Physically the process is characterized by a nonlinear variable that depend strongly on the outside weather (wind velocity, temperature, humidity, and solar radiation) and several functioning constraints (actuators and controlled variables). In late many years, numerous scientists have centered on modeling and monitoring the greenhouse environment. Diverse technics are used such as multi-model and neural modeling [3], [4], fuzzy control [5], [6] optimal control [7], [8] robust control [9]. The non-efficiency of classical methods has forced researchers looking forward advanced methods namely neural networks or more specially artificial intelligence (AI)
Most of the submitted studies do not treat the physical difference between diurnal and nocturnal phases [3], [15], [16]. That affects considerably the aptness of the developed controllers to attain the desired performances. In addition, the physical constraints subjected to the greenhouse climate must be incorporated into the controller design. Model predictive control is a strategy that includes constraints in control law formulation [17]- [20].
In this work, we combine the advantages of constrained model predictive control (CMPC) with the linear matrix inequalities (LMI) as two tools to control the internal climate, characterized by inside temperature and hygrometry. The advantage is to consider both physical constraints and the specifics characteristics of diurnal and nocturnal periods. In this scheme, the LMI based model predictive control (MPC) controller is predesigned to operate strictly under ranges of constraints in accordance with actuators limitations and farmers' requirements.
This paper is organized into five sections. Section 2 is consecrated to greenhouse modeling and parametric identification. Section 3 focuses on the MPC scheme and LMI approach considering constraints on inputs/outputs. Section 4 is devoted to the presentation of the simulation results, which show the feasibility of the proposed strategy to simultaneously control temperature and hygrometry inside a greenhouse. Finally, a conclusion is given in the last section.

GREENHOUSE CLIMATE MODELING AND PARAMETRIC IDENTIFICATION 2.1. Introduction to greenhouse climate modeling
The MPC is an evolved control technic, that is utilized to control process variables. MPC are synthesized using linear models established by identification algorithms. This section is dedicated to model the dynamics of the greenhouse environment. where the whole system's variables are widely coupled. Namely, the outdoor disturbances and the commands applied to the actuators, which are closely linked to the internal climate [15], [16]. In this work, we adopted the linear models that represent the real physical behavior of the process perfectly appropriate for simulation task. For control law design, the performances of a simple model are limited owing to the differences between diurnal and nocturnal physical behaviors. Two linear black-box models are elaborated to emulate the greenhouse process in two phases.

Greenhouse process presentation
The main variables related to the greenhouse climate studied here are summarized and grouped into three classifications: − U is the control input; i) Ht: heating provides the warmth that plants need, especially at night and during the winter. Here, the command is on/off type; ii) Op (°): opening. The roof opening varies between 0° and 32°. It allows an exchange of air between inside and outside of the greenhouse. It influences the temperature, the humidity and the concentration of CO2 inside the greenhouse; iii) Sd (m): shading is mechanically adjustable between 0 and 3 m. Shading helps to maintain or lower levels of the temperature inside the greenhouse. It also keeps the plants safe and protects them from excessive solar radiation; and iv) Mt: moistening manipulated by on-off control. − ym is the measured and controlled variables; i) Ti (°C) is internal temperature and ii) Hi (%) is internal hygrometry. − w is the outside disturbances; i) Gr (W/m 2 ) is global radiation; ii) Te (°C) is external temperature; iii) He (%) is external hygrometry; and iv) Ws (m/s) is wind speed. A synoptic scheme of the greenhouse process is illustrated by Figure 1. Figure 2 presents the data measurement, collected each minute in closed-loop situation during one day (from midnight to midnight). This day was chosen among others because the input signals are rich and therefore very interesting for parametric identification. The controller implemented in this experience acts with two binary commands (Mt and Ht) and two analogue commands (Sd and Op).

Simple and multi-model development of greenhouse
The greenhouse presents a thermal behavior quite different from residential buildings, due to its particular characteristics, of which we quote: i) a structure, covered by transparent material allows the passage of an important quantity of solar radiations; ii) incident solar radiations is a fundamental element for plantations transpiration, accordingly in creating latent heat of vaporization and sensible heat; iii) the soil surface is also influenced by solar radiation. Therefore, it constitutes a source of latent heat; and iv) greenhouse thermal exchanges are insured by soil surface. Contrary to buildings, where heat transfer is constituted by the interaction between cover and walls. These characteristics occur at different phases. Some parameters are influential during one period of the day and completely absent during other periods. For example, we can mention solar radiation. In the same way, some controls are very weak or even absent while they are strongly activated during certain periods of the day. A typical example is the heating system, which is often required at night and inactive during the middle of the day. Consequently, it is important to consider a model taking into account that the behavior of the greenhouse is quite different according to the period of the day.
In our work, we suggest a modeling technique considering the time-varying character of the greenhouse by developing two models. One model describes the behavior of the greenhouse during the diurnal period and the other during the nocturnal period. To validate this approach, we propose to develop a simple model describing the behavior of the greenhouse over a day. Then we present a comparative study to validate the multi-model approach. For both, simple and the multi-model approach, we consider a black-box model that is combined with the parametric modeling methods. It is simply the functional relationship between the inputs and the outputs of the greenhouse. Although the parameters of these functions do not have any physical meaning, the black box models are very effective. The objective is to accurately represent certain trends in the behavior of the greenhouse. The proposed simple linear model is a black-box one, outputs are linearly correlated with control actions and disturbances. This one is presented: where and are two linear functions ( , ), are a set of modeling parameters to be identified. As this model is assumed linear with regard to the parameters ( , ), we have applied the off-line least-squares method as presented in [9]. The linear model formulated herein is describing indoor climate behavior.
To improve the modeling and identification quality, we propose the multi-modeling approach to estimate internal climate behavior of the greenhouse. The main idea of the multi-modeling approach is to describe the dynamics of the greenhouse process by a set of linear time-invariant systems. Each one is dedicated to representing a phase of the day.
We distinguish two behaviors characterizing the greenhouse process: a) In nocturnal phase The external temperature involves near its minimum value. Global radiation is practically non-existent so it can be neglected in nocturnal model formulations. The external hygrometry remains almost constant at maximal value during the night phase. In diurnal phase In this phase, the global radiation starts to appear then its amplitude increases until it reaches a maximum value at noon. The external temperature gradually increases towards a maximal value then it decreases towards the minimum at the end of the day. The behavior of the external hygrometry is opposite of that of temperature it decreases towards a minimal value then it increases progressively until its maximal value at midnight.
For nocturnal and diurnal phases, mean values of disturbances are presented in Table 1. For both phases, a linear discrete state-space model is proposed: Figure 3 represents the synoptic schema of diurnal and nocturnal models and the corresponding parameters. As shown in Figure 4 the estimated variables match approximatively the measured ones during one day. Table 2 shows the result performances of the adopted simple and multi-model linear models, where the mean squared error (MSE) is used as a criteria performance to validate the modeling and identification parameters.

Comparison between simple and multi-model approaches
The predicted and measured variables are presented in Figure 4. The internal temperature and hygrometry estimated by the multi-modeling approach represents adequately the behavior of the greenhouse process. Table 2 confirms this superiority of the adopted multi-model approach to estimate efficiently the internal climate variables. In this comparison, the mean squared error (MSE) is used as performance metric.

MPC DESIGN TO CONTROL GREENHOUSE INDOOR CLIMATE WITH LMI APPROACH 3.1. Multi-model predictive control formulation
In the context of multi-modeling approach to the control design, a conventional method is to consider two controllers which switch according to the corresponding period of the day. Nevertheless, the switching controllers have the main drawback to produce excessive variations in control signals when switching is made. This unwanted comportment could seriously corrupt the control loop and may lead to destabilizing the process.
In this case, the question is which criterion should be used to ensure smooth switching. To avoid these drawbacks, the MPC design is considered combined with LMI as a tool to take into account the multi-modeling approach. The MPC seems to be an appropriate choice due to its robustness and efficiency [21], [22]. One of the reasons for its popularity is that it is practically the only technique that provides a methodology that systematically considers constraints in control law synthesis. The controller considers the difference of behavior between diurnal and nocturnal phases by using two models representing each period. The control design structure is adopted to force controlled variables evolving near to desired ones respecting different physical and operational constraints. The two linear models proposed previously are required for the prediction stage. In general, the MPC controller is a method based on a receding finite-horizon optimization problem [18].
The cost function is optimized at each sampling period to obtain the optimal series of control inputs to keep the output as close as possible to the reference trajectory. The controller uses the current state and the predicted state using a model of the plant. In the case of multi-modeling approach, the standard formulation is insufficient to solve the optimization problem. Here, the LMI tool is adopted to transform the MPC problem into a convex optimization problem [21], [22]. First, we recall the main of the MPC method and then extend it to multi-modeling case, which would ultimately lead to a convex optimization problem solved by the LMI tool.
( + / ) is future increment of the input , which is assumed at time . , are diagonal weighting matrices, penalizing the tracking errors and the input increment, respectively. We suppose that = ≥ 0 and = > 0 ∀ , i.e the weighting matrices are constant on the considered horizons.
To present the optimization problem in matrix form compatible with MPC formulation, future control law increments are stored in vector with elements. Future states, input changes, disturbances, and references are organized in vectors , , , and respectively.  In the context of multi-modeling, the state space models of greenhouse process are presented for both phases of the day: where the subscript is relative to the period of the day. To adapt the discrete model (7) of greenhouse towards multi-model predictive algorithm, the increment ( ) = ( ) − ( − 1) is used to compensate model plant mismatch and system disturbances. It is integrated: Over the prediction horizon , the vector of controlled state is estimated as: where, for j=1, 2.
It is interpreted as the difference between the future desired output and the process output over the prediction horizon when the control signal does not change over the same horizon, i.e. ( ) = 0. Using (9), (10), and (11) in (12), the cost functions becomes as (14).
In practical situation, the tracking performance of the desired inside climate is limited by constraints depending on the power available on the actuators. In addition, the comfort required by the plants during the growth period requires also constraints on the controlled variables. MPC allows explicitly handles constraints [17]. In the study case, constraints are linked to the maximal and minimal of power that can be delivered by the actuators. They are designated: where the subscripts min and max denote the minimum and maximum values respectively of the control inputs. Therefore, the input signals must verify the following constraints: Future control actions are represented over the control horizon Nc: Therefore, constraints on future control actions (16) are integrated: and are column vectors with elements of and respectively. Similarly, constraints on the controlled variables are represented by the following inequalities: Considering the state prediction (9), the constraints (20) are expressed in terms of over the prediction horizon as: and are column vectors with elements of and respectively. Finally, the MPC problem is become as computing future increment control action minimizing the cost functions (14) subject to the inequality constraints: where, The problem is therefore the following: calculate the future increments of the control signal which minimize the criterion given by the relation (12) while satisfying constraints given by (22). This approach leads to the quadratic programming problem. The synthesis of the control law is generally solved by a conventional constrained optimization tool called the "Quadprog" function in MATLAB [23]. The particularity in this study, that there are two cost functions to optimize simultaneously. So, the "Quadprog" function is no longer suitable for our study [24]. Therefore, the LMI appears as a suitable method to be applied to the constrained convex optimization problem as it will be detailed in the next section.

LMI based multi-model predictive control design
In this section, a formulation of MPC control scheme is presented using LMI tools to solve numerically the optimization problem in the multi-model case as is summarized in the Figure 5. The model predictive controller uses predicted disturbances and measures of controlled internal climate to compute a sequence of control actions subject to inequality constraints. For multi-model case, we must minimize the two-cost functions 1 , 2 given by (14). In general, the minimization of convex quadratic functions 1 and 2 can be expressed in an equivalent minimization strategy as: minimize and find an admissible :    (24): where, The constraints (22) are initially non-symmetric matrix; thus, it is restructured in a diagonal symmetric form compatible with LMI formalism. Using the LMI solver of MATLAB, we obtain at each iteration the optimization objective defined as: ℎ = [ , ] . Since the global optimization problem is min ℎ, where: In the MPC algorithm, over the control horizon we consider the first n elements of the global solution. Where n is the number of system inputs. This scenario is repeated at each sampling time. Therefore, the first four elements of the vector are applied to the controlled process. At time k the vector is computed as (26): where 4 is the (4,4) identity matrix, and 4 is the (4,4) zero matrix. From (26), we deduce the optimal control at the time . [ The MPC algorithm requires future disturbances over the prediction horizon. As this information is not available in the practical case. It can be collected from the weather forecast. We suppose that the disturbance vector is constant, equal to the last measured outside weather over the same horizon . It can be expressed as in (28).

SIMULATION RESULT AND DISCUSSION
The multi-model MPC controller developed in the last section is combined with an LMI solver of MATLAB [25] at each iteration the control of the greenhouse process is equivalent to an optimization objective, satisfying simultaneity constraints in control actions and agriculturist's exigencies on the controlled parameters. The aptness of the LMI MPC controller depends strongly on the linear model used in the control design, the non-repetitive disturbances in amplitude and frequency of apparition. The most important factors for MPC performance are the control and prediction horizons as they directly influence the size of the optimization problem. Here, we simulate the developed scheme in realistic conditions using a set of parameters summarized in Table 3. The simulation of the controlled process in a closed-loop is done in one day corresponding to 1,440 sampling time. The set point is assumed constant during the simulation and equal to 11 °C and 70% for the temperature and hygrometry respectively. Table 4 represents different constraints on the controlled parameters and control actions. Figure 6. shows the time evolution of the internal temperature and hygrometry for 24 hours. Figure 7. depicts the time evolution of applied commands during the same day. The control objective was achieved perfectly since all constraints on the limitation of actuators are respected. The controlled parameters are maintained near the desired trajectory except in the middle of the day (12 to 16 h) where the meteorological disturbances are too intense and strongly affect the controller response. The greenhouse considered here is an experimental process with insufficient actuators power. We have tried to ensure climatic conditions as predefined in controlled parameter constraints, it is not possible to reach the setpoint exactly without increasing the power of the actuators and/or relaxing the constraints. In this case, better performances will be achieved. Also, in greenhouse internal climate control, the objective is not to attain exactly the desired trajectory, but we search for a satisfying range where indoor climate involves.

CONCLUSION
This paper refers to a climatic control problem in agricultural greenhouses. The controlled internal climate is defined by two relevant variables, namely internal temperature and hygrometry. For dynamic modeling of the greenhouse, a multi-model approach is used successfully to emulate the greenhouse system taking into account the different behavior of diurnal and nocturnal phases. The comparison with the single model approach confirmed this success. To control the internal climate conditions under strict physical constraints, a hybrid MPC is adopted. The optimization problem is transformed into a set of LMI and solved successfully using MATLAB software tools. The combination of the multi-model approach and the constrained model predictive control provides an effective strategy for the inside climate control problem of agricultural greenhouses. The challenge is to keep the temperature and the hygrometry within an acceptable range around the reference trajectory, which is the farmers are looking for. We believe this challenge has been met with the MPC controller.