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.

C2000-DIGITAL-CONTROL-LIBRARY: Using an externally generated ramp for average current mode control in C2000 F2837xD MCU

Part Number: C2000-DIGITAL-CONTROL-LIBRARY

Hi,

In the ePWM submodule, it seems that an internally generated up, down, or up-down sawtooth wave is generated on the C2000 MCU series.

If one wishes to use an externally generated ramp, such as in average current mode control of a flyback converter where the error signal is compared with the transformer current, what is the best way to go around this? The digital sub-compare module?

Regards,
Joel

  • Hello,

    In the ePWM submodule, it seems that an internally generated up, down, or up-down sawtooth wave is generated on the C2000 MCU series.

    Can you clarify with kit or design you are looking at?

  • Hi Gus, 

    I am using the F2837xD MCU. It is for my own design which I am doing for a PhD to control my converter I have designed. I hoped to use average current mode control, where I derive a ramp from the switch current. But I'm unsure how exactly I could do this and use the dead-time submodule at the same time. 

  • Thanks for the clarification. I've looped in one of our digital power experts. 

  • Hi Joel,

    For average current mode control based on C2000, you utilize the ADC to sense the current and compare with your current reference(from voltage loop). The error then can be utilized with DCL control library in ISR to calculate the duty cycle.

    Regards,

    Chen

  • Hi Chen,

    Thanks for your reply. The issue I'm having, is that with a flyback, in discontinous conduction mode, you do not sense the average current, rather you use the switch current as the "ramp" and then compare the ramp with the outer voltage loop to directly generate the PWM. There isn't really an error from the subtraction of the average current from the outer voltage loop like you may find in, say, a CCM buck converter. 

  • Hi Joel,

    Then you can use the CMPSS module with EPWM module. One input of CMPSS will be the sensed "ramp". The other will be the internal reference which is from voltage loop. 

    Regards,

    Chen

  • Hi Chen,

    Thanks for your reply, but I have some confusions about this approach.

    Doing it this way, will that not by-pass the deadband submodules, since those also work on an internally generated ramp?

    If I have my own ramp, which is the switch current, how do I ensure that my complimentary high output is generated?

    You also mention that I can set the internal reference which is from my voltage loop - I suppose I would set this as a DAC value in software, which is a function of the error I calculate with say a PI controller?

    Thanks,
    Joel

  • I also was planning on using the HRPWM function - alongside the deadband module - to have very high resolution PWM control of the output voltage, because this needs to be very low noise. 

    Is it possible to use the dead-band sub-system, and the HRPWM with this method, or is it moot?

  • Hi Joel,

    You should be able to to use T1 and T2 event in EPWM module which does not bypass the dead band submodule. This will help you generate complimentary output.

    "You also mention that I can set the internal reference which is from my voltage loop - I suppose I would set this as a DAC value in software, which is a function of the error I calculate with say a PI controller? " -- yes.

    Regards,

    Chen

  • And using HRPWM with deadband is fine with F2837x device if your switching freq is very high.

    Regards,

    Chen