|
1 |
| -# Gaussian-Process-based-Model-Predictive-Control |
| 1 | +# Gaussian-Process based Model Predictive Control |
2 | 2 | Project for the course "Statistical Learning and Stochastic Control" at University of Stuttgart
|
3 | 3 |
|
4 | 4 |
|
| 5 | +For detailed information about the project, please refer to the [Report](). |
| 6 | + |
5 | 7 | Supported Matlab Version **>= R2019a**
|
6 | 8 |
|
7 | 9 |
|
| 10 | +## Control of a Race Vehicle with unkown complex dynamics |
8 | 11 |
|
9 |
| -## Control of an Inverted Pendulum with deffect motor |
| 12 | +To run the Race Car example execute: |
| 13 | +> main_singletrack.m |
10 | 14 |
|
11 |
| -To run the Inverted Pendulum please execute |
12 |
| -> main_invertedPendulum.m |
| 15 | +<br> |
13 | 16 |
|
| 17 | +A Gaussian process is used to learn unmodeled dynamics |
| 18 | +```math |
| 19 | + x_{k+1} = f_d(x_k,u_k) + B_d * ( GP(z_k) + w ) |
14 | 20 |
|
15 |
| -## Control of a Race Vehicle with unkown true dynamics |
| 21 | + , where z_k = [Bz_x*xk ; Bz_u*uk] is the vector of selected features |
| 22 | + f_d is the dicrete nominal model |
| 23 | + w ~ N(0,\sigma_n) is the process WG noise |
| 24 | + GP is the Gaussian Process model reponsible for learning the unmodeled dynamics |
| 25 | +
|
| 26 | +``` |
| 27 | +The Gaussian Process model GP is then fed with data (X,Y+w) collected online, such that: |
| 28 | +```math |
| 29 | + X = [x_k,u_k] |
| 30 | + Y + w = pinv(B_d) * ( x_{k+1} - f_d(x_k,u_k) ) |
| 31 | +``` |
| 32 | +and it is trained (hyperparameter optimization) by maximizing the log Likelihood p(Y|X,theta), where theta is the vector of hyperparameters. |
16 | 33 |
|
17 |
| -To run the Race Car example execute: |
18 |
| -> main_singletrack.m |
19 | 34 |
|
20 |
| - |
21 | 35 |
|
| 36 | +### Results |
| 37 | + |
| 38 | + |
| 39 | +| MPC controller with Gaussian Process **deactivated** | MPC controller with **TRAINED** and **ACTIVATED** Gaussian Process | |
| 40 | +| ------------- |-------------| |
| 41 | +| <img src="./simresults/trackAnimVideo-16-Jan-2020-without-GP.gif" alt="drawing" width="400"/> | <img src="./simresults/trackAnimVideo-16-Jan-2020-with-GP-optimized.gif" alt="drawing" width="400"/> | |
| 42 | + |
| 43 | +<br> |
| 44 | + |
| 45 | +## Control of an Inverted Pendulum with deffect motor |
| 46 | + |
| 47 | +To run the Inverted Pendulum please execute |
| 48 | +> main_invertedPendulum.m |
0 commit comments