Sunteți pe pagina 1din 6

2010IEEEInternationalSymposiumonComputerAidedControlSystemDesign

Partof2010IEEEMultiConferenceonSystemsandControl
Yokohama,Japan,September810,2010

Design and Implementation of Model Predictive Control using


Multi-Parametric Toolbox and YALMIP
Michal Kvasnica and Miroslav Fikar

Abstract The paper introduces a new version of in obtaining the optimal control action u for a particular
the Multi-Parametric Toolbox (MPT), which allows value of x is to pre-compute the optimal solution to a
model predictive control (MPC) problems to be for- given optimization problem for all possible values of the
mulated in an intuitive and user-friendly fashion. In
addition to control synthesis, the toolbox can also state x using parametric programming. For certain types
be employed for stability analysis, verification and of optimization problems it can be shown [1] that the
simulation of MPC-based strategies. The toolbox is optimal control can be found as an explicit function u (x)
also capable of converting MPC controllers into real- mapping the states to the control inputs. This calculation
time executable code which can be easily deployed to is performed o-line and just once. Since the solution
typical hardware control platforms. The most notable
feature of the new version is its ability to formulate can be interpreted as a lookup table, the optimal control
and solve complex MPC problems involving non- action can be obtained by a simple table lookup.
trivial requirements, like logic relations, move block-
ing, or contraction constraints.
In this paper we present a new version of the Multi-
I. Introduction Parametric Toolbox (MPT) [3], which is a MATLAB-
Model predictive control is an attractive control based tool for design, analysis, verification and real-
methodology frequently used in practice and research due time deployment of MPC controllers. For a broad class
to its ability to provide optimal performance while taking of prediction models the toolbox provides an intuitive,
process constraint into account [5]. In their industrial easy to use interface to formulate virtually arbitrary
survey, [6] report successful applications of MPC which MPC setups. Unlike tools like AMPL [2] or YALMIP [4],
are commercially available. MPC is an optimization- which are languages for formulating generic optimization
based approach where the values of control moves are cal- problems, formulating MPC problems in MPT requires
culated by formulating and solving a given optimization significantly less human interaction. This allows control
problem. The optimization utilizes a model of the con- engineers to focus on controller tuning rather than on
trolled plant to predict and optimize its future evolution. mastering optimization skills. One of the main benefits
This allows safety regulations, economic performance or of the new version is that advanced MPC objectives (like
environmental aspects to be incorporated directly into move blocking, obstacle avoidance, stability guarantees,
the control design. etc.) can be easily incorporated into the control design
MPC is usually implemented in a feedback fashion just by few lines of code. Result of MPC synthesis in the
using the receding horizon policy (RHMPC). Here, at Multi-Parametric Toolbox is a controller object, which
each time step, an optimal solution to a given opti- can be post-processed in a number of ways. For instance,
mization problem is computed by assuming the currently the toolbox is able to perform closed-loop simulations
available measurements of the plant state as the initial in Simulink or directly in MATLAB, investigate closed-
condition. This gives a sequence of future predicted loop stability, or analyze whether the controller meets
optimal control moves. Then, the first element of the pre-defined safety and liveness requirements.
sequence is extracted applied back to the plant. The
whole procedure then repeats at subsequent time in-
stants with new initial conditions. Such an approach, As indicated above, for certain types of problems, the
however, requires the optimization problem to be solved optimal solution to a given MPC optimization problem
repeatedly at each time step, which induces significant can be pre-computed and stored as a lookup table. The
computational burden. If the sampling time decreases, new version of the Multi-Parametric Toolbox not only
or if less powerful control platforms are employed to provides numerically robust algorithms for construction
perform the optimization on-line, additional care has to of such tables but, more importantly, provides means for
be taken to respect the hard real-time constraints. One converting such tables into a real-time executable code.
approach to decrease the computational burden involved Therefore the toolbox can also be used to directly deploy
MPC controllers to target control platforms. By au-
Authors are with the Institute of Information Engineering, Au- tomating heavy computation and code generation tasks,
tomation, and Mathematics, Faculty of Chemical and Food Tech-
nology, Slovak University of Technology in Bratislava, Slovakia; the toolbox allows for a considerably simpler control
{michal.kvasnica,miroslav.fikar}@stuba.sk design for real-life applications.

