hybrid predictive control design based on particle swarm optimization and
TRANSCRIPT
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
1/6
Hybrid Predictive Control Design based on Particle Swarm Optimization and
Genetic Algorithm
Yaser Mohammad Nezhad1 and Mehdi Shahbazian2Department of Instrumentation and Automation
Petroleum University of Technology
Ahwaz, Iran
[email protected] [email protected]
AbstractThis paper discusses a model predictive control
approach to hybrid systems with continuous and discrete
inputs. The algorithm, which takes into account a model of a
hybrid system, described as Hybrid Automaton. However, toavoid computational complexity and computation time, the
nonlinear optimization problem is solved by evolutionary
algorithms (EA) such as Genetic Algorithms (GA) and Particle
Swarm Optimization (PSO). We have applied both GA and
PSO algorithms for nonlinear optimization in Hybrid
Predictive Control (HPC) for the start-up of a Continuous
Stirred-Tank Reactor (CSTR). The simulation results show the
good performance of approaches and their capability to use in
online application.
Keywords-component; Hybrid Systems; Mixed Integer
Programming; Particle Swarm Optimization; Genetic Algorithm;
I. INTRODUCTIONIn general, processes that comprises continuous as well
as on/off variables and logic decision of operation can beformulated as hybrid systems where continuous variablesare represented by real variables and the logic and on/offvariables can be converted into binary variables in a set ofinequalities. Hybrid dynamic models have been identied asa suitable means to account for dynamic-dependenttransitions between dierent models and for thecombination of continuous as well as discrete (switching)inputs, see e. g. [1].
Dierent approaches to the optimization of hybridsystems have been published in recent years, ranging from
rather generic formulations to tailor-made methods forcertain subtypes of hybrid systems, see e.g. [2]-[6].
One branch of methods follows the idea of transformingthe hybrid dynamics into a set of algebraic (in-) equalitiesthat serve as constraints for a mixed-integer program [7].
In order to appropriately control processes that containdiscrete and/or continuous variables (hybrid systems), hybrid
predictive control techniques has been developed. This leads,in the context of Model Predictive Control (MPC) [8], to amixed integer optimization problem that must be solved atevery sampling time [9]. The philosophy of MPC techniquesis based on the on-line use of an explicit process model, to
predict and thereby optimize the effect of future control
actions (manipulated variable changes) on the controlledvariables (process outputs) over a finite horizon.
The essential drawback with mixed integerquadratic/linear programs (MIQP/MILP) is its computationalcomplexity, which increases the time needed to finding thesolution due to the presence of logical optimization variables[10]. So, very often, the computation times are not as short asdesired, preventing its real-time implementation for manyindustrial processes. To overcome this drawback theoptimization problem can be solved efciently, by usingevolutionary algorithms. Therefore, two efcient andoptimization evolutionary algorithms, GA and PSO have
been used in this paper. PSO is similar to GA in a sense butemploys different strategies and computational effort. GAmimics the natural biological evolution and has been popular.PSO is a relatively recent heuristic search method whose
mechanism is inspired by the swarming social behavior ofspecies.
In this paper, a hybrid predictive control strategy hasbeen used to provide a safe start-up operation of thecontinuous stirred tank reactor. HPC consists of optimizingthe process behavior to obtain optimal future control actions
by using the model of the system with mixed inputs.Therefore, it is nontrivial to design a controller which willcontrol the process. The optimization problem has beensolved with the EA such as PSO and GA.
II. THE OPTIMAL CONTROL PROBLEM
The task under investigation is to determine the
continuous and discrete inputs of a hybrid system such thatthe process is driven from an initial state into a target regionwith minimal costs. The model considered in thiscontribution is formulated as a hybrid automaton accordingto [9]. Such a model is suitable to represent the transition
procedure, as it includes continuous and discrete inputs, andit can express the state-dependent switching betweendierent continuous dynamics. A short summary of hybridautomaton is given as follows:
A. Hybrid AutomatonThe hybrid automaton model may be described briey as
follows. The discrete part of the dynamics is modeled by
___________________________________978-1-61284-840-2/11/$26.00 2011 IEEE
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
2/6
means of a graph whose vertices are called discrete states or
modes, and whose edges are transitions. The continuous
state takes values in a vector space X. For each mode there
is a set of trajectories, which represents the continuousdynamics of the system. Interaction between the discrete
dynamics and continuous dynamics takes place through
invariants and transition relations. Each mode has an
invariant associated to it, which describes the conditions that
the continuous state has to satisfy at this mode. Each
transition has an associated transition relation, which
describes the conditions on the continuous state under which
that particular transition may take place and effect that the
transition will have on the continuous state. The notion of a
transition relation is split up into two components, namely a
guard which specifies the subset of the state space where a
certain transition is enabled, and a reset map which is a (set-
valued) function that specifies how new continuous statesare related to previous continuous states for a particular
transition. Schematic representation of a hybrid automaton
is illustrated in Fig 1.
A hybrid automaton is a collection
( , , , , , , , )Q X f Init Inv E G R= .
1, 2{ ,..., }NQ q q q= is a finite set of discrete states,
nX is a set of continuous states,
1 1, ... ,
n
c c c cm cmU u u u u + + = \ is the
continuous input space,
{ }1 2, ,...,d d d dnU u u u= is the discrete input space
with a nite number nd of discrete inputsn
\
:f Q X X is a vector field,
Init Q X is a set of initial states,
: ( )Inv Q P X describe the invariants,
E Q Q is a set of edges,
: ( )G E P X is a guard condition,
: ( )R E P X X is a reset map.
Note that P(X) is a power set ofX , i.e., the collectionof all subset ofX . Hence, note that the guard condition G
gives for each mode a subset of0 . Let 0 1 2{ , , ,...}T t t t =
be an ordered set of time points
0
kt
\
. The hybrid statevariable of the system is given by ( , ) ( )q x Q X . The
initial hybrid state 0 0( , )q x of trajectories of hybrid
automaton lies in the initial set Init. From this hybrid statethe continuous state x evolves according to the differential
equation 0 , )(x xf q= with 0(0)x x= and the discrete state
q remains constant 0( )q t q= . The continuous evolution
can go on as long asx stays in 0( )Inv q . If at some point the
continuous state x reaches the guard 0 1( , )G q q , it says that
the transition is enabled. The discrete state may then change
to 1q , and the continuous from the current value x to the
new value x + with 0 1( , ) ( , )x x R q q +
. After this transition,
the continuous evolution resumes and the whole process arerepeated. In addition, a set of forbidden hybrid
Figure 1. Schematic representation of a hybrid automaton with 3 discrete
states.
state sets can be introduced as { ,..., }, ( , )1 j jF F F F q xn j F F = = .
Using F to explicitly exclude states that must not beencountered (e.g. for safety reasons). The general optimalcontrol task is finding the input trajectories
1 2( , ,...)uc c cu u = and 1 2( , ,...)ud d d u u = that transfer the
HA from initial hybrid state 0 0( , )q x into a target operating
region ( , )tar tar q x such that no forbidden region is
encountered, and a given cost function is minimized. We
assume that { }0 1, ,..., fT t t t = is nite and dene a subset
{ }0 1, ,...,s sT t t t T = of time points at which the inputs
can be changed.
B. Structure of Hybrid Model Predictive ControlThe philosophy of model predictive control can be stated
as follows: A model of the process is used to predict itsfuture behavior as a function of the present and future controlactions. The determination of the control action is an
optimization problem that is solved within a nite horizon h ,i.e., for a given number of time steps ahead. For each time
step k a sequence of optimal input vectors is acquired,which minimizes the given cost function while consideringthe constraints of the inputs, outputs and system states.However, only the optimal control signals corresponding tothe present time step are applied to the process during thecurrent time step, and the whole procedure is repeated in thenext time step. The model is updated with new informationof the evolution of the system, and a new optimization at
time step 1k + is performed. The hybrid predictive controlstrategy is a generalization of MPC, where the predictionmodel contains both discrete and continuous inputs. The
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
3/6
following optimization problem is solved over a limited
prediction horizon h :
,min ( , , )c d
u uc d
k h u ut +
(1)
),...,,( 11 ++= hkck
c
k
ccuuuu and
1 1( , ,..., )k k k hd d dud u u u+ +
= are continuous and discrete
inputs respectively, which cu and du are piecewise
constant on [ , ]1t tk k+ . is based on the transition time
and the distance to the target region.
As mentioned earlier, due to the presence of discretevariables accompany with continuous ones the optimization
problems which now lie in the class of MIQP or MILP arecomputationally involving NP-complete problems, which
means that, in the worst case, the solution time growsexponentially with the problem size. To overcome thisdrawback two efficient optimization evolutionary algorithms,PSO and GA have been used in this paper.
III. EVOLUTIONARY ALGORITHMS
A. Particle Swarm OptimizationPSO [11] is a robust stochastic optimization algorithmwhich is dened by the behavior of a swarm of particles in amultidimensional search space looking for the best solution.Particles represent a population of candidate solutions. Each
particle is characterized by a position (i is the index of the
particle) and a velocity (both are dimensional, where d isthe dimension of the solution vector). These particles movewithin the search space with a certain law and find theglobal best result after some iteration. The particles have atness associated with the solution quality which derivedfrom the objective function as in (1). Therefore the tness isdetermined by evaluating the tness function dened as:
1f =
(2)
First the particles are initialized with a random positionand random velocity. At each iteration each particle update
its velocity vector, based on its momentum and the
influence of its best solution has been achieved so far ( idp )
and the best solution of all particles ( dp ), then computes a
new point to examine:
)()( 22111 t
id
t
gd
t
id
t
id
t
id
t
id zprczprcwvv ++=+
(3)
1 1t t t
id id id z z v+ +
= + (4)
Where w is inertia weight. 1c and 2c are cognitive
acceleration and social acceleration, respectively. 1r and 2r
are random numbers uniformly distributed in the range [0,1].
The algorithm for searching best solution stops, if either thevalue of the objective function reaches certain tolerance orthe maximum number of iteration has been reached.
The above description of PSO was restricted for solvingcontinuous problems. In our application, the PSO algorithmhas been adapted in order to add discrete variables in the
solution. To meet the need, the discrete version of PSO has
been used, which developed by [12]. It is designed forbinary optimization; to use the discrete problem a binary
encoding is required. Discrete PSO is composed of the
binary variable (0 or 1). So the velocity must be transformedinto the change of probability, which is the chance of the
binary variable taking the value one. In this version of PSO
the updating of velocity is same as continuous PSO, but foradjusting the new position the probability function of the
particle velocity was used as follows:
)exp(11)(
t
id
t
idv
vS+
= (5)
- =
+
notif
vSifz
t
idt
id
0
)(11
(6)
Where ( )tidS v and are probability function of the
particle velocity and random number respectively.
B. Genetic AlgorithmGenetic Algorithms (GA) were rst introduced in [13]
and popularized by [14]. GA provides an ecient means tosolve nonlinear optimization problems, GA maintains a setof candidate solutions called population and repeatedlymodies them. At each step, the GA selects individuals fromthe current population to be parents and uses them to producethe children for the next generation. Candidate solutions areusually represented as strings of xed length, calledchromosomes. A tness or objective function is used toreect the goodness of each member of population as in (2).Given a random initial population GA operates in cyclescalled generations, as follows:
Each member of the population is evaluated usinga tness function.
The population undergoes reproduction in anumber of iterations. One or more parents arechosen stochastically, but strings with higher
tness values have higher probability of
contributing an offspring.
Genetic operators, such as crossover and mutationare applied to parents to produce offspring.
The offspring are inserted into the population, andthe process is repeated.
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
4/6
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
5/6
parameters have been used: w=0.95 and c1=c2=2. For bothalgorithms a population size of 20 individuals and an upperlimit of 30maxn = for the maximum number of generations
has been considered. The simulation tests are implemented ina digital computer having a core 2 Duo CPU 2 GHz with3GB of RAM using MATLAB 7.6 software package.
The sampling time is 100s, and the maximum time needed tocalculate the solution in one sampling time is obtained 5.9sand 7.1s for PSO and GA respectively, So is much shorterthan the sampling time. This means that the bothevolutionary algorithms-based control strategies are suitablefor real-time control and implementation. The simulationresults show that the optimal transition time are 107s and125s for PSO and GA, respectively. The target region isobtained after 21 sampling times for PSO and 25 for GA.These results show that PSO is faster than GA, although GAhas better performance as regards with mean tness value of
1.35 in comparison with the 1.013 of
0 200 400 600 800 1000 1200 1400 1600 18000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Time [s]
ConcentrationofA
[kg/m3]
GA
PSO
Target Region
Figure 3. Concentration component A ( AC )
0 200 400 600 800 1000 1200 1400 1600 18000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Time [s]
Volume[m3]
GA
PSO
Target Region
Figure 4. Volume ( RV )
0 200 400 600 800 1000 1200 1400 1600 1800300
305
310
315
320
325
330
335
340
345
350
Time [s]
Temprature[k]
GA
PSO
Target Region
Figure 5. Temperature ( RT )
the PSO. The state trajectories as the optimization results,using PSO and GA has been shown in Figures 3 to 5. Fig. 3shows the curve of concentration component A ( AC ), while
Fig. 4 and Fig. 5 display evolution of volume andtemperature states, respectively.
V. CONCLUSION
In this paper, a nonlinear model predictive controlstrategy is used for the control of a hybrid system with HAmodeling and mixed inputs. Since evolutionary algorithmshave not been widely applied in hybrid systems, weinvestigate their performance in these systems. In the
proposed HPC scheme, two evolutionary algorithms (PSOand GA) which simplify the solution of the optimization
problem have been used to solve the hybrid optimizationproblem. The comparative analysis showed a similarity inthe convergence between PSO and GA, Although PSO couldconverge faster than GA. Simulation results showed that the
-
7/31/2019 Hybrid Predictive Control Design Based on Particle Swarm Optimization And
6/6
proposed control strategies using PSO and GA are suitablefor real-time control applications.
REFERENCES
[1] Lynch, N., R. Segala and F. Vaandrager (2003.)Hybrid i/o automata.Information and Computation 185(1), 105157.
[2] Avraam, M. P., R. Shah and C. C. Pantelides (1998). Modelling andoptimisation of general hybrid systems in the cont. time domain.Comp. Chem. Eng. 22 (Suppl.), 221228.
[3] Broucke, M., M.D. Di Benedetto, S. Di Gennaro and A. Sangiovanni-Vincentelli (2000). Theory of optimal control using bisimulations. In:Hybrid Systems: Comp. and Control. Vol. 1790 of LNCS. Springer.
pp. 89102.
[4] Shaikh, M.S. and P.E. Caines (2003). On the optimal control ofhybrid systems. In: Hybrid Systems: Comp. and Control. Vol. 2623 ofLNCS. Springer. pp. 466481.
[5] Pena, M., Camacho, E., Pinon, F., & Carelli, S. R. (2005, July).Model predictive controller for piecewise afne system. In
Proceedings of 2005 IFAC World Congress.[6] Causa, J., Karer, G., Nu nez, A., Saez, D., Skrjanc, I., & Zupancic, B.
(2008). Hybrid fuzzy predictive control based on genetic algorithmsfor the temperature control of a batch reactor. Computers & ChemicalEngineering, 32(12), 32543263.
[7] Stursberg, O., and Panek, S. (2002). Control of switched continuoussystems based on disjunctive formulations. Hybrid Systems, 2289:421435.
[8] Camacho, E. F., and Bordons, C. (2004). Model predictive control(2nd edition). Springer Verlag.
[9] Bemporad, A., and Morari, M. (1999). Control of systems integratinglogic, dynamics, and constraints.Automatica, 35: 407427.
[10] Olarua, S., Dumur, D., Thomasb, J., and Zainea, M. (2008).Predictive control for hybrid systems. Implications of polyhedral pre-computations.Nonlinear Analysis: Hybrid Systems, 2:510-531.
[11] Kennedy, J., and Eberhart, R. (1995). Particle Swarm Optimization.Proceedings of the IEEE International Conference on NeuralNetworks, Perth, Australia, pp. 1942-1945.
[12] Kennedy, J., Eberhart, R. (1997). A discrete binary version of theparticle swarm algorithm. Systems, Man, and Cybernetics. IEEEInternational Conference on Computational Cybernetics andSimulation, 5: 4104-4108.
[13] Holland, J. H. (1975). Adaptation in Natural and Articial Systems.MIT Press.
[14] Goldberg DE (1989). Genetic algorithms in search, optimization andmachine learning, Reading, MA: Addison-Wesley Publishing Co.