I’m using SimpleFOC on a Nucleo-64 with an (AliExpress) SimpleFOC shield, in position mode.
When I give it a series of positions which it can get to, it seems totally fine.
But, if I increase the rate at which the same set of positions is requested, so that it is unable to ever reach its target, it works well for a few minutes then becomes erratic & twitchy. Shortly after that it either stops moving or goes into a steady spin.
I’ve tried logging the PID last_error values to see if the controllers were suffering some kind of windup, but they don’t seem to grow ridiculously.
I’ve looked at the encoder position values in the bad state, and they seem sensible.
Tracing out the motor voltages show that they are not changing when it is in the bad, stopped state.
After a reset, everything works again, so I don’t think this could be a thermal problem.
I’m at a bit of a loss for where to look next. Any thoughts ? Thanks!
The way you describe the error it sounds like the motor is losing alignment to the magnet… when the misalignment reaches a certain level all the current gets put into the D axis instead of the Q, and the motor stops moving. Don’t leave it for long in this state or it will get very hot and break…
Is there any chance that the rapid motions you command might be causing the magnet to slip out of position?