9781424453559/10/$26.002010IEEE 999
II. Theoretical Background the optimal control sequence UN (x(t)) is calculated by
We consider the class of discrete-time, time-invariant assuming x(t) as the initial condition for problem (5).
systems given by the state-space representation Subsequently, only the first element of the sequence is
extracted, i.e. u0 (x(t)) = [I, 0, . . . , 0]UN and u0 (x(t)) is
x(t + 1) = f (x(t), u(t)), (1) fed back to the plant. The whole procedure then repeats
where x(t) is the state vector at time t, x(t + 1) is the at subsequent time instants ad infinitum. This introduces
successor state, u(t) denotes the control input. Moreover, feedback into the scheme.

f ( , ) is the state-update function which depends on the As explained in the introduction, numerical values of
UN can be obtained by solving (5) as a corresponding
type of the model, which can either describe a linear
time-invariant (LTI) system with LP/QP/MILP/MIQP problem on-line at each sampling
time for a particular value of x(t). An alternative is to
f (x(t), u(t)) = Ax(t) + Bu(t), (2) pre-calculate the optimal solution to all possible values
or a Piecewise Ane (PWA) system with of the initial condition x(t):
!
x(t)
" Theorem 2.1 ([1]): Consider the MPC optimization
f (x(t), u(t)) = Ai x(t) + Bi u(t) + fi if u(t) Di , (3)
problem (5) with f ( , ) in (5c) being either linear as
where the state-update matrices change according to in (2), or piecewise ane as in (3). Then the optimizer
the position of the !state-input vector, i.e. the tuple UN (x(t)) is a piecewise ane function of x(t), i.e.
"
x(t)
(Ai , Bi , fi ) is valid if u(t) Di , where Di , i = 1, . . . , D UN (x(t)) = Fi x(t) + Gi , x(t) Ri (6)
are polyhedral regions of the state-input space. Further-
more, it is assumed that the system variables are subject where dierent feedback gains Fi , Gi switch depending
to constraints on which region Ri = {x(t) | Hi x(t) Ki }, i =
1, . . . , Nreg , contains the state x(t).
x(t) X , u(t) U, t 0, (4) Theorem 2.1 suggests that the RHMPC feedback
where X and U are convex polyhedral sets. UN (x(t)) can be constructed o-line and stored as a
In MPC, optimal control actions are calculated by lookup table, which consists of the regions Ri and the
formulating and solving a suitable optimization problem, associated feedback gains Fi , Gi . The advantage of such
which usually takes the following form: an approach is that value of UN (x(t)) for a particular
N 1 value of x(t) can be obtained by simply evaluating the ta-
ble, as captured by Algorithm 1. The algorithm traverses
#
min PN xN p + Qxk p + Ruk p (5a)
UN
k=0
s.t. x0 = x(t), (5b) Algorithm 1 Sequential table traversal
xk+1 = f (xk , uk ), k = 0, . . . , N 1 (5c) INPUT: Regions Ri , feedback laws Fi , Gi , number of
regions Nreg , state measurement x(t)
xk X , k = 0, . . . , N (5d) OUTPUT: Optimal RHMPC control input u0 (x(t))
uk U, k = 0, . . . , N 1 (5e) 1: for r = 1, . . . , Nreg do
where xk and uk denote, respectively, the state and input 2: if Hr x(t) Kr then
predictions at time instants t + k, initialized by the 3: UN (x(t)) = Fr x(t) + Gr
measurements of the current state x(t), and PN , Q, R 4: u0 (x(t)) = [I, 0, . . . , 0]UN (x(t))
are penalty matrices. The prediction is carried out over 5: return u0 (x(t))
a finite prediction horizon N . In addition, P zp with 6: end if
p = 2 stands for the square of the weighted 2-norm of z, 7: end for
i.e. z T P z. Similarly, p = 1 and p = denote the 1- and
-norms of some vector. through the regions sequentially, stopping once it finds
The aim of MPC is to find the vector UN := a region which contains x(t). In such case the optimal
[uT0 , uT1 , . . . , uTN 1 ]T of optimal control inputs which min- control action is calculated by evaluating the correspond-

