I would like to continue this thread,
https://www.eevblog.com/forum/projects/why-trying-to-store-energy-in-a-capacitor-can-be-less-efficient-than-you-think/but as it's already ballooned to six pages in the time I've seen it, I don't want my reply to get buried within. Hope that's not a problem.
In knowledge, there is a constant back-and-forth between "aha, it's this [simplification]!" "Well yes it's that, but it's also [so-and-so]." "You're both wrong, it's [gobbeldygook], which is far richer than either of you imagined, and includes both of your cases, when taken to very specific limits." (Case in point; BJTs current vs. voltage. I won't bore you with the thread...)
In this situation, the usual background goes thus:
Perhaps in high school science or intro university, you learned that charge is always exactly conserved between capacitors. If you take two equal value capacitors, one charged and one discharged, and connect them together, the final voltage will be exactly half: because the sum capacitance is double, and Q=VC, and charge conservation, blah blah blah, it works. With the curious note that "it
doesn't matter how we got there, how fast or how slow; it simply happens, perfect every time."
As with many things you were taught, perhaps you simply left it at that, stashed it in the corner of your mind for the test, then forgot about it. Because who measures charge, anyway? Multimeters don't, so unless you're doing fancy experiments, who cares. (And honestly, I wouldn't say this is an unfair conclusion, because current is all-around easier to deal with, in a great many cases.)
And as with so many things, the assumptions and exceptions are easily more complex, important, and numerous, than the simplified core of the statement itself! And so often forgotten or omitted outright!
So let us begin.
(Note: I have left the algebra in, in the hopes that the intrepid student will follow along. Yes I know it's a strain on the eyes, and ASCII makes for poorly formatted math besides; but if you force yourself to read it, it's really quite easy, and very illuminating to get a feel for how the quantities are connected by the process.)
I haven't scanned the above thread for important data, so this is mainly a reply or addendum to the first post.
Let me be clear:
everything that IanB has written is true!What may not be clear, is the extent of that truth.
Gotcha #1. "50% of the energy is always lost."My emphasis: of the
energy difference, not the absolute energy.
If you take two 1uF capacitors, one charged to 1uC and the other to 2uC (thus, 1 and 2V respectively), and connect them together, you end up with 3uC in 2uF, or 1.5V.
The energy states changed thus:
E1 = 0.5 * (1uF) * (1V)^2 = 0.5uJ
E2 = 0.5 * (1uF) * (2V)^2 = 2uJ
sum = 2.5uJ
Efinal = 0.5 * (2uF) * (1.5V)^2 = 2.25uJ
In fact, only 10% of the total energy (0.25uJ out of 2.5uJ) has been lost! This must be some serious bullshit going on here. Apparently both of us are lying: it's not 50%, nor is it 50%
of the difference (which should be (2.5 - 0.5) / 2 = 1uJ lost, for a final energy of 1.5uJ).
But, the latter is a somewhat closer approximation (1.5 is closer to 2.25 than 1.25 is), and we can refine its overly simple language to give a better fit (in this case, exact). Bear with me.
If we crank the numbers, we can find the "difference" that we should be referring to.
Problem Statement: Suppose we have two capacitors, C1 and C2, initially at voltages V1 and V2 respectively (thus we know their charges, but again, charge is more useful as concept than a quantity, so I'll be eliminating those momentarily), then connected together until they reach equilibrium. What is the energy loss? Show your work.
The final voltage will be,
Vf = Qtot / Ctot
= (Q1 + Q2) / (C1 + C2)
= (V1 C1 + V2 C2) / (C1 + C2)
and energy,
Efinal = Ctot Vf^2 / 2
= (C1 + C2) [(C1 V1 + C2 V2) / (C1 + C2)]^2 / 2
the (C1 + C2) cancels, leaving one on the bottom,
= (C1 V1 + C2 V2)^2 / (2 (C1 + C2))
The loss is then,
Eloss = E1 + E2 - Efinal
= C1 V1^2 / 2 + C2 V2^2 / 2 - (C1 V1 + C2 V2)^2 / [2 (C1 + C2)]
Uhm let's see, kind of a mess... we can multiply through by 2 to leave that pesky half alone...
We probably also want to distribute the squared term, and multiply the left terms by (C1 + C2) so we can get the right hand side over a common denominator (or throw it on the left hand side just the same).
2 Eloss (C1 + C2) = C1 V1^2 (C1 + C2) + C2 V2^2 (C1 + C2) - C1^2 V1^2 - 2 C1 C2 V1 V2 - C2^2 V2^2
See anything dropping out? Ehh... maybe... let's distribute some more.
= C1^2 V1^2 + C1 C2 V1^2 + C1 C2 V2^2 + C2^2 V2^2 - C1^2 V1^2 - 2 C1 C2 V1 V2 - C2^2 V2^2
the doubly-squared terms drop out, leaving
= C1 C2 V1^2 + C1 C2 V2^2 - 2 C1 C2 V1 V2
= C1 C2 (V1^2 + V2^2 - 2 V1 V2)
= C1 C2 (V1 - V2)^2
Going back to Eloss alone, we find
Eloss = C1 C2 (V1 - V2)^2 / [2 (C1 + C2)]
Thus, the difference does indeed show up: the simple difference between voltages. Energy always goes as V^2, so we have to square the difference. Handy to note: squaring always eliminates the sign, so we don't care which voltage is higher or lower than the other, or whether either is positive or negative: just as it should be -- we're only asking about the absolute energy difference, and this has given it.
Capacitor energy always goes as C/2, but what is the capacitance this time? It's the everything-else:
Ceff = C1 C2 / (C1 + C2)
But what is this? This is the formula for capacitors in series! So although we might claim we've connected capacitors in parallel; really, with only two nodes, two components and one loop, it's both series and parallel, so this is a perfectly reasonable outcome, logical even!
Thus, the energy lost due to connecting capacitors together is given by the series equivalent capacitance, and the difference in voltage.
A handy result of this is, being able to calculate the efficiency of a switched-capacitor regulator. (Equivalent terms: "flying capacitor" switcher, charge pump.) Yes, such a device exists, and yes, they aren't terrible! Since they use resistive switches, you should intuitively expect they can do at least as well as linear regulators (which only drop voltage, at complete loss), while also implementing useful [fixed] ratios (like 1:2 or 1:-1). What may not be intuitive is, how they can ever possibly do any
better than a linear regulator. But that's the trick. By designing for multiple ratios, and selecting between them like a car's manual transmission, the amount of voltage required to drop (as losses) can be optimized down. It can't be eliminated, and the losses taken on that
difference will always be total, in the sense that I've covered above: but since overall performance is key, it's not nearly as bad as it sounds, especially if many ratios (thus giving closely spaced options) are provided.
Gotcha #2. Irreversible systems give total losses.Problem: they don't need to.
Besides resistors and capacitors, there are also problems from thermodynamics and other parts of physics, which have exactly the same concerns.
And as you might be guessing, following the earlier section... well damn, can we just keep on reducing losses arbitrarily?
Maybe.
The trick is, most irreversible processes (such as charging capacitors, or compressing a gas) are locally reversible -- that is: over a small enough trajectory, you lose much less energy than you've exchanged in that small step. What you have to remember is, when you implement such a piecewise path... you have to implement every single step along the path.
Offhand... I can't quite convince myself that it
can be done with capacitors, say by "bucket brigade"-ing one capacitor into another, using a smaller "bucket" capacitor and many steps, or by using many buckets in a chain. I've written a fairly convincing spreadsheet which demonstrates this for 10 buckets and 100 steps (giving the expected "lossy" result with no path dependence -- that is, the small steps still lose a proportional amount of energy).
One example where it does work: counter-flow heat exchangers. The temperature of one fluid can be fully swapped with another (or in whatever ratio their heat capacities suggest), to the level of 90% efficiency or better.
Gotcha #3. Equilibrium....So, what about inductors and switches?
Aha. The truth hidden in the background of this one is, we're only talking resistors and capacitors. (Actually, whether we have inductors or not, doesn't matter, as long as there's some equivalent resistance somewhere.) We're also talking thermodynamics: the exchange of
energy, not of
power. What happens at equilibrium, not in the process. You can't do thermo by looking at two arbitrary points in time, no; that requires kinetics and flow and, oh god, all sorts of horrible things! Thermo demands the result at t --> infty.
In the thread, Jay Diddy has presented a couple simple cases where energy can be transferred without the apparent "50% loss".
These examples are actually
more wrong than the simple "50% total losses" statement is....BUT... this is only true when taken within the same (or similar) problem statement: when taken to infinity time.
What's more, they're far more useful, to us beings of finite life span, than near-philosophical matters of zero and infinity.
In those circuits, a diode, active switch or something even more complex has been used to achieve single-event energy efficiency. But these are inherently non-equilibrium cases, because the diodes or switches do not have zero leakage current. Eventually, when left alone, they will come back to equilibrium, and (assuming that leakage was between the capacitors, which are otherwise ideal capacitors, and not to ground), the eventual final result will be identical to the thermodynamic case.
To correct the apparent contradiction of wrongness, we must apply a different energy rule, using quasi-static averages, rather than thermodynamic eventualities. This is the domain of switching power supplies, where one can evaluate events in a stepwise manner, without individually needing to know how they proceeded during that interval (no need to solve, for example, voltage as a function of time -- which might involve a lengthy and perhaps unsolvable differential equation!), as long as they proceeded according to the assumed rules (such as the conservation of energy between reactive elements, without dissipating too much of it in losses).
An illustrative example is any rough switching supply calculator tool: this one's my favorite.
http://schmidt-walter.eit.h-da.de/smps_e/smps_e.htmlGive it a romp: select a topology, put in some goofy numbers (or let it give you the defaults), and hit calculate. You will see straight line, ideal waveforms, which arise from calculating only the averages, assuming all ideal components. What's actually calculated, is not the exact waveforms in any meaningful sense, but only the corners where they change direction -- what happens between those points doesn't matter, and indeed might proceed quite differently (most noticeably around switching edges, which can be very complicated waveforms indeed), but so long as the waveforms transition between those corners in a lossless (path-independent / reversible) fashion, the result will, in fact, remain perfectly valid! Your challenge, as the designer and engineer utilizing these tools, is to ensure, as well as possible, that this condition is met!
Connecting with not only thermodynamics, but some famous physics as well, Richard Feynman was quite fond of methods like these. In physics, you can find the Lagrangian of the system, which describes how the energy levels evolve over time. You can apply exactly the same reasoning to these systems, in a stepwise or assumed-reversible fashion, to get a very good idea of what the system is doing, without having to go to the trouble (or often, outright impossibility!) of finding the exact functions which describe all quantities in the system (positions, voltages, quantum probabilities, etc.).
Tim