Reactive Elements
Capacitors and inductors are fundamentally different from resistors. A resistor's current depends on the voltage right now. A capacitor's current depends on how fast the voltage is changing. An inductor's voltage depends on how fast the current is changing. This time-dependence -- the involvement of derivatives -- is what makes reactive elements reactive, and what makes them the source of nearly all the interesting behavior in analog circuits: oscillation, filtering, energy storage, timing, and resonance.
The three analysis types see reactive elements in three completely different ways:
DC analysis: Capacitors are open circuits. Inductors are short circuits. In steady state, nothing is changing --
AC analysis: Capacitors and inductors become complex impedances. A capacitor has impedance
Transient analysis: This is where the real complexity lives. The simulator must solve the differential equations
Capacitors
A capacitor stores energy in an electric field between two conductive plates. The fundamental relationship is:
where
This single equation says everything about how a capacitor behaves: current flows only when the voltage is changing. A constant voltage produces zero current. A rapidly changing voltage produces a large current.
DC: open circuit
In DC steady state, all voltages are constant --
AC: complex impedance
In AC analysis, all signals are sinusoidal at frequency
The impedance is:
This is a purely imaginary impedance. Its magnitude
Transient: the companion model
Transient analysis is where capacitors get interesting -- and computationally demanding. The simulator must solve
Trapezoidal rule
The trapezoidal rule approximates the integral of current over one timestep as the average of the current at the start and end of the step:
Since
Solving for
This has the form of a conductance times the current voltage, plus a known history term:
where:
Gear (BDF) methods
The Gear methods use a different approximation -- they estimate the derivative using a weighted combination of the solution at several previous timesteps. For Gear order 2:
where
The companion circuit
Regardless of the integration method, the result is the same structure: at each timestep, the capacitor is replaced by an equivalent conductance
Initial conditions
A capacitor can start a transient simulation with a specified voltage using the IC parameter:
C1 pos neg 10n IC=2.5
This sets
Inductors
An inductor stores energy in a magnetic field created by current flowing through a coil. The fundamental relationship is the dual of the capacitor:
where
Voltage appears only when the current is changing. A constant current produces zero voltage drop. A rapidly changing current produces a large voltage. This is the mirror image of the capacitor.
DC: short circuit
In DC steady state, all currents are constant --
This means inductors do affect the DC operating point -- they provide a zero-resistance path for current. Unlike capacitors (which disappear from the DC problem), inductors are very much present. An inductor between two nodes forces those nodes to the same voltage.
AC: complex impedance
In AC analysis, a sinusoidal current
The impedance is:
This is purely imaginary and positive -- the dual of the capacitor's
Transient: the companion model
Like the capacitor, the inductor's differential equation must be converted into an algebraic companion model at each timestep. The state variable for an inductor is flux:
where
Capacitor-inductor duality
Capacitors and inductors are mathematical duals. Every statement about one has a corresponding statement about the other with voltage and current swapped:
| Capacitor | Inductor |
|---|---|
| DC: open circuit | DC: short circuit |
| AC: |
AC: |
| State variable: charge | State variable: flux |
| Companion: |
Companion: |
| No branch equation | Has branch equation |
Mutual Inductors
When two inductors are placed near each other, their magnetic fields interact. Current flowing through one inductor creates a magnetic flux that links through the other, inducing a voltage. This coupling is the basis of every transformer, and SPICE models it with the K element -- a mutual inductor that specifies how strongly two inductors are coupled.
L1 1 2 10m
L2 3 4 10m
K1 L1 L2 0.99
The K element doesn't exist as a physical device with its own terminals. It's a modifier that creates a coupling relationship between two existing inductors. The single parameter
Mutual inductance
The physical quantity that describes the coupling is the mutual inductance
Each inductor's voltage depends on its own current derivative (self-inductance) plus the other inductor's current derivative (mutual inductance). When
Transformers
The most common use of mutual inductors is to model transformers. An ideal transformer with turns ratio
The voltage transformation ratio follows from the inductance ratio:
Reactive Circuits
With capacitors, inductors, and mutual inductors in hand, we can now look at circuits where reactive elements produce the most characteristic behavior in analog electronics: oscillation, ringing, and energy transfer.
RLC ringing
Connect a resistor, inductor, and capacitor in series, apply a voltage step, and watch what happens. If the resistance is small enough, the circuit doesn't just charge up monotonically -- it oscillates. The energy sloshes back and forth between the capacitor's electric field and the inductor's magnetic field, with the resistor slowly dissipating energy on each cycle until the oscillation dies out.
The natural behavior is governed by two parameters:
Natural frequency
Damping ratio
The damping ratio determines the character of the transient response:
(underdamped): The circuit oscillates with an exponentially decaying envelope. This is ringing. (critically damped): The circuit returns to equilibrium as fast as possible without oscillating. (overdamped): The circuit returns to equilibrium monotonically, like a sluggish RC circuit.
The actual oscillation frequency in the underdamped case is slightly lower than
A simulated example
Consider
With
Simulation considerations
Reactive circuits require care in transient simulation:
-
Timestep control: The simulator must resolve the fastest oscillation in the circuit. The LTE-based adaptive timestep handles this automatically, but setting
TSTEPto something reasonable helps the initial timestep estimate. -
Initial conditions: Capacitor and inductor initial conditions determine the initial energy in the circuit. A capacitor charged to
stores energy . An inductor carrying stores energy . -
Integration method: For oscillatory circuits, the trapezoidal method preserves energy better than Gear methods (it's "A-stable" and has no numerical damping). But for stiff circuits with widely separated time constants, Gear methods are more robust.
-
Breakpoints: Reactive circuits driven by PULSE or PWL sources benefit from breakpoints that force the simulator to land on source transitions.