请教(Microchip)AN1017关于电机正弦控制的问题,小的有几个问题不明白,请教大家:
在AN1017 demo程序中
1)
// These Phase values represent the base Phase value of the sinewave for each
// one of the sectors (each sector is a translation of the hall effect sensors
// reading
#define PHASE_ZERO 57344
#define PHASE_ONE ((PHASE_ZERO + 65536/6) % 65536) //2730
#define PHASE_TWO ((PHASE_ONE + 65536/6) % 65536) //13652
#define PHASE_THREE ((PHASE_TWO + 65536/6) % 65536) //24574
#define PHASE_FOUR ((PHASE_THREE + 65536/6) % 65536) //35496
#define PHASE_FIVE ((PHASE_FOUR + 65536/6) % 65536) //46418
请教Phase_zero为什么定义为-45度?
2)
if (Required_Direction == CW)
{
Phase = PhaseValues[Sector];
}
else
{
// For CCW an offset must be added to compensate difference in
// symmetry of the sine table used for CW and CCW
Phase = PhaseValues[(Sector + 3) % 6] + PhaseOffset;
}
请教大家,电机反转时,Phase = PhaseValues[(Sector + 3) % 6] + PhaseOffset;
看不明白。
注: int PhaseOffset = 4100;
麻烦大家多多指教,谢谢!!
(原文件名:sector.JPG)
注视是说,这个角度是因为,正传和反转用的是同一个表,为了对称,然后加上这个角度的。但是不理解啊。
一周热门 更多>