Application of Nonlinear Adaptive PID Control in Temperature of Chinese Solar Greenhouses

The system of the Chinese solar greenhouses (CSGs) is required to ensure suitable environment for crops growth. However, the greenhouse system is described as complex dynamics characteristics, such as multi-disturbance, parameter uncertainty, and strong nonlinearity. Actually, the conventional PID control method is difficult to deal with above problem. To address above problem, a dynamic model of CSG is developed based on the energy conservation laws and a nonlinear adaptive control scheme, combining RBF neural network with incremental PID controllers, is applied to the temperature control. In this approach, parameters of PID controller are determined by the generalized minimum variance laws, and the unmodelled dynamics is estimated by RBF neural network. The control strategy is combined with a linear adaptive PID controller, a neural network nonlinear adaptive PID controller and switching mechanism. The simulation results show that the adopted method can achieve excellent control performance, which meets the actual requirements.


INTRODUCTION
Considerable attention has been given to the CSGs due to providing a proper environment to crops growth. It can supply pollution-free and high-quality vegetables although during the winter. For greenhouse plants, favorable microclimate means enough solar radiation, adequate temperature, suitable humidity and so on. However, in northeast China, the average temperatures are very low, even falling to below −10℃ and the cold season generally lasts for four months due to the high latitude in some areas [1]. Such an arctic weather seriously affects normal production and bring great loss to the economic benefits [2]. Therefore, the inside temperature is a significance factor to restrict the greenhouse production of the northeast China. In this situation, the CSG must maintain a certain indoor temperature level to meet the needs of crops growth. Furthermore, determining automatic control strategies is the leading goal for obtaining higher-quantity greenhouse crops.
However, the control of inside temperature has genera lly confronted series of difficulties in actual greenhouse pr oduction due to its inherent complexity [3].Firstly, the gree nhouse is considered a nonlinear dynamic system with inte nsive multi-disturbance from surroundings, such as wind s peed, external air temperature and humidity. Secondly, the control process is severely influenced by instable factors in cluding global radiation, external weather and human activi ties. Finally, the relationship between crops and the environ ment is strong and interactive [4].For example, the plants tr anspiration and photosynthesis similarly affected the green house temperature that they depend on.
Yujing Lu is the corresponding author. This work is supported by the National Natural Science Foundation of China (NSFC) (61673281, 61903264, 32001415) and the Natural Science Foundation of Liaoning Province (2019-KF-03-01).
In order to solve these difficulties, many modeling me thods have been proposed, such as mechanism, transfer fun ction and black-box modeling [5].A modeling approach wa s built using data gathered from a real greenhouse under cl osed-loop control [6].An online identification technology w as adopted to obtain more accurate greenhouse model [7].A stochastic dynamic model was proposed by the maximum l ikelihood estimation method, which based on parameter ide ntification [8].
During recent years, Many scholars have proposed ad vanced control strategies, such as adaptive control [9], fuzz y control [10],robust control [11],multiple neural control app roaches [12] and so on. These control methods can maintain the inside temperature around desired temperature set poin t in some certain conditions. However, the problem caused by the instable factor and multi-disturbances still has diffic ulty dealing with. Furthermore, most of these climate contr ol strategies are difficult to carry out in greenhouse product ion due to the theoretically complex. This paper starts with the development of dynamic model of CSG and applies a nonlinear adaptive PID control scheme based on RBF neural networks to solve temperature control for CSG system. This control approach takes advantage of the simplicity of PID controllers and the powerful capability of learning and adaptability of RBF networks. In this paper, a linear adaptive PID controller, a neural network nonlinear adaptive PID controller and switching mechanism is combined to improve dynamic performance on the promise of guaranteeing the system stability. The parameter of PID controller is determined based on the generalized minimum variance control law. RBF neural networks is used to deal with the unmodeled dynamics of CSGs. The experimental results demonstrate that the applied control strategy shows quick setpoint tracking ability in the case of multi-disturbances and can achieve satisfactory control performances. Abstract: The system of the Chinese solar greenhouses (CSGs) is required to ensure suitable environment for crops growth. However, the greenhouse system is described as complex dynamics characteristics, such as multi-disturbance, parameter uncertainty, and strong nonlinearity. Actually, the conventional PID control method is difficult to deal with above problem. To address above problem, a dynamic model of CSG is developed based on the energy conservation laws and a nonlinear adaptive control scheme, combining RBF neural network with incremental PID controllers, is applied to the temperature control. In this approach, parameters of PID controller are determined by the generalized minimum variance laws, and the unmodelled dynamics is estimated by RBF neural network. The control strategy is combined with a linear adaptive PID controller, a neural network nonlinear adaptive PID controller and switching mechanism. The simulation results show that the adopted method can achieve excellent control performance, which meets the actual requirements. Keywords: Chinese Solar greenhouse, temperature control, Nonlinear adaptive control, RBF neural network, PID controllers 2 MODEL DESCRIPTION Considering the characteristics of the unique structure in CSG, heat transfer quantity Q w and Q m are introduced from inside air to north wall and north roof, respectively. The greenhouse model developed in this paper according to energy balance (Fig.1). These differential equations are given by In the heat model of Eq.(1),where ρ is the air density; C P is air specific heat capacity, and h is the height of greenhouse. Q rad is the intercepted solar radiant energy, Q heat is the heat provided by the greenhouse heaters, Q c is the heat transferred from the envelop between the outside and the inside, Q r is the heat absorbed by the crops through transpiration, Q n is the sensible heat transferred from inside air to crops, Q s is the heat transferred from inside air to the soil in the greenhouse, Q w is the sensible heat transferred from north wall to indoor air, Q m is the sensible heat transferred from north roof to inside air.
In the humidity model of Eq. (1), where E is the transpiration rate of crops in g.m -2 .s -1 ,C is the water vapor condensation caused by the indoor and outdoor temperature difference in g.m -2 .s -1 .ϕ a is the humidity taken away by the cold air penetrating the greenhouses in g.m -2 .s -1 .ϕ e is the water condensation or evaporation when heating system is activated in g.m -2 .s -1 .
According to the well-known Penman-Monteith formula,Q r can be circulated by [13].
where C l is the convective heat loss coefficient from indoor air to the cover,R n is the net radiative exchange between the canopy and the environment, e s is the air saturation vapor pressure, β is the influence coefficient of temperature change on saturated water vapor pressure, γ is the psychrometric constant, h l is the heat transfer constant between crops and inside air ,and P is the standard atmospheric pressure. H in indicates the absolute humidity of the indoor air. Solar radiation, a significant factor affecting the indoor temperature, is defined as [14]: where c 1 is the aging coefficient of lighting material, τ is the greenhouse global transmission, S out is the solar radiation, A gr is surface area of greenhouse which absorbs solar radiation, is the incidence angle of sunlight, and V a is the volume of the greenhouse.
In this study,Q heat is defined as [15]: where, η is the energy efficiency of heaters. Q P is the energy power of the heating equipment in . Q c is defined as [16]: where: t in and t out are the inside and outside temperatures in ℃ respectively. A su is the superficial area of cover materials. The conversion relation between t and T is as follow: 273.15 t T (6) The overall energy loss coefficient h c ,increased with wind speed v out following the formula [17]: where, the values of A and B are 6 and 0.5 respectively.
In Eq.(1) ,Q n and Q s are calculated as follows [3] n i n P where, T s is soil surface temperature. T l is the leaf temperature of crops.
The soil aerodynamic resistance r a is defined as [14]: where, D is the leaf width, v in is indoor wind speed. Heat transfer quantity Q w is calculated as follow where, A w is north wall area ,T w represents north wall temperature,α w is the convective heat transfer coefficient between north wall and the inside air.
Heat transfer quantity Q m is calculated as follow: (12) in which A h is the area of north roof,T h represents north roof temperature,α h is the convective heat transfer coefficient between the north roof and the inside air .
where λ is latent heat of evaporation.  (14) in which, A r is the greenhouse covering area in . T in ' is the virtual temperature of indoor air. Eq. (15) is the formula of T in ' and T r ' , where e a represents the actual water vapor pressure of indoor air.
= (1 0.378 / ) a T T e P (15) where, H s,r is defined by: In Eq. (1),ϕ e and ϕ a are calculated as follows [17] ( / ) The cold air infiltration ψ a is calculated as follow: a a / 3600 V (19) The cold air infiltration ψ a is influenced by the outdoo r wind speed and the value of ε lies between 0.2 and 0.5.

