0% found this document useful (0 votes)
10 views

01 - Intro

The document outlines a course on Computational Control at ETH Zurich, focusing on advanced control design for cyber-physical systems. It includes practical case studies for designing control systems in various applications, such as automotive, finance, and healthcare. The course structure includes lectures, tutorials, a project, and grading criteria, emphasizing the importance of mathematical optimization and convexity in control system design.

Uploaded by

Ahmet Çelik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

01 - Intro

The document outlines a course on Computational Control at ETH Zurich, focusing on advanced control design for cyber-physical systems. It includes practical case studies for designing control systems in various applications, such as automotive, finance, and healthcare. The course structure includes lectures, tutorials, a project, and grading criteria, emphasizing the importance of mathematical optimization and convexity in control system design.

Uploaded by

Ahmet Çelik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Computational Control

Intro

Saverio Bolognani

Automatic Control Laboratory (IfA)


ETH Zurich
Disturbances Performance output
Plant

Actuation / input Sensing / measurements

Controller

1 / 33
A room full of control experts

Look around you, form little groups (3-4 people).

You are a team of experts in design of control systems.

Nominate one person that is responsible to


1 keeping time
2 making sure everybody has the chance to contribute
3 representing the team

Use 5 minutes to check what competences you have in your team.


▶ What methods to you know to design a control system?
- math formalism: differential equations, state space, transfer functions, games, ...
- modeling: first-principle models, identification, data fitting, black box, ...
- control architectures: feedback, feedforward, multi-agent, distributed, ...
- analysis tools: stability analisys, linear / nonlinear, spectral, stochastic, ...
- design methods: pole placement, frequency, optimal control, tuning methods, ....

No need to write down anything.

2 / 33
1 2

3 4

5 6

7 8

2 / 33
We will go through these 8 examples one by one.

For each example I will describe the plant and present a control challenge.

Disturbances Performance output


Plant
Complete the block diagram

▶ what is the plant Actuation / input Sensing / measurements


▶ what is the input
▶ what is measured
Controller
▶ what is the controller

Discuss how you would attack the challenge, given your team’s competences.

▶ Do you think you have the necessary competences?


▶ Would you take up the challenge?
▶ If yes, what methods would you use?
▶ If no, what’s blocking you?

Quick! 3 minutes per case.

3 / 33
Case 1

Your job is to design the thermostatic valve that regulates the flow of coolant
through a car engine and a car radiator.
Goal: design the valve to ensure that the temperature of the engine lies in the
desired range.

4 / 33
Case 2

As of today, central banks adjust their interest rate according to Taylor’s


formula
▶ i: interest rate
▶ r ∗ : natural interest rate
▶ π ∗ : desired inflation rate
▶ π: inflation rate
The underlying assumption is that low interest rates promote borrowing, which
causes inflation (and viceversa)
Goal: study the stability of this rule and propose a better one.

5 / 33
Case 3

Autonomous trucks are expected to form a platoon.


The truck speed should be regulated based on the measured distance from
the truck in front.
Goal: design a cruise controller to ensure safety and minimize fuel use.

6 / 33
Case 4

Each computer in a data network needs to decide its transfer rate.


Concurrent transmissions by multiple computers cause congestion in the
network, which needs to be prevented.
In today’s protocols, individual computer slow down when they detect
congestion (e.g., lost packets) and speed up otherwise.
Goal: improve these protocols and guarantee efficient use of the data
network.

7 / 33
Case 5

A healthy pancreas produces insulin when a high level of sugar in the blood is
detected, to maintain it in an optimal range.
In people affected by diabetes, the pancreas does not perform this function
properly. It is possible to assiste them with an artificial pancreas that releases
insulin when needed.
The artificial pancreas can measure the sugar in the patient blood and the
patient can signal when they are having a meal. The level of sugar needs to
stay in a prescribed range, and absolutely above a critical lower limit.
Goal: design the artificial pancreas logic.

8 / 33
Case 6

In a power grid it is fundamental to balance generated power and demand


When there is a mismatch, generators automatically release or absorb kinetic
energy by slowing down or speeding up
Their speed is reflected in the grid frequency, which deviates slightly from 50
Hz
Goal: design a system to adjust the generated power Pm and balance supply
and demand

9 / 33
Case 7

A rocket launch comes with a predetermined trajectory that needs to be


followed.
The thrust of the rocket can be adjusted to make corrections.
We want to bring the rocket back to Earth and land it.
It is imperative to maintain orientation within strict limits and to regulate its
speed to exactly zero at the landing point.
Goal: design a rocket landing controller.

