Before the steady state

The half that never arrives

Charging a capacitor from a step loses exactly as much energy as it stores, and the resistance it is lost in does not appear in the answer — the same 12.5 microjoules through ten ohms and through a hundred kilohms, to nine figures. Drive the same network with a ramp instead and the loss falls as two time constants over the ramp, with no floor beneath it at all.

Assumes: One step, computed twice

There is one result in this subject where the component value visibly does not appear in the answer, and it is worth an essay for that reason alone. Charge a capacitor from a step of V through a resistance and the resistance dissipates exactly 12CV2\tfrac12CV^2 — the same energy the capacitor ends up holding, so half of everything the source delivered is gone, and it is gone whatever it was lost in.

It is usually presented as a curiosity about resistors. It is not about resistors at all. It is a statement about the source, and once that is seen the result stops being a curiosity and becomes the reason a whole class of circuits is built the way it is.

What a charge through 1 kΩ costs, against how long it is givencomputed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 1 ms, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.10m100m110µ100µ1m10m100m110how long the source takes to reach its final value (seconds)energy left in the resistor ÷ ½CV²½CV², whatever it is lost in9.5% of it: 20 msfaint: the same charge through the other four resistancessolved, then checked — energies from a marched solutiona tenth of the loss needs 20 ms
Fig. 1 The energy left in the resistor, divided by ½CV², against how long the source is given to reach its final value. The plateau on the left is the step and is the same height for every resistance — the faint curves are the other four. What the resistance moves is where the fall starts. The circles are marched; the line through them is a closed form that never sees a netlist.

The account, and how it is closed

A microfarad, five volts, and a resistance. Nothing is assumed about where the energy goes: the network is marched forward in time, the current is rebuilt from the element law as the source voltage less the capacitor voltage over the resistance, and three integrals are taken.

i2Rdt\int i^2R\,dt is what the resistor turned into heat. 12Cv2\tfrac12Cv^2 at the end is what the capacitor is holding. vsidt\int v_s i\,dt is what the source delivered. The account has to close, and it does: the third is the sum of the first two to better than a part in 10610^6 for a step and a part in 101210^{12} for every ramp, which is the check that the integration is right, since nothing in the computation reads a formula for any of the three.

For a step, the numbers are 12.5 µJ into the capacitor, 12.5 µJ into the resistor, 25 µJ out of the source. The measured ratio of the loss to 12CV2\tfrac12CV^2 is 1.00000 — and it is 1.00000 through ten ohms, a hundred, a kilohm, ten kilohms and a hundred kilohms, which is the flat part of every curve in the figure.

One step response, computed twice: from the poles, and by walking the network forward. A damping ratio of 0.22, so the overshoot is 49.2%. The two curves are drawn on top of each other; the panel below is the difference between them, which is the trapezoidal rule's error at 1000 steps and reaches 4.25e-4 V.
Fig. 2 Why the number can be trusted to five figures. The marching used here is the same trapezoidal rule this figure measures the error of, and that error falls with the square of the step — so the loss being 1.00000 rather than 1.0000141 is a statement about how many steps were spent, which for the step case is fifty thousand.

Why the resistance is absent

The reason is worth stating because it explains the whole rest of the essay.

The final state is fixed: the capacitor ends at V whatever the resistance is, so it ends up holding 12CV2\tfrac12CV^2 whatever the resistance is. The charge delivered is also fixed — Q=CVQ = CV — and the source held V the entire time, so the source delivered QV=CV2QV = CV^2 whatever the resistance is. The difference between two quantities that do not depend on the resistance cannot depend on the resistance.

Both halves of that argument lean on the source being a step. The source delivered CV2CV^2 because it was at V for the whole of the charge, including at the beginning, when the capacitor was at zero and the entire V was across the resistor. That is the moment the energy is lost: at the first instant the current is V/RV/R and the resistor is dropping the full supply, and every joule crossing it is a joule that never reaches the capacitor.

The resistance changes how long that moment lasts and how large the current in it is, in exactly compensating proportions.

What the ramp does

So make the source not a step. Ramp it linearly to V over a time T and repeat the measurement.

The result has a closed form, derived rather than fitted: the current during the ramp is (V/RT)(1et/τ)(V/RT)(1 - e^{-t/\tau}) and decays afterwards, and integrating i2Ri^2R over both stretches gives

