# How to calculate the value of a smoothing capacitor

Discussion in 'General Electronics Chat' started by Voltz, Apr 20, 2010.

1. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
OK, but empirical methods should have some backup theory to instill confidence in their application.

Ratch

2. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hello,

This would come from a completely linear approximation of an RC filter:
dv/dt=1/RC

The deviation would be:
dv=dt/RC

so if you want only 10 percent droop in dt time you need RC to be 10 times dt.
dv=dt/RC
0.10=1/10
0.10=2/20
0.10=N/(10*N)
0.20=N/(5*N)
0.02=N/(50*N)
0.01=N/(100*N)

• Agree x 1
3. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
OK, I understand how that table is computed. But look at my example. You can see from the graph that a 0.020 sec time constant allows a dip to 0.499. According to the method you demonstrated, to go from a 0.50 to 0.60 to 0.70 to 0.80 to 0.90 dip requires a 4 times lengthening of the time constant to 0.080 sec. Yet, my computation is 0.147 sec. Can you discern where the difference lies?

Ratch

Joined:
Jan 12, 1997
Messages:
-
Likes:
0

5. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ

Hello again,

Very sorry, I am not sure what you mean by "go form 0.50 to 0.60...etc.".

The computation Tony is using is:
RC=dt/(percent_ripple/100)

where percent_ripple=10 for ten percent, and where dt is the time from the back end of the previous cycle to the front end of the next cycle, just as in your formula. Since your formula comes up with a good estimate of the discharge time, we use that:
(2*pi-acos(f))/(2*pi*f)=0.0155 seconds

so in the formula Tony used, we need a time constant RC of:
RC=10*0.0155

if we want to see a ripple of 10 percent for example. This leads to:
RC_Tony=0.155

so that means:
C_Tony=0.155/1000=155uf

In your complete formula since your time came out to 0.0155 we have:
0.0155=-ln((100-10)/100)*R*C

or:
0.0155=-ln(0.9)*R*C

which equals:
0.0155=0.10536*R*C

and dividing both sides by 0.10536 gives us:
0.147=R*C

and with R=1000 we have;
C_Ratchit=147uf

So it is 155uf vs 147uf, so the linear approximation isnt too far off as long as we use the right time period to begin with. If we instead estimate it to be from one peak to the other, we would have:
RC=0.0167*10

so we would come out with 167uf, which is a little larger than 155uf.

So all three formulas come out with a reasonable estimate.

For small percentages we have the following comparison table, arranged as percent ripple as a fraction, C_Tony, C_Ratch (all C in uf):

Code (text):

0.01  1667  1621
0.02  833  799
0.03  556  526
0.04  417  390
0.05  333  309
0.06  278  254
0.07  238  216
0.08  208  187
0.09  185  165
0.10  167  147

So 5% ripple yields caps 333uf and 309uf.
As the percentage ripple increases we see more and more difference between the two:

Code (text):

0.10  167  147
0.20  83  67
0.30  55  40
0.40  41  27
0.50  33  20
0.60  27  14
0.70  23  11
0.80  20  8
0.90  18  5

Also, notice how the second cap values in this next table scale almost linearly:

Code (text):

0.005  3333  3272
0.010  1667  1621
0.015  1111  1072
0.020  833  799
0.025  667  635
0.030  556  526
0.035  476  448
0.040  417  390
0.045  370  345
0.050  333  309

In particular, note 309 is roughly 2*150, and 635 is roughly 2*2*150. Thus suggests a compromise strategy based on computing one value (like 150uf) with the more accurate formula, then using that to scale for other percent ripple.

Last edited: Jun 30, 2015
• Agree x 1
6. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
Thanks for the detailed explanation. It is good to see that both methods are in modest agreement. The only objection I have is the reference to my method being an "estimate". I believe my method calculates an exact value unless other factors act to change it.

Ratch

7. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,151
Likes:
281
Location:
Richmond Hill , ON Canada near Toronto
Dont worry, when one ignores Cap ESR , diode drop and many other factors such as the change in Vdc from no load to full load in addition to ripple....`

they are all still estimates.

In fact the drop in DC voltage from the load changes is equal to the half the Vpp ripple when there is no Cap ESR, but more drop AND ripple in Vout when there is additional series resistance in the source due to ratio of source ESR /load. This includes the transfer impedance and coupling of the transformer, which varies from 5 to 12% depending on size which is inverse to short circuit current ratio/rating from 20x for small to 8x for large distribution transformers.

Last edited: Jun 27, 2015
8. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hi,

You have to be careful what you call "exact". Tony sited a few practical considerations, but there are also other theoretical considerations assuming a perfect setup.

Your method is based on the capacitor discharge ending at the front of the next wave which is good, but it is also based on the capacitor starting to discharge at the EXACT PEAK of the previous wave, which is impossible except with infinite R, and then it doesnt really discharge anyway, so we might say that as R approaches infinity the cap discharge starts infinitesimally close to the peak.

One way to look at the start of the discharge is to consider that C starts to discharge into R when the line voltage gets below the cap voltage, but since the cap voltage is constantly decreasing at a certain rate, if the rate is faster than the rate that the cosine wave is decreasing then the cap voltage will follow the cosine voltage downward just as it did when it followed it upward on the charge. It's not governed by the input wave itself anymore, but by the wave AND the discharge of the cap. Since near the peak the cosine wave is decreasing very slowly, any discharge in the cap will tend to keep the cap voltage still following the cosine wave, for a short time. Thus, the cosine wave and the cap voltage fall at the same rate for a short time. In this view, once the cap voltage discharge rate becomes slower than the cosine wave decrease rate, the cap voltage wave 'leaves' the cosine wave and the diode stops conducting, and this is the typical e^-t/RC wave we see. So in mathematical form this view looks like this:
d[cos(w*t)]/dt=d[e^(-t/RC)]/dt

and solve this for 't'.

This means two things:
1. The time dt between start of discharge and start of recharge is less than the formula.
2. The LEVEL of the voltage at the start of the discharge is LESS than the peak.
Both of these change the droop somewhat, depending on the value of the capacitor. For lower values of C, the RC wave will follow the cosine wave longer.
Because of #2 the equation has to be improved to:
d[cos(w*t)]/dt=K*d[e^(-t/RC)]/dt

where K is also an unknown, and K<1.

Another view is to calculate the wave across the capacitor using a tiny resistance between the source and the cap, then write the equations and solve for the time that the cap discharge leaves the back end of the cosine wave. There are probably other ways to do this too.

Numerically for our example, the decrease in total dt for a 147uf cap comes out to approximately 48us, and for 70uf about 107us. Decreasing dt by these amounts would lead to a more exact computation, assuming K=1 for simplicity.
For extremely low values of C we'd see a big difference in dt though.

• Agree x 1
9. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
Yes, you are right about the capacitor de-energizing slower that I thought. I will have to think about that and perhaps change my calculations to take that into consideration.

Ratch

10. ### ColinMember

Joined:
Sep 25, 2003
Messages:
368
Likes:
21
Location:
Australia
There is also a much simpler way to tackle the problem.
If you don't want to use very high value filter capacitors, use a full wave bridge and 1,000u to 10,000u per amp.
At 1,000u the ripple will be as high as 5v and this means you lose 5v of your voltage. This is the worst case.
However if you add a 3-terminal regulator you will be able to get 1mV ripple at 2 amp if your regulator is rated at 8v less than the DC output of your supply.

11. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
MrAl,

I found this interesting link http://scholarcommons.usf.edu/cgi/viewcontent.cgi?article=4856&context=ujmm which appears to somewhat follow my method. However, the author also disregards the fact that the de-energizing of the capacitor is dependent on the voltage differences between the power supply and the present voltage across the capacitor. I believe that applying the Laplace method by using the transform of a repetitive half-wave sinusoidal will give an exact solution. However, the inverse Laplace transform is very complicated involving several Ʃ's and other nasty terms. I will work on that when I get time.

Colin,

Yes, electronic pre-regulation or full electronic regulation is probably the best practical way to get more from less.

Ratch

12. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hello again,

Colin:
Yes there are different practical methods that can be applied. We happen to also be interested in the purely theoretical exact solution to an ideal circuit with ideal elements. It turns out to be very interesting.

Ratch:
I would be interested to see your final solution, or some attempt at least.
I went about it in a more direct way in the time domain and so i came out with this equation, which i believe now to be exact, but i dont want to bias your thoughts in any direction as i would like to see what you come up with independently.

The final equation is:
3*pi + w*C*ln(K^2/(w^2*C^2*R^2)+K^2)*R - 2*atan(1/(w*C*R)) + 2*asin(K) = 0

where:
w=2*pi*f
ln() is the natural log function
K=the ratio factor again, such as 0.9 that we had been using
C=the cap in parallel to the resistor R, to be solved for
The source drives the load with zero internal impedance.

C has to be solved for numerically, so there may be a simpler solution.

The value of C using the equation (2*pi-acos(K))/(2*pi*f) comes out to:
146.832uf

and the value of C using this new equation comes out to:
146.604uf

a difference of only 0.228uf which isnt that much.

The approach takes advantage of the fact that at an infinitesimally short time before the sine source current to the RC network would go negative the RC voltage wave departs from the sine source voltage wave. The departure point is thus delayed in time from the peak point.
The more exact delay for 70uf was calculated to be closer to 100.5 microseconds.

The equation for the time delay starts out very very complicated and nasty, but in the end simplifies extensively to an almost unbelievably simple form.

13. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
MrAl,
I was able to compute a Laplace transform for a half-voltage source, but it did not help because the capacitor de-energizes through the voltage source when the source drops below the capacitor's energized value. A diode is needed, of course, but since a diode is a nonlinear device, and Laplace transforms are for linear circuits, I am stymied. I don't know how to model a diode using Laplace transforms. So I guess we have to use deterministic methods like Spice, tables, or rules of thumb to determine the rectifier parameters.

Ratch

14. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ

Hello again,

Well actually Laplace Transforms can be used for some non linear circuits also, just with a little more difficulty. You usually just have to handle it as more than one circuit in a circuit that switches (such as a buck regulator).

The idea is to break up the circuit into it's different sequential modes of operation, then compute each piece individually. This means solving for the times that the circuit switches, and then using the final values from the previous mode with the Laplace for the very next mode.
So we can use Laplace but we have to do it for more than one circuit in most cases. In this case though we only need one because after the diode switches we have what we want which is the time it switches. So we only have to use the transform to solve for the time that the diode switches from on to off, and then if we really wanted to continue we'd have to use those final values as the initial values of the next mode, which for this circuit would be the mode where the cap discharges.

We dont have to rely on spice or anything like that, this is computable and analytic up to the last step where we bring in a numerical equation solver to solve for the cap value. The time value however can be computed from the circuit equation(s) without the need for a numerical calculation in the end, at least in the solution i found earlier.

Does this help, or at least make sense?

Last edited: Jun 29, 2015
15. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
Yes, I am familiar with piecewise approximations. But that would make it more trouble than it is worth. I was looking for a equation that would continuously show the current without switching to a different circuit within the period.

Ratch

16. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hi,

Well to solve for the cap value you only need to solve for the time delay, you dont need the whole waveform, especially since this time delay simply subtracts from your previous formula to get the corrected time from the back end of the previous wave to the front end of the next wave. You dont have to compute any Laplace for the diode either because it is an ideal diode.

To make a continuous function that describes the whole period would just mean solving for the individual periods anyway, then finding a way to combine them cleverly, which would be novel but just a waste of time (see "Spock Curve"). Once you have the periods solved, you dont really have to combine them.

It's a little harder than most simple circuits like this, but it's very interesting to find out how it really works. Maybe you could show me what you have so far and i can see if it makes sense to me.

17. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
I was hoping for a continuous Laplacian curve without any discontinuities. Even an ideal diode will suppress current in one direction, which makes it nonlinear. There are lots of ways to design a rectifier, but I don't think there is any single continuous equation that will plot the current.

Ratch

18. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hi again,

I am pretty sure that is impossible, because the curve has to be smooth for that to work, and this curve in it's ideal form cant be smooth because the place where the two modes meet form a vertex, which cant be smooth. It's almost like trying to make the circumference of a square a smooth curve. If you round the corners for the sake of smoothness, then you void the true solution, so the best we can do is piece all the sides together using another function or functions.

However, the curve is continuous, by the definition of continuous being a curve that you can draw with a pencil without ever having to lift up the pencil point from the paper, it just wont be smooth where there are derivatives everywhere, and it shouldnt be because that's not how it looks in theory.

To make it continuous as above you could modulate the parts with a two phase rectangular wave. That would mean that a curve drawing program could plot the entire curve without having to know where one curve ended and the next started. That's really how it works anyway when we have an ideal diode, which we have here for the purpose of exploring that avenue of analysis.

It takes a little thought that's all
I had made a few attempts before i was able to settle on a solution that i believe is exact. However, since your approach sounded different than mine i was hoping to see yours too and compare to mine. I checked it with a simulation program (which was a little difficult to set up in itself for some reason) and it showed a solution of 0.9 out to five decimal places with the capacitor value calculated using that formula for C, so i assumed that was good enough.

If you feel like setting up LT Spice for this problem we could take a look at that too. I used a different simulator for now.

19. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
I am going to put that problem on hold for a while because I have other things to do.

Ratch

20. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,026
Likes:
951
Location:
NJ
Hello again,

Ok sure, but just so you know your first post in this thread was one of the most interesting i had read in a while now. Usually people are not concerned about these precise theoretical ideas once they get out of school. I say, keep marching on

I also just realized that sometimes "The Electrician" has some data he has dug up from the past on some of these subjects. Maybe he might have something somewhere written down or in some paper or something. Would be interesting to get more people in on this.

21. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
MrAl,

OK, I had a chance to look things over again, and I believe I can show you that for practical purposes, the delay time of the capacitor de-energizing from its maximum value doesn't count for much when compared to the vagaries of capacitor values, which can be ±30% for electrolytics. I used the same example I did in post #32, with a time constant of 20 msec. I show the curve magnified below so it is easy to observe when things happen.

As you can see, the capacitor starts de-energizing at 0.0084 ms. The total period of the 60 Hz wave is 16.667 ms. So, for this example, the capacitor starts de-energizing later at 5% of the period. If the time-constant is higher, the delay time will be less.

Ratch