imizes the cost function (5a). If f ( , ) in (5c) is linear ing control law and returned back. Clearly, in the worst
as in (2), the MPC formulation can be rewritten as a case, the algorithm has to search through all regions.
Quadratic Program (QP) if p = 2, or as a Linear Program But since the operations performed in Steps 24 only
(LP) if p {1, }. Finally, if the predictions in (5c) are consist of simple matrix multiplications and additions,
governed by a PWA system, the optimization problem for a large class of problems running Algorithm 1 is faster
can be stated as a mixed integer QP (MIQP) for p = 2, compared to obtaining u0 (x(t)) by solving (5) on-line
or as a mixed integer LP (MILP) for p = 1 or p = , as an LP/QP/MILP/MIQP using o-the-shelf solvers.
see e.g. [1]. The second benefit is that the explicit representation
MPC is usually implemented in the receding horizon of the feedback law allows to further analyze and post-
(RHMPC) fashion. At each sampling instant t, measure- process the MPC controller. For instance, as will be
ments (or estimates) of x(t) are obtained first. Then, shown in the next section, lookup table-styled controllers

1000
allow stability of the closed-loop system to be rigorously
analyzed by searching for a certain types of Lyapunov
functions.
III. MPC Design with the Multi-Parametric
Toolbox
MPT is a MATLAB-based toolbox which allows for
Fig. 1. MPT controller block in Simulink.
user-friendly design, simulation, analysis, and deploy-
ment of MPC-based controllers. Control design is di-
vided into two intuitive steps. At first, the model of If the ctrl object denotes an explicit MPC controller,
the plant is entered either in the LTI form (2) or as the optimal control action u is calculated by traversing
a PWA system (3). We will illustrate the procedure on the lookup table. For the example above, the MPT
the double integrator example given by the state-space implementation of Algorithm 1 only takes 2 miliseconds
representation x(t + 1) = [ 10 11 ] x(t) + [ 0.5
1 ] u(t), which is
to execute.
subject to constraints 5 x(t) 5, 1 u(t) 1. The If, on the other hand, the object represents an on-
plant model can then be entered using the command-line line MPC controller, the optimal control input is ob-
interface: tained by solving (5) as an optimization problem (in
>> model.A = [1 1; 0 1]; model.B = [1; 0.5]; this case an LP) with x being its initial condition.
>> model.C = eye(2); model.D = zeros(2, 1); MPT toolbox is shipped with several freely available
>> model.xmin = [-5; -5]; model.xmax = [5; 5]; LP/QP/MILP/MIQP solvers to perform this task with-
>> model.umin = -1; model.umax = 1; out further eort from the users. Clearly, as solving the
optimization problem is more dicult compared to a
With the prediction model at hand, the user then simple table lookup, execution of the u = ctrl(x) took
defines parameters of the MPC optimization problem (5): 50 miliseconds.
the prediction horizon N , penalty matrices PN , Q, R and
the norm p: A. Closed-loop simulations
>> problem.N = 3; MPT provides several functions to perform closed-loop
>> problem.P_N = [1 0; 0 1]; simulations of MPC-based controllers. The most general
>> problem.Q = [1 0; 0 1]; approach is to use the specially crafted Simulink block,
>> problem.R = 1; which allows MPC controllers to be used for virtually
>> problem.norm = 1; % can be 1, 2, or Inf any type of simulations. A screenshot of such a block is
shown in Figure 1 where the controller is connected in
Finally, the MPC controller is synthesized. To solve (5) a feedback fashion. The Simulink block supports both
explicitly for all possible initial conditions, one would call explicit as well as on-line MPC controllers.
>> ctrl = mpt_control(model,problem,explicit) Another option is to use command-line interfaces,
which perform closed-loop simulations according to the
For the double integrator example and the MPC setup receding horizon principle described in Section II:
as above, the MPT toolbox constructed the explicit
representation of UN as a function of x(t) (cf. (6)) in >> [X, U] = sim(ctrl, simmodel, x0, Tsim)
just 0.9 seconds1 , generating 50 regions. If, instead, the >> [X, U] = simplot(ctrl, simmodel, x0, Tsim)
aim is to design an on-line MPC controller, the calling The sim function takes a controller object (representing
syntax is either an explicit or an on-line MPC controller), the
>> ctrl = mpt_control(model,problem,online) simulation model, the initial condition, and the number
of simulation steps as the inputs and provides closed-loop
In both cases the result is stored in the ctrl variable, evolution of system states and control actions as the out-
which represents an MPC controller object. The object- put. The simplot function behaves in a similar fashion,
oriented philosophy of the Multi-Parametric Toolbox but, in addition, generates a graphical plot of the closed-
then allows to process the ctrl object in a number of loop trajectories as can be seen in Figure 2. Note that
ways. The basic one is to ask the controller to provide the the simulation model simmodel can be dierent from the
optimal value of the control action u0 for a given initial prediction model used to design the MPC controller. This
condition x(t). In MPT, the controller object behaves allows to verify the controllers performance in situations
as a function, which allows for the following intuitive with model-plant mismatch.
syntax:
B. Analysis and post-processing
>> x = [-4; 1]; % measured state
>> u = ctrl(x); % evaluation of the controller Multi-parametric toolbox allows explicit MPC con-
trollers to be analyzed and post-processed in a number of
1 2.4 GHz CPU, 2GB RAM, MATLAB 7.4, MPT 2.6.2 ways. For instance, one can visually inspect the regions of

