Acim Foc

ACIM_FOC #

Brief #

The acim_foc component turns a torque command into d and q current commands for an induction motor in the rotor flux frame, using the flux model of acim_flux.

Behaviour #

  • d: id_n * scale (scale from acim_fw, 1 below the corner), reached at id_rate A/s from 0 at every enable, so the bridge never steps the full magnetizing current into one leg.
  • Torque is held at 0 (ready = 0, t_max = 0) until i_mr has reached 90% of the d command once; after that ready stays 1 until the next disable.
  • q: torque / (3/2 * pp * lmr * i_mr), limited so |i| stays within max_cur with d taking priority.
  • Flux boost (optional, k_boost > 0): while the flux is below the ramped d command, d gets k_boost * (d - i_mr) on top, so i_mr rises in about tr / (1 + k_boost) instead of tr: faster torque after field weakening and a shorter magnetizing at enable. Only upward; going into field weakening is not sped up, so the acim_fw loop keeps its gain. The boost only takes current q does not need: |d| <= sqrt(max_cur^2 - q^2), and with boost_max > 0 never more than boost_max * id_n on top of d (0.3 keeps the enable peak near the current limit).
  • t_max: torque the current limit allows at the present flux, capped by acim_fw’s t_lim when that is nonzero. Link pid0.max_torque and pid0.neg_min_torque to it.

Pins #

NameDescription
eninput, fault0.en_out
torqueinput, torque command [Nm]
scaleinput, flux fraction from acim_fw, 1 = rated
t_liminput, torque limit from acim_fw [Nm], 0 = none
i_mrinput, magnetizing current from acim_flux [A]
id_nparameter, rated magnetizing current [A peak]
id_rateparameter, d current ramp [A/s]
max_curparameter, current limit [A peak]
lmrparameter, Lm^2/Lr [H]
polecountparameter, pole pairs
k_boostparameter, flux boost gain, 0 = off
boost_maxparameter, largest boost as a fraction of id_n, 0 = only the current limit
d_cmdoutput, to hv0.d_cmd
q_cmdoutput, to hv0.q_cmd
t_maxoutput, available torque [Nm]
t_minoutput, -t_max
readyoutput, 1 = magnetized, torque allowed
boostoutput, d current added by the flux boost [A]

References #

Source: .c File