0% found this document useful (0 votes)
33 views5 pages

Greenhouse Air Temperature Control Using The Particle Swarm Optimisation Algorithm J.P. Coelho, P.B. de Moura Oliveira, J. Boaventura Cunha

Uploaded by

AyoubMoufid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

Greenhouse Air Temperature Control Using The Particle Swarm Optimisation Algorithm J.P. Coelho, P.B. de Moura Oliveira, J. Boaventura Cunha

Uploaded by

AyoubMoufid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GREENHOUSE AIR TEMPERATURE CONTROL USING THE PARTICLE SWARM

OPTIMISATION ALGORITHM

J.P. Coelhoa, P.B. de Moura Oliveirab,c, J. Boaventura Cunhab,c

a. Instituto de Trás-os-Montes e Alto Douro para a Investigação e Desenvolvimento


Agro-Industrial, 5000 Vila Real, Portugal.
b. Universidade de Trás-os-Montes e Alto Douro, Dep. Engenharias
5001-911 Vila Real, Portugal.
c. Instituto de Ciências e Tecnologias Agrárias e Agro-Alimentares da UTAD
5001-911 Vila Real, Portugal

Abstract: The particle swarm optimisation algorithm is proposed as a new method to


design a model based predictive controller subject to restrictions. Its performance is
compared with the one obtained by using a genetic algorithm for the environmental
temperature control of a greenhouse. Controller outputs are computed in order to optimise
future behaviour of the greenhouse environment, regarding set-point tracking and
minimisation of the control effort over a prediction horizon of one hour with a one-minute
sampling period. Copyright © 2002 IFAC
Keywords: Model predictive control, agriculture, particle swarm optimisation algorithms.

1. INTRODUCTION process with bounded signals, usually involves the


solution of a quadratic programming problem. This
Greenhouses are building structures that allow the optimisation procedure is a fundamental part of
creation of an indoor microclimate for crop model based predictive control. The controller states
development, protecting it from adverse outdoor are obtained by iterative numerical procedures that
conditions. Moreover this microclimate can be can be based on deterministic or stochastic
modified by artificial actuations such as heating, algorithms. The optimiser must be able to handle
ventilation and CO2 supply in order to provide the constraints to model physical bounds such as
best environmental conditions. This non-natural actuator saturation. Commonly, magnitude and rate
environmental conditions are achieved by additional constraints are considered for the control actions and
energy spend in the production, requiring a regulator level constraints are considered for the outputs.
that minimises the energy consumption while Model predictive control cost functions, when
keeping the state variables as close as possible to the subjected to restrictions, defines a very complex,
optimum crop physiological reference. The use of non-linear, non-convex search space, hence suitable
model predictive controllers (MPC) for greenhouse for evolutionary algorithms optimisation.
indoor environment control has the advantage of
providing the system with the ability to react before
any deviations in the controlled variable take place, 2. MODEL PREDICTIVE CONTROL OVERVIEW
avoiding delays in the system response (Nielsen and
Madsen, 1996). This class of control algorithms must Model Predictive Control (Clarke, et al., 1987),
employ models to describe and predict the evolution comprise a collection of control methods having in
of the variables required for crop development over a common the fact that the controller is based on the
specified time horizon. The MPC operation, within a future predictions of the system behaviour using a
mathematical model of the plant. There are several where ε(k+j|k) is the prediction error between the
predictive control algorithms based on process future trajectory and output, ∆u(k+j-1) represents the
models. These algorithms differ from each other only control effort, λ1 and λ2 are weights for each
in the system or disturbances model structure and on component, a and b represent the maximum and
the objective function to be minimised (Camacho and minimum prediction horizon, and c characterize the
Bordons, 1994). control horizon. Constants a and b represent the
instant limits in which it is desirable that the output
The performance of MPC depends largely on the follows the reference.
accuracy of the process model. This performance
increases as process-model mismatch decreases. The The reference trajectory w(k+j) is sometimes
estimated model must be as simplest as possible and different from the real reference (Clarke, et al.,
capable of describing the system dynamics in a way 1987). Normally, a soft approximation from the
to predict, with some precision, future outputs. So, a actual value of the output towards the known
large part of the design effort is related to system reference is considered. This approach avoids abrupt
modelling and identification. changes in the control action by means of less
aggressive responses. The shaped reference w(k+j) is
MPC involves the computation of a sequence of often approximated by using a first-order lag model
future control values for which it is expected that the as described by equations (3) to (4).
system output tracks a given input reference. The
methodology underlying these type of controllers is w(k ) = y (k ) (3)
characterized by the strategy illustrated in figure 1
(Camacho and Bordons, 1994).
w(k + j ) = α ⋅ w(k + j − 1) + (1 − α ) ⋅ r (k + j ) (4)

