# The Design of Greenhouse Environment Control System Based on Variable Universe Fuzzy Control Algorithm

Haiyan He, Heru Xue

► To cite this version:

Haiyan He, Heru Xue. The Design of Greenhouse Environment Control System Based on Variable Universe Fuzzy Control Algorithm. 5th Computer and Computing Technologies in Agriculture (CCTA), Oct 2011, Beijing, China. pp.72-78, 10.1007/978-3-642-27281-3_10 . hal-01351794

HAL Id: hal-01351794

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

Submitted on 4 Aug 2016

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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The Design of Greenhouse Environment Control System based on Variable Universe Fuzzy Control Algorithm

Haiyan He¹, Heru Xue*¹

¹College of computer & information Engineering,
Inner Mongolia Agricultural University,
Hohhot, Inner Mongolia, P. R. China
E-mail: hehaiyan808@sina.com

**Abstract:** Greenhouse environment has the characteristics such as multiple-input, multiple-output, nonlinearity, and difficulties of establishing its accurate mathematical model. Therefore, in order to make the greenhouse environment control more effective and accurate, an expert system of variable universe fuzzy control based on BP neural network has been proposed. In this method an appropriate universe is selected according to the error and the changing rate of error to overcome the effect for greenhouse control when the error is too large or too small. The paper introduces the design of greenhouse environment control system based on variable universe fuzzy control in details, and presents the main control parameters.

**Keywords:** fuzzy control, variable universe, greenhouse environment control, expert system, BP neural network

## 1 Introduction

Greenhouse environment control can increase crop yield, improve quality, adjust the production cycle and improve the economic efficiency, if we can make full use of natural resources and change environmental factors (e.g. the temperature, humidity, light intensity, CO₂ concentration, etc.) to obtain the optimum condition of crop growth[1]. The current greenhouse environment controlling system has a lot of shortcomings, especially great influence on the control accuracy of the controlling algorithm. Only reasonable control algorithm can make the comprehensive factor of greenhouse environment achieve optimal control effect, and make the greenhouse system achieve intelligent level.

There are a lot of algorithms about greenhouse environment control, such as PID control algorithm, the fuzzy control algorithm, the neural network control algorithm, etc. However, these algorithms have their shortcomings. PID control algorithm needs to build accurate mathematical model and it is difficult to build accurate mathematical

* corresponding author: xuehr@imau.edu.cn
model for the multivariable and complex greenhouse environment. With inaccurate
model, the entire greenhouse environment control system will be directly affected,
even some errors occur in the system. Fuzzy control doesn't need accurate
mathematical model. Computer is used to achieve the control which people complete
with natural language. But there are very high requirements on membership functions
selection and expert knowledge. If not taken carefully, it will be inaccurate and lead
to the influence of greenhouse crop growth.

In this paper, the variable universe fuzzy control based on BP neural network is
used in greenhouse environment control system, which has strong dynamic prediction
functions and decision-making explained ability.

## 2 Variable Universe Fuzzy Control based on BP Neural Network

### 2.1 Fuzzy Control

Fuzzy control doesn't need accurate mathematical model. Computer is used to
achieve the control which people complete with natural language. The control
algorithm puts all environmental parameters together, then realizes fuzzy control. The
block diagram of the principle of fuzzy control system is shown as fig.1 [2].

<figure><img src="image_2.png" /><figcaption>Fig.1 The block diagram of principle of fuzzy control system</figcaption></figure>

### 2.2 Variable Universe Fuzzy Control

In greenhouse environment control process, greenhouse environment is a
multivariable nonlinear system, which is difficult to establish the mathematical model.
Using the fuzzy control doesn't need to build accurate mathematical model, but the
initial variable universe has great effect on the accuracy of control system. As a result,
Variable Universe Fuzzy Control can solve the problem of selecting initial universe.

On the premise of fuzzy division unchanged in the variable universe, Variable
Universe shrinks with error decrease, and expands with error increase. Through the
changing of universe, it makes the initial rule which experts concluded a more
effective new rule. On the surface, the number of rules has not changed, but the rules
are more precise because the universe changes, equivalent to increase of the number of rules, and improvement of the accuracy of control [3]. The change of domain is shown as fig.2.

<figure><img src="image_3.png" /><figcaption>Fig.2 Change of universe chart</figcaption></figure>

## 2.3 BP neural network

The BP neural network is Error Back Propagation network. It consists of three parts: input layer, hidden layer and output layer. The BP neural network, which realizes adjustable factor function of universe, is a three-layer forward network composed of a binary input and a triple output. The network's input node is error e and error rate ec, and the output node is adjustable factors of systematology universe, $α1,α2,β$. The structure of BP neural network is shown as fig.3 [4].

