cancel
Showing results for 
Search instead for 
Did you mean: 

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

Quentin Ch
Associate III

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,

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin Ch
Associate III

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.

View solution in original post

6 REPLIES 6
Quentin Ch
Associate III
Quentin Ch
Associate III

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 II

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.

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.

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.

I implemented such solution as a workaround and it really improved the success rate.

(However it will still fil e.g. under heavy load where the pre-alignement can't move enough the shaft or under elastic load, it's not a 100% reliable solution)