with α ∈ [ 0,1] , j=1,2,…, and r(k) denotes the real


reference.

3. THE PARTICLE SWARM OPTIMISATION


ALGORITHM

Kennedy and Eberhart (1995) proposed the Particle


Swarm Optimisation (PSO) algorithm, conceptually
based on the social behaviour of groups of
organisms such as herds, schools and flocks. As an
evolutionary technique the PSO is a population
Fig. 1. Basic strategy of a model based predictive based algorithm, formed by a set of particles, which
controller. represent a potential solution for a given problem.
Each particle moves through a n-dimensional search
Future outputs for a horizon L (prediction horizon),
space (as birds in a flock), with an associated
are predicted for each sample k using the process
position vector Xi(t)={xi1(t),xi2(t),…,xin(t)} and
model. The predicted output y(k+j/k) for j=1,…,L is
velocity vector Vi(t)={vi1(t),vi2(t),…,vin(t)} for the
based on past inputs and outputs as well as future
current evolutionary iteration t.
values of the control signal. The collection of the
future control signals are computed by optimising a
The original PSO model integrates two types of
predefined criterion in order to maintain the process
knowledge acquisition by a particle: through it's own
output as close as possible to the reference w(k). This
experience and from social sharing from other
criterion normally takes the form of a quadratic
population members. The former was termed
function of the error between the predicted output
cognition-only model and the latest social-only
and the set point. In most cases, the control effort is
model (Kennedy, 1997). The behaviour of each
included in the objective function in order to avoid
particle is based on these two types of knowledge
abrupt changes in the control action.
and their current position regarding the search.
Kennedy modelled particle behaviour by using the
Future control actions are computed optimising a
following equations:
specified cost function governed by the following
expressions:
coid (t ) = ( pid ( t ) − xid ( t ) ) (5)
b c
J = λ1 ∑ [ε (k + j | k )]2 + λ2 ∑ [∆u (k + j − 1)]2 (1)
j =a j =1 soid (t ) = ( pgd ( t ) − xid ( t ) ) (6)

ε (k + j | k ) = !y (k + j | k ) − w(k + j ) (2) vid ( t + 1) = vid ( t ) + ϕ1.coid (t ) + ϕ2 .soid (t ) (7)

xid (t + 1) = xid (t ) + vid (t + 1) (8)


in which d represents the dimension index, 1 ≤ d ≤ n , with ϕ≥4. The constriction coefficient can be
pid(t) represents the best previous position of particle evaluated by using the following equation:
i in the current iteration t, pgd(t) represents the global
best in the current iteration for a pre-defined 2k
χ= 0 ≤ k ≤1
neighbourhood type. Parameter ϕ1 is known as the (13)
2 − ϕ − ϕ 2 − 4ϕ
cognitive constant and ϕ2 as the social constant, that
represent uniformly distributed random numbers
generated in a pre-defined interval. The effect of this coefficient is to promote
convergence over time. Parameters k=1 and ϕ=4.1
An additional parameter was incorporated into are suggested (Kennedy and Eberhart, 2001) as good
equation (7) (Shi and Eberhart, 1999) resulting in values to use. Another version of the constriction
equation (9): method results in the following modification of
velocity equation (9):
vid ( t +1) = ω(t).vid ( t ) +ϕ1.coid (t) +ϕ2.soid (t) (9)
vid (t +1) = χ.ω(t).vid ( t ) +ϕ1.coid (t) +ϕ2.soid (t) (14)
in which ω(t) represents the inertia weight. The value
given to the inertia weight will affect the type of The velocity is limited by a maximum, Vmax,
search in the following way: a large ω will direct the meaning the maximum jump that each particle can
PSO for a global search while a small ω will direct make in one iteration. The selected value for Vmax
the PSO for a local search. The parameter can vary should not be too high to avoid oscillations, or too
linearly from a larger value to a smaller value in low to avoid search traps. The inertia weight and
order to make the search global in the early run and maximum velocity parameters selection in the PSO
local in the end of the run. Constants ϕ1, ϕ2 and ω algorithm was studied and reported by Shi and
can be interpreted as the confidence that each particle Eberhart (1998). Each particle position should also
has in the current position, its own experience and its be located within its dynamic range [Xmin,Xmax].
neighbours experience, respectively.

The neighbourhood can be of different size and 4. PROBLEM STATEMENT


