## 3 Control Objectives and Optimal Control
### Model Predictive Control  
MPC is a multivariable control algorithm comprising an internal dynamic model of a plant, an objective function, and an optimization algorithm minimizing the cost function, which is a function of control input u. MPC can be designed based on the linear model  
Figure 8: Control scheme. Figure 7: Control objective in each operating mode on torque/speed plane. shown in Equation (13), which can be derived by discretizing the continuous dynamic model in Equation (8). \[\mathbf{x}_{k+1} =Ax_{k}+Bu_{k}\] \[y_{k+1} =C_{g^{\mathbf{x}}}\mathbf{x}_{k+1} \tag{13}\]  
The MPC prediction equation can be deduced as in [18] (note that D state space matrix is zero because it is assumed, in this paper, that MPC does not accept direct feedthrough):  
\[\underbrace{ \begin{bmatrix}x_{k+1}\\ x_{k+2}\\ x_{k+3}\\ \vdots\\ x_{k+p}\end{bmatrix} }_{\Sigma} =\underbrace{ \begin{bmatrix}A\\ A^{2}\\ A^{3}\\ \vdots\\ A^{p}\end{bmatrix} }_{P_{\mathrm{rx}}}\underbrace{ \begin{bmatrix}B_{u}&0&0& \cdots\\ AB_{u}&B_{u}&0&\cdots\\ A^{2}B_{u}&AB_{u}&B_{u}&\cdots\\ \vdots&\vdots&\vdots&\vdots\\ A^{p-1}B_{u}&A^{p-2}B_{u}&A^{p-3}Bu&\cdots\end{bmatrix} }_{P_{\mathrm{rx}}} \times\underbrace{ \begin{bmatrix}u_{k+1}\\ u_{k+2}^{2}\\ u_{k+3}^{3}\\ \vdots\\ u_{k+p}^{p}\end{bmatrix} }_{\underline{u}}\]  
\[\underbrace{ \begin{bmatrix}y_{k+1}\\ y_{k+2}\\ y_{k+3}\\ \vdots\\ y_{k+p}\end{bmatrix} }_{\underline{y}} =\underbrace{ \begin{bmatrix}C_{g}A\\ C_{g}A^{2}\\ C_{g}A^{3}\\ \vdots\\ C_{g}A^{p}\end{bmatrix} }_{P}x_{k}+\underbrace{ \begin{bmatrix}C_{g}B_{u}&0&0& \cdots\\ C_{g}AB_{u}&C_{g}B_{u}&0&\cdots\\ C_{g}A^{2}B_{u}&C_{g}AB_{u}&C_{g}B_{u}&\cdots\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ C_{g}A^{p-1}B_{u}&C_{g}A^{p-2}B_{u}&C_{g}A^{p-3}&\cdots\end{bmatrix} }_{H} \xrightarrow{\mathbf{H}}\]  
where \(p\) represents the prediction horizon, and \(\underline{u}\) can be rewritten as the following:  
\[[u_{k+1}\quad u_{k+2}\quad...\quad u_{k+c-1}\quad u_{k+c}\quad u_{k+c}\quad... \quad u_{k+c}]^{T} \tag{14}\]  
where \(c\) represents control horizon. The control formulation is achieved by minimizing the following performance criteria [5]:  
\[J=\left\|r-H\,\underline{u}_{r}-P\dot{x}_{k}-Ld\right\|_{2}^{2}+R\left\| \,\underline{u}_{r}\right\|_{2}^{2} \tag{15}\]  
where it is subject to the following constraints:  
\[\Delta\underline{u}_{i}\leq\Delta u_{i}\leq\Delta\overline{u}_{i} \tag{16}\]  
\[\underline{u}_{i}\leq u_{i}\leq\overline{u}_{i} \tag{17}\]  
where \(r\) represents the reference signal, \(\underline{u}_{i}\) the lower limit on \(u_{i}\), and \(\overline{u}_{i}\) the upper limit. \(\Delta u_{i}\) is the rate of change of input, and \(\mathrm{L}\) is a vector of ones for which their size is dependent on prediction horizon. \(\mathrm{R}\) denotes a weighting matrix, which in this paper is tuned by trial and error. \(\mathrm{d}\) is the residual between the measurement of \(\mathrm{y}\) and that estimated by the internal model. This internal model could be improved by being replaced with an observer, but the usage of an observer is not considered in this paper because the internal model proves to be accurate enough. At this stage, no constraint violation experienced. However, the full envelope controller that will be designed in the future could experience constraint violation. Therefore, an appropriate anti-wind up technique [17] will need to incorporated into the full-envelope controller in the future. The first term in the objective function is associated with a reference tracking error, and \(\mathrm{d}\) is incorporated to provide offset corrections and unbiased predictions. The second term in the optimization function lowers the control effort. Hence, \(\mathrm{R}\) allows a trade-offbetween these two contradictory problems. \(\hat{x}_{k}\) denotes measured states at each time step, which originate from the plant's internal model. The procedure for MPC controller implementation can be summarized as follows:  
1.