# Computational Control

This page collects some educational material for the course 227-0216-00L Computational Control that I have been offering at ETH Zurich in Spring since 2023.

If you are an enrolled student, you should refer to the material posted on Moodle, as the course content may change from year to year.

This material is a continuous work in progress, and some parts may be missing important details or may contain mistakes. This is NOT an online course.

The Computational Control course material © 2023 by Saverio Bolognani is licensed under CC BY-SA 4.0.

## The purpose of this course

These on the left are eight control problems. The tasks are to design

a thermostatic valve ensure proper temperature regulation in an engine

an update rule for the interest rate at a central bank to control inflation

a cruise controller to ensure safe and fuel-efficient platooning

a congestion management protocol in data networks

the logic of an artificial pancreas for diabetic patients

the controller in electric power plants to ensure a constant grid frequency

a controller to land a space rocket

an audio amplifier that ensures constant gain over a large range of frequencies.

You can check the first deck of slides (Introduction) for more details.

If you have taken an introductory Control Systems course, you should be able to work on problems 1, 6, and 8 (although fewer and fewer EE students know how to draw an electronic circuit as a feedback system!).

Problems 2 and 4 require different competences. Generally speaking, 2 requires at least some notions of Game Theory, 4 requires some notions of Distributed Systems.

At the end of the Computational Control course, you'll be able to work on problems 3, 5, 7 (and similar ones). These are control problems in which model uncertainty, stringent constraints, and complex dynamics call for advanced control solutions.

We will tackle them via cyber-physical solutions, that is, closing the loop on these plants via embedded computers. The resulting controllers will have a significant computational component, hence the name of the course.

## Teaching material

List of topics

Dynamic Programming and LQR

Model Predictive Control

Economic MPC

Robust MPC

Data-Driven Predictive Control

Markov Decision Processes

Monte Carlo Learning

Reinforcement Learning

## COCO Projects

The material for the projects (in particular, the simulators) is still not publicly available.

### 2024 Project: Artificial Pancreas

You are a control expert, and you are asked to act as a consultant for InsulinCo, a company that provides artificial pancreas (AP) care to patients with diabetes. Their AP uses an insulin pump to inject insulin in response to glucose measurements and meal predictions. InsulinCo would like to know if an advanced control method can improve the performance of their AP.

To test/validate the controllers you develop, InsulinCo has provided you with the ReplayBg simulator, which simulates the nonlinear dynamics of a human glucose regulation mechanism.

To support the data-driven approach, InsulinCo has provided the time series data for a single sample patient that they would like you to use for the data-driven controller.

You need to prepare a 5-slide presentation and a Jupyter notebook for the InsulinCo Chief Technology Office, explaining what model-based control strategy you recommend, showing how data could be used to develop a model-free control strategy, and convincing them to give you access to more data to demonstrate it.

Thanks to Simone del Favero and Elena Idi from the Bioengineering Group of the University of Padova (Italy) for providing the students with the data and the simulator and for their guest lecture during the course!

### 2023 Project: Vertical Rocket Landing

You are a control expert, and you are asked to act as a consultant for an aerospace company. This company wants to hear your opinion on their rocket landing control scheme.

You are provided with a simulator of the rocket landing dynamics, a linearized model of the rocket derived by their engineers, specifications of the control problem (limits on the actuators, constraints on the landing), and a basic working controller (PID-type) that is already implemented in the simulator.

You need to prepare a 5-slide presentation for the company's Chief Technology Officer to explain what type of controller you would recommend and show how it outperforms their current controller in an important failure scenario. You also need to prepare a Jupyter notebook for the company's technical team so that they can understand what you are proposing.

Thanks to Behçet Açikmeşe from the University of Washington (USA) for sharing his experience on planning and control of spacecraft during his guest lecture for the students of the course!

## More resources

### The control engineer flowchart

You will encounter this flowchart (credit: https://xkcd.com/1195) in the slides.

When that happens, it means that in class we worked on a collaborative flowchart that encodes the information covered so far. The purpose of the chart is to allow you to select a good candidate control solution for a plant by answering a series of crucial questions ("do you have data or a model?" "is constraint satisfaction important?" "is it a single input or a multiinput system?").

You can hear the explanation of this flowchart in the video recordings. You can try to build one yourself.

### COCO Expert GPT

At the link https://bsaver.io/COCO-Expert you can chat with COCO Expert.

It has been trained with the course material and it is simply another way to access the same content: in a conversation rather than reading decks of slides or watching video recordings.

An example of conversation is available at the link https://bsaver.io/COCO-Expert-sample

### Course notes 2023

A student of the course, Michele Zaffalon, has kindly shared his notes for the course. They are available at the link https://github.com/mzaffalon/bolognani-computational-control-notes .

### Course notes 2024

Three students of the course, Eric Aschari, Giacomo Mastroddi, and Marco Muttoni, have kindly shared their notes for the course. They are available at the link https://github.com/Jackmastro/Computational_Control_Summary

## Acknowledgements

Many thanks to the great group of TAs that made this course possible! Nicolas Lanzetti, Keith Moffat, Sophie Hall, and Alberto Padoan from the Automatic Control Laboratory at ETH Zurich and the student TAs Dylan Vogel, Henrique Caraca, and Gerasimos Maltezos.

Many thanks also to the course students who endured the natural hiccups of a new course, participated enthusiastically in class, and nominated the course for the ETH Golden Owl (awarded in 2023).