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.

current reconstruction in lab 10a

SVGENCURRENT module reconstructs phase currents in a simple way, depending on the state of an enumeration called: IgnoreShunt. The following logic is implemented as part of the SVGENCURRENT module in order to reconstruct the currents:

// select valid shunts and ignore one when needed
if (svgencurrent->IgnoreShunt==ignore_a)
{ // repair a based on b and c
Ia = -Ib - Ic; //Ia = -Ib - Ic;
}
else if (svgencurrent->IgnoreShunt==ignore_b)
{ // repair b based on a and c
Ib = -Ia - Ic; //Ib = -Ia - Ic;
}
else if (svgencurrent->IgnoreShunt==ignore_c)
{ // repair c based on a and b
Ic = -Ia - Ib; //Ic = -Ia - Ib;
}
else if (svgencurrent->IgnoreShunt==ignore_ab)
{ // repair a and b based on c
Ia = (-Ic)>>1; //Ia = (-Ic)/2;
Ib = Ia; //Ib = Ia;
}
else if (svgencurrent->IgnoreShunt==ignore_ac)
{ // repair a and c based on b
Ia = (-Ib)>>1; //Ia = (-Ib)/2;
Ic = Ia; //Ic = Ia;
}
else if (svgencurrent->IgnoreShunt==ignore_bc)

{ // repair b and c based on a
Ib = (-Ia)>>1; //Ib = (-Ia)/2;
Ic = Ib; //Ic = Ib;
}

A second stage of current reconstruction is added to this lab, where we take care of corner case conditions when two out of the three currents are not valid. This approach makes use of a running average, where the principle is simple, if a current is not valid, use a software approximation with a filter and its past values. The following code listing shows how this is done in lab 10:

gIavg.value[0] += (gAdcData.I.value[0] - gIavg.value[0])>>gIavg_shift;
gIavg.value[1] += (gAdcData.I.value[1] - gIavg.value[1])>>gIavg_shift;
gIavg.value[2] += (gAdcData.I.value[2] - gIavg.value[2])>>gIavg_shift;
if(ignoreShuntThisCycle == ignore_ab)
{
gAdcData.I.value[0] = gIavg.value[0];
gAdcData.I.value[1] = gIavg.value[1];
}
else if(ignoreShuntThisCycle == ignore_ac)
{
gAdcData.I.value[0] = gIavg.value[0];
gAdcData.I.value[2] = gIavg.value[2];
}
else if(ignoreShuntThisCycle == ignore_bc)
{
gAdcData.I.value[1] = gIavg.value[1];
gAdcData.I.value[2] = gIavg.value[2];
}

After this second stage of current reconstruction, the measured currents and estimated currents are as close as we can have in order to have an FOC system running during extreme overmodulation conditions.

What is the work principle of this algorithm?

  • You can refer to "InstaSPIN Projects and Labs User’s Guide", there is a detailed description in the Lab 10a. The basic principle is to re-created the currents that can bot be measured due to high duty cycles during SVM is in over-modulation region.
  • After the second stage of current reconstruction, the measured currents and estimated currents are as close as we can have in order to have an FOC system running during extreme overmodulation conditions.

    That is why?
  • Actually, current reconstruction has been done in SVGENCURRENT_RunRegenCurrent(). In the second stage, it's a average filter between sensed current in last several cycle and in current cycle, to get a usable current if pwm duty is too small to sense a real current.
  • “it's a average filter between sensed current in last several cycle and in current cycle, to get a usable current if pwm duty is too small to sense a real current.”. Is there any theoretical foundation or theoretical basis about this method which uses a average filter to approximate the current ?
    That is to say how to prove the current got by the average filter method can be used as reconstructive current...