1001
Evolution of states Evolution of outputs
1
x1
1
y1
to be traversed using low computational power. This
0 x
2 0 y
2 makes the approach of high practical relevance when ap-
1 1
plying MPC to systems with fast dynamics using low-cost

Outputs
States

2 2
hardware. To push into this direction, the MPT toolbox
3 3
can automatically generate real-time executable C-code
4
0 10 20
Sampling Instances
30
4
0 10 20
Sampling Instances
30 version of Algorithm 1. The export can be initiated by
Evolution of control moves Active dynamics
calling
1 2
u
1

0.5 1.5
>> mpt_exportC(ctrl, target_filename)
Dynamics

The function generates the files target_filename.c and


Inputs

0 1

0.5 0.5
target_filename.h which will contain, respectively, the
1 0
table evaluation code and the table data (the regions Ri
0 10 20
Sampling Instances
30 0 10 20
Sampling Instances
30
and the feedback gains Ki and Li , cf. (6)). The code can
be subsequently linked to any application written in the
Fig. 2. Closed-loop simulation using the simplot function. C language.
Another option is to use the Real-Time Workshop
Controller partition with 50 regions. Value of the control action U over 50 regions

4
1
(RTW), which is a de-facto standard code generation tool
3 supporting dierent types of digital signal processors and
1
2

1 0.5
other CPUs. MPT provides a RTW-compatible C-code
implementation of the Algorithm 1, which makes code
2

0
x

U (x)

0
1
*

2
0.5 generation and deployment a single click operation. To
3 1
5 2
4
use this option, the controller is first embedded into the
0
4

5 4 3 2 1 0 1 2 3 4 5
0

5
4
2

x
2
Simulink environment using a provided block as shown
(a) Regions of the lookup ta-
x
1

(b) Graphical representation


