## 2 Model Description and Problem Formulation  
Some causes of torque ripple can be explained from the PMSM mathematical model. In order to understand the periodic nature of torque ripple in PMSMs, this section is used to review the mathematical model and the additional considerations studied by [7]. The relationship between the three currents of a PMSM \(\mathbf{i}_{abcs}\), the mutual and self-inductances \(\mathbf{L}_{s}\) and the flux linkages \(\mathbf{\Psi}_{abcs}\) are given by:  
\[\mathbf{\Psi}_{abcs}=\mathbf{L}_{s}\mathbf{i}_{abcs}+\mathbf{\Psi}_{m} \tag{1}\]  
In matrix form:  
\[\left[ \begin{array}{c}\Psi_{as}\\ \Psi_{bs}\\ \Psi_{cs}\end{array} \right]=\left[ \begin{array}{ccc}L_{ssas}&L_{asbs}&L_{sscs} \\ L_{bsas}&L_{bsbs}&L_{bsscs}\\ L_{csas}&L_{csbs}&L_{cscs}\end{array} \right]\left[ \begin{array}{c}i_{as}\\ i_{bs}\\ i_{cs}\end{array} \right]+\left[ \begin{array}{c}\Psi_{asm}\\ \Psi_{bsm}\\ \Psi_{csm}\end{array} \right] \tag{2}\]  
With the flux linkages, the voltages are defined in the stator windings \(\mathbf{u}_{abcs}\) related to the windings resistances \(\mathbf{r}_{s}\) and the flux linkages:  
\[\mathbf{u}_{abcs}=\mathbf{r}_{s}\mathbf{i}_{abcs}+\frac{d\,\mathbf{\Psi}_{abcs}}{dt} \tag{3}\]where \(\mathbf{r}_{s}\) is a diagonal matrix with elements \(r_{s}\) and \(\mathbf{u}_{abs}=[u_{as},u_{bs},u_{cs}]^{T}\). Assuming that the stator windings are displaced by \(120^{\circ}\) and that the flux linkages \(\mathbf{\Psi}_{m}\) are periodic functions of the electric position \(\theta_{r}\) with magnitude \(\Psi_{m}\) established by the permanent magnet, it is obtained:  
\[\mathbf{\Psi}_{m}=\left[ \begin{array}{c}\Psi_{asm}\\ \Psi_{bsm}\\ \Psi_{csm}\end{array} \right]=\left[ \begin{array}{c}\Psi_{m}\text{sin}(\theta _{r})\\ \Psi_{m}\text{sin}(\theta_{r}-\frac{2}{3}\pi)\\ \Psi_{m}\text{sin}(\theta_{r}+\frac{2}{3}\pi)\end{array} \right] \tag{4}\]  
From Equations (3) and (1), assuming \(\mathbf{L}_{s}\) is constant:  
\[\mathbf{u}_{abs}=\mathbf{r}_{s}\mathbf{i}_{abs}+\mathbf{L}_{s}\frac{d\ \mathbf{i}_{abs}}{dt}+\frac{d\ \mathbf{\Psi}_{m}}{dt} \tag{5}\]  
Moreover, to find the electromagnetic torque developed \(T_{e}\), the co-energy \(W_{c}\) is defined:  
\[W_{c}=\frac{1}{2}\mathbf{i}_{abs}^{T}\mathbf{L}_{s}\mathbf{i}_{abs}+\mathbf{i}_{abs}^{T}\mathbf{ \Psi}_{m}+W_{PM} \tag{6}\]  
where \(W_{PM}\) is the permanent magnet energy. If \(P\) are the number of poles of PMSM, the electromagnetic torque developed is:  
\[T_{e}=\frac{P}{2}\frac{\partial W_{c}}{\partial\theta_{r}}=\frac{P\Psi_{m}}{2 }\left(i_{as}\text{cos}(\theta_{r})+i_{bs}\text{cos}(\theta_{r}-\frac{2}{3} \pi)+i_{cs}\text{cos}(\theta_{r}+\frac{2}{3}\pi)\right) \tag{7}\]  
In order to understand torque ripple in PMSM, some assumptions are reconsidered from the previous model (7); for a non-ideal PMSM, the flux linkages are not perfectly sinusoidal, and the electromotive forces \(\mathbf{e}_{abs}\) are non-cosine functions, although they are periodic functions with a peak value \(E_{p}\):  
\[\mathbf{e}_{abs}=\frac{d\ \mathbf{\Psi}_{m}}{dt}=E_{p}\omega_{r}\left[ \begin{array}{c}f_{ ss}(\theta_{r})\\ f_{bs}(\theta_{r}-\frac{2}{3}\pi)\\ f_{cs}(\theta_{r}+\frac{2}{3}\pi)\end{array} \right] \tag{8}\]  
where \(\omega_{r}=\frac{d\theta_{r}}{dt}\) is the angular velocity and \(f_{as}(\theta_{r}),f_{bs}(\theta_{r})\) and \(f_{cs}(\theta_{r})\) are periodic functions with the same shape as \(e_{as}\), \(e_{bs}\) and \(e_{cs}\) with a maximum magnitude \(\pm 1\). Since electromagnetic torque is given by:  
\[T_{e}=[e_{as}i_{as}+e_{bs}i_{bs}+e_{cs}i_{cs}]\frac{1}{\omega_{r}} \tag{9}\]  
From Equation (8):  
\[T_{e}=E_{p}[f_{as}(\theta_{r})i_{as}+f_{bs}(\theta_{r}-\frac{2}{3}\pi)i_{bs}+f _{cs}(\theta_{r}+\frac{2}{3}\pi)i_{cs}] \tag{10}\]  
Then, electromagnetic torque is periodic with \(\theta_{r}\) and is still independent of frequency. However, to produce a constant electromagnetic torque, current waveforms should be calculated. Moreover, when winding inductances are non-constant, the electromotive forces also are modified.