Inter
national
J
our
nal
of
Electrical
and
Computer
Engineering
(IJECE)
V
ol.
11,
No.
2,
April
2020,
pp.
1223
1234
ISSN:
2088-8708,
DOI:
10.11591/ijece.v11i2.pp1223-1234
r
1223
Constrained
discr
ete
model
pr
edicti
v
e
contr
ol
of
a
gr
eenhouse
system
temperatur
e
Hafsa
Hamidane
1
,
Samira
El
F
aiz
2
,
Mohammed
Guerbaoui
3
,
Abdelali
Ed-Dahhak
4
,
Abdeslam
Lachhab
5
,
Benachir
Bouchikhi
6
1,3,4,5
Modelling,
Materials
and
Control
of
Systems
T
eam,
High
School
of
T
echnology
,
Moulay
Isma
¨
ıl
Uni
v
ersity
,
Meknes,
Morocco
2
Ener
gy
and
Sustainable
De
v
elopment
Research
T
eam,
High
School
of
T
echnology
,
Ibn
Zohr
Uni
v
ersity
,
Guelmim,
Morocco
6
Sensor
Electronic
and
Instrumentation
T
eam,
F
aculty
of
Sciences,
Moulay
Isma
¨
ıl
Uni
v
ersity
,
Meknes,
Morocco
Article
Inf
o
Article
history:
Recei
v
ed
Mar
9,
2020
Re
vised
Jul
27,
2020
Accepted
Aug
7,
2020
K
eyw
ords:
Constraints
Greenhouse
Linear
system
Model
predicti
v
e
control
T
emperature
control
Optimization
Y
almip
ABSTRA
CT
In
this
paper
,
a
constrained
discet
e
model
predicti
v
e
control
(CDMPC)
strate
gy
for
a
greenhouse
inside
temperature
is
presented.
T
o
describe
the
dynamics
of
our
sys-
tem’
s
inside
temperature,
an
e
xperimental
greenhouse
prototype
is
eng
aged.
F
or
the
mathematical
modeling,
a
state
space
form
which
fits
properly
the
acquired
data
of
the
greenhouse
temperature
dynamics
is
identified
using
t
he
subspace
system
identifica-
tion
(N4sid)
algorithm.
The
obtained
model
is
used
in
order
to
de
v
elop
the
CDMPC
starate
gy
which
role
is
to
select
the
best
control
mo
v
es
based
on
an
optimization
pro-
cedure
under
the
constraints
on
the
control
notion.
F
or
ef
ficient
e
v
aluation
of
the
pro-
posed
control
approach
MA
TLAB/Simulink
and
Y
almip
optimization
toolbox
are
used
for
algorithm
and
blocks
implementation.
The
simulation
results
confirm
the
accurac
y
of
the
controller
that
g
arantees
both
the
control
and
the
reference
tracking
objecti
v
es.
This
is
an
open
access
article
under
the
CC
BY
-SA
license
.
Corresponding
A
uthor:
Hafsa
Hamidane
Modelling,
Materials
and
Control
of
Systems
T
eam,
High
School
of
T
echnology
,
Moulay
Isma
¨
ıl
Uni
v
ersity
B.P
.
11201,
Zitoune,
50003,
Meknes,
Morocco
Email:
Hamidanehafsa@gmail.com
1.
INTR
ODUCTION
No
w
adays
agricultural
green
houses
industry
is
considered
as
one
of
the
most
important
and
gro
wing
se
gment
of
all
agri-food
domains.
In
f
act
seeking
ne
w
v
arieties,
susta
inable,
high-performing
and
af
fordable
production
methods
to
create
po
werful
yields
and
higher
quality
of
the
plants,
and
to
reduce
the
industry’
s
impact
on
the
en
vironment
ha
v
e
al
w
ays
had
a
stronghly
held
v
alue
in
agricultural
economics
and
inno
v
ation
of
all
time.
The
control
of
the
climatic
en
vironment
indooor
greenhouses
has
g
ained
considerable
attention
in
the
past
fe
w
years
[1,
2].
The
main
reasons
for
this
increasing
interest
are
related
to
dif
ferent
f
actors
one
to
be
cited
agronomic
and
financial
ones.
As
a
matter
of
f
act,
a
lar
ge
number
o
f
methods
re
g
arding
the
control
of
the
climatic
conditions
under
greenhouses
has
been
de
v
eloped
and
elaborated,
hence
se
v
eral
teams
in
applied
research
ha
v
e
e
xperienced
this
techniques
to
f
athom
and
to
enhance
green
house
s
control
outstanding,
among
them:
the
fuzzy
control
[3,
4],
predicti
v
e
control
[5,
6],
in
additi
on
to
neuronal
netw
orks
control
[7,
8],
optimal
control
[9]
and
man
y
other
tecniques
that
ha
v
e
emer
ged
in
man
y
litterature
articles.
In
the
control
theory
,
model
predicti
v
e
control
has
J
ournal
homepage:
http://ijece
.iaescor
e
.com
Evaluation Warning : The document was created with Spire.PDF for Python.
1224
r
ISSN:
2088-8708
emer
ged
man
y
research
and
de
v
elopment
areas.
Thanks
to
its
adv
antages
and
roles,
this
control
technique
has
been
present
in
v
arious
industrial
process
automation
[10–12],
among
of
them
the
control
of
greenhouses’
s
inside
climate,
one
can
refer
to
[13,
14]
and
reference
therein.
Furthermore,
Model
predicti
v
e
control
(MPC)
is
a
widel
y
used
method
for
a
lar
ge
v
ariety
of
systems,
its
simplicity
of
use
mak
es
it
applicable
for
single,
multi
v
ariable,
linear
and
nonlinear
systems
and
where
the
notion
of
nonlinearities
and
constrai
nts
incorporation,
such
as
limitations
on
the
sign
and
amplitude
of
the
states
and
controls;
re
g
arding
the
control
la
w
synthesis;
is
al
w
ays
in
v
olv
ed.
In
this
sense,
desi
gning
controllers
that
maintain
the
system’
s
performances
re
g
arding
these
constraints
is
a
topic
of
continuing
e
v
olution,
hence
se
v
eral
are
the
MPC
approaches
that
ha
v
e
been
suggested
and
studied
by
researchers.
F
or
instance,
we
can
refer
to
[15–21]
and
man
y
others
as
well.
The
problem
adressed
in
our
frame
w
ork,
is
related
to
re
gulation
task
of
inside
greenhouse
temperature,
among
v
arious
modern
contr
o
l
strate
gies
,
model
based
predicti
v
e
control
is
choosen
as
a
technique
to
o
v
ercome
this
problem.
The
main
purpose
of
the
proposed
control
theory
,
is
to
calculate
an
objecti
v
e
and
quadratic
cost
func-
tion
o
v
er
a
finite
horizon
of
the
current
state
and
control
trajectory
,
while
satisfying
constraints
on
the
control.
T
o
do
so,
an
algorithm
de
v
ell
oped
using
Y
almip
optimization
toolbox
[22]
in
the
form
of
an
object
oriented
code
is
used
simultaneously
wi
th
an
interpreted
MA
TLAB
function
block
that
will
ho
l
d
this
latest
for
simula-
tion
purposes
under
Simulink.
The
control
la
w
synthesis
using
a
ne
w
toolbox
as
Y
almip
together
with
Simulink
models
and
blocks
allo
w
in
one
hand
respecting
the
main
CDMPC
strate
gy
and
in
another
hand
minimizing
o
v
erhead
and
unneeded
calculations
by
using
an
optimizer
object,
thing
that
w
as
not
treated
before,
re
g
arding
our
inside
climate
parameter
control
case
of
study
.
It’
s
w
orth
mentioning
to
point
t
hat
the
particular
no
v
elties
of
the
present
paper
could
be
summarized
as
follo
ws:
-
Using
an
optimal
method
as
MPC
to
automatically
control
inside
climatic
parameters
for
industrual
greenhouse
as
a
comple
x
system.
-
The
utility
of
MPC
as
a
perfect
control
approach
that
allo
ws
direct
incorporation
of
constraints
to
an
objecti
v
e
function.
-
Pro
viding
the
control
acti
vities
using
an
optimizer
with
Y
almip
optimization
toolbox
that
incorporates
an
ef
ficient
technique
which
solv
es
the
problem
as
f
ast
as
possible.
The
remaining
of
the
paper
is
structured
as
follo
ws,
The
second
section
steps
through
the
greenhouse
model
identification
and
a
reminder
of
CDMPC
purposes
and
controller
strate
gy
,
including
optimization
aims,
parameters
choice
and
constraints
notions,
in
addition
to
the
main
principles
of
the
algorithm
used
in
our
w
ork.
In
the
third
section
simulation
results
and
discussion
related
to
the
CDMPC
design
strate
gy
and
synthesis
will
be
pro
vided.
Conclusions
and
some
of
our
future
perspecti
v
es
will
be
presented
at
the
last
section
of
this
paper
.
2.
ENGA
GED
MA
TERIALS
AND
METHODS
2.1.
Description
of
the
gr
eenhouse
system
pr
ototype
As
depicted
in
Figure
1
the
e
xperimental
greenhouse
eng
aged
as
support
in
this
frame
w
ork
is
a
pro-
totype
installed
at
the
Laboratory
of
Electronics,
Automatics
and
Biotechnology
(LEAB),
F
aculty
of
Sciences,
Meknes,
Morocco.
This
system
is
a
polyeth
ylene
single
w
all
construction,
equipped
with
four
sensors
that
pro
vide
indoor
and
outdoor
measurements
of
temperature
and
relati
v
e
humidity
.
More
consicely
,
a
LM35DZ
and
a
HIH-4000-001
Hone
ywell
sensors
are
installed
to
pro
vide
respecti
v
el
ly
the
indoor/outdoor
temperature
and
relati
v
e
humidity
measurements.
Besides,
se
v
eral
actuators
are
present
as
well;
a
heati
ng
system
and
a
thermostatically
v
ariable
speed
f
an;
equipied
the
greenhouse
to
insure
the
appropriate
climate
for
the
system’
s
inside
parameters.
F
or
control
and
data
acquisition
aims,
the
mentionned
s
ensors
and
actuators
are
connected
to
a
control
and
acquisition
cards
attached
to
a
personal
computer
[23].
Firstly
,
the
acquisition
of
the
actuators
dif
ferent
orders
and
data
are
ensured
by
an
acquisition
data
card
NI-PCI6024E
from
Adv
antech
f
amily
.
In
thi
s
re
g
ard
sig-
nals
conditionning,
protection
and
po
wer
cards
dedicated
to
t
he
sensors
and
the
hole
system
protection,
are
also
installed.
Secondly
,
the
control
and
supervision
tasks;
that
manage
the
system
and
pro
vide
a
historical
database
of
both
measured
indoor
and
outdoor
climate
v
ariables;
are
created
respecti
v
ely
under
MA
TLAB/Simulink
and
Lab
vie
w
as
softw
are
programs.
Int
J
Elec
&
Comp
Eng,
V
ol.
11,
No.
2,
April
2020
:
1223
–
1234
Evaluation Warning : The document was created with Spire.PDF for Python.
Int
J
Elec
&
Comp
Eng
ISSN:
2088-8708
r
1225
Figure
1.
Experimental
greenhouse
system
2.2.
Mathematical
model
f
or
contr
oller
design
In
the
present
section,
a
mathemati
cal
model
of
t
h
e
inside
temperature
under
greenhouse
has
been
presented.
Re
g
arding
this,
a
state
space
model
des
cribing;
the
greenhouse
inside
temperature
dynamic
response
to
the
F
an
as
first
actuator
and
then
to
the
heater
as
second
actuator;
is
proposed.
The
model
used
will
enable
us
to
modify
the
beha
vior
of
the
plant
to
suit
our
needs
in
term
of
reference
temperature
tracking
and
control
performances.
In
order
to
de
v
elop
the
controller
synthesis
and
beha
vior
,
the
plant
model
has
to
be
obtained.
F
or
this
aim,
the
s
ystem
model
is
estimated
using
e
xperimental
collected
data
and
the
N4sid
algorithm
to
identify
the
plant
in
discrete
time
state
space
model
that
describes
the
beha
vior
of
the
inside
temperature
of
the
greenhouse.
F
or
linear
subspace
identification,
systems
and
models
of
the
form
(1),
are
generaly
used.
x
k
+1
=
Ax
k
+
B
u
k
+
K
w
k
y
k
=
C
x
k
+
D
u
k
+
v
k
(1)
Where
x
k
,
u
k
,
y
k
,
w
k
and
k
are
respecti
v
elly
the
state,
input,
output,
process
and
the
output
measurement
noises
v
ectors
and
A
,
B
,
C
,
D
,
K
are
respecti
v
elly
the
state,
input,
output
and
noise
matrix
to
be
estimated.
Based
on
(1)
and
for
simplicity
,
the
class
of
systems
to
be
considered
is
linear
discrete-time
syst
ems
with
e
xternal
disturbances
of
the
form.
x
k
+1
=
Ax
k
+
B
u
k
+
K
w
k
y
k
=
C
x
k
(2)
An
adv
antage
of
the
N4sid
method
is
that
it
uses
a
prediction
error
based
on
a
the
Best
Fit
(BF)
displayed
percentage
related
to
the
output
reproduced
by
the
model
[24],
the
formula
used
in
this
re
g
ard
is:
B
estf
it
=
(1
j
y
^
y
j
y
y
)
100
(3)
where
y
,
^
y
and
y
are
respecti
v
elly
the
measured,
the
predicted
model
and
the
mean
of
the
output
y
.
The
proposed
control
strate
gy
has
been
suggested
for
a
greenhouse
system
case
of
study
,
where
the
main
task
in
v
olv
es
internal
temperature
re
gulation
using
heating
and
v
entilation.
T
o
illust
rate
the
dynamical
beha
vior
of
our
system
depicted
in
Figure
1,
and
for
the
control
s
trate
gy
purposes
mentioned
abo
v
e,
the
discrete
time
state
space
model
is
further
used,
where
the
beha
viour
of
the
temperature
under
the
greenhouse
process
is
described
by
the
tw
o
state-space
formulations
as
detailled
in
the
ne
xt
subsections.
2.2.1.
Inter
nal
temperatur
e
r
esponses
to
actuators
The
main
goal
in
this
section
is
to
use
the
collected
data
in
order
to
ha
v
e
linear
models
that
will
be
used
as
basics
for
the
mathematical
identification
as
follo
ws.
Constr
ained
discr
ete
model
pr
edictive
contr
ol
of
a...
(Hafsa
Hamidane)
Evaluation Warning : The document was created with Spire.PDF for Python.
1226
r
ISSN:
2088-8708
-
T
emperature
response
to
f
an
In
the
present
part,
we
describe
the
e
v
olution
of
the
internal
temperature
by
e
xciting
the
system
with
a
step
input
of
1.6
V
olts
that
w
as
sent
to
the
f
an
in
order
to
decrease
the
air
temperature
under
greenhouse
until
reaching
a
steady
state.
Experimental
collected
data
and
the
N4sid
algorithm
under
Matlab
are
eng
aged
to
de
v
elop
the
corresponding
discrete
time
state
space
model
matrix
for
5
seconds
as
sample
time.
The
e
v
olution
of
the
measured
and
simulated
inside
temperature
using
the
N4sid
algorit
hm
is
sho
wn
in
Figure
2:
Figure
2.
Comparison
of
simulated
and
e
xperimental
tint
step
response
to
a
f
an
Here
the
inside
temperature
reaches
its
20.6
C,
where
the
initial
v
alue
is
27.9
C.
The
model
best
fit
is
about
90.34%,
hence
the
state
space
model
identification
describes
90.34%
of
the
beha
vior
of
the
process
output.
W
e
can
conclude
that
the
simulated
and
e
xperimental
results
closely
match
each
other
with
a
good
accurac
y
.
F
or
the
controller
utilities,
the
identified
model
must
be
con
v
erted
to
a
discrete-time
system,
considering
abo
v
e
state
space
model
(2),
a
discrete
linear
time
in
v
arint
system
with
3
states,
w
as
obtained
as
follo
ws:
A
f
=
2
4
0
:
9843
0
:
0125
0
:
0100
0
:
0294
0
:
8090
0
:
6507
0
:
0032
0
:
6512
0
:
6447
3
5
B
f
=
0
:
0127
3
:
3205
4
:
2182
T
C
f
=
23
:
2656
1
:
0200
0
:
1778
D
f
=
0
K
f
=
0
:
0152
0
:
0580
0
:
0437
T
Under
the
initial
state:
x
f
0
=
1
:
2128
0
:
3375
1
:
4972
T
And
the
open-loop
eigen
v
alues:
(
A
f
)
=
f
0
:
9840
;
0
:
7267
0
:
6457
i
g
Int
J
Elec
&
Comp
Eng,
V
ol.
11,
No.
2,
April
2020
:
1223
–
1234
Evaluation Warning : The document was created with Spire.PDF for Python.
Int
J
Elec
&
Comp
Eng
ISSN:
2088-8708
r
1227
The
inde
x
’f
’
sticks
to
abo
v
e
matrix
refers
to
the
f
an
as
input
actuator
eng
aged
in
the
system
st
ate
space
identification.
-
Internal
temperature
response
to
heater
The
same
as
in
the
f
an
case,
the
e
v
olution
of
indoor
temperature
w
as
also
described
by
e
xciting
the
system
with
a
step
input
of
2.6
V
olts
that
w
as
sent
to
the
heater
,
hence
the
a
ir
temperature
under
greenhouse
w
as
increased
reaching
by
that
a
steady
state
for
the
same
sample
time,
which
is
5
seconds.
In
this
case,
the
e
v
olution
of
the
measured
and
simulated
inside
temperature
using
the
N4sid
algorithm
is
sho
wn
in
Figure
3
:
Figure
3.
Comparison
between
simulated
and
e
xperimental
tint
step
response
to
a
heater
As
sho
wn,
the
inside
temperature
reaches
its
28.5
C,
where
the
initial
v
alue
is
17.6
C.
The
model
bes
t
fit
this
time
is
95.5%.
The
identified
discrete-time
system
model,
with
5
states,
w
as
presented
as
follo
ws:
A
h
=
2
6
6
6
6
4
1
:
0061
0
:
0053
0
:
0034
0
:
0007
0
:
0007
0
:
0176
0
:
9845
0
:
1607
0
:
0906
0
:
0168
0
:
0003
0
:
1011
0
:
4634
0
:
8349
0
:
1410
0
:
0273
0
:
0027
0
:
0009
0
:
2943
0
:
6977
0
:
0601
0
:
0194
0
:
2084
0
:
3336
0
:
7432
3
7
7
7
7
5
B
h
=
0
:
0000
0
:
0263
0
:
0247
0
:
1198
0
:
0384
T
C
h
=
184
:
9508
0
:
8560
0
:
4289
0
:
2221
0
:
2199
D
h
=
0
K
h
=
0
:
0036
0
:
0933
0
:
1762
0
:
1326
0
:
0519
T
Under
the
initial
state:
x
h
0
=
0
:
0944
0
:
1066
0
:
5345
0
:
2705
0
:
2285
T
And
the
open-loop
eigen
v
alues:
Constr
ained
discr
ete
model
pr
edictive
contr
ol
of
a...
(Hafsa
Hamidane)
Evaluation Warning : The document was created with Spire.PDF for Python.
1228
r
ISSN:
2088-8708
(
A
h
)
=
f
0
:
9406
;
0
:
6172
;
0
:
9936
;
0
:
5727
0
:
5166
i
g
The
inde
x
’h’
refers
this
time
to
the
heater
as
input
actuator
used
in
the
system
state
space
identification
as
well.
Both
identified
state
space
models,
indicate
that
the
system
is
stable,
controllable
and
observ
able.
2.3.
Contr
oller
design
2.3.1.
MPC
and
optimization
pr
oblem
brief
insight
In
general,
MPC
controller
is
a
strate
gy
based
on
an
iterati
v
e,
finite
horizon
(constrained)
optimi
zation
of
a
plant
model
[25].
An
actual
or
estimated
State
x
k
is
obtained
at
each
discrete
sampling
time
(k)
with
the
sampled
plant
model
and
a
cost
function
is
calculated
to
obtain
the
performances
of
the
c
o
nt
roller
in
the
future
based
on
the
current
plant
state
x
k
and
a
serie
of
future
inputs
u
k
.
The
cost
function
is
primordial
in
predicti
v
e
controller
,
that
allo
ws
us
to
calculat
e
the
be
st
series
of
control
inputs
u
k
,
which
results
in
a
minimal
cost
in
order
to
k
eep
the
output
as
close
as
possible
to
the
refer
-
ence.
In
control
field,
ha
ving
a
cost
that
describes
ho
w
good
our
control
will
be
i
n
the
future:
starting
from
the
ne
xt
step
up
to
the
end
of
the
horizon,
is
the
most
important
task
to
tak
e
into
account.
F
or
this
aim,
a
function
of
the
form
(4),
can
be
e
xpressed:
J
=
f
(
x
k
;
u
k
)
(4)
Where
x
k
is
current
state
and
u
k
is
the
control
input.
More
precisely
,
the
cost
function
re
g
arding
the
ar
gument
u
k
has
to
be
minimized
i
n
order
to
get
an
optimal
inputs
sequence
u
k
,
which
can
be
written
as
follo
ws:
u
k
=
arg
min
u
J
(
x
k
;
u
k
)
(5)
Which
defines
an
optimal
control
problem.
The
quadratic
programming
(QP)
notion,
results
in
Linear
quadratic
control,
which
is
related
to
al-
gorithms
based
on
optimal
control
as
clarified
abo
v
e.
The
inte
gration
of
the
cost
function
(5),
is
chosen
to
be
quadratically
dependent
on
the
control
input
and
the
state
or
output
response.
In
this
sense,
linear
quadratic
re
gulators
(LQR)
are
a
special
case
of
the
generic
linear
quadratic
control
problem,
where
a
g
ain
matrix
K
that
minimizes
an
optimization
proplem
cost
function
of
the
form
(6),
is
calculated.
minimize
u
J
=
N
X
k
=1
x
0
k
Qx
k
+
u
0
k
R
u
k
(6)
where
N
is
the
prediction
horizon,
Q
and
R
represent
positi
v
e-semi
definite
penality
matrices
respecti
v
ely
.
F
or
more
details
about
(LQR),
the
reader
can
refer
to
[26]
and
reference
therein.
-
Quadratic
programming
parameters
The
li
near
MPC
op
t
imization
results
i
n
quadratic
programming
(QP)
problem.
Hence,
v
arious
are
the
methods
used
in
this
re
g
ard
such
as
acti
v
e-set
methods
and
interior
-point
methods
to
solv
e
the
problem.
Once
an
optimal
solution,
i.e.,
a
control
input
sequence
along
prediction
horizon
is
numerically
obtained,
we
only
use
the
first
element
of
the
sequence
as
an
actual
control
input.
In
addition
to
MPC
parameters,
the
performance
of
the
predicti
v
e
controller
depends
more
and
more
on
tw
o
other
important
parameters
to
be
set.
These
latests
are
the
penalization
matrices
Q
and
R
.
Concider
-
ing
(6),
it
is
remarquabale
that
both
;
the
state
penalization
matri
x
Q
,
the
input
penalization
matrix
R
contrib
ution;
will
af
fect
the
desired
cost
function.
-
MPC
and
constraints
contrib
ution
The
real
meaning
of
a
CMPC
lies
in
computing
optimal
control
actions
for
systems
with
constraints
contrib
ution
[27].
The
constraints
notion
re
g
arding
MPC
cotroller
,
could
simply
be
defined
as
a
set
of
limits
on
the
systems
input
v
ariables,
output
or
possibly
states,
which
is
presented
as
follo
ws:
Int
J
Elec
&
Comp
Eng,
V
ol.
11,
No.
2,
April
2020
:
1223
–
1234
Evaluation Warning : The document was created with Spire.PDF for Python.
Int
J
Elec
&
Comp
Eng
ISSN:
2088-8708
r
1229
u
u
k
u
(7)
x
x
k
x
(8)
One
can
be
a
w
are
that
these
constrai
nts
ha
v
e
to
be
ree
xpressed
and
e
v
aluated
by
the
mean
of
quadratic
programming
(QP)
algorithms
and
suitable
solv
ers.
The
MPC
controller
logic
and
algorighm
will
remain
the
same
in
the
presence
of
constraints,
the
only
thing
to
be
changeable
is
the
method
of
the
optimization.
The
adv
antage
in
this
case
is
that
procedure
has
to
be
performed
at
e
v
ery
sampling
instant,
hence,
inputs
are
computed
in
a
w
ay
that
the
y
are
optimal
as
possible
and
guaranteeing
closed-loop
stability
notion.
F
or
this
aim,
the
cost
function
optimization
task
(6)
is
re
written
as
follo
ws:
minimize
u
k
J
=
N
X
k
=1
x
0
k
Qx
k
+
u
0
k
R
u
k
subject
to
u
min
u
k
u
max
(9)
The
suf
fix
“min”
and
“max”
are
the
lo
wer
and
upper
constraint
input
bounds.
2.3.2.
The
adopted
contr
oller
In
the
present
section,
the
CDMPC
formulation
for
greenhouse
temperature
control
is
presented
as
a
quadratic
programming
(QP)
p
r
ob
l
em
that
is
solv
ed
at
each
s
ample
time.
The
conceptual
model
of
the
control
strate
gy
is
depicted
in
Figure
4.
Figure
4.
General
conceptual
model
of
the
proposed
control
strate
gy
The
constraint
on
the
control
notion
re
g
arding
the
system
dynamics
is
brought
into
the
cost
function
for
MPC
formulations.
Since,
the
considered
system
dynamics
are
linear
,
the
temperature
control
algorithm
w
ould
typically
in
v
olv
e
a
linear
program
(LP)
eng
aging
a
linear
cost
function
that
will
be
solv
ed
us
ing
(QP)
approach.
F
or
this
purpose,
the
cost
function
aims
to
penil
ize
an
y
error
de
viation
re
g
arding
the
inside
temperature;
which
represents
the
systeme
output;
and
the
control
input
is
penelized
as
well
trying
to
ha
v
e
the
optimal
control
sequence.
Re
g
arding
this,
the
main
required
k
e
y
elements
to
tak
e
into
consideration
for
an
ef
ficient
MPC
algorithm
design
are
the
model
and
the
optimizer
.
Figure
5
gi
v
es
an
insight
of
the
proposed
re
gulation
and
optimization
procedure.
The
model
is
one
of
the
most
important
componements
of
an
MPC
algorithm,
since
it
is
used
to
predict
the
systems
baha
vior
when
applying
a
sequence
of
control
commands,
in
this
end,
it
has
to
be
as
specific
as
possible
for
MPC
aims.
It
is
w
orth
mentioning
that
for
model
based
predicti
v
e
control,
both
the
prediction
and
the
control
horizons
Np
and
Nc,
that
represent
respecti
v
elly
the
number
of
predicted
future
time
interv
als
and
the
number
of
control
mo
v
es
for
the
time
interv
al,
are
important
and
ha
v
e
to
be
Constr
ained
discr
ete
model
pr
edictive
contr
ol
of
a...
(Hafsa
Hamidane)
Evaluation Warning : The document was created with Spire.PDF for Python.
1230
r
ISSN:
2088-8708
carrefully
adjusted.
Those
latests
contrib
ute
directelly
in
increasing
or
decreasing
both
the
optimization
running
and
optimization
time.
The
optimizer
in
its
part,
plays
a
prominent
role
in
the
control
approach.
Due
to
Y
almip
toolbox
used
in
this
frame
w
ork,
the
adopted
optimizer
generates
the
control
acti
vities
in
the
f
astest
possible
w
ay
and
solv
es
the
quadratic
programming
problem
in
order
to
return
the
optimal
solution
respecting
the
con-
straints
on
the
control
notion.
In
f
act,
one
of
the
benefits
of
such
a
toolbox
is
that
it
automatically
detects
the
cate
gory
of
the
problem
to
be
solv
ed
and
optimized
in
order
to
select
the
appropriate
solv
er
if
a
v
ailable,
if
it
is
not
the
case,
the
problem
is
con
v
erted
to
a
lo
w
le
v
el
model
and
then
treated
and
solv
ed.
Figure
5.
Block
diagram
of
the
adopted
re
gulator
In
our
case
of
study
,
single
input
single
output
system
w
as
tak
en
into
account,
for
this
kind
of
systems,
state
penality
matrix
Q
may
be
chosen
re
g
arding
the
states
contrib
ution
into
the
cost
function,
we
are
aimed
to
k
eep
the
output
at
a
predetermined
le
v
el,
hence
the
choice
of
the
state
penalization
matrix
w
as
set
to
pro
vide
a
kind
of
states
recalculation
into
outputs
y
k
,
kno
wing
that
y
k
=
C
x
k
.
F
or
the
input
penality
R
,
it
is
chosen
to
be
small
around
R
n
(
2)
,
n
2
N
,
and
depending
on
the
system
input
contrib
ution
in
the
cost
function,
one
can
fix
it
to
lo
wer
or
higher
v
alues.
T
o
recall,
the
constrained
optimization
problem
used
in
this
frame
w
ork
is
based
on
obtaining
the
control
inputs
u
f
and
u
h
,
i.e.,
F
an
and
heate
r
,
where
a
cost
function
w
as
selected
to
be
quadratically
dependent
on
the
systems
error
e
k
and
the
control
input
u
k
,
under
the
system
dynamics
and
control
constraints.
The
adopted
cost
function
is
presented
as
follo
ws:
minimize
u
k
J
=
N
X
k
=1
e
0
k
Qe
k
+
u
0
k
R
u
k
subject
to
u
min
u
k
u
max
(10)
Where
e
k
=
r
C
x
k
and
r
is
the
reference
v
alue.
Here,
MPC
strate
gy
is
implemented
in
a
repeated
w
ay
such
that,
at
each
sampling
instant
k
,
current
states
x
k
are
presents
first,
then,
a
sequence
of
future
optimal
control
predictions
is
calculated
and
its
first
element
is
e
xtracted
and
appl
ied
back
to
the
plant,
hence,
for
each
system
model,
tw
o
MA
TLAB
scripts
and
a
simulation
model
under
Simulink
were
suggested
more
specifically:
-
Firsly
,
a
MA
TLAB
function
file
code
is
created,
in
which
the
inputs
are
defined
as:
the
state
and
the
reference,
and
a
scalar
control
signal
is
returned
as
an
output.
-
Secondely
a
Simulink
model
that
includes
both
the
linear
state-space
model
and
an
the
interpreted
MA
T
-
LAB
function
that
holds
the
MPC
controller
code
is
set.
-
Thirdly
,
a
setup
file
re
g
arding
the
state
space
model
data,
is
also
created.
MA
TLAB
2018
b
with
Y
almip
toolbox
of
the
v
ersion
’
20200116
’
were
used
to
sho
w
the
simulation
de
v
elopement
as
presented
in
section
3.
The
adopted
CDMPC
Algorithm
using
yalmip
optimization
toolbox
for
temperature
control,
can
be
summarized
as
follo
ws:
Int
J
Elec
&
Comp
Eng,
V
ol.
11,
No.
2,
April
2020
:
1223
–
1234
Evaluation Warning : The document was created with Spire.PDF for Python.
Int
J
Elec
&
Comp
Eng
ISSN:
2088-8708
r
1231
Algorithm
1
CDMPC
for
T
int
control
algorithm
Inputs:
Current
state,
current
reference
Output:
The
optimal
control
inputs
u
f
or
u
h
1:
Set
the
systems
discrete
state
space
numeriacl
model
as
in
2.2.1.
2:
Define
and
initial
ize
the
QP
penality
matrice
s
and
the
MPC
prediction
horizons
for
the
f
an
and
heater
cases
3:
Identify
the
reference,
states
and
control
as
semi
definit
programming
v
ariables
4:
Initiaize
the
reference,
the
objecti
v
e
and
constraints
5:
for
k
=
1
:
N
f
==
N
h
6:
Solv
e
the
optimization
problem
(10)
respecting
the
constraints
along
the
prediction
horizons
N
f
and
N
h
7:
endfor
8:
Extract
the
first
element
of
the
optimal
control
and
apply
it
to
the
plant.
9:
end
3.
SIMULA
TION
RESUL
TS
AND
DISCUSSION
Numerical
simulation
w
as
carried
out
in
order
to
e
v
aluate
the
CDMPC
performances.
In
this
re
g
ard,
MA
TLAB,
Simulink
and
model
predicti
v
e
control
algorithm
using
Y
ALMIP
T
oolbox
were
used
in
this
frame.
The
optimization
problem
is
solv
ed
by
abo
v
e
QP
algorithm
using
Q
U
ADPR
OG
as
a
solv
er
.
Int
erpreted
Matlab
function
w
as
used
for
the
controller
,
and
the
plant
models
for
simulation
purposes
under
Simulink
w
as
eng
aged
as
well.
T
o
recall,
the
objecti
v
e
of
the
desired
control
strate
gy
is
to
maintain
the
output
y
k
,
i.e.,
inside
temper
-
ature
T
int,
as
close
as
possible
to
the
reference
v
alue,
and
try
not
to
e
xceed
posed
boundries
15
C
T
int
25
C
,
besides
that
and
for
futur
real
time
e
xperiments
perspecti
v
es,
de
vi
ding
the
w
ork
in
tw
o
simulation
tasks,
i.
e.,
tw
o
systems
identifications
re
g
arding
cooling
and
heating
w
as
based
essentially
on
ho
w
our
system
w
orks
in
real
life,
i.
e.,
according
to
the
sign
of
the
dif
ference
between
the
setpoint
and
the
measured
inner
tempera-
ture.
In
order
to
e
v
aluate
the
proposed
control
approach;
for
both
scenarios,
i.e.,
for
the
f
an
and
heater;
the
input
is
constrained
to
e
v
olv
e
between
0
u
f
4
:
1
as
v
olt
age
applied
to
the
f
an
and
0
u
h
5
as
v
ol
tage
applied
to
the
heater
.
After
some
trials,
the
penality
weight
f
actors
were
chosen
scalars
as
Q
f
=
100
and
R
f
=
0
:
01
for
the
first
system
and
Q
h
=
200
and
R
h
=
0
:
2
for
the
second
one,
the
prediction
horizons
were
set
to
N
f
=
30
and
N
h
=
40
.
F
or
simulation
tests,
T
s
=
5
sec
w
as
setelled
as
sample
time.
Figure
6
describes
the
e
v
olution
of
External
temperature
during
7
minutes,
this
e
v
olution
sho
ws
that
the
e
xternal
temperature
v
aries
between
a
temperature
range
15
C
-
17.5
C.
Figure
6.
Measured
greenhouse
e
xternal
temperature
In
one
hand,
and
as
presented
in
Figure
7,
it
is
remarquable
that
the
f
ans
beha
vior
as
first
actuator
,
tends
to
meet
the
input
constraints
and
more
precisely
does
not
e
xceed
1.5
V
olts.
Besides,
v
arious
stopping
moments
are
clearly
observ
ed,
which
contrib
utes
to
po
wer
and
ener
gy
sa
ving,
actuator
durabi
lity
and
v
oltage
signal
limitation
as
well.
In
another
hand,
Figure
8
sho
ws
the
the
control
task
peformances,
which
is
e
v
entually
noticed
in
the
internal
temperature
setpoint
tracking,
respecting
the
desired
temprature
limits.
W
e
can
notice
that
the
temperature
decreases
from
29
C
to
attend
the
setpoint
v
ariations.
In
the
sam
e
w
ay
,
Figures
9
and
10
sho
w
respecti
v
ely
,
the
second
actuator
,
i.e.,
the
heater
,
beha
vior
under
constraints
and
the
inside
temperature
response
to
the
heater
input
control.
As
it
is
visible,
the
heater
Constr
ained
discr
ete
model
pr
edictive
contr
ol
of
a...
(Hafsa
Hamidane)
Evaluation Warning : The document was created with Spire.PDF for Python.
1232
r
ISSN:
2088-8708
beha
v
es
normally
respecting
the
constraints
noti
on
and
attempts
his
maximum
/minimum
v
oltage
po
wer
without
e
xceeding
the
upper
and
lo
wer
bounds
constraints
limits.
In
Figure
9
the
control
mission
w
as
obtained,
and
the
temperature
e
v
olv
es
and
reachs
its
22.3
C
as
first
v
alue
and
then
tracks
smoothly
the
setpoint.
It
is
interesting
to
note
that,
the
present
control
strate
gy
re
g
arding
the
constraint
s
on
the
control
has
been
e
v
aluated
despites
some
damping
comportemnt
re
g
arding
the
setpoint
tracki
ng
task.
In
general,
one
might
resume
that
simulation
result
s
using
a
ne
w
optimization
toolbox
as
Y
almip,
were
succesfully
guaranteed.
As
futur
w
ork,
v
arious
and
ne
w
ar
e
the
ideas
that
has
been
emer
ged
while
w
orking
on
this
article.
The
first
one
of
them,
is
the
proposed
control
strate
gy
real
time
i
mplementation.
While
the
impro
v
ement
and
enhancement
of
this
control
method
will
be
tak
en
into
account
as
well.
Hoping
that
these
initiati
v
es
can
lead
us
to
ne
w
and
interesting
results
and
yields.
Figure
7.
Ev
olution
of
the
f
an
control
signal
under
constraints
Figure
8.
T
int
response
to
the
f
an
as
input
control
”uf”
Figure
9.
Ev
olution
of
the
heater
control
signal
under
constraints
Figure
10.
T
int
response
to
the
heater
input
control
”uh”
4.
CONCLUSION
AND
FUTURE
PERSPECTIVES
In
this
paper
,
a
constrained
discrete
model
predicti
v
e
control
(CDMPC)
for
discrete
time
linear
SISO
system
has
been
considered.
The
notion
of
constraints
on
the
control
has
been
treated
as
well
using
qadra-
tique
programming
(QP)
optimization
algorithm
under
a
no
v
el
toolbox
as
Y
almip.
Necessary
and
suf
ficient
conditions
for
the
synthesis
of
the
elaborated
controller
that
ensure
the
desired
reference
signal
tracking
and
control
of
inside
greenhouse
temperature;
respecting
the
constraints
of
the
control
inputs
condition;
ha
v
e
been
succesfully
accomplished
and
proo
v
ed
with
the
abo
v
e
numerical
simulations.
W
e
ha
v
e
sho
wn
that
the
control
and
reference
tracking
problems
are
solv
ed
for
inside
temperature
of
our
greenhouse
system.
The
application
of
these
approachs
and
algorithm
can
be
eng
aged
for
other
climatic
parameter
control
such
as
humidity
and
for
multi-input
multi-output
(MIMO)
system
as
another
case
of
study
,
in
addition
to
real
time
implementation,
which
is
one
of
our
perspecti
v
es.
REFERENCES
[1]
S.
Hemming
et
al.,
”R
emote
control
of
greenhouse
v
e
getable
production
with
artificial
intelligence-
greenhouse
climate,
irrig
ation,
and
crop
production,
”
Sensors
,
v
ol.
19,
no
8,
pp.
1807,
2019.
[2]
H.
Mao,
C.
Jin
and
Y
.
Chen.,
”Research
progress
and
prospect
on
control
methods
of
greenhouse
en
vi-
ronment,
”
Chinese
Society
for
Agricultural
Machinery
,
v
ol.
19,
no
2,
pp.
1-13,
2018.
Int
J
Elec
&
Comp
Eng,
V
ol.
11,
No.
2,
April
2020
:
1223
–
1234
Evaluation Warning : The document was created with Spire.PDF for Python.