This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

what's the impact on performance when change from traditional svgen algorithm to the computation reducing algorithm now using.

Other Parts Discussed in Thread: MOTORWARE

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

  • you're correct, we changed the SVGEN_run function in MotorWare 14 and didn't document that we did so, or why. Let me see if I can get an answer.

    As a related FYI, we are updating the overmodulation (svgen_current) technique for MotorWare 15.
  • I also want to know this svgen.h. I do not know the theory of it. And I want to know how to realize the overmodulation in the lab 10a.

    1、I change the maxmodulation as 1.15, but where is the code about maxmodulation theroy? I only know the PI out's max is bigger and we use the rebuilding of current. 

    2、In the rebuilding of currents, when the ignore phase is two, for example, when Ibc is ignored, why Ic=Ib=-Ia/2? Ib should not be always same with Ic.

  • 1. in proj_lab10 svgen.c/.h is replaced with svgen_current.c/.h.  Please review the logic in that code. It is much more about deciding which currents to use than any change in the modulation algorithm.  In the next version of MotorWare we will be updating with an improved version.

    2. I can't comment on this...I'll see if the developer will.

  • But in my lab10a, the code is just changing the currents. No changing svgen.h. Like that:

    1.// run the controller
    CTRL_run(ctrlHandle,halHandle,&gAdcData,&gPwmData);
    2.open the ctrl_run:
    then get // run the online controller
    CTRL_runOnLine_User(handle,pAdcData,pPwmData);
    3.open the CTRL_runOnLine_User:
    // run Clarke transform on current
    CLARKE_run(obj->clarkeHandle_I,&pAdcData->I,CTRL_getIab_in_addr(handle));
    ………………
    ………………
    // run the space Vector Generator (SVGEN) module
    SVGEN_run(obj->svgenHandle,CTRL_getVab_out_addr(handle),&(pPwmData->Tabc));
    4. Only in clarke_run, the current is not same as before, because we do the rebuilding. But SVGEN_run is also same as before. So it means that we do not change the svgen.h.
  • correct
    see chapter 5.1.8 of SPRUHJ1
  • In reply to ChrisClearman:

       I also want to know the theory about this svgen.h. I didn't see similar theory about SVPWM in this svgen.h. Could you please tell me the derivation process of pT->value[0] = (Vcom - Va);pT->value[1] = (Vcom - Vb);pT->value[2] = (Vcom - Vc);  Thank you very much.

    {

    _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

  • The theory behind our current SVM technique can be found in the following reference:

     

    ADVANCED ELECTRIC DRIVES, Analysis, Control and Modeling using Simulink, by Ned Mohan, pp. 7-6 and 7-7.

     

    The advantage is that it seemlessly transitions into the overmodulation mode of operation by simply increasing the modulation index.  Also, unlike third-harmonic modulation, there is no need to calculate a sin( ) value or use a lookup table.

    The disadvantage is that the equations as currently implemented only allow you to do the "reverse-alternating null" SVM pattern.  If you wanted to do some of the other SVM patterns which reduce switching losses, you would have to change the equations

     

    -Dave

    .

  • In reply to Dave,
    Thank you very much. I am now reading the book.