<figure><img src="image_1.png" /></figure>

HAL
open science

# Expert Control Based on Neural Networks for Controlling Greenhouse Environment

Le Du

► To cite this version:

Le Du. Expert Control Based on Neural Networks for Controlling Greenhouse Environment. Third IFIP TC 12 International Conference on Computer and Computing Technologies in Agriculture III (CCTA), Oct 2009, Beijing, China. pp.126-132, 10.1007/978-3-642-12220-0_20. hal-01061725

HAL Id: hal-01061725

https://inria.hal.science/hal-01061725

Submitted on 8 Sep 2014

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
EXPERT CONTROL BASED ON NEURAL
NETWORKS FOR CONTROLLING
GREENHOUSE ENVIRONMENT

Le Du

Beijing Institute of Technology, Beijing, 100081, China

**Abstract:** Depending upon the nonlinear feature between neural units in artificial neural networks (ANN), artificial neural network was used to develop a model for greenhouse inside air temperature management. Data was collected and processed for training and simulation of temperature model. The design of the network structure and transfer function was also discussed. Because heuristic logic of greenhouse environment exists, a simple ANN controller does not perfect complex task, the algorithm of ANN with heuristic logic is developed. Experimental result indicated that the performance of the new control scheme meet the requirement of greenhouse environment control.

**Keywords:** complex system, neural network, greenhouse environment

# 1. INTRODUCTION

The greenhouse environment belongs to the complex system (G. van Straten et al., 2000; N. Sigrimis et al., 2000; M. Trigui et al., 2000), it is difficult to control due to high nonlinear, and uncertain. System configuration is shown in Fig. 1

<figure><img src="image_3.png" /><figcaption>Fig. 1 Greenhouse Environment Control Architecture</figcaption></figure>
The main purpose of greenhouse is to improve the environmental conditions in which plants are growth. The aim of greenhouse environmental control is to provide means to further improve these conditions in order to optimize the plant production process. The greenhouse climate is influenced by many factors, for example inside air temperature, the actuators, outside weather and crop. Inside air temperature is the most important factor affecting crop growth in greenhouse climate. Temperature exerted significant effects on photosynthesis. The net photosynthetic rate (Pn) varied in day time, it was double peak curve, there was obvious midday depression of photosynthesis, and 21-33°C was the suitable temperature for photosynthesis in summer. Methods aimed at efficiently controlling the greenhouse temperature must take these influences into account, and that is achieved by the use of models. This model is of capital interests in the study of the dynamics of the greenhouse temperature under different climate conditions, aimed at producing inside temperature regularity which helps to avoid extreme situations (high temperature or low temperature, etc.) and to optimize crop production by achieving adequate temperature integrals while reducing pollution and energy consumption.

<figure><img src="image_4.png" /><figcaption>Fig. 2. Chart of variable – temperature</figcaption></figure>

In this control system for plant growth, the key problems include control
system input so called set point and control algorithm. The traditional set
point is shown in Fig. 2. Because set point changes abruptly, that wastes a
large of energy sources. So we must seek a method to transform a segment
of steps chart into a smooth cure for saving energy.

If we control a variable – temperature, the traditional method is to use a
controller (PID) to generate control output u(t). However, the control u(t)
relates many actuators, so optimal method is used to decide what actuator to
act. Since the traditional method is difficult to control this system, Artificial
neural networks and symbolic description methods are introduced.

Artificial neural networks are widely applied in greenhouse environmental control to perform some type of non-linear system mapping. In the fields of identification and modeling of non-linear systems their universal
approximation property is exploited. Previous work on this ANN modeling
task relied in an input output model structure selected from (Cunha et
al.,1996) in the context of dynamic temperature models identifications. This
structure was selected by means of the (Akaike 1974) information criterion
where several hypothesis were tested and the best one chosen. The
application of RBF NN to greenhouse inside air temperature modeling has
been investigated (Ferelra, P.M. Ruano, A.E., 2002). These models always
arise like non-stability, non-regularity, which result in the complete loss of
energy. This paper uses artificial neural network theory and method to
control the range of temperature change and discuss the ANN model with
heuristic logic.

2. ALGORITHM DESIGN OF NEURAL NETWORKS
DIRECT SELF-TUNING CONTROL FOR
GREENHOUSES WITH HEURISTIC LOGIC

Direct self-tuning control with an artificial neural network is shown in
Fig.3 which includes three basic section:

(1) Feedback loop consists of self-tuning controller and controlled plant.