Controller Design Model
The dynamic model of northern greenhouse is shown in Eq. (20) and Eq. (21).The state variables are defined as x x , u=Q P , y=T in .Using this notation, the north solar greenhouse model can be re-expressed as In this paper, the dynamic properties of the continuers greenhouse system can be approximate by the following discrete-time system. 1 1 1 Applying the similar approach in [18], the greenhouse dynamical model can be expressed in the following formulation: a and b are polynomials about z -1 . n a and n b are the system orders.
is the higher order nonlinear item.

Nonlinear PID Controller
In order to effectively control the nonlinear plant (31), the PID controller is adopted as follow [19]: where e k =w k -y(k) , K P , K I and K D are denote proportional gain, integral gain and derivative gain, respectively. H(z -1 ) and K (z -1 ) are polynomial about ,H(z -1 )=1-z -1 . The linear PID controller can be obtained from (32) without considering the nonlinear term: H z u k K e k e k K e k K e k e k e k (33) By substituting Eq. (32) into Eq. (31), the closed-loop equation of (33) on y(t) is obtained: K and 2 D g K . According to Eq.(34), the closed-loop characteristic polynomial of the system is as follow: According to Eq.(35), in order to eliminate the influence of nonlinear term, the following conditions. K (z -1 ) are selected to meet the following requirements

