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.

TIDM-HV-1PH-DCAC: Which frequency was selected for the Low frequency switches

Part Number: TIDM-HV-1PH-DCAC

Hi,

Please I would like to ask which frequency was selected for the low frequency switches.  I did not find the value in the entire application report.

From the diagram on page 6 of the design sheet, if the switching frequency is 20KHz, then the frquency of the low frequency switches would be 4kHz.  Is this correct.

Thanks.

Yours,

Babatola Abayomi

  • Hi,

    The low frequency is turned on and off based on ac line cycle.

    Please check 'Figure 2. PWM Waveform Generation Using PWM Peripheral on C2000 MCU' in the user guide ( p.6).

    Best,

    John

  • hi John,

    Thanks for the reply.  That means that  the low frequency is either 50 0r 60 hz.  I however have another question.

    In the example (voltageSourceInverterLCFltr_F28004x) that relates to the application report, both epwms were configured for 20 KHz.  This negates the Figure 2.  The code is below:


    setupInverterPWM(INV_PWM1_BASE,INV_PWM2_BASE,
    INV_PWM_PERIOD,INV_DEADBAND_PWM_COUNT,
    INV_DEADBAND_PWM_COUNT);

    void setupInverterPWM(uint32_t base1, uint32_t base2, uint16_t pwm_period_ticks,
    uint16_t pwm_dbred_ticks, uint16_t pwm_dbfed_ticks)
    {
    //
    // PWM clock on F2837x is divided by 2
    // Deadband needs to be 0.5us => 10ns*50=500ns
    // Time Base SubModule Registers
    //
    EPWM_setPeriodLoadMode(base1,EPWM_PERIOD_SHADOW_LOAD);
    EPWM_setTimeBasePeriod(base1,pwm_period_ticks >>1);
    EPWM_setTimeBaseCounter(base1,0);
    EPWM_setPhaseShift(base1,0);
    EPWM_setTimeBaseCounterMode(base1,EPWM_COUNTER_MODE_UP_DOWN);
    EPWM_setClockPrescaler(base1,EPWM_CLOCK_DIVIDER_1,EPWM_HSCLOCK_DIVIDER_1);

    EPWM_setPeriodLoadMode(base2,EPWM_PERIOD_SHADOW_LOAD);
    EPWM_setTimeBasePeriod(base2,pwm_period_ticks >>1);
    EPWM_setTimeBaseCounter(base2,0);
    EPWM_setPhaseShift(base2,0);
    EPWM_setTimeBaseCounterMode(base2,EPWM_COUNTER_MODE_UP_DOWN);
    EPWM_setClockPrescaler(base2,EPWM_CLOCK_DIVIDER_1,EPWM_HSCLOCK_DIVIDER_1);

    How am I best to interpret this.

    Thanks

  • Hi,

    Check duty update code below. base2_EPWM is set to 1 and AQ setting is changed depending on duty (positive or negative)

    static inline void updateInverterPWM(uint32_t base1, uint32_t base2,
    float32_t duty)
    {
    uint16_t invDuty;

    invDuty= ((float32_t)(INV_PWM_PERIOD/2.0f)) * (1.0f-fabsf(duty));

    if(invDuty==(EPWM_getTimeBasePeriod(base1)))
    {
    invDuty=invDuty-1;
    }

    EPWM_setCounterCompareValue(base1,EPWM_COUNTER_COMPARE_A,invDuty);
    EPWM_setCounterCompareValue(base2,EPWM_COUNTER_COMPARE_A,1);

    // Used for debugging purposes
    // wait for the PWM to start counting down
    // make sure the PWM is counting down
    // if(EPWM_getTimeBaseCounterDirection(base1)==0)
    // {
    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);
    }
    // }
    }