Thermal Control of a Greenhouse by Variation in Ventilation Rate using a Fuzzy Parallel Distributed Compensation Controller with an RST Regulator in Each Rule

Problem statement: The greenhouse has uncontrollable inputs that affect its climate, which arises the difficulty to regulate its inside temperature. The solution can be found using a multi-system approach like the Takagi-Sugeno System from which a design of a Parallel Distributed Compensation (PDC) controller is performed. However, a stability problem arises and was negotiatesd in general based on a Lyapunov criterion. The latter isn’t appropriate in our case because of the great number of rules describing the greenhouse. Approach: An alternative solution is proposed using a PDC controller with a local RST regulator in each rule. The synthesis of each one is determined using pole placement avoiding the cross-coupling (that may cause instability) between the local regulators and the sub-models related to differents rules. Results: The proposed fuzzy controller was applied to an experimental greenhouse and was able to lead the inside temperature to the desired value despite the externals perturbations. Conclusion: The presented study offer a simple solution to the stability problem when using PDC controller and so can be mush more implementable than the others stabilization methods presented in the literature. In the agriculture field, it can replace the on-off control action that is widely used in the greenhouses because of the processus complexity.


INTRODUCTION
The efficiency of fuzzy systems when dealing with complex and nonlinear process is well known in the literature. In fact, most of the systems in the industry have complicatedmathematical models that are barely exploitable and so the control of such process becomes very difficult. To solve this problem, fuzzy control were used in the beginning without the need of process model (Mamdani and Assilian, 1975). It's structure is the fusion of control rules described by linguistic terms defined from the knowledge of the process. Very soon the fuzzy system where used also to models some process with successful results (Mamdani, 1977). Recently another fuzzy system has emerged named as the Takagi-Sugeno systems (Takagi and Sugeno, 1985). This latter differ from the former in the rules consequents: It's not a fuzzy set but it's a local model of the system to be approximated. His popularity in modeling and control is continually growing. Indeed, by fitting several local models representing multiples operating points of a process, TS fuzzy model adequately describe the system guaranteeing precision and stability. Moreover, several techniques were used to approximate the submodels parameters; such as weighted least-squares method (Chen and Pham, 2001) or neuro-adaptive learning techniques (Brown and Harris, 1994). Hence, large possibilities can be obtained in the control domain. Wang et al. (1995), a controller structure called Parallel Distributed Compensation (PDC) is introduced which consists in a linear controller developed for each local model. The final control action is obtained using the contribution of all the controllers outputs. Several proposals were presented using this means to control nonlinear processes; (Salaa et al., 2005;Wang et al., 2000;Seddiki et al., 2006) present a PDC control with state feedback in each rule. Le and Stability (2006) the same PDC control is used, with a simulation example, to control a rehabilitation device.
In general, a stability problem appears when using PDC controller. In this case, the most used way to deal with it is applying the Lyapunov criteria with same positive defined Matrix to all rules (Tanaka and Sugeno, 1992). However, this method is inconvenient when using TS fuzzy systems having a large number of rules. Finding a common Lyapunov function become more difficult as the number of subsystem describing a given process increase (Le and Stability, 2006). In the others hands, most of the reals systems are very complicated, others having multiples inputs, which lead to a TS fuzzy model with numerous rules to successfully assimilate them.
A solution was proposed in this study to solve the problem stability without the need of the Lyapunov approach, which is one of the objectives in this study. The solution is based on an RST controller for each sub-model. Theirs parameters are computed with a different methodology from the standard one to insure the stability of the closed loop fuzzy system.
The other objective is the control of the temperature inside an experimental greenhouse using only fans. That is more difficult and complicated than using the air condition system due to the nature of the process. But in return, reduces considerably the energy consumption.
In the following a brief presentation of the Takagi-Sugeno (TS) system followed with an introduction to the PDC control. After that we will present the fuzzy PDC controller with an RST regulator for every local model and we will discuss the stability of the closed loop system. The control strategy will be applied to an experimental greenhouse using the TS model of the process that will be used in the design of the PDC controller.
Takagi-Sugeno fuzzy systems: In a TS fuzzy system the consequence part of every rule is not a fuzzy set but it is a local model of the system. Thus the expression of the rule j of a TS fuzzy system is Eq. 1: The linguistic terms 'z is Ω' represents the rules antecedent part, the system of equation in the second part of Eq. 1 is the consequent, 'z = (z 1 , . . . , z n )' are the inputs of the TS fuzzy system, they can be either the states 'x = (x 1 , . . . , x na )', the input 'uc = (u 1 , . . . , u na )' or the disturbances inputs 'v = (v 1 , . . . , v nv )', 'ji' is the membership function representing the fuzzy subset with a corresponding membership value ' Ω ji (z i )', N is the total numbers of rules.
Assuming that all the sub-systems considered, are completely controllable and completely observable. Also, enoting the following states and inputs variables: x 1 (k) = y(k), x 2 (k) = y(k-1), . . . , x na (k) = y(k-n a +1) u 1 (k) = u(k), u 2 (k) = u(k-1), . . . , u na (k) = u(k-n a +1) The matrix (A j ∈R na×na , B j ∈ R nb×1 and D j ∈s R nd×nd ) represent the parameters of the TS fuzzy system (1) with the following Frobenius canonical structure: The output y j of each local model is weighted by The global output of the fuzzy system is the weighted mean of all submodels outputs, has the next form Eq. 2: We will take for the following Eq. 3: So the output of the TS model becomes Eq. 4: Whit: N j j j 1 0 < (z(k)) < 1 and (z(k)) = 1 = β β ∑ PDC controller is a TS fuzzy system having the same rules of the TS fuzzy model, but in the consequent part there is a control output that stabilizes the local model corresponding. Thus his following expression for each rule j Eq. 5: is Ω j2 , . . ., z n (k) is Ω jn then u j (k) = g j (z 1 (k), . . ., z n (k)) for all j = 1,...,N The global control action is synthesized in the same way as the TS fuzzy model output as follow Eq. 6: With u j representing the local output control.
Design of the fuzzy controller: Stability problem: The most used technique is based on a state feedback control; a proportional gain will be applied to the feedback of each local model. Which lead to the following expression of the output control Eq. 7: The expression of the closed loop system is obtained by replacing Eq. 7 into Eq. 1, 8 and 9: In the literature the most commune way to insure the stability of the closed loop TS fuzzy system is to finding a common Lyapunov function satisfying all the subsystems (Tanaka and Sugeno, 1992). The parameters of the controller could be found by linear matrix inequality as follow.
Theorem: The closed loop TS fuzzy system of the form (19) is quadratically stable for some state feedback K j (via PDC scheme) if there exists a common positive definite matrix P such that Eq. 10 and 11: T jj jj G P G -P < 0 for j = 1, . . . ,N However, it appears from Eq. 10 and 11 that it is very difficult to apply this approach when we have a great numbers of rules describing the system (Lin and Mon, 2001).
In this study another approach is proposed; based on an RST controller for each rule, where its parameters are computed by pole placement following the the matrix inversion methodology. But a modification in the matrix parameters was introduced to insure the stability of the closed loop TS system.

