Model predictive control
ME-425
Media
Media
Welcome to Model Predictive Control
Exam 2024
WARNING
It looks like MacOS version 15.1 may not be compatible with Matlab 2023a or b.
We're looking into this, but there's a chance that if you update your Mac this week we could have a problem with the software we need.
Mini-Project (Updated Dec 12)
During the last portion of the course, you will complete a mini-project in groups of one to three. The project is worth 40% of your final grade.
- Register your group under "Group for Mini-Project" below.
- Run the project following the instructions in "Project description"
- Write a report in the format and length given in "Project description"
- Submit the report and Matlab code on or before end of day on January 10th using "Hand-in for mini-project"
You're strongly encouraged to use the course time before the Christmas break to finish the project and to get help from the assistants.
How to get help:
- We will be monitoring and responding on EdDiscussion
- We will be available in person during the course from 13h-17h on Friday, Dec 6th, 13th and 20nd
It is common to have issues with software installation for the project (particularly students who haven't kept up with the assignments ;), which can result in significant delays in getting started. We can usually help you sort this quickly, so please come to the regular class sessions so we can help you with this.
DEC 12 UPDATE: All six parts of the project are now available for download below.- Project description (Updated Dec 12) (File)
- Source code / controller templates (Updated Dec 12) (File)
- Group for Mini-Project (Group choice)
Common Software Setup Errors
- We've had a number of students have problems insta... (Text and media area)
- lcp (File)
- lcp sfun (File)
How to Get Help
There are three methods to interact with your colleagues, the professors and the TAs during the course:
In-person exercise sessions
Help on the exercises, lectures, or general MPC discussion is available on Fridays from 15h - 17h in CO-2 after the lectures.
Try and post questions and answers on Ed Discussion so that everyone can benefit from the discussion.
You can always contact me at colin.jones@epfl.ch If you have a question, but please try to use Ed Discussion if possible so others can benefit.
If you see other methods that work well in other classes, or see that some of these methods are not effective, please let us know asap, so we can adapt!
Week 1: Introduction
In this first week, we will give a high-level introduction to what MPC is, why it's useful and some of the issues that we'll have to tackle this term in order to get it to work well on our systems.
- Videos (Text and media area)
- Introduction to MPC (URL)
- Examples of MPC (URL)
- Slides (Text and media area)
- Week 1: Slides (File)
- ExercisesThere are no exercises to do in this firs... (Text and media area)
- Software setup for exercises (File)
Week 2: Unconstrained MPC
- Videos (copy) (copy) (Text and media area)
- Introduction (URL)
- Finite Horizon LQR (URL)
- Dynamic Programming (URL)
- Parametric Solution (URL)
- Impact of Horizon (URL)
- Stability of LQR (URL)
- Summary (URL)
- Slides (copy) (Text and media area)
- Week 2: Optimal Control of Unconstrained Systems (File)
- Exercises (copy) (copy) (Text and media area)
- Exercise 1 (File)
Week 3: Optimization
- Videos (copy) (Text and media area)
- Introduction (URL)
- Optimization introduction (URL)
- Convexity (URL)
- Linear and quadratic programming (URL)
- Constrained optimization (URL)
- Unconstrained optimization (URL)
- Barrier method (URL)
- Slides (copy) (copy) (Text and media area)
- Week 3: Intro to Optimization (File)
- Exercises (copy) (copy) (Text and media area)
- Exercise 2 : Optimization (File)
- Exercise 2 - matlab template (File)
Week 4: Constrained control
- Videos (copy) (copy) (copy) (Text and media area)
- Objectives of constrained control (URL)
- Recap: Optimization (URL)
- Invariance (URL)
- Invariant sets (URL)
- Control invariant sets (URL)
- Polytopes and polytopic computation (URL)
- Summary (URL)
- Slides (copy) (copy) (copy) (Text and media area)
- Week 4: Intro to Constrained Systems (File)
- ExercisesThis exercise will take two weeks to comp... (Text and media area)
- Exercise 3 : Calculate invariant sets (File)
Week 5: MPC
- Videos (copy) (copy) (Text and media area)
- Introduction (URL)
- Recap (URL)
- Objective (URL)
- Stability and invariance (URL)
- MPC (URL)
- Slides (copy) (copy) (copy) (copy) (Text and media area)
- Week 5: MPC (File)
- ExercisesThis week you should complete the exercis... (Text and media area)
Week 6: Practical MPC
- Videos (copy) (copy) (copy) (Text and media area)
- Introduction (URL)
- Recap (URL)
- Soft constraints (URL)
- Tracking (URL)
- Offset free (URL)
- Summary (URL)
- Slides (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Week 6: Practical MPC (File)
- ExercisesYou have two weeks to complete this exerc... (Text and media area)
- Exercise 4 : Implement MPC (File)
Week 7: Robust MPC
- Videos (copy) (copy) (copy) (copy) (Text and media area)
- Introduction (URL)
- Uncertainty models (URL)
- Robust control : Goals (URL)
- Robust invariance (URL)
- Robust constraint satisfaction (URL)
- Robust open-loop MPC (URL)
- Slides (copy) (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Week 7: Robust MPC 1 (File)
- ExercisesThis week you should complete exercise 4. (Text and media area)
Week 8: Robust MPC II
- Videos (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Introduction (URL)
- Closed-loop predictions (URL)
- Tube-MPC : The Idea (URL)
- Minimum robust invariant sets (URL)
- Tube-MPC : Putting it together (URL)
- Tube-MPC : Stability and invariance (URL)
- Tube-MPC : Example (URL)
- Tube-MPC : Summary (URL)
- Input to state stability (URL)
- Summary (URL)
- Slides (copy) (copy) (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Week 8: Robust MPC 2 (File)
- ExercisesYou have two weeks to complete this exerc... (Text and media area)
- Exercise 5 : Offset-free tracking (File)
Week 9
- Videos (copy) (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Introduction (URL)
- Optimality conditions (URL)
- One dimensional example (URL)
- Parametric linear complementarity (URL)
- pLCP Geometry (URL)
- Lecture notes (Text and media area)
- Week 9 & 10: Explicit MPC (File)
Week 10
- Videos (copy) (copy) (copy) (copy) (copy) (copy) (copy) (Text and media area)
- pLCP Algebra (URL)
- pLCP Solution Methods (URL)
- Point location (URL)
- Example (URL)
- Explicit MPC is a Neural Network : Power Electronics Case Study (URL)
- Lecture Notes (Text and media area)
- Explicit MPC is a Neural Network : Power Electronics Case Study (File)
- Exercise (Text and media area)
- Exercise 6: Explicit MPC (File)
Week 11
- Videos (copy) (copy) (copy) (copy) (copy) (copy) (copy) (copy) (Text and media area)
- Introduction (URL)
- Nonlinear programming (URL)
- Discretization (URL)
- Gradients (URL)
- Example (URL)
- Matlab files for example (File)
- Slides (Text and media area)
- Week 11: NMPC (File)
- Exercise (Text and media area)
- Exercise 7 : NMPC (File)
- Exercise 7 : template code (File)
Week 12
Week 13
Week 14
Exercise Solutions
- Software setup for exercises (File)
- Exercise 1 (File)
- Exercise 1 - solution (File)
- Exercise 1 - solution video (URL)
- Corrigendum video to Exercise 1 (URL)
- Exercise 2 (File)
- Exercise 2 - matlab template (File)
- Exercise 2 - Solution video (URL)
- Solution Exercise 2 - matlab (File)
- Exercise 3 (File)
- Exercise 3 - solution part A (File)
- Exercise 3 - solution part B (File)
- Video solution exericse 3 (URL)
- Exercise 4 (File)
- Exercise 4 Solutions (File)
- Exercise 4 - solution video (URL)
- Exercise 5 (File)
- Exercise 5 - Solution (File)
- Exercise 5 - video solution (URL)
- Exercise 6 (File)
- Exercise 6 - Solution (File)
- ex6a sol (File)
- ex6b sol (File)
- Exercise 7 (File)
- Exercise 7 - Template code (File)
- Exercise 7 - Solution (File)
- Exercise 7 - solution video (URL)
- Exercise 7 - solution slides annotated (File)
- Exercise 7 - solution slides (File)
Study Material
- Final exam 2014 (File)
- Final exam 2015 (File)
- Videos of solutions for 2014 and 2015 exams (URL)
- exam 2015 (blank) (File)