x
1
in Section III-A. The block is subsequently connected to
ble consisting of 50 regions. of the PWA function signals from A/D and D/A converters to close the control
UN (x(t)). loop. Then, one simply clicks on the respective icon in
Fig. 3. Regions of the lookup table for the double integrator.
the Simulink window to initiate RTW, which compiles
the overall control scheme including the lookup table and
then automatically downloads it to any supported target
the lookup table by calling plot(ctrl), and to visualize CPU.
the PWA representation of the explicit representation of
UN (x(t)) by plotu(ctrl). Results generated by these IV. Advanced MPC using MPT and YALMIP
two commands for the double integrator example are In the previous section we have shown how to formu-
shown in Figure 3. late, solve, analyze and deploy MPC controllers using
The toolbox also allows to conduct closed-loop sta- the MPT toolbox. The control design was based on
bility analysis by calculating various types of Lyapunov two main input objects the model structure, which
functions, perform forward reachability analysis and in- contains information about the system dynamics, and
variant set computation, or to verify safety and liveness the problem structure, which defined parameters of the
properties of a given MPC controller. If the controller MPC optimization problem (5).
look-up is very complex, its on-line evaluation using Although intuitive and easy to use, the command-line
Algorithm 1 can take too long. In such cases, using interface outlined in Section III only allows for basic
the function mpt_searchTree, the toolbox can calculate MPC design. In particular, the MPC problem to be
binary search trees [7] which can replace Algorithm 1 formulated and solved can only be adjusted by changing
and speed up the table traversal process. An another the prediction horizon or the penalty matrices in (5a).
alternative to cope with complexity is to merge together In this section we describe a new addition to the Multi-
regions which share the same control laws. Such a merg- Parametric Toolbox which allows more advanced MPC
ing procedure is provided by the mpt_simplify function. setups to be formulated easily and with low human eort.
C. Code generation and deployment The new framework for advanced model predictive
control utilizes the YALMIP package, which is a versatile
As discussed in Section II, if the MPC problem (5)
modeling language for construction of generic optimiza-
is solved o-line and the explicit representation of the
tion problems in MATLAB. The design procedure goes
feedback law UN (x(t)) is obtained as a lookup table, the
as follows. First, given the model and problem struc-
optimal control action can be obtained at each sampling
tures, MPT formulates the basic MPC problem (5) using
instant by Algorithm 1. As the algorithm only performs
YALMIP symbolic decision variables by a single function
trivial arithmetic operations, it can be implemented us-
call:
ing any high- or low-level programming language. Sim-
plicity of the individual operations also allows the table >> [C, obj, V] = mpt_ownmpc(model, problem)

