Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Interesting Way to Calculate Max Current in a Buck Circuit

Status
Not open for further replies.

MrAl

Well-Known Member
Most Helpful Member
Hello there,

There hadnt been much coming up here in the theory of circuits, so i thought i would add something interesting today. When calculating the inductor current in a buck circuit it is a good idea to figure out the current with a 50 percent duty cycle switching cycle. This post aims to do that using harmonics. The results are quite interesting because the formula comes out so very very simple. It is worth taking a look at.


INDUCTOR CURRENT USING HARMONICS

When using harmonics to analyze the inductor current in a buck circuit
i find that we end up with an extremely simple formula to calculate the
peak to peak and the max current in the inductor:
peak to peak amps=E/(2*L*F)
where
E is one half the input supply voltage,
L is the inductance, and
F is the switch frequency.

Note ELF spells Elf :)

And knowing the peak to peak amps and the DC output current we can calculate
the max inductor current after steady state has been reached:
Ipp/2+Idc=Ipeak+Idc

and Ipeak=E/(4*L*F).

It's almost too simple to believe, but here is the derivation.


With large enough output cap so that there is little ripple voltage, we have:
I=(4/pi)*E/(j*w*L)

the amplitude of which is:
I=(4/pi)*E/(w*L)

where
E is the peak square wave which is usually one half of the DC
supply voltage. So for a 10v supply we would have E=5.

The phase shift is:
-atan2(E/(w*L),0)

which works out to:
-pi/2

for any E,w,L, because there is zero real part and those are always positive.
This means that the function used can be cos(nwt) instead of sin(nwt) because
sin(nwt-pi/2) is equal to cos(nwt).

Also, since the amplitude is:
I=(4/pi)*E/(w*L)
or
I=(4/pi)*E/(2*pi*f*L)

we only have to calculate the amplitude once for the fundamental and then we
can just divide by the harmonic number to get the amplitudes of the others,
remembering that we must also divide by the harmonic number again because
of the square wave excitation. We end up with this:
I=(4/pi)*E/(2*pi*f*L*n^2)

where n is the odd harmonic number 1,3,5, etc.

To get this into series form for any term we end up with:
-(2*cos(k*t*w)*E)/(F*(2*k-1)^2*pi^2*L)
or:
-(2*cos(2*pi*F*k*t)*E)/(F*(2*k-1)^2*pi^2*L)
or positive:
(2*E*cos(2*pi*k*t*F))/(pi^2*(2*k-1)^2*F*L)

where k runs from 1 to infinity (this time both odd and even k).

Factoring:
2*E/(pi^2*F*L)*cos(2*pi*t*k*F)/(2*k-1)^2

Now we intend to evaluate at t=1/F because that is where the peak
occurs, so we end up with:
2*E/(pi^2*F*L)*1/(2*k-1)^2

and the factor 1/(2*k-1)^2 with 1000 terms sums to:
1.233450550157003

so we'll approximate that factor to be 1.233:
2*E/(pi^2*F*L)*1.233

Now with E=5 and F=10000 and L=500uH we get:
0.249858 peak
which agrees good enough with the measurement of 500ma peak to peak.

Now to get a more exact result we investigate the origin of the factor
1.233 a little deeper...

The actual factor 1.233 is really equal to:
1.233700550136169827354311374984518891914212425905098828301668672

out to 64 significant digits, but the actual result is exactly equal to:
pi^2/8

because the infinite sum:
sum[1/(2*k+1)^m] from 0 to infinity is equal to:
(2^m-1)/(2^m)*Z(m)

where
Z(m) is the Zeta function for m which is:
sum(1/k^m) from 1 to infinity, which works out to around 1.6449
for m=2, but more importantly when inserted into the above we end up with
3/4*Z(m)
which works out to:
pi^2/8

so pi^2/8 is an exact constant.

Combining that with the formula above we finally end up with:
E/(4*F*L)

and for the peak to peak amps we just multiply by 2 and get:
E/(2*F*L)

Amazingly this is an exact result, not an approximation. It does
however assume that the series resistance is small and that the
output capacitor is large enough to keep the ripple voltage low,
but these are typical assumptions for many designs anyway so this
formula can act as a simple starting point for a design.
Note that this is the peak to peak amplitude not the absolute peak
which also depends on the DC output current. The absolute peak
would be:
E/(4*F*L)+Idc

