This paper presents a physics-constrained neural network framework for magnetic modeling of saturable synchronous machines, including spatial harmonics. By embedding gradient networks into the machine equations to model conservative electromagnetic behavior, the framework satisfies reciprocity and energy conservation by construction, while universally approximating any physically feasible magnetic characteristic. Unlike lookup tables and black-box neural networks, it guarantees monotonicity, invertibility, and smooth outputs, and remains highly data efficient. The method is validated using measured and finite-element method (FEM) data from a 5.6-kW permanent-magnet (PM) synchronous reluctance machine, and is demonstrated in real-time closed-loop control on an embedded platform. The results confirm accurate, physically consistent, and computationally efficient performance.
Figures & tables
Fig. 1: Electromechanical dynamics of a generic synchronous machine: (a) stator coordinates; (b) rotor coordinates. The blocks 1/s denote integration in time.
Fig. 2: Gradient network used for the magnetic models.
Fig. 3: Elementwise squareplus activation σ in ( 11 ) and its derivative dσ/dx at different values of parameter β . The shape of the algebraic sigmoid ( 12 ) is the same as the derivative of the squareplus, but shifted vertically and scaled.
Fig. 4: Vector activation σ1(z1,z2) visualized in two-dimensional case: (a) softmax ( 13 ) with β=1 ; (b) p -norm gradient ( 14 ) with p=4 and β=1 .
Fig. 5: Proposed magnetic models in rotor coordinates: (a) without spatial harmonics, q-axis symmetry by construction; (b) with spatial harmonics, shown without symmetrization for simplicity. In both cases, the function g(⋅) is given by ( 10 ).
Voltage (line-to-neutral, peak value)
2/3⋅460 V
1.00 p.u.
Current (peak value)
2⋅8.8 A
1.00 p.u.
Frequency
60 Hz
1.00 p.u.
Speed
1 800 r/min
1.00 p.u.
Power
5.6 kW
0.80 p.u.
Torque
29.7 Nm
0.80 p.u.
TABLE I: Rated Values of the 5.6-kW PM Synchronous Reluctance Machine
Fig. 6: Test bench including a 5.6-kW PM synchronous reluctance machine (left), load machine (right), and their inverter cabinet (background).
Fig. 7: Current maps: (a) id(ψd,ψq) ; (b) iq(ψd,ψq) . The surfaces show the predicted maps from the squareplus gradient model ( 11 ) with N=12 hidden units, trained on a 10% subset. Markers show the measured dataset: red indicates the 10% training subset and blue the remaining points. Gray lines show constant-current contours corresponding to the measured dataset.
Fig. 8: Flux-linkage maps: (a) ψd(id,iq) ; (b) ψq(id,iq) . The surfaces show the predicted maps from the p -norm gradient model ( 14 ) with p=8 and N=12 hidden units, trained on a 10% subset. Markers show the same measured dataset as in Fig. 7 : red indicates the 10% training subset and blue the remaining points. Gray lines show constant-current contours corresponding to the measured dataset.
Activation
Training data
erms (p.u.)
emax (p.u.)
estd (p.u.)
squareplus ( 11 )
10%
0.017
0.070
0.011
2%
0.076
0.344
0.054
softmax ( 13 )
10%
0.031
0.226
0.021
2%
0.108
0.407
0.068
p -norm
10%
0.021
0.110
0.012
gradient ( 14 )
2%
0.096
0.389
0.061
TABLE II: Comparison of Activation Functions in Current Maps Without Spatial Harmonics ( N=12 )
Activation
Training data
erms (p.u.)
emax (p.u.)
estd (p.u.)
algebraic
10%
0.016
0.044
0.010
sigmoid ( 12 )
2%
0.051
0.165
0.032
softmax ( 13 )
10%
0.007
0.033
0.004
2%
0.029
0.081
0.019
p -norm
10%
0.004
0.022
0.003
gradient ( 14 )
2%
0.018
0.061
0.012
TABLE III: Comparison of Activation Functions in Flux-Linkage Maps Without Spatial Harmonics ( N=12 )
Fig. 9: Electromagnetic torque from the p -norm gradient model with N=48 hidden units: (a) τm(iq,ϑm) at constant id corresponding to the rated MTPA current; (b) τm(ϑm) at the constant rated MTPA stator current. The curve and markers in (b) are a slice from (a). Red and blue markers show the full FEM dataset. Red markers indicate the 10% training subset.
Activation
Training data
erms (p.u.)
emax (p.u.)
estd (p.u.)
softmax ( 13 )
10%
0.011
0.062
0.007
2%
0.015
0.091
0.010
p -norm
10%
0.015
0.106
0.010
gradient ( 14 )
2%
0.025
0.140
0.016
TABLE IV: Comparison of Activation Functions with Spatial Harmonics ( N=48 ) for Torque Error
Fig. 10: Closed-loop control responses: (a) simulation with the proposed magnetic model including spatial harmonics in the plant; (b) corresponding measurement. The same controller is used in both cases, parameterized entirely by the proposed model without spatial harmonics. Speed reference step from 0 to 2 p.u. at t=0.25 s and load-torque step at t=1.25 s. From top to bottom, the responses are speed, torque, current, and flux linkage.
School of Electrical and Computer Engineering, the University of Sydney, Darlington, NSW, 2008, Australia · National Railway Research and Design Institute of Signal and Communication, Beijing 100070, China