motulator_bearingless.control
=============================

.. py:module:: motulator_bearingless.control

.. autoapi-nested-parse::

   Force control of six-phase bearingless synchronous machines.

   Two force control methods are implemented. In direct force control, the radial force
   and the torque are controlled directly by means of feedback linearization, based on a
   nonlinear electromagnetic model [#Das2026]_. The force control law is designed in
   stator coordinates and augmented with a disturbance observer. The stator flux linkages
   of the two planes are estimated using a state observer in rotor coordinates. The rotor
   angle and the rotor speed are either measured or estimated by the observer. In
   current-based force control, the four-pole plane is controlled by a vector controller
   of motulator, and the radial force reference is converted to the current reference of
   the two-pole plane, which is current-controlled, in the same manner as the common and
   differential modes of multi-three-phase machines are controlled in
   `motulator_multiphase`. In both methods, the rotor displacement is measured, and it can
   be controlled by means of an outer levitation controller.

   .. rubric:: References

   .. [#Das2026] Das, Martin, Kontodinas, Hinkkanen, "Direct force control of six-phase
      bearingless synchronous machines," Proc. ICEM, 2026,
      https://doi.org/10.1109/ICEM68283.2026.11757980

   .. [#Hin2018] Hinkkanen, Saarakkala, Awan, Mölsä, Tuovinen, "Observers for sensorless
      synchronous motor drives: Framework for design and analysis," IEEE Trans. Ind. Appl.,
      2018, https://doi.org/10.1109/TIA.2018.2858753

   .. [#Sok2019] Sokolov, Gruber, Saarakkala, Hinkkanen, "Modeling of a bearingless
      synchronous reluctance motor with combined windings," Proc. IEEE ECCE, 2019,
      https://doi.org/10.1109/ECCE.2019.8913000

   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   motulator_bearingless.control.BearinglessControlSystem
   motulator_bearingless.control.BearinglessMagneticModel
   motulator_bearingless.control.BearinglessSynchronousMachinePars
   motulator_bearingless.control.CurrentBasedForceControlSystem
   motulator_bearingless.control.CurrentBasedForceController
   motulator_bearingless.control.DirectForceControlSystem
   motulator_bearingless.control.DirectForceController
   motulator_bearingless.control.DirectForceControllerCfg
   motulator_bearingless.control.FluxObserver
   motulator_bearingless.control.ForceDisturbanceObserver
   motulator_bearingless.control.LevitationController
   motulator_bearingless.control.SaturatedBearinglessSynchronousMachinePars


Module Contents
---------------

.. py:class:: BearinglessControlSystem(speed_ctrl, levitation_ctrl)

   Bases: :py:obj:`motulator.common.control.ControlSystem`\ [\ :py:obj:`motulator_bearingless.model.BearinglessDrive`\ , :py:obj:`Measurements`\ , :py:obj:`Ref`\ , :py:obj:`Fbk`\ ]


   
   Base class of the bearingless control systems.

   This class implements the parts common to the bearingless control systems: the
   measurements, the modulators of the two sets, and the external references. The
   speed and torque references work as in the public `VectorControlSystem`. In the
   force-control mode, the radial force reference is given externally, and in the
   levitation-control mode, the levitation controller gives the force reference based
   on the displacement reference. Subclasses implement `get_feedback`,
   `compute_output`, and `update`. Gate blocking is not supported, since the
   multi-three-phase converter model does not support it.

   :param speed_ctrl: Speed controller. If None, torque-control mode is used.
   :type speed_ctrl: SpeedController | PIController | None
   :param levitation_ctrl: Levitation controller. If None, force-control mode is used.
   :type levitation_ctrl: LevitationController | None















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_standby_output(fbk)

      
      Compute the controller output while the gates are blocked.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_command(ref)

      
      Extract the sampling period and the duty ratios from the references.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_measurement(mdl)

      
      Sample the sensors, the speed and position sensors if the drive has them.
















      ..
          !! processed by numpydoc !!


   .. py:method:: set_displacement_ref(ref_fcn)

      
      Set the external displacement reference for levitation-control mode.

      :param ref_fcn: Rotor displacement reference (m) in stator coordinates, constant or a
                      function of time. Defaults to zero, i.e., a centric rotor.
      :type ref_fcn: complex | Callable[[float], complex]















      ..
          !! processed by numpydoc !!


   .. py:method:: set_force_ref(ref_fcn)

      
      Set the external radial force reference for force-control mode.

      :param ref_fcn: Radial force reference (N) in stator coordinates, constant or a function
                      of time. Defaults to zero.
      :type ref_fcn: complex | Callable[[float], complex]















      ..
          !! processed by numpydoc !!


   .. py:method:: set_speed_ref(ref_fcn)

      
      Set the external speed reference for speed-control mode.

      :param ref_fcn: Speed reference (mechanical rad/s), constant or a function of time.
      :type ref_fcn: float | Callable[[float], float]















      ..
          !! processed by numpydoc !!


   .. py:method:: set_torque_ref(ref_fcn)

      
      Set the external torque reference for torque-control mode.

      :param ref_fcn: Torque reference (Nm), constant or a function of time.
      :type ref_fcn: float | Callable[[float], float]















      ..
          !! processed by numpydoc !!


.. py:class:: BearinglessMagneticModel

   Bases: :py:obj:`BaseBearinglessMachinePars`, :py:obj:`Protocol`


   
   Base class for the machine parameters, as used by the control system.

   In addition to the machine model, the control system needs the flux map `psi_s`, the
   force map `f_M`, the incremental inductance matrix `incr_ind_mat`, and the
   sensitivities `di_dq` and `df_dq` to the displacement, all as functions of the
   currents and the displacement.















   ..
       !! processed by numpydoc !!

   .. py:method:: df_dq(i_s1, i_s2, q_M)

      
      Force sensitivity `d f_M/d q_M` at constant flux, shape (..., 2, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: di_dq(i_s1, i_s2, q_M)

      
      Current sensitivity `d i_s/d q_M` at constant flux, shape (..., 4, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: f_M(i_s1, i_s2, q_M)

      
      Radial force (N) as a function of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


   .. py:method:: incr_ind_mat(i_s1, i_s2, q_M)

      
      Incremental inductance matrix (H), shape (..., 4, 4), `d psi_s/d i_s`.
















      ..
          !! processed by numpydoc !!


   .. py:method:: psi_s(i_s1, i_s2, q_M)

      
      Flux linkages (Vs) as functions of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


.. py:class:: BearinglessSynchronousMachinePars

   Bases: :py:obj:`BearinglessMagneticModel`


   
   Constant parameters of a six-phase bearingless synchronous machine.

   The four-pole rotor produces the torque with the four-pole field (`h = 2`) and
   the radial force with the two-pole field (`h = 1`). Linear magnetics are
   assumed. The flux linkages are `psi_s = L_s(q_M)*i_s`, where the inductance
   matrix depends linearly on the rotor displacement via the radial force constants::

       L_s = [[L_1*I, L_21.T], [L_21, diag(L_d, L_q)]]
       L_21 = [[m_d*q_i, -m_d*q_j], [m_q*q_j, m_q*q_i]]

   The corresponding radial force is `f_M = 1.5*i_s.T*(dL_s/dq_M)*i_s`, i.e.::

       f_i = 3*(m_d*i_2d*i_1d + m_q*i_2q*i_1q)
       f_j = 3*(m_q*i_2q*i_1d - m_d*i_2d*i_1q)

   :param R_s: Stator resistance (Ω).
   :type R_s: float
   :param L_1: Inductance (H) of the two-pole plane, isotropic for the four-pole rotor.
   :type L_1: float
   :param L_d: d-axis inductance (H) of the four-pole plane.
   :type L_d: float
   :param L_q: q-axis inductance (H) of the four-pole plane.
   :type L_q: float
   :param m_d: d-axis radial force constant (H/m).
   :type m_d: float
   :param m_q: q-axis radial force constant (H/m).
   :type m_q: float

   .. rubric:: Notes

   The negative stiffness (unbalanced magnetic pull proportional to the displacement)
   is a second-order effect of the displacement on the inductances, which is not
   included in this linear model.















   ..
       !! processed by numpydoc !!

   .. py:method:: df_dq(i_s1, i_s2, q_M)

      
      Force sensitivity `d f_M/d q_M` at constant flux, shape (..., 2, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: di_dq(i_s1, i_s2, q_M)

      
      Current sensitivity `d i_s/d q_M` at constant flux, shape (..., 4, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: f_M(i_s1, i_s2, q_M)

      
      Radial force (N) as a function of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


   .. py:method:: i_s(psi_s1, psi_s2, q_M, exp_j_theta_M = None)

      
      Currents (A) and radial force (N) from flux linkages (Vs).
















      ..
          !! processed by numpydoc !!


   .. py:method:: incr_ind_mat(i_s1, i_s2, q_M)

      
      Incremental inductance matrix (H), shape (..., 4, 4).
















      ..
          !! processed by numpydoc !!


   .. py:method:: ind_mat(q_M)

      
      Inductance matrix (H), shape (..., 4, 4), at the displacement `q_M`.
















      ..
          !! processed by numpydoc !!


   .. py:method:: psi_s(i_s1, i_s2, q_M)

      
      Flux linkages (Vs) as functions of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


.. py:class:: CurrentBasedForceControlSystem(vector_ctrl, force_ctrl, speed_ctrl = None, levitation_ctrl = None)

   Bases: :py:obj:`BearinglessControlSystem`\ [\ :py:obj:`VectorReferences`\ , :py:obj:`motulator.drive.control.sm.ObserverOutputs`\ ]


   
   Current-based force control system for six-phase bearingless machine drives.

   The four-pole plane is controlled by a vector controller of motulator for
   synchronous machines, configured with the parameters of the equivalent three-phase
   machine, see :func:`~motulator_bearingless.utils.fourpole_pars`. The feedback
   signals of the vector controller are the voltage of the four-pole plane and twice
   its current, i.e., the sum of the set currents, cf. the common mode of
   multi-three-phase machines in `motulator_multiphase`. The two-pole plane is
   controlled by the current-based force controller in the coordinates of the vector
   controller, cf. the differential mode. Both planes rotate at the same electrical
   angular speed in stator coordinates, so the angle advance `k_comp*T_s*w_c` of the
   voltage references is common to them, as in the public `VectorControlSystem`. The
   reference modes are described in :class:`BearinglessControlSystem`.

   The feedback and reference signals of the vector controller are logged in the
   signal groups `fbk` and `ref`, and those of the force control in the groups
   `force_fbk` and `force_ref`. In post-processing, the latter are merged into the
   former, and the four-pole flux linkage `psi_s2` is added, so that the time series
   have the same layout as those of :class:`DirectForceControlSystem`. The space
   vectors of both planes are in the coordinates of the vector controller.

   :param vector_ctrl: Vector controller of the four-pole plane, configured with the parameters of the
                       equivalent three-phase machine.
   :type vector_ctrl: VectorController
   :param force_ctrl: Current-based force controller of the two-pole plane.
   :type force_ctrl: CurrentBasedForceController
   :param speed_ctrl: Speed controller. If None (default), torque-control mode is used.
   :type speed_ctrl: SpeedController | PIController | None, optional
   :param levitation_ctrl: Levitation controller. If None (default), force-control mode is used.
   :type levitation_ctrl: LevitationController | None, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(fbk)

      
      Compute the controller output.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_feedback(meas)

      
      Get the feedback signals.
















      ..
          !! processed by numpydoc !!


   .. py:method:: post_process()

      
      Extend the post-process method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: save(t, **signal_groups)

      
      Extend the base class method by saving the force control signals.
















      ..
          !! processed by numpydoc !!


   .. py:method:: update(ref, fbk)

      
      Update the controller states.
















      ..
          !! processed by numpydoc !!


.. py:class:: CurrentBasedForceController(par, alpha_c = 2 * pi * 200, alpha_i = None, i_s1_max = inf, T_s = None)

   
   Current-based radial force controller of the two-pole plane.

   The radial force reference is converted to the current reference of the two-pole
   plane, and the current is controlled by a complex-vector PI controller, in the same
   manner as the differential-mode currents of multi-three-phase machines are
   controlled in `motulator_multiphase`. The two-pole plane is modeled as a
   resistive-inductive circuit with the inductance `L_1`, and its current is controlled
   in the coordinates of the vector controller of the four-pole plane. In these
   coordinates, the force-producing current is constant in the steady state, and the
   radial force in stator coordinates is given by the linear force model [#Sok2019]_::

       f_M_ab = 3*k*conj(i_s1)    k = m_d*i_s2d + 1j*m_q*i_s2q

   where `i_s2` is the current of the four-pole plane in rotor coordinates. The current
   reference is obtained by inverting this model, and the force estimate for the
   levitation control is computed from the measured currents. Magnetic saturation and
   the eccentricity effects on the inductances are not taken into account, cf.
   :class:`DirectForceController`.

   :param par: Machine model parameter estimates.
   :type par: BearinglessSynchronousMachinePars
   :param alpha_c: Current-control bandwidth (rad/s), defaults to 2*pi*200.
   :type alpha_c: float, optional
   :param alpha_i: Integral-action bandwidth (rad/s), defaults to `alpha_c`. Not used in the
                   direct discrete-time design.
   :type alpha_i: float, optional
   :param i_s1_max: Maximum current (A) of the two-pole plane, defaults to `inf`.
   :type i_s1_max: float, optional
   :param T_s: Sampling period (s). If given, the direct discrete-time design is used instead
               of the continuous-time design. The vector controller must then be a direct
               discrete-time design as well (`k_comp = 0`), since the angle advance of the
               voltage references is common to both planes, and its sampling period must
               equal this value.
   :type T_s: float, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(f_M_ab_ref, fbk)

      
      Compute the current and voltage references of the two-pole plane.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_feedback(i_s1_ab, u_s1_ab, i_s2, theta_c, q_M_ab)

      
      Get the feedback signals.

      :param i_s1_ab: Two-pole current (A) in stator coordinates.
      :type i_s1_ab: complex
      :param u_s1_ab: Realized two-pole voltage (V) in stator coordinates.
      :type u_s1_ab: complex
      :param i_s2: Four-pole current (A) in the coordinates of the vector controller.
      :type i_s2: complex
      :param theta_c: Angle (rad) of the coordinates of the vector controller.
      :type theta_c: float
      :param q_M_ab: Measured rotor displacement (m) in stator coordinates.
      :type q_M_ab: complex















      ..
          !! processed by numpydoc !!


   .. py:method:: update(T_s, ref, fbk, w_c)

      
      Update the integral state using the realized or limited voltage.
















      ..
          !! processed by numpydoc !!


.. py:class:: DirectForceControlSystem(force_ctrl, speed_ctrl = None, levitation_ctrl = None)

   Bases: :py:obj:`BearinglessControlSystem`\ [\ :py:obj:`References`\ , :py:obj:`Feedbacks`\ ]


   
   Direct force control system for six-phase bearingless machine drives.

   The reference modes are described in :class:`BearinglessControlSystem`.

   :param force_ctrl: Inner force and torque controller.
   :type force_ctrl: DirectForceController
   :param speed_ctrl: Speed controller. If None (default), torque-control mode is used.
   :type speed_ctrl: SpeedController | PIController | None, optional
   :param levitation_ctrl: Levitation controller. If None (default), force-control mode is used.
   :type levitation_ctrl: LevitationController | None, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(fbk)

      
      Compute the controller output.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_feedback(meas)

      
      Get the feedback signals.
















      ..
          !! processed by numpydoc !!


   .. py:method:: update(ref, fbk)

      
      Update the controller states.
















      ..
          !! processed by numpydoc !!


.. py:class:: DirectForceController(par, cfg)

   
   Direct radial force and torque controller.

   The voltage reference is `u_s = R_s i_s + w_M J_M psi_s + e`, where the control
   input `e = [e_1, e_2]` linearizes the force dynamics of the two-pole plane and the
   flux and torque dynamics of the four-pole plane [#Das2026]_. The control laws
   neglect the effect of the four-pole input `e_2` on the force and that of the
   two-pole input `e_1` on the torque, i.e., the planes are assumed to be decoupled in
   the control design, while the machine model includes the couplings. The flux and
   torque references of the four-pole plane are based on the maximum-torque-per-ampere
   and maximum-torque-per-volt loci of the magnetic model, sliced at zero two-pole
   current and at a centric rotor. The two-pole plane loads the converter only
   slightly, so that the voltage limit is assigned to the four-pole plane.

   :param par: Machine model parameter estimates.
   :type par: BearinglessMagneticModel
   :param cfg: Configuration.
   :type cfg: DirectForceControllerCfg















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(tau_M_ref, f_M_ab_ref, fbk)

      
      Compute the references.
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_feedback(u_s1_ab, u_s2_ab, i_s1_ab, i_s2_ab, w_M, theta_M, q_M_ab)

      
      Get the feedback signals.
















      ..
          !! processed by numpydoc !!


   .. py:method:: update(ref, fbk)

      
      Update the states.
















      ..
          !! processed by numpydoc !!


.. py:class:: DirectForceControllerCfg

   
   Direct force controller configuration.

   :param i_s_max: Maximum current (A) of the four-pole plane.
   :type i_s_max: float
   :param psi_s_min: Minimum flux magnitude (Vs) of the four-pole plane, i.e., the bias flux for the
                     force production.
   :type psi_s_min: float
   :param psi_s_max: Maximum flux magnitude (Vs) of the four-pole plane, defaults to `inf`.
   :type psi_s_max: float, optional
   :param k_u: Voltage utilization factor of the field weakening, defaults to 0.95.
   :type k_u: float, optional
   :param k_mtpv: Margin of the maximum-torque-per-volt limit, defaults to 0.9.
   :type k_mtpv: float, optional
   :param alpha_f: Force-control bandwidth (rad/s), defaults to 2*pi*300.
   :type alpha_f: float, optional
   :param alpha_i: Integral-action bandwidth (rad/s) of the force control, i.e., the bandwidth of
                   the force disturbance observer, defaults to 2*pi*30. The observer is disabled
                   if the value is zero.
   :type alpha_i: float, optional
   :param alpha_psi: Flux-control bandwidth (rad/s), defaults to 2*pi*200.
   :type alpha_psi: float, optional
   :param alpha_tau: Torque-control bandwidth (rad/s), defaults to 2*pi*200.
   :type alpha_tau: float, optional
   :param zeta: Damping ratio of the flux observer, defaults to 0.45.
   :type zeta: float, optional
   :param sensorless: If True, the rotor angle and the rotor speed are estimated, defaults to False.
   :type sensorless: bool, optional
   :param alpha_o: Speed-estimation pole (rad/s) in the sensorless mode, defaults to 2*pi*100.
   :type alpha_o: float, optional
   :param T_s: Sampling period (s), defaults to 125e-6.
   :type T_s: float, optional















   ..
       !! processed by numpydoc !!

.. py:class:: FluxObserver(par, zeta = 0.45, sensorless = False, alpha_o = 2 * pi * 100)

   
   Flux observer in rotor coordinates.

   The stator flux linkages of both planes are estimated based on the voltage model,
   corrected by the flux map of the machine [#Das2026]_. The observer gain of the
   two-pole plane places the estimation-error poles at the distance `w_M` from the
   origin with the damping ratio `zeta`. The gain of the four-pole plane projects the
   error signal onto the auxiliary flux linkage with the damping `b = 2*zeta*|w_M|`.
   The flux estimates are updated using the voltages of the ongoing sampling period.
   The voltage is constant in stator coordinates during the sampling period, so that
   its integral is exact for a constant speed of the coordinates, which avoids the
   coupling from the voltage transients to the position error signal. The resistive
   voltage drop and the correction are held constant in stator coordinates during the
   period.

   In the sensorless mode, the rotor angle and the rotor speed are estimated using the
   component of the four-pole error signal perpendicular to the auxiliary flux linkage,
   as in the public observer for synchronous machines [#Hin2018]_. The projection in
   the four-pole observer gain decouples the flux estimation from the angle estimation.

   :param par: Machine model parameter estimates.
   :type par: BearinglessMagneticModel
   :param zeta: Damping ratio of the estimation-error dynamics, defaults to 0.45.
   :type zeta: float, optional
   :param sensorless: If True, the rotor angle and the rotor speed are estimated, defaults to False.
   :type sensorless: bool, optional
   :param alpha_o: Speed-estimation pole (rad/s), defaults to 2*pi*100.
   :type alpha_o: float, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(u_s1_ab, u_s2_ab, i_s1_ab, i_s2_ab, w_M, theta_M, q_M_ab)

      
      Compute the feedback signals in rotor coordinates.

      In the sensorless mode, the measured rotor speed `w_M` and the measured rotor
      angle `theta_M` are replaced with their estimates.















      ..
          !! processed by numpydoc !!


   .. py:method:: update(T_s, fbk)

      
      Update the flux estimates.
















      ..
          !! processed by numpydoc !!


.. py:class:: ForceDisturbanceObserver(alpha_i)

   
   Disturbance observer for the radial force dynamics.

   The force dynamics in stator coordinates are modeled as `df_M_ab/dt = w + d`, where
   `w` is the model-based part and the disturbance `d` is assumed to be constant in
   stator coordinates. The disturbance is estimated as `dd/dt = alpha_i*(df_M_ab/dt -
   w - d)`. The force derivative is avoided by means of the state `z = d -
   alpha_i*f_M_ab`. Combined with the proportional control law, the observer provides
   the integral action, cf. the disturbance-observer structure of the 2DOF PI
   controller. If the realized voltage is used in `w`, the observer is free from
   windup.

   :param alpha_i: Observer bandwidth (rad/s).
   :type alpha_i: float















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(f_M_ab)

      
      Compute the disturbance estimate (N/s) in stator coordinates.
















      ..
          !! processed by numpydoc !!


   .. py:method:: update(T_s, w, d)

      
      Update the state.
















      ..
          !! processed by numpydoc !!


.. py:class:: LevitationController(m, alpha_q, alpha_o = None)

   
   Rotor displacement controller.

   The radial dynamics of the rotor in stator coordinates are modeled as `m*dv_M_ab/dt
   = f_M_ab + f_ext_ab` and `dq_M_ab/dt = v_M_ab`, where the external force `f_ext_ab`
   (e.g., gravity) is a constant disturbance. The displacement, the lateral velocity,
   and the external force are estimated by a disturbance observer from the measured
   displacement and the radial force estimate. The force reference is obtained from
   the state feedback law::

       f_M_ab_ref = m*(alpha_q**2*(q_M_ab_ref - q_M_ab) - 2*alpha_q*v_M_ab) - f_ext_ab

   which results in the double closed-loop pole at `s = -alpha_q`. The control law has
   no memory: the integral action is provided by the observer. Since the observer is
   driven by the radial force estimate, the dynamics and the limits of the inner force
   control loop do not cause windup.

   :param m: Rotor mass estimate (kg).
   :type m: float
   :param alpha_q: Displacement-control bandwidth (rad/s).
   :type alpha_q: float
   :param alpha_o: Triple pole (rad/s) of the observer, defaults to `3*alpha_q`.
   :type alpha_o: float, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_output(q_M_ab_ref)

      
      Compute the radial force reference (N) in stator coordinates.
















      ..
          !! processed by numpydoc !!


   .. py:method:: update(T_s, q_M_ab, f_M_ab)

      
      Update the state estimates.
















      ..
          !! processed by numpydoc !!


.. py:class:: SaturatedBearinglessSynchronousMachinePars

   Bases: :py:obj:`BearinglessMagneticModel`


   
   Parameters of a saturated bearingless synchronous machine.

   The class corresponds to
   :class:`motulator.drive.model.SaturatedSynchronousMachinePars`. The saturation model
   is specified as a current map. Optionally, to be used only in control systems, a
   flux map can be provided.

   :param R_s: Stator resistance (Ω).
   :type R_s: float
   :param i_s_fcn: Currents (A) and radial force (N) as functions of the flux linkages (Vs) of the
                   two planes and the displacement (m), e.g.,
                   :class:`~motulator_bearingless.gradnet.CurrentMap`. Needed in the machine model.
   :type i_s_fcn: Callable[[Any, Any, Any], tuple[Any, Any, Any]], optional
   :param psi_s_fcn: Flux linkages (Vs) and radial force (N) as functions of the currents (A) of the
                     two planes and the displacement (m), with the Jacobian, e.g.,
                     :class:`~motulator_bearingless.gradnet.FluxMap`. Needed in the control systems.
   :type psi_s_fcn: FluxMapFcn, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: df_dq(i_s1, i_s2, q_M)

      
      Force sensitivity `d f_M/d q_M` at constant flux, shape (..., 2, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: di_dq(i_s1, i_s2, q_M)

      
      Current sensitivity `d i_s/d q_M` at constant flux, shape (..., 4, 2).
















      ..
          !! processed by numpydoc !!


   .. py:method:: f_M(i_s1, i_s2, q_M)

      
      Radial force (N) as a function of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


   .. py:method:: i_s(psi_s1, psi_s2, q_M, exp_j_theta_M = None)

      
      Currents (A) and radial force (N) from flux linkages (Vs).
















      ..
          !! processed by numpydoc !!


   .. py:method:: incr_ind_mat(i_s1, i_s2, q_M)

      
      Incremental inductance matrix (H), shape (..., 4, 4).
















      ..
          !! processed by numpydoc !!


   .. py:method:: linearized(i_s2)

      
      Constant parameters of the linear model at an operating point.

      The inductances of the four-pole plane are the secant inductances at the given
      current and those of the two-pole plane are the incremental inductances at a
      centric rotor without the two-pole current. The force constants are fitted to
      the sensitivity of the radial force to the two-pole current.

      :param i_s2: Current (A) of the four-pole plane in rotor coordinates. Its both components
                   must be nonzero.
      :type i_s2: complex

      :returns: Parameters of the linear model.
      :rtype: BearinglessSynchronousMachinePars















      ..
          !! processed by numpydoc !!


   .. py:method:: psi_s(i_s1, i_s2, q_M)

      
      Flux linkages (Vs) as functions of currents (A) and displacement (m).
















      ..
          !! processed by numpydoc !!


