Concept

Trapezoidal rule — where it appears

Advancing a differential equation by averaging the derivative at the two ends of each step, so that the error falls with the square of the step. That square is verified by halving the step and fitting the exponent, not by quoting the rule's order.

Named by 12 essays across 4 fields — each of them below, with the objects they name alongside it.

One step response, computed twice: from the poles, and by walking the network forward. A damping ratio of 0.22, so the overshoot is 49.2%. The two curves are drawn on top of each other; the panel below is the difference between them, which is the trapezoidal rule's error at 500 steps and reaches 1.70e-3 V.

One step, computed twice

A step response from the poles is exact. The same step walked forward in time is not, and the difference between them is the trapezoidal rule's own error rather than anything about the circuit. It falls by a factor of four every time the step is halved, which is a claim about a method and can be watched.

transients · Step response
Started from a millivolt at a gain of 3.20. The output grows by 1.8804 a cycle — the factor the poles give — and then stops, at 858 mV of amplitude and 1.58 kHz. The lower panel is the envelope on a logarithmic axis, where the linear model's prediction is the straight line that keeps going. What ends it is the diode pair across the feedback resistor, and no direct-current analysis of this circuit returns that number.

The amplitude nothing linear predicts

A linear model's poles say the envelope grows by 1.88 a cycle and never say when it stops. Two diodes across the feedback resistor stop it, at 858 millivolts — a number no pole, no transfer function and no bias point contains. Getting it needs a netlist with a nonlinearity in it, marched forward in time, and that pairing is what the whole field is built on.

applied · Oscillator
What a charge through 1 kΩ costs, against how long it is given. computed by solving, not by drawing, marched, with the energies rebuilt from the element laws. A step loses 1.00000 of ½CV² — 12.5 µJ here — and that number is the same through 10 Ω and through 100 kΩ, which is what the faint curves show. What the resistance decides is where the fall starts: the loss goes as 2τ/T once the ramp is long against τ = 1 ms, with a fitted exponent of -0.994 and no floor beneath it. The circles are marched; the line through them is a closed form that never sees a netlist.

The half that never arrives

Charging a capacitor from a step loses exactly as much energy as it stores, and the resistance it is lost in does not appear in the answer — the same 12.5 microjoules through ten ohms and through a hundred kilohms, to nine figures. Drive the same network with a ramp instead and the loss falls as two time constants over the ramp, with no floor beneath it at all.

transients · Switching energy
A step on a series RLC at ζ = 0.079, and the two numbers read off H(s). computed by solving, not by drawing. A 50.3 kHz series RLC driven by a one-volt step, with the capacitor voltage and the inductor voltage drawn together. Two limits of the transfer function are two points of the waveform and neither needs the waveform: H(0) = 1.000000 is where the capacitor ends up, and H(∞) across the inductor is 1.0000, which is what it does at the first instant — the expansion gives 1.000000 for it at t = 0. Here the damping ratio is 0.0791, the response is inside ±2% after 7.6 cycles, and 100.0% of the last twenty-four cycles sit there. The poles are at a real part of -7.91e-2 of ω₀, which is the condition the final-value theorem actually has — not a property of H but of where sY(s) has its poles.

Two numbers without solving for the waveform

Where a step response starts and where it ends are two limits of the transfer function, and neither needs the waveform. Both are exact here — 1.000000000 volts at the end and the whole step at the first instant — and one of them is a lie waiting to happen: take the damping to zero and the final-value theorem still returns 1.000000 for a response that swings between 0 and 2 for ever. Its condition is not on the transfer function but on where the poles are, and the practical condition is narrower still: at five ohms the poles are safely in the left half-plane and sixty cycles is not enough time.

