Motor Speed Ceiling

Hi,

Actually a lot more is being discussed than just the encoder.
Here are things I collected recently, hope I haven’t forgot anything:

You can calculate the theoretical max speed of your motor by multiplying your supply voltage by the motor’s Kv rating.

You can find the Kv rating on the motor’s datasheet, or measure it with the following methods:

  • drill test with multimeter/tachometer
  • drill test with oscilloscope
  • Find KV rating sketches

In reality, they are different aspects that will prevent your motor from reaching that speed.

PWM Modulation:
Your driver will not reach the supply voltage:

  • if you limited the driver.voltage_limit
  • Deadtime is required to prevent shoot throughs, it depends on your hardware with 3PWM and on driver.dead_zone parameter for 6PWM, it will prevent the driver from reaching 100% PWM modulation.

Trapezoidal modes will provide the highest modulation, but are inefficient and noisy.
Space vector modulation will provide a higher modulation than Sinusoidal, thus a higher speed (which one should I use).

With Low side current sensing and FOC, you need to limit the PWM modulation to allow enough Low side mosfet ON time for phase current measurements, which will reduce the speed.

To sum up:

  • don’t set driver.voltage_limit if your motor can handle the power supply voltage and if you are not using low side current sensing
  • use Space Vector modulation with the following limit

motor.voltage_limit = 0.58 * driver.voltage_power_supply;

A higher limit can increase speed but will impact the waveform, generating more noise due to torque ripples.

Sensor alignment:
Sensor alignment will calibrate sensor.zero_offset_angle and might require tweaking.
This will ensure your motor is not running slower in one direction.

Lag compensation:

  • In voltage mode, lag compensation will compensate for the current vector lag due to the phase inductance (phase resistance, phase inductance and KV are required).
  • FOC_current mode will achieve the same goal through current sensing (phase resistance
    phase inductance and KV are not required).

Loop rate:
The faster your motor should spin, the higher your loop rate should be:

  • Slow MCUs can limit the loop rate. Prefer a more powerful MCU if you aim for high velocity
  • The higher pole pairs motors require a higher loop rate
  • Communication/debug can slow down the loop rate. Downsample monitoring.
  • Don’t print too often in the loop
  • Don’t put delays in the loop
  • Use faster implementation for your sensor (e.g. use STM32HWEncoder with AS5047P encoder)
  • The faster the motor spins, the more interrupts will be generated with hall sensors. Try running without interrupts by commenting enableinterrupts() statement (from SimpleFOC V2.3.4)
  • Velocity mode requires more computation than torque mode
  • FOC_current mode requires more computation than Voltage mode
  • Every additional motor you drive will divide the loop rate
7 Likes