This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于IQmATH算法的结果问题



感谢TI技术支持能迅速的回复我,还有一个问题要请教一下,

void HAL_setParams(HAL_Handle handle,const USER_Params *pUserParams)
{
uint_least8_t cnt;

HAL_Obj *obj = (HAL_Obj *)handle;
_iq beta_lp_pu = _IQ(pUserParams->offsetPole_rps/(float_t)pUserParams->ctrlFreq_Hz);

。。。

注:下面的函数没有写出来”

}

这个硬件配置函数中的beta_lp_pu应该是个局部变量,我想看他的结果值,我把他改为全局变量如下,

_iq beta_lp_pu ;

void HAL_setParams(HAL_Handle handle,const USER_Params *pUserParams)
{
uint_least8_t cnt;

HAL_Obj *obj = (HAL_Obj *)handle;
_iq beta_lp_pu = _IQ(pUserParams->offsetPole_rps/(float_t)pUserParams->ctrlFreq_Hz);

。。。

注:下面的函数没有写出来”

}

首先知道 pUserParams->offsetPole_rps=20;pUserParams->ctrlFreq_Hz=15000;

按我的理解,beta_lp_pu  = 22369;当我仿真时,为何值是-1702887272;

还有这个函数中的 _iq bias = _IQ12mpy(ADC_dataBias,_IQ(pUserParams->current_sf));

其中已知道ADC_dataBias=1《(12-);pUserParams->current_sf=2时, bias 是多少呀,麻烦你们帮我分析一下