2τT[1τT(1eT/τ)]\frac{2\tau}{T}\left[1 - \frac{\tau}{T}\left(1 - e^{-T/\tau}\right)\right]

times 12CV2\tfrac12CV^2. That expression never sees a netlist and the marcher never sees the expression; they agree over four decades of ramp duration to better than three parts in a thousand at the worst point and a part in a million over most of it.

ramp duration loss ÷ ½CV²
0.1 τ 0.9675
1 τ 0.7358
10 τ 0.1800
20 τ 0.0950
100 τ 0.0198
300 τ 0.00664

At TτT \ll \tau it goes to one, which is the step and the textbook answer. At TτT \gg \tau it goes to 2τ/T2\tau/T — the fitted exponent over the slowest three points is −0.994 — and there is no floor. Charge slowly enough and the dissipation goes to zero.

Where the joules actually go, instant by instant

The total is the memorable part and the distribution is the part that explains it.

At the first instant the capacitor is at zero, the whole supply is across the resistor, and the instantaneous power into the resistor is V2/RV^2/R while the power into the capacitor is nothing at all. At the end the capacitor is at V, the current is zero, and both powers are nothing. In between the split moves continuously from all-resistor to all-capacitor, and it crosses over when the capacitor is at half the supply — one time constant times ln2\ln 2, which is 0.693 τ.

Integrate each half and both come to 12CV2\tfrac12CV^2. That the two halves are equal is the theorem; that they are distributed so differently in time is why the ramp works. The loss is concentrated at the start, where the voltage across the resistor is large, and a ramp’s whole effect is to never let that voltage be large: with a ramp of twenty time constants the capacitor tracks the source about five per cent behind it, so the resistor never sees more than a twentieth of the supply and its dissipation is a four-hundredth of the peak the step produced, for twenty times as long.

That is where the 2τ/T2\tau/T comes from and it is worth having in the arithmetic form. In the long-ramp limit the current settles to a constant CV/TCV/T — the charge divided by the time — so the loss is I2RT=(CV/T)2RT=C2V2R/TI^2RT = (CV/T)^2RT = C^2V^2R/T, which is 12CV2×2RC/T\tfrac12CV^2 \times 2RC/T. A constant current for a long time is the cheapest way to move a given charge through a given resistance, and the ramp is the drive that produces one.

A disagreement that turned out to be arithmetic

The marched result and the closed form did not agree at first, and the size of the gap is worth recording because of how ordinary the cause was.

The first version asked for forty time steps per time constant, which is generous for the settling and is not what the shortest ramps need. At a ramp of three hundredths of a time constant that rule put slightly more than one step inside the ramp itself, so the marcher was integrating a drive it had barely sampled, and the two routes came apart by three parts in a thousand at that end of the sweep.

Three parts in a thousand is exactly the size of thing that reads as physics. It is small enough to look like a real second-order effect in the closed form’s derivation and large enough to be worth explaining, and a plausible explanation is available — the expansion assumes the ramp is slow compared with nothing in particular, so perhaps it fails when the ramp is fast. That explanation is wrong and it is the one that would have been written.

What settled it is that the disagreement moved with the step count rather than with the ramp duration. A departure that changes when the numerics change and not when the physics does is a numerical departure, and the repair is to make the step follow the ramp rather than the settling. With that done the two routes agree to a part in a million over the whole sweep except at the very shortest ramp, where the residue is a hundredth of what it was.

What the resistance actually decides

Which brings back the slider. The plateau does not move with the resistance; the knee does.

Losing only a tenth of 12CV2\tfrac12CV^2 takes about twenty time constants, which is 200 µs through ten ohms, 20 ms through a kilohm and two seconds through a hundred kilohms. So the resistance decides nothing about how much a fast charge costs and everything about how long a cheap charge takes — and in a circuit that has to repeat the charge at some rate, that is the constraint that actually binds.

The direction of the trade is the opposite of the intuitive one. A larger series resistance is usually thought of as the lossy choice. Here it makes no difference to a step’s loss at all, and it makes a slow charge harder to achieve, so the useful move is a smaller resistance and a slower drive.