1002
which returns constraints (5c)(5e) in the variable C and B. Time-varying constraints
the objective function (5a) in obj formulated using sym- In the optimization problem (5), constraints (5d)
bolic variables V.x and V.u. These variables represent and (5e) are time-invariant. To make these constraints
the prediction of systems states and inputs through the time-varying, one can exploit the fact that the symbolic
finite horizon N stored as cell arrays, i.e. V.x{k} denotes decision variables V.x and V.u are stored as cell arrays
xk1 , and V.u{k} stands for uk1 for some index k. indexed by the prediction index k:
Subsequently, the user can modify the MPC problem
by adding or custom constraints and/or by changing the >> C = C + [-5 <= V.x{1} <= 5]
objective function. To illustrate this concept, consider >> C = C + [-6 <= V.x{2} <= 6]
again the double integrator example of the previous >> C = C + [-1 <= V.x{3} <= 1]
section. The closed-loop profile of control actions shown Such a construction will force the predicted states to stay
in the lower left of Figure 2 reveals an abrupt change within of given time-varying bounds.
of the control signal from u = 0.8 to u = 0 at time
instant t = 2. Such a large change can be mitigated, for C. Move Blocking
instance, by adding a constraint which only allows the Move blocking is a popular technique frequently used
control signal to change by a certain quantity (say by to reduce complexity of MPC optimization problems by
0.5) from step to step. This can be achieved by adding eliminating some degrees of freedom from the sequence
the constraints 0.5 (uk uk+1 ) 0.5 to the MPC UN = [uT0 , uT1 , . . . , uTN 1 ]T . In practice, usually three
setup (5). In MPT, this is achieved by using a standard types of move blocking are used:
YALMIP syntax: 1) Keeping first Nc moves u0 , . . . , uNc free and fixing
>> C = C + [-0.5 <= V.u{k} - V.u{k+1} <= 0.5] the remained uNc +1 = uNc +2 = uN 1 = 0. This
can be achieved by
with k = 1 : N . More examples of constraint modification >> C = C + [V.u(Nc+1:N-1) == 0]
are presented in the sequel.
2) First Nc moves are free, while the remaining control
Once completed, modified constraints and perfor-
moves are driven by a state feedback u = Kx, i.e.
mance objective are passed back to MPT, which converts
uNc +k = Kxk , k = 1, . . . , N Nc 1:
them into a valid controller object:
for k = Nc+1:N-1
>> ctrl = mpt_ownmpc(model, problem, ... C = C + [V.u{k} == K*x{k}]
C, obj, V, type) end
If the object should represent an on-line MPC controller, 3) Introduce blocks of control moves which are to stay
then type=online. If type=explicit, then an ex- fixed, e.g. u0 = u1 = u2 and u3 = u4 :
plicit representation of the solution to the optimization >> C=C+[V.u{1}==V.u{2}]+[V.u{2}==V.u{3}]
problem represented by constraints C and objective obj >> C=C+[V.u{4}==V.u{5}]
is precomputed for all possible initial conditions and The optimal values of u0 and u3 obtained by solving
stored as a lookup table. In both cases the ctrl variable the corresponding optimization problems then pre-
represents a valid controller object, which can be further determine the values of u1 , u2 , and u4 .
post-processed or deployed as real-time executable code
as illustrated in the previous section. D. Contraction Constraints
In the sequel we present several examples illustrating Another way of achieving closed-loop stability is to
how the concept of adding new constraints can be used incorporate a contraction constraint xk+1 p xk p ,
to achieve typical control tasks. which requires the controller to push the predicted states
towards the origin with some fixed decay rate 0 1:
A. Terminal Constraints
for k = 1:N-1
One way of ensuring that the MPC controller will C=C+[norm(V.x{k+1},1) <= a*norm(V.x{k},1)]
provide closed-loop stability is to add a terminal state end
constraint xN = 0. This requirement can be easily added
to the set of constraints by Notice, however, that norm constraints are nonconvex
and the resulting optimization problem will contain
>> C = C + [V.x{end} == 0] binary variables, having negative impact on the time
where V.x{end} represents the final predicted state xN . needed to solve the optimization problem.
Another option is to use terminal set constraints, i.e. E. Logic Constraints
to require that xN T for some polyhedral set T =
{x | Hx K}. This type of constraints can also be Constraints involving logic implication and equivalence
introduced easily by can be also formulated and automatically translated to a
corresponding mixed-integer representation by YALMIP.
>> C = C + [H*V.x{end} <= K] Take again the double integrator example of the previous

1003
Controller partition with 111 regions. Value of the control action U over 111 regions Controller partition with 115 regions. Value of the control action U over 115 regions
1 1

4 4

3 3

1 1
2 2

1 0.5 1 0.5
2

2
0 0
x

x
U (x)

U (x)
0 0

1
*

*
1 1
0.5 0.5
2 2
4 4
3 1 3 1
5 2 5 2
0 0
4 0 2 4 0 2
4 4
5 x 5 x
5 4 3 2 1 0 1 2 3 4 5 2 5 4 3 2 1 0 1 2 3 4 5 2
x1 x x1 x
1 1

(a) Regions of the lookup ta- (b) PWA function u0 (x(t)). (a) Regions of the lookup ta- (b) PWA function u0 (x(t)).
ble consisting of 111 regions. Notice that the control ac- ble consisting of 115 regions. Notice that the control ac-
tion stays within the interval tion stays within the interval
(0.5, 0.5) if 1 x(t) 1. (0.5, 0.5) if and only if 1
x(t) 1.
Fig. 4. Visualization of the lookup table for the control setup
with the one-way logic implication constraint (1 x(t) 1) Fig. 5. Visualization of the lookup table for the control setup with
(0.5 u0 0.5). the login equivalence constraint (1 x(t) 1) (0.5 u0
0.5).

