ANFIS-Based Climate Controller for Computerized Greenhouse System

ANFIS-Based Climate Controller for Computerized Greenhouse System

Volume 5, Issue 1, Page No 08-12, 2020

Author’s Name: Hassan Oubehar1,a), Abdelouahed Selmani1, Abdelali Ed-Dahhak2, Abdeslam Lachhab2, Moulay El Hassane Archidi1, Benachir Bouchikhi1

View Affiliations

1Sensors Electronic & Instrumentation Team, Physic Department, Moulay Ismaïl University, Faculty of Sciences, Meknes, Morocco
2Modeling, Systems Control and Telecommunications Team, Department of Electrical Engineering, Moulay Ismaïl University, High School of Technology, Meknes, Morocco

a)Author to whom correspondence should be addressed. E-mail: hassan.oubehar@gmail.com

Adv. Sci. Technol. Eng. Syst. J. 5(1), 08-12 (2020); a  DOI: 10.25046/aj050102

Keywords: Greenhouse, Climate control, Temperature, Relative humidity, ANFIS controller

Share
625 Downloads

Export Citations

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.

Received: 17 October 2019, Accepted: 12 December 2019, Published Online: 15 January 2020

1. 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 PI- intelligent technique [4], fuzzy-based control systems [5-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 time-invariant 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 control system was developed in order to promote an appropriate microclimate inside greenhouse system.

2. 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-16].

Figure 1: Experimental greenhouse system

3. ANFIS-based Control Design

