2025-10-17 6:58 AM - edited 2025-10-17 7:31 AM
Hi everybody,
This is the configuration of my setup:
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
2025-10-17 7:10 AM
Hello @jovijuan,
The attachment is missing.
Which boards and current topology are you using? Are you using torque or speed mode?
2025-10-17 7:23 AM
Thanks for pointing that out. I have edited the original post with the following details
2025-10-17 8:23 AM
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.
2025-10-21 7:09 AM
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.
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
2025-10-21 8:58 AM
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.