Optimal and Robust Control
B3M35ORR + BE3M35ORR + BE3M35ORCHomework problem assignment #3
Tracking Model Predictive Control
Implement tracking Model Predictive Controller (MPC) for the linear model given in the attached m-file. The tracking MPC is actually already partially implemented in the m-file (including all the parameters, like weight matrices \(\mathbf{Q}\) and \(\mathbf{R}\), predicition horizon \(N\), input constraints, ...), you only have to add several lines of code in the m-file. Your task is to take the Optimal Control Problem of the tracking MPC
\min_{\Delta\mathbf{u}_k, k=t,\dots, t+N-1}& \frac{1}{2}\sum_{k=t}^{t+N-1} (\mathbf{y}_{k+1} - r_{k+1})^T\mathbf{Q}(\mathbf{y}_{k+1} - r_{k+1}) + \Delta\mathbf{u}_k^T\mathbf{R}\Delta\mathbf{u}_k \\
\mathrm{s.t.}: &u_\mathrm{min} \leq \mathbf{u}_{k} \leq u_\mathrm{max}, \qquad k =t,\dots,t+N-1,
\end{array}\)
where \(\Delta \mathbf{u}_k := \mathbf{u}_k - \mathbf{u}_{k-1}\), and reformulate it to a Quadratic Program of the following form
\begin{array}{rl}
\min_{\mathbf{z}}& \frac{1}{2}\mathbf{z}^T \mathbf{H} \mathbf{z} + [\mathbf{x}_t^T \: \mathbf{u}_{t-1}^T \: \mathbf{r}_{t+1,\dots,t+N}^T]\,\mathbf{F}\,\mathbf{z} \\
\mathrm{s.t.}: &\mathbf{G}\mathbf{z} \leq \mathbf{W} + \mathbf{S}\left[\begin{array}{c}\mathbf{x}_t\\ \mathbf{u}_{t-1}\end{array}\right].
\end{array}
\)
where \(\mathbf{z}=\left[\begin{array}{c}\Delta \mathbf{u}_t\\ \vdots \\ \Delta \mathbf{u}_{t+N-1}\end{array}\right]\), \(\mathbf{x}_t\) is the current state value of the model, \(\mathbf{u}_{t-1}\) is the most recently applied input and \(\mathbf{r}_{t+1,\dots,t+N}\) is the reference over the current prediction horizon. The notation is a bit shaky here but meanings of these variables should be clear from the already implemented code in the attached m-file. If not, consult the lecture videos (not the lecture notes, since the tracking MPC has not been described there yet) or use the forum here on Moodle (preferrably in this order). One more useful study material for this problem could be the slides from Bemporads doctoral course on MPC.
Download the attached hw3_cvutID.m file and get familiar with the code in it. Your only goal is to derive and implement matrices \(\mathbf{H}\), \(\mathbf{F}\), \(\mathbf{G}\), \(\mathbf{W}\) and \(\mathbf{S}\). The rest has been already implemented. Please do not change the names of variables x, y and u. Your implementation will be evaluated based on these variables. As usual, rename the file and the name of the function according to your cvutID. You can submit only one m-file. If you need more functions, you can use nested functions (for details, see this).
- 23. ledna 2021, 22.44