Capacitor in the Time Domain: Charging, Discharging, Energy, ESR, and Ripple
Learn how capacitors store energy, how voltage and current interact over time, and how to calculate RC charging and discharging, time constant, ripple, ESR, RMS current, and capacitor sizing in power electronics.
The capacitor is one of the most important components in power electronics because it allows something a resistor does not: temporarily storing energy and returning it to the circuit.
In switched-mode power supplies, DC buses, filters, and decoupling networks, the capacitor acts as a local charge reservoir. It absorbs current when excess energy is available and supplies current when the source momentarily cannot meet the load demand.
But understanding a capacitor requires more than knowing its capacitance in microfarads. It is necessary to understand:
- how current and voltage are related over time;
- why the voltage of an ideal capacitor cannot change instantaneously;
- how to calculate RC charging, discharging, and time constant;
- how energy is stored;
- how ripple is produced;
- how ESR, ESL, and leakage modify real behavior;
- how to select voltage rating, capacitance, technology, and ripple-current capability.
The central question of this lesson is:
if a source voltage can change very quickly, why can the voltage of an ideal capacitor not change instantaneously — and what determines how fast it changes?
1. What is a capacitor?
In its simplest form, a capacitor consists of two conductive electrodes separated by an insulating material called a dielectric.
When charge is removed from one plate and accumulated on the other, opposite electrical charges are separated. This separation creates an electric field and, consequently, a potential difference between the terminals.
For a linear capacitor:
Therefore:
The unit of capacitance is the farad:
This means that, in the ideal linear model, a 1 F capacitor requires 1 coulomb of charge to change its voltage by 1 V.
2. A capacitor is not a battery
A battery and a capacitor can both store energy, but the physical storage mechanism is different.
In a capacitor, voltage is directly related to the amount of charge separated between the electrodes. In a battery, electrochemical processes determine the energy-storage behavior.
Another important difference is that a capacitor can absorb and deliver current very quickly, limited by the external circuit and by its real parasitic elements.
An ideal capacitor stores energy in the electric field; it does not continuously convert that energy into heat as a resistor does.
3. Where does the equation i = C dv/dt come from?
We begin with:
From the definition of electrical current:
Substituting:
For constant capacitance:
This is one of the fundamental relationships in electronics.
It tells us that:
- if the voltage is constant, the ideal current is zero;
- if the voltage changes slowly, the current is small;
- if the voltage changes rapidly, the current increases;
- the larger C is, the more current is required to produce the same rate of voltage change.
4. Why can capacitor voltage not jump instantaneously?
Suppose we want to produce a finite voltage change ΔV in a time interval that approaches zero.
The relationship:
shows that if:
for a finite voltage change:
then the required current would also approach infinity:
Because real circuits contain resistance, inductance, and current limits, current remains finite. Therefore, capacitor voltage changes continuously.
An ideal capacitor does not force its voltage to remain constant; it only prevents an instantaneous voltage change when current is finite.
5. Integral form: accumulated current changes capacitor voltage
Rearranging the fundamental relationship:
and integrating:
If current is approximately constant during Δt:
Since:
we can also write:
This equation will be used repeatedly to estimate ripple in power converters.
6. How does a capacitor store energy?
An incremental amount of electrical energy is:
Since:
we obtain:
Solving:
Stored energy increases with the square of voltage.
The graph below shows this behavior for C = 100 µF:
Doubling the voltage quadruples the stored energy.
7. RC circuit: limiting charging current
If a discharged capacitor is connected directly to an ideal voltage source, the ideal model would require unlimited initial current.
In practice, resistance is used to limit that current.
The time constant is:
For R = 10 kΩ and C = 100 µF:
8. Exponential charging
For a constant source VS and initial voltage V0:
If V0 = 0:
The current is:
9. What does one time constant mean?
Time | Capacitor voltage during charging |
|---|---|
1τ | 63.2% |
2τ | 86.5% |
3τ | 95.0% |
4τ | 98.2% |
5τ | 99.3% |
The 63.2% point is especially useful because it allows τ to be estimated experimentally and, consequently, the effective capacitance to be estimated.
10. Complete example: 5 V, 10 kΩ, and 100 µF
Time constant
Initial current
Voltage after 1 s
Current after 1 s
Stored energy at 1τ
After 5τ
The capacitor is very close to its final voltage, although mathematically the exponential never reaches exactly 100% in finite time.
11. RC discharge
With the source removed and the capacitor discharging through R:
Using the passive sign convention, current is:
The negative sign indicates that the capacitor is returning energy to the circuit.
12. Energy during charging and discharging
At the final condition of 5 V with C = 100 µF:
During ideal step charging through a resistor, the source supplies:
For this example:
Since the capacitor ends with 1.25 mJ:
In ideal RC step charging, half of the energy supplied by the source ends up stored in the capacitor and half is dissipated in the resistor.
13. Physical charging and discharging flow
flowchart LR; A["Source applies voltage"] --> B["Resistor limits current"]; B --> C["Current transfers charge"]; C --> D["Electric field increases"]; D --> E["vC increases"]; E --> F["Charging current decreases"]; D --> G["Energy is stored"]; G --> H["Discharge through resistor"]; H --> I["Energy becomes heat"];14. Charge balance in periodic steady state
In periodic steady state, capacitor voltage returns to the same value after each period:
Therefore:
and:
This is known as the charge-balance principle.
However:
zero average current does not mean zero RMS current.
A capacitor may absorb positive current during one part of the cycle and deliver negative current during another, while still having significant RMS current.
15. Where does voltage ripple come from?
If the capacitor supplies an approximately constant current I during Δt:
Therefore, for a given I and Δt:
- larger C → lower ripple;
- smaller C → higher ripple.
The graph below shows this relationship for I = 0.2 A and Δt = 100 µs:
16. Ripple-sizing example
Suppose we need to supply:
- I = 0.20 A;
- for 100 µs;
- with a maximum capacitive drop of 0.10 V.
Then:
This is only the ideal minimum. The real component must still be corrected or checked for:
- tolerance;
- temperature;
- aging;
- DC bias;
- ESR;
- ripple current;
- lifetime.
17. ESR: the internal resistance of a real capacitor
A real capacitor has an equivalent series resistance, ESR.
When current changes rapidly, ESR produces an approximate voltage step:
In addition, RMS current heats the component:
Example:
- IC,RMS = 0.8 A;
- RESR = 60 mΩ.
Therefore, even with zero average capacitor current, internal heating may be significant.
18. Total ripple: capacitance and ESR contribute differently
In a simple conservative estimate:
The first term is associated with net charge transfer. The second appears almost instantaneously with a current change.
On an oscilloscope, this may appear as:
- a slower ramp or curve associated with C;
- a fast voltage step associated with ESR;
- additional ringing caused by ESL and layout inductance.
19. ESL: at high frequency, a capacitor can stop behaving like a capacitor
Leads, metallization, and geometry create an equivalent series inductance, ESL.
At sufficiently high frequency, inductive impedance can dominate.
An introductory real-capacitor model is:
This is a lumped approximation. The actual values depend on technology, frequency, temperature, and construction.
20. Leakage: a real capacitor does not hold voltage forever
In the ideal model, a capacitor with open terminals would maintain its voltage indefinitely.
A real capacitor has leakage current. In a simple model:
and the corresponding power is:
Leakage also causes the capacitor to discharge slowly even when it appears to be disconnected.
21. Dielectric absorption: voltage can reappear
Some capacitors exhibit dielectric absorption. After the capacitor is discharged and the discharge path is removed, a small voltage may reappear.
This does not represent energy creation. It results from internal dielectric-polarization processes that did not fully relax during the initial discharge.
For high-energy capacitors, the practical rule remains:
never assume a capacitor is safe simply because it was switched off or discharged earlier; confirm the voltage with an appropriate instrument.
22. How to calculate a discharge resistor
Suppose we want to reduce voltage from V0 to Vsafe within a maximum time td.
From the exponential discharge equation:
Solving for R:
We must also verify:
and:
If the resistor remains permanently connected, it also consumes power during normal operation.
23. How to limit inrush current
For a capacitor initially at V0 connected to a source VS through R:
If we want to limit this current to Imax:
This calculation is the basis of many precharge circuits.
24. How do we choose capacitor technology?
Technology | Main strength | Main cautions |
|---|---|---|
MLCC X7R | low ESL and excellent local decoupling | effective capacitance may fall under DC bias |
C0G / NP0 | high stability and low loss | usually lower capacitance values |
Aluminum electrolytic | high capacitance per volume and cost | polarity, ESR, ripple, temperature, and lifetime |
Polymer | low ESR in many applications | voltage, ripple current, and cost |
Polypropylene film | low loss and good pulse capability | size and DC/AC/dv/dt limits |
There is no single “best capacitor” for every application. Technology must be selected according to frequency, energy, voltage, ripple current, cost, size, and lifetime.
25. A more complete capacitor-selection workflow
flowchart TD; A["Define circuit voltage and current"] --> B["Calculate capacitance for ripple or hold-up"]; B --> C["Apply tolerance and effective capacitance"]; C --> D["Select voltage rating with margin"]; D --> E["Check ESR and RMS ripple current"]; E --> F["Check ESL and frequency"]; F --> G["Check temperature and lifetime"]; G --> H["Check polarity, leakage, and dimensions"]; H --> I["Validate layout and laboratory behavior"];26. Layout matters as much as capacitance
In a switching circuit, the capacitor must supply current through a physical loop.
The parasitic inductance of this path produces:
Therefore:
- place decoupling capacitors close to the load;
- keep outgoing and return paths compact;
- use short and wide conductors for pulsed current;
- ensure parallel capacitors share current appropriately;
- a very large capacitor far away does not replace good local decoupling.
27. Hold-up example
A 0.30 A load must continue operating for 2 ms with a maximum voltage drop of 0.25 V.
The ideal minimum capacitance is:
Applying a 25% margin:
Among 3300, 3900, and 4700 µF, the first value above the target is 3300 µF.
However, we still need to verify:
- maximum voltage;
- effective capacitance;
- ESR;
- RMS ripple current;
- temperature;
- lifetime;
- leakage;
- dimensions;
- polarity;
- inrush current.
28. Safe teaching experiment
The main experiment uses only isolated 5 V DC.
Materials
- 5 V bench power supply;
- 10 kΩ resistor;
- 100 µF electrolytic capacitor rated for at least 10 V;
- multimeter;
- optional oscilloscope;
- breadboard and short wires.
Procedure
- with the power supply off, confirm resistor value and capacitor polarity;
- set the supply to 5.00 V with current limiting;
- discharge the capacitor through the resistor and confirm less than 0.1 V;
- assemble the RC circuit;
- energize the circuit and record vC every 0.5 s for 5 s;
- compare with the theoretical curve;
- turn the supply off;
- discharge through the resistor and record the discharge curve;
- repeat with a different R and compare τ.
29. Measuring with an oscilloscope
For the isolated 5 V circuit:
- probe tip at node vC;
- ground clip at circuit GND;
- DC coupling;
- initial scale of approximately 1 V/div;
- time base of approximately 500 ms/div;
- rising-edge trigger around 1 V.
A particularly useful measurement is the time required to reach:
This time is approximately τ.
30. Estimating capacitance from the time constant
If τ is measured and R is known:
Example: the capacitor reaches 63.2% of its final voltage in 0.62 s and the measured resistance is 9.95 kΩ.
This suggests an effective capacitance close to 62 µF under the test conditions.
Before concluding that the component is defective, verify:
- tolerance;
- initial voltage;
- actual R value;
- instrument loading;
- timing error;
- leakage;
- component condition.
31. Suggested SPICE simulation
* Lesson 004 - RC charging and discharging at 5 V
V1 in 0 PULSE(0 5 0 1m 1m 5s 10s)
R1 in vc 10k
C1 vc 0 100u IC=0
.tran 0 10s 0 1m UIC
.meas tran VC_1S FIND V(vc) AT=1.001s
.meas tran VC_4S FIND V(vc) AT=4.001s
.meas tran I_1S FIND I(C1) AT=1.001s
.end
Useful simulation experiments:
- change C to 50, 100, and 200 µF;
- confirm that τ changes linearly;
- add ESR only as an explicitly stated hypothesis;
- compare voltage, current, and energy;
- do not use invented ESR or ESL values to represent a real component.
32. What can go wrong?
Symptom | Likely cause | Correction |
|---|---|---|
vC does not rise | open connection, shorted capacitor, or source off | check supply, continuity, and component |
vC rises too slowly | R or C larger than expected, leakage, or instrument loading | measure R and estimate τ from the 63.2% point |
vC rises too quickly | effective capacitance is lower | estimate C from τ/R and review tolerance |
final voltage is below source voltage | leakage or parallel load | check leakage current and instrument loading |
initial current is excessive | resistor omitted or too small | switch off and add the correct current limiting |
capacitor heats up | reversed polarity, overvoltage, or excessive ripple | switch off immediately and review the application |
unexpected voltage step or ringing | ESR, ESL, measurement loop, or layout | shorten connections and review parasitics |
voltage reappears after discharge | dielectric absorption | keep a discharge resistor connected and measure again |
33. Exercises
Exercise 1
A 47 µF capacitor receives a constant current of 20 mA for 3 ms. Calculate ΔV.
Exercise 2
For R = 22 kΩ, C = 47 µF, VS = 12 V, and V0 = 0, calculate τ, vC(τ), and iC(0+).
Exercise 3
A capacitor carries IRMS = 1.5 A and has an ESR of 40 mΩ. Calculate ESR loss. For ΔI = 2 A, estimate the ESR voltage step.
Exercise 4
A 0.30 A load must be supported for 2 ms with a maximum capacitive voltage drop of 0.25 V. Determine the minimum capacitance and apply a 25% margin.
34. Exercise answers
Exercise 1
Exercise 2
Exercise 3
Exercise 4
With a 25% margin:
Among standard values of 3300, 3900, and 4700 µF, the first value that exceeds the ideal target is 3300 µF, still subject to the remaining design checks.
35. What you should remember from this lesson
- A capacitor stores energy in an electric field.
- For constant C, q = Cv.
- Current is proportional to the rate of voltage change.
- Capacitor voltage cannot change instantaneously under finite current.
- ΔV = ΔQ/C is the basis of ripple calculations.
- Stored energy is ½CV².
- In an RC circuit, τ = RC defines the time scale.
- After 1τ, charging reaches approximately 63.2% of the final change.
- In periodic steady state, average capacitor current is zero.
- Zero average current does not imply zero RMS current.
- ESR produces both instantaneous ripple and I²R heating.
- ESL limits high-frequency performance.
- Nominal capacitance may differ from effective capacitance.
- Voltage, ripple, temperature, lifetime, leakage, polarity, and layout are part of capacitor selection.
A capacitor does not merely “filter voltage”: it moves charge and energy through time.
36. Next lesson
In Lesson 005, we will study the inductor in the time domain.
There is a direct parallel:
Capacitor | Inductor |
|---|---|
energy in the electric field | energy in the magnetic field |
i = C dv/dt | v = L di/dt |
voltage cannot jump under finite current | current cannot jump under finite voltage |
charge balance | volt-second balance |
ESR and ESL | DCR and parasitic capacitances |
References
- ERICKSON, Robert W.; MAKSIMOVIĆ, Dragan. Fundamentals of Power Electronics. 2nd ed. Kluwer Academic Publishers, 2001.
- MOHAN, Ned; UNDELAND, Tore M.; ROBBINS, William P. Power Electronics: Converters, Applications, and Design. 3rd ed. John Wiley & Sons, 2003.
- HURLEY, W. G.; WÖLFLE, W. H. Transformers and Inductors for Power Electronics: Theory, Design and Applications. Wiley, 2013.
- For any real capacitor, consult the official datasheet for the exact series and part number, including effective capacitance, voltage rating, ESR, impedance, ripple current, temperature, lifetime, leakage, polarity, and dimensions.