## 2 Modeling of Permanent Magnet Synchronous Motor  
A discrete model of the PMSM is necessary for the application of the proposed scheme. The synchronous \(dq\)-reference frame fixed to the rotor flux is derived for the said model since this scheme is more suitable than the \(\alpha\beta\)-reference frame. The major disadvantage of using the \(\alpha\beta\)-reference frame is that the UKF may converge to the wrong solution. The prediction steps might maintain the wrong solution and constantly update the estimation difference between actual and estimated voltages and currents. Wrong convergence of the solution may be avoided by a dedicated algorithm or by the hit-and-trial method [24]. However, \(dq\)-frame reference voltage equations avoid the wrong convergence solution because the equations do not fit. Therefore, using the \(dq\)-frame reference, a wrong startup is avoided. However, in the \(dq\)-frame reference, the coordinate transformation uses an estimated position. If the estimated position is wrong, then it may generate a constant error, which is a disadvantage of the \(dq\)-reference model. The PMSM has magnetic saliency with axial inductances \(L_{d}\) and \(L_{q}\). The notations used in the paper are listed in Table 2 where boldface letters show the vectors and matrices while lightface letters represent the scalar values. The PMSM's mathematical model in continuous time frame is given as [25]:  
\[\frac{di_{d}}{dt}=\frac{1}{L_{d}}(-R_{s}i_{d}+\frac{1}{2}\rho\omega_{m}L_{q}i_ {q}+v_{d}) \tag{1a}\] \[\frac{di_{q}}{dt}=\frac{1}{L_{q}}(-R_{s}i_{q}-\frac{1}{2}\rho\omega_{m}L_{d}i_ {d}+v_{q}-\frac{1}{2}\rho\omega_{m}\phi_{f})\] (1b) \[\frac{d\omega_{m}}{dt}=\frac{1}{J}(T_{e}-B_{\omega}\omega_{m}-T_{l}) \tag{1c}\]\[\frac{d\theta}{dt}=\omega_{m} \tag{1d}\]  
where \(\frac{dT_{l}}{dt}\approx 0\) and electromechanical torque, \(T_{e}=\frac{3}{2}\rho\Big{[}\phi_{f}i_{q}+(L_{d}-L_{q})i_{d}i_{q}\Big{]}\). Simplified assumptions are made to quickly evaluate the system performance, such as hysteresis and eddy currents losses are neglected, electromagnetically induced forces are sinusoidal, a saturation of magnetic material is zero, and airgap with no dynamical dependencies. In electromechanical torque, the \(\frac{3}{2}\) is the frame conversion constant, and the change in load torque for the given sample time is zero. The Taylor series expansion is used for the discretization of each state variable given in the mathematical model of PMSM as [26]:  
\[x_{j}^{k+1}=x_{j}^{k}+\sum_{l=0}^{Nj}\frac{T_{s}^{l}}{l!}\frac{d^{l}x_{j}}{dt^{ l}}\bigg{|}_{lk} \tag{2}\]  
where \(Nj\) is the number of expansion elements in the series normally used up to 1 st order, and \(j\) is the number of state variables. Inputs of the system that appear in the discrete model affect the state variables, and each state is updated by the successive iteration that improves the accuracy. The discretization of the PMSM model is as follows [27]:  
\[i_{d}^{k+1}=i_{d}^{k}+\frac{1}{L_{d}}\Big{(}-R_{s}i_{d}^{k}+\omega_{e}^{k}L_{q }i_{q}^{k}+v_{d}^{k}\Big{)}\,T_{s} \tag{3a}\] \[i_{q}^{k+1}=i_{q}^{k}+\frac{1}{L_{d}}\Big{(}-R_{s}i_{q}^{k}-\omega_{e}^{k}L_{ t}i_{d}^{k}+v_{q}^{k}-\omega_{e}^{k}\phi_{f}\Big{)}\,T_{s}\] (3b) \[T_{e}^{k+1}=\frac{3}{2}P\Big{(}\phi_{f}i_{q}^{k+1}+\big{(}L_{d}-L_{q}\big{)}i_ {d}^{k+1}i_{q}^{k+1}\Big{)} \tag{3c}\]  
The matrix representation of the nonlinear discrete-time PMSM model used in the proposed scheme is [5]:  
\[\textbf{x}^{k+1}=\textbf{F}^{k}\textbf{x}^{k}+\textbf{B}^{k}\textbf{u}^{k}+w^ {k} \tag{4a}\] \[\textbf{y}^{k}=\textbf{H}^{k}\textbf{x}^{k+1}+v^{k} \tag{4b}\]  
with  
\[\textbf{F}^{k}(\textbf{x}^{k})=\left[ \begin{array}{cccc}1-T_{s}.\frac{R_{s} }{L_{d}}&T_{s}.\omega_{m}\frac{L_{d}}{L_{d}}&0&0\\ -T_{s}.\omega_{m}\frac{L_{q}}{L_{d}}&1-T_{s}.\frac{R_{s}}{L_{q}}&-T_{s}.\frac{ \phi_{f}}{L_{q}}&0\\ 0&T_{1}&0&0\\ 0&0&T_{s}&1\end{array} \right],\]  
\[T_{1}=\frac{3}{2}T_{s}.\frac{\rho}{T}\Big{[}\phi_{f}-\big{(}L_{q}-L_{d}\big{)} i_{d}\Big{]},\]  
\[\textbf{H}^{k}(\textbf{x}^{k})=\left[