ANFIS-Based Climate Controller for Computerized Greenhouse System

Article history: Received: 07 October, 2019 Accepted: 12 December, 2019 Online: 15 January, 2020 The greenhouse climate system is very hard to manipulate because the variables involved are closely correlated. This study aims to enhance the regulation performance of greenhouse climate system based on adaptive neural-fuzzy inference system (ANFIS). The ANFIS is a hybrid technique that incorporates the fuzzy logic theory and artificial neural network algorithms. The employed control system has the ability to stabilize the climatic variables inside greenhouse system at required levels for crops development. The datasets utilized to train ANFIS model was obtained by implementing a fuzzy logic controller under MATLAB Simulink environment. The feasibility, reliability and robustness of the adopted strategy have been experimentally studied. The experiments conducted in real-time show that the proposed technique provides good tracking, short response time and high robustness with regard to outside perturbations and non-linear behaviors of greenhouse systems.


Introduction
During recent decades, computerized greenhouses become an important alternative for crops production to meet the food requirement that is increasing continuously due to the dramatic demographic growth. The quantity and quality improvements of fruits and vegetables need to maintain adequate environmental conditions under greenhouse. For that, growers have to control the main greenhouse climatic parameters that are important for plants growth [1] [2]. Nevertheless, the regulation of internal greenhouse atmosphere is a complicated process. Indeed, the different involved variables interact in a strong way. Moreover, the climate under greenhouse relies not only on the effect of external environment but also on the actions that are produced by the elements of the system through the climate control hardware [3]. During last years, various papers have investigated the smart control technologies of greenhouse production climates like PIintelligent technique [4], fuzzy-based control systems [5][6][7], second-order sliding mode [8], nonlinear adaptive PID control [9] and model predictive control [10]… Controllers based on conventional approaches are broadly implemented and they allow successful control for linear and timeinvariant systems. Nevertheless, greenhouse is considered as complex process. In fact, it presents large nonlinear features, its parameters vary in time and also it has big reliance to the ambient environmental variables [11]. In response, the techniques of artificial intelligence (AI) were introduced in the literature to solve such issues. The main theories belonging to AI are fuzzy logic systems (FLS) and artificial neural networks (ANN). FL-based controller has many benefits for instance: the ability to reason like human being and to be easily designed based on sample dataset, so the exact mathematical model is not demanded. In addition, it has the characteristic to be adapted through changing the generated rules (there is no need to redevelopment) [12]. For the second part, ANN algorithms have great fastness and enormous learning capacity by means of a sample database and to establish nonlinear relationships between different dependent and independent variables [13]. To make use of the reasoning potential of FLS and powerful learning capacities of ANN, ANFIS algorithm has emerged for addressing the challenge of controlling complex, dynamic and non-linear systems. In this study, an ANFIS-based ASTESJ ISSN: 2415-6698 control system was developed in order to promote an appropriate microclimate inside greenhouse system.

Schematic view of the hardware system
This study is conducted based on an automated experimental greenhouse as depicted in Figure 1. The considered prototype was home developed and installed at the Laboratory of Electronic, Automatic and Biotechnology that is a part of the Faculty of Sciences of Meknes in Morocco. A set of sensors are employed to ensure the measurements of various environmental variables involved in greenhouse system. LM35DZ sensors are utilized for measuring the outdoor and indoor temperature. The measurements of inside and outside relative humidity are performed using HIH-4000-001 sensors. To achieve control purposes, the experimental setup was equipped with an electrical heater and a variable-speed ventilator. All components are connected to an acquisition and control software units by means of a personal computer and data acquisition card NI 6024E [14][15][16].

