TEMPO Spring School:
Theory and Numerics
of
Nonlinear Model Predictive Control

James B. Rawlings
Department of Chemical and Biological Engineering
University of Wisconsin
Madison, Wisconsin
Copyright (C) 2015 James B. Rawlings


Course Overview

This course provides a modern overview of model predictive control (MPC), the leading advanced industrial process control technology in use today. The class is taught in a highly interactive manner, with participants running simulation examples to illustrate and reinforce the core concepts. Software for this purpose is provided as part of the course. The course is divided into the following sections: Review of linear regulation and state estimation; Tracking, disturbances and zero offset; Nonlinear MPC regulation; Nonlinear moving horizon state estimation.

Who Should Take this Course

Students should have taken a first graduate level linear systems course. Students should be familiar with the Python, CasADi, and Octave/Matlab programming environments.

The course overheads are provided below. Clicking on the thumbnail figures displays the code that was used to create the figure. In addition, the complete collection of the CasADi/Python files and Matlab m-files in single zip files are available for download from the links below:

CasADi/Python:
mpc-short-course-casadi-py-files-v1.0.zip
Octave/Matlab:
mpc-short-course-matlab-m-files-v1.0.zip

Schedule: Monday-Tuesday, March 30-31, 2015

Monday 9:00-10:30: Introductory review: linear regulation and state estimation (LQR and LQE)
Monday 11:00-12:00: Exercises:
Monday 13:00-14:30: Tracking, disturbances, and zero offset
Monday 15:00-16:00: Exercises:
Monday 16:30-18:00: Review and exercise solutions

Tuesday 9:00-10:30: Nonlinear model predictive control - Regulation
Tuesday 11:00-12:00: Exercises:
Tuesday 13:00-14:30: Nonlinear moving horizon state estimation
Tuesday 15:00-16:00: Exercises:
Tuesday 16:30-18:00: Review and exercise solutions

Section 1: Introductory review: linear regulation and state estimation (LQR and LQE)

Control concepts: Linear quadratic regulation, stage cost, cost-to-go, linear quadratic estimation, Kalman filter, dynamic programming, recursive least squares, controllability and stabilizability, regulator convergence, infinite horizon regulator, observability and detectability, estimator convergence

Programming concepts: Representation with ss(A,B,C,D), c2d(sys, DT), and tf(num, den), anti-reset windup, minimal realization with minreal(sys)

Slides (4up version)
Figure 1 (slide 23):
Step response of a system with a right-half-plane zero.
Figure 2 (slide 25):
Output response with an exponential input for a system with RHP zero.
Figure 3 (slide 27):
Output response with input saturation for a system with RHP zero.
Figure 4 (slide 32):
Closed-loop eigenvalues of A+BK_N(0) for different horizon lengths.
Figure 5 (slide 33):
Stability dependence on horizon
Figure 6 (slide 36):
The forecast versus the closed-loop behavior for N=5.
Figure 7 (slide 37):
The forecast versus the closed-loop behavior for N=7.
Figure 8 (slide 38):
The forecast versus the closed-loop behavior for N=20.
Figure 9 (slide 55):
Optimal control law for constrained system.
Figure 10 (slide 61):
A measurement with noise
Figure 11 (slide 76):
Noisy measurement and state estimate versus time when estimating a scalar constant.
Figure 12 (slide 77):
Taking the sample mean as the estimate
Figure 13 (slide 78):
Estimate error variance goes to zero without process noise
Figure 14 (slide 80):
Process noise leads to nonzero steady-state estimate error variance
Figure 15 (slide 81):
With process noise, the state x is moving
Figure 16 (slide 82):
The optimal estimate x is chasing after x
Figure 17 (slide 83):
The sample mean is no longer a good estimator

Section 2: Tracking, disturbances, and zero offset

Control concepts: Setpoint tracking, steady-state targets, dynamic regulation, state estimation, disturbance models, zero offset

Programming concepts: linear-quadratic regulator/estimator with dlqr(A,B,Q,R)/dlqe(A,C,Q,R), quadratic programming, creating CasADi models with getCasadiFunc, simulation with OneStepSimulator

Slides (4up version)
Figure 1 (slide 41):
Outputs following a step disturbance with steady-state offset
Figure 2 (slide 42):
Inputs following a step disturbance with steady-state offset
Figure 3 (slide 45):
Outputs following a step disturbance
Figure 4 (slide 46):
Inputs following a step disturbance
Figure 5 (slide 51):
CSTR example in CasADi/Python.

Section 3: Nonlinear model predictive control - Regulation

Control concepts: Equilibrium, positive invariance, K, K-infinty, KL functions, Lyapunov stability, asymptotic stability, exponential stability, Lyapunov function, converse theorems, stability of nonlinear MPC

Programming concepts: solving nonlinear OCPs with nmpc

Slides (4up version)
Figure 1 (slide 36):
Feasible region U_2, elliptical cost contours, and ellipse center, a(x), and constrained minimizers for different values of x.
Figure 2 (slide 37):
Optimal control law for constrained system.
Figure 3 (slide 42):
Feasibility sets X_N for N=1,2,3.
Figure 4 (slide 51):
Trajectory using linearized system and linear MPC.
Figure 5 (slide 54):
Trajectory using nonlinear MPC.
Figure 6 (slide 56):
Comparison of linear and nonlinear MPC trajectories.
Figure 7 (slide 57):
Example plot made with matplotlib
Figure 8 (slide 61):
Solution for Reactor Startup Exercise.

Section 4: Nonlinear moving horizon state estimation

Control concepts: Full information estimation, nonlinear detectability, incremental input/output to state stability , estimator stability, global asymptotic stability (GAS), robust GAS, moving horizon estimation (MHE), arrival cost, stability of MHE

Programming concepts: solving nonlinear estimation with nmhe

Slides (4up version)
Figure 1 (slide 67):
Example results for MHE on batch reactor system.

Additional References

[Course icon goes here] Research monograph (available for purchase and download)