transients · Value theorems
The ripple 1000 µF leaves, through the regulator: 60.62 mV rather than 21.11 mV. One settled cycle of the reservoir's output — 1.331 V peak to peak across 1000 µF — split into 1000 Fourier lines, each passed through the solved regulator's rail-to-output response, and summed. The output is 60.62 mV peak to peak. The ripple times the rejection at 100 Hz, -36.00 dB, gives 21.11 mV, which is 2.872 times too little: the rejection worsens at twenty decibels a decade, so each harmonic of the sawtooth arrives at nearly the size of the first. The 100 Hz line carries 23.4% of the output's mean square and the lines above 1 kHz 10.4%; the first three arrive at 7.731 mV at 100 Hz, 7.200 mV at 200 Hz, 6.388 mV at 300 Hz. The dashed curve is the 100 Hz line alone.

The ripple that arrives as a comb

The rejection essay multiplied two numbers: 1.331 volts of reservoir ripple and the regulator's 36.0 decibels of rejection at a hundred hertz, for 21 millivolts at the output. The ripple is a sawtooth, a comb of lines at every multiple of a hundred hertz, and the rejection worsens at twenty decibels a decade — so the second line arrives at nearly the size of the first, and the third too. Summed with their phases, the output is 60.62 millivolts, 2.87 times the estimate, and the hundred-hertz line carries only 23.4 per cent of it. A reservoir twenty-one times larger cuts the rail's ripple 14.8 times and the regulated ripple 5.95.

applied · Regulator
Switched on at 0.95× resonance, a Q 50 capacitor reaches 1.550 times its settled voltage. computed by solving, not by drawing. The capacitor voltage of the series circuit, switched on from rest at the crest of the drive, drawn as the tip of its arrow in the frame that turns with the drive, so that the settled state is a fixed point — the arrow from the centre, 10.067 V long, with the circle of that radius around the centre. The path is the settled arrow plus a second one turning at the circuit's own frequency and shrinking, drawn until the second is a hundredth of its first length. The voltage reaches 15.603 V in cycle 9, 1.5499 times the settled amplitude, and the tip's farthest point is 1.5499 times it. The approximation 1 + exp(−π/2Q|δ|) gives 1.5335. Marched in time by the trapezoidal rule, the network agrees with the exact solution to 1.2e-3 of the settled amplitude over its first 11 cycles.

The arrow that goes past where it settles

A phasor is where a driven resonator ends up, and counting the cycles it takes to get there says nothing about the path. Switched on from rest a little away from resonance, the capacitor's arrow circles its settled tip instead of approaching it: a Q of 50 driven at 0.8 of resonance reaches 1.854 times its settled voltage, and a Q of 200 at 1.25 switched on through zero reaches 2.182. At resonance exactly, where the settled voltage is largest, the arrow never passes its mark. So a resonance read by the largest voltage after switch-on is 1.20 times wider than its phasor says.

frequency · Phasors
Stepped at 20 of its time constant, a 1 µs pole rings between 1.818 and 0.331 V, and needs 23 steps to settle. Marched with the trapezoidal rule at a step of 20.0 µs. A 1 µs pole (1 kΩ, 1 nF) drives, through a unity buffer, a 1 ms pole (1 kΩ, 1 µF). The fast node's exact response reaches its final volt within a few microseconds; the march's first values are 1.8182, 0.3306, 1.5477, 0.5519, 1.3666 V. Its distance from its final volt is multiplied by (1 − h/2τ)/(1 + h/2τ) = −0.8182 every step, measured and checked against that form, so it changes sign every step and takes 23 steps to fall below 1% — 460 µs. The slow node it drives is 1.23e-5 V from exact at 1 ms, because a 1 ms pole averages an alternation at half the stepping rate to nothing.

The ringing that belongs to the rule

The trapezoidal rule is stable for every stable circuit and every step size, and it is not damping. March a one-microsecond pole with twenty-microsecond steps and its node reads 1.818, 0.331, 1.548, 0.552 volts — an oscillation at half the stepping rate, its distance from the final volt multiplied by exactly −0.8182 every step, taking twenty-three steps to fall below one per cent. The slow node that pole drives is right to 1.2 × 10⁻⁵ V at a millisecond. One backward-Euler step at the discontinuity cuts the first swing from 0.818 V to 0.048 and two to 0.0023, because backward Euler multiplies the same error by 1/(1 + h/τ) and the trapezoidal rule by (1 − h/2τ)/(1 + h/2τ), which approaches −1.