What a charge through 100 Ω costs, against how long it is given. computed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 100 µs, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.
Fig. 3 The same measurement two decades down in resistance, drawn on its own. The plateau is in the same place to five figures and the knee has moved a hundredfold to the left: a tenth of the loss now needs two milliseconds rather than two hundred.

The staircase, which is the same result in the useful form

A ramp is difficult to make. A staircase is not, and it gives the same benefit in a form a switch can produce.

Charge the capacitor in N equal steps, allowing each to settle. Each step is a charge of V/NV/N through the same resistance from a source held constant, so each costs 12C(V/N)2\tfrac12C(V/N)^2 by the argument above — and there are N of them, so the total is 12CV2/N\tfrac12CV^2/N. Marched rather than argued, the ratios come out 1.00000, 0.500003, 0.250190, 0.125001 and 0.0625007 for one, two, four, eight and sixteen steps.

The loss falls in inverse proportion to the number of steps. That is the principle behind charge-recycling logic, behind resonant gate drivers, and behind the several-stage precharge sequences that appear in front of large capacitor banks. None of them is doing anything to the resistance.

A second-order step at ζ = 0.5. Overshoot measured off the curve is 16.3%, and it settles inside 2% after 807 µs. Inverting the standard relation on that overshoot returns a damping ratio of 0.500 against the 0.5 the components were built for.
Fig. 4 And the other way to do it, which this essay does not measure. Put an inductor in series and the charge becomes a resonant transfer: the energy goes into the inductor and comes back out into the capacitor instead of crossing the resistor, and what is left in the resistance is set by the quality factor rather than by the time taken.

What the model contains and what it does not

No inductance. The network is a source, a resistance and a capacitance, so every result here is about a purely dissipative path. A real charging loop has inductance in it, which changes the shape of the current and — at low enough resistance — makes the charge oscillatory, at which point the energy argument above still holds for the total but the waveform it holds through is a different one.

An ideal source. The source holds its voltage at any current, including the V/RV/R that flows at the first instant. A real one does not, which is a series resistance of its own and lands back inside the same result.

And a linear capacitor. A ceramic’s capacitance falls substantially with the voltage across it, so 12CV2\tfrac12CV^2 is not the energy stored in one; the honest statement there is vdq\int v \, dq over the actual curve, and the ratio to the loss is no longer exactly one.

What a charge through 10 Ω costs, against how long it is given. computed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 10 µs, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.
Fig. 5 Ten ohms. The time constant is 10 µs and the step still loses 12.50 µJ — the identical energy — with a tenth of it remaining after 200 µs. What the model contains is a resistance and a capacitance; what it does not contain is any way for the answer to depend on the first of them.
What a charge through 10 kΩ costs, against how long it is given. computed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 10 ms, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.
Fig. 6 Ten kilohms, a thousand times larger: τ = 10 ms, 12.50 µJ lost, a tenth left after 200 ms. Three decades of resistance have changed the time by three decades and the energy not at all, which is the whole result and is the reason it is worth a page.

Where the number matters

A switched-capacitor circuit’s power budget. Every clock edge charges a sampling capacitor from one voltage to another, and the loss is 12CΔV2\tfrac12C\Delta V^2 per edge regardless of the switch’s resistance. Multiply by the clock rate and it is the whole dynamic dissipation. Making the switch bigger buys nothing at all.

Driving a gate. A power MOSFET’s gate is a capacitance charged from a step, so the driver dissipates the same energy as the gate stores every time it turns on. A datasheet’s gate charge times the drive voltage times the switching frequency is that number, and it is why resonant drivers exist.

And precharging anything large. A capacitor bank charged straight from a supply through a contactor loses as much as it stores, in the contactor. The staircase result is the standard answer, and its 1/N is the reason precharge circuits have the number of stages they have.

Worth putting numbers on the last one, because the quantity is not small and the arithmetic is the essay’s. A bank of ten millifarads charged to four hundred volts holds 800 joules and therefore dumps 800 joules into whatever charged it, in one event. Through a one-ohm precharge resistor the time constant is ten milliseconds and the whole of it is over in a tenth of a second, so the resistor is absorbing eight kilowatts on average over that tenth of a second — which is why a precharge resistor is a physically large object and why its rating is an energy rather than a power. Halving the resistance does not halve the energy. It halves the time and doubles the power, and the resistor is no better off.

