December 16, 2019

Some details about Model predictive control

Jacques Richalet has published in 1978 the first paper about model predictive control. In that time only trivial examples were solved with the technique. Controlling biped robots with the same approach is discussed in the literature since around 2010. It's a very powerful control technique and it make sense to explain what the idea is.

The main problem for a robot control system is to determine the next action. A robot consists of joints and the question is in which direction the joints has to be moved so that the robot is doing something useful. Answering this question with software is possible but very complicated. The reason is the absence of a model. A model is a sandbox in which an action make sense. The best example for a model is a chess engine. A chess engine accepts a move and it puts the system into the follow up state. So what is a chess engine? Somebody may argue, that it's equal to an Artificial Intelligence, but this answer is not accurate enough. A chess game can be played by two human users without any AI. The game engine provides only the sandbox in which the users can take actions. So the more elaborated answer is, that a chess engine is a model of the game of chess.

Another kind of technology goes into the similar direction which is called a physics engine. Some physics engines like bullet are available. They are the basis of modern games. The typical interaction with a physics engine api is, that the programmer is doing the following steps:

1. initialize the world with some objects: box1, box2, joint1, joint2

2. send a command to the physics engine, e.g. “joint1=-1”

3. update of the engine, e.g. “engine.step(10 milliseconds)

4. print out the values of the objects to the graphics display

A physics engine is a model. It accepts commands from the outside and is able to predict future states. The prediction gets initiated with the update-method. The programmer can decide to move the physics engine for 10 milliseconds forward in time. The principle of a physics engine can be transferred into the domain of model predictive control. The result is a new kind of problem: who should the model look like to solve a certain problem?

For example, there is a robotarm which contains of 3 joints and has a gripper. The task to is program for this robot a model which accepts some actions. The model needs to be fast and accurate at the same time. If such a model is available, it's possible to search in the game tree for a desired state. It's the same principle used for realizing chess AI and TicTacToe AI players.

The advantage of model predictive control over direct control is, the ability to figure out action sequences. Complex systems need more than a single action, but around 3-10 are needed to reach the goal state.