Vous êtes sur la page 1sur 8

Neuro-Fuzzy Models for Air Temperature and Humidity of a Greenhouse

I.L. Lpez-Cruz and L. Hernndez-Larragoiti Dept. Agricultural Engineering University of Chapingo Chapingo Mexico Keywords: greenhouse climate, dynamic models, fuzzy systems, neural nets Abstract In producing tomatoes and other vegetables in greenhouses, it is important to optimize and to control the indoor environment, by using mechanistic dynamic models of the system. However, the development and use of greenhouse models based on first principles is a costly and a time-consuming task. Black-box models based on measurements of inputs and outputs of the system are a promising approach to study complex and nonlinear systems such as greenhouses. In the present research, neurofuzzy models are generated and studied in order to predict the behavior of air temperature and relative humidity inside a naturally ventilated Mexican greenhouse. Input variables were: air temperature (C) and relative humidity (%), global solar radiation (W m-2) and wind velocity (m s-1), all measured outside the greenhouses. Output variables were air temperature (C) and relative humidity (%) measured inside the greenhouse. The sampling time was each minute. Several neuro-fuzzy models, were generated using the ANFIS (Adaptive Neuro-Fuzzy training of Sugenotype Inference System) neuro-fuzzy model, which is available in the Fuzzy Logic Toolbox of Matlab. Both grid and fuzzy subtractive clustering partitioning of the data were used to generate the fuzzy inference system. Also several (50:50%, 60:40%, 65:35%, 70:30%, 75:25%, and 80:20%) empirical data partitioning were analyzed. Up to three membership functions (Gaussian, Generalized Bell and Trapezoidal) were considered for the inputs and the constant and lineal membership functions for the outputs. Besides, were tested several training epochs. The dataset was generated with climatic information collected from a greenhouse with natural ventilation located at the University of Quertaro, Mexico, with semi-arid weather conditions. Several criteria were used to evaluate models performance such as: RMSE, R2, 1:1 line for measured and calculated values, and also the regression line between calculated and measured values. The results showed that neuro-fuzzy models predict accurately climate behavior inside a greenhouse. INTRODUCTION Although Mexican greenhouse industry is growing rapidly, low productivity is predominant because the lack of optimization and control of the greenhouse environment. Black-box dynamic models of greenhouse climate are helpful not only to understand the system behaviour but also to develop better management strategies of greenhouse climate. Both black-box modelling approaches, Fuzzy systems (Salgado and Cunha, 2005; FitzRodriguez and Giacomelli, 2009) and Neural Networks models (Seginer et al., 1994; Seginer, 1997; Linker et al., 1998; Fitz-Rodriguez, 2008; Fitz-Rodriguez and Giacomelli, 2009) have been applied to agricultural systems and greenhouses, however, neuro-fuzzy models only rarely were applied to the greenhouse environment (Tien, 1997; Tien and van Straten, 1998). Thus, the objectives of the current work are: i) the development of neurofuzzy models to predict air temperature and humidity inside a greenhouse, taking as inputs temperature, solar radiation, wind velocity and air humidity measured outside the greenhouse; ii) the evaluation of neuro-fuzzy models performance in a greenhouse with natural ventilation.

Proc. XXVIIIth IHC IS on Greenhouse 2010 and Soilless Cultivation Ed.: N. Castilla Acta Hort. 927, ISHS 2012

611

MATERIALS AND METHODS Neuro-Fuzzy Models An Adaptive Neuro-fuzzy Inference System (ANFIS) model (Jang, 1993; Jang et al., 1997) has input-output variables, a set of IF-THEN Takagi-Sugeno type fuzzy rules and a fuzzy inference system (Fig. 1). On layer 1, each node i is adaptive with a node function 01,i Ai ( x) to i 1,2; or 01,i Bi 2 ( y ) , to i 3,4; where x, y are inputs to

node i and Ai , Bi 2 are linguistic variables. The membership function for A is the generalized bell function: 1 A ( x) (1) 2b x ci 1 ai
where a, b, c are premise parameters. Each node in layer 2 is a fixed node ( ), whose output is the product of all the incoming signals: 0 2,i Ai ( x) Bi ( y ) ; i 1,2 (2)

Every node in layer 3 is a fixed node (N) in which the ratio of the ith rules firing strength to the sum of all rules firing strengths (normalized firing strength) is calculated: 0 3, i i
__
__

1 2
__

; i 1,2

(3)

For layer 4 each node is adaptive with a node function:


0 4,i i f i i ( pi x qi y ri )

(4)

where p, q, r are consequent parameters. The single node of layer 5 ( ), computes the overall output as the summation of all incoming signals: __ i f i 0 5,i i i f i i (5)

The fuzzy rules in ANFIS are as follows: Rule 1: If x is A1 and y is B1 , then f1 p1 x q1 y r1 Rule 2: If x is A2 and y is B2 , then f 2 p 2 x q 2 y r2 From the ANFIS architecture can be seen that when the values of the premise are fixed, the overall output can be expressed as a linear combination of the consequent parameters.

