Skip to main content
luke514
Associate III
June 9, 2026
Question

Motor with encoder and FOC spinning poorly and roughly at low speed

  • June 9, 2026
  • 0 replies
  • 8 views

Hi everyone, I’m using the X-NUCLEO-IHM08M1 with the g474re core and a BL23E33-01D-04RO motor (which reaches 4000 rpm).

I want to use FOC and the motor’s internal encoder, so I’ve made the hardware modifications described in the IHM08M1 manual and those also required by MC Workbench before code generation. I have therefore set the main sensor to the encoder and the auxiliary sensor to the sensorless PLL+observer.

In STM32CubeIDE, the motor runs smoothly and the speed is correct, but at low speeds (below 60 rpm) it freezes and sometimes lags... I have no reported firmware errors. I don't have any load connected to the motor (yet).

What could be causing this? PID?

 

I can provide screenshots of the signals you want; I’m using CubeMonitor.

 

PWM: 16kHz

SW dead time 850ns

Regulator execution time: 63us (1 PWM) - three shunt

Gain: 5.18

Bus voltage divider: 19.17

Quadrature encoder:

  • average FIFO depth = 16
  • Input capture filter duration = 0.75 us

PID: autocalculate Kp & Ki for both current and speed regulator

 

 

-------------------------------------30 rpm - motor not spinning or spinning poorly/roughly----------------------------------------------------------

 

 

Encoder from oscilloscope:
https://streamable.com/2xdrsx

(If the link expires, let me know and I'll update it)

 

 

-----------------------------------------------------------------2000 rpm--------------------------------------------