What a charge through 100 kΩ costs, against how long it is given. computed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 100 ms, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.
Fig. 7 A hundred kilohms: τ = 100 ms and two seconds to a tenth. Where the number matters is a switched-capacitor stage and a sample-and-hold, both of which charge a capacitor from a source through a switch thousands of times a second — and both of which pay 12.50 µJ every time whatever the switch is made of.

Where the lost half is paid

Half the energy of every charging step, independent of the resistance it is lost in, is a result three other essays depend on. The first cycle, which no steady state contains is where the whole of it arrives at once, in a reservoir being charged from nothing. The heat a recovery leaves behind is where it becomes one of the two positive feedback paths on a thermal node. A resistor made of a clock pays it thousands of times a second by construction, and The energy is in the gap is the magnetic version of the same accounting — where the energy is stored rather than where it is lost. One step, computed twice is the machinery all of it is measured on.

The gate

The step’s loss is asserted to be 12CV2\tfrac12CV^2 to three parts in 10510^5, at every resistance on the slider, which is the claim the essay is named for and the one that has to be exact rather than close.

The account is asserted to close — delivered equals lost plus stored — to a part in 10610^6, and the check on the ramps is a part in 10810^8. That is the only thing standing between a marched integral and a number that looks plausible.

The closed form is asserted against the marched result, over four decades of ramp duration, and the tolerance is three parts in a thousand because that is what the shortest ramp’s discretisation costs rather than what either route is worth.

And the asymptote is fitted rather than asserted: −0.994 over the slowest three ramps, which is the statement that there is no floor under the loss.

A loss with no resistance in it, twice

Charging a capacitor from a step losing exactly as much energy as it stores, with the resistance absent from the answer — the same 12.5 microjoules through ten ohms and through a hundred kilohms — is one of two results in this collection where a resistance cancels out of a total, and the pair is worth reading together because the mechanism is the same.

The total that has no resistor in it is the other: a resistor’s noise density goes as R\sqrt R and the noise bandwidth of what it charges goes as 1/R1/R, so five decades of resistance give one total — 63.2762 microvolts, the square root of kT/CkT/C. Here the current goes as 1/R1/R and the dissipation as I2RI^2R, so the power goes as 1/R1/R and the duration as RR, and the product is a constant.

In both cases the resistance sets how fast and not how much, and in both cases the answer is a property of the capacitor and the excitation. Which is why the ramp result on this page is the interesting half rather than the step result: driving the network with something whose duration is a free parameter is the one way to change a quantity that no component value moves, and the loss then falls as two time constants over the ramp with no floor beneath it.

That has a reader in the digital field. Every logic transition is this circuit, and the absence of a floor is why a slower edge costs less energy — bounded, in practice, by the millimetre that becomes common mode and the rest of the timing budget rather than by anything in this measurement.

The other reader is the power field, where the same energy appears as a loss to be limited rather than as a cost per transition. The first cycle, which no steady state contains is this circuit at scale — a reservoir capacitor charged from a mains peak through whatever resistance is in the way — and its 32.4 amperes is what the arithmetic on this page produces when the capacitance is a thousand microfarads and the step is a hundred and seventy volts. That the resistance does not appear in the energy is why the inductance that limits, and lifts finds adding resistance limiting the peak and not reducing the energy at all, and why the inductive repair — which changes the shape of the drive rather than the resistance in it — is the one that reduces both.

Which is this essay’s result read as a design instruction rather than as a curiosity. The energy lost charging a capacitor is decided by the drive and not by the path, so every repair that acts on the path — a larger conductor, a lower resistance, a better switch — moves where the heat appears and not how much there is. Only a repair that acts on the drive reduces it. Which is the whole content of the ramp measurement: two time constants over the ramp, no floor beneath it, and the design parameter is a duration rather than a component.

Part 1 on switching energy

One argument about Switching energy, and one of 2 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 10.

What this makes readable

Essays that name this one as a prerequisite.

The objects named here

The third axis, after the field and the idea: the things themselves, and every essay that touches each one.

Charging exponentialEnergy-storageIntegrationModel rangeReal powerTrapezoidal rule