transients · Step response
At 20 steps a cycle, ten cycles of an undamped LC: the trapezoidal rule keeps the amplitude and falls 29.2° behind; backward Euler keeps 0.0082% of it. Marched, both rules, against 1 − cos ωt for a 1 kHz inductor–capacitor pair stepped with no resistance at all. At 20 steps a cycle the trapezoidal march's amplitude stays at 1.00000 a cycle and its frequency is slow: it loses 2.918° a cycle, measured from the march's own recurrence, against 2π − 2N·atan(π/N) = 2.918°, so after ten cycles it is 29.2° behind. Backward Euler keeps 0.3901 of its amplitude a cycle, against (1 + (2π/N)²)^(−N/2) = 0.3901, so 0.0082% is left after ten, and it loses 11.19° a cycle. No resistance is in the circuit; every loss is the rule's.

The phase the rule loses

An inductor and a capacitor with no resistance ring for ever, and two ways of marching them disagree about how. The trapezoidal rule keeps the amplitude exactly — its factor per step has a magnitude of one — and loses phase instead: 2π − 2N·atan(π/N) a cycle, 2.918° at twenty steps a cycle, so ten cycles later it is 29.2° behind the circuit. Backward Euler keeps 0.3901 of the amplitude a cycle at the same step, and after ten cycles 0.0082 per cent of the ringing is left, in a circuit that has no loss. The two errors fall at different rates: the trapezoidal rule's phase as the square of the steps a cycle, backward Euler's amplitude as the first power. A hundred cycles to within one per cent needs 182 steps a cycle of one and 196,404 of the other.

transients · Step response
BDF2 loses amplitude as N⁻³ and phase as N⁻², four times the trapezoidal rule's: a hundred cycles to 1% needs 363 steps a cycle, against 182 and 196,404. Each rule's error a cycle on an undamped inductor–capacitor pair, against the steps a cycle, measured from BDF2 marches and drawn with the trapezoidal rule's and backward Euler's closed forms. BDF2 loses amplitude a cycle as the −2.91 power of N and phase as the −1.95 power, its phase loss 3.988 times the trapezoidal rule's at 128 steps a cycle. To keep 99% of the amplitude over a hundred cycles it needs 157 steps a cycle, and to stay within 1% of a cycle in phase 363; the trapezoidal rule needs 182 for the phase and loses no amplitude, and backward Euler needs 196,404 for the amplitude.

The rule between the two

The trapezoidal rule keeps an undamped ringing's amplitude and loses its phase, and it preserves a stiff pole's error with its sign alternating. Backward Euler damps the stiff error at once and damps the ringing too, keeping 0.0082 per cent after ten cycles at twenty steps a cycle. The second-order backward difference sits between them in a precise sense. It damps the stiff error by 1/√(3 + 2h/τ), 0.152 a step at twenty time constants, and settles in three steps where the trapezoidal rule needs twenty-three. It loses a ringing's amplitude only as the cube of the steps a cycle, and its phase as the square with a constant four times the trapezoidal rule's. A hundred cycles to one per cent costs 363 steps a cycle, against 182 and 196,404.

transients · Step response
At 20 steps a cycle backward Euler cannot show a quality factor above 3.27 and BDF2 none above 77.9; the trapezoidal rule shows every Q, 1.6% high. computed by solving, not by drawing: a series resistor–inductor–capacitor resonance at 1 kHz, its quality factor set by the resistor, marched at 20 steps per undamped cycle with each rule; the quality factor the march shows — its decay per radian of its own ringing — against the circuit's, from 1 to 500. Lines are each rule's factor per step in closed form; dots are marched and measured from the record at Q = 3, 30, 300, agreeing to 0.3%. Backward Euler's shown Q flattens at 3.272 and BDF2's at 77.9, whatever the circuit's; the trapezoidal rule's sits 1.64% above the diagonal at every Q. Q 3: trapezoidal 3.05, BDF2 3.06, backward Euler 1.62; Q 30: trapezoidal 30.5, BDF2 22.5, backward Euler 2.97; Q 300: trapezoidal 305, BDF2 62.6, backward Euler 3.24.

