# How to calculate the value of a smoothing capacitor

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

1. ### MrAlWell-Known MemberMost Helpful Member

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

I thought we agreed that we would look at the theoretical aspects only with ideal conditions and components. If you want to allow variations in the capacitor now that means anything we do would be moot. 100us wont matter much over a 16.7ms period, being less than 1 percent of that period. If we stick to the ideal components, then we have something to offer, which i dont see covered in any text, although it should be because any technician can easily see this phenomenon on the scope and wonder why there is a 'hump' at every start of every rectifier output, including full wave rectifier circuits. So if we start allowing component variations then we wont have much to talk about because almost any variation of any kind will swamp any ideal theoretical results we can come up with

That looks interesting and probably more in line with what we had been talking about all along. I see the blue line looks like the start of a cosine wave, but i dont know what that gold line is...what exactly is that line ? Is that straight or something else, and how did you come up with that line? I ask because the simultaneous solution might be another answer to the smaller time delay question.

2. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
ONLINE
I did not change the cap values in my calculations. I made a statement of tolerance, specifically why it is almost useless to consider the de-energize delay. The delay of cap de-energizing is 840 us or 0.840 ms which amounts to a 5% change in the de-energize period.

You are correct, the blue line is the cosine wave. The gold line is the capacitor de-energize equation of e^(-t/0.020) . It looks straight in the small time frame, but it is really exponentially curved. Where the curves meet at 0.840 ms shows where the cap voltage starts going down on its own. I did check that figure with numerical calculations, but I thought a graph would be easier to present. Of cource, equating of the two curves algebraically would also product the same solution. Probably the better position point to calculate where the cap starts going down on its own is where the derivative of the cosine wave and the capacitor voltage are equal, at about 0.400 ms. That would make the delay time even less. Anyway, I believe the method I used would be a good way to design a rectifier.

Ratch

Joined:
Jan 13, 2009
Messages:
550
Likes:
70

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

5. ### MrAlWell-Known MemberMost Helpful Member

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

Hello again,

Electrician:
Thanks for participating in the thread and posting that link. I'll have to read it over and it will take some time. I dont think i will be able to get the references though.
There is one drawback to that solution though, if i read it right so far, and that looks like he is assuming that there is at least some series resistance between source and RC parallel network, as he shows an example with a series resistance of 0.5 ohms. The solution we are after is one that is cleaner than that, with no series resistance. I'll read it more carefully though.
Anything else on the web you might know about?

Ratch:

I like that idea but unfortunately the gold line does not represent the discharge curve of the capacitor. That is only a true representation if the capacitor started to discharge at the exact peak, which it clearly does not, or else we would not have any time delay to look for.
The capacitor waveform before the diode turns off is comprised of the convolution of the input sinusoidal and the RC network function, so it can not be just simply e^(-t/RC), nor will it be that after it departs from the sinusoid (at least a constant less than 1 out in front).
For example, if the cutoff point was at the exact peak, it would be e^(-t/RC) that's true, but if it was at 0.99 of the peak then it would be 0.99*e^(-t/RC) as an approximation, or if at 0.98 of the peak then it would be 0.98*e^(-t/RC) as an approximation with a better one being 0.98*e(-(t+td)/RC) where td is the time delay relative to the exact peak time.

It's harder to find the right curve than it is to know what isnt the right curve. Unfortunately the simultaneous solution of a cosine wave and the capacitor discharge curve that starts to discharge at the peak is not a solution to the time delay. There may be a solution with a curve similar to that, but it's not that exact curve.

6. ### The ElectricianActive Member

Joined:
Jan 13, 2009
Messages:
550
Likes:
70
I suppose one could use that solution with the series resistance set to zero.

I haven't ever seen an attempt at a solution that doesn't include more than you guys are discussing in this thread.

7. ### MrAlWell-Known MemberMost Helpful Member

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

Ok i'll look into that.

Amazingly, i found another solution to the time delay which was one of my first attempts and much, much simpler, but i did the calculation wrong so i assumed it didnt work. But it must work because it came to to the same result within around 15 digits. If they both come out the same when one was much more complicated then they are probably both a solution. It can then be used to calculate the capacitance.
I dont want to write it out yet because i am waiting for replies in other forums too and dont want to bias any of those results either.

8. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
ONLINE
The shape of the capacitor de-energization curve will not change. So if it gets translated downward to 0.99 and over to the right by 0.400 ms, that is not big deal. Those changes are insignificant. It should not be hard to compute where the cosine will meet the translated capacitor curve, but it is not worth the trouble.

Ratch

9. ### MrAlWell-Known MemberMost Helpful Member

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

Well that's not what the author thought of the link that Electrician posted, and that's what it means to find the solution to what we had been looking for. It was worth it to me. The solution we are looking for is simpler than the posted link.

I have found that the author of that article left out one of the values of one of the constants so it is impossible to use his final equation to solve for Ton without going through the whole computation again
He gave an interesting but complicated final equation that has to be solved numerically, but left out an important constant. He did give a numerical example but never shows all the work, just the results, so we cant follow those steps. We'd have to do the transforms to find out what his value of 'a' is supposed to be, unless i missed something.

Ha ha, i read it like this "a tan(wt)"
when he meant "atan(wt)".
That's funny. The 'a' was way out in front of the 't' in 'atan' so it looked like a multiplication
We can use his results to check ours, if we do the full wave instead.

Last edited: Jun 30, 2015
10. ### The ElectricianActive Member

Joined:
Jan 13, 2009
Messages:
550
Likes:
70
I get this expression for the delay with C = 70uF:

When I solve this equation, I get:

I don't get this when I evaluate this expression. I get:

I derived a similar expression, and when I evaluate it, I get:

I also got a delay of about 100.5 microseconds for 70 uF as I showed at the beginning of this post.

However, for a capacitance of 146 uF I get a delay of about 48 microseconds, but it appears to me that you have used a delay of only about 24 microseconds with your most accurate equation (the one that has to be solved for C numerically).

When I solve for C, accounting for a time delay of 48 microseconds, I get a value for C of 146.376 uF.

File size:
6.8 KB
Views:
345
File size:
8.9 KB
Views:
353
File size:
2.7 KB
Views:
343
File size:
3.3 KB
Views:
359
11. ### MrAlWell-Known MemberMost Helpful Member

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

Nice to see somebody is still interested in this

When i said i used that equation (2*pi-acos(K))/w to calculate the value of the capacitor, i meant using that as the time delay in the equation for the capacitor. This leads to a capacitor value that is slightly too high, about:
146.8uf

Using the more complicated expression for C, we get:
146.6uf

This tells me that it must be working right because fairly decent simulations have shown that the value causes an ending voltage of extremely close to 0.9 at the start of the very next charge time (wavefront of next bump).

The delay time you calculated looks right, and if you got close to 48us for 146.6uf then it must be right. I would be interested to see how you solved for that delay. I'll show mine now, and how it was proved to be exact.

Briefly, the R and C in parallel form impedance:
Z=R/(s*C*R+1)

The source current then with zero impedance source 1v peak is:
I=1/Z=(s*R*C+1)/R

which with s=jw comes out to:
I=(j*w*R*C+1)/R

The phase shift Theta is therefore:
TH=atan(w*R*C)

but that is relative to the 0 degree sine. Relative to the 0 degree cosine this changes to:
TH=pi/2-atan(w*R*C)

