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.

TMS320F28069M: Understanding Vsref versus Overmodulation's duty limit

Part Number: TMS320F28069M

Greetings,

I'm trying to understand the significance of these quantities(specifically gMotorVars.Vsref and the svgencurrent->Vlimit), because I'm having a little trouble with these quantities and my motor controller at the moment.

As a starting point, I'll point out that I'm comparing Lab 5d (Instaspin MOTION Speed Control) versus Lab 10b (Instaspin MOTION Speed Control with Overmodulation).

In another thread (e2e.ti.com/.../2088170, I pointed out that in 'main.h', there is a line in the MOTOR_Vars_INIT which sets gMotorVars.Vsref equal to _IQ(0.8 * USER_MAX_VS_MAG_PU).  This means that in Lab 5d my Vsref is actually 0.4, since my MAX_VS_MAG_PU is 0.5. In that thread, it was implied that I could change this, and instead use _IQ(1.0 * USER_MAX_VS_MAG_PU) in 'main.h' for my MOTOR_Vars_INIT as long as I wasn't using field weakening.

I was about to set it this way so that my Vsref was 0.5, but then I was reading a bit in Lab 10b, and I found in the SVGEN initialization section the following:

  // Initialize and setup the 100% SVM generator
  svgencurrentHandle = SVGENCURRENT_init(&svgencurrent,sizeof(svgencurrent));
  // setup svgen current
  {
    float_t minWidth_microseconds = 2.0;
    uint16_t minWidth_counts = (uint16_t)(minWidth_microseconds * USER_SYSTEM_FREQ_MHz);
    float_t fdutyLimit = 0.5-(2.0*minWidth_microseconds*USER_PWM_FREQ_kHz*0.001);
    _iq dutyLimit = _IQ(fdutyLimit);

    SVGENCURRENT_setMinWidth(svgencurrentHandle, minWidth_counts);
    SVGENCURRENT_setIgnoreShunt(svgencurrentHandle, use_all);
    SVGENCURRENT_setMode(svgencurrentHandle,all_phase_measurable);
    SVGENCURRENT_setVlimit(svgencurrentHandle,dutyLimit);
  }

In my case, I have a PWM switching frequency of 14 kHz, and so when calculated out I found that the duty limit here used in SVGENCURRENT_setVlimit() is roughly 0.44.  Regardless, if my minWidth_microseconds is anything above 0.0, the duty limit is less than 0.5.

QUESTION:

Does this imply that if I set up Lab 5d such that my Vsref is 0.5, I'll be blowing up my motor controller because the currents are unsampleable?

  • Lab05d uses the SpinTAC Velocity Control to replace the InstaSPIN-FOC speed PI controller, need to sample currents to uses PI controller to implement current control also. The Iq_ref is set in ST_runVelCtl(), and VsRef is used in current PI controller to limit the Vs output also.
  • Hey Yanming,

    So, I understand that Lab 5d uses the SpinTAC Controller, and sets the Iq_ref rather than the traditional PI controller.

    My question has to do with the differences between the SpinTAC speed controller, and the SpinTAC speed controller WITH overmodulation.

    In Lab 5d, I could use a Vsref of anything less than or equal to 0.5.

    In Lab 10b, in the code snippet I included above, some type of Vlimit value is set by the function SVGENCURRENT_setVlimit(), and if you look at the math, this value is always set to be less than 0.5.

    I am wondering if these values have any relation to one another? I ask because I've had some initial troubles running Lab 10b when I try to enter the overmodulation region, but Lab 5d appears to run fine.