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.

TMS320F280025: maximum duty cycle is below 100%, even with maximum modulation

Part Number: TMS320F280025


Dear support team,

I'm currently testing my owm board with a software which is based on universal motor control SDK.

Motor are running correctly, startup is good, I also greatly improve the flying start by calculating Vd and Vq IN and setting those value to Id and Iq regulator output just before enabling PWM, this works very fine (I do the same in the past when it was INSTASPIN...).

I'm currently checking the max PWM duty cycle and I canont reach 100%.

I first try with #define USER_M1_MAX_VS_MAG_PU               (0.576f) and then I increase to #define USER_M1_MAX_VS_MAG_PU             (0.65f) but It remains lower than 100%.

Overmodulation is enabled with predefined symbol MOTOR1_OVM.

PWM freq is set to 19kHz, dead band delay count are set to 150 (=>1.5us), SVM is SVM_COM_C

See below PWM_U_H (yellow), PWM_U_L (blue) and phase U current (should be inverted current clamp was set in the wrong direction), as you can see, I can have 0% duty cycle (0% PWM HIGH / 100% PWM LOW but not 100% on PWM HIGH)

There is always a small pulse to 0 (a little bit less than 2us):

I cannot see why I can't have a real 100%. Can you please help me?

Regards.

  • Hello,

    During those spikes, are you able to record the value of the variables in the SVGENCURRENT object? Seeing those may help track down exactly where the issue is occurring. For example, a conditional breakpoint based on the value of CMPx may help with this, if that's where the problem lies.

    Regards,
    Jason Osborn

  • Hello,

    I record the value pwmData.Vabc_pu.value[0] just after SVGEN_RUN, the max value are >0.5 and min value < -0.5 (see below) so no issue here:

    Then I recod the same after SVGENCURRENT_compPWMData, the value are also >0.5 and <- 0.5.

    Then I record pwmData.cmpValue[0] just after HAL_writePWMData, min value is 16, max value is 2631.

    2631 is USER_M1_PWM_TBPRD_NUM (max value = period) and min value (16) is the minimum value defined in HAL_setTriggerPrams.

    I read on the forum different discussions where it was needed to add some code in the ISR for 0% and 100% duty cycle but according to technical reference manual, figure 17-26, there is no need for this microcontroller.

  • I think I found the root cause, this is due to the min value which is set in HAL_writePWMData in correlation whith the dead band generator, by reducing the min value to 0, I can get 100% duty cycle.

    Now my question is is it needed to have a minimum value when overmodulation / current reconstruction is enabled? It seems it run with 0 as a minimum value.

    Regards.

  • Hello again,

    By changing the min value to 0, I'm able to get 100% duty cycle but I can not get pulse lower than 2us, it means that I can not reach duty cycle between 96% and 100%.

    It is probably related to dead time, can you please advice ?

    Regards.

  • Manu,

    For your final question, a pulse shorter than the deadband will be missed.

    My preferred method of bypassing this issue when it is relevant is to set DBRED and DBFED to 0, then alter my CMPA/B calculations to ensure that the deadband is still present.

    Alternatively, if using 100% duty, it may be useful to set the Action Qualifier to act on period and/or zero instead of CMPA/B.

    Regards,
    Jason Osborn

  • OK, I will do as you suggest in case this create an issue (at this time I'm not sure it is an issue till I can get 100% in the top, for sure it will create distorsion but probably not so much).

    What about the minimum value in HAL_writePWMData in the universal motor control lab?

    Now my question is is it needed to have a minimum value when overmodulation / current reconstruction is enabled? It seems it run with 0 as a minimum value.

    Regards.

  • The minimum value present is there as a safety in order to allow for deadband and ADC sampling to occur without issue. As long as you're accounting for these things safely, it can be set to 0.

    Regards,
    Jason Osborn