hi:
I find that in some old version of motorware, the svgen algorithm is traditional svgen algorithm to generate SVPWM signal.
however in the newest motorware, all of the svngen algorithms are reimplented like this (the doc call that Implements a SVM that saturates at the level of MaxModulation.), does somebody know what's the impact on performance when using this algorithm instead of traditional svgen algorithm.
{
_iq Vmax,Vmin,Vcom;
_iq Va,Vb,Vc;
_iq maxModulation = SVGEN_getMaxModulation(handle);
_iq maxModulationNeg = -maxModulation;
_iq Va_tmp = -(pVab->value[0]>>1);
_iq Vb_tmp = pVab->value[1];
Va = pVab->value[0]; //alpha
Vb = Va_tmp + _IQmpy(SVGEN_SQRT3_OVER_2, Vb_tmp); //-0.5*alpha + sqrt(3)/2 * beta;
Vc = Va_tmp - _IQmpy(SVGEN_SQRT3_OVER_2, Vb_tmp); //-0.5*alpha - sqrt(3)/2 * beta;
// Clipping
Va=_IQsat(Va, maxModulation, maxModulationNeg);
Vb=_IQsat(Vb, maxModulation, maxModulationNeg);
Vc=_IQsat(Vc, maxModulation, maxModulationNeg);
Vmax=0;
Vmin=0;
// find order Vmin,Vmid,Vmax
if (Va > Vb)
{
Vmax = Va;
Vmin = Vb;
}
else
{
Vmax = Vb;
Vmin = Va;
}
if (Vc > Vmax)
{
Vmax = Vc;
}
else if (Vc < Vmin)
{
Vmin = Vc;
}
Vcom = (Vmax+Vmin)>>1; //0.5*(Vmax+Vmin)
// Subtract common-mode term to achieve SV modulation
pT->value[0] = (Vcom - Va);
pT->value[1] = (Vcom - Vb);
pT->value[2] = (Vcom - Vc);
return;
} // end of SVGEN_run() function