<figure><img src="image_4.png" /><figcaption>Fig.3 BP neural network structure chart</figcaption></figure>

## 2.4 Variable Universe Fuzzy Control based on BP Neural Network

Variable universe fuzzy control based on BP neural network is composed of fuzzy control by fuzzy control technology and the BP neural network. It combines fuzzy reasoning ability of linguistic expression with the BP neural network self-learning
ability. The BP neural network describes the telescopic change. In system control process, the BP neural network computes out suitable factor. Fuzzy control change universe achieves better control effect according to the suitable factor. The structure of variable universe fuzzy control based on BP neural network is shown as fig.4 [5-6].

<figure><img src="image_5.png" /><figcaption>Fig.4 structure chart of variable universe fuzzy control based on BP Neural Network</figcaption></figure>

# 3 Controlling System Design

## 3.1 Structure of Control System

Indoor/outdoor sensor array collects real-time environmental data, such as temperature, humidity and so on. The data are analyzed by variable universe fuzzy control based on BP neural network system, and control decision is obtained, then the control part is notified to perform corresponding action. Control system structure is shown as fig.5 [7].

<figure><img src="image_6.png" /><figcaption>Fig.5 Control system structure chart</figcaption></figure>
## 3.2 Control System Process

Greenhouse system is a big lag and nonlinear systems, so we need to constantly detect greenhouse system control parameters, and adjust the execution time of each execute equipment, which makes greenhouse always maintain the best environment for crop growth. Control system process is shown as fig.6 [8].

<figure><img src="image_7.png" /><figcaption>Fig.6 Control system process chart</figcaption></figure>

## 3.3 Control System Parameter Design

### 3.3.1 Variable universe fuzzy control design

Error e basic universe [-4, +4];

Error rate ec basic universe [-2, +2];

Output U basic universe [-1, 1]; Controlled variable of output is described by four fuzzy states, for instance PB, PM, PS, ZO.

The principle of selecting controlled variables: When the error is big, we should primarily choose controlled variable to eliminate error as soon as possible; when the

<table><caption>Table 1. Fuzzy control rule</caption><thead><tr><th rowspan="2">E</th><th colspan="7">EC</th></tr><tr><th>NB</th><th>NM</th><th>NS</th><th>ZO</th><th>PS</th><th>PM</th><th>PB</th></tr></thead><tbody><tr><th>NB</th><td>PB</td><td>PB</td><td>PB</td><td>PM</td><td>PS</td><td>ZO</td><td>ZO</td></tr><tr><th>NM</th><td>PB</td><td>PB</td><td>PM</td><td>PM</td><td>PS</td><td>ZO</td><td>ZO</td></tr><tr><th>NS</th><td>PB</td><td>PB</td><td>PM</td><td>PS</td><td>ZO</td><td>NS</td><td>NM</td></tr><tr><th>ZO</th><td>PM</td><td>PM</td><td>PS</td><td>ZO</td><td>NS</td><td>NM</td><td>NM</td></tr><tr><th>PS</th><td>PM</td><td>PS</td><td>ZO</td><td>NS</td><td>NM</td><td>NM</td><td>NM</td></tr><tr><th>PM</th><td>PM</td><td>ZO</td><td>ZO</td><td>NM</td><td>NM</td><td>NM</td><td>NM</td></tr><tr><th>PZ</th><td>PS</td><td>ZO</td><td>ZO</td><td>NB</td><td>NB</td><td>NB</td><td>NB</td></tr></tbody></table>
error is less, we should avoid overshooting while selecting controlled variables, and ensure the stability of the system.

We choose triangle membership Functions, due to variable universe fuzzy control having low requirement to membership function, which is denoted by three parameters (a, b, c):

$$u(x) = \begin{cases} 0 & x \le a \\ \frac{x-a}{b-a} & a < x \le b \\ \frac{x-b}{c-b} & b < x \le c \\ 1 & x \ge c \end{cases}$$

### 3.3.2 BP neural network design

There are 2 input nodes, 3 output nodes, 7 hidden layer nodes. Learning rate η is 0.4, momentum factor is 0.1 and mean square error is 0.01.

## 4 Output Results Comparison

Variable universe fuzzy control which is based on BP neural network, according to the size of the error and error rate, chooses suitable universe to control. It solves the improper selection problem of initial universe to obtain more accurate control. The following is a comparison of output between fuzzy control and variable universe fuzzy control based on BP neural network (e.g. temperature).

