# A PINN-Based Nonlinear PMSM Electromagnetic Model Using Differential Inductance Theory
## 2 The Nonlinear PMSM Electromagnetic Model Based on Differential Inductance
### PMSM Equations in the ABC Frame  
When the electrical angle \(\theta_{e}\) is constant, the inductance, magnetic energy, and flux linkage of the motor are all functions of current only. Following the definition of differential inductance, the armature flux linkage \(\mathbf{\psi}_{abc\_\text{AM}}\) in the ABC frame can be expressed as:  
\[\mathbf{\psi}_{abc\_\text{AM}}|_{\theta_{e}}=\left(\int_{0}^{\mathbf{i}_{abc }}\mathbf{L}_{abc}\mathbf{d}\mathbf{i}_{abc}\right)|_{\theta_{e}} \tag{2}\]  
In (2), \(\mathbf{L}_{abc}\) and \(\mathbf{i}_{abc}\) denote the differential inductance matrix and current vector in the ABC frame, respectively. When there is no current excitation, the flux linkage is provided only by the permanent magnet, so the initial condition for the integration of the above equation is 0. When incorporating the permanent magnet flux linkage \(\mathbf{\psi}_{abc\_\text{PM}}\), the total flux linkage of the motor in the ABC stationary reference frame can be expressed as:  
\[\mathbf{\psi}_{abc}=\mathbf{\psi}_{abc\_\text{PM}}+\mathbf{\psi}_{abc\_\text{AM}} \tag{3}\]  
Consider the conservation of energy in the motor system in the steady state. Excluding iron losses and high-frequency eddy current effects, the electrical energy input to the motor system \(W_{el}\) is fully converted into mechanical energy \(W_{mec}\) and magnetic energy \(W_{m}\):  
\[\mathbf{d}W_{mec}=\mathbf{d}W_{el}-\mathbf{d}W_{m} \tag{4}\]  
Among them:  
\[\mathbf{d}W_{el}=\mathbf{i}_{abc}^{T}\mathbf{u}_{abc}\mathbf{d}t=\mathbf{i}_{ abc}^{T}\mathbf{d}\mathbf{\psi}_{abc} \tag{5}\]  
\[\mathbf{d}W_{mec}=T\mathbf{d}\theta_{mec} \tag{6}\]  
where \(\theta_{mec}\) is the mechanical angle (\(\theta_{e}=n_{p}\theta_{mec}\), \(n_{p}\) is the number of pole pairs). In this system, all physical quantities in steady-state conditions are related only to the excitation \(\mathbf{i}_{abc}\) and the electrical angle \(\theta_{e}\), both \(\mathbf{i}_{abc}\) and \(\theta_{e}\) can be considered independent state variables. It follows that the system energies may be expressed as total differential forms with respect to variations in \(\mathbf{i}_{abc}\) and \(\theta_{e}\):  
\[ \begin{array}{ll}\mathrm{d}W_{d}&=\mathbf{i}_{abc}^{T}\frac{\partial\Psi_{abc }}{\partial\mathbf{i}_{abc}}\mathrm{d}\mathbf{i}_{abc}+\mathbf{i}_{abc}^{T} \frac{\partial\Psi_{abc}}{\partial\theta_{e}}\mathrm{d}\theta_{e}\\ &=\mathbf{i}_{abc}^{T}\mathbf{L}_{abc}\mathbf{i}_{abc}+\mathbf{i}_{abc}^{T} \frac{\partial\Psi_{abc}}{\partial\theta_{e}}\mathrm{d}\theta_{e}\\ &\mathrm{d}W_{m}&=\frac{\partial W_{m}}{\partial\theta_{e}}\mathrm{d}\theta_ {e}+\left[\begin{array}{cc}\frac{\partial W_{m}}{\partial a}&\frac{\partial W _{m}}{\partial b}&\frac{\partial W_{m}}{\partial c}\\ \end{array}\right]\mathrm{d}\mathbf{i}_{abc}\\ &=\frac{\partial W_{m}}{\partial\theta_{e}}\mathrm{d}\theta_{e}+W_{m}( \mathbf{i}_{abc})\
abla^{T}\mathrm{d}\mathbf{i}_{abc}\end{array}  \tag{8}\]  
Substituting (6)-(8) into (4) and collapsing gives:  
\[\left[T+n_{p}\left(\frac{\partial W_{m}}{\partial\theta_{e}}-\mathbf{i}_{abc }^{T}\frac{\partial\Psi_{abc}}{\partial\theta_{e}}\right)\right]\mathrm{d} \theta+\left(W_{m}(\mathbf{i}_{abc})\
abla^{T}-\mathbf{i}_{abc}^{T}\mathbf{L}_ {abc}\right)\mathrm{d}\mathbf{i}_{abc}=0 \tag{9}\]  
Since the above equation holds for any \(\mathbf{i}_{abc}\) and \(\theta_{e}\) while \(\mathbf{i}_{abc}\) and \(\theta_{e}\) are independent variables, the coefficients before \(\mathbf{di}_{abc}\) and \(\mathrm{d}\theta_{e}\) must be constant to zero.