Skip to main content
Senior III
August 1, 2025
Question

Motor Jerks at start and multiple Speed Feedback faults

  • August 1, 2025
  • 6 replies
  • 1517 views

I have multiple issues while driving the vehicle with the MCSDK software running. It is custom hardware MCSDK6.4.0

Hall sensor based.

1. Every time i start the vehicle at the beginning it jerks and then picks up, the behavior is not predictable, but jerking is always there some times more, less and hall fault etc. Now i have tested again on the bench and captured the waveform of the phase currents

STuser2_0-1754046691755.png

The first few steps before the sinusoidal phase currents is problematic, so if i count i get 3 jerks before the motor started running. Can i eliminate this? It always happens when i start. Does it have anything to do with hall placement angle. I have not run the Motor pilot as i don't have the setup for that. I can perform multiple iterations of trial and error for the placement angle if the above angle is a problem at present it is 30. And my forward movement and reverse does not have the same placement angle may be due to the motor design.

Next major problem is intermittent speed feedback fault i can't predict when it happens this mainly occurs when i am starting the vehicle and also intermittently. On the bench i have tried to produce the issue

STuser2_1-1754047070648.png

Measured angle started deviating from the super angle and fault happens.

STuser2_2-1754047140273.png

STuser2_3-1754047162831.png

Both the above are the same scenario 0x20 fault

 

STuser2_4-1754047198805.png

All the start and stop scenarios all in between i find jerks. 

STuser2_5-1754047263679.png

Starting jerk before starting. 

I have taken several failure graphs, if you can suggest me the correct direction i can look into. My only question the behavior shall be predictable but it is not.

6 replies

STuser2Author
Senior III
August 2, 2025

I wanted to know if i follow exactly the method proposed in the MCSDK documentation and get the HALL_PHASE_SHIFT.

STuser2_0-1754127831186.png

will it be different from the value i get by running the motor profiler?

STuser2Author
Senior III
August 4, 2025

It is mostly related to Hall noise trying to improve the hardware filtering.

GMA
Technical Moderator
August 4, 2025

Hello @STuser2,

Could you plot the STOPLL_EL_ANGLE and HALL_EL_ANGLE using Sto-Pll as the main speed sensor and Hall as the auxiliary speed sensor? The goal is to check if both angles are aligned during the startup phase.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
STuser2Author
Senior III
August 4, 2025

At present i am using the Hall sensor as the main sensor and not using the auxiliary sensor, for the purpose of debugging i need to do the setting as referred by you and confirm if both the angles are aligned at start up and then go back to the original configuration, is my understanding correct? 

STuser2Author
Senior III
September 1, 2025

The actual scenario i have now captured in the lab the same scenario in vehicle

STuser2_0-1756711790872.png

 

I have put a load of 80kg that is when the jerks start at the beginning of the vehicle, jerks are where the steps of the electrical angle are present, the rotor angle takes big time before it becomes sinusoidal. Could you please advise how do i solve this problem?

My observation is as the load is increased the jerks are increasing.

STuser2Author
Senior III
September 6, 2025

Finally I figured out the Jerk issue there is a bug in the code in the file hall_speed_pos_fdbk.c

 /* Discard first capture */
 if (0U == pHandle->FirstCapt)
 {
 pHandle->FirstCapt++;
 (void)LL_TIM_IC_GetCaptureCH1(TIMx);
 }

 we are discarding the first capture, But in the 

__weak void *HALL_TIMx_UP_IRQHandler(void *pHandleVoid)
{

 /* Reset first capture flag */
 pHandle->FirstCapt = 0U;
}

When the load is high the Hall timer overflow is happening and the FirstCapt variable is resetting to 0 and every time the Input capture considers it as first pulse and does not process.

STuser2_0-1757148143994.png

 

The above is the debug variable i have added in the code and verified that it stays in the loop. I have commented the code and it works fine. My only question is can we consider all the pulses without discarding, since i feel that one pulse also has some impact. Request ST team to confirm if the above solution is correct and i can proceed with the change and thank you for support.

 

STuser2Author
Senior III
September 7, 2025

I think the better solution will be 

 /* SW Init */
 if (0U == hMinReliableElSpeedUnit)
 {
 /* Set fixed to 150 ms */
 pHandle->HallTimeout = 150U;
 }

increase the HallTimeout to 1000 (1Sec), since the solution from previous post has reduced the jerks but not solved completely that is because i think the other variables are also getting reset apart form 

FirstCapt

testing is pending.

GMA
Technical Moderator
September 9, 2025

Hello @STuser2,

Thank you for your feedback.
We are attempting to reproduce this behavior and will provide an update once we have more information.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
STuser2Author
Senior III
September 16, 2025

Hello @GMA 

Were you able to reproduce the issue? or it has something to do with my hardware / tuning.

Thank you.