Parameters Selection
To choose K P , K I , K D , and K (z -1 ) in Eq.(32), the following performance index is introduced based on generalized predictive control law : where G(z -1 ) , Q z -1 , K(z -1 ) are polynomial about z .w(k) is known as bounded reference input.
The following Diophantine equation is introduced: where F is a constant.

Adaptive PID Switching Control
Actually, the parameters of greenhouse model always vary with the external environment changing. These situations directly lead to the occurrence of parameters uncertainties. Therefore, it is necessary to update model parameters of CGS in real time. According to Eq.(32), the identification equation of system parameters is: . where, -a 1 , -a n a ,b 0 ,…,b n b , k 1 t y t-n a +1 u t u t n b . In this paper, two estimation models are used to predict output of system. The first one is the linear estimation model: where, is the upper bound of the nonlinear term v(k-1). e 1 (k) is the linear model error, i.e.
The second one is the neural network nonlinear estimation model given by: where v (k-1) can be estimated by RBF neural networks and θ 2 T (k-1) is another estimation of θ at instant k-1. The parameter is identified by the following algorithm: where is a pre-specified small positive number and e 2 ( ) is the nonlinear model error, i.e.
If nonlinear item v (k-1) is not considered, the linear adaptive PID control law based on the linear estimation model is obtained as: From Eq. (33), the nonlinear adaptive PID control law based on the neural network nonlinear estimation model is obtained as and the structure can be seen Fig.3.
In order to improve performance of control system and ensure the stability for the closed-loop system, a switching mechanism is introduced in Fig.4. The switching criterion is defined as: where N is an integer and 0 is a predefined constant. =1 stands for the linear model, =2 denotes the nonlinear models. At each time instant k , the linear estimation model and the nonlinear model predict the system output, and the parameters of models are updated through the input-output data. At the same time, we calculate J 1 (k) , J 2 (k) and choose the control law u * (t) corresponding to the smaller J * (k) to be applied to the system.

