A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent Greenhouse Management in Agriculture

*Lukman Adewale Ajao, Emmanuel Adewale Adedokun, Joseph Ebosetale Okhaifoh and Habib Bello Salau*

## **Abstract**

The importance of agronomists in large-scale production of food crops under considerate environmental weather conditions cannot be overemphasized. However, emerging global warming is a threat to food security due to its effect on soil depletion and ecosystem degradation. In this work, the design of the proposed intelligent context is to observe, model and simulate greenhouse control system activity towards the management of the farm crop growth as the affected salient environmental parameters. Characteristically, temperature and humidity are the major factors that determine the crop yield in a greenhouse but the case of a dry air environment or beyond 30<sup>0</sup>*<sup>C</sup>* <sup>35</sup><sup>0</sup>*<sup>C</sup>* of high air humidity will affect crop growth and productivity. A Mamdani technique of fuzzy logic controller with non-linear consequent is used for intelligent greenhouse design in the LABVIEW virtual environment. This approach is used to mimic the human thought process in the system control by setting some logical rules that guide the greenhouse functions. For the system stabilization achievement, a direct method of Lyapunov functions was proposed. The simulation model result shows that, the average temperature of 18*:*5<sup>0</sup>*C* and humidity 65% is achieved for a decent environment of crop growth and development during winter. However, the average temperature and humidity achieved during summer is 27*:*5<sup>0</sup>*C*&70% respectively. For every season that is beyond 30*:*5<sup>0</sup>*C and* 75% of temperature and humidity will require automation of roof opening and water spilled.

**Keywords:** Agricultural technology, Artificial intelligence, Fuzzy logic, Greenhouse, Nonlinear system

## **1. Introduction**

Agriculture is an important aspect of any nation's development which usually requires appropriate seasoning irrigation and fertilization to produce a quantity of food products [1]. The seasoning control application of fertigation (fertilizer and irrigation) techniques has proven efficient in plant growth, development, and yield large crop production [2]. Computers and electronics play a significance role in the development and mechanization of agricultural products through the recent

applications of ubiquitous technology of Internet of Things (IoT). This advancement and dynamic methods of control theories application helps improving the agricultural equipment (mechanization) and the processes. The recent integration of artificial intelligence (AI) and computational intelligence (CI) into the agromechanical machine and mechatronics system (embedded sensors and robotic) shaped the agricultural technology and their commercialization.

So, the studies have indicated a strong link between agriculture and economic growth as the backbone of national sources of income and commercial development [3]. The increasing demand in food consumption nationwide as resulting from increased daily population explosion that necessitated the provision of precision agriculture monitoring [4] and to ease the farming process as well as abnormalities in the farm environment. Although, farming is an essential means of increasing food production, recently its cultivation is decreasing and becoming inversely proportional to the rising population. This is partly due to the phenomenon of global warming [5]. As a result of changes in climate conditions and its threat of conservatory, the need arises for an agricultural development control system to manage this condition for high yield of crop production [6–8].

The changes in climate condition increases the tropical storm intensity and frequency due to rising temperatures and climate pattern that change mutually. Whereas, the warming of temperatures ocean and sea levels rising escalate the disaster storms growth with excess heat trapped in the atmosphere. It is observed that dissolving of heat energy and excess of carbon dioxide gas has significant damage on the ocean. Like oceanic acidification that affect reproduction and formation of animal shells, oceanic heat waves affect coral reefs with the frustration of fish migration, and oceanic dead zones created as a result of deoxygenation process [9, 10].

Consequently, there is a need to prevent and manage common emission releasing into the atmosphere with effect on agricultural crop growth and environmental degradation effect. This threat of emission releasing contributes immensely to the effect of climate change which affects the successful cultivation of farm crops [11]. The United Nations' World Meteorological Order (WMO) confirmed that the world planet is about 1.1°C warmer, and is forecasting an increase from 4–5°C towards end of the century. Others factors of agronomy-house sustenance depend on the environmental weather condition which includes temperature, humidity, winds, light intensity, and solar radiation. The statistical overview of primary sources of greenhouse gas emission is given in **Figure 1**, which include industry, transportation, building, agriculture, forestry, electricity and heat production [12]. While the sources of releasing those gases, are Methane (NH4), Nitrous Oxide (NO), and Carbon Dioxide (CO) from the industrial processes, fossil fuel, bush burning, forestry, sewage disposal and other land use [13].