1 2 f1 f 1 2 1 2 2
__ __ __ __

1 f1 2 f 2 ( 1 x) p1 ( 1 y )q1 ( 1 )r1 ( 2 x) p2 ( 2 y )q 2 ( 2 )r2


__ __ __ __

(6)

Therefore, it is possible to use a hybrid learning rule based on the steepest descent algorithm and least squares estimator to train the ANFIS architecture. The training algorithm has two passes. In a forward pass node outputs go forward until layer 4 and the consequent parameters are identified by the least squares method. During the backward pass, the error signals propagate backward and the premise parameters are updated by the gradient descent algorithm.
612

Experimental Setup The dataset was collected from a greenhouse located at the University of Quertaro, State of Quertaro, Mexico. Geographic location: latitude 2036 N, longitude 10024 W and altitude 1820 m. Climate semi-arid semi-warm with 18.7C annual average air temperature. The greenhouse has four spans of 8 m width and 35 m long. The total ventilation area is 257 m2 with 2 side vents and two roof vents, which can be closed and opened automatically. The cover is plastic of caliber 700 with UV treatment. All the vents have anti-insects screens. The data were collected during July, 2008. The sampling time was 1 min. The number of measurements was 54662. Temperature and relative humidity were measured with a capacitance type sensor (HOBO smart sensor, Onset Computer Corp.). Global solar radiation was measured using a pyranometer (HOBO silicon pyranometer, Onset Computer Corp.). Wind speed was measured by an anemometer (HOBO wind speed smart sensor, Onset Computer Corp.). All sensors were connected to a HOBO Weather Station Data Logger using the HOBOware Pro software (Onset Computer Corp.). A tomato crop, with a Leaf Area Index of about unity, was growing in the greenhouse during the recording of the measurements. According to the approach for modeling of greenhouse black-boxes models (Seginer et al., 1994), weather variables were: solar radiation (Ro, W m-2), wind speed (WS, m s-1) gust wind (GS, ms-1), wind direction (WD), relative humidity (HRo, %) and temperature outside (To, C) the greenhouse. The control variables were the vents openings, since the only control available is natural ventilation at summer time, however, because of the season, the windows were always opened. The state variables were air temperature (Ti, C) and relative humidity inside (HRi, %) the greenhouse. The crop variable leaf area index was not considered since the sampling period was too short (1 month). Modeling Procedure 1. Selection of Datasets for Training and Model Validation. For both state variables air temperature and humidity several partitions of data were tested for training a validation sets respectively: 50:50%, 60:40%, 65:35%, 70:30%, 75:25%, and 80:20%. Also combinations of the weather variables were tested taking into account the root mean squared error on both the training and the validation sets in order to evaluate the models performance. In case of temperature tested combinations were: [Ro, HRo, WS, WD, To], [Ro, HRo, WS, GS, To], [Ro, HRo, WS, To], [Ro, HRo, To], and [Ro, To]. On the other hand, for humidity the combinations evaluated were: [Ro, HRo WS, WD, To], [Ro, HRo, GS, To], [Ro, HRo, To], and [Ro, HRo]. 2. Generation of the Initial Fuzzy Inference System. Both grid partitioning and subtractive clustering approaches were tested during the fuzzy rules generation to try to minimize the number of fuzzy rules (Jang et al., 1997). Also the Gaussian, generalized Bell and trapezoidal membership functions were evaluated for each input variable. The neuro-fuzzy models were programmed using the Fuzzy Logic Toolbox for Matlab (Mathworks, 1995-2005). 3. Training of the Neuro-Fuzzy System. All the neuro-fuzzy models were trained using the Adaptive Neuro-fuzzy training of Sugeno-type Fuzzy Inference System which is part of the Fuzzy Logic Toolbox of Matlab. The hybrid training algorithm was used. Several epochs were considered in order to study neuro-fuzzy models convergence. 4. Models Prediction Evaluation. In order to evaluate the performance of the generated neuro-fuzzy models, the root mean squared error (RMSE), the determination coefficient (R2), the 1:1 line among measurements and model predictions and also the regression equation among measurements and predictions were used. RESULTS AND DISCUSSION Figure 2 shows the dataset used to generate the neuro-fuzzy models. Figure 3 displays the architecture of the best neuro-fuzzy model for temperature. The properties of this model were: 6 membership functions for each input variable, 80 nodes, 36 linear parameters, 60 non-linear parameters, and 6 fuzzy rules. This model was obtained using

613