ANFIS-based Control Design
ANFIS is an intelligent technique largely used by research communities for system modeling and control [17][18][19]. In fact, ANFIS is an efficient integration of fuzzy logic concepts and ANN algorithms. ANFIS approach are useful to build smart control technics that holds the ability of FLS to process the knowledge provided by human expert so as to imitate his actions by use of ANN learning capability [20]. ANFIS implements Sugeno-type fyzzy rules that are automatically tuned based on ANN algorithms. The fundamental principle of neuro-fuzzy systems is to create fuzzy-based model employing ANN methods where the fuzzy model parameters stand for the weights of the neural network structure [21]. Figure 2 shows the standard ANFIS architecture, where a circle denotes a fixed node, while a square represents an adaptive node. It's composed essentially of five layers (fuzzification, production, normalization, defuzzification and output layer). For simplicity, two inputs and one output are considered.
In the input layer, real values are transferred into linguistic variables. Each node is associated with a node function. The membership degree of linguistic variables is generated according to the following equation: Here, x; Ai and μ point out input variable, fuzzy set and membership function of the i-th node respectively. If μ is generalized bell type, it is determined by three parameters {a,b,c}: The second layer is called as product layer. Each node's output is obtained by multiplying incoming signals to it with each other using the following formula: In the third layer, each node is a fixed one known as N. The i-th node computes the normalized firing strength or normalized weight by dividing the i-th firing strength with the sum of all rules firing strengths: In the fourth layer all nodes are adaptive ones where the node function is given by: Where w is a normalized firing strength from the previous layer and (pi, qi, ri) is the consequent parameter set of the node.
The single fixed node in the fifth layer calculates the overall output by the summation of all incoming signals using the following expression: The procedure of ANFIS design is demonstrated in Figure 3, which comprises essentially five steps. At first, the predefined dataset has been loaded into ANFIS-Editor. The following stage consists of converting the learning data into fuzzy data through a suitable membership function. Afterwards, the corresponding fuzzy rules are established based on fuzzification process. During the fourth stage, parameters of the generated model are updated 5 using the selected learning algorithm. At last, the defuzzification mechanism transfers the fuzzy output to real values and the constructed model is saved.

Greenhouse Climate ANFIS-based Control
The ANFIS controller developed in this works uses two inputs temperature tracking error e(T) and humidity tracking error e(RH) and a single output (voltage). A FL controller was simulated in MATLAB Simulink to provide pairs of inputs-output data. The collected database was recorded so as to be used later for training the adopted control scheme. Figure 4 illustrates the implemented control methodology. The considered control structure was applied to bring the indoor temperature (Tin) and indoor relative humidity (RHin) to desired trajectories (Ts) and (RHs). In fact, the suggested control system drives control actions via the power circuit to reach optimal climate conditions. To construct the ANFIS-based model five "generalized bell" membership functions was associated with every input as indicated in Figure 5 and Figure 6. The output variable was deffuzified using weighted average technique. The ANFIS model was created based on hybridization of two methods which consist of gradient technique to compute input parameters, and least square approach to calculate output function parameters. The architecture of the generated ANFIS controller is shown in Figure 7. The corresponding fuzzy rules are highlighted in Figure 8. We note that the training data was normalized. Hence, the input values belong to the range [-1, 1] while the output voltage is between 0 and 1.

Experimental Results
The main experiments and performed measurements in real time are displayed in Figure 9 and 10. As it observed the indoor temperature (Tin) and indoor relative humidity (HRin) follow closely the predefined set points (Ts) and (RHs). The inside temperature remains close to the set point regardless of external temperature variations (Text). This proves that the developed control strategy is robust relating to external perturbations. As for the inside relative humidity, it is kept at required levels after few minutes. It is clearly obvious that the designed control system allows good regulation performance thanks to its robustness regarding disturbances due to the outside weather and system uncertainties. In fact, it permits to realize an accurate and quick response.

Conclusion
This work has developed an automation system on regulating different keys parameters of environmental greenhouse based on ANFIS algorithm. The proposed control strategy was successfully validated in real time. The experimental measurements demonstrate that the suggested technique is able to track the reference trajectories quickly and without overshoot. It is clear that the used control method guarantees an accurate, robust and fast regulation of greenhouse indoor temperature and relative humidity to create optimal conditions for crops.