Sub topic 1
Capacitors and Inductors: The i-v Relations
Resistors obey Ohm's law, which links voltage and current at the same instant. Capacitors and inductors do not. Their voltage-current relations involve a derivative or an integral, so the present current depends on what happened earlier. This chapter sets out those relations. Every later chapter on RC and RL transients builds on them.
Prerequisites
This chapter assumes you already know the following:
- Ohm's law and Kirchhoff's voltage and current laws (KVL and KCL).
- Series and parallel resistor combinations.
- Basic DC circuit analysis, including Thevenin equivalents.
- Introductory calculus: derivatives, integrals, and the exponential function.
- The idea of a first-order linear differential equation. You do not need to solve one yet.
Why storage elements are different
A resistor dissipates energy. Whatever power it absorbs leaves as heat, and it keeps nothing. Capacitors and inductors store energy instead. A capacitor stores it in an electric field between two conductors. An inductor stores it in a magnetic field around a coil.
Stored energy cannot appear or vanish instantly. That one fact explains most of the behavior in this tutorial. It is why the voltage and current in these circuits change gradually, along smooth curves, and not in jumps.
The passive sign convention
All equations in this chapter use the passive sign convention. The current reference arrow enters the terminal marked + on the voltage reference. With this choice, the product p = v·i is the power absorbed by the element. A positive p means the element is taking energy from the circuit. A negative p means it is returning energy.
If you flip one reference direction, a minus sign appears in the equations. Many sign errors in transient analysis come from mixing conventions, so fix the arrows before you write any equation.
The capacitor
An ideal capacitor has a capacitance C, measured in farads (F). Capacitance relates stored charge q to the voltage across the plates:
q = C·v
Current is the rate of change of charge, i = dq/dt. If C is constant, differentiating gives the i-v relation:
i(t) = C · dv/dt
The current is proportional to how fast the voltage changes, not to the voltage itself. Three consequences follow:
- If the voltage is constant, dv/dt = 0 and the current is zero. In DC steady state a capacitor acts as an open circuit, whatever voltage it holds.
- If the voltage changes quickly, the current is large. An instantaneous jump in voltage would need infinite current.
- The current can be positive while the voltage is small, or zero while the voltage is large. The two are not tied together instant by instant.
Solving for voltage gives the integral form:
v(t) = v(t₀) + (1/C) ∫ i(τ) dτ, integrated from t₀ to t
The term v(t₀) is the initial voltage at the start of the interval. It is the memory of the capacitor. The integral adds the charge delivered since t₀. The integration variable is written τ here only to avoid clashing with the upper limit t. It has no relation to the time constant, which later chapters also call tau.
Typical values
Real capacitors range widely. Ceramic capacitors in signal circuits are often 10 pF to 1 µF. Electrolytic capacitors in power supplies run from about 1 µF to several thousand µF. A capacitance of one full farad is very large. Capacitors of that size exist, but they are specialty "supercapacitor" parts.
The inductor
An ideal inductor has an inductance L, measured in henries (H). A changing current through a coil produces a changing magnetic flux. By Faraday's law, the changing flux induces a voltage across the coil. The i-v relation is:
v(t) = L · di/dt
This is the mirror image of the capacitor. The voltage is proportional to how fast the current changes. Consequences:
- If the current is constant, di/dt = 0 and the voltage is zero. In DC steady state an inductor acts as a short circuit, whatever current it carries.
- If the current changes quickly, the voltage is large. An instantaneous jump in current would need infinite voltage.
The integral form is:
i(t) = i(t₀) + (1/L) ∫ v(τ) dτ, integrated from t₀ to t
Here i(t₀) is the inductor's memory, the initial current.
Typical values
Inductors in small electronics range from about 1 µH to 1 mH. Power inductors and transformer windings can reach several henries. Real coils also have winding resistance, which an ideal model leaves out.
Duality
The capacitor and inductor equations match once you swap variables:
| Quantity | Capacitor | Inductor |
|---|---|---|
| Defining relation | q = C·v | λ = L·i (flux linkage) |
| Current-voltage | i = C dv/dt | v = L di/dt |
| Integral form | v = v₀ + (1/C)∫i dt | i = i₀ + (1/L)∫v dt |
| DC steady state | Open circuit (i = 0) | Short circuit (v = 0) |
| Quantity that cannot jump | Voltage v | Current i |
| Stored energy | ½ C v² | ½ L i² |
Replacing v with i, i with v, and C with L turns one column into the other. You can use this to halve the work. Once you have derived a result for an RC circuit, the RL version follows by swapping the dual quantities.
Power and energy
Power absorbed is p = v·i. For the capacitor, substitute i = C dv/dt:
p = C·v·dv/dt
Integrating power over time gives the stored energy. Starting from zero voltage:
w_C = ½ C v²
For the inductor, substitute v = L di/dt:
p = L·i·di/dt
and the stored energy is:
w_L = ½ L i²
Both energies depend only on the present value of one variable: the voltage for the capacitor, the current for the inductor. They do not depend on how the element got there. Both are never negative. An ideal capacitor or inductor can return all the energy it absorbed, so neither one dissipates any.
A worked example with numbers
A 10 µF capacitor has its voltage ramped linearly from 0 V to 5 V in 2 ms.
The rate of change is dv/dt = 5 V / 0.002 s = 2500 V/s. The current is:
i = C · dv/dt = (10×10⁻⁶ F)(2500 V/s) = 25 mA
The current is constant during the ramp. When the ramp ends and the voltage holds at 5 V, dv/dt becomes zero and the current drops to zero. The stored energy at the end is ½ · 10×10⁻⁶ · 5² = 125 µJ.
Now apply the dual case. A 10 mH inductor has its current ramped from 0 A to 0.5 A in 2 ms. Then di/dt = 250 A/s, and:
v = L · di/dt = (10×10⁻³ H)(250 A/s) = 2.5 V
The stored energy is ½ · 10×10⁻³ · 0.5² = 1.25 mJ.
You can check both by computation. The following script estimates the current from sampled voltage with a finite difference, and the other way round for the inductor.
import numpy as np
# Capacitor: voltage ramps 0 -> 5 V over 2 ms, then holds
C = 10e-6
dt = 1e-5
t = np.arange(0, 4e-3, dt)
v = np.where(t < 2e-3, 5.0 * t / 2e-3, 5.0)
i_cap = C * np.gradient(v, dt)
print(f"Capacitor current during ramp: {i_cap[50] * 1000:.2f} mA")
print(f"Capacitor current after ramp: {i_cap[300] * 1000:.2f} mA")
print(f"Energy stored: {0.5 * C * v[-1]**2 * 1e6:.1f} uJ")
# Inductor: current ramps 0 -> 0.5 A over 2 ms, then holds
L = 10e-3
i = np.where(t < 2e-3, 0.5 * t / 2e-3, 0.5)
v_ind = L * np.gradient(i, dt)
print(f"Inductor voltage during ramp: {v_ind[50]:.2f} V")
print(f"Inductor voltage after ramp: {v_ind[300]:.2f} V")
print(f"Energy stored: {0.5 * L * i[-1]**2 * 1e3:.2f} mJ")The output matches the hand calculation: 25 mA and 2.50 V during the ramps, zero afterward, and stored energies of 125.0 µJ and 1.25 mJ.
Series and parallel combinations
Combination rules for these elements are the reverse of the rules for resistors in one case and the same in the other:
| Combination | Capacitors | Inductors |
|---|---|---|
| Parallel | C_eq = C₁ + C₂ + … | 1/L_eq = 1/L₁ + 1/L₂ + … |
| Series | 1/C_eq = 1/C₁ + 1/C₂ + … | L_eq = L₁ + L₂ + … |
Inductors combine like resistors. Capacitors combine like conductances. These rules hold when no mutual coupling exists between inductors and when all initial conditions are zero. With nonzero initial voltages on series capacitors, you must also account for the total initial voltage. This matters once you start solving transients, so keep it in mind.
Common errors
- Treating v = iR habits as universal. For a capacitor, a large voltage does not mean a large current. The current depends on the slope of the voltage.
- Using the wrong sign. If the current arrow points out of the + terminal, the equations carry a minus sign. Mark the reference directions first.
- Forgetting the initial value. The integral forms need v(t₀) or i(t₀). Dropping them gives a result that is wrong by a constant.
- Confusing the DC behavior. A capacitor is open at DC and an inductor is short at DC. Reversing them is the most common slip in steady-state checks.
- Ignoring real-part limits. Real capacitors leak and have series resistance. Real inductors have winding resistance. The ideal equations are accurate for the transients in this tutorial, but expect small differences on a bench.
Summary
The capacitor obeys i = C dv/dt and the inductor obeys v = L di/dt. Each is the dual of the other. A constant voltage across a capacitor means zero current, and a constant current through an inductor means zero voltage. Stored energy is ½Cv² and ½Li², and neither element dissipates energy in its ideal form. The next chapter uses these facts to show why capacitor voltage and inductor current cannot change instantly.
Exercise
A 220 nF capacitor carries a current of 2 mA that is constant for 5 ms, starting from an initial voltage of 1 V. What is the voltage across it at the end of the 5 ms, and how much energy is stored then?
Show answer
Use v(t) = v(t₀) + (1/C)∫i dt. Because the current is constant, the integral is i·Δt = (2×10⁻³)(5×10⁻³) = 10 µC. Dividing by C gives 10×10⁻⁶ / 220×10⁻⁹ ≈ 45.45 V. Adding the initial 1 V gives v ≈ 46.45 V. The stored energy is ½ C v² = 0.5 × 220×10⁻⁹ × (46.45)² ≈ 237 µJ.
Exercise
The current through a 4 mH inductor is i(t) = 3t A for 0 ≤ t ≤ 2 ms, where t is in seconds, so the current reaches 6 mA at 2 ms. What is the voltage across the inductor during this interval, and what is the energy stored at t = 2 ms?
Show answer
The slope is di/dt = 3 A/s. The voltage is v = L di/dt = (4×10⁻³)(3) = 12 mV, and it is constant over the interval. At 2 ms the current is 3 × 0.002 = 6 mA, so the energy is ½ L i² = 0.5 × 4×10⁻³ × (6×10⁻³)² = 72 nJ.
Exercise
Two inductors of 6 mH and 3 mH are connected in parallel with no mutual coupling. A capacitor of 6 µF and one of 3 µF are connected in series. Find Leq and Ceq.
Show answer
For the parallel inductors, Leq = (6 × 3)/(6 + 3) = 2 mH. For the series capacitors, Ceq = (6 × 3)/(6 + 3) = 2 µF.