# Research on Fault Diagnosis Algorithm of Ship Electric Propulsion Motor
## 2 Theoretical Background  
### Mathematical Model of PMSM under Interturn Short-Circuit Fault  
The equivalent diagram of PMSM under the inter-turn short-circuit fault is shown in Figure 2. It is assumed that the inter-turn short-circuit fault occurs on the a-phase stator winding of the PMSM. In the figure, a short circuit is added to the a-phase winding of the motor. The short-circuit resistance \(R_{f}\) divides the a-phase winding into two parts: \(a_{1}\) and \(a_{2}\), where \(a_{1}\) represents the normal part, \(a_{2}\) represents the fault part, and the current \(i_{f}\) is the short-circuit current flowing through the resistance \(R_{f}\). The short-circuit turn ratio is defined as:  
\[u=\frac{n}{N} \tag{1}\]  
where \(n\) indicates the number of short-circuit turns for the phase stator winding, and \(N\) indicates the total number of turns of a phase stator winding. Figure 1: The diagnosis process of the proposed method. Figure 2: PMSM equivalent model of a phase inter-turn short-circuited fault. In the case of an inter-turn short-circuit fault, the voltage equation of PMSM can be expressed as:  
\[V_{sf}=R_{sf}i_{sf}+L_{sf}\frac{di_{sf}}{dt}+e_{sf}+V_{0} \tag{2}\]  
\(V_{sf}\) is defined as:  
\[V_{sf}= \begin{bmatrix}R_{a1}+R_{a2}&0&0&-R_{a2}\\ 0&R_{b}&0&0\\ 0&0&R_{c}&0\\ R_{a2}&0&0&-u(R_{a1}+R_{a2})-R_{f}\end{bmatrix}  \tag{3}\]  
where \(V_{sf}\) denotes the resistance matrix; \(R_{f}\) denotes the fault resistance, \(R_{a1}\), \(R_{a2}\), \(R_{b}\), and \(R_{c}\) denote the resistance of stator windings \(a_{1}\), \(a_{2}\), \(b\), and \(c\), respectively; \(i_{sf}= \begin{bmatrix}i_{a}&i_{b}&i_{c}&i_{d}\end{bmatrix} ^{T}\) denotes the current matrix; \(i_{a}\), \(i_{b}\), and \(i_{c}\) denote the stator winding currents of phases \(a\), \(b\), and \(c\), respectively; \(i_{f}\) denotes the short-circuit current. The inductance matrix can be expressed as:  
\[L_{sf}= \begin{bmatrix}L_{a1}+L_{a2}+2M_{a1a2}&M_{a1b}+M_{a2b}&M_{a1c}+M_{a2c}& -L_{a2}-M_{a1a2}\\ M_{a1b}+M_{a2b}&L_{b}&M_{bc}&-M_{a2b}\\ M_{a1c+}M_{a2c}&M_{bc}&L_{c}&-M_{a2c}\\ L_{a2}+M_{a1a2}&M_{a2b}&M_{a2c}&-L_{a2}\end{bmatrix}  \tag{4}\]  
where \(L_{a1}\), \(L_{a2}\), \(L_{b}\), and \(L_{c}\) denote the self-inductance of stator windings \(a_{1}\), \(a_{2}\), \(b\), and \(c\), respectively; \(M_{j,k}\) indicates the mutual induction between stator windings \(j\) and \(k\) (\(j\in\{a_{1},a_{2},b,c\}\) and \(k\in\{a_{1},a_{2},b,c\}\)). The counter electromotive force matrix of the three-phase stator winding and short-circuit winding can be expressed as:  
\[e_{sf}= \begin{bmatrix}e_{a}\\ e_{b}\\ e_{c}\\ e_{d}\end{bmatrix} =\frac{d}{dt} \begin{bmatrix}\lambda_{PM,a}\\ \lambda_{PM,b}\\ \lambda_{PM,c}\\ \lambda_{PM,f}\end{bmatrix}  \tag{5}\]  
\[\left\{ \begin{array}{c}\lambda_{PM,a}=\lambda_{PM,1}cos(\theta)+\sum_{v=2k+ 1}\lambda_{PM,v}cos(v\theta-\theta_{v})\\ \lambda_{PM,b}=\lambda_{PM,1}cos(\theta-\frac{2\Pi}{3})+\sum_{v=2k+1}\lambda_ {PM,v}cos(v\theta-\theta_{v}\frac{2\Pi}{3})\\ \lambda_{PM,b}=\lambda_{PM,1}cos(\theta+\frac{2\Pi}{3})+\sum_{v=2k+1}\lambda_ {PM,v}cos(v\theta-\theta_{v}+v\frac{2\Pi}{3})\\ \lambda_{PM,b}=u\lambda_{PM,a}\end{array} \right. \tag{6}\]  
where \(k\in Z\), \(\lambda_{PM,1}\) denotes the fundamental amplitude of the flux linkage; \(\lambda_{PM,v}\) denotes the \(v\)th harmonic amplitude of the flux linkage; \(\lambda_{PM,f}\) denotes the flux linkage of the short-circuit winding; \(\theta\) denotes the rotor electrical angle; \(\theta_{v}\) denotes the angle between the fundamental and the \(v\)th harmonic of the flux linkage; \(V_{0}= \begin{bmatrix}V_{0}&V_{0}&V_{0}&0\end{bmatrix} ^{T}\) denotes the zero-sequence voltage. The three-phase winding resistance, self-inductance, and mutual inductance of the normal PMSM are equal. The relationship between the short-circuit turn ratio and the resistance, inductance, and back electromotive force in the stator winding can be expressed as:  
\[\left\{ \begin{array}{c}R_{a1}=(1-u)R_{a}\\ R_{a2}=uR_{a}\\ L_{a1}=(1-u)^{2}L_{a}\\ L_{a2}=u^{2}L_{a}\end{array} \right. \tag{7}\]\[