STM32的电机控制库2.0中有关SVPWM实现的计算PWM高电平时间的代码问题
switch(bSector)
{
case SECTOR_1:
case SECTOR_4:
hTimePhA = (T/8) + ((((T + wX) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhB - wX/131072;
break;
case SECTOR_2:
case SECTOR_5:
hTimePhA = (T/8) + ((((T + wY) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhA - wY/131072;
break;
case SECTOR_3:
case SECTOR_6:
hTimePhA = (T/8) + ((((T - wX) + wY)/2)/131072);
hTimePhC = hTimePhA - wY/131072;
hTimePhB = hTimePhC + wX/131072;
break;
default:
break;
}
这里面的131072是怎么来的?困惑好久 |