Master-level control engineering

Model Predictive Control

From dynamic models and optimization to constrained linear and nonlinear MPC.

IIA41175 ECTSCampus PorsgrunnEnglish
Next teaching sessionLecture 2 · 27 Aug
RoomA289
Time08:30–12:00
Project report deadline15 Nov · 23:59

Start here

Course hub

Lecture material, videos, software, exercises and project documents are all accessible directly from this page. Canvas is used only for submission.

Important

Install MATLAB and Simulink before the first lecture. Submit lab journals, reports and source code in Canvas; all teaching resources are linked directly here.

Conceptual path

Course roadmap

The course develops predictive control step by step, from modelling to optimization, MPC, estimation and advanced nonlinear formulations.

01Dynamic modelsLinearization · discretization · simulation
→
02Optimization & LQQP formulation · constraints · qpOASES
→
→
04EstimationKalman filtering · output feedback
→
05Advanced MPCOffset-free · stability · NMPC · MOO

Autumn 2026

Lectures & complete resource library

Every direct lecture video, MATLAB/Simulink download and linked teaching file from the existing course page is organized below.

↕

Click on each lecture to expand/collapse for seeing/hiding the detailed lecture plan.

01 Models, linearization & simulation13 Aug · 09:15–12:00 · A289 Foundations

Topics

  • Course overview and dynamic model types for optimal control
  • Linearization of nonlinear models
  • Inverted pendulum: process description, linearization and discretization
  • Open-loop and real-time simulation in Simulink

Learning outcomes

After this lecture, you should be able to:

  • Distinguish continuous-time, discrete-time, linear and nonlinear dynamic models used in predictive control.
  • Linearize a nonlinear state-space model around an operating point and obtain a local linear model.
  • Discretize and simulate dynamic models in MATLAB/Simulink, and compare linear and nonlinear responses.
Self-test quiz 3 questions

1. Why is a nonlinear model often linearized before designing a linear MPC controller?

2. If a continuous-time state-space model is to be used in a discrete-time MPC algorithm, what is normally required first?

3. What is the most useful purpose of comparing linear and nonlinear simulations of the same system?

E1 Exercise 1 · Dynamic-model simulation 20 Aug · 08:30–12:00 · A289 Exercise session

Purpose of the session

  • Dedicated lecture hours for working on Exercise 1.
  • Select one case study: 2-DOF helicopter, oil-well drilling, or power-generation system.
  • Implement and test the dynamic model in MATLAB/Simulink.
  • Use the same case study you intend to continue with for the group project.

Full task descriptions, supporting videos, screenshots and submission deadlines remain available in the Exercises section ↓.

02 Optimization & LQ optimal control27 Aug · 08:30–12:00 · A289 Optimization

Topics

  • Connection from models to mathematical optimization
  • Objectives, constraints, bounds and optimization problem types
  • Static QP example: optimal operation of an oil refinery
  • qpOASES installation, compilation and Simulink use
  • Dynamic optimal control, prediction horizon and LQ control

Learning outcomes

After this lecture, you should be able to:

  • Formulate constrained optimization problems using decision variables, objective functions, equality constraints, inequality constraints and bounds.
  • Convert a quadratic optimization problem into the standard QP form required by numerical solvers such as qpOASES.
  • Explain how finite-horizon dynamic optimal control leads to the linear-quadratic control problem.
Self-test quiz 3 questions

1. In a quadratic program, what is optimized?

2. What is the role of the prediction horizon in finite-horizon optimal control?

3. Why is a standard QP formulation useful in this course?

03 Efficient LQ formulation3 Sep · 08:30–12:00 · A289 QP formulation

Topics

  • Useful matrices, matrix structure and Kronecker products
  • Efficient finite-horizon LQ → standard QP formulation
  • Bounds and inequality constraints
  • Inverted-pendulum LQ control with qpOASES in Simulink

Learning outcomes

After this lecture, you should be able to:

  • Construct compact prediction and cost matrices using structured matrix operations and Kronecker products.
  • Transform a finite-horizon LQ control problem into a standard QP efficiently.
  • Represent input/state bounds and inequality constraints in a form suitable for qpOASES.
Self-test quiz 3 questions

1. What is a main advantage of constructing the finite-horizon LQ problem in compact matrix form?

2. In the standard constrained LQ/QP formulation, where are actuator limits normally represented?

3. Why are Kronecker products useful in finite-horizon MPC/LQ formulations?

04 Introduction to Model Predictive Control10 Sep · 08:30–12:00 · A289 Core MPC

Topics

  • Optimal control versus predictive control
  • Sliding / receding horizon and feedback
  • Racing-car example; warm start, parallel pool and shrinking horizon
  • State-feedback MPC algorithm
  • Linear MPC for the inverted pendulum in Simulink and MATLAB

Learning outcomes

After this lecture, you should be able to:

  • Explain the receding-horizon principle and why repeatedly resolving the optimal-control problem introduces feedback.
  • Formulate and implement a state-feedback linear MPC algorithm.
  • Explain warm starting and other practical strategies that reduce online MPC computation.
Self-test quiz 3 questions

1. What distinguishes receding-horizon MPC from applying one finite-horizon optimal sequence open loop?

2. Why does MPC normally apply only the first element of the optimized control sequence?

3. What is the purpose of warm starting an MPC optimization?

05 Computational reduction & feasibility17 Sep · 08:30–12:00 · A289 Efficient MPC

Topics

  • Reducing the size of the optimal-control problem
  • Lagrangian method and QR factorization
  • Elimination of unknowns by grouping control inputs
  • Execution-time comparison for reduced MPC
  • Hard / soft constraints, slack variables and feasibility