80% of the dataset for training and 20% for model validation. Figure 4 shows the best neuro-fuzzy model architecture designed to predict air humidity inside the greenhouse. The characteristics were: 4 membership functions for each input variable, 50 nodes, 24 linear parameters, 40 no-linear parameters and 4 fuzzy rules. Also in this case the best model was obtained with 80% of the dataset for training and 20% for model validation. It is remarkable that even though air humidity is a non-linear process can be modelled by a neuro-fuzzy model which is slightly simpler than the required for air temperature. The performance of the neuro-fuzzy model to predict air temperature inside the greenhouse is showed on Figure 5. It can be seen that the predictions follow accurately the behaviour of the measurements for both the training and also the testing dataset. The corresponding 1:1 line and also the regression equation among models predictions and measurements, support the good fitting. The determination coefficient for the training and testing dataset were R2=0.962 and R2=0.975, respectively. The corresponding RMSE values were RMSE=1.392 and RMSE=1.424. Figure 6 presents the performance of neuro-fuzzy model for air humidity. It is observed that humidity predictions follow the measurements accurately. The corresponding 1:1 line and also the regression equation stress the good fitting of the model. In this case the determination coefficient for the training and testing dataset were R2=0.976 and R2=0.971, respectively. The RMSE values were: RMSE=3.999 and RMSE=4.659. The overall performance of the developed neuro-fuzzy models was according to previous results for rather different greenhouses and contrasting weather conditions (Tien and van Straten, 1998). In spite of the observed good performance of the neuro-fuzzy models, further studies are required in order to investigate whether or not the neuro-fuzzy models offer advantages in modelling control and especially state variables related with the crop inside greenhouses, in order to apply the neuro-fuzzy approach to control purposes.
CONCLUSIONS Neuro-fuzzy models were generated to predict air temperature and humidity inside a Mexican greenhouse with natural ventilation, taken as inputs the external weather variables. According to the statistics used to evaluate models performance, the best behavior for both variables was obtained as subtractive clustering was applied in combination with a subset of 80% of the data to train the model and 20% of the data to validate it. Both variables were predicted accurately by the models; therefore it seems that the neuro-fuzzy approach is appropriate to generated models of the greenhouse environment. Literature Cited Fitz-Rodrguez, E. 2008. Decision Support Systems for Greenhouse Tomato Production. PhD Thesis, The University of Arizona. Fitz-Rodrguez, E. and Giacomelli, G.A. 2009. Yield prediction and growth mode characterization of greenhouse tomatoes with neural networks and fuzzy logic. Transactions of the ASABE 52(6):2115:2128. Jang, J.S.R. 1993. ANFIS: adaptive-network-based fuzzy inference system. IEEE Trans. On Systems Man and Cybernetics 23(3):665-685. Jang, J.S.R., Sun, C.T. and Mizutani, E. 1997. Neuro-fuzzy and Soft Computing. A Computational Approach to Learning and Machine Intelligence. Prentice-Hall, New Jersey, USA, 614p. Linker, R., Seginer, I. and Gutman, P.O. 1998. Optimal CO2 control in a greenhouse modelled with neural networks. Comp. Electronics Agric. 19:289-310. Salgado, P. and Cunha, J.B. 2005. Greenhouse climate hierarchical fuzzy modelling. Control Eng. Practice 13:613-628. Seginer, I. 1997. Some artificial neural network applications to greenhouse environmental control. Comp. Electronics Agric. 18:167-186. Seginer, I., Boulard, T. and Bailey, B.J. 1994. Neural networks models of the greenhouse climate. J. Agric. Engng. Res. 59:203-216.

614

Tien, B.T. 1997. Neural-fuzzy approach for system identification. PhD Thesis. Wageningen University, The Netherlands. Tien, B.T. and van Straten, G. 1998. A neuro-fuzzy approach to identify lettuce growth and greenhouse climate. Artificial Intelli. Rev. 12:71-93.

Figurese

Layer 1 Layer 2 w Layer 3 w

Layer 4 x y Layer 5 w f f w f x y

A x A B y B

Fig. 1. Adaptive neuro-fuzzy inference system (ANFIS) architecture.

Fig. 2. Climatic variables measured outside and inside the greenhouse located in Quertaro, Mxico during July 2008.

615

Inputs

Input MF w1

Rules w1

Output MF

Output

Ro

w1 f1

RHo

Ti WS

GS

To w6 Layer 1 Layer 2

w6 [Ro RHo WS GS To] Layer 3 Layer 4

w6 f 6

Layer 5

Fig. 3. Neuro-fuzzy models structure to estimate greenhouse air temperature obtained by subtractive clustering and ANFIS.

Inputs

Input MF

Rules

Output MF

Output

w1 Ro w1 w1 f1 RHo RHi

WS GS w4f 4 To w4
Layer 1 Layer 2

w4
[Ro RHo WS GS To] Layer 3 Layer 4 Layer 5

Fig. 4. Neuro-fuzzy models structure to estimate greenhouse air relative humidity obtained by subtractive clustering and ANFIS.

616

Fig. 5. Comparison of neuro-fuzzy models performance for greenhouse air temperature, by simulations, 1:1 line (-----) and regression equation ( ) among measurements and predictions.

Fig. 6. Comparison of neuro-fuzzy models performance for greenhouse air humidity, by simulations, 1:1 line (-----) and regression equation ( ) among measurements and predictions.

617

618

Vous aimerez peut-être aussi