cancel
Showing results for 
Search instead for 
Did you mean: 

Sensorless FOC. Motor suddenly runs in reverse direction on load change

jovijuan
Associate III

Hi everybody,

This is the configuration of my setup:

  • MC Motor Control Workbench v6.4.1
  • LL library
  • 24V, 2 pole pairs, 5A, BLDC motor.
  • Observer + PLL (Sensorless)
  • Max speed 16000 rpm
  • Custom board with STM32G491
  • Control mode: speed
  • Current measurement topology: 3 shunt

I am testing motor control and tuning PID constants. When I apply some braking torque to the output shaft, sometimes the motor starts rotating in the opposite direction at full speed, and it stays there.

I have experienced the same with v6.3.2

It doesn't seem to be related to control constants.

It looks like it has happened before in this forum (link) and it doesn't look like it was fixed.

The plot with the reference and actual speed is attached.

Has anybody experienced this before?

Edit: 17/10/2025: add the missing attachment, board description, control mode and current measurement topology

5 REPLIES 5
GMA
ST Employee

Hello @jovijuan,

The attachment is missing.
Which boards and current topology are you using? Are you using torque or speed mode?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Thanks for pointing that out. I have edited the original post with the following details

  • Custom board with STM32G491
  • 3 shunt
  • Speed control mode

By the way. It's a custom board, but I can run it with STLink V3 connected. I might pause when that happens or monitor variables on the fly via SWO.
I'm still checking what could be the reason. It looks like an overflow or signed/unsigned issue.

I can reproduce the direction shift and capture data. Torque reference doesn't seem to flip, maybe it's the rotor position estimation that changes and a positive torque reference turns the motor in the opposite direction.

jovijuan_0-1761055653214.png

Al least, as speed is correctly identified, it should be possible to trigger a "Speed Feedback" error similar to when the speed gets too low

 

Log all important variables.
You can log them periodically (maybe 10Hz?) in an array and send them live via UART or send/read them after the experiment.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.