topology. Each particle can take into account either:
(i) the social information from a list of particles pre- The problem addressed in this report is to control the
defined in the beginning of the simulated evolution. air temperature within a greenhouse using a MPC
The list can incorporate all the population strategy. The quadratic programming (QP) problem
individuals, with an individual being able to use the underlying this type of controller is solved iteratively
best solution found by every other member. This full- using the PSO algorithm and the results compared
connected social network structure was termed Star. with the one obtained by using a genetic algorithm
In other list definitions, an individual uses only k (GA).
adjacent neighbours organised in a Circle and Wheel
topologies (Kennedy and Eberhart, 2001). If a MPC control strategy is to be included within a
(ii) the physical information which considers distance greenhouse, it is essential to have dynamic models
between neighbour individual evaluated using some that describe the greenhouse crop production process
metric definition. evolution as well as the control and exogenous
inputs. The dynamic changes in the greenhouse are
A simplified version of equation (7) was proposed by determined by differences in energy and mass
Clerc and Kennedy (2000) by considering ϕ1=ϕ2=ϕ contents between the inside and outside air, from
and defining an intermediate position pig in between exogenous energy as solar radiation or outdoor
the best previous position pi and the global best pg temperature and through the control actions taken.
defined by equation (10): The energy balance of the greenhouse air is affected
by energy supply and energy losses. The former is
pid (t ) − p gd (t ) due to an artificial heating system and heat load
p igd (t ) = p igd (t ) (10)
2 imposed by the sun and the latest due to transmission
through greenhouse cover and forced ventilation.
resulting in a modified velocity governed by equation Other energy and mass transport phenomena, for
(11): instance at the greenhouse soil are neglected due to
its unimportant contribution to the overall air
vid ( t + 1) = vid ( t ) + ϕ.( pigd ( t ) − xid ( t ) )
temperature.
(11)
Assuming that the greenhouse climate can be
Clerc (1999) proposed the use of a constriction described by a linear system around an operating
coefficient χ that is incorporated in the simplified point, the greenhouse air temperature model will be
velocity equation by: described by the following first order auto-regressive
parametric equation with exogenous inputs.
(
vid ( t + 1) = χ vid ( t ) + ϕ.( pigd ( t ) − xid ( t ) ) ) (12)
 To (kT )  strategy are reported. The quadratic programming
 β1 ⋅ q −1 β 2 ⋅ q −1 β 3 ⋅ q −1 β 4 ⋅ q −1   Ro (kT )  problem with linear restrictions is solved using the
Ti (kT ) =  ⋅  (15)
PSO and a GA. Tuning parameters for both
1 + α ⋅ q −1  V (kT ) 
  algorithms are described in tables 1 and 2.
 H (kT ) 
Table 1 Particle swarm algorithm settings
where T is the sampling interval (in this case 1
minute), q-1 is the backward shift operator, Ti and To
indoor and outdoor temperatures, Ro the outdoor solar Population size 100
radiation and V and H the artificial ventilation and ϕ1 Ν (0.0, 2.0)
heating. The model parameters α, β1, β2, β3 and β4 ϕ2 Ν (0.0, 2.0)
represent the partial contributions of each physical ω Linear decay
variable in the overall greenhouse air temperature. Coding scheme Float
Since the model parameters are time varying
(Boaventura Cunha et al., 1998), recursive
identification techniques associated with the U-D Table 2 Genetic algorithm settings
factorisation algorithm (Åström and Wittenmark,
1989) were applied to estimate their values. Population size 100
Mutation probability 0.1
Auto-regressive models, described generically by Crossover probability 0.75
equation (16), were applied to describe the outside air Selection strategy Tournament
temperature and solar radiation [9]. Coding scheme Float
Elitism Yes
yTS (kT ) ⋅ A(q −1 ) = ξ (kT ) (16)

In which A is a 4th order polynomial in q-1 and yTS is For control purposes, the objective function to be
the time series to be modelled. minimized is described by:

The meteorological data used was acquired with a 60 60

sampling period of one minute in a greenhouse Γ(u ) = λ1 ⋅ ∑ ε (k + j ) 2 + λ2 ⋅ ∑ ∆u (k + j ) 2 (17)


j =1 j =1
located at the Universidade de Trás-os-Montes e Alto
Douro in the North of Portugal. The air temperature
control in that particular greenhouse is accomplished After an enormous number of experiments, λ1 =0.6
by using two actuators, a ventilator with a flow rate and λ2 =0.4 are found to be suitable to solve the
of 38000 m3/h and a gas heating system with a addressed problem. The performance of each
heating power of 100416 KJ/h. optimisation algorithms is analysed in three different
aspects: The set-point accuracy (18), the energy
In order to use evolutionary algorithms as design consumption (19 and 20) and the computing time
tools within the predictive control framework it is required (21).
necessary to modify them accordingly. The N
prediction steps are represented by population SPe = ∑ [Ti (k ) − w(k )]2 (18)
members that correspond to genes and space k =1
coordinates in the GA and PSO algorithms
respectively. Thus, control actions ∆u to be applied N