Learning outcomes

After this lecture, you should be able to:

  • Explain why reducing the number of optimization variables can be important for real-time MPC.
  • Apply concepts such as Lagrangian elimination, QR factorization and control-input grouping to reduce computational effort.
  • Distinguish hard and soft constraints and explain how slack variables can preserve feasibility.
Self-test quiz 3 questions

1. Why might control-input grouping be used in MPC?

2. What is a soft constraint?

3. What is a key risk of using only hard constraints?

06 State estimation & output-feedback MPC24 Sep · 08:30–12:00 · A289 Estimation

Topics

  • Why MPC needs state estimation
  • Output-feedback MPC block diagram and algorithm
  • A priori / a posteriori estimates and Kalman filtering
  • Combined state and disturbance estimation by augmentation
  • Helicopter demonstrations with linear KF and UKF

Learning outcomes

After this lecture, you should be able to:

  • Explain why state estimation is required when MPC states are not all directly measured.
  • Apply the predict-update logic of the Kalman filter and distinguish a priori and a posteriori state estimates.
  • Explain how model augmentation can enable simultaneous state and disturbance estimation for output-feedback MPC.
Self-test quiz 3 questions

1. Why is a state estimator needed in output-feedback MPC?

2. In a Kalman filter, what does the measurement-update step do?

3. Why might a disturbance state be appended to the process model?

07 Offset-free MPC, stability & robustness1 Oct · 08:30–12:00 · A289 Advanced linear MPC

Topics

  • Steady-state offset, model mismatch, uncertainty and disturbances
  • Integral action via disturbance augmentation, Δu and MPC+I
  • Feasibility, stability, robustness and implementation
  • Terminal cost / constraints and infinite-horizon ideas
  • Computational delay and control hierarchy

Learning outcomes

After this lecture, you should be able to:

  • Explain how model mismatch and persistent disturbances can create steady-state offset in MPC.
  • Compare disturbance-model augmentation, Δu formulations and MPC-plus-integral-action approaches for offset removal.
  • Discuss feasibility, stability, robustness, terminal ingredients and computational delay in practical MPC implementation.
Self-test quiz 3 questions

1. What is a common cause of steady-state offset in an MPC-controlled process?

2. What is the main purpose of adding integral action or an estimated disturbance model to MPC?

3. Why can computational delay matter in an MPC implementation?

08 Nonlinear Model Predictive Control8 Oct · 08:30–12:00 · A289 NMPC

Topics

  • Nonlinear objectives, constraints, feasible regions and local/global solutions
  • Convexity, optimality and KKT conditions
  • fmincon, SQP and nonlinear programming
  • Nonlinear optimal control of tank pressure
  • Sliding horizon → NMPC and input grouping for speed

Learning outcomes

After this lecture, you should be able to:

  • Formulate nonlinear optimization problems and interpret feasible regions, local minima, global minima and optimality conditions.
  • Use MATLAB fmincon/SQP concepts to solve nonlinear finite-horizon optimal-control problems.
  • Construct the receding-horizon extension of nonlinear optimal control to obtain NMPC and explain computational reduction by input grouping.
Self-test quiz 3 questions

1. Why is nonlinear MPC generally more computationally demanding than linear MPC based on a convex QP?

2. What does a local optimum mean in nonlinear optimization?

3. How does nonlinear optimal control become NMPC?

09 Multi-objective optimization15 Oct · 08:30–12:00 · A289 MOO

Topics

  • Multi-objective optimization problem formulation
  • Weighted-sum, ε-constraint, goal-attainment and lexicographic methods
  • Introduction to evolutionary algorithms
  • Applications to reservoir planning and olive-oil extraction
  • Basic introduction to Utopia-tracking MPC

Learning outcomes

After this lecture, you should be able to:

  • Explain Pareto optimality and why a multi-objective problem may not have one solution that improves every objective simultaneously.
  • Compare weighted-sum, ε-constraint, goal-attainment and lexicographic approaches to multi-objective optimization.
  • Explain at a conceptual level how multi-objective ideas can be incorporated into MPC, including Utopia-tracking MPC.
Self-test quiz 3 questions

1. What characterizes a Pareto-optimal solution?

2. What does the weighted-sum method do?

3. Why can changing objective weights change the selected operating point?

Hands-on work

Exercises

Select an exercise row to see its task, resources and deadlines. Exercise 1 follows the project case-study choice.

Click an exercise row to expand or collapse its details.

ActivityCampusOnline
Exercise 1Dynamic-model simulation Campus deadline3 Sep · 23:59 Online deadline10 Sep · 23:59

Exercise 1

Choose one case study

Complete the case that corresponds to the project path you intend to pursue.

Exercise 2qpOASES / optimization work Campus deadline10 Sep · 23:59 Online deadline17 Sep · 23:59

Exercise 2

qpOASES / optimization work

Open the exercise brief for the complete task description and submission requirements.

Exercise 3LQ controller Campus deadline17 Sep · 23:59 Online deadline24 Sep · 23:59

Exercise 3

LQ controller

Open the exercise brief for the complete task description and submission requirements.

40% of final grade

Group project

Each group selects only one project case. The final report deadline is 15 November 2026 at 23:59.

02

Process control

Oil Well Drilling

Develop MPC for a constrained oil-well drilling pressure-control problem.

03

Energy systems

Power Generation System

Develop MPC for frequency stabilitzation of a power generation system under varying electrical load.

Project-work sessions22 Oct29 Oct5 Nov12 Nov

60% of final grade

Exam preparation

Use the lecture notes and previous exam archive to revise the complete course sequence.