because the triangular part centers vertically around Idc.

Using E/(4*F*L) we get:
0.25 amps peak, or 0.5 amps peak to peak.

If we had say 1 amp of output DC current we would add the peak to get
the absolute peak:
Imax=Idc+Iac=1+0.25=1.25 amps max.

I thought this was an interesting way to calculate the max
inductor current. Keep in mind that this is the 50 percent duty cycle
result which means I peak to peak is maximum. For any other duty
cycle I peak to peak will be less.

Finally, we know that for small time dt we also have:
di=E*(dt/2)/L
where dt is the entire switching period and so dt/2 is just half that period.

Now since for small time dt we have:
dt=1/F

and so di is simply the same as what we calculated using harmonics:
E*(dt/2)/L=E*dt/(2*L)=E*(1/F)/(2*L)=E/(2*L*F)
 
Last edited:
...
Using E/(4*F*L) we get:
0.25 amps peak, or 0.5 amps peak to peak.

If we had say 1 amp of output DC current we would add the peak to get
the absolute peak:
Imax=Idc+Iac=1+0.25=1.25 amps max.

Very nice! :)

It also leads to a standardising of F:L so if you would normally use a certain value of L for a particular F in a buck SMPS (as I would do) then current ripple is based on E. Which is why with experience it's easy to use your "typical" inductor for that freq and know straight off what the current ripple is going to look like on the 'scope.

...
... Keep in mind that this is the 50 percent duty cycle
result which means I peak to peak is maximum. For any other duty
cycle I peak to peak will be less.
...

Are you sure of this one? From memory the current ripple is fairly constant even wtih different duty cycle.
 
Last edited:
Very nice! :)

It also leads to a standardising of F:L so if you would normally use a certain value of L for a particular F in a buck SMPS (as I would do) then current ripple is based on E. Which is why with experience it's easy to use your "typical" inductor for that freq and know straight off what the current ripple is going to look like on the 'scope.


[Ripple current being max at 50 percent duty cycle]
Are you sure of this one? From memory the current ripple is fairly constant even wtih different duty cycle.

Hi MrRB,

Thanks, and as im sure you can see it is just another way to arrive at the same time solution but i thought it was interesting to go through the whole procedure with the harmonics and see what came of it. It's amazing how this works. I guess the real person to thank is Mr. Fourier :)

The ripple is max at 50 percent duty cycle yes and that is at high line (max input voltage).
The rationale comes from noting that the change in current changes with output voltage:
di=(Vin-D*Vin)*DT*D/L
where
di is the change in current,
Vin is the input voltage,
D is the duty cycle,
DT is the total switch time period,
L is the inductance.

So for 10v input and L=500uH and total switch period 100us we have:

first for D=0.5:
di=(10-0.5*10)*100e-6*0.5/500e-6=0.5 amps
and for D=0.25 we get:
di=0.375 amps
and for D=0.75 we get:
di=0.375

So on either side of the 50 percent duty cycle we end up with less change in current.

It should be noted that this should be done at high input line, so here 10v would be the maximum input voltage to be encountered in the field.

The main excitation comes from the difference between the input voltage and the output voltage, so if the input voltage goes up of course the current will increase (with constant output voltage). Thus the design needs to be checked at high input line.

One other thing i should have noted was that this current di is the current after steady state has been reached. During startup it is possible to see input surges of 10 times higher than nominal. That's why the slow start circuits came into being...to lower that surge too.

The ripple current wont change much with change of load if the duty cycle doesnt have to change much and the input voltage stays relatively constant.
 
Last edited:
Thanks! :)

It's been a while since I was last looking at a buck SMPS on the 'scope, it's possible what I remember seeing was due to the changed duty cycle being caused by a change in total (average) load current, which due to inductor core issues affected the ripple. Which is part of the reason I always 'scope it instead of running calcs, although I do appreciate you walking me through the math. :) It's been 29 years since I sat in DC machines class! :eek:
 
Good until I saw this...

"The actual factor 1.233 is really equal to:
1.233700550136169827354311374984518891914212425905 098828301668672
"

Spot the academic on a simulator
 
Good until I saw this...

"The actual factor 1.233 is really equal to:
1.233700550136169827354311374984518891914212425905098828301668672
"

Spot the academic on a simulator

Hello,

