KTH /
Teknikvetenskap
/
Matematik
/
Optimeringslära och systemteori
SF2852 Optimal Control, 2021, 7.5hp.
Course registration: If you have problems registering for the course or for exams, please contact the
Student affairs office , e.g., via email:
studentoffice@math.kth.se.
Some material from the lectures can be found on this
page
Course home page address:
http://www.math.kth.se/optsyst/grundutbildning/kurser/SF2852/.
Examiner and lecturer:
Johan Karlsson,
email: johan.karlsson@math.kth.se,
room 3550,
Lindstedtsv 25,
phone: 790 8440
Tutorial exercises:
Yibei Li,
yibei@kth.se,
room 3736,
Lindstedtsv 25,
phone: 790 6294.
Introduction Optimal control is the problem of
determining the control function for a dynamical system to minimize a
performance index. The subject has its roots in the calculus of
variations but it evolved to an independent branch of applied
mathematics and engineering in the 1950s. The rapid development of the
subject during this period was due to two factors. The first are two
key innovations, namely the maximum principle by L. S. Pontryagin and
the dynamic programming principle by R. Bellman. The second was the
space race and the introduction of the digital computer, which led to
the development of numerical algorithms for the solution of optimal
control problems. The field of optimal control is still very active
and it continues to find new applications in diverse areas such as
robotics, finance, economics, and biology.
Course goals
The goal of the course is to provide an understanding of the main
results in optimal control and how they are used in various
applications in engineering, economics, logistics, and biology. After
the course you should be able to
 describe how the dynamic programming principle works (DynP) and apply it to discrete optimal control problems over finite and infinite time horizons,
 use continuous time dynamic programming and the associated
HamiltonJacobiBellman equation to solve linear quadratic control
problems,
 use the Pontryagin Minimum Principle (PMP) to solve optimal
control problems with control and state constraints,
 use Model Predictive Control (MPC) to solve optimal control
problems with control and state constraints. You should also be able
understand the difference between the explicit and implicit MPC
control and explain their respective advantages,
 formulate optimal control problems on standard form from
specifications on dynamics, constraints and control objective. You
should also be able to explain how various control objectives affect
the optimal performance,
 explain the principles behind the most standard algorithms for
numerical solution of optimal control problems and use Matlab to solve
fairly simple but realistic problems.
For the highest grade you should be able to integrate the tools you have learnt during the course and apply them to more complex problems. In particular you should be able to
 explain how PMP and DynP relates to each other and know their
respective advantages and disadvantages. In particular, you should be
able to describe the difference between feedback control versus open
loop control and you should use be able to compare PMP and DynP with
respect to computational complexity.
 explain the mathematical methods used to derive the results and
combine them to derive the solution to variations of the problems
studied in the course.
Course topics
Dynamic Programming Discrete
dynamic programming, principle of optimality,
HamiltonJacobiBellman equation, verification theorem.
Pontryagin minimum principle Several versions of
Pontryagin Minimum Principle (PMP) will be discussed.
Infinite Horizon Optimal Control Optimal control over an
infinite time horizon, stability, LQ optimal control.
Model Predictive Control Explicit and implicit model
predictive control.
Applications Examples from economics, logistics,
aeronautics, and robotics will be discussed.
Computational Algorithms The most common methods for numerical
solution of optimal control problems are presented.
Course material
The required course material consists of the following lecture and
exercise notes on sale at Kårbokhandeln.
[Lecture notes],
[Exercise notes].
 Ulf Jönsson et. al. Optimal Control, Lecture notes, KTH.
 Peter Ögren et. al. Exercise Notes on Optimal Control , KTH.

Supplementary material will
be handed out during the course.
Prerequisites
The student is required to have passed the course optimization SF1841
or a course with similar content. The student should hence be familiar
with concepts and theory for optimization: linear, quadratic, and
nonlinear optimization; optimality conditions, lagrangian relaxation
and duality theory. Familiarity with systems theory and state space is
not required but recommended.
Course requirements
The course requirements consista of three mandatory homework sets and a final written
examination. The homework sets may also give you bonus credits in the examination.
PhD course SF3852
It is possible to read this course as a PhD level course. For this, an
extra project and at least a B on the exam is required. Email the examiner to get details regarding the project.
Homework sets
Homework set 0: This homework set provides some review of systems theory and optimization as well as a Matlab exercise that use the toolbox CVX. I recommend that everyone does problem 2. Homework set 0 is optional and does not give bonus points to the exam, however, you can get feedback on your solutions if you hand it in before the deadline.
Each of the homework sets 13 are mandatory and consists of threefive problems.
The first twothree problems are methodology problems where you practice on the topics of the course and apply them to examples. Among the last two problems, one will focus on more theoretical nature and helps you to understand the mathematics behind the course. It can, for example, be to derive an extension of a result in the course or to provide an alternative proof of a result in the course. The other will focus on implementation and the student is required to make a Matlab program that solve a problem numerically.
You are required to get at least 10 points on each of the homeworks 1 and 3, and do the project in homework 2. Each successfully completed homework set handed in on time also gives you maximally 2 bonus points for the exam. The bonus is only valid during the year it is acquired. The exact requirements will be posted on each separate homework set. The homework sets will be posted on the homepage roughly two weeks before the deadline. The solutions to the homeworks should be uploaded on Canvas. Please prepare the solutions as a pdf in LaTeX or comparable software.
 Homework 0: This homework set covers some basic systems theory and optimization. (Due beginning of excercise session E2).
Here is the first homework set:
[pdf].
 Homework 1: This homework set covers problems on discrete dynamic programming and model predictive control. (Due beginning of excercise session E4).
Here is the first homework set:
[pdf].
Matlab code
Here are some Matlab routines that are used in the excerise notes. You may use this for the solution of your homeworks.
Written exam
You may use Beta Mathematics Handbook and the following formula sheet
(pdf) .
The exam will consist of five problems that give maximally 50
points. These problems will be similar to those in the homework
assignments and the tutorial exercises. The preliminary grade levels
are distributed according to the following rule, where the total score
is the sum of your exam score and maximally 6 bonus points from the
homework assignments (max credit is 56 points). These grade limits can
only be modified to your advantage.
Total credit (points)  Grade


4556  A
 3944  B
 3338  C
 2832  D
 2527  E
 2324  FX

The grade FX means that you are allowed to make an appeal, see below.

[info,
room, etc.].

You need to register for the exam.
Information on how to register for the exam can be found
here.
Appeal
If your total score (exam score + maximum 6 bonus points from the
homework assignments and the computational exercises) is in the range 2324
points then you are allowed to do a complementary examination for
grade E. In the complementary examination you will be asked to solve
two problems on your own. The solutions should be handed in to the
examiner in written form and you must be able to defend your solutions
in an oral examination. Contact the examiner no later than three weeks
after the final exam if you want to do a complementary exam.
Course evaluation
At the end of the course you will be asked to complete a course
evaluation form online.
The lectures and exercises are given on zoom.
Lectures
https://kthse.zoom.us/j/61600010596
Exercises
https://kthse.zoom.us/j/61945102589
Office hours: Fridays 14.0015.00
https://kthse.zoom.us/j/61945102589
Preliminary schedule for 2021
Type  Date  Time  Topic  Content (preliminary)
 L1  20210830  13:15  Introduction Discrete dynamic programming  Pages 1723
 L2  20210831  10:15  Discrete dynamic programming Discrete PMP  Pages 2224
 E1  20210901  13:15  Discrete dynamic programming Linear systems 
 L3  20210902  08:15  Discrete dynamic programming Infinite time horizon  Pages 2426
 L4  20210906  13:15  Model predictive control 
 E2  20210907  10:15  Model predictive control 
 L5  20210908  13:15  Dynamic programming  Pages 3539
 L6  20210909  08:15  Dynamic programming and review  Pages 57, 3944
 E3  20210913  13:15  Dynamic programming 
 L7  20210914  10:15  Mathematical preliminaries (ODE theory etc)  Pages 4754
 L8  20210915  13:15  Pontryagins minimum principle (PMP) (using small variations)  Pages 5962
and a basic example
 L9  20210916  08:15  PMP (control constraints)  Examples on pages 6263, 7475
 E4  20210920  13:15  PMP I 
 L10  20210921  10:15  PMP (optimal control to a manifold)  Pages 7181
 L11  20210923  08:15  PMP (generalizations)  Pages 8188
 E5  20210927  13:15  PMP II: Time optimal control 
 L12  20210928  10:15  PMP applications  Pages 9096
 E6  20210930  08:15  PMP III 
 E7  20211004  13:15  PMP IV 
 L13  20211006  13:15  Computational methods Seminar (student presentation) 
 L14  20211007  08:15  Topics: Infinite time horizon optimal control  Pages 97109
 L15  20211011  13:15  Topics/Backup 
 E8  20211013  13:15  Infinite time horizon optimal control and Review: old exams 
 L16  20211014  08:15  Review 
 Exam  20211028  08:00  Exam 

Some of last years exams can be found here:
2020
exam and
solutions 20201022.
exam and
solutions 20201216.
2019
exam and
solutions
2018
exam and
solutions
2017
exam and
solutions
exam and
solutions
2016
exam and
solutions
exam and
solutions
2015
exam and
solutions
