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.

BuckBoost Control Loop Design w. Digital Power Library

Other Parts Discussed in Thread: TMS320F28035

Hi,

I have designed a control loop for a BuckBoost Converter in Simulink. I am using the 2 Pole 2 Zero controller from the Digital Power Library for realizing my controller on the TMS320F28035 @60Mhz. The Switching Frequency for my FETs is 100kHz. So the update Rate for my control loop is also 100kHz.

I have coefficients like this from Simulink:  b0= 0.32; b1=-0.56; b2= 0.25; a2= 0.013; a1=-1.01

The coefficients needs to bee implemented in Q26 format. In this case, my coefficients will fit into the range of Q26.

But my concern is the following:

the ADC-Macro from the Digital Power Library produces an output with the Range from 0 to 1; In the Hardware i use a Voltage divider 1/50; and a Reference Voltage of 2.048V for the ADC. So I have to scale down my desired Reference Voltage by approx. 1/100. This is also what the ADC does in my case.

The Difference of these Values with the Range 0-1 is passed to the Controller. The Controller outputs the Duty Cycle also in a Range of 0 to 1.

But where comes my Scaling factor of 100 (from the above ADC) into account? do i have to scale my b-coefficients from above with the factor of 100? 

The Problem is, when I scale my coefficients with factor 100, they won't fit into the Q26 range.

So how is it done when I want to control high voltages (100V for example)? How can I solve the Problem? or am I totally wrong with my assumptions?

Thank you!

  • 1374.ControlLoop.tiff

    I hope, this helps to understand what I mean. Red is the voltage divider (Hardware) in front of the ADC. So the Reference needs also to be scaled down with the same factor. In my control loop I have to do the Inverse of these. so multiply with nearly 100. I have highlighted the complete Controller in Green. But when I take all gains into account in my coefficients, they won't fit into Q26 format. So it's only possible to control small voltages...

  • There are multiple ways to tackle the problem, 

    In your example i see you multiply the PID outputs with the ADC gains and Voltage divider gains?? This is not how i will do this.. 

    I typically assume the PID output to be duty and then according to the modulation scheme chosen and the voltage input this is translated to a voltage across the inductor. so after the PID it's just the power stage.. no gains etc.. 

    If by chance you come across a system which needs coefficients which are greater that Q26 then you will have to understand the code and adjust the library blocks/ create your own.. the source code is available and there are enough comments to assist you in doing this. 

    Otherwise you can use a floating point device..