1What we promise
- Computed, not drawn. Every waveform is the output of a circuit solver running on the parts you see, or of a closed-form formula where one exists: the home page's sampling scene, pole plots, envelope guides and several readouts. Nothing is a recorded animation or a hand-drawn curve.
- Your browser does all the work. There is no simulation server. The circuits, your knob settings and your answers never leave your machine.
- Every engine is checked. Against closed-form answers, brute-force references, a reference SPICE simulator and independent audits, with the measured agreement stated, not "typical" values.
- Limits are stated. Where an engine is approximate, or a model stops describing real hardware, this page says so with numbers.
2What your browser does
LiveWaves is a static site. When you open a lesson, your browser downloads the page and the engine code (plain TypeScript, compiled to JavaScript, with no numerical libraries) and then does everything else itself:
- Solves the circuit whenever you move a knob. The lessons re-solve on the main thread. Lessons 1, 2, 3 and 10 defer the re-solve so the knob itself never waits; lesson 4's solve takes microseconds. The Lab runs its solver in a Web Worker [1], a background thread, so the display keeps animating at 60 frames per second while a hard solve runs, and the trace updates as each solve lands. Results come back as transferable typed arrays [2] (moved, not copied).
- Draws each trace on a canvas [3], scheduled with
requestAnimationFrame[4], at your screen's pixel density (up to 2×) [5]. Each waveform is one clean stroke: no glow, bloom or smoothing that isn't in the data. - Keeps almost nothing. No accounts, no circuit uploads. Your browser keeps only your light/dark choice, the Lab's settings, the circuits and model files you add to it, how you arranged a lesson's cards, and a Lab setup if you press Save (the privacy page lists each key). The site counts page views with its host's analytics. It sets no third-party cookies and is anonymous: per page view it records the time, the page, the referrer, a filtered query string, the country, region and city, the browser, the operating system and the device type. A visitor hash made from the request is discarded after 24 hours. Nothing you do inside a lesson is sent.
3The lesson engine: nodal analysis
Lessons 1, 3, 4, 6 and 7 and the home page's RC, RLC and buck scenes use a small modified-nodal-analysis (MNA) solver [6], the formulation inside SPICE [7]. Every node voltage and every current through a source or an inductor becomes an unknown, and each part adds its terms ("stamps") to one linear system:
For time steps, each capacitor and inductor is replaced by its trapezoidal-rule companion model, a conductance plus a current set by the previous step. That is second-order accurate and doesn't damp a ring artificially:
vL,n+1 = (2L/h)(in+1 − in) − vL,n
At a source discontinuity (a square wave's edge) the first step is backward Euler, a first-order restart that keeps the trapezoidal rule from ringing numerically on the jump. SPICE2 likewise restarts its integration at first order after a breakpoint [7]. The matrix is factored once per step size and method (dense LU with partial pivoting). Each step is then a forward and back substitution. A 10⁻¹² S conductance from each node to ground (the same value as SPICE's GMIN, which SPICE places across junctions) keeps a node reached only through capacitors from making the DC matrix singular.
Steady state. Lesson 1 starts from the DC operating point at the source's mean value and runs whole periods until the circuit has settled (8 time constants, at most 60 periods). It aims for 200 steps per time constant (between 2,000 and 40,000 per period), with both edges landing exactly on a step, then shows the last period. Lesson 3 starts from the exact steady state (a closed form, a geometric series per pole) and steps finely only while the natural response is alive, so a 1.6 MHz ring on a 100 Hz square wave doesn't cost millions of steps. Lessons 1 and 3 state their step count and their deviation from the closed form in the footer, live.
Controlled sources. Lessons 6 and 7 build their op-amp from linear controlled sources: a voltage-controlled current source (SPICE's G) for the input stage and voltage-controlled voltage sources (E) as buffers, with the compensation capacitor, a resistor for the finite gain, a second pole and the output resistance. Their stamps are frequency-flat, so DC, transient and AC share them. The slew limit is nonlinear (the input stage saturates, i = Imax·tanh(gmv/Imax)), so lesson 6 integrates the op-amp's two states itself with fourth-order Runge–Kutta, checked against the MNA in its linear limit and against the exact slew ramp and handover.
AC. Lesson 4 and the Bode plots solve the same stamps with complex admittances (jωC, 1/jωL) at each frequency. The phasors are that complex solution, and the scope traces are its exact steady state, v(t) = Re{V ejωt}.
4Switches and diodes
Lesson 2's relay switch and clamp diode aren't linear, so the circuit is solved as piecewise-linear states. Each combination (switch closed or open, diode on or off) is its own linear circuit, solved by the MNA engine. The inductor current and capacitor voltages carry across each change. The diode is a forward drop in series with a small resistance: it turns on when the voltage across it exceeds the drop, and off when its current would reverse.
Each diode change is located to one timestep: the solver restarts from the last step before the crossing, and the reported event time is interpolated within that step. The switch opens and closes on the step grid. The first step after a change is backward Euler, two when the clamp diode turns on (its pole is picoseconds). Unclamped, the window is stepped at 40 or more steps per ring period, up to 400,000 steps (a big coil on a tiny capacitance, a ring of tens of µs in a window of seconds, gets fewer, so the whole-window view draws the ring coarsely there); the zoomed kick, which the peak readout comes from, takes 400 steps per ring period. Clamped, the ring dies at once and 20,000 steps resolve the L/R decay. Against the reference SPICE's own switch and piecewise-linear diode models: unclamped kick peak 5239.82 V (browser 5239.72 V), diode release 19865.0 µs (browser 19864.97 µs), diode + zener release 2714.92 µs (browser 2714.86 µs).
5Lines, cables and PCB traces
The home page's coax scene and lesson 10 are solved in the frequency domain, where a transmission line is exact. A uniform line has series impedance Z and shunt admittance Y per meter (telegrapher's equations):
[V1; I1] = [cosh γℓ, Zc sinh γℓ; sinh γℓ / Zc, cosh γℓ]·[V2; I2]
Loss that respects causality. Copper resistance rises from its DC value to the skin-effect limit as Rdc·√(1 + jf/fs), whose imaginary part is the internal inductance that skin effect implies. Dielectric loss uses the Djordjevic–Sarkar wideband Debye model [8], a permittivity whose real and imaginary parts are consistent (Kramers–Kronig). So pulses don't arrive before they were sent. The one exception is the roughness factor on PCB copper (below), the usual, mildly non-causal Hammerstad correction. The coax is RG-58, fitted to Belden's 8262 datasheet [9], within 3 % of its published attenuation from 1 MHz to 1 GHz.
PCB traces (lesson 10) take their impedance and effective permittivity from the cross-section: Hammerstad–Jensen for microstrip [10] and Wheeler for stripline [11], both checked against a 2-D field solve (worst 0.43 % in Z₀, 0.35 % in εeff). The laminate is Isola 370HR, fitted to its datasheet [12]. Copper loss uses Wheeler's incremental-inductance rule [13], scaled by the classical Hammerstad surface-roughness factor, 1 + (2/π)·arctan(1.4(Δ/δ)²) [10][14]. The copper roughness Δ = 2 µm RMS is chosen within the 1.2–4 µm RMS published for the treated side of standard electrodeposited foil [15]. Reverse-treated and very-low-profile foils, which 370HR is also offered with, are smoother (about 0.5–0.9 µm), so the figure stands for standard (HTE) foil.
The channel. Each part is a two-port chain (ABCD) matrix: lines as above, series parts [1, Z; 0, 1], shunt parts [1, 0; Y, 1], and branches such as stubs as shunts of their own input admittance. Walking back from the open far end gives every node's voltage, with no matrix ever inverted. An inverse FFT of the transfer function times a band-limited (Gaussian) edge gives the time waveform, with the window chosen to outlast every reflection.
6The Lab engine: exact by construction
For the Lab's linear circuits every sample is the exact solution; the power supply and the buck converter are nonlinear, so their traces are solved, to within 0.01 %, and checked against SPICE. The trigger lands on the exact crossing, and the measurements are made from the acquired record, as a scope makes them.
The Lab (LW Labs) needs one engine to serve timebases from nanoseconds to seconds per division. A conventional integrator would have to resolve the fastest edge at every timebase. Instead, for linear circuits driven by a function generator, the Lab computes the answer exactly.
The circuit as states. Freezing each capacitor as a voltage source and each inductor as a current source leaves a resistive network. One factorization of it gives every state derivative, so the circuit is a linear state-space system in its capacitor voltages and inductor currents:
The generator as states too. Every standard waveform is itself a tiny linear system. A sine is a rotation, [cos θ, sin θ]′ = ω·[−sin θ, cos θ]. A square, pulse, triangle or ramp with finite edges is piecewise linear: between breakpoints, u′ = slope and slope′ = 0. Put circuit and generator together and the whole Lab setup is one linear system with no input at all:
This is Van Loan's block-exponential method [16]. The matrix exponential is computed by scaling-and-squaring with a degree-13 Padé approximant [18], using Al-Mohy and Higham's scaling choice [19] (on why it's the right method among many, see [20]). Each step the scope takes is exact to rounding. The one exception, stiff circuits stepped over very long intervals, is measured in Capabilities and limits. Steps are split exactly at generator breakpoints, and the generator's state is re-derived from its phase after every step, so its value never drifts from its phase. The phase accumulator itself drifts by about 4×10⁻¹¹ of a period per 50,000 periods. When a node is reached only through inductors, a 10⁻¹² S leak to ground is added, and the answer is then exact to about one part in 10⁹.
Exact steady state. Over one period the circuit state maps as s(T) = P·s(0) + q with P = eA·T, so the periodic steady state is one linear solve, sss = (I − P)⁻¹·q. The engine refuses circuits that don't have a unique steady state, rather than returning a meaningless one. Those are circuits with a pole on or past the jω axis (a lossless LC, a floating capacitor node, an inductor loop), or a solution that fails its residual check. The Lab then simply runs them. The poles themselves come from Hessenberg reduction and Francis's QR iteration [21][22], following Numerical Recipes [23][24].
Against closed forms, in the recorded run (2026-10-05): an RC driven by a sine from rest agrees to 3.7×10⁻¹⁵ V. Lesson 3's series RLC steady state, in four cases spanning all three damping regimes, agrees to 3.5×10⁻¹⁴ V. That is double-precision rounding.
Nonlinear circuits. A diode breaks all of this: there is no matrix exponential for a circuit whose conductance depends on its own voltage. For those (so far the Lab's power supply: a transformer, one diode or a bridge, and a reservoir capacitor; and its buck converter: a switch with its body diode, a Schottky, L, C and the load, in open loop or held at 5 V by its own controller) a second engine steps the circuit in time with Newton's method at each step and TR-BDF2 between steps, a second-order method that doesn't ring when a diode snaps off [17]. It then finds the periodic steady state by shooting: Newton's method on the whole period, which converges in a handful of periods however slowly the circuit itself would settle. These traces are labeled solved, not exact: they converge to a tolerance. Against SPICE at tight settings, the power supply agrees to within 2 mV (under 0.01 %) on outputs from 3 to 36 V, and the scope's ripple and mean readings to a fraction of a percent. The buck, across seven corners from 2 to 200 Ω, 100 to 500 kHz and duty cycles of 0.2 to 0.9, in continuous and discontinuous conduction, agrees to 0.1 mV on its output and switch node and 0.04 mA on its inductor current (the reference SPICE prints six digits). A switcher is shot from just after its switch turns on, which wipes out the switch node's ring, so the period's starting state holds only the slow quantities.
The buck in closed loop. Its controller is part of the circuit: an error amplifier (80 dB, 10 MHz, its swing clamped) with type III compensation, and a comparator that weighs its output against a 1 V, 200 kHz ramp and drives the switch's gate through 10 Ω into 1 nF. Nothing here switches at a time known in advance, so the comparator and the switch are smooth functions (each a smoothstep, over 1 mV and over the gate's threshold region), which Newton and the shooting sensitivities see whole. A regulator's loop has no DC point with its switch in it, so shooting starts from its DC point as a linear regulator, the comparator widened ten-thousandfold and narrowed. From 2.5 A down to 25 mA (discontinuous) the output, the inductor current and the control voltage agree with SPICE to within 13 µV and 13 µA. The generator's load step repeats over hundreds of switching cycles, too long to shoot whole, so its period is built from the two loads' steady cycles and the transients between them, run until they land on the other load's cycle (or, when the loop hasn't settled by the next edge, run on and repeated until the period closes on itself); its whole waveform agrees with SPICE's to within 0.03 mV and 0.13 mA.
7From solution to scope screen
A real oscilloscope samples its input, so it can miss what happens between samples. The Lab's scope reads the exact solution instead, and makes sure nothing can hide inside a pixel column.
- Trigger on the generator's own phase (its sync output). The sweep starts at an exact instant, not on a sample grid, so there is no trigger jitter.
- Adaptive sampling. Each interval is split until a cubic Hermite curve [25] through the exact values and exact slopes at its ends matches the exact midpoint to 1/5,000 of full scale. Any ring still visible gets at least 12 samples per cycle after every edge that strikes it.
- Peak detect. Each column holds the minimum and maximum of everything inside it, including each segment's crest between samples. Many cycles in one column read as a solid band, as on a real digital scope.
- Periodic path. With two or more periods on screen, the Lab solves the exact steady state, samples a single period and reads every column from it, so 500 periods cost no more than one.
Peak detect, live
A series RLC (2 Ω, 1 mH, 10 nF; Q ≈ 160) rings at 50.3 kHz for milliseconds after every edge of a 200 Hz square wave. At 1 ms/div each column spans about 1.26 ring cycles. Left: one exact sample per column, which is what a scope without peak detect keeps. The ring aliases into a false 10 kHz ring that isn't there. Right: the Lab's peak detect, the ring's true decaying envelope. Both are computed in your browser now.
The input front end. Each channel can be AC-coupled (a 10 Hz high-pass: the input's series capacitor) and bandwidth-limited (a 20 MHz pole), as on a bench scope. Both are linear, so each engine filters exactly in its own terms: on the linear circuits the filters become extra states of the circuit and the matrix exponential steps them with it; on the in-amp each tone takes their gain and phase; on the power supply and the buck each filter's periodic steady state is solved in closed form over the solved period. Against SPICE with the filters as buffered R-C stages, a 10 Hz square through AC coupling peaks at 0.958576 V, which is 1/(1 + e−π), as the Lab does, and the buck's switch node through the 20 MHz pole rises 10–90 % in the same 17.71 ns to 0.02 ns.
The Real instrument. The Lab is ideal by default: perfect probes and an infinitely fast scope. The Instrument switch puts real ones on the circuit: a Tektronix P2220 passive probe at each node (its datasheet: 10 MΩ ∥ 17 pF at 10×, 1 MΩ ∥ 110 pF and 6 MHz at 1×), its ground lead (about 120 nH for the 6-inch clip lead, at Teledyne LeCroy's rule of thumb of 20 nH per inch, and 15 nH for the spring tip), 45 Ω of damping in the probe (the value in LeCroy's model of the effect: an illustration, not a datasheet figure), the generator's 50 Ω, and each front panel's own bandwidth as one pole. These are parts of the circuit, solved with it, so a probe really does load the node it touches. Against SPICE, the buck's switch node, which never leaves −0.4 to 12 V, shows 15.42 V through a 10× probe and its 6-inch lead (SPICE 15.41 V). The probe compensation circuit puts the same probe on the scope's 1 kHz calibrator with its trim (±5 pF, what matches it to scope inputs of 15 to 25 pF): at −4 pF a corner peaks at 5.10303 V, as SPICE and the closed form both say. Each channel can carry another real probe instead: a Tektronix TPP0500B (10 MΩ ∥ 3.9 pF, 500 MHz) or TAP1500 active probe (1 MΩ ∥ 1 pF, 1.5 GHz), or a custom one with your own probe's numbers; each is checked against SPICE on the buck's switch node to within 20 mV.
8How every engine is checked
Each engine has a check script that compares it with closed-form answers, and recorded runs of the lesson circuits in an independent, industry-standard SPICE simulator, driven in batch mode. The Lab engine was also audited by an independent agent with its own references (hand-derived equations, SciPy, brute force). Every finding was fixed or documented.
| Engine | Checked against | Measured agreement |
|---|---|---|
| Lesson 1 RC (MNA) | SPICE, 3 circuits | transient within 35 µV; Bode within 9×10⁻⁸ dB, 3×10⁻⁷° |
| Lesson 2 switching | SPICE, closed forms | unclamped kick peak 5239.82 V (browser 5239.72 V), diode release 19865.0 µs (browser 19864.97 µs), diode + zener release 2714.92 µs (browser 2714.86 µs) |
| Lesson 3 RLC | SPICE, closed form | steady-state V(C) within 0.12 mV of the closed form; first peak 1.464257 V (model 1.464258 V); |H(f0)| 6.47817 dB (Q = 2.1082 → 6.47817 dB); peak 6.72961 dB at 47.4137 kHz (model 6.72961 dB at 47.4138 kHz). |
| Lesson 4 phasors | SPICE, closed forms | |Z| within 0.001 %, ∠Z within 0.001°, transient phase within 0.01° |
| Lesson 6 op-amp | SPICE; closed forms | closed-loop −3 dB within 2e-7 of the exact two-pole closed form at gains 1–100; slew ramp, handover and tail within 2 µV of the exact piecewise solution; SPICE the gain-10 amp's −3 dB at 102.922 kHz, slew 0.497512 V/µs with a 10–90 % rise of 32.1667 µs, the 20 kHz sine's peak 5.94206 V: the browser's to 6 digits |
| Lesson 7 phase margin | SPICE; closed forms | loop gain within 1e-7 of the closed form, overshoot from the exact poles within 10⁻⁵ points of the transient's peak; SPICE at 1 nF crossover 918.68 kHz, phase margin 56.88°, gain margin 15.82 dB (10 pF / 10 nF / 100 nF: 72.21° / 21.85° / 6.84°); overshoot 10.9031 % with no R_iso and 5.0000 % at 86.97 Ω: the browser's to 5–6 digits |
| Lesson 10 channel | SPICE; 2-D field solve | six idealized circuits (lossless or constant-R lines), worst point 0.31 % of its swing (2.3 mV on the 0.75 V HCSL leg); largest error 8.6 mV (0.26 % of 3.3 V). Trace Z₀ and εeff within 0.5 % of the field solve. |
| Lesson 11 ground bounce | SPICE, closed forms | the die's ground within 5·10⁻⁴ of the closed form of a ramp into a series RLC, under-, critically and overdamped; N outputs as N branches against the reduced one within 10 nV; the quiet line against an RK4 solve of its own branch within the check's tolerance; SPICE: on one ground pin the die's ground peaks at 1.80784 V and the quiet line at 1.10985 V, the bounce 1.437 ns wide at half height; on two, 1.22882 V and 0.730488 V: the browser's to 5–6 digits |
| Lab corner sweeps | SPICE (.step) | every corner of an RC, an RLC and a ladder: extremes within 4 µV, midpoint crossings within 1.5e-6 of a period |
| Lab eye diagrams | SPICE; closed form | PRBS7 eyes: the RLC, the ladder and a jittered RC within 15 µV on height, all within 1e-5 of a bit on crossing jitter; the plain RC 0.24 mV off SPICE, where its closed form agrees with the Lab to 1e-9 V |
| Lesson 5 filter ladders | SPICE, closed forms, Matthaei's tables | Element values within 2e-4 of the published Butterworth, Chebyshev and Bessel tables; AC solve within 2e-8 of the pole product; step overshoot within 0.006 points of the published figures. SPICE: all four 4th-order ladders −3 dB at 10.000 kHz, attenuation at 20 and 100 kHz, phase at 1 kHz, step peak and 10/50/90 % times and 1 % settling the same as the browser to 6 digits (e.g. Butterworth peak 1.1083 V, t50 54.886 µs; Bessel 1.00835 V, 42.936 µs). |
| Lesson 8 sampling | SPICE, closed forms | the ladder's |H| against the Butterworth closed form to 10⁻⁸ for orders 1 to 8; the FFT's peak on the fold within 0.05 of a bin over seven zones; quantizer SNR within 0.3 dB of 6.02N + 1.76; the hold's droop on sinc(f/fs) to 2·10⁻⁴; SPICE: the 7-pole ladder −3.0103 dB at 2 kHz and −84.288399 dB at 8 kHz (browser the same to 7 digits); the sample-and-hold's 3 kHz alias 0.8584 V and 7 kHz image 0.3679 V (sinc 0.3 and 0.7: browser 0.858392 and 0.367885), its held samples the same to 6 digits |
| Lesson 13 buck | SPICE, closed forms | the ideal buck's Vout = D·Vin, ripple current and ΔQ/C to 2·10⁻⁵; the CCM/DCM boundary and the discontinuous Vout against their closed forms; volt-seconds balanced to 10⁻¹²; the LC filter to 10⁻⁹ dB; the home page's buck scene; SPICE: steady state 5.00018 V (the browser's 5.00000), inductor current 1.30298 / 0.69721 A (1.30305 / 0.69719); at 50 Ω, discontinuous, 7.22671 V (7.22656) and the diode's interval 0.27200 of the period (0.27199); the power-on overshoot 8.2382 V (8.2382) |
| Lesson 14 probing | SPICE, closed forms | the 6-inch lead's ring 103.12 MHz and peak 3.89505 V (browser the same to 6 digits), the spring tip's 10–90 % rise 3.5649 ns (browser 3.5648 ns), an active probe on a 1 GHz scope 0.75907 ns (browser 0.75903 ns) |
| Coax (home page) | Belden 8262 datasheet; SPICE LTRA and Laplace | attenuation within 3 % (1 MHz–1 GHz); LTRA within 1.5 mV |
| Lab engine | closed forms; SPICE; audit | 3.5×10⁻¹⁴ V vs closed forms; 20-state LC ladder within 12.8 µV of SPICE on a 0.5 V swing; peak detect within 2.3 µV of brute force at 2,000 columns |
A lesson from the checks: the reference SPICE quietly gives every inductor a 1 mΩ series resistance unless the netlist sets Rser=0. On the 20-section ladder that hidden resistance made the comparison read 73 µV, not 12.8 µV. Our newer decks set it explicitly. Six older decks (the home page's RLC and buck, lesson 4's three with inductors, lesson 10's via stub) don't yet. Lesson 4's 0.001 % |Z| margin against SPICE is that 1 mΩ, not the solver. They are being re-run. Lesson 14 turned up a second default: an inductor also gets a parallel resistance unless the netlist sets Rpar. On an active probe's ring it took 4.6 mV (0.1 %) off the peak; with Rpar=1e30, the reference SPICE agrees with the solver and with an independent Runge–Kutta run to six digits.
9Capabilities and limits
Scale is not a limit
The Lab engine has no built-in clock or timestep, only ratios, so a circuit and its timebase can be scaled together across any range. In the recorded run, the same RC captured at 6 timebases from 1 ps/div to 1000 s/div gave screens differing by exactly 0 V.
Twelve decades apart, live
Computed just now in your browser: largest difference between the two screens = 0 V (identical).
The live pair (1 ns and 1000 s per division) is a subset of the recorded run, which spans 1 ps to 1000 s per division.
Stiff circuits: the one place exactness thins
When a circuit has poles decades apart (say a 1 ns probe pole on a 1 s time constant) and the step is long, rebuilding the slow mode through many squarings loses digits. For the Lab's circuits and timebases so far, sample steps keep the fast pole times the step below about 10⁶, where the error is 1.9×10⁻¹¹ or less. Nothing yet enforces that bound: a 1 ns pole at 1 s/div would reach 10⁷. The steady-state solve uses a whole period as its step, so a 1 ns pole on a 1 Hz circuit (about 10⁹) can reach the 10⁻⁷ range: invisible on screen, but not exact. In the audit, a real circuit with poles 12 decades apart (1 ps and 1 s), stepped one period, measured 1.4×10⁻⁴ relative. The cure, a Schur-based exponential, is on our list.
Matrix-exponential error, computed in your browser
Table
| |fast pole| × step | relative error |
|---|---|
| 1e2 | 1.8e-15 |
| 1e4 | 8.3e-14 |
| 1e6 | 1.9e-11 |
| 1e8 | 9.7e-12 |
| 1e10 | 2.3e-7 |
| 1e12 | 7.4e-9 |
| 1e14 | 7.4e-9 |
A single 2×2 test series: e^(A·h) for a fast pole times the step (x) and a slow pole at 1, against its closed form. Real circuits can do worse than this test at large x: the audit's 12-decade circuit measured 1.4×10⁻⁴. The shaded band is where the Lab's sample steps fall so far.
Circuit size
Each exact sample costs a dense matrix–vector product, so cost grows with the square of the number of states (capacitors plus inductors). In the recorded run: 0.4 µs per sample at 10 states, 2.9 µs at 50 and 10 µs at 100. Up to about 50 states feels instant. Most textbook circuits have 1 to 20.
Run it on this device
| states | recorded | your device |
|---|---|---|
| 3 | 0.27 µs | — |
| 10 | 0.39 µs | — |
| 25 | 0.92 µs | — |
| 50 | 2.95 µs | — |
| 100 | 10.07 µs | — |
| 200 | 37.24 µs | — |
| circuit | recorded | your device |
|---|---|---|
| RC (1 state) | 3.0 ms | — |
| RLC (2 states) | 3.2 ms | — |
| 20-section RC ladder | 14.3 ms | — |
Browser engines differ less than devices do. On the recording machine, Chrome and Edge (both V8) ran the Lab page within about 7 % of each other (a recorded run). In JavaScriptCore, Safari's engine, the solver was 15 to 30 % faster than in V8 on most workloads, and 3 to 8 % slower on a 20-state ladder at slow timebases (node scripts/bench-jsc.mjs).
Where models stop describing hardware
- Lumped parts at high frequency. By the usual rule of thumb, R, L and C stop describing real wiring once its length nears a tenth of a wavelength. For board-scale wiring, a few centimeters, that is roughly 100 MHz to 1 GHz. It is a rule of thumb, not a measurement. Lesson 10's line engine covers that regime.
- Exactness needs linearity. Switches, diodes and amplifiers at their rails are exact only between state changes. Lesson 2 locates each change to one timestep; lesson 13 refines its diode's turn-off inside the step and restarts each state consistently; the Lab will locate changes exactly.
- Fitted materials. The coax and the 370HR laminate are fits to their datasheets. The laminate fit's worst misses are both at 1 GHz: Dk 4.088 against 4.17, and Df 0.0224 against 0.0161 (39 % high). Real boards vary with resin content and glass style.
- Assumed values are marked as such. Lesson 2's relay coil is Omron's G2RL 12 V coil [26]: 360 Ω and 400 mW at 12 V, and 2.47 H, its inductance with the armature closed, the value that matters at switch-off [27] (1.01 H with it open). Of its 100 pF switch node, the transistor is sourced: a 2N7000's output capacitance is 11 pF typical at 25 V [28], a 2N2222A's at most 8 pF at 10 V [29]. The other ≈ 90 pF, for wiring and the coil's own winding capacitance, is assumed. Lesson 5's filter ladders use ideal inductors and capacitors: no winding resistance, core loss or ESR, which would round off a real Chebyshev's ripple and ring. The op-amp in lessons 6 and 7 is representative, not a part: A₀ 100 dB, GBW 1 MHz and 0.5 V/µs are the general-purpose class (741, LM358, TL07x); its 50 Ω output resistance, its second pole at 3 MHz and its 30 pF compensation capacitor are assumed. Lesson 11's driver is a TI SN74LVC244A[30]: its 22.9 Ω on-resistance from VOL (0.55 V max at 24 mA), and the 0.8 V / 2 V input thresholds. Its 5.00 nH per pin is the SOIC-20 package's, from TI's IBIS model of the part (5.01 nH typical) [31]; that model's output edge (1.70 ns 20–80 % typical, 1.02 ns fast) puts the bench's 1.00 ns at the part's fast corner and past it. The pins are uncoupled (the IBIS file gives no mutual inductance), and the 50.0 pF loads are assumed. Lesson 12's latch is illustrative, not a process: square-law (SPICE level-1) transistors with k 2.00 mA/V² and VT ±0.35 V, 20.0 fF on each node and 1.2 V, chosen so τ = C/gm = 20.0 ps, a figure from older processes (around 180 nm; Weste and Harris extract 54 ps from a 1.8 V latch [32]); modern flops resolve in a few ps, so its MTBFs (1.3×10¹⁶ years for its two-flop synchronizer) belong to that τ. With no channel-length modulation (λ = 0) each inverter's gain at the balance point is infinite. Its pass devices are linear conductances fading with the clock, not transmission gates; that keeps the deck portable to SPICE and changes nothing once the clock has closed them. Thermal noise is stated, not simulated: offsets closer than the one whose head start equals √(kT/C) are decided by noise. Lesson 13's inductor is a Coilcraft XAL5050-103: 10.0 µH with a 41.0 mΩ winding (40.9 mΩ typical, 45 mΩ max) [33]. The buck's 50.0 mΩ switches, a Schottky as 0.30 V + 50.0 mΩ and the capacitor's 5.00 mΩ ESR are representative, assumed; switching losses are not modeled.
- The display. Beyond the 12-samples-per-cycle ring floor, peak detect splits an interval at most 16 more times (1/65,536 of it). A feature narrower than that, such as a picosecond glitch at seconds per division, can be missed, as a real scope's sample rate would miss it.
10Read the source, run the checks
The engines are a few hundred lines each, with no numerical dependencies:
- src/lib/livewaves/mna.ts — nodal analysis, transient and AC
- src/lib/livewaves/tline.ts, channel.ts, pcb.ts — lines, coax and PCB traces
- src/lib/bench/ss.ts, linalg.ts, acquire.ts — the Lab engine and scope
Each has a check script, run with node scripts/<name>-check.mjs: livewaves, rl, rlc, impedance, edges, bounce, opamp, hero and bench. The SPICE decks and their comparison scripts are in scripts/livewaves-ltspice/. This page's recorded figures come from scripts/how-it-works-figures.mjs, last run 2026-10-05 on Apple M2 Pro, darwin 25.3.0, Node 26.8.2.
11References
- [1]MDN Web Docs, “Web Workers API.” developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API
- [2]MDN Web Docs, “Transferable objects.” developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Transferable_objects
- [3]MDN Web Docs, “CanvasRenderingContext2D.” developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
- [4]MDN Web Docs, “Window: requestAnimationFrame() method.” developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame
- [5]MDN Web Docs, “Window: devicePixelRatio property.” developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
- [6]C.-W. Ho, A. E. Ruehli, and P. A. Brennan, “The modified nodal approach to network analysis,” IEEE Transactions on Circuits and Systems, vol. 22, no. 6, pp. 504–509, June 1975. doi:10.1109/TCS.1975.1084079
- [7]L. W. Nagel, “SPICE2: A Computer Program to Simulate Semiconductor Circuits,” Memorandum No. UCB/ERL M520, Electronics Research Laboratory, University of California, Berkeley, May 1975. www2.eecs.berkeley.edu/Pubs/TechRpts/1975/9602.html
- [8]A. R. Djordjević, R. M. Biljić, V. D. Likar-Smiljanić, and T. K. Sarkar, “Wideband frequency-domain characterization of FR-4 and time-domain causality,” IEEE Transactions on Electromagnetic Compatibility, vol. 43, no. 4, pp. 662–667, Nov. 2001. doi:10.1109/15.974647
- [9]Belden Inc., “Product 8262: Mil-Spec Coax, 50 Ohm, RG-58, 20 AWG Str TC, 95% TC Braid, PVC Jkt,” technical data sheet, rev. 0.531, 20 Feb. 2026. catalog.belden.com/techdata/EN/8262_techdata.pdf
- [10]E. Hammerstad and Ø. Jensen, “Accurate models for microstrip computer-aided design,” in 1980 IEEE MTT-S International Microwave Symposium Digest, Washington, DC, May 1980, pp. 407–409. doi:10.1109/MWSYM.1980.1124303
- [11]H. A. Wheeler, “Transmission-line properties of a strip line between parallel planes,” IEEE Transactions on Microwave Theory and Techniques, vol. 26, no. 11, pp. 866–876, Nov. 1978. doi:10.1109/TMTT.1978.1129505
- [12]Isola Group, “370HR Industry Leading, Standard Loss, Thermally Robust Epoxy Laminate and Prepreg,” data sheet, Revision C, last updated 15 Apr. 2021. www.isola-group.com/wp-content/uploads/data-sheets/370hr.pdf
- [13]H. A. Wheeler, “Formulas for the skin effect,” Proceedings of the IRE, vol. 30, no. 9, pp. 412–424, Sept. 1942. doi:10.1109/JRPROC.1942.232015
- [14]Y. Shlepnev and C. Nwachukwu, “Roughness characterization for interconnect analysis,” in Proc. 2011 IEEE International Symposium on Electromagnetic Compatibility, Long Beach, CA, Aug. 2011, pp. 518–523. doi:10.1109/ISEMC.2011.6038367
- [15]U.S. Patent 8,431,222, “Circuit materials with improved bond, method of manufacture thereof, and articles formed therefrom,” detailed description (copper foil roughness: Rz and WYCO Rq ranges by foil type). image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/8431222
- [16]C. F. Van Loan, “Computing integrals involving the matrix exponential,” IEEE Transactions on Automatic Control, vol. 23, no. 3, pp. 395–404, June 1978. doi:10.1109/TAC.1978.1101743
- [17]R. E. Bank, W. M. Coughran, W. Fichtner, E. H. Grosse, D. J. Rose and R. K. Smith, “Transient simulation of silicon devices and circuits,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 4, no. 4, pp. 436–451, October 1985. doi:10.1109/TCAD.1985.1270142
- [18]N. J. Higham, “The scaling and squaring method for the matrix exponential revisited,” SIAM Journal on Matrix Analysis and Applications, vol. 26, no. 4, pp. 1179–1193, 2005. doi:10.1137/04061101X
- [19]A. H. Al-Mohy and N. J. Higham, “A new scaling and squaring algorithm for the matrix exponential,” SIAM Journal on Matrix Analysis and Applications, vol. 31, no. 3, pp. 970–989, 2009. doi:10.1137/09074721X
- [20]C. Moler and C. Van Loan, “Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later,” SIAM Review, vol. 45, no. 1, pp. 3–49, 2003. doi:10.1137/S00361445024180
- [21]J. G. F. Francis, “The QR transformation: A unitary analogue to the LR transformation—Part 1,” The Computer Journal, vol. 4, no. 3, pp. 265–271, 1961. doi:10.1093/comjnl/4.3.265
- [22]J. G. F. Francis, “The QR transformation—Part 2,” The Computer Journal, vol. 4, no. 4, pp. 332–345, 1962. doi:10.1093/comjnl/4.4.332
- [23]W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes: The Art of Scientific Computing, 3rd ed. Cambridge, U.K.: Cambridge University Press, 2007, §11.6 “Real Nonsymmetric Matrices” and §11.7 “The QR Algorithm for Real Hessenberg Matrices.” ISBN 978-0-521-88068-8. numerical.recipes/book.html
- [24]W. H. Press et al., “Implementations in Unsymmeig,” Numerical Recipes Webnote No. 17, Rev. 1. numerical.recipes/webnotes/nr3web17.pdf
- [25]C. B. Moler, Numerical Computing with MATLAB. Philadelphia, PA: SIAM, 2004, ch. 3 “Interpolation,” §3.3 “Piecewise Cubic Hermite Interpolation,” pp. 93–116. doi:10.1137/1.9780898717952.ch3
- [26]Omron, “G2RL PCB Power Relay,” data sheet, Coil Ratings table (12 VDC: 33.3 mA, 360 Ω, coil inductance 1.01 H armature OFF / 2.47 H armature ON, ≈ 400 mW). Mirror of Omron's sheet. pccomponents.com/datasheets/OMRO-G2RL.PDF
- [27]TE Connectivity, “Determining Relay Coil Inductance,” application note. www.te.com/en/products/relays-and-contactors/relays/intersection/determining-relay-coil-inductance.html
- [28]onsemi, “2N7000, 2N7002, NDS7002A: N-Channel Enhancement Mode Field Effect Transistor,” data sheet, Rev. 11, Mar. 2025, Electrical Characteristics (C_oss). www.onsemi.com/download/data-sheet/pdf/2n7000-d.pdf
- [29]onsemi, “P2N2222A: Amplifier Transistors, NPN Silicon,” data sheet, Small-Signal Characteristics (C_obo). www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf
- [30]Texas Instruments, “SN74LVC244A Octal Buffer or Driver With 3-State Outputs,” data sheet SCAS414AG, rev. June 2026: Features (typical V_OLP ground bounce < 0.8 V at V_CC 3.3 V), Recommended Operating Conditions (V_IL, V_IH), Electrical Characteristics (V_OL 0.55 V max at I_OL 24 mA, V_CC 3 V). www.ti.com/lit/ds/symlink/sn74lvc244a.pdf
- [31]Texas Instruments, IBIS model of the SN74LVC244A (sn74lvc244a.ibs, file rev. 1.4, Nov. 2007): [Package] L_pkg per package (SOIC-20 DW 5.012 nH typ, 4.110–6.349; TSSOP-20 PW 2.802 nH), and the 3.3 V output model's [Ramp] dV/dt_f 1.60 V / 1.70 ns typ (1.90 V / 1.02 ns fast) into 50 Ω. www.ti.com/lit/ibs/SCAM008
- [32]N. H. E. Weste and D. Harris, CMOS VLSI Design: A Circuits and Systems Perspective, 3rd ed., Pearson Addison-Wesley, 2005, §7.6.1 “Metastability,” pp. 454–457: τ_s = RC/(G − 1) (eq. 7.27), P(t_DQ > t′) = (T_0/T_c)·e^(−t′/τ_s) for t′ > h (eq. 7.29), and a worked example extracting τ_s = 54 ps, T_0 = 21 ps from a 1.8 V latch.
- [33]Coilcraft, “XAL50xx Shielded Power Inductors,” data sheet, Document 908-1, revised 02/26/26: XAL5050-103ME, 10 µH, DCR 40.90 mΩ typ / 45.00 mΩ max (measured on a micro-ohmmeter). www.coilcraft.com/pdfs/xal50xx.pdf