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.

Peak Current Control Realization for Boost Circuit Based on C2000 MCU

Hello.

I am looking into the implementation of peak current control for a DC/DC converter. I am looking at the document "Peak Current Control Realization for Boost Circuit Based on C2000 MCU", found here: 

https://www.ti.com/lit/an/sprabu2/sprabu2.pdf?ts=1602085708517&ref_url=https%253A%252F%252Fwww.google.com%252F

At page 10, looking at "Slope Compensation Code", I want to to understand mSlope_Com correctly. I am planning on using the F28069 device, and I'm reading the "TMS320x2806x Piccolo Technical Reference Manual".

What value should I set to "RAMPMAXREF_SHDW"? In the code example it is set to "(UINT16)(1024<<6);" during the Comparator setup code. Why? Then, in the end of the Slope Compensation Code, "RAMPMAXREF_SHDW" is set to "Ref", i.e the current reference. How should the "Ref" be set? If I want a current I_ref, then I need to set the "Ref" to something higher than I_ref, so that the compensated reference goes down to my desired current Iref to meet my sampled current at the right time. Or maybe I am misunderstanding how the compensated referencing works. Could you explain? 

I also do not understand why something is written to "DACVAL" at the end of the Slope Compensation Code. Isn't the DAC output automatically changed by "RAMPSTS" as the ramp is subtracting at every PWMSYNC?

 

  • Here is a diagram of the comparator and ramp. I think the DACSOURCE setting to 1 makes the ramp as input to the DAC. But in the code they set a value to the DACVAL. Why is the DACVAL even relevant in the code?

  • Mikael Blixman said:
    I am planning on using the F28069 device, and I'm reading the "TMS320x2806x Piccolo Technical Reference Manual".

    I would recommend considering the F28004x series if you have the option.  It is a newer design with similar price and performance.

    Mikael Blixman said:
    I am looking into the implementation of peak current control for a DC/DC converter. I am looking at the document "Peak Current Control Realization for Boost Circuit Based on C2000 MCU"

    I am not familiar with this document, but I agree with you that some of the commands in the software example look questionable.  The authors are no longer available for comment.

    Mikael Blixman said:
    What value should I set to "RAMPMAXREF_SHDW"? In the code example it is set to "(UINT16)(1024<<6);" during the Comparator setup code. Why?

    I assume that this was an arbitrary initialization value.  It would be overwritten as soon as the control-loop starts.  I would personally prefer starting with 0 and letting the control-loop ramp it up.

    Mikael Blixman said:
    Then, in the end of the Slope Compensation Code, "RAMPMAXREF_SHDW" is set to "Ref", i.e the current reference. How should the "Ref" be set? If I want a current I_ref, then I need to set the "Ref" to something higher than I_ref, so that the compensated reference goes down to my desired current Iref to meet my sampled current at the right time. Or maybe I am misunderstanding how the compensated referencing works. Could you explain? 

    Yes, the RAMPMAXREF calculation becomes complicated with the addition of slope compensation.  Fortunately, the control-loop can find the optimal RAMPMAXREF value as it seeks the desired output voltage.

    This document provides more theory behind the slope compensation scheme.  For the associated example, they used the CLA to program the DACVAL, but you will be able to use the Ramp Generator logic to control the DAC instead.

    Mikael Blixman said:
    I also do not understand why something is written to "DACVAL" at the end of the Slope Compensation Code. Isn't the DAC output automatically changed by "RAMPSTS" as the ramp is subtracting at every PWMSYNC?

    You are correct that with the Ramp Generator active, the writes to DACVAL will have no effect on the system.

  • Thanks for the reply. Maybe parts of the code are useful. Does it make sense to let RAMPDECVAL be the mulitplication of the reference current Ref and the slope Com_Ratio? I.e Ref*Com_Ratio, as it is in the code. 

  • In another document I found this calculation for slope calculation, but it's for a full bridge converter. 10% of the maximum current sense signal in a switching period, is that a rule of thumb that might be used? Do you think it would be possible to tweak the slope value manually until the system becomes stable?

  • Mikael Blixman said:
    Does it make sense to let RAMPDECVAL be the mulitplication of the reference current Ref and the slope Com_Ratio? I.e Ref*Com_Ratio, as it is in the code.

    I'm not familiar enough with the system to answer this question with confidence.  The primary purpose of the decrement slope is to guarantee that the duty cycle does not exceed 50%.  There are probably a number of different approaches that could be used to arrive at this behavior.

    Mikael Blixman said:
    In another document I found this calculation for slope calculation, but it's for a full bridge converter. 10% of the maximum current sense signal in a switching period, is that a rule of thumb that might be used? Do you think it would be possible to tweak the slope value manually until the system becomes stable?

    The theoretical slope calculations are dependent on the system topology.  This equation is probably a good starting point for its specific hardware.

    Manual tuning is certainly possible.  I think of the calculations as helping to provide a usable starting value for further evaluation on hardware.  The on-board components are not ideal so it is not uncommon to make manual adjustments.