Skip to main content
RReic.2
Associate II
August 20, 2025
Question

Motor suddenly turns in the wrong direction

  • August 20, 2025
  • 3 replies
  • 801 views

 

[PN]: Customer Board (Very similiar IHM08M1 and STM32G431RB)
[VERSION]: 6.3.1
[TOOL]: Motor Pilot
[DETAILS]: at heavy load step the motor turns suddenly in wrong direction with full speed (see plot below)
[EXPECTED BEHAVIOR]: stable speed or motor stops with speed feedback error or over current error
[HOW TO REPRODUCE]: Use PMSM Motor with FOC (STO+PLL as primary Sensor, 3shunt),  STM32CubeMX 6.12.1, Target Toolchain ST STM32CubeIDE, Firmware Package Version STM32 FW V1.6.0, Drive Type: LL

 

RReic2_0-1755679708505.png

RReic2_1-1755679993144.png

 

 

3 replies

GMA
Technical Moderator
August 20, 2025

Hello @RReic.2,

Could you plot the IQ_MEAS and IQ_REF during the error use case?
You can decrease the STO-PLL variance threshold to make the system more sensitive to incorrect speed estimation.

GMA_0-1755682743539.png

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
RReic.2
RReic.2Author
Associate II
August 20, 2025

Hello  @GMA

Thank you for supporting me.

Attached you will find two plots showing IQ_MEAS and IQ_REF at the moment when the motor starts turning in the wrong direction.

I also tried reducing the variance threshold from 25% to 10%, but unfortunately, this did not resolve the issue.

However, I discovered that lowering the PLL Kp in the Observer from 250 to 120 makes the problem less severe or almost eliminates it. That said, this adjustment results in poor control at low speeds.

 

RReic2_0-1755691584006.png

RReic2_1-1755691594628.png

 

 

GMA
Technical Moderator
August 28, 2025

Hello @RReic.2,

Thank you for your feedback. In the meantime, have you evaluated the "Observer + Cordic (Sensorless)" Speed Sensor Mode?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GMA
Technical Moderator
August 28, 2025

Hello @RReic.2,

It is to determine whether the Cordic, which estimates the angle differently from the PLL, exhibits such behavior. If so, whether it can generate an error when reverse rotation is initiated.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
RReic.2
RReic.2Author
Associate II
September 2, 2025

Hi @GMA 

It seems to be better with Cordic, it hasn't happened again.
Any tips on how to optimize C1 and C2?

GMA
Technical Moderator
September 2, 2025

Hello @RReic.2,

If you are referring to G1 and G2 observer gains, review the 2. Back-EMF state observer (STO) chapter in the Speed and position feedback sensorless algorithms section of the user manual. This documentation is available through the Workbench tool by navigating to About > Documentations > Documentation.

Gain1 is related to the current estimator, and Gain2 is related to the back-EMF/speed estimator.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GMA
Technical Moderator
September 3, 2025

Hello @RReic.2,

According to this post, you already faced the same issue. Did Cordic resolve the issue in this case, as you mentioned?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
RReic.2
RReic.2Author
Associate II
September 3, 2025

Hi @GMA cordic doesn't solve the problem. But at first glance it seems to be less common.