The time delay is therefore:
T1=(pi/2-atan(w*R*C)/w

and that's the name of that tune
But that's not proof that this is the right time delay yet.

Amazingly simple right? But i'd like to see how you came up with the time delay you got.

Proof:
Convolving the input source with the transfer function of the RC network, the result is a fairly complicated expression with lots of exponentials, but everything reduces to:
T1=(pi/2-atan(w*R*C))/w

Exactly the same result we can get from the phase shift !

So going back to Ratchit's original formula:
T2=(2*pi-acos(K))/w

which is the time from the peak to the start of the next wave, so subtracting T1 we have the adjusted time:
T=T2-T1

To get the adjusted amplitude, we have:
k=pi/2+sin(w*T1)=(w*C*R)/sqrt(w^2*C^2*R^2+1)

so the expression for T3 is:
T3=-ln(K/k)*R*C

Since T=T3, we end up with:
atan(w*C*R)/w+(2*pi-acos(K))/w-pi/2/w=-ln(K/k)*R*C

and expanded a little this gives:
(2*pi-acos(K))/w-(pi/2-atan(w*C*R))/w=-R*C*log(K*sqrt(1/(w^2*C^2*R^2)+1))

and that is the expression that gets solved for C.

This would mean next to nothing because there was no proof that the phase shift in the RC network had the same time shift as the delay we were looking for, but doing the full analysis reveals that the more complicated analysis reduces to a time delay the same:
(pi/2-atan(w*R*C))/w

And if that isnt astonishing enough, we can estimate the time delay to a pretty decent accuracy with the very simple:
td=1/(w^2*R*C)

The comparison is shown in the attachment, where the second time delay for each plot is this estimate while the first is the exact. They come out very close to each other.

With R=1000, K=0.9, w=2*pi*60, we get:
C=1.466041e-4

I did some simulations also, shown in the attachment. The resulting time values are show beneath the value of the the capacitors. The zoom (top drawing) was hard to view, so another function was used to detect the departure point of the input sinusoid and the capacitor discharge curve. This function creates a vertical line at the departure point.

#### Attached Files:

• ###### HW-2.gif
File size:
40.8 KB
Views:
70
Last edited: Jul 1, 2015
12. ### JimBSuper ModeratorMost Helpful Member

Joined:
Sep 11, 2004
Messages:
6,328
Likes:
585
Location:
ONLINE
I have been loosely following the thread, but have not joined in.
Some of the maths is beyond my ability and interest. (like Harry said: "A man has to know his limitations").

While it is good to have a good grasp of the theory, I cannot help but think that this is being analysed to absurdity given the variables and uncertainties associated with the practical application of this.

JimB

13. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,028
Likes:
951
Location:
NJ
Hello there Jim,

If you think this is too much math, you should have seen the proof

This is the kind of problem that would come up in a university where theory is an important issue which helps build up ideas for things to come.
It does depend on your interest though as you mentioned, some people wont be interested while students taking electrical engineering courses certainly will, just like some people are interested in science while others are not. You might also note the interest of the author of the paper The Electrician linked to in this thread. His interest must have been very high too in order to go through that analysis, so he must have felt it was of interest to others. Maybe because he realized it had been attempted before with little success.
There has been a general interest increase in science however over the years, probably due to all the science programs that come on now and then with incredibly hard to believe but amazing theories of the universe.
For myself, i took engineering science in college not applied engineering, so much of my interest has been in the science behind everything. I find it interesting to find out the details behind stuff

14. ### The ElectricianActive Member

Joined:
Jan 13, 2009
Messages:
550
Likes:
70
I made use of the fact that the source impedance is zero, so while the ideal diode is conducting, the voltage across the capacitor is controlled by the source. This means that the transient behavior of the RC part is reset every cycle. I can use Laplace transforms to get an expression for the steady state current from the source like this:

Here I show the various (steady state) currents that would exist without the diode; I temporarily set R to 100 ohms rather than 1000 ohms to separate the curves in the plot. The blue curve is the total current supplied by the source; the magenta curve is the resistor current; the green curve is the capacitor current, and the red curve is a reference sine wave.

Note that the total current (blue) goes to zero just past the peak of the sine wave--just past a quarter period. That time is the delay time that we need to calculate. Here's how I do it using Mathematica's solve function. I equate the expression for the source current to zero and solve for tz:

Now to find the adjusted amplitude, we find the sine of tz:

Finally we can solve for C with K=.9

We make the various corrections for the delay time and the amplitude adjustment, and solve for an exponential decay, with the starting voltage of the exponential equal to the adjusted amplitude. The solution is numerical:

I got a slightly different value in a previous post because I didn't have the exactly correct decay time interval.

I can't get a closed form symbolic solution with the two corrections applied. But, if I leave off the delay time correction and amplitude adjustment, I can get a symbolic solution. This solution is very close to the exact solution for a reasonable range of K, and for all practical purposes it is better than needed:

After all the mathematical gyrations we have shown that a relatively simple symbolic solution is good enough.

This solution ignores the impedance of the source (transformer, most likely), the ESR of the capacitor, the I/V characteristic of real diodes, etc., but it's a good starting point.

#### Attached Files:

File size:
5.8 KB
Views:
410
File size:
22.9 KB
Views:
375
File size:
24.8 KB
Views:
386
File size:
16.8 KB
Views:
429
File size:
21.5 KB
Views:
384
• ###### Filt6.png
File size:
14 KB
Views:
400
Last edited: Jul 1, 2015
15. ### MrAlWell-Known MemberMost Helpful Member

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

It's nice to finally see another solution. Thanks for doing that and showing the results in such a well laid out fashion. I also happen to like the solution, and the time and cap comes out the same as mine does so that's nice to see too

I'll be able to look it over a little better tomorrow, but notice that the time delay with acos() and the square root and related is equivalent to the atan(wRC) time delay in my own solution. That says that we both found the same analytical time delay, which is a good sign

Thanks much for your interest in this.

16. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
ONLINE
I propose another method which has been talked about before, but has not been demonstrated fully. I like the graphical method. With a graph one can see all the variables at once and how they relate to each other. If you want to calculate it out to the last decimal, then it is easier to do that when you can see what is going on.

The example I selected is a bit extreme, but it illustrates the diode influence. I propose a half-wave rectifier, 60 Hz, 3 volt P-P AC power source, and a specification that the output voltage of the capacitor should not drop below 2 volts with a load of 1000 ohms. You can see from the graph below, the raw AC voltage is the orange line, the voltage after the diode is the blue line, the capacitor de-energize line for a time-constant of 20 msec is the green line, and the capacitor de-energize line for a 120 msec time-constant is the red line. It took very little time to set up, and it is easily determined that a cap value of 120 uf is needed for a tc of 120 ms. I hardly did any calculations. Notice the blue line shows a 0.7 diode voltage drop when the diode conducts. It was very easy to plot the waveforms, and adjust the red line until it did not go below 2 volts. What more can I say?

Ratch

Last edited: Jul 2, 2015
17. ### MrAlWell-Known MemberMost Helpful Member

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

Yes that's nice to see too. Graphical methods often speed things up, even complicated things.

In my line of work when i worked in the industry and even now as mostly a hobby, it was never about avoiding math, in fact it was just the opposite: finding the correct math, because there are some aspects of some circuits that can not be done graphically, so some sort of formulation must be found to ensure proper operation. But even without that, often the math can tell us things about the circuit in a nut shell what it would take 1000 graphs to illustrate. They both have their place though for sure. I also like to use generated tables sometimes too though, to show how things work together.

I found my solution a little differently than Electrician found his, but they both came out with the same time delay analytically, so that tells me we must have the right time delay. Using that together with your original solution, we get a pretty compact expression. That seems to nail it for me.

So in the future if anyone asks this question again (and they will) we will have quite a story to tell them

18. ### The ElectricianActive Member

Joined:
Jan 13, 2009
Messages:
550
Likes:
70
Before we leave this, how about getting a solution for the full wave case. It's not much additional effort given what we've already done. I get 66.7382 uF for the exact method, and 67.7384 uF using a compact formula.

19. ### RatchitWell-Known Member

Joined:
Mar 12, 2008
Messages:
1,934
Likes:
78
ONLINE
Here is the graphical solution for my example. Time-constant of 55 ms. and a capacitor value of 55 uf should insure that the voltage does not fall below 2 volts. Red line is a 2 volt reference line, and the green line is the cap de-energize curve.

Ratch

20. ### tvtechWell-Known MemberMost Helpful Member

Joined:
Mar 27, 2010
Messages:
3,166
Likes:
348
Location:
South Africa
Wow...just wow. Go for it Guys.

21. ### MrAlWell-Known MemberMost Helpful Member

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

tvtech:
Yeah it has been very interesting to do this and look at the solutions. We can also have a practical thing come out of all this soon, which should satisfy the non-theory lovers

Ratch:
Yes that looks good, and also nicely illustrates how straight that exponential really is when we do a practical circuit.

Electrician: