2024-09-24 11:36 PM - edited 2024-10-01 04:14 AM
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).
Solved! Go to Solution.
2024-10-04 01:20 AM
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.
2024-10-04 01:20 AM
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.