section. The explicit representation of the feedback law


for such an example is shown in Figure 3. In order to a real-time executable code. In addition, we have shown
make the controller less aggressive, one can require the how YALMIP can be used in the MPT framework to for-
first optimal control move to satisfy 0.5 u0 0.5, mulate complex constraints in an intuitive fashion. The
but this constraint should only be imposed if the state is new version of the toolbox is available at the projects
contained in a small box around the origin. If the state web site http://control.ee.ethz.ch/~ mpt.
is outside of this interval, the control action is to respect Acknowledgments
1 u0 1, which is the default constraint already
The authors are pleased to acknowledge the financial
contained in the model structure. To formulate such a
support of the Scientific Grant Agency of the Slovak
control goal with MPT, one can make use of the implies
Republic under the grants 1/0071/09 and 1/0537/10.
operator YALMIP provides:
This work was supported by the Slovak Research and
>> C = C + [implies(H*V.x{1} <= K, ... Development Agency under the contracts No. VV-0029-
-0.5 <= V.u{1} <= 0.5)] 07 and No. LPP-0092-07. This contribution is the partial
result of the Research & Development Operational Pro-
where H=[eye(2); -eye(2)] and K=[1;1;1;1]
$ % repre- gramme for the project Support of Center of Excellence
sent the area of interest, i.e. the box 1 1
1 x(t) [ 1 ]. for Smart Technologies, Systems and Services, ITMS
When such a constraint is added to the control setup,
26240120005, co-funded by the ERDF.
an explicit MPC controller can be calculated by ctrl =
mpt_ownmpc(model, problem, C, obj, V) as a lookup References
table. Regions of the table and a PWA representation of [1] F. Borrelli. Constrained Optimal Control Of Linear And
the optimal feedback law are depicted in Figure 4. Hybrid Systems, volume 290 of Lecture Notes in Control and
Information Sciences. Springer, 2003.
Notice that the implies operator only works one way, [2] Robert Fourer, David M. Gay, and Brian W. Kernighan.
i.e. if x(t) is in the box delimited by Hx(t) K, then AMPL: A Modeling Language for Mathematical Programming.
0.5 u0 0.5 will hold. To restrict the control action The Scientific Press (now an imprint of Boyd & Fraser Publish-
ing Co.), Danvers, MA, USA, 1993.
to stay within of these limits if and only if x(t) is in the [3] M. Kvasnica, P. Grieder, and M. Baotic. Multi-Parametric
box, the iff operator can be used: Toolbox (MPT), 2004. Available from http://control.ee.ethz.
ch/mpt/.
>> C = C + [iff(H*V.x{1}<=K,-0.5<=V.u{1}<=0.5)] [4] J. Lofberg. YALMIP : A Toolbox for Modeling and Optimiza-
tion in MATLAB. In Proc. of the CACSD Conference, Taipei,
The lookup table corresponding to such a constraint Taiwan, 2004. Available from http://control.ee.ethz.ch/joloef/
modification is visualized in Figure 5. yalmip.php.
[5] J. M. Maciejowski. Predictive Control with Constraints. Pren-
tice Hall, 2002.
V. Conclusions [6] S. Qin and T. Badgwell. An overview of industrial model predic-
A new version of the Multi-Parametric Toolbox was tive control technology. Chemical Process Control, 93(316):232
256, 1997.
presented in this paper, which allows for a user-friendly [7] P. Tndel, T.A. Johansen, and A. Bemporad. Evaluation of
synthesis, analysis and post-processing of MPC-based piecewise ane control via binary search tree. Automatica,
controllers. We have shown that the toolbox is able to 39(5):945950, 2003.
synthesize on-line MPC strategies, where the given op-
timization problem is solved at each time step. Alterna-
tively, MPT can also pre-compute the explicit represen-
tation of the feedback law and store it as a lookup table,
which can subsequently be automatically translated into

1004

S-ar putea să vă placă și