ANFIS is an intelligent technique largely used by research communities for system modeling and control [17-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   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 using the selected learning algorithm. At last, the defuzzification mechanism transfers the fuzzy output to real values and the constructed model is saved.

Figure 2: Basic ANFIS structure

Figure 3: ANFIS flowchart

3.1.  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.

Figure 4: Schematic diagram of the proposed control process

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.

Figure 5: First input fuzzification

Figure 6: Second input fuzzification

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.

Figure 7: Structure the proposed control Model

Figure 8: Fuzzy rules viewer

4. 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.

Figure 9: Evolution of internal and external temperatures

Figure 10: Variation of relative humidity inside and outside greenhouse

5. 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.

  1. H. Oubehar, A. Selmani, A. Ed-Dahhak, A. Lachhab, M.H. Archidi, B. Bouchikhi, “Design and real time implementation of ANFIS controller for greenhouse climate” in 2018 International Conference on Electronics, Control, Optimization and Computer Science (ICECOCS), Kenitra, Morocco, 2018.
  2. M.A. Márquez-Vera, J.C. Ramos-Fernández, L.F. Cerecero-Natale, F. Lafont, J.F. Balmat and J.I. Esparza-Villanueva, “Temperature control in a MISO greenhouse by inverting its fuzzy model,” Computers and Electronics in Agriculture, vol. 124, pp. 168–174, 2016.
  3. N. Bennis, J. Duplaix, G. Enea, M. Haloua and H. Youlal, “Greenhouse climate modelling and robust control,” Computers and Electronics in Agriculture, vol. 61, pp. 96-107, 2008.
  4.  Y. El afou, L. Belkoura, M. Outanoute, A. Rahali, A. Lachhab, B. Bouchikhi, “Feedback Techniques Using PID and PI Intelligent For Greenhouse Temperature Control” International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering,vol. 3, pp. 9779-9792, 2014.
  5.  M. Guerbaoui, A. Ed-dahhak, Y. El Afou, A. Lachhab, L. Belkoura and B.Bouchikhi, “Implementation of Direct Fuzzy Controller in Greenhouse based on Labview” International Journal of Electrical and Electronics Engineering Studies, Vol.1 No.1, pp.1-13, September 2013.
  6.  M.A. Márquez-Vera, J.C. Ramos-Fernández, L.F. Cerecero-Natale, F. Lafont, J.F. Balmat, and J.I. Esparza-Villanueva, “Temperature control in a MISO greenhouse by inverting its fuzzy model,” Computers and Electronics in Agriculture, vol. 124, pp. 168–174, 2016.
  7. R. Ben Ali, S. Bouadila and A. Mami, “Development of a Fuzzy Logic Controller applied to an agricultural greenhouse experimentally validated,” Applied Thermal Engineering, vol. 141, pp. 798–810, 2018.
  8. H. Oubehar, A. Ed-Dahhak, A. Selmani, M. Outanoute, A. Lachhab, M. Guerbaoui, M. H. Archidi and B. Bouchikhi, “ High-Order Sliding Mode Control of Greenhouse Temperature” Indonesian Journal of Electrical Engineering and Computer Science, vol. 4, no. 3, pp. 548 -554, December 2016.
  9. S. Zeng , H. Hu, L. Xu and G. Li, “Nonlinear Adaptive PID Control for Greenhouse Environment Based on RBF Network, ” Sensors, vol. 12, pp. 5328-5348, 2012.
  10. L. Chen, S. Du, Y. He, M. Liang, D. Xu, “Robust model predictive control for greenhouse temperature based on particle swarm optimization,” Info Proc. Agri., in press.
  11.  H. Hu, L. Xu, B. Zhu, and R. Wei, “A compatible control algorithm for greenhouse environment control based on MOCC strategy” Sensors, vol. 11, no. 3, pp. 3281-3302, 2011.
  12. L. Dambrosio, “Data-based fuzzy logic control technique applied to a wind system” Enregy Procedia, vol. 126, pp. 690-697, 2017.
  13. H.K. Ghritlahre, R.K. Prasad, “Application of ANN technique to predict the performance of solar collector systems,” Renewable and Sustainable Energy Reviews, vol. 84, pp. 75–88, 2018.
  14. A. Ed-Ddahhak, A. Lachhab, L. Ezzine, and B. Bouchikhi, “Performance evaluation of a developing greenhouse climate control with a computer system,” AMSE Journal Modelling, Measurement and Control, vol. 68, no. 1, pp. 53-64, 2007.
  15. A Ed-Dahhak, M. Guerbaoui, Y. El Afou, M. Outanoute, A. Lachhab, L. Belkoura, and B. Bouchikhi, “Implementation of fuzzy controller to reduce water irrigation in greenhouse using LabVIEW,” International Journal of Engineering and Advanced Technology Studies, vol. 1, no. 2, pp. 12-22, 2013.
  16. M. Guerbaoui,Y. El Afou, A. Ed-Dahhak, Lachhab A, and B. Bouchikhi, “PC-Based automated drip irrigation system. International Journal of Engineering Science and Technology, ” vol. 5, no. 1, pp. 221-225, 2013.
  17. C.E. Lachouri, M.M. Lafifi, K. Mansouri and A. Belmeguenai, “Adaptive Neuro-Fuzzy Inference Systems for Modeling Greenhouse Climate” International Journal of Advanced Computer Science and Applications, vol. 7, no. 1, pp.96-100, 2016.
  18. N. Mathur, I. Glesk and A. Buis, “ Comparison of adaptive neuro-fuzzy inference system (ANFIS) and Gaussian processes for machine learning (GPML) algorithms for the prediction of skin temperature in lower limb prostheses, ” Medical Engineering and Physics,vol. 38 pp. 1083–1089, 2016.
  19. D.M. Atia and H.T. El-madany, “Analysis and design of greenhouse temperature control using adaptive neuro-fuzzy inference system, Journal of Electrical Systems and Information Technology,” vol. 4, pp. 34–48, 2017.
  20. M. Zare and M. Koch, “Groundwater level fluctuations simulation and prediction by ANFIS- and hybrid Wavelet-ANFIS/Fuzzy C-Means (FCM) clustering models: Application to the Miandarband plain,” Journal of Hydro-environment Research , vol. 18, pp. 63–76, 2018.
  21. B. Haznedar and A. Kalinli, “Training ANFIS structure using simulated annealing algorithm for dynamic systems identification,” Neurocomputing, vol. 302, pp. 66–74, 2018.

Citations by Dimensions

Citations by PlumX

Google Scholar

Scopus

Special Issues

Special Issue on Computing, Engineering and Multidisciplinary Sciences
Guest Editors: Prof. Wang Xiu Ying
Deadline: 30 April 2025

Special Issue on AI-empowered Smart Grid Technologies and EVs
Guest Editors: Dr. Aparna Kumari, Mr. Riaz Khan
Deadline: 30 November 2024

Special Issue on Innovation in Computing, Engineering Science & Technology
Guest Editors: Prof. Wang Xiu Ying
Deadline: 15 October 2024