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.

TMS320F280049C: Voltage Source Inverter Reference Design Guide: TIDM-HV-1PH-DCAC.

Part Number: TMS320F280049C
Other Parts Discussed in Thread: TIDM-HV-1PH-DCAC, C2000WARE

Hi,

I'm finding the code implementation of TIDM-HV-1PH-DCAC a little different from what was described in the reference design.

In the project code from c2000ware, I find that the two PWM modules are configured for the same frequency as shown below.

Whereas in the reference, it was described that the modulation technique is modified unipolar therefore having both pwm operating at different frequencies as shown below.



Please help clear my confusion. Thanks

  • Hello Aloba

    Please see the below line of codes from the project in the file "board.h". When duty is greater than 0, the output of EPWM2 is always 0 and vice-versa. Also, the CMPA value of EPWM2 is always 1 so it just see the polarity of duty and set itself high or low. The polarity of the duty is changed based on the desired frequency of AC output. 

    if(duty>=0)
    {
    // CTR = CMPA@UP , set to 1
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
    // CTR = CMPA@Down , toggle
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_TOGGLE, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
    // CTR=0, clear to 0
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    // CTR = CMPA@Down , clear
    EPWM_setActionQualifierAction(base2, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
    }
    else
    {
    // CTR = CMPA@UP , clear to 0
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
    // CTR = CMPA@Down , toggle
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_TOGGLE, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
    // CTR=0, set to 1
    EPWM_setActionQualifierAction(base1, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    // CTR = CMPA@Down , set
    EPWM_setActionQualifierAction(base2, EPWM_AQ_OUTPUT_A ,
    EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
    }

    Thanks

    Amir

  • Hi Amir,

    Thanks for your response. But this explanation has not cleared up my confusion.

    The explanation above explains the changing of the duty cycle but not exactly the frequency of operation of the PWM.

    Thanks.

    Aloba.

  • Hello Aloba

    Please note that the output of a PWM may not necessarily be equal to the frequency for which it is set. The output can be overwritten by the Action Quilifier. With that said, the output of EPWM2 is controlled by the polarity of the duty ratio. So it just depends on the polarity of the duty ratio. I would again suggest to go through the code above I suggested and take reference of the technical reference manual.

    Thanks

    Amir

  • Hi Amir

    Thanks for the explanation. It is now clear to me.

    Warm regards.

    Aloba.

  • Good to know that.

    Thanks

    Amir