Levine

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

Model Predictive Control Under Uncertainty:

Theory, Computations and Applications

Conventional Model Predictive Control

William S. Levine
University of Maryland, College Park

First Chinese MPC School,


July, 2021
Outline

Motivation
Intuition
Basic Model Predictive Control (MPC)
The Linear Quadratic Regulator (LQR)
Dealing with Constraints
Stability

MPC with Exogenous Inputs


Tracking
Mismodeling and Bounded Disturbances
Noise

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 1
Part

Motivation

Intuition

Basic Model Predictive Control

MPC with Exogenous Inputs

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 2
Motivation

Changes in technology offer great opportunities for new and improved


control systems.
Computationally intensive controllers are virtually free
There is a computer in the control loop anyway.
Why not use it to improve the control.
MPC does exactly that–it uses extensive computation to improve the
control.

Systems with many inputs and outputs are becoming more common
because of cheap communications and sensors.
Example: The new synchrotron at Brookhaven National Laboratories
has 120 sensors, 180 actuators, and 792 meter circumference.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 3
Slide from a talk by Joao Hespanha

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 4
Computation, Communication, and Sensing are Cheap and
Ubiquitous

Implications for control


The technology has changed dramatically.
As control engineers, we should be exploiting this new technology to
improve controllers.
Some engineers are already exploiting the new technology.

A simple example: A servomotor control may now include both an


internal current control loop (PI) and a PID controller. Both include
auto-tuners.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 5
Part

Motivation

Intuition

Basic Model Predictive Control

MPC with Exogenous Inputs

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 6
Intuition–From Chess
Start by projecting N moves into the future.
It is impossible to project all the way to the end.

Choose the best (optimal) move based on this projection.


It is hard to find a good performance measure.
A particular issue is robustness versus speed.
Do you want to achieve the least bad position or the best likely
position?
It can be very hard to choose the optimal move even though the
prediction is perfect.
Repeat this entire process after your opponent moves.
If your opponent made an expected (accounted for) move the new
projection may be easier.
As the game progresses, both the prediction and the performance
measure change.
The end game is completely deterministic.
It is optimizable by Dynamic Programming.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 7
Part

Motivation

Intuition

Basic Model Predictive Control

MPC with Exogenous Inputs

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 8
Basic Concepts of MPC
At t = 0 project N time steps into the future.
All practical MPC is in discrete time.
Choose the optimal control based on this projection.
It is hard to find a good performance measure.
A particular issue is robustness versus performance.
Do you want to achieve the least bad (best worst case) or the best
expected (average) performance?
It can be very hard to find the optimal move even though the
prediction is perfect.
Repeat this entire process at the next discrete time, WLOG t = 1.
As in Chess, it is reasonable to believe that the result of this iterative
scheme is close to the best possible (optimal), especially for large N.
Because it is close to optimal, it is reasonable to expect that the
closed-loop system will be stable.
Neither of these properties always holds.
Precise conditions to guarantee them are needed.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 9
A Brief (and biased) History Lesson

In the 1960’s there were three main themes in control theory research.

Optimal Control Theory.


The basic theory (the maximum principle) produced an open loop
optimal control.
Computing the optimal control was often difficult.
There was debate about whether to discretize time and then solve or to
solve first.
Dynamic Programming.
The curse of dimensionality.
Try to eliminate unpromissing possibilities (as in Chess).
Nonlinear stability theory.
Development and refinement of Lyapunov stability theory.
Development of nonlinear versions of controllability, observability, poles
and zeros.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 10
The Discrete-Time Linear Quadratic Regulator

This was, and is, in some respects the coolest theoretical result from
the 1960’s.
Understanding it, in all its details, is fundamental to understanding
basic MPC.
The discrete-time linear time-invariant dynamics are
x(k + 1) = Ax(k) + Bu(k), where x(0) = ξ and k = 0, 1, 2, ... (1)
A is an n × n real matrix and B is an n × m real matrix.
x(k) is the state at time k and u(k) is the control at time k.

The performance measure (to be minimized) is



1X T
J(u[0,∞) ) =(x (k)Qx(k) + u T (k)Ru(k)) (2)
2 0
where Q ≥ 0 is an n × n real symmetric matrix and R > 0 is an m × m
symmetric real matrix.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 11
The Discrete-Time Linear Quadratic Regulator (continued)

