## 3 Description of Control Schemes
### Modeling of Model Predictive Control  
In this paper, the MPC is used due to multiple advantages, such as (a) MPC can equally handle both linear and nonlinear functions, (b) applicability on univariate and multivariate systems, (c) constraints handling and cost minimization, and (d) intuitive  
Figure 1: Schematic diagram of the proposed scheme. tuning parameters [30]. The discretized mathematical model of the PMSM in the _dq_-reference frame using the Taylor series for the MPC implementation is given as [26]:  
\[\dot{t}_{d}^{k+1}=\dot{t}_{d}^{k}-\left(\frac{R_{s}}{L_{d}}\dot{t}_{d}^{k}+\frac{ \omega_{e}L_{d}}{L_{d}}\dot{t}_{q}^{k}+\frac{1}{L_{d}}v_{d}\right)T_{s} \tag{8a}\] \[\dot{t}_{q}^{k+1}=\dot{t}_{q}^{k}-\left(\frac{\omega_{e}L_{d}}{L_{q}}\dot{t}_{d}^{k }-\frac{R_{s}}{L_{q}}\dot{t}_{q}^{k}+\frac{1}{L_{q}}v_{q}-\frac{\omega_{e}}{L_{ q}}\phi_{f}\right)T_{s} \tag{8b}\]  
The discretized model of the PMSM is summed up as state-space representation in Equation (9) which is used in the MPC block of Figure 1, where \(i_{d}\) and \(i_{q}\) currents are compared with reference currents. Three-phase currents are measured from the stator of the PMSM, converted into _dq_ transformation, and fed back to the MPC for comparison with the reference currents. All the parameters are constants in \(A_{MPC}\) matrix except for the electrical speed \(\omega_{e}\) which is increased or decreased as defined by the error vector of the objective function. \[\dot{\mathbf{i}}_{s}^{k+1}=A_{MPC}\dot{\mathbf{i}}_{s}^{k}+B_{MPC}\mathbf{u}_{s} \tag{9}\]  
where \(A_{MPC}=\left[ \begin{array}{cc}-\frac{R_{s}}{L_{d}}&\frac{\omega_{e}L_{d}}{ L_{d}}\\ -\frac{\omega_{e}L_{d}}{L_{q}}&-\frac{R_{s}}{L_{q}}\end{array} \right]\), \(B_{MPC}=\left[ \begin{array}{cc}L_{d}&0\\ 0&L_{q}\end{array} \right]\), and \(\mathbf{u}_{s}=\left[ \begin{array}{c}v_{d}\\ v_{q}-\omega_{e}\phi_{f}\end{array} \right]\). The main objective is to compute the input vector for the MPC. For the modeling of the MPC algorithm, we initialize the current prediction value with \(\dot{\mathbf{i}}_{sm}^{0}=0\) for \(k=0,1,2,3,\ldots,\infty\). The iterative process will continue till the error reduces to the optimum level [11]. The predictive error vector is computed as:  
\[\mathbf{e}_{s}^{k+1}=\dot{\mathbf{i}}_{s}^{k+1}-\dot{\mathbf{i}}_{sm}^{k+1|k} \tag{10a}\] \[\left[ \begin{array}{c}\dot{\mathbf{i}}_{sp}^{k+2|k}\\ \dot{\mathbf{i}}_{sp}^{k+2|k}\\ \dot{\mathbf{i}}_{sp}^{k+3|k}\end{array} \right]=\left[ \begin{array}{c}\dot{ \mathbf{i}}_{sm}^{k+2|k}\\ \dot{\mathbf{i}}_{sm}^{k+3|k}\end{array} \right]+\mathbf{h}.\mathbf{e}_{s}^{k +1} \tag{10b}\]  
where \(\mathbf{h}=\left[ \begin{array}{cc}h_{1}&h_{2}&h_{3}\end{array} \right]^{T}\). Equation (10a) is the synchronous rotating frame stator current predictive error vector, which is calculated by the vector difference of current predictive values at time \(k+1\) and \(k\), respectively. According to the required reference speed, a correction factor h is used to correct the predictive values and the corrected current predictive value vector \(i_{sp}\) is updated. Equation (10a) is used in Equation (10b) to update the predictive vector. The time-shifting is done by following equations in state-space while subscripts 0 shows the time-shifted vectors of the corrected predictive vector for the current values. \[\left[ \begin{array}{c}\dot{\mathbf{i}}_{s0}^{k+1|k}\\ \dot{\mathbf{i}}_{s0}^{k+2|k}\\ \dot{\mathbf{i}}_{s0}^{k+3|k}\end{array} \right]=\left[ \begin{array}{cc}0&1&0 \\ 0&0&1\\ 0&0&1\end{array} \right]\left[ \begin{array}{c}\dot{\mathbf{i}}_{sp}^{k+1|k}\\ \dot{\mathbf{i}}_{sp}^{k+2|k}\\ \dot{\mathbf{i}}_{sp}^{k+3|k}\end{array}