Skip to main content
Firmware Stable

Flux weakening

This subsystem uses d-axis current control to deliver adaptive flux weakening (extending the motor speed range under the same DC-side voltage, for the sake of the torque). Using an integrative feedback, the Back-EMF is kept within a specified range (fwm to fwr). The dynamic sensitivity can be adjusted with fwd. The following picture illustrates the typical enhancement achievable with a common SPM machine. Note that in an IPM, further extension is usually achievable due to reluctance torque use.

Field weakening

info
  • The following variables are located in the /driver/dac folder.
  • This page is related to the VECTOR algorithm only.

Parameters​

fwc [.iref]​

The flux weakening current limit <0:disable>.

Keep fwc × iref below the d-axis current that reverses the motor's flux; psi/Lq is a safe bound (a strongly saturating surface-magnet motor can reverse that early). Beyond it, more d-axis current no longer weakens the field: the voltage-mode speed stops following the command and field weakening runs to its limit.

Tuning note

On drivers before 6, a mismatch between fwc and dxc is a common cause of a perceived torque step ("kick" or "drop") at the reluctance-to-field-weakening transition; from driver 6 the transition is smooth. See the IPM tuning guide for the recommended baseline and procedure.

fwp [.uref] (driver 6+)​

The voltage plateau of the command map in the voltage modes (1/3/4). Below this level, the command maps to voltage proportionally; above it, the command schedules the field weakening, so the no-load speed stays proportional to the command over the whole range (up to the terminal speed). Keep fwp below fwm.

New in driver 6

Voltage modes now work through field weakening: previously any command above fwm collapsed the weakening range into a near-step. This is active by default (fwp = 0.9) on configurations with field weakening enabled - note that the cmd-to-voltage gain below the plateau changes accordingly. Set fwp = 0 to restore the legacy behavior. The speed follows the command also after full throttle, a heavy load or a back-drive push, and a back-drive is braked at the command; field weakening steps in to protect the bus only when the voltage runs out.

fwm [.uref]​

If the uref parameter is not set, the actual battery voltage is used. From driver 6.0, a reduced uref proportionally pulls the field weakening onset in (the thresholds follow the resolved uref, clamped to the actual bus voltage).

The flux weakening engage margin. If the Q-axis motor voltage rises above the value specified by this parameter, the negative D-axis current reference is increased. Similarly, if the Q-axis motor voltage falls below the value specified by this parameter, the negative D-axis current reference is decreased. The algorithm presumes that, by increasing the negative D-axis current, the Q-axis voltage generated by the motor is decreased and vice versa (by the field weakening effect).

Tuning note

If your motor's back-EMF is not sinusoidal, set fwm lower.

fwr [.uref]​

If the uref parameter is not set, the actual battery voltage is used.

The flux weakening release margin. Always have fwr lower than fwm.

In the voltage modes (1/3/4, driver 6+) it sets how quickly field weakening is released while the motor drives a load - the lower fwr, the faster. Otherwise the weakening is released as the voltage falls below fwm, at the rate set by fwd.

fwd [-]​

The flux weakening integrator gain.

This parameter defines how much (how fast) does the Q-axis voltage change affect the negative D-axis current reference. The higher this parameter is, the faster the response of the field weakening algorithm. The lower this parameter is, the lower risks of oscillations and smoother operation in the field weakening region can be assumed.

Tuning note

If your motor's back-EMF is not perfectly sinusoidal, lower this parameter.

Tuning note

A higher fwd speeds up the onset of field weakening. Increasing it is only meaningful when higher dynamics with respect to speed are required (for example, when a clutch and a flywheel are present in the drivetrain). A motor in firm contact with the load usually does not need this adjustment.

States (only esc5)​

idref_fw [A]​

The d-axis current reference while field weakening is engaged (0 when it is not). In the voltage modes it starts from the command-scheduled reference idref_fws.

idref_fws [A] (driver 6+)​

The command-scheduled d-axis field weakening reference (the part scheduled by the command above the fwp plateau).