to the system in a specified future time are encoded EV = ∑ V (k ) (19)


k =1
into corresponding data structures that form the
population. In each generation/epoch the best two N
solutions found are shifted one position toward the EH = ∑ H ( k ) (20)
present instant and introduced in the population of k =1
the next generation. The size of the population must
be related to the size of the search space, ensuring a Elapsed Time
sufficient number of points for the evolutionary CT = (21)
Time Unit
algorithm prospect. In the present case a population
of size n=100 was found to be suitable. The
convergence rate of the first gene/coordinate was The set-point have a square shape with different
used as a stop criterion. The search algorithm stops if indoor temperature levels for the night and day
the convergence rate does not change in 30 periods.
generations/epochs.
Table 3 shows the results obtained for the criteria
defined by equations (18,19,20 and 21). Figures 2 to
5. SIMULATION RESULTS 5 represent the simulated set-point tracking
responses for the period of one day obtained with
In this section, simulated results obtained for indoor PSO and GA, respectively.
greenhouse temperature control using a MPC
6. CONCLUSION
Table 3 Simulation results using PSO and GA
The particle swarm optimisation algorithm was
PSO GA proposed as a new method to design a greenhouse air
SPe 0.0035 0.0085 temperature model predictive controller subject to
EH 380.34 384.52 restrictions. The controller outputs are computed in
EV 228.20 228.45 order to optimise future behaviour of the greenhouse
CT 258.04 302.18 environment, regarding set-point tracking and
minimisation of the control effort over a prediction
horizon of one hour with a one-minute sampling
period. By observation of the simulation results, one
can conclude that the PSO algorithm was able to
reduce the set-point tracking error in approximately
40% relatively to the minimum error achieved by the
genetic algorithm. Simultaneously it was able to
decrease the heating consumption in 1.2%, the
ventilation requirements by 0.1% and the algorithm
run time in 14%.

REFERENCES

Fig. 2. Set-point tracking results using the PSO Åström, K. J. and B. Wittenmark (1989). Adaptive
algorithm. Control. Addison-Wesley, ISBN: 0-201558-66.
Boaventura Cunha, J., C. Couto and A. Ruano
(1998) A greenhouse climate multivariable
predictive controller, Acta Horticulture N.534,
ISHS, pp: 269-276.
Camacho, E. F. and C. Bordons (1994). Model
Predictive Control in the Process Industry,
Springer, Sevilla.
Clarke, D. W., C. Mohtadi and P.S. Tuffs (1987).
Generalized Predictive Control – Part I. The
Basic Algorithm, Automatica, Vol 23, No 2,
pp.137-148.
Clerc M., 1999. The Swarm and the Queen
Fig. 3. Ventilation and heating actuations computed Towards a Deterministic and Adaptive Particle
with the PSO. Swarm Optimization. Proceedings of the 1999
Congress of Evolutionary Computation, IEEE
Press, Vol. 3, pp. 1951-1957.
Kennedy, J. and R.C. Eberhart (1995). Particle
Swarm Optimization, Proc. Of the 1995 IEEE
Int. Conf. On Neural Networks, pp. 1942-1948.
IEEE Service Center, Piscataway, NJ.
Kennedy J. (1997). The Particle Swarm: Social
Adaptation of Knowledge. Proceedings of the
1997 IEEE Int. Conference on Evolutionary
Computation, Indianapolis, US, pp. 303-308.
Kennedy, J. and R. C. Eberhart (2001). Swarm
Intelligence. Academic Press, ISBN: 1-55860-
Fig. 4. Set-point tracking results using the GA. 595-9, pp. 344-345.
Nielsen, B. and H. Madsen (1996). Predictive
Control of Air Temperature in Greenhouses,
IFAC 13th Triennial World Congress, San
Francisco, pp. 399-404.
Shi Y. and R. C. Eberhart (1998): "Parameter
Selection in Particle Swarm Optimisation",
Evolutionary Programming VII, Lecture Notes
in Computer Science 1447, pp. 591-600,
Springer Verlag.
Shi Y. and R. C. Eberhart (1999). Empirical Study of
Particle Swarm Optimization, Proceedings of
the 1999 IEEE Congress of Evolutionary
Fig. 5. Ventilation and heating actuations computed Computation, Vol 3, pp. 1945-1950.
with the GA.

You might also like