# Capacitor Discharge Math

Tags:
1. Jun 29, 2015

### Corey Spruit

Hi All,

(First post, be nice).

I'm analysing the discharge of a capacitor. Starting from the energy in a capacitor:
$$E = \frac{1}{2} CV^2$$
This can be represented as follows (seen this elsewhere, there is nothing wrong with this):
$$\Delta E = P \Delta t = \frac{1}{2} C(V^2_s-V^2_f)$$
Where $\Delta t$ is the time of energy transfer, $V_s$ is start voltage (DC) across the capacitor and $V_f$ is final voltage. It's an inverse square drop off of the voltage across the capacitor, assuming $P$ is constant and a resistive load.

For example, $V_s$ = 100V, $V_f$ = 50V, $\Delta t$ = 0.1sec and $P$ = 100W, then $C_{min}$ = 2667 $\mu F$.

Rearranging the above (also seen this elsewhere, there is nothing wrong with this):
$$C_{min} = \frac{2P\Delta t}{V^2_s-V^2_f}$$
This gives the minimum capacitance needed for its voltage to remain above $V_f$ after time $\Delta t$.

Now the issue I have is using this equiation to calculate the final voltage after a given time given a value of capacitor. The results I'm getting are not correct. That is, if I plug in the same values, the final voltage I get is way out.

I have rearranged the above equation to the following:
$$V^2_s-V^2_f = \frac{2P\Delta t}{C_{min}}$$
Then:
$$V_f = V_s - \sqrt{\frac{2P\Delta t}{C_{min}}}$$
Is this not correct?

With the above example values and using 2667 $\mu F$, I'm calculating $V_f$ = 13.4V, it should be 50V. What is wrong here?

2. Jun 30, 2015

### meBigGuy

The problem is with your square root. sqrt (a^2 - b^2) is not a-b. (a-b)^2 is a^2 - 2ab +b^2. Some day I'll learn Latex.

3. Jun 30, 2015

### EverGreen1231

Your problem is the last step: You can't just take the square root of both sides.

4. Jun 30, 2015

### Corey Spruit

Thanks guys. Ah, this is the trouble with being an engineer, sometimes you use high-school maths and you end up looking like a 6th grader..
This is not relevant, I went off and tried this, and ended up solving a quadratic equation (for fun, digging up old high-school maths again). But $x^2-y^2 \neq (x-y)^2$.

EverGreen1231 was correct, I can't just square root both sides. Interesting discussion on why on Stack Exchange if anyone is interested.

I left the equation at:
$$V_s = \sqrt{ \frac{2P\Delta t}{C_{min}} -V^2_f}$$

5. Jun 30, 2015

### Baluncore

You assume energy is removed at a fixed rate which would require a switching regulator.

If on the other hand, if the regulator is linear, then the charge will be removed at a constant current …

You know that C = Q / V and that Q = I * t. Then; C = I * t / V.
So; Cmin = Imax * dt / dV

6. Jun 30, 2015

### Corey Spruit

Yes, totally understand that. I'm intending on this cap to feed a DC-DC switching regulator which will compensate the current drawn due to the drooping voltage, but I might verify with an experiment. Thanks.

7. Jul 1, 2015

### meBigGuy

1. I never said $x^2-y^2 = (x-y)^2$ but that was what you said originally. I pointed out it was wrong, and was the source of your error. That mistake is the source of your original error.

I guess there is confusion about "take the square root of both sides". You can always take the square root of both sides of an equation. If you are somehow thinking that a - b somehow has two sides, then you need to adjust your vocabulary.

2. In the final equation above, you correctly took the square root of both sides of the equation but the equation is STILL wrong. You should have ADDED $V^2_f$ to both sides before taking the square root of both sides.

Last edited: Jul 1, 2015
8. Jul 1, 2015

### Corey Spruit

meBigGuy: Yeah, it's clear now. Sorry my response was a bit vague too, I was referring to "(a-b)^2 is a^2 - 2ab +b^2."

Having looked at it again just now, I instantly noticed the -ve should be a +ve; I guess I hadn't reviewed what I entered that closely. When I went off and did the calcs for the actual reason I wanted this for, I had it correctly as a +ve and got the result I was after.

Thanks.

9. Jul 1, 2015

### Jeff Rosenbury

EEs often use the RC time constant for this type of calculation. R times C gives the time needed to discharge a capacitor by ≈ 63.2%. That is often a nice model for figuring capacitor discharges which skips much of the math.

10. Jul 1, 2015

### Baluncore

That RC decay effect is quite different and inapplicable to both the constant current of a linear regulator and the constant power of a switching converter.

11. Jul 1, 2015

### Jeff Rosenbury

RC is often used in ripple voltage approximations, which is what this sounds like to me.

Vripple(pp)=Vmax/120RC, for small values of ripple. R is of course determined by Ohm's law. V can be approximated as Vmax for small Vripple or Vmax - Vripple(pp) for larger ripples. This doesn't give an exact solution, but is good enough for capacitor selection.

Now why did my font size change in the middle of my message?

12. Jul 1, 2015

### Corey Spruit

I am trying to work out a value of capacitance required to 'ride out' interruptions in the incoming supply before it is fed into a DC-DC Regulator. So the Reg has a min/max input voltage range, looking at how to maintain this in case of a dropout in the supply.

That's a handy equation too when designing simple rectifiers. It should be noted that it is applicable to 60Hz systems, it's discussed on the Wikipedia page; the "120" is actually $2f$, so it would be 100 in 50Hz systems.

13. Jul 1, 2015

### Jeff Rosenbury

How long do you need it to provide power?

Also this sounds like a job for supercapacitors. Supercapacitors are misnamed IMO. They are more like lame batteries. Still they have niche uses and this might be one of them. They last much longer than batteries. (I'm not sure they ever wear out.) But they can't discharge quickly like a real capacitor. You seem to want a slower discharge, so maybe that's not a problem.

A clever person could make the ripple equation work by treating R as a function, but perhaps not as easily as the true equation. I'm sure it doesn't work with supercapacitors though.

Good luck.