Deflanging in VESC Tool: Gaining speed, and the cost involved
Field weakening, or "demagnetization" in English, allows a motor to spin faster than the limit imposed by the battery voltage. The VESC firmware has offered this feature for several years, with a few simple settings. However, this speed gain comes at a cost, and improperly configured field weakening can damage the controller. This guide explains the settings and then outlines the necessary precautions.
The essentials
- Demagnetization injection introduces a current that weakens the magnetic field, thereby limiting the maximum speed.
- This current does not produce torque; instead, it generates heat and consumes battery power.
- It only activates at the upper end of the speed range, starting from an adjustable threshold.
- In the event of a sudden power interruption at high speed, the motor can generate a voltage higher than that of the battery: this is the primary risk.
In short, the principle is:
When turning, a permanent magnet motor produces a voltage that increases with speed. When this voltage reaches the battery voltage, the controller can no longer allow current to flow: the speed is capped. Field weakening allows current to flow through axis "d," which opposes the magnetic field and reduces this voltage, creating headroom for further acceleration. The complete principle is explained in our guide on field weakening and in the one on vector control.
Settings in VESC Tool
The settings are located in the FOC motor configuration, specifically in the tab dedicated to field weakening.
- Field Weakening Current Max: The maximum current for field weakening. Setting it to zero disables field weakening. The higher the value, the greater the speed gain, but also the higher the heat and power consumption.
- Field Weakening Duty Start: The fraction of the maximum duty cycle from which field weakening begins. It is therefore only activated at the top of the speed range.
- Field Weakening Ramp Time: The ramp-up time for the field weakening current, which prevents abrupt transitions.
- Q Axis Current Factor: This setting limits the torque current during regenerative braking, ensuring that the total current remains within a controlled range.
What it costs
- Heat Generation: The back EMF current flows through the windings and transistors without producing torque. The motor and controller generate more heat at high speeds. See our guide on motor overheating.
- Regarding range: This current comes from the battery.
- Risk of Overvoltage: If the controller abruptly cuts power at high speed, either due to a default setting or a power failure, the regenerative braking stops instantly. The motor then sends its full voltage, which is higher than the battery voltage, back to the controller and the battery. This can damage the transistors, capacitors, and the Battery Management System (BMS).
The method
- Start with the defluxing feature disabled and a properly configured machine: motor detection and current limits. Refer to our guides on motor detection and current limits.
- Activate a low current regenerative braking mode, with a high starting threshold.
- Ride, then check the maximum speed reached, as well as the battery temperature and current.
- Increase the settings gradually, as long as you observe a real increase in speed and the temperatures remain within acceptable limits.
- Ensure that the maximum voltage the motor can generate at the achieved speed remains within the acceptable range for the controller and the battery in the event of a power failure.
Defluxing or another solution?
Deflanging provides a boost in speed. For a significant and lasting gain, a motor with faster windings or a higher battery voltage are often better solutions. See our guides on High Speed or High Torque motors, and on switching to a higher voltage. On an interior permanent magnet (IPM) motor, the MTPA Algorithm Mode setting also allows you to utilize the reluctance torque: see our guide on IPM motors.
Workshop tip
Never use desoldering to compensate for a battery that is too low in voltage or a motor that is not properly matched. It is a fine-tuning adjustment, not a fundamental solution.
Frequently Asked Questions
How much speed can you gain?
It depends on the motor: its construction and inductance determine the effectiveness of the demagnetization process. In-runner motors generally perform better in this regard than outrunner motors. Only measurement on your specific machine will provide the answer.
Is desoldering dangerous?
It can happen if the controller cuts out at high speed: in this case, the motor generates a voltage higher than that of the battery. Increase the speed gradually and check this voltage against the limits supported by the controller and the battery.
Why does my motor get hotter at higher speeds?
The demagnetization current flows through the windings without producing torque. It adds heat, in addition to the losses in the iron core, which already increase with speed.
Does using the "defluxing" feature consume the battery faster?
It consumes energy to increase speed, which means the range decreases when operating in the zone where it is active.