Motor sometimes starts in wrong direction, because of wrong sign of Iq measured
Hello,
I can successfully control my motor in torque mode and speed mode.
However sometimes (randomly ?), at the first call to MC_StartMotor1(), after encoder aligment, the motor starts to spin in the wrong direction, faster and faster up to its max speed.
This occurs more often in torque mode than in speed mode.
When this occurs, the estimated Iq current has the wrong sign (normally on my setup, a Iq > 0 gives a speed > 0).
So the PID in FOC_CurrControllerM1() effectively computes a command that will increase the torque in the wrong direction instead of a torque that would put it on the right direction.
Any clue about this wrong sign ?
What could I look at ?
Setup:
- 4 pole pairs BLDC motor
- 3-sh Sensored FOC mode, 1024 PPR encoder
- IHM08M1 + Nucléo G474RE (or same with F401RE)
- MCSDK 6.0.0 (same with 5.Y.4)
Thanks,
