SPRACY3 June   2021 F29H850TU , F29H859TU-Q1 , TMS320F280023C , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040C-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280048C-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28076 , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2Design Overview
  4. 3CLB Implementation
    1. 3.1 CLB Input Selection
    2. 3.2 Counter and FSM Configuration
    3. 3.3 CLB Output
    4. 3.4 Completed Design
  5. 4Normal Operation With CBC Protection Configuration
    1. 4.1 CBC Protection Configuration
    2. 4.2 Swapping EPWM Configurations During Zero Cross Point
  6. 5Other Considerations
    1. 5.1 Trip Sourced From CMPSS
    2. 5.2 Extend to 3 Phase Inverter
      1. 5.2.1 Input Selection
      2. 5.2.2 Output Selection
    3. 5.3 Achieve 2 Level Protection Scheme
  7. 6Test Results
  8. 7References

Swapping EPWM Configurations During Zero Cross Point

Since grid-tied inverter needs to take care of the control during both positive and negative cycle, the EPWM signals should be swapped, together with related protection logic, at the zero cross point, which is handled in the PWM1_ISR as below. “negative_flag” and “positive_flag” can make sure the EPWM reconfiguration is implemented one time during the switching.

    if(positive_cycle)
    {
        EPWM_setCounterCompareValue(EPWM1_BASE,EPWM_COUNTER_COMPARE_A,EPwm1_Cmpa);
        if(negative_flag)
        {
          EPWM_setCounterCompareValue(EPWM2_BASE,EPWM_COUNTER_COMPARE_A,EPWM1_TBPRD);
          EPWM_enableTripZoneSignals(EPWM1_BASE,EPWM_TZ_SIGNAL_DCAEVT2);
          EPWM_disableTripZoneSignals(EPWM2_BASE,EPWM_TZ_SIGNAL_DCAEVT2);

          negative_flag=0;
          positive_flag=1;
        }
    }
    else
    {
        EPWM_setCounterCompareValue(EPWM2_BASE,EPWM_COUNTER_COMPARE_A,EPwm1_Cmpa);
        if(positive_flag)
        {
          EPWM_setCounterCompareValue(EPWM1_BASE,EPWM_COUNTER_COMPARE_A,EPWM1_TBPRD);
          EPWM_disableTripZoneSignals(EPWM1_BASE,EPWM_TZ_SIGNAL_DCAEVT2);
          EPWM_enableTripZoneSignals(EPWM2_BASE,EPWM_TZ_SIGNAL_DCAEVT2);

          positive_flag =0;
          negative_flag = 1;
        }
}

Table 4-1 has summarized the different EPWM settings for positive and negative cycles. During the zero cross point, the switching for EPwm1_Cmpa ↔ TBPRD for CMPA should be taken care, where CMPA is directly related to the duty cycle provided by the control loop, that is CMPA=(1- duty cycle)* TBPRD. Besides, during positive cycle, the CBC protection should be disabled for EPWM2 and enabled for EPWM1, and vice versa for negative cycle operation.

Table 4-1 Different EPWM Settings for Positive and Negative Cycles
PWM Signals Basic Setting Positive Cycle Negative Cycle
EPWM1A-S1 ↑ CAU
↓ ZRO, CAD
1_CMPA=EPwm1_Cmpa
Enable CBC
1_CMPA= EPWM1_TBPRD
Disable CBC
EPWM2B-S2 Active High Complementary to EPWM2A, with dead time=t1 Disable CBC Enable CBC
EPWM1B-S3 Active High Complementary to EPWM1A, with dead time=t1 Enable CBC Disable CBC
EPWM2A-S4 ↑ CAU
↓ ZRO, CAD
2_CMPA=EPWM1_TBPRD
Disable CBC
2_CMPA=EPwm1_Cmpa
Enable CBC