ACIM_FLUX #
Brief #
The acim_flux component models the rotor flux of an induction motor in the
rotor flux frame and gives the slip that keeps that frame oriented.
Model #
With i_mr the magnetizing current behind the rotor flux (psi_r = Lm * i_mr):
tr * d(i_mr)/dt = id - i_mr slip = iq / (tr * i_mr) [rad/s electrical] torque = 3/2 * pp * lmr * i_mr * iq lmr = Lm^2 / Lr
tr (Lr/Rr) and lmr come from idacim, at rated flux (i_mr = i_n).
Below rated flux (field weakening) the iron desaturates and both grow:
x = (i_n - |i_mr|) / (i_n - i_knee), clamped 0..1 tr_act = tr_est * (1 + tr_sat * x) lmr_act = lmr * (1 + lmr_sat * x)
With i_knee > 0 both stop growing below i_knee and stay at their
plateau (1 + sat); i_knee 0 is a straight line down to zero flux.
At low induction the iron’s permeability falls again (the foot of the B-H
curve): on the spindle the secant lmr was flat from 9 to 19 A and 11% lower
at 6.7 A (idacim sweep, 6 Oct). With i_dip > 0 both change below it:
y = (i_dip - |i_mr|) / i_dip, clamped 0..1 lmr_act = … * (1 - lmr_dip * y) tr_act = … * (1 - tr_dip * y)
tr has its own coefficient, as Rr need not stay put at low flux. idacim prints tr_dip = lmr_dip (tr = Lr / Rr follows the secant lmr), which its rotating tr checks confirm on the spindle to a few %; the spindle examples carry that (0.058). A hand value of -0.45 (9 Oct, from a tr that read 0.10-0.11 at 5-8 A) is superseded. i_dip 0 (default) leaves both out; lmr_dip 0 or tr_dip 0 one of them.
The model, slip, psi and torque run on tr_act and lmr_act. tr changes about
twice as much as the secant lmr, so the two gains are separate; 0 (default)
or i_n 0 keeps both constant. id/iq are normally the measured
currents, so a current limit in curpid scales both and the slip stays right.
psi is the rotor flux seen from the stator. With hv0.l = hv0.lq =
sigma*Ls (leakage), it turns curpid’s PMSM decoupling
psi_d = l * id + psi into the induction motor’s stator flux, so the F3 needs
no ACIM code.
en = 0 clears the flux, so every enable starts from a demagnetized rotor.
tr adaptation (reactive power MRAS), off by default #
tr changes with rotor temperature. With tr_ki > 0 the model runs on
tr_est, which integrates the reactive power residual
Q = uq id - ud iq Q_m = w (id (l id + psi) + l iq^2) - r_w |w| id iq tr_est -= tr_ki * (Q - Q_m) * sign(w) * period
Q does not depend on r, so neither does the estimate. A positive residual
(times sign(w)) means tr_est is too high; the plant gain is a few thousand VA per second of
tr, so tr_ki 0.0001 settles in a few seconds. It adapts only while
abs(iq) > tr_iq_min and abs(w) > tr_vel_min (slip must be large enough to
see) and, with tr_flux_min > 0, |i_mr| >= tr_flux_min * i_n (in deep
field weakening the residual is dominated by model errors, not tr; 0.95
keeps it to the base speed range), holds otherwise, and
stays within 0.5 to 2 times tr. With tr_ki 0, tr_est = tr.
tr from an encoder in sensorless mode, off by default #
In sl_acim the frame comes from the voltage observer and the MRAS sees no
tr. With an encoder, sl_seq0.slip_err = obs0.vel_m - encoder speed is the
true slip less the model’s (mechanical rad/s). With tr_ks > 0
tr_est -= tr_ks * tr_est * slip_err / slip_model * period
so tr_ks is a rate [1/s] on the relative slip error (clamped to +-50 %),
under the same iq and speed gates as the MRAS. Both adaptations also need
a steady speed when tr_acc_max > 0: |acceleration| (5 Hz low pass)
below tr_acc_max * max_acc (conf0.max_acc, about 0.3); on a ramp the slip
error and the reactive residual carry the inertia and observer lag, not tr.
lmr trim from the q voltage, off by default #
In steady state the q voltage is uq = r iq + w (l id + lmr i_mr). With
lmr_ki > 0 the relative residual of that, (uq - r iq - w (l id + lmr
i_mr)) / (w lmr i_mr), trims lmr at lmr_ki [1/s], while |w| > tr_vel_min,
abs(i_mr) > 20 % of i_n (or 1 A) and the flux is settled (abs(id - i_mr) < 5 %
of i_mr). It stays within 0.7 to 1.4 times lmr.
Saturation still applies on top.
Pins #
| Name | Description |
|---|---|
| tr | parameter, rotor time constant Lr/Rr [s] |
| lmr | parameter, rotor side magnetizing inductance Lm^2/Lr [H] |
| polecount | parameter, pole pairs |
| i_min | parameter, i_mr floor for the slip division [A] |
| slip_max | parameter, slip clamp [rad/s electrical] |
| en | input, 0 = rotor demagnetized |
| id | input, d current [A] |
| iq | input, q current [A] |
| i_mr | output, magnetizing current [A] |
| psi | output, lmr * i_mr [V s], to hv0.psi |
| slip | output, slip [rad/s electrical] |
| torque | output, estimated torque [Nm] |
| tr_ki | parameter, tr adaptation gain [1/(VA s)], 0 = off |
| tr_iq_min | parameter, adapt only above this abs(iq) [A] |
| tr_vel_min | parameter, adapt only above this abs(vel) [rad/s electrical] |
| l | parameter, leakage sigma*Ls [H], conf0.l |
| r_w | parameter, speed dependent d loss [ohm per rad/s electrical], as obs0.r_w |
| ud | input, hv0.ud_fb |
| uq | input, hv0.uq_fb |
| vel | input, synchronous speed [rad/s electrical], angle0.vel |
| tr_est | output, tr at rated flux, tr or adapted |
| i_n | parameter, rated magnetizing current [A], acim_foc0.id_n, 0 = no saturation |
| tr_sat | parameter, tr growth at zero flux, tr * (1 + tr_sat * x) |
| lmr_sat | parameter, lmr growth at zero flux, lmr * (1 + lmr_sat * x) |
| tr_act | output, the tr the model runs on |
| lmr_act | output, the lmr the model runs on, to acim_foc0.lmr |
| q_res | output, reactive power residual Q - Q_m [VA] |
| i_knee | parameter, tr and lmr flat below this i_mr [A], 0 = no knee |
| tr_flux_min | parameter, adapt only while abs(i_mr) >= this fraction of i_n, 0 = no limit |
| tr_acc_max | parameter, adapt only below this fraction of max_acc, 0 = no limit |
| max_acc | parameter, conf0.max_acc [rad/s^2 mech] |
| acc | output, synchronous acceleration, 5 Hz low pass [rad/s^2 mech] |
| tr_ks | parameter, tr rate from the encoder slip error [1/s], 0 = off |
| slip_err | input, true minus model slip [rad/s mech], sl_seq0.slip_err |
| lmr_ki | parameter, lmr trim rate from the q voltage [1/s], 0 = off |
| r | parameter, stator resistance [ohm], conf0.r, for the lmr trim |
| lmr_est | output, lmr at rated flux, lmr or trimmed |
| u_res | output, q voltage residual [V] |
| i_dip | parameter, lmr and tr change below this i_mr [A], 0 = no dip; keep below i_knee |
| lmr_dip | parameter, fraction lmr loses at zero flux, (1 - lmr_dip * y) |
| tr_dip | parameter, fraction tr loses at zero flux, (1 - tr_dip * y), negative = tr rises |
References #
Source: .c File