基于ST的foc控制库2.0中占空比计算的问题
最近在搞基于stm32的pmsm控制,有个问题看不明白,有没有前辈们可以指导一下啊:在这个函数中void SVPWM_3ShuntCalcDutyCycles (Volt_Components Stat_Volt_Input)的矢量占空比的计算公式是怎么推倒过来的啊:case SECTOR_1:
hTimePhA = (T/8) + ((((T + wX) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhB - wX/131072;
case SECTOR_2:
hTimePhA = (T/8) + ((((T + wY) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhA - wY/131072;
case SECTOR_3:
hTimePhA = (T/8) + ((((T - wX) + wY)/2)/131072);
hTimePhC = hTimePhA - wY/131072;
hTimePhB = hTimePhC + wX/131072;
case SECTOR_4:
hTimePhA = (T/8) + ((((T + wX) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhB - wX/131072;
case SECTOR_5:
hTimePhA = (T/8) + ((((T + wY) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhA - wY/131072;
case SECTOR_6:
hTimePhA = (T/8) + ((((T - wX) + wY)/2)/131072);
hTimePhC = hTimePhA - wY/131072;
hTimePhB = hTimePhC + wX/131072;
论坛里很早前就有这个问题的讨论,别在新开帖子了 这个你要看SVPWM的实现里,不同的扇区和PWM时间的关系 xiaoxiao201005 发表于 2014-7-23 14:39
论坛里很早前就有这个问题的讨论,别在新开帖子了
找不到那个帖子啊,方便给个链接吗,谢了 IPS 发表于 2014-7-23 15:09
这个你要看SVPWM的实现里,不同的扇区和PWM时间的关系
这是扇区判断的关系:还有就是老感觉,按st这种方法判断判断扇区,扇区号不是连续的。
wUAlpha = Stat_Volt_Input.qV_Component1 * T_SQRT3 ;
wUBeta = -(Stat_Volt_Input.qV_Component2 * T);
wX = wUBeta;
wY = (wUBeta + wUAlpha)/2;
wZ = (wUBeta - wUAlpha)/2;
// Sector calculation from wX, wY, wZ
if (wY<0)
{
if (wZ<0)
{
bSector = SECTOR_5;
}
else // wZ >= 0
if (wX<=0)
{
bSector = SECTOR_4;
}
else // wX > 0
{
bSector = SECTOR_3;
}
}
else // wY > 0
{
if (wZ>=0)
{
bSector = SECTOR_2;
}
else // wZ < 0
if (wX<=0)
{
bSector = SECTOR_6;
}
else // wX > 0
{
bSector = SECTOR_1;
}
}
楼主这块理解了吗?谁能帮忙解释下 为什么是T/8加呢??
页:
[1]