<table><caption>**Table 2.** Output comparison</caption><thead><tr><th rowspan="2">Error</th><th rowspan="2">Error rate</th><th colspan="2">variable universe fuzzy control</th><th colspan="2">fuzzy control</th></tr><tr><th>Output U</th><th>Input energy (W)</th><th>Output U</th><th>Input energy (W)</th></tr></thead><tbody><tr><td>-3.5</td><td>-1</td><td>5.00</td><td>4.8×10<sup>5</sup></td><td>6.00</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-2.2</td><td>-1.2</td><td>4.28</td><td>3.2×10<sup>5</sup></td><td>6.00</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-2.5</td><td>-0.8</td><td>4.58</td><td>4.8×10<sup>5</sup></td><td>5.20</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-2.0</td><td>-0.5</td><td>4.00</td><td>3.2×10<sup>5</sup></td><td>4.00</td><td>3.2×10<sup>5</sup></td></tr><tr><td>-1.8</td><td>-1.2</td><td>3.50</td><td>3.2×10<sup>5</sup></td><td>6.00</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-1.5</td><td>-0.8</td><td>3.00</td><td>1.6×10<sup>5</sup></td><td>5.20</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-1.2</td><td>-0.7</td><td>2.70</td><td>1.6×10<sup>5</sup></td><td>4.80</td><td>4.8×10<sup>5</sup></td></tr><tr><td>-0.8</td><td>-0.3</td><td>1.82</td><td>1.6×10<sup>5</sup></td><td>2.66</td><td>1.6×10<sup>5</sup></td></tr><tr><td>-0.3</td><td>-0.1</td><td>0.70</td><td>0</td><td>1.16</td><td>1.6×10<sup>5</sup></td></tr></tbody></table>

It is very important for the rational choice of suitable factor for input and output variables of the fuzzy control. Suitable factors α1 and α2 are the different weight of error and the error rate of input variable. So it has great influence on the dynamic performance of the control system. Variable universe fuzzy control based on BP neural network has solved this problem. It gives suitable factor which adapts with
error and error rate by the BP neural network. It makes the control more accurate, and
won't make the responding time too long or overshoot the phenomenon.

As shown in chart 2, When the error and error rate is (-2.2, -1.2)、(-1.5,-0.5)、(-1.2,-0.7), fuzzy control output (U = 6) reaches the highest level (4.8×105W). Big energy input may cause overshooting and make the concussion intensified. Therefore, fuzzy control variable universe based on BP neural network is better than fuzzy control. For a multivariate and nonlinear greenhouse environment system with delay phenomenon, variable universe is more suitable.

**5 Conclusion**

As stated previously, variable universe fuzzy control based on BP neural network is
more suitable for greenhouse environment control. The system can gain better control
effect than general control system. If we ascertain the change rule of real-time of
universe. In addition, variable universe fuzzy control based on BP neural network also
does not need too much expert knowledge, which makes the establishment of the
greenhouse environment control system easier.

**Acknowledgements.** This study has been funded by Research projects (ZN201010 and NDPYTD2010-9).

**References**

1. Xiwen Li, Mingjin Yang, Renquan Yang. Modern greenhouse environment intelligent control development present situation and prospect. Journal of Agricultural Mechanization Research, 2008.4, No.4, pp. 9--12

2. Yuqing Zhao. Study on the expert system of greenhouse intelligent control. Kunming polytechnic university, 2007.3

3. Liangfeng Li. Study on variable universe fuzzy control algorithm. University of electronic science and technology, 2008.5

4. Hongbo Zhang, Ping Chen, Xue Liu, Zhiqingang Yu. The expert system based on neural network in the application of greenhouse control. Journal of Chengdu University Of Information Technology, 2010.6, Vol.25, No.3, pp. 260--263

5. Y Hayashi, JJ Buckley, E. Czogala. "Fuzzy expert systems versus neural networks," Proc. of Int. Joint Conf. on Neural Networks, June 7—11, 1992, Baltimore, MD, Vol. 2, pp.720-762.

6. L.-X Wang, Adaptive Fuzzy Systems and Control, Prentice-Hall, Englewood-Cliffs, NJ, 1994.

7. E.H. Mamdani, "Application of Fuzzy Algorithms for Control of a Simple Dynamic Plant," Proc. IEE, Vol. 121, No.12, 1974, pp. 1585-1588.

8. Chunli Cai. Study on intelligent greenhouse environment control system. Journal of Chongqing Institute of Technology, 2007.10, Vol.21, No.10, pp. 105--107