cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug report] SPD_GetInstElSpeedDpp only works when using STO+PLL as speed sensing method

Sune Jensen
Associate II

 

SPD_GetInstElSpeedDpp is implemented in speed_pos_fdbk.h

 

 

static inline int16_t SPD_GetInstElSpeedDpp(const SpeednPosFdbk_Handle_t *pHandle)
{
#ifdef NULL_PTR_CHECK_SPD_POS_FBK
  return ((MC_NULL == pHandle) ? 0 : pHandle->InstantaneousElSpeedDpp);
#else
  return (pHandle->InstantaneousElSpeedDpp);
#endif
}

 

 

The returned variable pHandle->InstantaneousElSpeedDpp is however only updated when using STO+PLL as speed sensing method (see sto_pll_speed_pos_fdbk.c). For any other method (sensored or sensorless) InstantaneousElSpeedDpp is never updated.

SPD_GetInstElSpeedDpp is used in mc_tasks_foc.c (mc_tasks.c before version 6.3.0) to do do reverse park angle compensation. This means that REV_PARK_ANGLE_COMPENSATION_FACTOR does not work as expected for any other speed sensing method than STO+PLL.

 

 

hElAngle += SPD_GetInstElSpeedDpp(speedHandle)*REV_PARK_ANGLE_COMPENSATION_FACTOR;

 

 

As far as I can figure out, SPD_GetInstElSpeedDpp should actually return pHandle->hElSpeedDpp when using any other method than STO+PLL (or rather the different speed sensing methods ought to be refactored to use the variables in a consistent manner).

1 ACCEPTED SOLUTION

Accepted Solutions
GMA
ST Employee

Hello @Sune Jensen,

Thank you for your problem report. You are fully right; a ticket has been entered on our side and notification will be done once corrected in further delivery.

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

View solution in original post

1 REPLY 1
GMA
ST Employee

Hello @Sune Jensen,

Thank you for your problem report. You are fully right; a ticket has been entered on our side and notification will be done once corrected in further delivery.

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