What are you talking about? Be more specific.

LATER:
I tied to PM you about the specifics, but you have your PM's shut off. What i wanted to know was what it was exactly that you meant here about the constant 1.2337... You didnt write enough information to explain exactly what you may or may not have 'saw'.
If you are more specific here i can reply with some more information or even a correction if necessary.
 
Last edited:
MOD. Why are my pms shut off. Not something I did intentionally.

A number like you quoted is plain stupid. You cannot measure anything to that accurary and I thing you are confused over accuracy and precision. Anything more than one or two significant digits are meaningless. It;s churned out by the simulator and means nothing.

You should try and build the circuit. You will learn so much more measuring in the real world. You would also fail in any job interview with my Company and be labelled a "script kiddie". You know how to simulate, but that's about it.

For info, Pi to 39 decimal places is enough to measure the width of the universe to the accuracy of the width of an atomic particle.
 
hi WT,
The Mods have not shut off your PM's.

Check this:
'My Account', top right main menu bar,

'General Settings' on drop down menu.

Look at the Radio option buttons for PM control, check as required..

If you still have a problem let me know.:)

Eric
 
MOD. Why are my pms shut off. Not something I did intentionally.

A number like you quoted is plain stupid. You cannot measure anything to that accurary and I thing you are confused over accuracy and precision. Anything more than one or two significant digits are meaningless. It;s churned out by the simulator and means nothing.

You should try and build the circuit. You will learn so much more measuring in the real world. You would also fail in any job interview with my Company and be labelled a "script kiddie". You know how to simulate, but that's about it.

For info, Pi to 39 decimal places is enough to measure the width of the universe to the accuracy of the width of an atomic particle.

Hi,

Wow, i havent read anything that overly judgmental in a long long time. You managed to misinterpret the whole intention of the post and then inflict that misinterpretation toward what seems like some sort of mocking attempt toward the author. Pretty lame.

But i cant help but think it is only because you didnt read the whole post but stopped after you made your quick judgment. You surely should have noticed that that post wasnt about trying to mimic nature in detail, but was about trying to develop a theory that would match another one, as it did.

For example, there are more reasons for quoting a large number of digits of a number other than trying to mimic reality. When trying to prove or disprove a theory it helps to try to be as accurate as possible, if not downright exact. It doesnt matter if you can never measure to this degree of accuracy because that is not the intended purpose. The purpose is to reduce complexity.

You'll notice that i did in fact estimate the quantity being sough after at first by:
"so we'll approximate that factor to be 1.233: 2*E/(pi^2*F*L)*1.233"

so there you are so you can be happy that the number is only expressed to 4 significant digits there. It appears you would prefer to stop there because perhaps we can not 'measure' that number any more accurate. But what i showed was that once you investigate that number to more significant digits you see that it is really *exactly* equal to pi^2/8, which helps not only to simplify the equation but also to allow verification via another means altogether (time domain).

In this manner we take that longer equation:
2*E/(pi^2*F*L)*1.233

substitute the exact (out to an infinite number of digits) number for 1.233:
2*E/(pi^2*F*L)*pi^2/8

and doing this simplifies that whole equation down to just a few characters:
E/(4*L*F)

Now i dont know about you, but i would rather use the shorter expression than the longer. That's the beauty of theory.


I suggest that you read the post over again and try to understand the context. Note that it is titled
"Interesting way to calculate max current..."

and not:
"Approximate way to calculate max current..."

Using the constant 1.233 is called an *approximate* solution, while using the constant pi^2/8 is called an *exact* solution.

Yes there are times when a small number of digits will suffice, but there are times when it absolutely must be exact. To reduce the formula to the desired form required an exact expression of the constant.

Pi out to 39 digits you say? I thought you said that we could not measure that many digits :)
 
Because Pi is not a measured value. It's calculated. No one can make an inductor to an accuracy of more than 1 decimal point in a circuit due to many reasons (board layout). The problem is people follow simulations verbatim without understanding realities.

Academia vs engineering is a very large gap.
 
Hi again,

Well ok but if you understand the difference then you can get the best from both worlds. Without simulations we wouldnt have what we have today. Theory and practice, both go hand in hand. Although practice will get us up and running in the real world, it's the theory that got us there in the first place.
Practice has it's limits, theory helps to develop the fundamental principles without limits.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top