## 4 Control Design
### Linear Time-Varying Model Predictive Control  
Based on these preliminary calculations, the following OCP can be stated at each sampling time \(t_{k}\) or sampling instance \(k\), respectively, as \[\min_{\Delta\bar{\mathbf{u}}(k),\ldots,\Delta\bar{\mathbf{u}}(k+N-1)}\ \left\{\sum_{l=k}^{k+N-1}\|\Delta\bar{\mathbf{x}}(l)- \Delta\mathbf{x}_{\text{des}}(l)\|_{\mathbf{Q}}^{2}+\|\Delta\bar{\mathbf{u}}(l)-\Delta\bar{ \mathbf{u}}(l-1)\|_{\mathbf{R}}^{2}\right\},\] (22) s.t. \[\Delta\bar{x}(l+1)=\mathbf{A}_{\mathbf{d}}(k)\Delta\bar{\mathbf{x}}(l)+\mathbf{B} _{\mathbf{d}}(k)\Delta\bar{\mathbf{u}}(l), \tag{23}\] \[\Delta\bar{x}(k)=\mathbf{x}(k)-\mathbf{x}_{\text{des}}(k),\] (24) \[\Delta\bar{\mathbf{u}}(k-1)=\mathbf{u}(k-1)-\mathbf{u}_{\text{ff}}(k),\] (25) \[\Delta\bar{x}(l)\in\mathcal{X}(k)=\left\{\Delta\bar{\mathbf{x}}\! \in\!\mathbb{R}^{n}\,|\,\mathbf{x}_{\text{min}}\!-\!\mathbf{x}_{\text{des}}(k)\leq \Delta\bar{\mathbf{x}}\leq\mathbf{x}_{\text{max}}\!-\!\mathbf{x}_{\text{des}}(k)\right\},\] (26) \[\Delta\bar{\mathbf{u}}(l)\in\mathcal{U}(k)=\left\{\Delta\bar{\mathbf{u}} \!\in\!\mathbb{R}^{m}\,|\,\mathbf{u}_{\text{min}}\!-\!\mathbf{u}_{\text{ff}}(k)\leq \Delta\bar{\mathbf{u}}\leq\mathbf{u}_{\text{max}}\!-\mathbf{u}_{\text{ff}}(k)\right\},\] (27) \[l=k,k+1,\ldots,k+N-1\]  
by introducing \(\Delta\mathbf{x}_{\text{des}}(l)=\mathbf{x}_{\text{des}}(l)-\mathbf{x}_{\text{des}}(k)\), which denotes the deviation of the desired trajectory to the current operating point. The box constraints concerning the current operating point, that is, Equations (26) and (27), are stated in a similar manner. Note that the predicted states and inputs in the OCP are equipped with an additional bar, since the predicted trajectories do not coincide with the actual closed-loop trajectories, even for no plant-model mismatch because of the finite prediction horizon \(N\), see for example Reference [35] for details. The OCP is initialized by the measured state \(\mathbf{x}(k)\) and the previously implemented input \(\mathbf{u}(k-1)\). As usual in linear MPC, a quadratic cost function (22) is considered using standard MPC notation, where \(\mathbf{Q}\in\mathbb{R}^{n\times n}\) and \(\mathbf{R}\in\mathbb{R}^{m\times m}\) are positive definite weighting matrices of appropriate dimensions. The first summand in Equation (22) represents the penalty on tracking errors subject to the desired trajectory, and the second summand penalizes changes in the input vector. Hence, it is necessary to include the previous input into the OCP. Penalizing changes in the input vector offers the capability to weight the aggressiveness of the controller and to suppress oscillating input trajectories such to prevent oscillations of the system. The weighting matrices \(\mathbf{Q}\) and \(\mathbf{R}\) as well as the prediction horizon \(N\) are the tuneable parameters to obtain a required performance of the controller. The optimization at each time step is subject to the LTV system dynamics (23) concerning the fixed operation point \((\mathbf{x}_{\text{des}}(k),\mathbf{u}_{\text{ff}}(k))\) at the respective time instance \(k\). To reduce the computational complexity of the LTV MPC scheme, the changes of operating points are not considered in the prediction as it is also assumed for application in Reference [18]. In terms of small prediction horizons this approximation is appropriate. To solve the OCP from Equations (22)-(27) at each sampling instance \(k\), it is convenient to condense the problem by introducing the optimization vector  
\[\Delta\bar{\mathbf{u}}(k)=\left[ \begin{array}{c}\Delta\bar{\mathbf{z}}(k)\\ \Delta\bar{\mathbf{z}}(k+1)\\ \vdots\\ \Delta\bar{\mathbf{z}}(k+N-1)\end{array} \right]=\left[ \begin{array}{c}\Delta \bar{\mathbf{u}}(k)-\Delta\mathbf{u}(k-1)\\ \Delta\bar{\mathbf{u}}(k+1)-\Delta\bar{\mathbf{u}}(k)\\ \vdots\\ \Delta\bar{\mathbf{u}}(k+N-1)-\Delta\bar{\mathbf{u}}(k+N-2)\end{array} \right].