2025-09-17 2:26 AM
I'm using ST MC Workbench v6.4.1 to generate sensorless FOC control code and trying to run a motor with the following setup:
PWM frequency: 50 kHz
Motor: 7-pole pair BLDC, 1750 Kv
Bus voltage: 24 V
Most other parameters are at default values
When I run the motor unloaded and increase the speed, the SPEED_MEAS parameter (observed in ST Motor Pilot) suddenly turns negative around 27,000 RPM. I’ve tried adjusting current loop and PLL parameters, but it didn’t help.
Any idea what could be causing this issue? How can I resolve it?
2025-09-17 2:41 AM
Hello @orse,
Does the motor physically change its direction of rotation, or is only the SPEED_MEAS incorrectly reported?
2025-09-17 2:53 AM
Hi @GMA ,
The motor's rotation direction remains correct. It is only a measurement error.
2025-09-18 12:30 AM
Hello @orse,
Thank you for your report.
At this rotation speed level, the 6-step algorithm is typically more suitable.
For Sensor less STO-PLL, Speed variables are computed in SPEED_UNIT, which represents a tenth of a Hertz. To verify whether one of the internal variables has exceeded its dynamic range, modify the code as follows for testing purposes:
In mc_stm_types.h
/** Revolutions Per Minute: 1 Hz is 60 RPM */
#define U_RPM 60
/** Tenth of Hertz: 1 Hz is 10 01Hz */
#define U_01HZ 10
/** Hertz (Speed in Hz)*/
#define U_1HZ 1 /* (New definition) */
#define SPEED_UNIT U_1HZ /* Speed in Hz (modified) */
In drive_parameters.h
#define PID_SPEED_KP_DEFAULT XXX /*/(SPEED_UNIT/10)*/ /* (modified) */
#define PID_SPEED_KI_DEFAULT XXX /*/(SPEED_UNIT/10)*/ /* (modified) */