Stability of the proposed controller:
First, consider the transfer function form of a TS fuzzy system. We can follow the same procedure for the continuous TS fuzzy system proposed in (Le and Stability, 2006). Combining Eq. 1and 4 result in the next NARX form Eq. 12: a a n n N j j m jl j 1 m 1 l 1 The Z transformation leads to the new form Eq. 14: a a n n N N -m -1 -l -1 j j m j j l j 1 m 1 j 1 l 1 Let Eq. 15 and 16: a n -1 -m j j m m 1 And so the transfer function of the TS fuzzy system is Eq. 17: Also, consider the two following TS fuzzy systems having the same antecedents as Eq. 12, Eq. 18 and 19: Which leads to their respective transfer functions Eq. 20 and 21:

∑ ∑
The structure of the proposed PDC controller is the same as the standard RST controller, Fig. 1.
The next transfer function of the closed loop system can be deduced Eq. 22: Which leads to the following expression Eq. 23: From the denominator of Eq. 23, it appears that an RST controller initially designed to control a submodel having the same antecedent j has an influence on other submodels with different antecedents which is indicated by the expression N j j j i j i j 1 (A S + B R ). ≠ β β ∑ A controller related to a rule j can be inconvenient to a submodel related to different rule and may cause instability. Thus, the stability of the closed loop TS fuzzy system is not guaranteed.
In fact, the cross-coupling expression is created by the two following multiplications:

