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)
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: