请教下各位高手:
FOC库里面的s16 HALL_GetRotorFreq ( void )函数中,
1.为什么求Fdpp时,要乘10000呢?
2.为什么求Fdpp没有乘上65536(对应2pi)呢?如果不乘上2pi我感觉求的单位是:圈/每PWM周期啊?
#define ROTOR_SPEED_FACTOR ((u32)((CK
tiM*10)) / 3)
#define PSEUDO_FREQ_CONV ((u32)(ROTOR_SPEED_FACTOR / (SAMPLING_FREQ * 10)) *
0x10000uL)
求Fdpp
hRotorFreq_dpp = (s16)((u16) (PSEUDO_FREQ_CONV / PeriodMeasAux.wPeriod));
求0.1Hz unit的频率
F0.1Hz = ((hRotorFreq_dpp * SAMPLING_FREQ * 10)/(65536 * POLE_PAIR_NUM));
一周热门 更多>