Gradient-Network Magnetic Maps#
This document describes the motulator_bearingless.gradnet module, which corresponds to motulator.drive.gradnet. As in motulator, the magnetic maps are gradient networks [Li et al., 2026], [Chaudhari et al., 2025]: the machine model uses the energy-based current map and the control system the co-energy-based flux map. The networks are evaluated with NumPy. They are trained on the finite-element data of Finite-Element Data.
Network#
The softmax gradient network of \(N\) hidden units is
with the positive semidefinite diagonal matrix \(\mathbf{A}_0\). Its Jacobian is symmetric and positive semidefinite, so that it is the gradient of a convex function of the input \(\mathbf{x}\). The input and the output are in per-unit quantities.
Current Map#
The current map of the machine model follows from the magnetic energy
and it needs no iteration. The input of motulator_bearingless.gradnet.CurrentMap consists of the flux linkages and the displacement. motulator_bearingless.gradnet.CurrentMapWithHarmonics also has the periodic features \(\exp(\jj k\thetaM)\) of the rotor angle as inputs, and the corresponding outputs give the last term of (3). The period of the maps is \(60^\circ\), so that \(k = 6\) is the fundamental order. Unlike in motulator, there can be several orders. The trained network has \(k = 6\) and \(k = 36\), since the slot harmonics of the 36-slot stator dominate the torque ripple. The orders and the type of the map are saved with the network, see motulator_bearingless.gradnet.GradNetFunction.
The energy is convex in the flux linkages. Checks of the finite-element model at selected operating points indicate that the unbalanced magnetic pull is destabilizing also at constant flux linkages, so that the energy is concave in the displacement, see Finite-Element Data. Therefore, the network approximates the shifted energy \(W + k_q|\qM|^2/2\) by a convex function. At a constant rotor angle and with a positive definite incremental inductance matrix, the Schur complement of the Hessian of the shifted energy is \(k_q\mathbf{I} - \partial\fM/\partial\qM\), where the derivative is taken at constant currents. The shifted energy is thus jointly convex where this matrix is positive semidefinite, i.e., where \(k_q\) exceeds the stiffness of the pull at constant currents, see the example 2.6-kW bearingless SyRM, GradNet magnetic maps. The chosen \(k_q\) covers almost all of the data, see Finite-Element Data. Where it does not, the convex network cannot represent the local curvature of the energy exactly.
Flux Map#
The flux map of the control system follows from the co-energy
The network represents a convex co-energy. The co-energy of the finite-element model is jointly convex in the currents and the displacement at the points checked, see Finite-Element Data. motulator_bearingless.gradnet.FluxMap gives the flux linkages, the force, and their Jacobian as functions of the currents and the displacement, which is what the controller needs. The network is trained without the rotor angle on the same data. It is thus a weighted least-squares fit over the rotor angle, which approximates the average over the angle, the weights depending on the magnitudes of the two-pole output and the force. The linear term of the currents has a lower bound of 2 mH, which represents the leakage inductance remaining in deep saturation and keeps the map invertible also outside the range of the data.
The current maps and the flux map are trained separately, so that the flux map is not the exact inverse of a current map. In the simulations, their mismatch is a model error of the controller, in addition to the omitted spatial harmonics.
Symmetries#
The state function of a four-pole rotor in a symmetrical six-phase stator without zero-sequence currents is periodic in the rotor angle with the period of \(60^\circ\), and it is invariant under the group of 16 elements generated by
reversal of the currents or flux linkages, \((-\ish{1}, -\ish{2}, \qM, \thetaM)\),
mirroring about the d-axis, \((\ish{1}^*, \ish{2}^*, \qM^*, -\thetaM)\), and
turning the rotor by \(90^\circ\) and the stator by \(60^\circ\) in the opposite direction, \((-\jj\ish{1}, -\ish{2}, -\jj\qM, \thetaM + 30^\circ)\).
The output of the network is averaged over the group, see motulator_bearingless.gradnet.symmetry_group(). Hence, the symmetries hold by construction, e.g., there is no force at a centric rotor without the two-pole current. This averaging generalizes the symmetrization about the d-axis of [Li et al., 2026] to the bearingless machine.