Boost converter - understanding TI's calculations  - Page 1
Forum section: electronics / beginners

author: Saimoun
author_rank: Frequent Contributor
timestamp: March 10, 2022, 10:05:47 am
content: HiSo I just want to understand the math to select the right values for a boost converter, based on some of TI's document.I'm looking at this:https://www.ti.com/cn/lit/ds/symlink/tps61040.pdfwhich shows the attached example and attached calculations.Using their given example (for simplicity I'm gonna assume Vin = Vin-min = 2V), I get:* I peak = 420mA* Fs max = 420kHz* Fs load = 190kHz* I load max = 18mA (assuming 80% efficiency)So far so good. But then I try to use these values and put them in the formulas shown inhttps://www.ti.com/lit/an/slva372c/slva372c.pdf- another TI document.That's when it goes bonkersI get the following (still assuming Vin = Vin-min = 2V and 80% efficiency):* D = 91% (isn't that already crazy?)* Inductor ripple current Delta-IL = 960mA (whaaat - the TPS61040 has maximum switching current of 400mA or did I miss something here? Also that's for a 10mA output current!!)* I max out = that's negative of course, while it should be the same as "I load max = 18mA", no?Then it makes less and less sense.Clearly I'm missing something here.Thank you!!Simon

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2022, 11:05:20 am
content: Show your working!Meanwhile here's a LTspice sim of the fig.12 circuit, using the T.I. unencrypted PSPICE model, with the 10mA load current switched on after 400uS, which will help you validate your calculations.Edit: The PSPICE model has some LTspice compatibility problems. I've done a quick & dirty patch job on it to convert it to LTspice syntax. Rename the attached .lib.txt file to have just a .lib extension and replace the one in the .zip with it. N.B. it appears that it doesn't model internal currents drawn from the Vin, EN and FB pins.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 10, 2022, 03:59:13 pm
content: Right, welcome to appnotes. They're always top quality, as you see.As for a ground-up understanding, consider what happens as the switch goes on and off. When on, Vin is applied to the inductor. According to the inductor equation,V = L dI/dtif V and L are momentarily fixed, then dI/dt is also fixed: current is rising at a constant slope. It starts from whatever the initial current was, then by the time the switch turns off, has reached some higher peak value.Likewise if the inductor discharges into a clamp diode and very large capacitor, Vout is essentially fixed (i.e. ripple is a small fraction of Vout), so a voltage of Vin - Vout is applied to the inductor, and thus the current ramp is negative during this phase.We get one more condition, where if I drops to zero, the diode ceases conduction, and the switch node rings down to Vin. This is DCM (discontinuous current mode). The waveform during this phase is an RLC resonance between L, and switch and diode capacitances, and whatever loss resistance is present. Starting from an initial amplitude of Vout - Vin and ringing down. So there's a first downward swing of that waveform, which can approach 0V, which is a particularly opportune time to turn on again; this is exactly the operation of QR (quasi-resonant) boost/flyback controllers, and therefore operate in BCM (boundary). If the switch turns on before inductor current reaches zero, then it does so in hard switching (switch turns on with substantial voltage across it, and some fraction of full load current -- whatever the current remaining is), and operation is CCM (continuous).Now consider the control type. TPS61040 is a hysteretic control. The block diagram shows a current sense and Max On Time which turn off the switch, and a feedback comparator and Min Off Time to turn it on. There is a comparator, not an erroramplifier, and there is no compensation R+C. These devices are prone to high output ripple -- some ripple is necessary to cross the comparator's thresholds; and to erratic behavior, as limitations due to the fixed timers, and response of the circuit around it, cause alternate short and long pulses, or burst mode operation, or etc. So, the output ripple / emissions can be richer in harmonics/noise, which is more difficult to filter. The only thing you are guaranteed with a hysteretic control, is that the ripple will never be better or worse than some margin (determined by thresholds, min/max timing, and inductance and capacitance, and maybe further factors). Also, being an instantaneous sort of control, transient response is very good: within one cycle.Another popular type is peak current mode control. This has a similar block diagram, but instead of a fixed current limit, the limit is adjustable, proportional to the output of an error amplifier. Instead of an error comparator starting the switch, a fixed oscillator turns it on every cycle (also briefly blanking the switch at the end of every cycle, to ensure it doesn't get stuck into 100% duty). This has very predictable emissions -- the output ripple is fixed frequency, and it can be filtered arbitrarily low because no ripple voltage is needed by the control. Control is very simple, in that it's basically a 2nd-order feedback loop that only needs two components (R+C) to fully tune the stability / transient response. UC3843 is an archetype of this control. Downsides are, potentially slower transient response (due to the continuous-time feedback loop responding gradually over time), and values must be chosen correctly to avoid subharmonic oscillation, or chaos.Aside: peak current mode control is, in fact, an electronic implementation of a chaotic iterated system, thelogistic map. For small values of the parameter, stable operation results. At large values, operationbifurcatesinto two, four, etc. (and so on, hyperbolically?), operating states. In the logistic map, these are simply the sequence of numbers in a cycle; for the peak current mode control, the parameter is ripple fraction (>100% (DCM) is stable, CCM is unstable), and the states are pulse widths. So at the onset of chaos, you get alternate long and short pulse widths; you get one long cycle which, because it spent most of its time on, hardly has any time to discharge before the next cycle begins; then the next cycle starts with a lot of initial current so is on only briefly before turning off, but is then able to discharge the inductor pretty well.Operationally, the consequence of chaos is somewhat increased losses, and increased input/output ripple -- particularly at low (subharmonic) frequencies. Frequencies that may be audible from the inductor or capacitors, hence a whine or hiss sound as well. (This is different from the whine of a burst-mode control, which is more or less proportional to load current.)Subharmonic oscillation can be avoided by slope compensation (adding some of the RC timing ramp into the current ramp signal), which makes it a hybrid voltage/current mode PWM system. This worsens current regulation (so the switch current at low duty cycles (heavy load, fault, startup conditions) can be much higher than the nominal current limit), so can only go so far before design issues take over. Typically, these controls are good down to 50 or 33% ripple fraction. Which is pretty good.Also, the point about ripple fraction is, the higher it is, the higher losses are -- more peak currents drawn from the capacitors, more flux swing in the inductor, relative to the amount of power you're getting. Which makes this control unappealing past 100W or so (at which point, forward and resonant converters take over).For arbitrarily low ripple fractions, a different tack can be used: regulate inductor current directly, then servo that with a voltage error amp. This is average current mode control. Downsides are yet slower operation -- roughly speaking, the inductor current can't change any faster than Fsw * [ripple fraction] (intuitively; think about it!), and at light load or high ripple fraction, can be prone to subharmonic oscillation (but only period doubling AFAIK, not the whole logistic map!). They're also easy to make from discrete components, and easy to adapt to synchronous rectification, to get lower losses at full load (but, somewhat harder to do with that, AND get good performance at light load).So, thinking about the waveforms a bit, and what triggers on/off switching, or determines Fsw, etc., should give you some ideas about the applicability of those equations. Point in case: the second equation is backwards for a hysteretic control: you can't simply assume some frequency; rather, the frequency depends on everything else -- it should be rearranged with Fsw on the left, if anything!Tim

