AnsweredAssumed Answered

STM32 FOC Space vector PWM Calc problem

Question asked by weiwei liu on Jan 10, 2018

hi,

 

For FOC2.0, function CALC_SVPWM(Volt_Components Stat_Volt_Input)

for example:

in SECTOR_1

hTimePhA = (T/8) + ((((T + wX) - wZ)/2)/131072);
hTimePhB = hTimePhA + wZ/131072;
hTimePhC = hTimePhB - wX/131072;

 

for FOC 4.3, function uint16_t PWMC_SetPhaseVoltage(CPWMC this, Volt_Components Valfa_beta)

for example:

in SECTOR_1

wTimePhA = (int32_t)(CLASS_PARAMS->hPWMperiod)/4 + ((wX - wZ)/(int32_t)262144);
wTimePhB = wTimePhA + wZ/131072;
wTimePhC = wTimePhB - wX/131072;

 

look at this: ((((T + wX) - wZ)/2)/131072)  ==> ((wX - wZ)/(int32_t)262144)

why T lost?

thank you very much.

Outcomes