|||
K = (Ts*1.732051)/Udc;
for(i=0;i<DataP;i+=1)
{
U1=ubeta[i];
U2=(-ubeta[i]+ualfa[i]*1.732051)/2;
U3=(-ubeta[i]-ualfa[i]*1.732051)/2; // 计算确定扇区数需要的3个参考量
switch(sector[i])
{
case 0: T4 = K*U2;T6 = K*U1;T7 = (Ts - T4 - T6)/2;
Tu = TP*(T4 + T6 + T7);Tv = TP*(T6 + T7);Tw = TP*(T7);break;
case 1: T6 = -K*U3;T2 = -K*U2;T7 = (Ts - T2 -T6)/2;
Tu = TP*(T6 + T7);Tv = TP*(T2 + T6 + T7);Tw = TP*(T7);break;
case 2: T2 = K*U1;T3 = K*U3;T7 = (Ts - T2 - T3)/2;
Tu = TP*(T7);Tv = TP*(T2 + T3 + T7);Tw = TP*(T3 + T7);break;
case 3: T3 = -K*U2;T1 = -K*U1;T7 = (Ts - T1 - T3)/2;
Tu = TP*(T7);Tv = TP*(T3 + T7);Tw = TP*(T1 + T3 + T7);break;
case 4: T1 = K*U3;T5 = K*U2;T7 = (Ts - T1 - T5)/2;
Tu = TP*(T5 + T7);Tv = TP*(T7);Tw = TP*(T1 + T5 + T7);break;
case 5: T5 = -K*U1;T4 = -K*U3;T7 = (Ts - T4 - T5)/2;
Tu = TP*(T4 + T5 + T7);Tv = TP*(T7);Tw = TP*(T5 + T7);break;
default: break;
}