author: Saimoun
author_rank: Frequent Contributor
timestamp: March 10, 2022, 09:29:35 pm
content: Wow, thanks for the (very) long explanation TimI cannot say I understand 100%, but yea most of it makes sense!I think I also get now why my other design started smoking (https://www.eevblog.com/forum/beginners/my-boost-converter-is-smoking-d/), because the controller is using peak current mode control, and like you wrote I put a too big inductor which made the system unstable.I've also been reading about it and think I start to get CCM, DCM, as well as PWM, PFM, and looking also into synchronous converters (which might be what I end up using for my project).@Ian: thanks for the simulating circuit - actually yes that is spot on! But unfortunately for me this is only helpful when using well-known brands like TI, Linear, AD & like.But then I kinda go back to my original question, the reason why I used that TI app note in the first place: how do you choose your components on a Boost converter? For the inductance I get it I can start with the value the datasheet suggests. But what current should the inductor withstand? How does its DCR affect? What about the input cap, the output cap? Their ESR?If someone has like a simple tutorial I could follow that would be awesomeOr maybe it is impossible without knowing all the details of the functioning of the used IC?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 10, 2022, 10:01:57 pm
content: Really short answer: use the datasheet examples!Slightly less short answer: design it for its ratings, because that's what it's compensated for, limits are set at, etc., and so you aren't blowing up components in corners of operating conditions (like startup or load fault). If you need a reduced current limit, shop around for an even smaller regulator (surprisingly uncommon I think?), use a controller (set your own current limit!), or add a current limiter to the output.Once you're comfortable drawing the waveforms yourself, you can use calculators like this to run through things quicker:http://schmidt-walter-schaltnetzteile.de/smps_e/smps_e.htmlThe design equations are all given here too. Note that the default values are set for something like 20% current ripple, much too low for peak current mode controllers. They're just suggestions anyway, set your own values as needed.Also that's only about the inductor switching cycle, under the assumption of zero input or output ripple; you'll still need to select caps suitable for that current, and for the regulator's internal compensation, or select the compensation network for an externally compensated type.It's still not actually obvious why your regulator was smoking; you didn't give exact component types/values so I don't really know, but given that it's a hysteretic type, it can still work with large inductors, just poorly (higher ripple or lower frequencies than expected?). If you chose parts severely underrated for the regulator's capacity (i.e. it's dumping peaks up to 400mA, while still averaging the 30mA or whatever load you were testing at), maybe that would cause problems. It's not even a problem, necessarily, if the inductor is saturating during those peaks -- the inductance drops so the loop momentarily speeds up, terminating the cycle early, and so it repeats; and even if it repeats at its maximum switching frequency (some MHz?), that shouldn't be too painful, I mean it's made to do that, more or less. Although thinking about it, maybe it could run at several, maybe even as much as like 5MHz, which would incur a lot more switching loss than intended? Not sure.All the more reason to equip an oscilloscope first thing when working with these things!Tim

author: tooki
author_rank: Super Contributor
timestamp: March 10, 2022, 11:06:10 pm
content: Have you looked at the tools available athttps://www.ti.com/product/TPS61040?qgpn=tps61040#design-tools-simulation?In particular, look at the WEBENCH power designer web tool. It’s not obvious at first glance that its proposed designs are highly customizable — you can change component values (to real-world components) and see how the simulation changes.

author: Saimoun
author_rank: Frequent Contributor
timestamp: March 11, 2022, 07:02:02 am
content: Quote from: T3sl4co1l on March 10, 2022, 10:01:57 pmIf only it were that easyBut yea I guess that's a good starting point!@tooki: thanks for the tip! Yes I knew about WeBench, that's actually a very good point!And Tim, for the smoking design - the regulator was not a hysteretic type, the datasheet says it "uses a fixed frequency, peak current mode boost regulator architecture". Either you're confused with the TPS61040 (that was not the one used in the smoking design), or then I have not understood a word of your previous messageSo I guess the answer was indeed using a too big inductor, which made it unstable as you said peak current mode regulators can easily get into chaos.Funny thing is I've been trying to stay away from DC-DC converters until I could buy decent equipment like an oscilloscope - I can see now that it was a very good decisionThank you all very much for your answers, I'll keep looking and learning then

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 11, 2022, 04:46:00 pm
content: Oh right, that was the... whatever the other Chinese regulator was. Still, even if it's badly compensated, it should still be doing about the right thing, on average (you measured Vout within tolerance right?), not going crazy.Tim