Additional requirements
The pair A, B must be stabilizable
Definition
A pair A, B is stabilizable ⇐⇒ the uncontrollable subspace is stable.

Let Q = H T H. Then the pair A, H must be detectable.


Definition
A pair A, H is detectable ⇐⇒ the unobservable subspace is stable.

The control u[0,∞) is chosen to minimize J(u[0,∞) )

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 12
The Discrete-Time Linear Quadratic Regulator (continued)

Theorem
Given the stabilizable and detectable LTI system (1) and the performance
measure (2), there exists a unique optimal feedback control

uopt (k) = −Fx(k) (3)

where
F = (R + B T PB)−1 B T PA (4)
and P satisfies the Discrete-Time Algebraic Riccatti Equation

AT (P − PB((R + B T PB)−1 B T P)A + Q − P = 0 (5)

Furthermore, the closed-loop (optimal) system is asymptotically stable.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 13
The Finite Time Version of the Discrete-Time Linear
Quadratic Regulator

The discrete-time linear time-invariant dynamics are given by Eqn. (1)


as before
A is an n × n real matrix and B is an n × m real matrix.
x(k) is the state at time k and u(k) is the control at time k.

The performance measure (to be minimized) is


N−1
1X T 1
J(u[0,N−1) ) = (x (k)Qx(k) + u T (k)Ru(k)) + x T (N)Qf x(N) (6)
2 0 2

where Q, Qf ≥ 0 are n × n real symmetric matrices and R > 0 is an


m × m symmetric real matrix.
If N is larger than n, there are upper and lower bounds on the
performance by stabilizability and detectability.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 14
Solution to the Finite Time Version of the Discrete-Time
Linear Quadratic Regulator

Theorem
Given the stabilizable and detectable LTI system (1) and the performance
measure (See Eqn. (6)), there exists a unique optimal feedback control

uopt (k) = −F (k)x(k) (7)

where
F (k) = (R + B T P(k)B)−1 B T P(k)A (8)
and P(k) satisfies the Discrete-Time Algebraic Riccatti Equation

P(k) = AT (P(k + 1) − P(k + 1)B((R + B T P(k + 1)B)−1 B T P(k + 1))A + Q


(9)
With the boundary condition at k = N that P(N) = Qf

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 15
Relation between P(k) and P

One might expect something like limN→∞ P(0, N) = P but this is not
generally true.
There is an incorrect Wikipedia article that claims it is.
Sufficient conditions for it to be true are that Qf = P or Qf = 0.
This is important in determining the stability of MPC for LTI systems.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 16
Implementing the Linear Quadratic Regulator
There were, and are, surprisingly few real applications of the LQR.
Why?
You need to measure (or accurately estimate) all of the state vector
x(k).
You may need a lot of amplifiers.
The design burden shifts, even for Single-Input Single-Output (SISO)
problems, to choosing the appropriate Q and R and this is not easy.
None of these is insurmountable.
There are excellent methods to estimate the states that cannot
be measured.
You can use a Kalman filter if there is significant noise.
You can use the Luenberger observer if the noise is not significant.
Often, you can use much simpler estimators. For example, you can
differentiate and low pass filter a position to obtain a velocity.
You do not need many amplifiers if you implement the LQR on a
computer–which you would do anyway.
Choosing Q and R is certainly easier than other methods in the
Multi-Input Multi-Output (MIMO) case.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 17
The Real Problem in Implementing the Linear Quadratic
Regulator
Actuator Saturation
All actuators eventually saturate.
It is usually impractical, if not impossible, to completely avoid.
Valves can only go from fully open to fully closed.
Vanes (rudders, ailerons) that control by altering air or fluid flow have
limitted range.
Power supplies have upper and lower limits.
Failure to account for saturation can cause major problems in a
control loop.
Integrator windup.
Conditional stability–Large exogenous inputs cause instability; small
ones do not.
Designers of classical control systems know this and account for it.
The LQR does not
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 18
Another Real Problem in Implementing the Linear
Quadratic Regulator

State Constraints
Many systems have natural and unavoidable state constraints.
A tank can only hold so much liquid before it overflows.
Many motors have velocity limits.

It is often impractical to make these constraints irrelevant.

While it is usually possible to use Q and R to account for state


constraints in LQR design it would be better to explicitly prevent
the violation of state constraints by design

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 19
The Simplest MPC Problem

The discrete-time linear time-invariant dynamics are given by Eqn. (1)


as before
A is an n × n real matrix and B is an n × m real matrix.
x(k) is the state at time k and u(k) is the control at time k.

The performance measure is


N−1
1X T 1
J(u[0,N−1) ) = (x (k)Qx(k) + u T (k)Ru(k)) + x T (N)Qf x(N) (10)
2 0 2

where Q, Qf ≥ 0 is an n × n real symmetric matrix and R > 0 is an


m × m symmetric real matrix.

Subject to the contraints that

|u(k)| ≤ Umax for all k = 0, 1, 2, ..., N − 1 (11)

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 20
The Simplest MPC Problem (continued)

Remember, MPC procedes by solving the problem on the previous


slide at each value of the time, k, indefinitely.
How can we solve that problem?

The problem is a convex programming problem

The constraint on the controls is convex.


The dynamics are also a constraint but they are linear and, a fortiori,
convex.
The performance measure is quadratic and, again a fortiori, convex.
Recent developments in optimization have made the optimization of
problems involving a convex performance measure with convex
constraints (so-called convex programming) fast and foolproof.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 21
Some Comments About Convex Optimization

See the book “Convex Optimization” by Stephen Boyd and Lieven


Vanderberghe, Cambridge University Press (2004).
Such problems–Those with a convex performance criterion subject to
convex constraint sets
always have a solution
the solution is unique
there exist interior point methods that solve them efficiently and
acurately

Note that interior point methods produce a feasible (usable) solution


at every step.
You can find computer code for solving convex optimization problems
at http://stanford.edu/ boyd/software.html
There are advantages to (semi) professional code over do it yourself.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 22
Stability
It is, of course, extremely important that the closed-loop system be
stable.
A good way to procede is to utilize a property of the unconstrained
LQR. Let
Remember P, the crucial intermediate calculation in solving the
unconstrained LQR.
1 T
V (x(k)) , x (k)Px(k), (12)
2
V (x(k)) is a Lyapunov function for the “optimal” closed-loop system.
It is helpful to know that V (x(0)) is also the performance of the
”optimal” closed-loop system.

Contours of constant V (x) = C are n-dimensional ellipses.


The states that satisfy the control constraint have linear varieties as
boundaries.
A linear variety is just a hyperplane that is displaced from the origin.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 23
Stability (Continued)

It should be obvious that we can


always fit ellipses inside a region
bounded by linear varieties.

The largest such ellipse specifies a set


of states to which the unconstrained
LQR applies.

If the MPC controller drives every


initial state to this set, you have
Figure: Ellipse inside linear guaranteed stability.
varieties

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 24
Stability (Continued)

For our problem, there is an obvious way to ensure asymptotic


stability of the closed-loop.
If you can guarantee that there exists a K such that the control signal
u(k) cannot saturate for any k ≥ K then the LQR stability result
applies.
There are several ways to make this precise.

It is easy to do this when the open-loop system is exponentially stable


(has all its eigenvalues in the interior of the unit disk).
Simply let N be large enough.
A stabilizing control scheme is to set the control signal to zero and
wait until the state reaches the linear region.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 25
Stability (Continued)

If the open-loop system is not stable, it is unreasonable to expect


global stability because of the control constraints.
The most one can hope for is something like the following
There exists a closed and bounded set of initial conditions Xi ⊂ R n
such that all x(0) ∈ Xi are asymptotically stable.
There exists a Lyapunov function V (x) for which Xi is a level set.

This provides a guarantee of stability, i.e., a sufficient condition.


The usual approach for achieving this is to force the MPC controller
to eventually approximate the infinite time LQR controller.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 26
Stability–More Precisely

There are several ways to make the MPC controller drive the state
into the region where the LQR applies exactly. Please see the Figure
on slide 23.
The first one that people used was to add the constraint that
x(N) = 0 to the MPC optimzation problem.
This has two flaws. It is hard to satisfy such a constraint
computationally and it alters the optimization problem in a less than
ideal way.

A much better method is to add a terminal constraint set that is the


region where the LQR applies exactly and to include a quadratic
terminal cost 12 x T (N)Px(N).
Please see the paper “Constrained model predictive control: Stability
and Optimality,” by Mayne, et al., Automatica 36 (2000)pp. 789 -
814 for a detailed and precise discussion.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 27
Part

Motivation

Intuition

Basic Model Predictive Control

MPC with Exogenous Inputs

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 28
Limits to Stability

Figure: MPC with exogenous input


Is this MPC version of the LQR Bounded-Input Bounded-Output
(BIBO) stable?
What does this even mean?
Does the question make sense?
In the real world, there are always exogenous (external and
unpredictable) inputs.
A common situation is that zdesired (k) is a series of steps of varying
height
Also, zdesired (k) may be input from a human operator.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 29
Using MPC for Tracking
Suppose zdesired is just a step of amplitude β.
Define the instant at which the step occurs as k = 0.
Then we have a non zero initial condition x(0).
Stability of the response is guaranteed only if x(0) ∈ Xi .

Now suppose zdesired is a sequence of steps of amplitude βm .


The sequence of times at which the steps occur could be exponentially
distributed.
Depending on the mean time between steps, this could destabilize the
system.
If the steps are far enough apart in time and not too large–as is typical
of many process control systems, the system should still be stable.

We could place upper limits on the size of the steps and lower limits
on the time between steps so as to guarantee stabiity.
This is not uncommon.
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 30
Imposing Integral action in MPC

Figure: MPC with integral action and partial observations

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 31
Using MPC for Tracking

Suppose zdesired is input from a human operator (say a surgeon or a


pilot)..

We know that zdesired has no frequency components above 5 Hz and


is velocity limitted as well. But MPC is based on knowing the
input at least n time steps into the future.

We can limit the inputs somewhat–E.g., surgical systems impose


upper limits on velocity–but there still remain hard questions
regarding both performance and stability of MPC when it is applied
to tracking problems.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 32
A Robustness Example

We do the Quanser inverted pendulum experiment in our senior


controls lab.
The controller is a straighforward LQR, with feedback gain F .
We measure θ(k), the pendulum angle and φ(k), the “cart” angle.
We estimate the two velocities by differentiating the angles and
low-pass filtering them.
We do not use the tachometer because it is too ”noisy.”

Despite the actuator saturation, the controller works even though


scaled by 1/2 < α < ∞
I.e., The control is uoptimal (k) = −αFx(k).

However, the controller does not work if the table it is on is wobbly.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 33
Plant Mismodeling and Output Disturbances

Figure: Output Disturbance


Figure: Plant Mismodeling

If the set of possible


Commonly, high frequency disturbances is general
dynamics are omitted from the enough, it includes the effects
model. of modeling errors.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 34
A Positive and Negative Robustness Result

It is known that MPC is robustly stable for the class of systems


considered here.
I.e., LTI systems with convex constraints and a quadratic performance
measure.

Examples are known of MPC controlled systems that have zero


robustness-the slightest disturbance will destabilize the closed-loop
system.
Please see the paper “Examples when the Nonliear Model Predictive
Control is Nonrobust,” by Grimm et al., Automatica 40, (2004) pp.
1729-1738

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 35
Dealing with Output Disturbances

The goal is to minimize the effect of the disturbances.


In order to do this you need to define the set of possible disturbances.
One possibility is d(k) ∈ D where D is a bounded subset of R n . This
also assumes that d(k) and d(j) are independent.
Another is to assume d[0,N−1] is a random process, typically White or
Linearly Filtered White Gaussian

For bounded disturbances, a worst case (paranoid) strategy makes


sense.
If D is small enough, it is reasonable to ignore it.

For random disturbances, it makes sense to force the average effect to


be zero and to minimize the variance.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 36
H∞ or Paranoid MPC
In the absence of state and control constraints, there is a fairly
complete H∞ theory. See A.A. Stoorvogel, ”The H∞ Control
Problem: A State Space Approach,” (2000).
When there are convex constraint sets, the problem can be posed as
follows.

The discrete-time linear time-invariant dynamics are


x(k + 1) = Ax(k) + Bu(k) + Ld(k), where x(0) = ξ and k = 0, 1, 2, ...
(13)
The performance measure is
N−1
1X T
J(u[0,N−1) ) = max( (x (k)Qx(k) + ρu T (k)u(k) − γ 2 d T (k)d(k)))
d∈D 2 0
(14)
The constraints are
|u(k)| ≤ Umax for all k = 0, 1, 2, ..., N − 1 (15)
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 37
H∞ or Paranoid MPC (Continued)

To complete the formulation we need to add the following to the


discrete-time LQR assumptions.
ρ and γ are parameters to be chosen by the designer.
d[0,N−1] is a deterministic signal.
PN−1
D = {d[0,N−1] | 0 d T (k)(d(k) < ∞}
The pair A, L is stabilizable.

In the absence of state and control constraints, this problem has


a solution for appropriate ρ and γ.
The solution involves a Discrete-Time Algebraic Riccatti Equation
(DARE).
See Chapter 9 of Stoorvogel’s book.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 38
H2 , LQG, or Dull (Average) Optimal Control

Consider the following optimal control problem.

x(k = 1) = Ax(k) + Bu(k) + ξ(t) (16)

x(0) is Gaussian; E (x(0)) = ξ0 ; V (x(0)) = Ξ0 (17)


And the performance measure
N
1 X
J(u[0,∞) ) = E { lim [ (x T (k)Qx(k) + u T (k)Ru(k))]} (18)
2 N→∞ 0

And the output feedback

y (k) = Cx(k) + ν(k) (19)

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 39
H2 , LQG, or Dull (Average) Optimal Control (Continued)

Detailed requirements
A and B as before–including A, B stabilizable.
ξ(k) and ν(k), k = 1, 2, ...N are White Gaussian signals.
E (ξ(k)) = 0 and E (ξ(k)ξT (j)) = Qδ(k − j), Q ≥ 0
E (ν(k) = 0 and E (ν(k)ν T (j) )= Rδ(k − j), R > 0
Q = H T H and A, H detectable
The problem is to find a causal controller that minimizes J(u[0,∞) ),
see Eqn. (18)

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 40
H2 , LQG, or Dull (Average) Optimal Control (Continued)

This problem has, under the assumptions we have made, a remarkably


simple solution.
It is a proven fact that the solution can be divided into two
independent parts.
There is a time-invariant feedback control u opt (k) = −F x̂(k)
Where x̂(k) denotes the output of a Kalman filter which we will
describe shortly.
and F = (R + B T PB)−1 B T PA
There is a Kalman filter that includes u opt (k) as a known input.
The dynamics of the Kalman filter are

x̂(k + 1) = Ax̂(k) + Bu(k) + F̂ (y (k) − C x̂(k)) (20)

where
F̂ = AP̂C T (R + C P̂C T )−1 (21)

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 41
The Kalman Filter and the Optimally Controlled System

Figure: LQG
William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 42
The Kalman Filter

The last piece of the Time-Invariant Kalman Filter is the equation for
P̂.
P̂ = A(P̂ − P̂C T (R + C P̂C T )−1 C P̂)AT + Q (22)
Nonzero noise added to the input is essential
With no input noise, a solution to the DARE is P̂ = 0.
With a finite end time and no input noise, the time-varying Kalman
Filter eventually ignores input signals.

The KF is the optimal filter under our assumptions.


The KF is the optimal linear filter if we omit the Gaussian assumption.
I.e., if the noises are zero-mean, white and have finite (known)
variances.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 43
The Finite Time Version

The control part is as before except x̂(k) replaces x(k) in the control
part.
The feedback in the filter becomes

F̂ (K ) = AP̂(k)C T (R + C P̂(k)C T )−1 (23)

The equation for P̂ becomes

P̂(k +1) = A(P̂(k)− P̂(k)C T (R +C P̂(k)C T )−1 C P̂(k))AT +Q (24)

With initial condition

P̂(0) = Ξ, See Equation [17] (25)

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 44
Application to MPC

Whenever the constraints on the control and the state are inactive,
the LQG regulator applies.
When the constraints are active, the separation of control and
estimation is no longer valid.
However, forcing separation, while no longer optimal, is still
reasonable.
Use the correct (with the saturations) plant model in the filter

This again raises the questions of stability and robustness.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 45
Stochastic Stability of MPC

This is extermely technical and mostly beyond our scope.


There is some intuition available from the previous discussions.
Because the stable region is bounded, white Gaussian noise could
possibly produce initial conditions outside the stable region. The issue
is how probable this is.
The probability of a really bad burst of white noise is low.

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 46
Part

Motivation

Intuition

Basic Model Predictive Control

MPC with Exogenous Inputs

An Example

William S. Levine Conventional Model Predictive Control 2016 ACC, Boston, July 5, 2016 47
An Application of MPC to Human Posture
Regulation

Yao Li
Borns Surgical Robotics
Chengdu, China

William. S. Levine
Department of Electrical and Computer Engineering
University of Maryland at College Park

For more details, please see “A Two-Joint Human Posture Control Model
With Realistic Neural Delays,” IEEE TNSRE, VOL. 20, NO. 5, SEPTEMBER 2012

1
Postural Balance Control

 Not reflex
 Important features:
 Small amplitude sway
 Spontaneous
 Nonlinear Joint Coordination
Small Amplitude Body Sway  Small Noise -- Ankle Only
 Larger Noise -- Ankle plus Hip
 Even larger Noise -- All three joints
 Time delay
 Transmission, processing, & activation
 Optimality
 Learning and adaptation
Ankle, Knee, Hip Coordination  Energetic efficiency

2
Previous and Current Work
 A mathematical models

 biomechanical systems (with 1, 2, & 3 joints)


 control by ideal torque generators at the joints
 performance measure
 NOT LQR
 quartic, hextic, and octic in the COP
 Quadratic in the controls
 Improved model
 control by a realistic muscle model
 quadratic in the controls and actuation

 Results
 match the surprising sway
 match the nonlinear coordination
 reduce energy consumption compared to LQR
 Question
 Is the resulting controlled system stable?
3
Model Including Muscle Mechanics
Torso

Knee

■ Center of Pressure (COP) – the point


where ground reaction force must be
applied to produce the ground reaction
torque.
Toe
■ Calculation of Center of
Pressure COP
■ Equations of motion

■ Equations of muscle
model and torque

4
Muscle Model

 Muscle in series with tendon


 Small damping and mass
 Contractile element
 𝑓𝑓𝑡𝑡 =𝑓𝑓𝑙𝑙 × 𝑓𝑓𝑣𝑣 × 𝑎𝑎 𝑢𝑢
 Springs are nonlinear
muscle tendon
1.8

1.6
1
1.4

Forcevelocity
Forcelength

0.8 1.2

1
0.6
0.8

0.4 0.6

0.4
0.2
0.2

0 0
0.4 0.6 0.8 1 1.2 1.4 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5

length Shortening Velocity


5
Muscle Model—Part two
 Elastic elements
 Nonlinear springs

 Contractile element
 Force length curve (assuming velocity is constant)
 Force velocity curve (assuming position is constant)
 Activation dynamics


 Linearization
 Linearizing the tendon dynamics at the rest length
results in zero
 Instead, we use a linear spring
 Linearizing the activation dynamics gives


6
Optimal Control Problem

New overall
Variable

 This is a convex problem and can be solved by CVX


after discretization in time.
7
Co-contraction

 There is a question in neurophysiology regarding the


extent to which antagonist muscles are simultaneously
active
 There is very little co-contraction observed
experimentally in studying posture regulation
 The Transient Response results show zero co-
contraction for both NOR4 and NOR8
 The LQR control co-activates 89% of the time and co-
excites 56% of the time
 In the steady state case, the results are
 LQR co-activates 61% and co-excites 43%
 NQR4 co-activates 27% and co-excites 10%
 NQR8 co-activates 20% and co-excites 1%
10
Total Energy & Excitation

4.5

3.5

2.5
total energy
2
total excitation
1.5

0.5

0
NOR8 NOR4 LQR

13
Accuracy

 This is for octic weights on the states other than actuation

Stabilogram Diffusion Function 14


Conclusions
Objective Function
System Dynamics

 Model Predictive Control (MPC) provides an approximate


numerical solution for the nonlinear optimal feedback control
 This is an arguably more realistic performance measure than
the classical quadratic criterion.
 Small errors largely do not matter--see the usual specs.
 Ignoring small errors saves energy and is common practice.
 Implementation would be feasible and inexpensive for
systems that are already using computer control.

You might also like