(2) The parameters of the controller are obtained by designing artificial neural networks identification and controller.

(3) Heuristic logic decision what actuators are operated.

It is obvious that the key technique of self-tuning controller is how to
design artificial neural networks identification and controller well and give
appropriate heuristic logic.

<figure><img src="image_5.png" /><figcaption>Fig. 3. Neural networks indirect self-tuning control Consider the nonlinear system, $w_1, w_2, ..., w_n$ are the weight value of $n$ actuators, $b_1, b_2, ..., b_n$ are the valve value of $n$ actuators.</figcaption></figure>
$$ 
\begin{aligned}
y(k+1) = & g[y(k), \dots, y(k-n+1; u(k), \dots, u(k-m+1)] \quad (1) \\
& + \varphi[y(k), \dots, y(k-n+1; u(k), \dots, u(k-m+1)]u(k)
\end{aligned}
$$

Where $u, y$ are the input and output of the system, and $g[\bullet], \varphi[\bullet]$ are nonzero function.

If $g[\bullet], \varphi[\bullet]$ are known functions, control algorithm of the controller according to certain equivalence principle is as follow:

$$ u(k) = \frac{-g[\bullet]}{\varphi[\bullet]} + \frac{r(k+1)}{\varphi[\bullet]} \quad (2) $$

The control system attempts to make the output $y(k)$ match the reference input $r(k)$.

If $g[\bullet], \varphi[\bullet]$ are unknown functions, the artificial neural networks identification is trained on line so that $g[\bullet], \varphi[\bullet]$ approximate controlled plant. Using $Ng[\bullet], N\varphi[\bullet]$ substitute for $g[\bullet], \varphi[\bullet]$, control algorithm of the controller according to certain equivalence principle is as follow:

$$ u(k) = \frac{-Ng[\bullet]}{N\varphi[\bullet]} + \frac{r(k+1)}{N\varphi[\bullet]} \quad (3) $$

where $Ng[\bullet], N\varphi[\bullet]$ is nonlinear dynamic the artificial neural networks respectively.

## 2.1 The artificial neural networks identification

For simple problem, one order system is governed by the following equation:

$$ y(k+1) = g[y(k)] + \varphi[y(k)]u(k) \quad (4) $$

The artificial neural networks identification is shown in Fig. 3. The identification consists of two three-lays nonlinear DTNN, where number of order of $Ng[\bullet], N\varphi[\bullet]$ is equal to number of order of $g[\bullet], \varphi[\bullet]$. The input of the artificial neural networks is $\{y(k), u(k)\}$, and the output is as follows:

$$ \hat{y}(k+1) = Ng[y(k); W(k)] + N\varphi[y(k); V(k)]u(k) \quad (5) $$

where $W, V$ are two neural networks weights which are given:

$$ W(k) = [W_0, W_1(k), W_2(k), \dots, W_{2p}(k)] $$

$$ V(k) = [V_0, V_1(k), V_2(k), \dots, V_{2p}(k)] $$

with $p$ is hidden layer' node number

$$ w_0 = Ng[0, W]; \quad v_0 = N\varphi[0, V] $$
<figure><img src="image_6.png" /><figcaption>Fig.4. The artificial neural networks identification</figcaption></figure>

In Fig. 4, L is linear node, and H is nonlinear node.

substitute (4) into (5), then the output of the control system:

$$y(k+1) = g[y(k)] + \varphi[y(k)] \left\{ \frac{-Ng[\bullet]}{N\varphi[\bullet]} + \frac{r(k+1)}{N\varphi[\bullet]} \right\} \quad (6)$$

if $Ng[\bullet] \to g[\bullet]$ and $N\varphi[\bullet] \to \varphi[\bullet]$,

$$y[k] \to r[k]$$

By minimizing the quadratic performance criterion, get weights tuning process thought training the artificial neural networks identification

$$E(k) = \frac{1}{2}[r(k+1) - y(k+1)]^2 = \frac{1}{2}e^2(k+1) \quad (7)$$

$$W(k+1) = W(k) + \Delta W(k); \quad V(k+1) = V(k) + \Delta V(k)$$

Using Bp learning algorithm(Ferelra et al., 2002; Tetsuo et al., 2000)

$$\Delta w_i(k) = -\eta_w \frac{\partial E(k)}{\partial w_i(k)}; \quad \Delta v_i(k) = -\eta_v \frac{\partial E(k)}{\partial v_i(k)}$$

Substitute (7) into (8), we get:

$$\Delta W_i(k) = -\eta_w \frac{\varphi[y(k)]}{N\varphi[y(k);V(k)]} \left\{ \frac{\partial Ng[y(k);W(k)]}{\partial W_i(k)} \right\} e(k+1) \quad (8)$$

In the some way, we get:
$$ \Delta v_i(k) = -\eta_v \frac{\varphi[y(k)]}{N\varphi[y(k);V(k)]} \left\{ \frac{\partial N\varphi[y(k);V(k)]}{\partial v_i(k)} \right\} e^{(k+1)u(k)} \quad (9) $$

where $\varphi[y(k)]$ is unknown and $\eta_v$ is unknown, which is marked as $\operatorname{sgn}\{\varphi[y(k)]\}$. After $\operatorname{sgn}\{\varphi[y(k)]\}$ is substituted to $\varphi[y(k)]$ of equation (9) and (10), $w_i(k+1), v_i(k+1)$ are given by

$$ w_i(k+1) = w_i(k) - \eta_w \frac{\operatorname{sgn}\{\varphi[y(k)]\}}{N\varphi[y(k);W(k)]} \left\{ \frac{\partial N_g[y(k);W(k)]}{\partial w_i(k)} \right\} e^{(k+1)} \quad (10) $$

$$ v_i(k+1) = v_i(k) - \eta_v \frac{\operatorname{sgn}\{\varphi[y(k)]\}}{N\varphi[y(k);V(k)]} \left\{ \frac{\partial N_g[y(k);V(k)]}{\partial v_i(k)} \right\} e^{(k+1)u(k)} \quad (11) $$

## 2.2 Control algorithm with heuristic logic

As stated above, given control u involves many actuators operation, so control output u of first step does not take action on any actuator, control output u must accomplish following mapping to yield real control output for actuator.

$$ u(t) \cdot \omega_2 - b_2 = u_{r2} \quad (12) $$

Where $w_1, w_2, \dots, w_n$ and $b_1, b_2, \dots, b_n$ result from heuristic logic, so the control algorithm possesses intelligence.

## 3. EXPERIMENTAL RESULTS OF CONTROL

In this part, the effectiveness of the proposed control method will be demonstrated by a case study for winter heating system. many actuators are forbidden due to energy conservation, the actuator of heating system operates only. In this case, $w_2 = 1$, and $b_2$ is determined by prior knowledge. Fig 5 is experimental chart measured by the control system in Feb. 9, 2004.
<figure><img src="image_7.png" /><figcaption>Fig.5. Comparison chart of temperature between set point and real value</figcaption></figure>

From Fig 5, it is seen that the chart of real control value tracts that of set point and light intensity increases in Fig 5 gradually at 7 to 16, provided energy for greenhouse decrease gradually. Energy chart omitted.

4. CONCLUSION

The presented the algorithm of ANN with heuristic logic proved to be very effective in meeting formal requirements for greenhouse control such as set point and tracking set point. ANN modeling set point is feasible. The key technique for greenhouse environment control uses ANN and heuristic logic reasonably to create a good algorithm. The proposed control algorithm is currently implemented in based CAN bus control system for greenhouse environment control.

REFERENCES

G. van Straten, H. Challa and F. Buwalda Towards user accepted optimal control of greenhouse climate. Comp .Electronics Agric, vol. 26. 3, (2000) 221-238

N. Sigrimis, A. Anastasiou and N. Rerras Energy saving in greenhouses using temperature integration: a simulation survey. Comp .Electronics Agric, vol.26. 3, (2000)321-341

M.Trigui et al.A strategy for greenhouse climate control. part I: model development J. Agric. Engng. Res. Vol. 78. 4, (2000)407-413.

Cunha,J.Boaventura, A.E. Ruano and E.A. Farria. Dynamic temperature models of a soil-less greenhouse. In: Proceedings of the 2nd Portuguese Conference on Automatic ontrol.Vol.1. Portuguese Association of Automatic Control. Porto, Portugal. (1996)77-81.

Akaike, H.A new look at the statistical model identification. IEEE transactions on Automatic Control vol.19, (1974)716-723

Ferelra, P.M. Ruano, A.E. Choice of RBF model structure for predicting greenhouse inside air temperature[C]. 15th Triennial World Confress, Barcelona, Spain. 2002 IFAC.
Tetsuo Morimoto and Yasushi Hashimoto. An intelligent control for greenhouse automation, oriented by the concepts of SPA and SFA - - an application to a post-harvest process. Comp. Electronics Agric, vol. 29. 2, (2000)3-20