Skip to content
Engineering Bible

Results appear as you type. Use the arrow keys to move through them and Enter to open one.

Popular

↑ ↓ moveEnter openEsc close

RC, RL and RLC circuit scope

Drive an RC, RL or RLC circuit with a step, square or sine wave and watch the voltages on a live oscilloscope beside the Bode plot.

What the simulator shows

A resistor with a capacitor or an inductor forms a first-order filter. Add the third part and you have a series RLC circuit, which can ring. The simulator drives each circuit with a step, a square wave or a sine and draws the result on an oscilloscope. Channel 1 (yellow) is the source, channel 2 (cyan) the voltage across the output component and channel 3 (magenta) the loop current.

The beam sweeps the screen from left to right, and the last sweep fades behind it like phosphor. The first sweep starts with the circuit at rest, so you see the switch-on transient; later sweeps trigger on the rising edge of the source and show it dying away. The Bode plots below give the gain and phase of the output for every frequency. The cutoff or resonant frequency is marked, and the marker at the source frequency can be dragged.

Things to try

  1. Watch an RC circuit charge. Choose RC low-pass, 1 kΩ and 100 nF, and a step. The time constant is 100 µs and the time base settles on 100 µs per division. One division after the step the output has reached 632 mV of the 1 V step; five divisions after it, 993 mV.
  2. Damp the ringing. Start from the default: series RLC, 47 Ω, 10 mH, 1 µF, a 200 Hz square wave. Q is 2.13, ζ is 0.235 and each edge overshoots by 46.8 %, ringing at 1.55 kHz. Raise R to 200 Ω: ζ reaches 1, the circuit is critically damped and the overshoot disappears. At 1 kΩ it is overdamped and rises slowly.
  3. Find the resonance. Set R to 10 Ω (Q = 10), choose a sine and drag the Bode marker to 1.6 kHz. The voltage across C is 9.89 times the input, +19.9 dB, and lags it by 96°. The amplitude builds up over several sweeps because the envelope time constant 2L/R is 2 ms.
  4. Turn it into a band-pass. Keep R = 10 Ω and take the output across R. The gain peaks at 0 dB at f0 = 1.59 kHz and falls 3 dB at 1.514 and 1.673 kHz: a bandwidth of 159 Hz, which is f0 / Q.
  5. Make spikes. Choose RC high-pass, 1 kΩ and 10 nF (τ = 10 µs), and a 1 kHz square wave. The output jumps by the full 1 V at every edge and decays to 368 mV after 10 µs, so on a 200 µs per division screen it shows as thin spikes. This is how a differentiator works.
  6. Follow the current in an inductor. Choose RL low-pass, 100 Ω and 100 mH (τ = 1 ms), a 100 Hz square wave, and switch on the current trace. Each half period lasts 5τ, so the current climbs to 9.93 mA of the 10 mA maximum before the source drops to zero.

The model behind it

State equations. The source voltage u drives one loop. The capacitor voltage and the inductor current are the states:

RC:   C dv_C/dt = (u − v_C) / R                 τ = R C
RL:   L di/dt   = u − R i                       τ = L / R
RLC:  L di/dt   = u − R i − v_C,   C dv_C/dt = i
      f0 = 1 / (2π √(L C)),   Q = (1/R) √(L/C),   ζ = 1 / (2Q)

Time solution. The circuits are linear with constant values, so the simulator uses the exact solution rather than a numerical one. The state is the steady solution x_p plus a transient that decays through the state transition matrix:

x(t) = x_p(t) + e^(A t) · (x(0) − x_p(0))
e^(A t) = α0 I + α1 A,   with α0, α1 from the two roots of s² + (R/L) s + 1/(L C) = 0

For a step, x_p is the final value. For a sine it comes from the phasors, with impedance Z = R + jωL + 1/(jωC). For a square wave it is the periodic solution, found by requiring the state to repeat after one period. The method stays accurate for every slider setting, even when the two time constants of an RLC circuit differ by 15 orders of magnitude, where a step-by-step integrator would need billions of steps. The checks compare it with a fourth-order Runge–Kutta integration of the same equations, at a step 200 times shorter than the fastest time constant.

Frequency response. The Bode plots and the gain readout use the same filter formulas as the filter cutoff calculator, with x = f / fc for first order and x = f / f0 for second order:

first order:   H = 1 / (1 + jx)  across C or R (low-pass),   H = jx / (1 + jx)  across R or L (high-pass)
series RLC:    D = 1 − x² + jx/Q
               across C:  H = 1 / D        across R:  H = (jx/Q) / D        across L:  H = −x² / D
step overshoot across C (ζ < 1) = exp(−ζπ / √(1 − ζ²))

The cutoff is the −3 dB point, where the output is 0.707 of the input. For a series RLC it equals f0 only when Q = 0.707; the readout gives the true −3 dB frequency, or both band edges for the band-pass. The time constant shown for an RLC circuit belongs to its slowest mode: the envelope 2L/R when it rings, otherwise the slower of the two real roots. The RC time constant calculator and the LC resonance calculator give the same figures one at a time.

Assumptions and limits. The components are ideal: no coil resistance, no capacitor leakage or ESR, no stray capacitance. A real coil's resistance can be added to R. The source has zero internal resistance and the scope probes draw no current. The step and the square wave switch in zero time. The square wave runs from 0 V to the amplitude, the sine swings ± the amplitude. The automatic time base shows two periods of a square or sine, or about five time constants after a step (ten cycles at most when the circuit rings). The beam takes 1.6 s per sweep whatever the time base, so very fast and very slow circuits are shown at a comfortable pace. Each sweep has 1 000 samples plus both sides of every source edge. When the time base is too slow for the signal the simulator warns that the trace aliases.

Sources. Horowitz and Hill, The Art of Electronics, 3rd ed., §1.4 (RC circuits) and §1.7 (RC filters). Boylestad, Introductory Circuit Analysis, 13th ed., ch. 20 (series resonance, Q and bandwidth) and ch. 21 (decibels, filters and Bode plots). Ogata, Modern Control Engineering, 5th ed., ch. 5 (second-order step response and maximum overshoot) and ch. 9 (solution of the time-invariant state equation). Press et al., Numerical Recipes, 3rd ed., §17.1 (Runge–Kutta).

FAQ

Why does the output reach 63.2 % after one time constant?
The charging curve is 1 − e^(−t/τ). At t = τ that is 1 − 1/e = 0.632. After five time constants it is 0.993, which is why 5τ is taken as fully charged.

Why is the gain −3 dB at the cutoff?
At the cutoff the reactance equals the resistance, so the output is 1/√2 = 0.707 of the input. In decibels that is 20 log10(0.707) = −3.01 dB, and half the power.

Can the voltage across the capacitor be larger than the source?
Yes, in a series RLC circuit near resonance. At f0 the voltage across C is Q times the source. With Q = 100 and a 10 V source that is 1 000 V, which matters when choosing the capacitor's voltage rating.

What does critical damping mean?
At ζ = 1, or R = 2√(L/C), the circuit settles as fast as it can without overshooting. Less resistance makes it ring; more makes it creep.

Why does the first sweep look different from the later ones?
The circuit starts at rest, so the first sweep carries a transient on top of the steady response. It decays with the time constant. Tick "Steady state only" to see the steady response straight away, or press "Switch on again from rest" to watch the transient once more.

Results are estimates. They do not replace the governing code, class or flag requirements, or a check by a competent person.