RBF Neural Network for Unmodeled Dynamics
RBF neural network herein has three layers, the input layer which connects the input vector to the network, the hidden layer is unique, and the output layer which as a linear transformation relationship [20]. The activation function of RBF neural network is Gaussian function, which is defined as [21]: where x is the n-dimensional input vector, and c is the center vector, which is the same as the x-dimension, is the width of the basis function around the center point.
In this paper, the output of the neural network input layer is v i [x(k)],the input vector is ,and the output layer network nonlinear output is as follow where, m=1,2,…,l and q is the number of nodes in the hidden layer, l is the number of nodes in the output layer, w pm is the connection weight between the neuron P in the hidden layer and the neuron m in the output layer, and F p (x) is the excitation function of the neuron P in the hidden layer.

SIMULATION RESULTS
The research is designed to prove the effective of the control method for CSG in terms of the tracking performance with strong multi-disturbance. There exits internal conditions as follow: solar radiation S out =350W/m 2 , outside air temperature T out =5℃,outside humidity H out =16g/m 3 ,outside wind speed v out =2m/s, inside temperature T in =17℃,inside humidity H in =18g/m 3 .After using Euler method, the initial design model can be obtained around the nominal operating point as follows: z -1 =1 1.992z -1 +0.9851z -2 , z =0.004321 0.4223 z -1 , where the system order are n a =2,n b =1. In this case =0.2 are selected, and the parameters of the switching criterion are chosen to be =1, N=2 and ∆=0.015. The initial weights of RBF neural network can be obtained by training the input and output data in a small range of working points. The hidden layer is equal to 8 and relevant parameters are chosen to be =6, =0.65, =0.05,η RBF =0.3.
In order to study the tracking performance of the nonlinear adaptive PID controller, the setpoint of inside temperature are changed in a wide range. At the same time, the outside weather conditions, such as outside temperature, outside wind speed, outside solar radiation, fluctuate in a large scope. The experiments design as follows. The inside temperature is change from 17℃ to 28℃ at t=0-500s. Effects of the external disturbances are simulated in this process. The outside temperature is changed from 5℃ to -3 ℃ at t=150s.The solar radiation is changed from the 350 W/m 2 to 150 W/m 2 at t=350s. The inside temperature is changed from 28℃ to 24℃ at t=500s and the outside solar radiation simultaneously becomes zero. The outside wind speed is changed from 2m/s to 6 m/s at t=700s and the outside temperature is changed from -3 to -12 at t=850s. In the end, the inside temperature is changed from 24 to 19 at t=1000s. Effect of the extreme outside temperature is simulated during this period. The outside temperature is changed from -16 to -27 at t=1200s. The results of the setpoint tracking experiment are demonstrated in Fig.2-3. The inside temperature can quickly track the setpoint and the control method can reduce the influence of uncertain factors. What's more, although in face of strong external disturbance such as stiff wind weather and coldest weather, the inside temperature still tracks the setpoint quickly.

CONCLUSION
In this paper, the CSG was described as a nonlinear, u ncertain and multi-disturbance dynamic system. A nonlinea r dynamic model for CSGs, based on the energy conservati on laws, was constructed by equations and the correspondi ng control model was proposed. We adopted a nonlinear ad aptive control strategy for CSGs production by combining RBF neural network with increment PID controllers. The main objective is to meet normal requirements of the tempe rature control of CSGs. Due to great ability to deal with no n-minimum phase system, Generalized minimum variance method was introduced to determine PID controllers param eters. Considering the strong learning capacity of RBF neur al network, RBF neural network was used to estimate and compensate the unmodelled dynamics. The control scheme was validated for the complex greenhouse climate control and results showed that the adopted adaptive control strateg y had great adaptability, robustness, and satisfactory real-ti me control performance.