Optimal and Robust Control
B3M35ORR + BE3M35ORR + BE3M35ORCHomework problem assignment #5
Use Dynamic Programming to find an optimal control policy for the following discrete-time system
x_{k+1} = x_k - 0.4 x^2_k + u_k, \qquad k=0,\dots,4
\)
The state and control variables are constrained by
\begin{array}{c}
-1 \leq x_k \leq 1\\
-0.5 \leq u_k \leq 0.5.
\end{array}
\)
Quantize the state into the levels \(-1, -0.8, \dots, 0.8, 1\), and the control into the levels \(-0.5, -0.4, \dots 0.4, 0.5\).
Use linear interpolation in cases where you need to get a value of the value function \(J^\ast\) or optimal control policy \(u^\ast\) outside the quantized values of \(x\).
Your goal is to get the state to zero as quickly as possible. In other words, choose a performance index so that the number of time instants at which \(x_k\) is non-zero is minimized.
Download the attached file 'hw5_cvutID.m' where a majority of the code solving this homework assignment has already been implemented. Fill in the gaps in the code and submit the modified version of the file. Do not forget to rename the file (and the name of the main function in it) according to your CVUT ID (KOS username). Please do not change the parameters of the simulation or vectors x, u, and t. Your solution will be evaluated based on these vectors.
- 23. ledna 2021, 22.45