TIDM-1001: 如何实现两相交错并联

Part Number: TIDM-1001

在该设计的设计文件中,我看到使用了180°错相,但在代码中未体现这一点,请问如何达到错相180°?

  • 您好,

    已经收到了您的案例,调查需要些时间,感谢您的耐心等待

  • 您好,

    它是通过LLC_HAL.C文件中的以下代码行完成的,从第163行到第260行

    //
    // Configure the action qualifier submodules for primary switching and
    // synchronous rectification to give 180 degree phase shift between the
    // two interleaved phases.
    //

    //
    // === Action Qualifier SubModule - PH1, PRI === //
    //
    // EPWMA low on CTR = 0
    // EPWMA high on CTR = CMPA, in up-count mode
    // EPWMA low on CTR = PRD
    // EPWMB AQ output is inverted by DB for RED on EPWMB output
    // EPWMB high on CTR = 0
    // EPWMB high on CTR = PRD
    // EPWMB low on CTR = CMPB, in down-count mode
    //
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
    EPWM_setActionQualifierAction(LLC_PRI1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);


    //
    // === Action Qualifier SubModule - PH1, SEC === //
    //
    // EPWMA high on CTR = 0
    // EPWMA low on CTR = CMPA, in up count
    // EPWMA low on CTR = PRD
    // EPWMB high on CTR = 0
    // EPWMB low on CTR = PRD
    // EPWMB high on CTR = CMPB, in down count
    //
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
    EPWM_setActionQualifierAction(LLC_SEC1_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);


    #if(LLC_NUMBER_OF_PHASES == 2)


    //
    // === Action Qualifier SubModule - PH2, PRI ===//
    //
    // Set EPWMA low on CTR = PRD
    // Set EPWMA high on CTR = CMPB in down-count
    // Set EPWMA low on CTR = 0
    // Set EPWMB high on CTR = CMPB
    // Set EPWMB low on CTR = CMPA in up-count
    // Set EPWMB high on CTR = PRD
    //
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_A,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_LOW,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
    EPWM_setActionQualifierAction(LLC_PRI2_PWM_BASE, EPWM_AQ_OUTPUT_B,
    EPWM_AQ_OUTPUT_HIGH,
    EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);

    Thanks

  • 我明白了,是通过配置两路的AQ动作相反,给予一样的Period和Duty来达到错相180的效果吗

x 出现错误。请重试或与管理员联系。