کنترل پيش بين-دکتر توحيدخواه

‫دانشگاه صنعتي اميركبير‬
‫دانشكده مهندس ي پزشكي‬
‫‪MPC Stability-2‬‬
‫استاد درس‬
‫دكتر فرزاد توحيدخواه‬
‫بهمن ‪1389‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Example 4.4. Consider the system:
Δt = 1, Q = CTC, and R = I; a = 0, N = 5 and Np = 140
Integrators are used in the design for disturbance
rejection.
Compute the solution using the long prediction horizon
with exponential data weight α = 1.2, and modified Qα
and Rα. Compare the eigen values and the gain matrices
with DLQR solution.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Solution
1- DLQR solution
Riccati matrix P
Then, the P is used to obtain matrices Qα and Rα,
where γ = 1/α = 0.8333
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
The new Qα and Rα matrices are used in the design of
discrete-time model predictive control with exponential
data weighting.
Closed-loop eigen values
(α = 1.2). Key: (1) from
DLQR; (2) from DMPC
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Parameters in the first row of the control gain matrix
(α = 1.2). Key: (1) from DLQR; (2) from DMPC
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Results are seen to be identical to each other;
the condition number of the Hessian matrix is 475. In
contrast, without exponential weighting, the condition
number of the Hessian matrix is 44607, and the
numerical solution is ill-conditioned.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫‪Example 4.5.‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Without constraints, illustrate the equivalence within
one optimization window between LQR (scaled) and
the exponentially weighted predictive control. In
addition, show that when receding horizon control is
applied, the closed-loop control systems are identical.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Solution. The feedback control gain vector K using
DLQR program is:
which is identical to the predictive control:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
closed-loop state trajectory
LQR control
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Numerical results show identical results between the
transformed variables in DLQR system and the predictive
control system within one optimization window.
Because predictive control uses the principle of
receding horizon control, at j = 0 the first sample of the
optimization window, the weight factor α0 is unity. Thus,
the unconstrained control should be completely
identical to the optimal LQR solution when receding
horizon control is applied.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Discrete-time MPC with Prescribed Degree of
Stability
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
For a SISO system:
The closed-loop performance of the MPC is specified by
Q and R matrices when a sufficiently large prediction
horizon and a large N are used in the design. So often,
we select Q = CTC to minimize the output errors, and R
is used to tune the closed-loop response speed.
For a MIMO system:
time consuming to tune the closed-loop performance
using the Q and R
it may be desirable to have the closed-loop eigen
values within a prescribed circle on the complex plane.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫‪Design Objective‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫‪Computational Procedure‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Computational Procedure (cont.)
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Example 4.6.
In Example 4.4, with identical design specifications
except that the degree of stability λ is chosen to be
0.9, namely all closed-loop eigen values are specified
to be within the circle of radius 0.9.
Solution
With the prescribed degree of stability λ = 0.9, and the
weight matrices Q and R, together with the augmented
state model (A,B) we solve the following steady-state
algebraic Riccati equation to find P∞
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
predictive control
gain matrices.
Matab
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
The Relationship Between P∞ and Jmin
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
optimal solution:
minimum of the cost function:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Due to the numerical error, Jmin increases as Np
increases and is numerically unstable.
Case A. Sufficiently large N is used
the control trajectory will converge to the underlying
optimal control trajectory defined by the discretetime LQR cost function:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Minimum of this cost function, with optimal control:
With exponential data weighting, in the predictive
control, the cost function is:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Example 4.7. Consider the system:
compute the solution using the long prediction horizon
with exponential data weight
Compare the relative errors of the diagonal elements
between Riccati solution P∞ and the matrix Pdmpc
when N1 = N2 = 6 and N1 = N2 = 8
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫‪Solution‬‬
‫‪P‬‬
‫‪MATLAB dlqr‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
Therefore, with an increasing N, the relative errors
between the diagonal elements of these two matrices
are reduced. Furthermore, by choosing x(ki) being a
vector containing unity elements, the minimum of the
cost function is evaluated. For LQR, Jmin = 11.0811,
and for the discrete-time MPC when a1 = a2 = 0.0,
N1 = N2 = 8, Jmin = 11.0812.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Case B. Relatively small N is used
1- Smaller N not converge to the optimal control trajectory
defined by (Q,R).
2- N sufficiently large as the global optimum. Smaller N
could be termed a truncated approximation to the global
optimum. There is only one global optimal solution once Q
and R are selected. However, there are many
approximations to the optimal solutions depending on the
selection of the parameters a and N in the Laguerre
functions.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
3- They provide the user with the means to select
the closed-loop performance that might be
desirable in a specific application. More explicitly,
once Q and R are selected, the parameters a and
N are used as fine-tuning parameters for the
closed-loop performance. This is particularly useful
when dealing with a complex system, where the
variations of a and N are selected for each input
independently to find the desired closed-loop
performance.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
An approximation to the global optimal solution could
also be interpreted as a global optimal solution on its
own for a pair of weight matrices ˜Q and ˜R which are
unknown, also different from the original Q and R.
For known a and N, cost function is:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
With restricted a and N, Jmin is different from the global
minimum, and the optimal control is different from the
LQR optimal control defined by the pair (Q,R).
Therefore, for a restricted pair of a and N parameters,
there is a pair of unknown weight matrices Q and R (˜Q
and ˜R) defining a different cost function. We find out
what they are:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
With the original choice of Q and R, and a, N
parameters, the Riccati solution Pdmpc is calculated as:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
This means that by choosing a restricted pair of a and
N parameters, the predictive control system is
equivalent to a discrete-time LQR system with a
pair of weight matrices ˜Q and ˜R.
For a small N, the closed-loop predictive control
system is stable if Pdmpc is positive definite and ˜Q is
non-negative definite.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
If Pdmpc is equal to P∞ from the original cost function
using LQR design, then ˜Q = Q, thus there is no change
in the cost function.
However, if Pdmpc differs from P∞, then equivalently a
different LQR problem is solved using the predictive
control framework, with the pair ˜Q and ˜R .
Additionally, the prescribed degree of stability λ can be
effectively enforced with an arbitrary pair of a and N,
without ˜Q entering the computation and its existence is
for theoretical justification and for understanding the
essence of the problem in relation to the existing
discrete-time LQR design.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Example 4.8.
Choosing Q = CTC, and R = 0.1, α = 1.2 as the design
parameters, show the variation of closed-loop
performance by varying the Laguerre pole a for
0 ≤ a ≤ 0.9 where the parameter N = 1 is fixed. The
prediction horizon Np = 46 is selected for the
computation
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Solution
A unit step response test is used with zero initial condition
of the state variables
α = 0, 0.3, 0.6, 0.9
N = 1,
Compare the closed-loop control results with the results
obtained using DLQR
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Tuning of predictive control system (N = 1, varying a). Key: line (1) DLQR
control; line (2) α = 0; line (3) α = 0.3; line (4) α = 0.6; line (5) α = 0.9
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Closed loop predictive control system is stable for the
range of a used in the design.
Furthermore, the optimal DLQR system offers the
fastest rise time and slight over-shoot.
For this particular system, as α increases, the closedloop response speed of the predictive control system
reduces. There is a performance trend dependent on
the variation of α.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫‪Tuning Procedure Once More‬‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
With exponential data weighting, the closed-loop
performance parameters are very similar to the DLQR
performance parameters.
Basically, the choice of weight matrices Q and R determines
the closed-loop performance.
The prediction horizon Np no longer plays a role in the
design, because α large Np is used to approximate an
infinite prediction horizon.
For a choice of large N, with any 0 ≤ a < 1, the trajectory of
the future control trajectory converges to the underlying
optimal control trajectory defined by the corresponding
LQR control law.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
The prescribed degree of stability, λ, is a very important
parameter in the specification of closed-loop performance.
Tuning procedure:
First, the weight matrix Q is always important for the
closed-loop performance and often selected as:
Q = CTC
With this choice, the closed-loop eigen values are
determined by the weight matrix R.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
For SISO and R = rw, the closed-loop eigen values are
the inside-the-unit-circle zeros of the equation:
For MIMO and Q = CTC, and R = rwI, the closed-loop
eigen values are the inside-the-unit-circle zeros of the
equation:
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Varying the scalar rw
set closed-loop eigenvalues
A more general case:
Q = CTQyC, where Qy > 0, R > 0
are the diagonal weight matrices.
The smaller elements in R corresponds to faster closedloop response speed.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Next, the exponential weight factor α needs to be
specified.
Use of the exponential weight will avoid the numerical
ill-conditioning problem for the class of MPC systems
that have embedded integrators.
If the plant is stable, any α > 1 will serve this purpose.
A modest α is recommended when dealing with
constraints (e.g., α = 1.1 is sufficient for the class of
stable plants or plants with integrators).
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Using exponential data weighting, the closed loop
performance requires to be compensated so that the
original targeted performance by Q and R remains
unchanged. This compensation is simply achieved by
using:
If desired, α prescribed degree of stability λ can also
be embedded at this stage, where the value of γ is
selected to be γ = λ/α
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
With Q, R and λ chosen, the closed-loop performance
of the predictive control system is determined. This
closed-loop performance will be achieved when the
number of terms in the Laguerre functions is selected
to be large.
How large is dependent on the selection of the scaling
factor a. The pair of a and N is used as fine-tuning
parameters for the closed-loop performance.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Summary
1. Select Q = CTQyC and R, where Qy ≥ 0, R > 0 are
diagonal.
A larger element in Qy means a faster response
from that particular output, while a larger element in
R means less control action required from that
particular control signal.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
2. Specify an α > 1 to ensure numerical stability and a λcircle in which all the closed-loop poles of the predictive
control system are to reside.
3. Use a large prediction horizon Np to approximate the
infinite horizon control case, and set the Laguerre
function order N to be a large value, and the Laguerre
pole a to be close to the dominant pole of the closedloop LQR system.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
4- Calculate the Ω and Ψ in the cost function of the
predictive control system:
5. Increase the Laguerre function order N until the
closed-loop performance has no further change. This is
the predictive control system that is identical to the
DLQR system with a prescribed degree of stability.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
6. If we wish to fine-tune the closed-loop performance,
we could reduce the Laguerre function order N to find
the approximations to the optimum. We could also
perturb the Laguerre pole a to vary the closed-loop
performance for some small N. These variations are
equivalent to different choices of Q matrix.
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
Exponentially Weighted Constrained
Control
‫دکترتوحيدخواه‬-‫کنترل پيشبين‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬
‫کنترل پيشبين‪-‬دکترتوحيدخواه‬