دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس...

61

Upload: joella

Post on 14-Jan-2016

71 views

Category:

Documents


0 download

DESCRIPTION

دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389. MPC Stability-2. کنترل پيش بين-دکتر توحيدخواه. Example 4.4 . Consider the system:. Δ t = 1, Q = C T C, and R = I; a = 0, N = 5 and Np = 140 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389
Page 2: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

دانشگاه صنعتي اميركبيردانشكده مهندسي پزشكي

استاد درسدكتر فرزاد توحيدخواه

1389بهمن

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

MPC Stability-2

Page 3: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Example 4.4. Consider the system:

Δt = 1, Q = CTC, and R = I; a = 0, N = 5 and Np = 140Integrators are used in the design for disturbance rejection.Compute the solution using the long prediction horizonwith exponential data weight α = 1.2, and modified Qα and Rα. Compare the eigen values and the gain matrices with DLQR solution.

Page 4: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Solution

1- DLQR solution

Riccati matrix PThen, the P is used to obtain matrices Qα and Rα, where γ = 1/α = 0.8333

Page 5: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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

Page 6: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Parameters in the first row of the control gain matrix (α = 1.2). Key: (1) from DLQR; (2) from DMPC

Page 7: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 8: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Example 4.5.

Page 9: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 10: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Solution. The feedback control gain vector K using DLQR program is:

which is identical to the predictive control:

Page 11: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

closed-loop state trajectory

LQR control

Page 12: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 theoptimization 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.

Page 13: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 14: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 15: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Discrete-time MPC with Prescribed Degree ofStability

Page 16: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

For a MIMO system:

For a SISO system:

The closed-loop performance of the MPC is specified byQ 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.

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.

Page 17: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Design Objective

Page 18: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 19: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 20: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Computational Procedure

Page 21: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Computational Procedure (cont.)

Page 22: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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∞

Page 23: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

predictive control gain matrices.

Matab

Page 24: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 25: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

The Relationship Between P∞ and Jmin

Page 26: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

optimal solution:

minimum of the cost function:

Page 27: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Due to the numerical error, Jmin increases as Np increases and is numerically unstable.

Case A. Sufficiently large N is usedthe control trajectory will converge to the underlying optimal control trajectory defined by the discrete-time LQR cost function:

Page 28: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Minimum of this cost function, with optimal control:

With exponential data weighting, in the predictive control, the cost function is:

Page 29: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 30: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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

Page 31: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Solution

PMATLAB dlqr

Page 32: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 33: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 34: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 35: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 36: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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:

Page 37: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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:

Page 38: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

With the original choice of Q and R, and a, N parameters, the Riccati solution Pdmpc is calculated as:

Page 39: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 apair 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.

Page 40: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 41: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 for0 ≤ a ≤ 0.9 where the parameter N = 1 is fixed. The prediction horizon Np = 46 is selected for the computation

Page 42: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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

Page 43: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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

Page 44: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 closed-loop response speed of the predictive control system reduces. There is a performance trend dependent on the variation of α.

Page 45: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Tuning Procedure Once More

Page 46: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 correspondingLQR control law.

Page 47: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

The prescribed degree of stability, λ, is a very important parameter in the specification of closed-loop performance.

First, the weight matrix Q is always important for the closed-loop performance and often selected as:

Tuning procedure:

Q = CTC

With this choice, the closed-loop eigen values aredetermined by the weight matrix R.

Page 48: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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:

Page 49: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 closed-loop response speed.

Page 50: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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).

Page 51: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Using exponential data weighting, the closed loopperformance 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 γ = λ/α

Page 52: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 53: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 54: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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 closed-loop LQR system.

Page 55: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 56: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

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.

Page 57: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Exponentially Weighted Constrained Control

Page 58: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 59: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 60: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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

Page 61: دانشگاه صنعتي اميركبير دانشكده مهندسي پزشكي استاد درس دكتر فرزاد توحيدخواه بهمن 1389

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