The Q a rule can show

A resonance marched forward in time decays at the circuit's rate plus whatever the marching rule adds, and the rule's share has a ceiling built into it. At twenty steps a cycle backward Euler cannot show a quality factor above 3.27 and BDF2 none above 77.9, whatever resistor the circuit has; the ceilings rise as N/2π and N³/4π³. The trapezoidal rule has no ceiling at all — it shows every Q 1.64 per cent high at twenty steps a cycle, a ratio fixed by the step alone. So the steps a cycle needed to read a resonance's Q to one per cent are about 26 for the trapezoidal rule at any Q, 99 for BDF2 at Q = 100 and 62,202 for backward Euler. Marched at Q = 50, the circuit has 0.533 V of ringing left after ten cycles, the trapezoidal rule 0.536 and BDF2 0.346.

transients · Step response
A 1 kHz tone burst through a band-pass of Q = 10, centred on its resonance. computed by solving, not by drawing, marched twice — sine and cosine carriers — so the output's envelope is the modulus of the two, exactly. The input envelope (pale) peaks at 240 ms; the output's (dark) at 243.171 ms, 3.171 ms late. The group delay at resonance is 2Q/ω₀ = 3.183 ms. The phase there is zero, so the carrier itself is not delayed at all.

The envelope that leaves early

A band-pass's group delay at its centre is the delay of an envelope, not of a carrier. Marched twice — on a sine and a cosine carrier, so the envelope is their modulus exactly — a 1 kHz burst through a band-pass of Q = 10 comes out 3.171 ms late against 2Q/ω₀ = 3.183, while the carrier's zero crossings come out within 6.4 µs of where they went in. Through a notch, whose group delay at its centre is −3.810 ms, the envelope peaks 3.746 ms before the input's. Neither is a paradox, and both hold only for bursts long against the inverse bandwidth: 60.6 per cent wrong at 0.6 of it, 0.7 per cent at 20.

filters · Group delay
The droop of the ceramic regulator against the rise time of a 100 mA load, with the capacitor at full value, half and a fifth. computed by solving, not by drawing, marched from the operating point: 10 µF, 5 mΩ of series resistance, 630 pF across the upper divider resistor, the 100 mA arriving as a straight ramp. A step droops 103 mV at 100%, 137 mV at 50%, 203 mV at 20% of the capacitance. A ramp of a millisecond droops 2.98 mV, 2.56 mV, 2.56 mV, and the slowest ramps approach the loop's inductance, 25.2 µH, times the ramp's rate (dashed) — a quantity with no capacitance in it — times 1.18, 1.03, 1.03, the share the loop's ringing adds. The full-value and fifth-value curves cross at 23 µs; slower than that, the larger capacitor droops more.

The load that rises slower than the loop

Every droop a regulator is sized against is a load step with an infinitely fast edge, and a ceramic regulator droops 103 millivolts on its full 10 µF and 203 on a fifth of it. Give the same 100 mA a rise time and the ordering does not survive: past 23 microseconds the full capacitor droops more than the fifth, and a slow ramp's droop is the loop's own 25.2 µH times the load's rate of change — a number with no capacitance in it, raised 18 per cent on the full capacitor by the impedance peak its slower loop leaves. For a 10 mV budget the load must take 298 µs to arrive on the full capacitor and 253 on the fifth.

applied · Regulator

Named alongside it

The objects these essays reach for when they reach for this one.

MarchingNumerical errorConvergence orderModel rangeQuality factorResiduesStep responseCompanion modelDesign tradeoffIntegrationLoop gainLossless network

All concepts