2023-08-02 10:44 PM
When using MCSDK 5.4.8 to generate code with Hall sensor feedback control and considering the possibility of an attached load during startup, there is a chance of encountering excitation noise.
Normally, the U-phase current signal should correspond to the rising edge of the U-phase Hall sensor.
However, under abnormal conditions, there are multiple U-phase current signals between the rising and falling edges of the U-phase Hall sensor, resulting in the generation of motor excitation noise.(Follow ST file adjustments to the Hall phase section, which have already fine-tuned for optimal performance.)
I'm currently using the command MC_ProgramSpeedRampMotor1 to set the motor startup parameters, and the issue persists when switching between MC_StopMotor1 and MC_StartMotor1 after the first startup attempt.
Attempts to use MC_Clear_IqdrefMotor1/MC_AcknowledgeFaultMotor1 to clear the buffer when stopping the motor have been ineffective.
Assistance is required to identify which specific component needs adjustment to resolve this issue.
Solved! Go to Solution.
2023-08-08 01:23 AM
Hello YJHUNG,
The issue you are facing now reminds me of one that will be solved in the next release.
Please try replacing the HALL_CalcElAngle in hall_speed_pos_fdbk.c by this new one :
__weak int16_t HALL_CalcElAngle(HALL_Handle_t *pHandle)
{
int16_t retValue;
#ifdef NULL_PTR_CHECK_HALL_SPD_POS_FDB
if (NULL == pHandle)
{
retValue = 0;
}
else
{
#endif
if (pHandle->_Super.hElSpeedDpp != HALL_MAX_PSEUDO_SPEED)
{
pHandle->IncrementElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed;
pHandle->PrevRotorFreq = pHandle->_Super.hElSpeedDpp;
if (pHandle->IncrementElAngle >= S16_60_PHASE_SHIFT)
{
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed - (pHandle->IncrementElAngle - S16_60_PHASE_SHIFT) - 1;
pHandle->IncrementElAngle = S16_60_PHASE_SHIFT;
}
else if (pHandle->IncrementElAngle <= -S16_60_PHASE_SHIFT)
{
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed - (pHandle->IncrementElAngle + S16_60_PHASE_SHIFT) + 1;
pHandle->IncrementElAngle = -S16_60_PHASE_SHIFT;
}
else
{
pHandle->MeasuredElAngle += pHandle->_Super.hElSpeedDpp;
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed;
}
}
else
{
pHandle->_Super.hElAngle += pHandle->PrevRotorFreq;
}
retValue = pHandle->_Super.hElAngle;
#ifdef NULL_PTR_CHECK_HALL_SPD_POS_FDB
}
#endif
return (retValue);
}
/* Reset incremental value */
pHandle->IncrementElAngle = pHandle->_Super.hElAngle - pHandle->MeasuredElAngle;
and HALL_Init_Electrical_Angle :
/* Reset incremental value */
pHandle->IncrementElAngle = 0;
int16_t IncrementElAngle;/*!< This is the cumulated electrical angle between
two consecutive Hall sensor commutations.*/
2023-08-03 01:55 AM
Hello YJHUNG,
I have a few questions to help me understand what you are experiencing :
May I ask you what is the configuration that you are using ? Is it a custom board ? On which MCU are you working ?
Could you tell me what kind of motor you are using please ?
What are the abnormal start-up conditions you are referring to ? Is it repeatable and characterizable ?
Are you waiting for the motor to stop completely before initializing another start-up, or do you call MC_StartMotor1 directly after ?
Thank you,
Gaël A.
2023-08-04 03:24 AM
We are currently referencing the combination of Nucleo-G431 and X-NUCLEO-IHM08M1 to adapt the configuration onto our custom-designed board. The main difference in configuration between the two lies in the MOS and driver, which have been modified to handle higher current.
The motor being used is the M155CN drum motor with a pole pair count of 10P. The design operates at 36V with an average power of 250W.
The observed abnormal phenomenon involves a high-frequency signal in the U-phase during the startup phase, leading to a audible magnetic noise from the motor. This phenomenon occurs around 70% of the time, specifically during startup with a load. Startup without a load is normal.
We have attempted to address this issue by waiting for the motor to return to an idle state before executing the next action. The occurrence of this issue is closely tied to the motor being near stoppage, and we have also observed the same event during stop-and-start sequences.
The specific description of the anomaly is that the U-phase current experiences high-frequency oscillations during startup when there is either no Hall signal or within a single Hall signal cycle.
Under normal conditions, a U-phase current aligns with the Hall signal. Currently, direct use of the development board results in a high probability of encountering a 'speed feedback error.' As a result, we have made modifications to the configuration of the Hall signal input into the TIM terminal, as shown in the diagram
2023-08-04 05:08 AM
Hello YJHUNG,
Thank you for your answer. I will try to replicate your setup and see what can be the issue you are facing. In the meantime, could you tell me if you are sensing current with 3-Shunt or a single shunt ?
Regards,
Gaël A.
2023-08-04 09:18 AM
I used 3-shunt
2023-08-07 08:52 PM
An update on the current status: I generated a new code using version 6.1.2 to compare and update HALL_Init_Electrical_Angle / HALL_CalcAvrgMecSpeedUnit to the original version 5.4.8. This has resulted in an improvement in the frequency of occurrences, with a significant reduction in the frequency. However, there is still a chance of it happening intermittently. I have also conducted a comparison by measuring three Hall signals against the occurrence. It appears that the issue occurs when the magnetic excitation takes place before the Hall signals are generated. This seems to be related to the positioning angle. Is there a corresponding solution or reference article available for this particular issue?
Red: U-phase current
2023-08-08 01:23 AM
Hello YJHUNG,
The issue you are facing now reminds me of one that will be solved in the next release.
Please try replacing the HALL_CalcElAngle in hall_speed_pos_fdbk.c by this new one :
__weak int16_t HALL_CalcElAngle(HALL_Handle_t *pHandle)
{
int16_t retValue;
#ifdef NULL_PTR_CHECK_HALL_SPD_POS_FDB
if (NULL == pHandle)
{
retValue = 0;
}
else
{
#endif
if (pHandle->_Super.hElSpeedDpp != HALL_MAX_PSEUDO_SPEED)
{
pHandle->IncrementElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed;
pHandle->PrevRotorFreq = pHandle->_Super.hElSpeedDpp;
if (pHandle->IncrementElAngle >= S16_60_PHASE_SHIFT)
{
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed - (pHandle->IncrementElAngle - S16_60_PHASE_SHIFT) - 1;
pHandle->IncrementElAngle = S16_60_PHASE_SHIFT;
}
else if (pHandle->IncrementElAngle <= -S16_60_PHASE_SHIFT)
{
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed - (pHandle->IncrementElAngle + S16_60_PHASE_SHIFT) + 1;
pHandle->IncrementElAngle = -S16_60_PHASE_SHIFT;
}
else
{
pHandle->MeasuredElAngle += pHandle->_Super.hElSpeedDpp;
pHandle->_Super.hElAngle += pHandle->_Super.hElSpeedDpp + pHandle->CompSpeed;
}
}
else
{
pHandle->_Super.hElAngle += pHandle->PrevRotorFreq;
}
retValue = pHandle->_Super.hElAngle;
#ifdef NULL_PTR_CHECK_HALL_SPD_POS_FDB
}
#endif
return (retValue);
}
/* Reset incremental value */
pHandle->IncrementElAngle = pHandle->_Super.hElAngle - pHandle->MeasuredElAngle;
and HALL_Init_Electrical_Angle :
/* Reset incremental value */
pHandle->IncrementElAngle = 0;
int16_t IncrementElAngle;/*!< This is the cumulated electrical angle between
two consecutive Hall sensor commutations.*/
2023-08-10 05:53 PM
Currently, I've implemented two things based on your suggestions: adding code and increasing the filtering capacitor for HALL signals. So far, the issue hasn't occurred in testing. Additionally, I noticed the Hall MTPA function. Does enabling this function bypass the initial estimated angle from the Hall sensors?
2024-07-29 11:27 AM
Hello,
@Gael A
I read through release notes for 6.2, 6.2.1, and 6.3 and do not see this fix called out. Can you confirm if it was/was not included in any of these releases?
Can you also explain if disabling MTPA will also resolve this issue?