Speed controllers

The speed controller sits between the battery and the motor. It takes the throttle command and decides how to drive the motor. This article shows how to pick the type of speed controller in ThrustLab, what the throttle means, and when to change its settings.

Two types

ThrustLab can simulate two kinds of speed controller. Each one runs as a virtual copy of the real firmware, which we call a twin. The twin runs in very small steps, so it reproduces things like the way the controller switches the motor phases and how it protects itself.

Two types
TypeWhat it is
AM32 (six-step)The open-source AM32 firmware, version 2.22. It drives the motor in six steps for each electrical turn. Many hobby speed controllers use it.
VESC (FOC)The VESC firmware, version 7.00. It uses field-oriented control to drive the motor with smooth currents.

To choose, click "Settings" beside the motor on the Simulate page, then open the tab "Speed controller" and pick the "Type". A new rotor starts with AM32. A run through the API also uses AM32 when you don't name a type.

What throttle means

The throttle in ThrustLab is the command your flight controller sends to the speed controller. It is not the position of the stick on your radio. A radio maps the stick to a command through its own endpoints, so the same stick position can mean different commands on two radios.

The two types read the command in different ways.

  • With AM32, the throttle sets how hard the controller drives the motor. 0 % is off and 100 % is full.
  • With VESC, the throttle asks for a speed. 100 % asks for the speed the motor would reach with no load at the battery's starting voltage, its Kv times that voltage.

So the same throttle gives different results on the two types. To compare them, look at the same thrust on both types.

Change a setting

Most people never need to. Every setting starts as automatic. ThrustLab picks values that suit your motor and battery. For AM32 it starts from the defaults of the AM32 configurator, with the number of poles and the Kv matched to your motor, and a timing advance of 22.5°.

If you know your speed controller, you can set it up like the real one. In the tab "Speed controller":

  • "Find a setting" searches all the settings.
  • "Show: Changed" lists only the ones you changed.
  • "Reset all to automatic" clears your changes.

AM32 has 32 settings, with the names of the AM32 configurator. VESC has 109, in groups such as Ratings, Motor, Current control, Observer, Speed control and Limits. For VESC, the ratings are the maximum voltage and the continuous and burst current of your speed controller. They set the limits of the virtual one.

Two settings are worth knowing.

  • PWM frequency (AM32). The default is 24 kHz. At a high frequency, the controller can hold back the power it gives at start, so the motor stays slow. The result then says "A lower PWM frequency gives it more power at start."
  • Battery cut-off (VESC). When you give none, the cut-off is 3.2 V for each cell in the battery. If the voltage under load falls below it while the throttle is held, the controller stops the motor. This does not apply to a battery whose cells work at or below 3.2 V, such as LiFePO4 or NiMH.

You can also sweep the timing advance and the PWM frequency. See Run a sweep.

When a motor can't be simulated

The VESC twin can't run a motor that would turn faster than 120,000 electrical rpm. The result says so and names the limit. Choose AM32 for that motor, or a lower supply voltage.

To see what the controller did during a run, open the Diagnostics tab of the result. See Read a result.