VESC control modes: current, duty cycle, speed or position. Which one to choose?

When you press the accelerator on a VESC, what are you actually requesting? Force, voltage, speed? It depends on the control mode selected. The controller can command the motor using current (and therefore torque), pulse width modulation (and therefore voltage), speed, or position. For a scooter or motorcycle, the response is almost always the same, but understanding the other modes avoids misconfigurations and opens up other possibilities.

The essentials

  • The mode is selected in the Control Type setting of the input being used (App Settings, ADC, or PPM).
  • The current mode controls the torque: this is the natural operating mode for a vehicle.
  • The "cyclic current" mode controls a fraction of the battery voltage, resulting in a more "direct" response and implicit braking when the throttle is released.
  • The speed mode maintains a target speed using a controller, which is configured in the PID Controllers settings.
  • The position mode is designed for mechanisms, not for vehicles, and requires a precise position sensor.

The current mode: controlling force

The current flowing through the motor is proportional to the torque it produces. In current mode, the trigger position sets a percentage of the maximum motor current: with a linear curve, at the midpoint, the motor exerts approximately half of its maximum force, regardless of speed (as long as no other limits are in effect). This is precisely what an accelerator pedal does from a rider's perspective: it requests more or less force.

The modes whose names begin with Current in the Control Type list are of this type: Current, Current No Reverse Brake ADC2, Current No Reverse Brake Center, etc. They also allow for controlled electric braking, using a second trigger or the lower half of the trigger's travel. This is the preferred choice for scooters, motorcycles, and karts. It is also the only mode where traction control and speed regulation via button function.

The accuracy of this mode relies on the controller's current loop, which is adjusted through motor detection. Refer to our guide on the PI regulator for the current loop.

The cyclic reporting mode: command a voltage

The duty cycle is the fraction of the battery voltage that the controller applies to the motor. In Duty Cycle mode, the throttle sets this fraction. Since the speed of a motor at no load is approximately proportional to the applied voltage, this mode resembles a rough speed control.

Practical consequences: If the trigger is partially released, the controller reduces the voltage, and the motor, which is spinning faster than the voltage allows, immediately brakes. The sensation is abrupt, not very progressive, and the achieved speed varies with the battery charge. It is mainly used for testing or simple machines, and rarely on a vehicle.

Speed mode: maintains a set speed

In PID Speed (ADC) or PID Speed Control (PPM) mode, the throttle sets a target speed, and a controller adjusts the current to reach and maintain that speed, both uphill and downhill. Its settings can be found in Motor Settings, PID Controllers:

  • Speed PID Kp, Speed PID Ki, Speed PID Kd: These are the gains of the speed controller. If they are too low, the speed will drift; if they are too high, the speed will oscillate.
  • Minimum ERPM (Revolutions Per Minute): The speed at which the speed controller is disabled.
  • Allow Braking: This option allows the controller to brake in order to maintain speed.
  • Ramp eRPMs per second: This limits the rate at which the target speed can increase.
  • Speed Source: The source of speed measurement (PLL, Fast Estimator, Faster Estimator), which can be faster or noisier.

With PID Speed in ADC mode, the maximum travel of the throttle corresponds to Max ERPM; in PPM mode, it's the PID Max ERPM setting. On a vehicle, this mode creates a strange sensation: releasing the throttle slightly causes the vehicle to brake to match the new target speed. It's more commonly used for conveyors, winches, test benches, or occasionally, like a speed regulator triggered by a button.

The position mode: maintains a specific angle

Position control rotates the motor to a specific angle and maintains it there, similar to a servo motor. Its parameters are also found in the PID Controllers section (Position PID Kp, Ki, Kd). The PPM application offers two modes of this type: PID Position Control: 180° and PID Position Control: 360°. The VESC Tool help documentation specifies that this mode works best with an encoder. It is intended for robots, mechanisms, and test benches, not for vehicles. See our guide on encoders for VESC.

ModeThe trigger controls..Feeling on a vehicleRecommended usage:
CurrentTorqueNatural, progressiveScooter, motorcycle, kart
Cyclic reportThe applied voltageSec, brake releaseTests, simple machines
Speed (PID)A target speedApply the brakes to follow the set targetConveyor, winch, workbench, regulator
Position (PID)An angleInappropriateRobot, mechanism

Test the throttle-less modes

The computer version of VESC Tool has a manual control panel: you can enter a duty cycle, a current, a braking current, a speed (RPM), or a position, and a button stops the motor. Lifting the wheel is the best way to understand the difference between the modes, and to verify that a motor is working independently of the throttle.

Workshop tip

On a vehicle, stay in the standard mode and focus on developing a feel for the throttle response and the ramps, rather than changing modes. Speed and position modes are valuable for specialized machines: conveyors, robots, and test benches. For this type of project, our engineering department designs the motorization for the machine; for occasional adjustments, our workshop can provide assistance on an hourly basis (https://rage-mechanics.com/en/our-products/1529-labor-30-minutes.html).

Frequently Asked Questions

What mode should you choose for an electric scooter?

A current mode, for example "Current No Reverse Brake ADC2," can be used with a throttle and a brake lever. The rest of the settings are adjusted using the ramps and the curve.

Why does my machine brake when I slightly release the throttle?

You are likely in either Duty Cycle or PID Speed mode: the target speed is decreasing, and the controller is braking to follow it. In normal mode, releasing the throttle only reduces the power output.

Can the speed mode function as a cruise control system?

The ADC app's button-based controller uses speed regulation intermittently, while maintaining the current mode for normal riding.

Should the PID gains be adjusted for normal riding mode?

No, the Speed PID and Position PID settings are only used for speed and position modes, and for the speed controller. The current mode depends on the motor detection.