Skip to main content
Quentin Ch
Associate III
September 29, 2022
Solved

Motor sometimes starts in wrong direction, because of wrong sign of Iq measured

  • September 29, 2022
  • 3 replies
  • 3966 views

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,

This topic has been closed for replies.
Best answer by Quentin Ch

Okay, after investigation:

For the aligning the encoder, the MCSDK forces a stator magnetic field along the A phase, and then the rotor tends to align with this field.

However in some rare cases, the rotor is so that the rotor's field is at 180° of the A field: then there is nearly no torque generated during the alignement process, and after alignement, the 180° error induces a wrong sign on the rotor's angle, hence the wrong Iq sign and the reverse speed.

3 replies

Quentin Ch
Associate III
September 29, 2022
Quentin Ch
Quentin ChAuthorBest answer
Associate III
October 5, 2022

Okay, after investigation:

For the aligning the encoder, the MCSDK forces a stator magnetic field along the A phase, and then the rotor tends to align with this field.

However in some rare cases, the rotor is so that the rotor's field is at 180° of the A field: then there is nearly no torque generated during the alignement process, and after alignement, the 180° error induces a wrong sign on the rotor's angle, hence the wrong Iq sign and the reverse speed.

THA.1
Associate III
October 20, 2022

Thank you for a valuable information.

I would like to modify the alignment code as follows:

  • step 1: pre-alignment with Iq=alignment current, Id=0
  • step 2: the existing procedure in SDK (alignment with Iq=0, Id=alignment current)

The above problem would be resolved by the pre-alignment, where the rotor is positioned at 90 degree.

jartim
Associate III
November 17, 2022

Interesting solution, have you tried this, and did it work? I am having the exact same issue on my design but I haven't found a good solution as yet.

THA.1
Associate III
November 21, 2022

Not yet I tried, but surely I'd need this kind of improvement. As far as I know, there are several methods for better alignment, or compensating alignment gap during motor running once after alignment.