A Greenhouse is a controlled place where plants are grown under control conditions of ambient temperature, humidity, water vapor, light intensity, and carbon (iv) oxide [14]. The environmental conditions for greenhouses can be varied according to the plants need to get most out of the plants and for high efficiency. Since the environmental conditions of the greenhouse need to be adjusted for optimal growth, the size and cost of labor increase proportionally to the size of the greenhouse and the number of plants [15, 16]. A greenhouse is a structure designed with glass walls or transparent material and a glass/translucent roof used to grow food crops and plant cultivation (such as tomatoes and tropical flowers under controlled environmental conditions [17, 18].

The efficient management and monitoring of greenhouse plants condition require the integration of an artificial intelligence system (AI) or automated control system (ACS) based on context-aware software design (CASD). Therefore, a

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

#### **Figure 1.**

*The statistical overview of primary sources of greenhouse gas emission. (a) The consequential effect of rapid gaseous emission (greenhouse gas emission) to the atmosphere will be increases with time. (b) This includes carbon dioxide (CO) with percentage of 147%, methane (CH4) with percentage of 259%, and nitrous oxide (N2O) with percentage of 132%.*

Greenhouse Development Rights (GDR) framework is proposed in [19] to safeguards the right of development as a possible global solution to the climate change challenges. It is shown that GDR approach is an international context for (China and the USA) which provide funding for the development mechanism of a greenhouse as an approach to address global climate change challenges. The GDR is a foundation for future evolution and industrialized developed countries. In another approach of control and keeping hothouse cool is the development of a smart controller for grid stabilization using optoelectronic system [20].

This book chapter contribution aims at presenting an intelligent greenhouse control based on the non-linear consequent fuzzy logic controller using LabVIEW for agricultural technology. The system helps to monitoring greenhouse parameters and acts based on the specified fuzzy rules to control the system environmental condition without or with little human intervention. Thus, there is a need for an intelligent greenhouse control system in agricultural technology that can reduce human labor costs, increase productivity, and reduce human intervention.

#### **2. Related works**

The global warming crisis necessitated the development of a real-time monitoring and control system for managing change in environmental temperature conditions. This temperature change plays an important role in the soil contents of farm crops. Therefore, the use of computer technology approach (such as embedded systems and AI) has been newly adopted in realizing the design of automation control and monitoring system of ambient temperature in greenhouse management. The greenhouse control system is developed using LabVIEW simulation software for data collection and analysis of conservation in [21]. The work mainly focuses on adjusting the temperature environment using a thermostat and sensor to detect and control the hotness of the greenhouse. The process was simulated and implemented in the developing system platform of Labview software. An optimized sprinkler irrigation system for predicting use of budding land based on soil features using fuzzy logic decision approach in [22]. The significance of adopting this fuzzy logic

in land evaluation is a suitable approach for the continuous nature of soil properties and provide an accurate distribution index for predicting land use.

An optimized method of cultivation in the greenhouse automated system with smart environments using an embedded system development approach in [23]. This industrial automated greenhouse model is developed for plant experimentation at


**Table 1.** *Summary of the related works.*

#### *A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

the University of Alicante to control air-conditioning, soil condition, and irrigation in the system. The optimization services integrated into this system model designed help in the detection and prediction of agricultural production of smart environments. But the optimized smart environment greenhouse does not consider controlling the system conditions during rainfall, summer, and winter. Other authors that contribute to the development of automated and intelligence-based greenhouse control and monitoring system is analyzed in **Table 1**.

From these literatures, it is observed that the limitation is on the part of intelligence incorporated into the system with linearized fuzzy model improvement. Also, the season management of crop cultivated area in the greenhouse with automatic control technique are not studied. Hence, this book chapter aims to fill those gaps by implementing a non-linear consequent fuzzy logic controller system for the decision-making process and automatic control of the greenhouse system with an approach of context-aware software design ontology. This book chapter is organized into 5 sections. The introductory part discussed the general background of study in Section 1, Section 2 presented the related works. The research methodology is presented in Section 3, while sub-Section 3.1 mathematical modeling of the greenhouse control system in sub-Section 3.1, sub-Section 3.2 presented a linearize and non-linear consequent fuzzy controller design for greenhouse control. Sub-Section 3.3 contained Lyapunov function for stabilization of non-linear consequent fuzzy controller. Sub-Section 3.4 presented simulation and implementation of nonlinear consequent fuzzy controller based-greenhouse design in LabVIEW. The results and discussion are presented in Section 4, sub-Section 4.1 contained Intelligent greenhouse management based nonlinear control simulation results. Sub-Section 4.2 presented simulation results of a Lyapunov stability of nonlinear control system. Section 5 gives the conclusion and recommendations for future works.

## **3. Methodology**

Context-aware systems are software systems designed with the ability to sense (sensor) and adapt to the environmental conditions for the solution required to the problem design [30, 31] through a fuzzy controller. This design involves determining what the system needs to sense, make adaptations, and respond to sensor information. It requires sensing temperature and humidity, and then adapt to the environmental condition for the greenhouse system control and management using nonlinear fuzzy controller system with direct method of Lyapunov functions to achieved stabilization. The system modeling and design need a focus value or parameter to influence the designed value such that it can sense the elements and manipulate them in case of irregularities. So that it can make the element relevant to the purpose of the design and the designer focus. An overview of the approach

**Figure 2.** *An overview to the element approach in the CAS design.*

design for an intelligent greenhouse control system includes practical problem identification, insight to the context, elements components required in the sense and adaptation, and logical reasoning rules for information as illustrated in **Figure 2**.

The fuzzy logic controller architecture [32] consisting of crisp input rules, Fuzzification (knowledge-based or linguistic rules), fuzzy inference engine (logic rules), and Defuzzification (output crisp values). The input of a fuzzy control system parameter can be adjusted to improve the system (fuzzy mechanism) performance using the Eqs. (1) and (2).

$$\theta^{(n)} = a(P\_0, P\_1, P\_2, P\_3 \dots, P\_n) \tag{1}$$

$$\theta^{(n)} = a\left(\theta^{(n-1)}, P\_n\right) \tag{2}$$

where, *θ*ð Þ *<sup>n</sup>* is define as a set of input parameter to adjust at time t, *Tn* and *Pn* is the parameter collected at a time *Tn*.

The non-homogeneity consequent of the fuzzy logic controller system technique is adopted in the design to sense the greenhouse environment and adapted for a unique solution of a design problem. A visual graphical programming systemdesign platform and software development environment called Laboratory Virtual Instrument Engineering Workbench (LabVIEW) was used to achieve the contextdesign. It is very efficient and commonly used in engineering as a context-aware system design for data acquisition, instrument control, and industrial automation system. It is a multi-threading and multiprocessing hardware system that is automatically engaged by the in-built scheduler during the execution flow structure (nodes) of a graphical block diagram. The connection wires will propagate the variables and execute the process immediately all its input data reachable.

This system is used to control the temperature and humidity of the greenhouse system using a non-homogeneity control system. The temperature and humidity inputs parameter are set and the system keeps both values constant regardless of the outside temperature of the controlled system. This is achieved using the combination technique of the linearized system with non-linear fuzzy, and adopt Lyapunov function to achieve system stability in the model. This model helps in controlling the opening greenhouse roof for rainfall and sunshine, and/or by turning on the sprinkler to reduce the temperature as presented in the algorithm of **Table 2**. The


#### **Table 2.**

*Greenhouse temperatures management and control*

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

decision-making process of the system is achieved using a combination technique of linear and non-linear approach consequent of the fuzzy logic controller system. The sub-system irrigation and ventilation classification help the agronomist to manage the setpoints of the control input variables. This irrigation-ventilation model is an intelligence unit that is used for the senses and responds to immediate action by introducing the prediction and optimization facilities that are supervised by the agronomist as presented in **Figure 3**.

The calories required for heating the air in the greenhouse is calculated as expressed in Eq. (3). For the determining value of temperature, it requires average heat of 0.30Kcal to achieve a one-meter cube of air. It is observing that 1 kW heat can produce 860Kcal, and a heat source of 30 W can produce 25.8Kcal heat per hour, and equivalent to 0.43Kcal heat per minute [33].

$$
\mathfrak{Q} = \mathfrak{M} \mathbb{C} \mathcal{E} \mathfrak{T} \tag{3}
$$

where ∅ is the heat, M is the mass, is the heating temperature (0.24 Kcal/kg), ℓℸ is the difference in temperature.

#### **3.1 Mathematical modeling of greenhouse control system**

The behavior of the greenhouse microclimate is dynamic and combinations of physical processes involve mass balance and energy transfer. The physical processes involved are used in estimating the greenhouse climate. The amount of energy leaving the greenhouse can be calculated as expressed in Eqs. (4) and (5).

**Figure 3.** *Intelligent greenhouse monitoring and control flowchart.*

$$E\_{loss} = E\_k + E\_r + E\_v + E\_{inf} + E\_{cond} \tag{5}$$

where, *Etotal* is the total energy balance (W), *Egain* is the amount of energy entering the greenhouse (W), *Eloss* is the amount of energy leaving the greenhouse (W), *Ek* is heat loss due to conductive heat loss (W), *Ev* is the heat transfer due to ventilation (W), *Einf* is heat transfer due to infiltration (W), *Er* is heat transfer due to the longwave radiation and *Econd* is heat loss due to condensation (W).

The conductive loss encompasses all the heat transfers through the greenhouse cover from the internal to the external air, conductive heat transfer through the covering material and radiative heat transfer can be expressed as in Eq. (6). The thermal wave radiation exchange from the interior greenhouse to outside can be calculated as given in the non-linear Boltzmann relation in Eq. (7) and Eq. (8). Therefore, the ventilation of heat lost in the greenhouse is proportional to the rate of air exchange and the differences occur between the inside and outside air temperature [34], and the loss can be determined as in Eq. (9).

$$E\_k = A\_c h(\lambda\_i - \lambda\_0) \tag{6}$$

$$E\_r = A\_i \sigma \varepsilon (\lambda\_i - \lambda\_0) \tag{7}$$

$$E\_v = \mathbf{G}\rho \mathbf{C}\_p(\lambda\_i - \lambda\_0) \tag{8}$$

$$and, G = \alpha r\_v k\_v A\_v \tag{9}$$

where *λ*<sup>o</sup> is outside air temperature (K), *λ*<sup>i</sup> is inside air temperature (K), *h* is the conductive heat transfer coefficient (W/m<sup>2</sup> ), *A* is the area of greenhouse cover (m<sup>2</sup> ), *Qr* is radiation loss, ε is the combining emissivity between the cover and sky, σ is Boltzmann constant, ρ is air density (kg/m3 ), *C* is the specific heat of air (J/kg K), *G* is airflow due to ventilation (m<sup>3</sup> /s), *w* is the wind speed (m/s), *rv* is percent of the ventilator opening, *kv* is the slope of the curve showing the ventilation flux divided by wind speed variation and *A* is area of the ventilator (m2 ).

The heat energy is transfer within the intelligent greenhouse system as a result of infiltration of energy loss which is due to the exchange air through cracks occurs in the greenhouse and is considered. Since the infiltration rate is based on the volume of water vapor changed per unit cover area (roof and walls). This volume of water vapor is directly proportional to the wind velocity and the temperature difference from both inside to outside the greenhouse can be determined as in Eq. (10). Then, the sources of heat gain from the greenhouse model include solar radiation heat which is the most determinant of heat gain by the intelligent greenhouse system during crop growing and system heating from the environment [35]. So, the energy of the greenhouse can be calculated as in Eq. (11), the heat transfer from tubes to the greenhouse environment is expressed as in Eq. (12) and the internal temperature increases are within the range of (0.3–0.7) which 0.3 was chosen.

$$E\_{\rm inj} = \mathbf{0}.\mathbf{5}\text{V}\mathbf{N}(\lambda\_i - \lambda\_0) \tag{10}$$

$$E\_r = A\_\text{g} \gamma \text{t}I \tag{11}$$

$$Q\_{bs} = mC\_p(\lambda\_{ai} - \lambda\_{a0}) \tag{12}$$

where, *Hinf* is the infiltration heat loss (W), *λ*<sup>i</sup> is the temperature inside the greenhouse (K), *λ*<sup>o</sup> is the outside temperature (K) of a greenhouse, *V* is greenhouse volume (m<sup>3</sup> ), and *N* is the number of air changes per hour (h�<sup>1</sup> ), *Er* is solar energy radiate into the greenhouse environment (W), *I* is total external solar energy falling on a horizontal surface of the greenhouse (W/m<sup>2</sup> ), *A* is an area of greenhouse floor

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

(m<sup>2</sup> ), τ is radiation light transmission to the greenhouse cover, γ is constant of the proportion of solar radiation that radiates into the greenhouse. *Qhs* is heat gain from the heating system (W), *m* is the heating water flow rate (kg/s); *λω<sup>i</sup>* is heating water inlet temperature (°C), *λω*<sup>0</sup> is heating water outlet temperature (°C) and *C*<sup>p</sup> is the specific heat capacity of water (J/kg K).

#### **3.2 A linearize and non-linear consequent fuzzy controller design for greenhouse management**

A closed-loop or called feedback controller transfer function is adopted since the output of the intelligent control system *φ*ð Þ*t* is fed back into the system through a sensory measurement device (sensor) *γ*. The comparison is for reference value *τ*ð Þ*t* , where the controller system *α* takes the error *ε* (difference) between the reference point or set values and the output to adjust the inputs *μ* feedback to the system under control *β*. From the perspective of implementation of the controller with a linear approach and time-invariant, the elements of the transfer function *α*ð Þ*s* , *β*ð Þ*s* , and *γ*ð Þ*s* do not depend on time where *α* is controller, *β* is the system under controller (plant), and sensor measurement denotes *γ* [36–38].

We can analyze the systems using the Laplace transform on the variables as expressed in Eqs. (13)–(16).

$$
\rho(\mathfrak{s}) = \beta(\mathfrak{s})\mu(\mathfrak{s})\tag{13}
$$

$$
\mu(\mathfrak{s}) = a(\mathfrak{s})\mathfrak{e}(\mathfrak{s})\tag{14}
$$

$$
\dot{\boldsymbol{\sigma}}(\mathbf{s}) = \boldsymbol{\pi}(\mathbf{s}) - \boldsymbol{\chi}(\mathbf{s}) - \boldsymbol{\varrho}(\mathbf{s}) \tag{15}
$$

By solving *φ*ð Þ*s* in terms of *τ*ð Þ*s* can be expressed as given in Equation

$$\rho(s) = \left(\frac{\beta(s)a(s)}{1 + \beta(s)a(s)\gamma(s)}\right)\tau(s) = \aleph(s)\tau(s) \tag{16}$$

The closed-loop or feedback transfer function of the greenhouse control system is expressed as ℵð Þ*s* in Eq. (17), where the numerator is identified as open-loop (forward gain) from *τ* input parameter to *φ* output values, and the denominator is a feedback loop that goes around the system called loop gain. So, if j j *β*ð Þ*s α*ð Þ*s* ≫ 1, that is, it has a standard model with each value of s, and if j j *γ*ð Þ*s* ≈ 1, then *φ*ð Þ*s* is approximately equal to *τ*ð Þ*s* and the output system is close to the reference input.

$$\Re(s) = \frac{\beta(s)a(s)}{1 + \gamma(s)a(s)a(s)} \tag{17}$$

The flowchart technique for a linearized and non-linear fuzzy model for the optimization function of the greenhouse control and management model is illustrated in **Figure 4**. This mechanism operates as a reference model to the non-linear system and is connected in parallel in such a way that the linear system passes across the non-linear for better stability.

The state-space model for the non-linear fuzzy controller is given in Eq. (18), which increases the fuzzy rules quantity exponentially with non-linearities measures. The delayed in the state-space model for the fuzzy controller is given in Eq. (19). Where *x t* ð Þ is the state vector of *x t* ð Þ<sup>∈</sup> <sup>R</sup>*nx* , *<sup>υ</sup>*ð Þ*<sup>t</sup>* is an input vector for *<sup>υ</sup>*ð Þ*<sup>t</sup>* <sup>∈</sup> <sup>R</sup>*<sup>n</sup><sup>υ</sup>* , s is the number of rules, *<sup>ω</sup>*ð Þ*<sup>t</sup>* is the available premise vector, *<sup>δ</sup>k*ð Þ *<sup>ω</sup>* is the

**Figure 4.** *Flowchart of combined linearized and non-linear fuzzy system.*

membership function, *α<sup>k</sup>* and *β<sup>k</sup>* are the linear models, and the convex sum is given as: *δi*ð Þ *ω* ∈½ � 0, 1 , P*<sup>s</sup> <sup>k</sup>*¼<sup>1</sup>*δi*ð Þ¼ *<sup>ω</sup>* 1.

$$\check{\mathbf{x}}(t) = \sum\_{k=1}^{t} \delta\_{k}(a(t)) (a\_{k}\mathbf{x}(t) + \boldsymbol{\beta}\_{k}(t)) \tag{18}$$

This state-space model for the fuzzy system can be expanded to determined the time delay dependent as given in equation, where *τ*ð Þ*t* is the delay time dependent, and *δm*ð*ω*ð Þ *t* � *τ*ð ÞÞ *t* is the delay states that dependent on fuzzy membership functions.

$$\check{\mathbf{x}}(t) = \sum\_{k=1}^{t} \sum\_{m=1}^{t} \delta\_k(\boldsymbol{\alpha}(t)) \delta\_m(\boldsymbol{\alpha}(t-\boldsymbol{\tau}(t))) (a\_{km}\mathbf{x}(t) + \mathfrak{I}\_{km}\boldsymbol{\mathbf{x}}(t-\boldsymbol{\tau}(t)) + \boldsymbol{\beta}\_{km}\boldsymbol{\nu}(t-\boldsymbol{\tau}(t))) \tag{19}$$

The notation of *τ*ð Þ*t* ≔ *τ* can be expressed as Eq. (20), and the closed-loop fuzzy model for non-linear time-dependent is in Eqs. (21) and (22). This is to reduce the number of fuzzy rules and to serve the purpose of measured-state and non-linearities unmeasured-state [34, 39, 40].

$$\Psi\_{o\tau} = \sum\_{k=1}^{s} \sum\_{m=1}^{s} \delta\_k(o(t)) \delta\_m(o(t-\tau(t))) \Psi\_{km} \tag{20}$$

$$\dot{\mathfrak{x}}(t) = a\_{\text{orr}}\mathfrak{x}(t) + \mathfrak{I}\_{\text{orr}}\mathfrak{x}(t-\tau) + \beta\_{\text{orr}}\nu(t-\tau) \tag{21}$$

$$\dot{\mathfrak{x}}(t) = a\_{\text{orr}}\mathfrak{x}(t) + \mathfrak{I}\_{\text{orr}}\mathfrak{x}(t-\tau) + \beta\_{\text{orr}}\mathcal{G}\mathfrak{y}(\xi\mathfrak{x}(t)) + \beta\_{\text{orr}}\mathfrak{y}(t-\tau) \tag{22}$$

The *x t*ð Þ � *τ* is the state vector for time-delayed, *υ*ð Þ *t* � *τ* is an input vector timedelayed, G is the system matrix, x(t) is a function of linear combination for each input to the model, and *ψ ξ*ð Þ *x t*ð Þ is a vector function. The boundary condition for

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

the existence of vector function in the model can be expressed as *ψk*, *k* ¼ 1, … ,*r occur in bk* such that; 0≤ *<sup>ψ</sup>k*ð Þ�*<sup>v</sup> <sup>ψ</sup>k*ð Þ *<sup>w</sup> <sup>v</sup>*�*<sup>w</sup>* <sup>≤</sup>*bk* as in Eq. (23).

$$\begin{aligned} \, \, \nu(!) &= \begin{pmatrix} \nu\_1(.) \\ \nu\_2(.) \\ \nu\_3(.) \\ \cdots \\ \cdots \\ \nu\_r(.) \end{pmatrix} \end{aligned} \tag{23}$$

#### **3.3 Lyapunov function for stabilization of non-linear consequent fuzzy controller based-greenhouse**

For the stabilization and dynamical nature of the system, a Lyapunov non-linear function (LNF) is adopted to operate the system model as a linear with a limited range of function at every region. This approach of LNF helps the model to present auxiliary nonlinear feedback which can be operated as linear for control design purposes. Since a Lyapunov direct method of stability criterion for a linear system can be defined, suppose u = 0, and the exist two-point p > 0 and q > 0. Therefore, a linear system is asymptotically stable at the beginning for any given symmetric that existed given a unique solution that used for stability analysis as given in Eq. (24), with <sup>℘</sup>ð Þ¼ *<sup>θ</sup>* <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>1</sup>*<sup>θ</sup> <sup>j</sup>*<sup>℘</sup> *<sup>j</sup>*, <sup>℘</sup> *<sup>j</sup>* <sup>&</sup>gt;0, where *<sup>ð</sup>*<0. But the choice of q can be made arbitrarily which is mostly set as q = 1, an identity matrix p for all successive principal minors of p is positive using Sylvester theorem as expressed in Eq. (25).

$$
\dot{\mathbf{x}}(\mathbf{t}) = \alpha \mathbf{x}(\mathbf{t}) + \beta \mathbf{u}(\mathbf{t})
$$

$$
\mathbf{y}(t) = \mathbf{y}\mathbf{x}(t) + \delta \mathbf{u}(t)
\tag{24}
$$

$$\begin{array}{ccccc} P\_{11} & P\_{12} & P\_{13} \\ P = P\_{21} & P\_{22} & P\_{23} \\ & & P\_{31} & P\_{32} & P\_{33} \end{array} , \text{ } P\_{11} > 0. \text{ Therefore } \Delta[P] > 0 \tag{25}$$

However, the parameters for the fuzzy model-dependent can be given as in Eq. (26).

$$\begin{cases} \dot{\mathbf{x}} = \alpha(\theta)\mathbf{x} + \beta\_d(\theta)d + \beta\_u(\theta)u \\ \boldsymbol{\varepsilon} = \boldsymbol{\chi}\_{\varepsilon}(\theta)\mathbf{x} + \delta\_{\rm ed}(\theta)d + \delta\_{\rm cu}(\theta)u \\ \mathbf{y} = \boldsymbol{\chi}\_{\varepsilon}(\theta)\mathbf{x} + \delta\_{\rm ed}(\theta)d, \end{cases} \tag{26}$$

where  $a(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) a\_{i}$ ,  $\beta\_{d}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \theta\_{d,i}$ ,  $\beta\_{u}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \theta\_{u,i}$ ,  $\gamma\_{\epsilon}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \theta\_{d,i}$ ,  $\delta\_{\epsilon}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \delta\_{\epsilon d,i}$ ,  $\delta\_{\epsilon u}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \delta\_{\epsilon u,i}$ ,  $\gamma\_{\gamma}(\theta) = \sum\_{i=1}^{m} \theta\_{i}(\sigma) \delta\_{\gamma d,i}$ ,  $\theta = \begin{bmatrix} \theta\_{1}(\sigma) \dots \theta\_{m}(\sigma) \end{bmatrix}^{T}$ .  $\blacksquare$ 

The associated weighting function of normalized fuzzy with the *i*th system are calculated through the degree of fuzzy membership functions *θ*1ð Þ *σ* and premise variable with a closed interval of [0, 1] which must satisfy these properties in Eq. (27);

$$\theta \le \theta\_i(\sigma) \le 1, \sum\_{i=1}^m \theta\_i(\sigma) = 1, \sum\_{i=1}^m \theta\_i(\sigma) = 0. \tag{27}$$

The state-space matrices function can be replaced in the derivation with a new introduce operator as expressed (Eqs. (28) and (29)), where α, P can be replaced

with *ω*, and the subscript *μ* refers to all signals (*x*, *d*, *ε*Þ and *ημ* is the dimension of signal *μ*.

$$P\_{\mu} := \begin{bmatrix} \theta\_2 I\_{n\sigma} \\ \vdots \\ \theta\_m I\_{n\sigma} \end{bmatrix}, \alpha^{\varepsilon} := \begin{bmatrix} \alpha\_2 - \alpha\_1 \\ \vdots \\ \alpha\_m - I\_1 \end{bmatrix}, \tag{28}$$

$$\boldsymbol{\alpha}^{\mathcal{R}} \coloneqq \left[ \, \boldsymbol{\alpha}\_2 - \, \boldsymbol{\alpha}\_1 \dots \boldsymbol{\alpha}\_m - \, \boldsymbol{\alpha}\_1 \right] \tag{29}$$

The notation in Eq. (29) can be expressed as given in Eq. (30) using fuzzy weighting membership functions properties.

$$\rho a(\theta) = \sum\_{i=1}^{m} \theta\_i a \rho\_i = a\_1 + a^{\mathcal{R}} P\_{\mu} = P\_{\mu}^T a^{\varepsilon} \tag{30}$$

Therefore, the Lyapunov fuzzy model function for the system stability is given with <sup>℘</sup>ð Þ¼ *<sup>θ</sup>* <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>1</sup>*<sup>θ</sup> <sup>j</sup>*<sup>℘</sup> *<sup>j</sup>*, <sup>℘</sup> *<sup>j</sup>* <sup>&</sup>gt;0, where *<sup>ð</sup>*<0 as expressed in Eq. (31)–(33).

$$\mathfrak{g} = \mathbb{x}\_{\mathrm{T}}^{T} \otimes (\theta) \mathbb{x} \tag{31}$$

$$\mathfrak{G} = \varkappa^T \left( \sum\_{j=1}^m \theta\_j \mathfrak{G} \mathfrak{p}\_j + a^T(\theta) \mathfrak{p}(\theta) + \mathfrak{g}(\theta) a(\theta) \right) \mathfrak{x} \tag{32}$$

$$\mathfrak{G} = \mathbb{x}^{T} \begin{bmatrix} I\_{n\sigma} \\ a(\theta) \end{bmatrix}^{T} \mathbb{x} \begin{bmatrix} \sum\_{j=1}^{m} \theta\_{j} \otimes \boldsymbol{\uprho}\_{j} & \mathfrak{G}(\theta) \\\\ \mho(\theta) & \mathbf{0} \end{bmatrix} \begin{bmatrix} I\_{n\sigma} \\ a(\theta) \end{bmatrix} \mathbb{x} \tag{33}$$

From the expression given in Eqs. (27)–(29), these symbolizations can be achieved as given in Eq. (34), when the fundamental matrix will be represented as X, while Y is the out factor, and *<sup>Z</sup>* <sup>≔</sup> *In<sup>σ</sup> <sup>A</sup><sup>T</sup>*ð Þ*<sup>θ</sup>* � �*<sup>T</sup>* . Then, *YZ* <sup>¼</sup> *In<sup>σ</sup> <sup>P</sup><sup>T</sup> <sup>μ</sup> <sup>A</sup><sup>T</sup>*ð Þ*<sup>θ</sup>* h i*<sup>T</sup>* .

$$
\begin{bmatrix}
\sum\_{j=1}^{m} \theta\_{j} \otimes\_{j} & \otimes(\theta) \\
\vdots & & \\
\otimes(\theta) & & \mathbf{0}
\end{bmatrix} = \begin{bmatrix}
I\_{n\sigma} & \mathbf{0} \\
P\_{\mu} & \mathbf{0} \\
\mathbf{0} & I\_{n\sigma}
\end{bmatrix}^{T} \begin{bmatrix}
\sum\_{j=1}^{m} \theta\_{j} \otimes\_{j} & \mathbf{0} & \otimes\_{1} \\
\mathbf{0} & \mathbf{0} & (\otimes^{C}) \\
\mathbf{0} & \mathbf{0} & (\otimes^{C}) \\
\mathbf{0} & (\otimes^{C})^{T} & \mathbf{0}
\end{bmatrix} \begin{bmatrix}
I\_{n\sigma} & \mathbf{0} \\
P\_{\mu} & \mathbf{0} \\
\mathbf{0} & I\_{n\sigma}
\end{bmatrix} \tag{34}
$$

Therefore, the condition of Lyapunov stability expression in Eq. (34) is comparable with *YZTX YZ* ð Þ<0. So, the matrix YZ can be reform as given in Eq. (35).

$$\mathbf{YZ} = P\_{\mu} \* \begin{bmatrix} \mathbf{0} & P\_{\mu} \\ \mathbf{0} & P\_{\mu} \\ a^{\mathcal{R}} & a\_{1} \end{bmatrix} \tag{35}$$

But the variable X which depends on the fuzzy weighing function derivative can be solved using conservatism of LMI-based stabilization conditions as in Eq. (36). The constraint notation is P*<sup>m</sup> <sup>j</sup>*¼<sup>1</sup>*<sup>θ</sup> <sup>j</sup>*<sup>℘</sup> *<sup>j</sup>* <sup>¼</sup> 0 and <sup>℘</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>F</sup>* � <sup>℘</sup><sup>1</sup> <sup>≥</sup>0, *<sup>j</sup>*∈Ι½ � 2, *<sup>m</sup>* .

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

$$\sum\_{j=1}^{m} \dot{\theta}\_j \otimes \mathbf{\hat{o}}\_j = \dot{\theta}\_1 \mathbf{F} + \sum\_{j=2}^{m} \phi\_j \left( \mathbf{\hat{o}}\_j + \mathbf{F} - \mathbf{\hat{o}}\_1 \right) \le \dot{\theta}\_1 \mathbf{F} \le \sum\_{j=2}^{m} \dot{\theta}\_j \left( \mathbf{\hat{o}}\_j + \mathbf{F} - \mathbf{\hat{o}}\_1 \right) \tag{36}$$

So, if <sup>Φ</sup><sup>1</sup> <sup>≔</sup> <sup>Φ</sup>1*<sup>F</sup>* <sup>þ</sup> <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>2</sup> \_*<sup>θ</sup> <sup>j</sup>* <sup>℘</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>F</sup>* � <sup>℘</sup><sup>1</sup> � � and <sup>Φ</sup><sup>2</sup> <sup>≔</sup> � <sup>Φ</sup>1*<sup>F</sup>* <sup>þ</sup> <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>2</sup> \_*<sup>θ</sup> <sup>j</sup>* <sup>℘</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>F</sup>* � <sup>℘</sup><sup>1</sup> � �, the stability of Lyapunov fuzzy weighing function is guaranteed by the expression given in Eq. (37).

$$\left( (\mathbf{YZ})^T \mathbf{X}\_k (\mathbf{YZ}) < \mathbf{0} \; k=\mathbf{1}, \mathbf{2}, \tag{37}$$

where

$$X\_k := \begin{bmatrix} \Phi\_k & 0 & \otimes\_1 \\ 0 & 0 & \otimes^{\ell} \\ \otimes\_1 & (\otimes^{\ell})^T & 0 \end{bmatrix}$$

For the fuzzy system controller to be asymptotically stabilized, then it is given that *<sup>u</sup>* <sup>¼</sup> *<sup>U</sup>*ð Þ*<sup>θ</sup> <sup>Q</sup>*�<sup>1</sup> ð Þ*<sup>θ</sup> <sup>x</sup>* with *<sup>U</sup>*ð Þ¼ *<sup>θ</sup>* <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>1</sup>*<sup>θ</sup> jU <sup>j</sup>* and *<sup>Q</sup>*ð Þ¼ *<sup>θ</sup>* <sup>P</sup>*<sup>m</sup> <sup>j</sup>*¼<sup>1</sup>*<sup>θ</sup> jQ <sup>j</sup>*. The Lyapunov fuzzy system function is given as <sup>∀</sup> <sup>¼</sup> *<sup>ϰ</sup>TQ*�<sup>1</sup> ð Þ*θ ϰ* and the system controller can be expressed as *<sup>u</sup>* <sup>¼</sup> *<sup>U</sup>*ð Þ*<sup>θ</sup> <sup>Q</sup>*�<sup>1</sup> ð Þ*θ x*, and the condition for stabilization *d=0* can be finally described as in Eq. (38) with a similar derivation of LMI-based stabilization condition [41, 42].

$$=-\sum\_{j=1}^{m} \theta\_j Q\_j + A(\theta)Q(\theta) + Q(\theta)A^T(\theta) + B\_{\mathfrak{u}}(\theta)U(\theta) + U^T(\theta)B\_{\mathfrak{u}}^T(\theta) > 0 \tag{38}$$

#### **3.4 Implementation of non-linear consequent fuzzy controller based-greenhouse design in LabVIEW**

The Fuzzy Inference System (FIS) consists of two inputs (temperature and humidity) and two outputs (electric roof and water spills). A Mamdani fuzzy logic technique was implemented in this study due to its wide acceptance and suitability for this application. The triangular membership functions were implemented for all inputs and outputs. The input 'Temperature' had membership function values of 'cold', 'normal', and 'warm', while the input 'Humidity' membership function had

**Figure 5.** *Block diagram of an intelligent greenhouse control system.*

values of 'dry', 'normal', and 'wet'. As for the outputs, the membership function for 'Electric Roof'signified the level of the opening for the roof. The output membership function parameter is 'closed', semi-open', and 'open'. The output 'Water Spills' represented the amount of water to be spilled by the sprinkler. This parameter has membership function values of 'low', 'moderate', and 'more'. Besides, the greenhouse control system was designed to consider each of the four major seasons (spring, summer, fall, and winter). As a result of this weather variation, each season has different membership function values for the weather conditions. The block diagram is illustrated in **Figure 5**.

## **4. Results and discussion**

## **4.1 Simulation results of an intelligent greenhouse management based nonlinear control**

The intelligent greenhouse control system was designed and simulated in LabVIEW using non-linear consequent for the controller. Two major interface environments were used to achieve the design of the system, the front panel, and the block diagram interfaces. The LabVIEW environment also provides a tool for fuzzy logic designs and the fuzzy logic designer has three interfaces, namely: Variables, Rules, and Test System. These interfaces respectively give the user an interface to specify the inputs and outputs of the system, provide the IF-THEN rules, and test the system to analyze the performance. In LabVIEW, an algorithm was implemented for the intelligent control of the greenhouse. This algorithm was implemented using a block diagram for the simulation of a nonlinear based intelligent greenhouse control system.

The interface has a knob that can be used to select a particular season. Also, the temperature and humidity can be altered to view various results. Selecting different values for temperature and humidity result in different outputs for roof opening and the water spills through system actuators. These outputs are determined by the fuzzy logic controller. Depending on the season selected, the outputs of the FIS will differ even with the same inputs. This is mainly because each season uses a different membership function for its decision-making. Considering these scenarios, experiments were conducted for each of the four seasons with the same input values. This was done to analyze varying results of the seasons and to examine the effectiveness of the control system. During this summer season, the dynamic sensor deployed to the environment is temperature and moisture sensors for monitoring the temperature and humidity of the greenhouse at constant temperature input of 25°C and the relative humidity of 85%. The membership function for temperature has three stages cold, normal, warm. It observed that temperature starts to normalizes from 22.5–32.5 degrees celcius to get constant temperature input. Therefore, the roof is open at 50%, and water spilled at the relative humidity of 40.1%. The simulation of fuzzy controller based intelligent greenhouse during the summer season was presented in **Figure 6**, and its fuzzy membership functions. The surface view of the dynamic system testing is presented in **Figure 7**.

In this work, a knob is designed to mimic the outside environment based on four possible weather conditions in a year (summer, spring, rainfall, winter). The constant temperature parameter set is 25°C and humidity at 65%. The membership function for temperature has three stages cold, normal, warm. During the summer, the temperature starts to normalize from 22.5–32.5 degrees Celsius to get a constant temperature value. Then, from the understanding of physics, an increase in temperature reduces humidity and relatively controls the sprinkler to turn ON and

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

#### **Figure 6.**

*A greenhouse simulation model for spring season and its membership function. (a) A greenhouse simulation model for the summer season. (b) The simulation model result of an intelligent greenhouse environment shows that the average temperature of (17:5°C) and humidity (55%) are conducive for crop growth and development without requiring roof opening or water spills.*

#### **Figure 7.**

*Surface view of the dynamic system testing.*


#### **Table 3.**

*Results for the summer season.*

cause the roof opening. All these calculations are handled logically by the fuzzy logic controller in the software-context based on the input and possible output variables. **Tables 3**–**6** presented the results obtained for summer, spring, winter, and fall seasons respectively, and the graphical representation of the results obtained is in **Figures 8**–**11**.


#### **Table 4.**

*Results for the spring season.*


#### **Table 5.**

*Results for the winter season.*


#### **Table 6.** *Results for rainfall season.*

#### **Figure 8.**

*Graphical representation of summer season parameters.*

In this context, a knob is designed to mimic the outside environment based on four possible weather conditions in a year (summer, spring, rainfall, winter). The constant temperature parameter set is 25°C and humidity at 65%. The membership function for temperature has three stages cold, normal, warm. During the summer, the temperature starts to normalize from 22.5–32.5 degrees Celsius to get constant temperature value. Then, from the understanding of physics an increase in temperature reduces humidity and relatively controls the sprinkler to turn ON and the cause the roof opening. All these calculations are handled logically by the fuzzy

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

**Figure 9.**

*Graphical output for simulation of spring season parameters.*

**Figure 10.** *Graphical output for simulation of winter season parameters.*

**Figure 11.**

*Graphical output for simulation of rainfall season parameters.*

logic controller in the software-context based on the input and possible output variables.

The results for each season depending on different environmental and season behavior which is processed by non-linear consequent fuzzy logic controller. This is achieved using different membership functions for each season. Since each season has its unique weather conditions and temperature requirements. The variation

based on the season's implementation is to ensure an effective performance of controller during the different seasons. Furthermore, it can be observed from the results that irrespective of the season, higher temperatures lead to wide roof openings and high-water spill levels. This is done to reduce the temperature to the level specified by the farming environs. Also, low temperatures result in no roof openings or water spillage, since there is no need to lower the temperature further. But, during the summer season, the average temperature and humidity required is 27*:*50*C*&65% respectively. For every season that beyond 30*:*50*C*&75% of temperature and humidity will require automation of roof opening and water spilled.

### **4.2 Simulation results of a Lyapunov stability of nonlinear control system**

The nonlinear fuzzy controller system for managing intelligent greenhouse was simulated in the MATLAB environment to achieved the stabilization of linearizing system, when its asymptotically stable using Lyapunov function. From the statespace of fuzzy model given in Eqs. (18), (25) and (26), the characteristics equation is derived as *<sup>ℓ</sup><sup>ı</sup>* � <sup>Å</sup> , and the description is given [42]. If *<sup>f</sup>*ð Þ¼ *<sup>ℓ</sup>*, <sup>ℷ</sup> *<sup>ℓ</sup><sup>ı</sup>* � <sup>Å</sup> , the system is universal and stable since the eigenvalues are positioned at the left-half side. Also, the eigenvalues ð Þℷ follow a trend when plotted a multi-dimensional of *f*ð Þ *ℓ*, ℷ as illustrated in **Figure 12**. This eigenvalue ð Þℷ help to achieved a steady with better dynamic performances, good compensation quality and fast responses of the system as it moves closer to the trend of red spotted lines. The system controller undergoes processes to achieve stabilization when the eigenvalue is <sup>ℷ</sup> ¼ �<sup>1</sup> <sup>∗</sup> <sup>10</sup><sup>2</sup> at periods of (0–0.50) seconds using Fast Fourier Transform (FFT) analysis.

For instance, we considered the continuous-time of nonlinear system to compute the equilibrium points and steadiness (stability) of the system as given in Eq. (39). The control system pathways based on the dynamic nature was verified in the MATLAB simulation environment for the chosen value of *ℊ* ¼ 2, *ℊ* ¼ 3, *ℊ* ¼ 4, and *ℊ* ¼ 5.

**Figure 12.** *A multi-dimensional design of eigenvalues f*ð Þ *ℓ*, ℷ*:*

*A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

$$\begin{cases} \mathbf{0} = g(2 - \varkappa\_1) + \varkappa\_1^2 \varkappa\_2 \\ \mathbf{0} = \varkappa\_1 - \varkappa\_1^2 \varkappa\_2 = \varkappa\_1(1 - \varkappa\_1 \varkappa\_1), when \ \varkappa\_1 = 0, and \ \varkappa\_1 \varkappa\_1 = 1 \end{cases} \tag{39}$$

Therefore, we substitute *ϰ*1*ϰ*<sup>1</sup> ¼ 1 into the first equation, as *ϰ*<sup>1</sup> ¼ 0 does not satisfy the condition. It gives 2*<sup>ℊ</sup>* � *<sup>ℊ</sup>ϰ*<sup>1</sup> <sup>þ</sup> *<sup>ϰ</sup>*<sup>1</sup> <sup>¼</sup> <sup>0</sup> ! *<sup>ϰ</sup>*<sup>1</sup> <sup>¼</sup> <sup>2</sup>*<sup>ℊ</sup> <sup>ℊ</sup>*�<sup>1</sup> *:*

Then, the equilibrium point of the system can be obtained when *ℊ* 6¼ 1, which give expression in Eq. (40);

$$
\overline{\varkappa}\_1 = \frac{2g}{g-1}, \quad \overline{\varkappa}\_2 = \frac{g-1}{2g} \tag{40}
$$

The set point environment of the linearizing system can be derived as given in Eq. (41), and the characteristic polynomial of the system is given in Eq. (42):

$$\mathbf{x}(t) = \begin{bmatrix} -g + 2\varkappa\_1 \varkappa\_2 & \varkappa\_1^2 \\ 1 - 2\varkappa\_1 \varkappa\_2 & -\varkappa\_1^2 \end{bmatrix}\_{\left(\overline{\varkappa}\_1, \overline{\varkappa}\_2\right)} \mathbf{x}(t) = \begin{bmatrix} 2 - g & \frac{4g^2}{\left(g - 1\right)^2} \\ & \frac{-4g^2}{\left(g - 1\right)^2} \\ -1 & \frac{-4g^2}{\left(g - 1\right)^2} \end{bmatrix} \mathbf{x}(t) \tag{41}$$

$$\Delta(\varrho) = \varrho^2 + \left[\varrho - 2 + \frac{4\varrho^2}{\left(\varrho - 1\right)^2}\right]\varrho + \frac{4\varrho^2}{\left(\varrho - 1\right)^2} = \mathbf{0} \tag{42}$$

This expression in (42) can be resolves as given in Eq. (43).

$$\Delta(g) = g^2 + \frac{4g^2}{\left(g-1\right)^2}g + \frac{4g^2}{\left(g-1\right)} = 0\tag{43}$$

Therefore, if the polynomial coefficient is both positive then equilibrium point is stable when *ℊ* > 1, else is unstable when at least one eigenvalue *ℊ* <1.

The simulation results for the system control pathways for nonlinear system using Lyapunov function with given stability conditions *ℊ* ¼ 2, *ℊ* ¼ 3, *ℊ* ¼ 4, and *ℊ* ¼ 5 are shown in **Figure 13**.

## **5. Conclusions**

The greenhouse control system was implemented using the Fuzzy Logic Controller design with non-linear consequent as an intelligence in the decision-making process of the system. The membership functions include two inputs (temperature and humidity) and two outputs (roof opening and water spills). The intelligent greenhouse system was designed to cater for each of the four major seasons (summer, spring, winter, and rainfall) and this was achieved by implementing different membership functions for each season. The development of an intelligent greenhouse control system was simulated and implemented in LabVIEW. These technologies, FLC and Virtual Instrumentation in LabVIEW are widely adopted to enable computing and communication to migrate out of the gray box into ordinary objects (standalone system). However, it is significant that building of an intelligent systems to model human activities or interactions is important to the agricultural technology development. The results obtained show varying performances for each *A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

season to cater for different weather conditions. Future research will be considered incorporating a heating mechanism to raise the temperature for varying conditions and hybrid intelligent techniques using optimization technique for a better system performance.

## **Acknowledgements**

The authors acknowledge the management of the Federal University of Technology, Minna for adequate equipped Embedded and Intelligent System Laboratory which makes it suitable for conducting efficient research.

## **Conflict of interest**

No 'conflict of interest' in this research.

## **Author details**

Lukman Adewale Ajao<sup>1</sup> \*, Emmanuel Adewale Adedokun<sup>2</sup> , Joseph Ebosetale Okhaifoh<sup>3</sup> and Habib Bello Salau<sup>2</sup>

1 Department of Computer Engineering, Federal University of Technology, Minna, Nigeria

2 Department of Computer Engineering, Ahmadu Bello University, Zaria, Nigeria

3 Department of Electrical and Electronics Engineering, Federal University of Petroleum Resources, Effurun, Nigeria

\*Address all correspondence to: ajao.wale@futminna.edu.ng

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## **References**

[1] Ajao LA, Agajo J, Kolo JG, Maliki D, Adegboye MA. Wireless sensor network based-internet of thing for agro-climatic parameters monitoring and real-time data acquisition. *Journal of Asian Scientific Research (JASR)* 2017:7(6): 240-252. DOI:10.18488/ journal.2.2017.76.240.252.

[2] Adegboye MA, Ajao LA, Folorunso TA, Mamud AY, Isah AS. Automatic fertilized irrigation control and management system. FUW Trends in Science and Technology Journal (FTSTJ), 2017:2(2):801-805.

[3] Adison R. Artificial intelligence opportunities and challenges in businesses. July 24, 2019. Retrieved: https//www.towardsdatascience.com.

[4] Ajao LA, Agajo J, Kolo JG, Inalegwu OC, Edem EA. Development of a low power consumption smart embedded wireless sensor network for the ubiquitous environmental monitoring using ZigBee module. Journal of Science Technology & Education (JOSTE), 2017:5(1):94-108.

[5] Thornton P, Dinesh D, Cramer L, Loboguerrero AM, Campbell B. Agriculture in a changing climate: Keeping our cool in the face of the hothouse, Outlook in Agriculture, 2018: 47(4); 283–290. DOI: 10.1177/ 0030727018815332.

[6] Beacham AM, Hand P, Barker GC, Denby KJ, Teakle GR, Walley PG, Monaghan KJ. Addressing the threat of climate change to agriculture requires improving crop resilience to short-term abiotic stress Outlook in Agriculture, 2018:3:1-7. DOI: 10.1177/00307270.

[7] Copeland BJ. Artificial intelligence, (2020). Retrieved from; https://www. britannica.com/technology/artificialintelligence.

[8] Ajao LA, Agajo J, Mua'zu MB, Schueller JK. A scheduling-based algorithm for low energy consumption in smart agriculture precision monitoring system, Agricultural Engineering International CIGR Journal. 2020:22(3); 103-117.

[9] Treut HL, Historical overview of climate change science, in climate change 2007: The physical science basis. Contribution of Working Group 1 to the Fourth Assessment Report of the Intergovernmental Panel on Climate Change, *S. Solomon*, et al., Editors. 2007, Cambridge University Press: Cambridge, United Kingdom, and New York, NY, USA.

[10] McCarthy J. (2020) Alarming facts from the UN's new climate report, March 12, 2020. https://www.globalc itizen.org/en/content/facts-from-un-c limate-report-wmo.

[11] IPCC (2007). Climate change 2007: Mitigation. (PDF) (863 pp, 24MB) exit contribution of working group III to the fourth assessment report of the intergovernmental panel on climate change [B. Metz, O.R. Davidson, P.R. Bosch, R. Dave, L.a. Meyer (eds)], Cambridge university press, Cambridge, United Kingdom and New York, NY, USA.

[12] Massey R, Ulmer A. Pork production and greenhouse gas emissions, Factsheets: Environmental Stewardship, 2015 U.S. Pork Center of Excellence, (515) 223-2641, 04/09/2010. https://porkgateway.org/resource/porkproduction-and-greenhouse-gasemissions.

[13] Singh S, Singh DR, Velmurugan A, Jaisakar I, Swarnam TP. Bio-diversity and climate change adaptation in tropical islands: Chapter 23- coping with climatic uncertainties through improved *A Nonlinear Fuzzy Controller Design Using Lyapunov Functions for an Intelligent… DOI: http://dx.doi.org/10.5772/intechopen.98409*

production technologies in tropical island conditions, Elsevier, 2018: 623-666. DOI: 10.1016/B978-0- 12-813064-3.00023.

[14] U.S. Environmental Protection Agency, Inventory of U.S. Greenhouse Gas Emissions and Sinks: 1990-2006. 2008.

[15] Bhagwat SD, Hulloli AI, Patil SB, Khan AA, and Kamble AS. Smart greenhouse using IoT and cloud computing. International Research Journal of Engineering and Technology (IRJET), 2018:5(3): 2330–2333.

[16] Dilbaz AS. Design and Implementation of a Smart Greenhouse, Doctoral dissertation, Middle East Technical University (2017).

[17] Mesmoudi K, Soudani A, Bournet P. Determination of the inside air temperature of a greenhouse with tomato crop under hot and arid climates Applied Science Environment Management. 2010:5(1); 117–129.

[18] Kartha S, Baer P, Athanasiou T, and Kemp-Benedict E. The greenhouse development rights framework, climate, and development, 2014:1(2); 147-165. DOI:10.3763/CDEV.2009.0010.

[19] Xu F, Chen J, Zhang L, and Zhan H. Self-tuning fuzzy logic control of greenhouse temperature using real coded genetic algorithm. In: Proceedings of the 9th International Conference on Control, Automation, Robotics and Vision, IEEE, Singapore, 2006:1–6.

[20] Pawlowski A, Guzman J, Rodríguez F, Berenguel M, Sánchez J, Dormido S. Simulation of greenhouse climate monitoring and control with wireless sensor network and event-based control. Sensors, 2009:9(1); 232–252.

[21] Ramya K, Kumar KAR. Smart controller for grid stabilization in the an optoelectric system, International Journal of Electrical Engineering Education, 2018:0(0); 1–10. DOI: 10.1177/0020720918813807.

[22] Zheng Z, Zhang K, Liu C. Greenhouse temperature monitoring system based on La2VIEW, IFIP International Federation for Information Processing, 2011:345; 23–29.

[23] Khan MI, Nazeer M, Shehzad N, Saleem A, Ahmad F. Scrutiny of entropy optimized tangent hyperbolic fluid (non-Newtonian) through perturbation and numerical methods between heated plates, Advances in Mechanical Engineering, 2020:12(12); 1–12. DOI: 10.1177/1687814020970772

[24] Ferrández-Pastor JF, Alcañiz-Lucas S, García-Chamizo JM, Platero-Horcajadas M. Smart environments design on industrial automated greenhouses. MDPI Proceedings, 2019: 31(36); 1-13. DOI:10.3390/ proceedings2019031036.

[25] Li Z, Wang J, Higgs R, Zhou L, Yuan W. Design of an intelligent management system for agricultural greenhouses based on the internet of things. IEEE international conference on computational science and engineering and IEEE/IFIP international conference on embedded and ubiquitous computing. CSE and EUC, 2017:2(1); 154–160. DOI:10.1109/CSE-EUC.2017.212

[26] Imam A, Gaur D. Smart greenhouse monitoring using the internet of things. International Journal of Advanced Research in Electronics and Communication Engineering (IJARECE). 2018:7(5); 519–523.

[27] Wang X, Yu H. Research on the control system of the intelligent greenhouse of IoT based on ZigBee, Journal of Physics: Conference Series, 2019:1345(4); 1–7. DOI:10.1088/ 1742-6596/1345/4/042036.

[28] Ullah MW, Mortuza MG, Kabir MH, Ahmed ZU, Supta SKD, Das P, Hossain SMD. Internet of things based smart greenhouse: remote monitoring and automatic control, 2018 Joint International Conference on Energy, Ecology and Environment (ICEEE 2018) and International Conference on Electric and Intelligent Vehicles, (2018): 1-6. DOI:10.12783/dteees/iceee2018/ 27803.

[29] Shukla AJ, Panchal V, Patel S. Intelligent building design based on internet of things, International Journal of Emerging Trends in Electrical and Electronics, 2015:11(2); 57–61.

[30] Pavithra G. Intelligent monitoring device for agricultural greenhouse using IoT. Journal of Agricultural Science and Food Research. 2018:9(2); 2–5.

[31] Sagaya KS, and Kalpana PY. A review on context modeling techniques in context aware-computing, International Journal of Engineering Technology, 2016:8(1); 429–433.

[32] Ajao LA, Ajao FJ, Adegboye MA, Ismail AA. An embedded fuzzy logicbased application for density traffic control system. International Journal of Artificial Intelligence Research (IJAIR), 2018:2(1): 6-13.

[33] Abougarair AJ, Bakush M.M, Aramah M. Optimal estimator design based on optimal controller, Libyan International Conference on Electrical Engineering and Technologies (LICEET2018); 2018:3-7 March 2018, Tripoli, Libya.

[34] Liu, Y. Wu, F. Ban X. Dynamic output feedback control for continuoustime t-s fuzzy systems using fuzzy Lyapunov functions, IEEE Transactions on Fuzzy Systems, 2016: 1-13. DOI 10.1109/TFUZZ.2016.2598852.

[35] Mesmoudi K, Soudani A. Bournet P. Determination of the inside air temperature of a greenhouse with tomato crop under hot and arid climates Applied Science Environment Management. 2010:5(1):117–129.

[36] Hossain, MF. Solar energy integration into advanced building design for meeting energy demand and environment problem. International Journal of Energy Research, 2016:40(9): 1293-1300.

[37] Ang KH, Chong GCY, and Li Y. PID control system analysis, design, and technology, IEEE Transactions on Control Systems Technology, 2005:13 (4): 559–576. DOI:10.1109/ TCST.2005.847331.

[38] Jie L, Wang W, Golnaraghi F, Kubica E. A novel fuzzy framework for nonlinear system control. Fuzzy Sets and Systems. 2010:161(21); 2746–2759. DOI:10.1016/j.fss.2010.04.009.

[39] Silva JF, Pinto SF. Linear and nonlinear control switching power converters, Elsevier Power Electronics, 2018:1141-1220.

[40] Matyas, A. Nagy, Z. Lendek Z. Controller Design for Time-Delay TS Fuzzy Systems with Nonlinear Consequents, in 2020 IEEE International Conference on Fuzzy System (FUZZ-IEEE), 1–6, 2020.

[41] Faria A, Silva G, Oliverira A. Reducing the conservatism of LMIbased stabilization conditions for T-S fuzzy systems using fuzzy Lyapunov functions, International Journal of System Science, 2013:44(10); 1956-1969.

[42] Cao Y, Xu Y, Li Y, Yu, J. A lyapunov stability theory-based control strategy for three-level shunt active power filter, Energies, 2017:10, 112; doi:10.3390/ en10010112.

## **Chapter 25**
