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.

How to calculate the value of a smoothing capacitor

Status
Not open for further replies.
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.
View attachment 93124

Ratch

Hello again,

For your first paragraph:
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 :)

For your second paragraph:
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.
 
Hello again,

For your first paragraph:
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 :)

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.

For your second paragraph:
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.

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
 
An article appeared in the Jan 1, 2010 issue of Power Electronics magazine:

**broken link removed**

The author says he has derived a closed form symbolic solution to the problem. He has published a book (reference 7 in the article) giving more details about his method. There are also a number of references to other attempts to solve the problem.
 
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 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

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.
 
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?

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.
 
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.

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.
 
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.

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
 
Hello again,

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

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

I get this expression for the delay with C = 70uF:
delay-png.93126


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
R=the parallel resistor load
C=the cap in parallel to the resistor R, to be solved for
The source drives the load with zero internal impedance.

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

a difference of only 0.228uf which isnt that much.

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

When I solve this equation, I get:
capinput2-png.93127


The value of C using the equation (2*pi-acos(K))/(2*pi*f) comes out to:
146.832uf
I don't get this when I evaluate this expression. I get:
capinput3-png.93128


I derived a similar expression, and when I evaluate it, I get:
capinput3b-png.93129



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.

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.
 

Attachments

  • delay.png
    delay.png
    6.8 KB · Views: 673
  • CapInput2.png
    CapInput2.png
    8.9 KB · Views: 665
  • Capinput3.png
    Capinput3.png
    2.7 KB · Views: 688
  • CapInput3b.png
    CapInput3b.png
    3.3 KB · Views: 695
I get this expression for the delay with C = 70uF:
delay-png.93126




When I solve this equation, I get:
capinput2-png.93127



I don't get this when I evaluate this expression. I get:
capinput3-png.93128


I derived a similar expression, and when I evaluate it, I get:
capinput3b-png.93129





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.

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.
 

Attachments

  • HW-2.gif
    HW-2.gif
    40.8 KB · Views: 230
Last edited:
Hi again Electrician,
Nice to see somebody is still interested in this :)
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.

However, please do not let my negativity impede your mathematical journey.

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

filt1-png.93138


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.

filt2-png.93139


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:

filt3-png.93140


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

filt4-png.93142


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:

filt5-png.93143


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:

filt6-png.93144


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.
 

Attachments

  • Filt1.png
    Filt1.png
    5.8 KB · Views: 733
  • Filt2.png
    Filt2.png
    22.9 KB · Views: 703
  • Filt3.png
    Filt3.png
    24.8 KB · Views: 738
  • Filt4.png
    Filt4.png
    16.8 KB · Views: 778
  • Filt5.png
    Filt5.png
    21.5 KB · Views: 757
  • Filt6.png
    Filt6.png
    14 KB · Views: 775
Last edited:
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.
 
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?


MrAl.JPG
Ratch
 
Last edited:
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 :)
 
So in the future if anyone asks this question again (and they will) we will have quite a story to tell them :)
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.
 
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.

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.
The Electrician.JPG

Ratch
 
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:
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.

You reading my mind? :)
i was just about to do something like that, and also, it would be kind of cool to come up with a formula to express the ratio of the full wave case capacitor to the half wave case capacitor. This would tell us and others what benefit we can get from going to full wave as opposed to half wave. Then we could obtain an estimate for this ratio, that would be a really practical thing (since many people want and even need that kind of solution).

So who's up for it?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top