10 / 33
Case 8

An audio amplifier is made of discrete elements and includes a vacuum tube


(power amplifier).
The amplification β of the tube is very high but uncertain.
Goal: design the circuit to guarantee lower but precise amplification over a
large frequency band.

Vin iB i Vout
RB β −RL
+

VE

RE

11 / 33
Computational Control

Advanced control design for cyber-physical systems

Cyber-physical systems
Systems in which the controller is an advanced embedded computer
that can sense and actuate a physical plant.

In this course we will


Focus on designing controllers for complex physical systems
Look at control problems that PID controllers can’t solve ... 5%?
Exploit the power of real-time computation and data

12 / 33
Automatic Control Lab http://control.ee.ethz.ch

Saverio Bolognani
[email protected] Sophie Hall
www.bsaver.io

Keith Moffat

Nicolas Lanzetti

Alberto Padoan

13 / 33
Course logistics

Lectures
▶ Every Monday 10:15 - 12:00 in HG D 1.1

Tutorials
▶ Every Wednesday 10:15 - 12:00 in HG E 1.2

Office hours
▶ Via the Moodle forum
▶ For any communication that cannot happen on the forum, via email

Course website on Moodle


▶ Lecture slides should be there the day before each lecture or immediately after
▶ Exercises from the tutorials + solutions + forum discussion
▶ Announcements (you are responsible to check)

Video recording and streaming


▶ Lectures only
▶ Restricted access on https://video.ethz.ch, see Moodle for password.

14 / 33
Grading and exam

6 credits

Performance assessment
▶ 30% of the final grade is based on a final project
▶ 70% based on a written final exam
- No aids, in August (location and exact date t.b.a.)
▶ No oral exam

Prerequisites
▶ Control systems fundamentals
▶ Linear algebra

Useful / will learn as needed


▶ Convex optimization
▶ Linear systems theory (reachability, controllability, ...)
▶ Lyapunov stability theory

15 / 33
Project

Students will be provided with a real-world control problem.


The problem description will be provided in the form of natural language
description of the desired specifications.
A basic benchmark control solution will be provided.
A numerical simulator will be provided.

You as a Control Expert


Imagine that you have to convince a stakeholder to replace the current controller
with an advanced controller that you recommend.

In the project report (python notebook + slides), you will have to


1 Illustrate why the current control strategy is not appropriate.
2 Propose an advanced control strategy among those seen in class.
3 Provide evidence of its effectiveness and appropriateness.
More info in the next tutorial!

16 / 33
Basic concepts in convex optimization
What are computers good at?

Linear algebra Fixed point iterations

0.8

0.6

0.4

0.2

0
-1 -0.5 0 0.5 1

17 / 33
Mathematical optimization

Core decision problem in most computational control schemes

minimize x∈X f (x)


subject to g(x) ≤ 0
h(x) = 0.

x ∈ X ⊆ Rn is the decision variable


f : Rn → R is a cost function
g : Rn → Rm describes inequality constraints
h : Rn → Rp describes equality constraints

18 / 33
Convexity

x 00 x0 x 00 x0
t=0 t=1
tx 0 + (1 − t)x 00 tx 0 + (1 − t)x”
0≤t≤1 0≤t≤1

Convex sets

x′ ∈ X & x ′′ ∈ X ⇒ tx ′ + (1 − t)x ′′ ∈ X ∀0≤t≤1

Convex functions

ϕ(tx ′ + (1 − t)x”) ≤ tϕ(x ′ ) + (1 − t)ϕ(x”) ∀0≤t≤1

19 / 33
Convex sets and convex functions

?
g(x) convex ⇔ {g(x) ≤ c} convex

20 / 33
?
g(x) convex ⇒ {g(x) ≤ c} convex

We need to prove that if

x ′ ∈ {g(x) ≤ c} and x ′′ ∈ {g(x) ≤ c}

then for all 0 ≤ t ≤ 1, the point tx ′ + (1 − t)x ′′ ∈ {g(x) ≤ c}.


That is, we have to prove that g(tx ′ + (1 − t)x ′′ ) ≤ 0.
Because of convexity of g(·), and because t ≤ c and 1 − t ≥ c, we have that

g(tx ′ + (1 − t)x ′′ ) ≤ tg(x ′ ) + (1 − t)g(x ′′ ) ≤ tc + (1 − t)c = c.

?
g(x) convex ⇐ {g(x) ≤ c} convex

It’s not true, as shown by any of these counterexamples.

g(x) = −e−x g(x) = sin(x) + x ...

21 / 33
Common convex sets

Halfspaces

{x | a⊤ x ≤ b}

Balls

{x | ∥x − c∥ < r}

a> x ≤ b c c

a> x = b r

22 / 33
Supporting hyperplanes

Theorem
If a set is convex, then there exists a supporting hyperplane at every point z on its
boundary.

If the set is defined as {x | g(x) ≤ 0}, then the supporting hyperplane is

x | ∇g(z)⊤ (x − z) ≤ 0 that is x | ∇g(z)⊤ x ≤ ∇g(z)⊤ z


| {z } | {z }
a⊤ b

x
∇g (z)
z

23 / 33
Unions and intersection of set

Is the union of convex sets a convex set?


Is the intersection of convex sets a convex set?

Try to prove it
Given a statement, prove that it’s true (deductive proof) or false (counterexample).

Polytopes
Intersection of hyperplanes

{x | a⊤
i x ≤ b ∀i = 1, . . . , r} Ax ≤ b

ai> x = b
{x | Ax ≤ b}

24 / 33
Common convex functions

Affine functions
f (x) = a⊤ x + b
Norms
f (x) = ∥x − c∥
Quadratic functions

f (x) = x ⊤ Ax + b⊤ x A ⪰ 0 (positive semi-definite)

25 / 33
First and second derivatives
First-order condition
If f is differentiable on a convex domain, then

f convex ⇔ f (y) ≥ f (x) + ∇f (x)⊤ (y − x) ∀x, y

f (x) + ∇f (x)> (y − x)

Second-order condition
If f is twice differentiable on a convex domain, then

f convex ⇔ ∇2 f (x) ⪰ 0 ∀x

26 / 33
Convex optimization problems

minimize x∈X f (x)


subject to g(x) ≤ 0
h(x) = 0.

X convex set
f convex function
g convex function
h affine function

Convex feasible set: X ∩ {x | g(x) ≤ 0} ∩ {x | h(x) = 0}

Convex optimization problems are much simpler to tackle computationally


compared to general optimization problems.
Why?

27 / 33
Local optimality conditions (1)

x ∗ is a local optimum if there exists R such that

f (z) ≥ f (x ∗ ) for all feasible z with ∥z − x ∗ ∥ ≤ R

Proposition
Any local optimum of a convex problem is a global optimum.

Proof:
Suppose x ∗ is locally optimal, but there exists y such that f (y) < f (x ∗ ).
Consider z = ty + (1 − t)x ∗ with t = R
2∥y−x ∗ ∥
. z is feasible, thanks to convexity.
z is inside the ball of radius R, because ∥z − x ∗ ∥ = t∥y − x ∗ ∥ = R/2.
Because of convexity,

f (z) ≤ tf (y) + (1 − t)f (x ∗ ) < tf (x ∗ ) + (1 − t)f (x ∗ ) = f (x ∗ ),

which contadicts the local optimality assumption.

28 / 33
Local optimality conditions (2)

Proposition
x ∗ is a local optimum for a differentiable problem if and only if

∇f (x ∗ )⊤ (y − x ∗ ) ≥ 0 for all feasible y

∇f (x ∗ ) ∇f (x ∗ )

x∗ x∗

y y

If the problem is unconstrained → ∇f (x ∗ ) = 0

29 / 33
Constrained case

minimize x∈X f (x)


subject to g(x) ≤ 0
h(x) = 0.

∇g (x)

∇f (x) ∇f (x) = 0

30 / 33
Constrained case

∇g (x)

∇f (x) ∇f (x) = 0

There exist∗ multipliers / dual variables µ such that




∇f (x) + µ ∇g(x) = 0
 µ≥0
g(x) ≤ 0

µi gi (x) = 0 ∀i

31 / 33
Solving convex optimization problems

KKT conditions

∇f (x) + µ⊤ ∇g(x) = 0




µ ≥ 0
∇g (x)

∇f (x) = 0
∇f (x)
g(x) ≤ 0


µi gi (x) = 0 ∀i

iterative algorithms to solve (KKT)


Lagrangian: function whose
iterative gradient-based algorithms
saddle-point solves (KKT)
interior point algorithms

Linear algebra + zero-finding = easy

32 / 33
Resources

https://web.stanford.edu/~boyd/cvxbook/

Lecture slides
Book “Convex Optimization” free to download
Code and toolboxes (CVX)
Exercises
Open online course

33 / 33
This work is licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License

https://bsaver.io/COCO

You might also like