∑ ∑
A solution to the stability problem can be found by eliminating hese multiplications.
First, consider each polynomial S j (q -1 ) having the numerator of the submodel with the same ntecedent included in its expression as follow Eq. 24: Whit: The polynomial h (q-1) is the same in all local controllers, which creates a numerical integrator in the open loop fuzzy system allowing disturbances rejection.
After replacing Eq. 24 in the expression of the closed loop fuzzy system (22) the latter will have the next form Eq. 25: Consider the following expression Eq. 26: Replace (26) in (25) lead to the next expression Eq. 27: Suppose that all the closed loop subsystems have the same denominator P (q −1 ) as follow Eq. 28: * -1 -1 -1 -1 j j A (q ) + q R (q ) = P(q ) for all j = 1, . . . ,N In short, we have to find the appropriate polynomial R j (q −1 ) for each rule by solving Eq. 28. Which will ensure the stabilization of the closed loop TS fuzzy system. For * a nP n ≤ Eq. 28 is regular and can be written in the following matrix form Eq. 30 (Landau and Zito, 2006): Where: x The vector x which contain the coefficients of the polynomial R j can be obtained by matrix inversion as follow Eq. 31: In order to preserve the unity gain of the closed loop system, the polynomial T (q −1 ) can be obtained following the next procedure Eq. 32: Temperature control of an experimental greenhouse: Most of the farmers using a greenhouse to grow their plantations have difficulty to cool down the indoor climate during the daylight. The reason is the preponderant influence of the solar radiation which increase the value inside temperature until exceed with several degrees the value of the outside temperature.
The available solution to this problem is the use of a cooling system but it is costly n both equipment and energy consumption. The other alternative with lower cost is the ventilation using fans. But, the existence of thermal and mass exchange between different constituents of the greenhouse, results in a nonlinear behaviors of the process and prevents the control of temperature by classical means (Hanafin and Papasolomontos, 1999). So the thermal control is reduced to an on-off control action maintaining a continuous commutation between two temperatures level. The consequences of such technique has negative effects on the health of the crop and contribute to the development of diseases affecting the cultivation. An effective model of the process is needed in order to reach an efficient control over the inside temperature which is the task handled by TS fuzzy systems.

MATERIALS AND METHODS
The process is an experimental greenhouse having 1.5 m length, 1 m width and 1.25 m height, Fig. 2.  The two equipped fans are driven by two three phases motors insuring a forced ventilation regime. These motors are powered by a frequency converter (microdrive FC 51 Danfoss) in order to control the rotation speed of the fans.
The measurements are carried by several sensors: An LM35 transistor with an AD620 amplifier for the inside and outside temperature, an humidity sensor type SY-230 and a pyranometer type LPPYRA 03 for the solar radiation measurements.
The signals delivered by the different sensors are transferred to MATLAB via a data acquisition module (KUSB 3100). The latter will carry the control output of the PDC controller to the frequency converter.

Fuzzy identification:
The TS fuzzy model of the experimental greenhouse has the following expression for every Rule j Eq. 33: With u is the frequency supplied by the frequency converter to the engine to control the ventilation rate inside the greenhouse.
The parameters of the TS system (33) can be obtained in two steps: • The first one is the estimation of the linguistic part by finding the adequate membership functions. This step is performed using fuzzy clustering with C-mean algorithm (Bezdek, 1981). The results are shown in Fig. 3 • The second step is the estimation of the consequent part containing the sub-models. The recursive weighted least square method is more suitable for this task since the local 5 models are time varying Eq. 34-36 (Trabelsi et al., 2007): Fig. 9: Error of appoximation j e j T j e j e P (k-1) z (k-1) where, λ is a forgetting factor, T j j j j j j ) θ = α α α α α α is the estimated vector of parameters, y is the output representing the inside temperature T. P j (0) and ĵ θ (0) is obtained from an off-line fuzzy identification based on an ordinary weighted least square method (Trabelsi et al., 2007). Following the described procedure, we can obtain appropriate parameters insuring minimal error between the fuzzy model and the process every sample time. The results of the fuzzy identification are presented in Fig.  6-9. Note that the TS fuzzy model is able to assimilate the evolution of the inside temperature. Figure 9 show a small difference with a maximum value of 1°C.

Fuzzy-PDC control:
If we consider the order of the process (a first orderone) in Eq. 31, then matrix M will have the next expression: A (q ) = (1-q )(1-q ) and B (q ) = q α α Then the polynomials R j and S j will have the next form for each rule j Eq. 37 and 38: R j (q −1 ) = r 0j + r 1j q −1 (37) The transfer function of the proposed PDC controller is deduced from its structure represented in Fig. 1 as following Eq. 39 and 40: The implementation of the PDC controller has the following numerical form Eq. 41: The problem of the input saturation can be solved (Astrom and Haglund, 1988) if the control output uj(k) is substituted by the saturation value when this latter is reached. So, the control input that will be applied to the process will have the next form Eq. 42:

RESULTS AND DISCUSSION
The results of the application are displayed in Fig.  10 and 11, where the desired output is chosen equal to 30°C. The experiment was carried during the day of 20 May 2011 from 8h08-19h46 with a sample time equal to 15 s. Despite of the external perturbations (outside temperature, solar radiation and humidity) represented in Fig. 10-13, the PDC controller is able to lead the output to the desired value.

CONCLUSION
Despite the system complexity, the TS fuzzy system combined with RST controller provides good result in term of regulation and robustness. Also, the use of recursive identification and adaptive control improve the accuracy of the fuzzy model which enhances the performance of the fuzzy controller. The results obtained reflect the efficiency of the fuzzy controller proposed.