## 3 Description of Control Schemes
### Integrating UKF with MPC  
In this paper, we proposed a novel hybrid combination of UKF with MPC as a robust control algorithm for PMSM. The UKF algorithm consists of the following steps:  
Step 1: Initialization  
\[\widetilde{x}_{0}=E[x_{0}] \tag{20a}\]  
Equation (20a) computes the mean (expected) values of the states. Initially, the mean states are chosen as zero vector. In the next iteration, sigma points generate nonzero states which are compared with the measured values. Similarly, the covariances are initialized in Equation (20b) at time instant 0. \[P_{0}=E\bigg{[}\Big{(}x_{0}-\widetilde{x}_{0}\Big{)}\Big{(}x_{0}-\widetilde{ x}_{0}\Big{)}^{T}\bigg{]} \tag{20b}\]  
Equation (20c) adds the process noise \(E\Big{(}w^{k}\Big{)}^{T}\) and measurement noise \(E\Big{(}v^{k}\Big{)}^{T}\) vectors in the estimation process to check the disturbance rejection of the UKF observer. \[\widetilde{x}_{0}^{a}=E[x^{a}]=\bigg{[}\ \widetilde{x}_{0}^{T}\quad E\Big{(}w^{k} \Big{)}^{T}\quad E\Big{(}v^{k}\Big{)}^{T}\ \bigg{]}^{T} \tag{20c}\]  
Equation (20b) can be rewritten in matrix form as:  
\[P_{0}^{a}=E\bigg{[}\Big{(}x_{0}^{a}-\widetilde{x}_{0}^{a}\Big{)}\Big{(}x_{0} ^{a}-\widetilde{x}_{0}^{a}\Big{)}^{T}\bigg{]}=\left[ \begin{array}{ccc}P_{0} &0&0\\ 0&Q^{k}&0\\ 0&0&R^{k}\end{array} \right] \tag{20d}\]  
where \(Q^{k}=E\big{(}ww^{T}\big{)}\) and \(R^{k}=E\big{(}vv^{T}\big{)}\)[29]. Equation (20d) is the calculation process of the successive covariances. Step 2: Calculation of Sigma Points  
\[\chi_{0}^{k-1}=\widetilde{x}^{k-1} \tag{21a}\]where \(\widetilde{x}^{k-1}\) is mean of a Gaussian. The mean value is initially set to a zero vector, and the value will be updated in every iteration. Sigma points are computed as follows [32]:  
\[\chi_{i}^{k-1}=\widetilde{x}^{k-1}+\sqrt{(n+\lambda)P_{i}^{k-1}} \tag{21b}\]  
\[\chi_{i+1}^{k-1}=\widetilde{x}^{k-1}+\sqrt{(n+\lambda)P_{i}^{k-1}} \tag{21c}\]  
where \(\lambda=\alpha^{2}(n+k)-n\) is a scaling parameter, and \(\alpha\) value will be selected in the range of \(1\leq\alpha\leq 10^{-4}\), which determines the spread of sigma points around the mean value of the state vector. Equation (21b,c) computes the upper and lower spread of sigma points to cover the estimated values, respectively. \[\chi_{a}^{k-1}=\left[ \begin{array}{cc}\chi_{0}^{k-1}&\chi_{i}^{k-1}&\chi_{i +1}^{k-1}\end{array} \right] \tag{21d}\]  
where the spread of sigma points is usually set to a small positive value, the constant \(k=(3-n)\) is a secondary scaling parameter, and \(\sqrt{(n+\lambda)P_{i}^{k-1}}\) is the \(i\)th column of the matrix square root (lower triangular Cholesky factorization) [32]. Step 3: Propagation of Sigma Points through nonlinear function  
The computed sigma points from step 2 are propagated through nonlinear function \(f\), which is the mathematical model of PMSM given in Equation (4). \[\chi_{i}^{k}=f(\chi_{a}^{k-1}),i=0,\dots,2n \tag{22}\]  
The mean and covariance for \(\chi_{i}^{k}\) are approximated using a weighted sample mean, and covariance of the posterior sigma points, weights for mean and weights for covariance are calculated using Equations (23a,b) and (24a,b), respectively [33]:  
\[W_{0}^{m}=\frac{\lambda}{n+\lambda} \tag{23a}\] \[W_{i}^{m}=\frac{1}{2(n+\lambda)},i=1,\dots,2n \tag{23b}\]  
\[W_{0}^{c}=\frac{\lambda}{n+\lambda}+(1-\alpha^{2}+\beta^{{}^{\prime}}) \tag{24a}\] \[W_{i}^{c}=W_{i}^{m}=\frac{1}{2(n+\lambda)},i=1,\dots,2n \tag{24b}\]  
In Equations (23) and (24), the subscripts \(m\) and \(c\) describe the weights for mean and covariance. The constant \(\beta^{{}^{\prime}}\) is the value of the distribution parameter whose optimal value is selected as 2 for a Gaussian distribution [33]. Step 4: Prediction mean and covariance  
Equation (25a) calculates the estimated mean of the states by averaging the sigma points through the multiplication of the weighted means. Similarly, Equation (25b) calculates the updated covariances by first computing the difference between estimated and measured values and then multiplying the resultant with the weighted covariance.