Networks, and how a solve is checked

The derivative of a root

The rung below turns one transposed solve into the derivative of a response with respect to every element, and found a doubly terminated ladder stationary at its ripple peaks to a part in ten to the eighth. A pole is a different object — a value of s at which the matrix loses rank — and its derivative comes from two null vectors and a division. Pointed at the same two realisations, the ladder's advantage is a factor of 2.17, not eight orders of magnitude: what is stationary is the magnitude at one frequency, and it says nothing about where the poles are.

Assumes: Every derivative, and the one that is zero · Where the behaviour is written down

The rung below this one differentiates a response. Transposing the nodal matrix and solving it once more gives dvout/dpdv_{\text{out}}/dp for every element in the netlist at once, exactly, and pointed at a doubly terminated ladder at a passband ripple peak it returns two parts in ten to the tenth for every reactive element, against 0.72 for the cascade realising the same response. That is the stationarity a ladder is built for, measured rather than argued.

A pole is not a response. It is a value of s at which the matrix loses rank — a property of the network with its sources removed — and no amount of differentiating an output at a fixed frequency produces it. This essay computes the other derivative and points it at the same comparison, and the answer is that the two quantities disagree by seven orders of magnitude.

Two null vectors and a division

At a simple pole the matrix has a one-dimensional null space on each side: M(sp)u=0M(s_p)u = 0 and vTM(sp)=0v^{\mathsf{T}}M(s_p) = 0. Differentiating vTM(s,p)u=0v^{\mathsf{T}}M(s, p)u = 0 along the root gives

dspdp=vT(M/p)uvT(M/s)u\frac{ds_p}{dp} = -\frac{v^{\mathsf{T}}(\partial M/\partial p)\,u}{v^{\mathsf{T}}(\partial M/\partial s)\,u}

and both quadratic forms are cheap for the reason the whole site rests on: the matrix is affine in s, so ∂M/∂s is the constant matrix the reactive elements stamp into and is already assembled, and ∂M/∂p is a rank-one or rank-two stamp that evaluates as a product of two node-voltage differences.

There is no step size anywhere in it and no approximation. What there is instead is a condition: the formula is for a simple root, and it divides by a quantity that goes to zero when two poles collide — a boundary of the method rather than of the circuit, and one this collection is obliged to say out loud rather than let a caller discover.

The quadratic form itself is the same one the rung below computes. adjointSensitivity negates it and gets a response derivative with the adjoint solution in place of v; this divides it by the same form in ∂M/∂s and gets a pole derivative with the null vectors in place of both. They were two copies of one switch statement until the second was written, and are now one.

A network solved, and checked: a bridge, which no series-parallel reduction reaches. Node potentials from modified nodal analysis. The branch currents are then recomputed from each element's own law and summed at every node; the residual is 2.7e-16 of the largest current in the circuit, which is floating-point rounding and nothing else.
Fig. 1 The matrix everything here differentiates, and the two independent checks every solve of it passes before it is returned.

Three directions, and one of them is exactly zero

Where one pole goes when each component is 5% high. computed by solving, not by drawing. A series R–L–C, its poles recovered by rooting the determinant, and the derivative of the upper one with respect to each element taken exactly from the two null vectors at the pole. The dashed lines are the first-order prediction for a 5 per cent change; the filled circles are where the root actually goes when the element is changed and the determinant re-rooted. The three directions are the argument: the resistance moves the pole along a circle of constant radius, because the natural frequency does not contain it — its normalised sensitivity has a real part of 3.1e-16. The inductance and the capacitance each carry exactly −½ of the radius, and imaginary parts that are exact negatives. At 5 per cent the prediction is out by 0.122 per cent of the pole's own magnitude.
Fig. 2 A series R–L–C with its poles recovered by rooting the determinant. The dashed lines are the exact first-order prediction for a five per cent change in each element; the filled circles are where the root actually goes.

For a series R–L–C at 15.9 kHz and a quality factor of one, the normalised sensitivities come out as

element S=(p/sp)dsp/dpS = (p/s_p)\,ds_p/dp
R 0.000 + 0.577j
L −0.500 − 0.289j
C −0.500 + 0.289j

and every one of those numbers is a statement rather than a figure.

The resistance has a real part of exactly zero — 3.1×10⁻¹⁶ in double arithmetic. It moves the pole along a circle of constant radius and does not move the radius at all, which is 1/√(LC) not containing R, arriving from a null vector rather than from algebra.

The inductance and the capacitance carry exactly −½ each, which is the same expression differentiated, and their imaginary parts are exact negatives: they move the damping in opposite directions by equal amounts. Together those three lines say that a resonance’s frequency and its bandwidth are decided by different components, which that essay established by measuring both and this one gets as a property of one matrix.

The check is re-rooting. Perturb an element, recover the poles again, and compare the movement with the prediction: the two agree to six or seven digits at a perturbation of a part in ten million, which is the accuracy the rooting itself has and not the accuracy of the derivative.

Two poles at ζ = 0.3, recovered from the matrix. The poles are at -477.5 ± j1518 hertz. Their distance from the origin is the natural frequency to six digits; the cosine of their angle from the negative real axis is the damping ratio. The step response beside them follows.
Fig. 3 The object being differentiated, from the transients field: two poles recovered by rooting the determinant, with the natural frequency their distance from the origin and the damping the cosine of their angle.

The rooting was returning its own starting circle

That check could not have been made a week ago, and the reason is worth the paragraph.

polyRoots recovers all the roots at once by Durand–Kerner, starting its iterates on a circle of Cauchy’s bound — 1 + max|aₖ/aₙ|. That bound is correct and it is enormous whenever the coefficients are ill-scaled in magnitude, which for a nodal determinant means always: a filter’s coefficients carry a factor of ωc per degree, so a fifth-order 10 kHz ladder has a₀/a₅ = 1.3×10²³ and the iterates start eighteen decades outside the roots.

Six hundred iterations do not get them back. What came out was five points evenly spaced on a circle of radius 5×10⁹ — the starting configuration barely disturbed — returned with no complaint. A seventh-order Chebyshev at 1 kHz came back at 7×10¹¹ radians per second. A fourth-order active cascade came back with two poles in the right half plane, which is an unstable low-pass filter and is not a thing.

The fix is a change of variable: root in z = s/radius rather than in s, so that a polynomial whose roots are near the radius has coefficients of order one and Cauchy’s bound comes back to single figures. It is exact — aₖ ↦ aₖ·radiusᵏ, roots ↦ z·radius — so it changes no converged answer, and with radius = 1 it leaves the arithmetic bit-for-bit as it was.

Nothing shipped had depended on it, which is why it survived. Every figure on this site that uses a recovered pole uses a second- or third-order network, where the old code converged; the sweep of all 155 generators before and after the change moved one label, from −477.4 to −477.5 hertz, and the new value is the accurate one. The defect was waiting for the first figure to ask for the poles of a filter above order three, and this is that figure.

That is the second time this collection has found a fault of that shape — the polynomial trim that had been dropping an order from every recovered response was the first — and both have the same structure: machinery that is correct on everything it has been asked and wrong on the first thing outside that range, with no complaint at the boundary.

Where one pole goes when each component is 20% high. computed by solving, not by drawing. A series R–L–C, its poles recovered by rooting the determinant, and the derivative of the upper one with respect to each element taken exactly from the two null vectors at the pole. The dashed lines are the first-order prediction for a 20 per cent change; the filled circles are where the root actually goes when the element is changed and the determinant re-rooted. The three directions are the argument: the resistance moves the pole along a circle of constant radius, because the natural frequency does not contain it — its normalised sensitivity has a real part of 3.1e-16. The inductance and the capacitance each carry exactly −½ of the radius, and imaginary parts that are exact negatives. At 20 per cent the prediction is out by 1.713 per cent of the pole's own magnitude.
Fig. 4 Four times the change, where the prediction and the moved root have visibly parted company and the tangent is answering a question about an infinitesimal.

The ladder’s poles are not eight orders better

Now the comparison the rung below invites.

Pole sensitivity, one 5th-order response realised two ways. computed by solving, not by drawing. The same Chebyshev response built as a doubly terminated ladder and as a cascade of active sections, with every complex pole pair's sensitivity to every element computed exactly and summed in quadrature. The ladder is better and it is better by 2.17 times — not by the eight orders of magnitude the rung below measured for the same ladder's magnitude response at its ripple peaks. The stationarity that argument rests on is a property of |H| at particular frequencies, and it says nothing about where the poles are: a ladder whose poles have moved has a response that is stationary about a different curve. The left bars are the ladder, the right the cascade.
Fig. 5 The same fifth-order Chebyshev response realised as a doubly terminated ladder and as a cascade of active sections, with every complex pole pair’s sensitivity to every element summed in quadrature.

The ladder is better. It is better by 2.17 times.

Not by the eight orders of magnitude the rung below measured for the same ladder’s magnitude response at its ripple peaks, and not by the fifty-four times the tolerance essay measured for the same comparison at one per cent. By a factor of two.

The two claims are not in conflict, and the difference between them is the content of this rung. Stationarity is a property of |H| at particular frequencies. A doubly terminated ladder at maximum power transfer has nowhere to go — the response is at a maximum, so its first derivative with respect to anything vanishes — and that is true whatever the poles do. A ladder whose poles have moved has a response that is stationary about a different curve, and the argument gives no reason for the new curve to be near the old one.

What the ladder’s poles have going for them is the ordinary thing: a passive network’s element values each affect several poles a little rather than one pole a lot, so the derivatives are spread out. A cascade’s are not — each section realises exactly one pole pair and its components move that pair and nothing else — and the ratio between those two situations is a small number, which 2.17 is.

The practical consequence is a boundary on the ladder’s own selling point. If the specification is written on the passband ripple, the stationarity argument applies and the advantage is enormous. If it is written on the pole positions — a group delay, a settling time, an overshoot, anything about the transient — the advantage is a factor of two and the components have to be that much better.

What a pole sensitivity says about a quality factor

The number a designer usually wants is not where the pole went but what happened to its quality factor, and that follows from the same derivative with one more line.

A pole at σ + jω has Q = |s|/(2|σ|), so a movement ds splits into a radial part, which moves the resonant frequency, and a tangential part, which moves Q. The three sensitivities above separate cleanly along exactly those axes for the series R–L–C: the resistance is purely tangential — all Q, no frequency — and the inductance and capacitance have equal radial parts and opposite tangential ones, so their sum moves the frequency and their difference moves the Q.

That is why the two design quantities are independently trimmable in a resonator and are not in a biquad. In an active section the same component usually appears in both the frequency and the damping expression, so a trim for one detunes the other, and the pole sensitivity is what says by how much. The essay on the Q that components allow measures the ceiling that a real inductor’s losses put on the achievable value; this measures how firmly a design holds whatever value it was given.

For a high-Q pole the two parts scale differently, and the difference is the whole reason high-Q sections are hard. The radial sensitivity is bounded — a component moves the frequency by a fraction of its own change, and that is the end of it. The tangential one is not: the pole sits close to the imaginary axis, σ is a small difference between larger quantities, and a fractional change in a component is a much larger fractional change in σ. A section at Q = 20 is trimmed in frequency by eye and in damping by a component whose own tolerance is the specification.

Pole sensitivity, one 3th-order response realised two ways. computed by solving, not by drawing. The same Chebyshev response built as a doubly terminated ladder and as a cascade of active sections, with every complex pole pair's sensitivity to every element computed exactly and summed in quadrature. The ladder is better and it is better by 1.60 times — not by the eight orders of magnitude the rung below measured for the same ladder's magnitude response at its ripple peaks. The stationarity that argument rests on is a property of |H| at particular frequencies, and it says nothing about where the poles are: a ladder whose poles have moved has a response that is stationary about a different curve. The left bars are the ladder, the right the cascade.
Fig. 6 Two orders lower, where the cascade has one section and the ladder three elements, and the factor between them is smaller still.

Where the derivative stops being the answer

A derivative is a statement about an infinitesimal change. A tolerance is a finite one, and the useful number is not the derivative but the size at which the linear prediction and the moved root part company.

Where the derivative stops being the answer. computed by solving, not by drawing. The exact derivative predicts where a pole goes; a tolerance is a finite change and the prediction is a tangent. This is the fraction of the actual movement that the first-order prediction misses, against the size of the change. It falls to nothing as the change does — 0.0667 per cent at a tenth of a per cent, which is the check that the derivative is right — and rises as the change grows, passing a tenth of the movement at 17.8 per cent. A one per cent part is inside the linear region by three orders; a ten per cent part is not, and a sensitivity table used to size it is answering a question about an infinitesimal.
Fig. 7 The fraction of the actual pole movement that the first-order prediction misses, against the size of the change that caused it.

It falls to nothing as the change does — 0.067 per cent missed at a change of a tenth of a per cent, which is the check that the derivative is right rather than merely plausible — and it rises as the change grows, passing a tenth of the movement at 17.8 per cent.

So a one per cent component is inside the linear region by three orders and a sensitivity table sizes it correctly. A twenty per cent component is not, and the same table applied to it is answering a question about an infinitesimal. That is the boundary of every first-order tolerance analysis in this subject and it is rarely stated: the number is fine, and it is fine over a range that has to be checked.

The range is generous, which is why nobody checks it. The interesting cases are the ones where it is not: a pole pair whose two members are close together has a much smaller linear region, for the reason the next section is about.

The condition the formula carries

The division in the derivative is by vᵀ(∂M/∂s)u, and that quantity goes to zero when two poles coincide.

That is not a numerical inconvenience. A double pole genuinely has an infinite first derivative: two roots that have collided separate as the square root of a perturbation, so their movement is not differentiable at all, and any number a first-order theory returns there is wrong by an unbounded factor. The formula’s own denominator is what says so, and the separation between neighbouring poles is returned beside every answer so that a caller can tell when the number is about a network and when it is about a coincidence.

The practical case is a critically damped design, which is exactly a double pole and is exactly where a designer is most likely to want a tolerance analysis. The right answer there is that first order does not apply and the movement goes as √Δ, which means a one per cent component moves the poles by ten per cent of what a ten per cent component would. A sensitivity table that returns a large finite number instead has understated the problem and misdescribed its shape.

What is not computed

Second derivatives. The ladder’s own argument actually needs them: stationarity says the first derivative vanishes, so the leading behaviour is quadratic and its size is what decides how much the stationarity is worth over a finite tolerance. Computing it needs one solve per parameter again, which is the cost the rung below’s whole method exists to avoid, and it is the natural third rung here — the same shape of missing quantity as the extended precision the conditioning rung declined to build.

A statistical statement. These are derivatives, and a real tolerance is a distribution. The tolerance essay draws that distribution for a divider’s output and finds the root-sum-square bound tighter than the worst case by a factor that depends on the count; the same treatment of a pole cloud is a different figure and is not drawn here.

Anything nonlinear. The matrix is the Jacobian at an operating point, so everything above applies to the linearised system and to nothing else. A pole of a nonlinear circuit moves with the operating point as well as with the components, and that dependence is not a derivative of the same kind.

And the zeros. A transfer function’s zeros are the roots of a different determinant — the one with a column replaced — and the same machinery would give their derivatives with no new idea in it. They matter for an elliptic filter, where the stopband depth is a zero’s position and a null is famously easy to fill in, and they are not done here.

What the gate checks

The exact route is checked against re-rooting for every element of the R–L–C, at a perturbation small enough that the difference quotient is trustworthy — and the closed forms are checked as well, so the pair is anchored to something neither of them computed.

Three of the sensitivities are asserted as exact numbers rather than as approximations: the resistance’s real part at zero, and the inductance’s and capacitance’s at −½. A version with the two reactive stamps transposed would pass a loose bound and fails these.

The comparison between realisations is asserted in both directions. The ladder must be better than the cascade, and the factor must be under fifty — which is the assertion that carries this rung’s finding, because a version that reproduced the response’s eight orders of magnitude would mean the pole derivative was measuring the response.

The departure of first order is asserted at two ends: under a per cent at a change of a tenth of a per cent, and over five per cent at a change of a factor of two. Either alone is consistent with a derivative that is simply wrong.

And the rooting is asserted against the closed-form poles of a fifth-order Butterworth, which lie on a circle of known radius — the check that would have failed on the day, and did not exist.

Pole sensitivity, one 7th-order response realised two ways. computed by solving, not by drawing. The same Chebyshev response built as a doubly terminated ladder and as a cascade of active sections, with every complex pole pair's sensitivity to every element computed exactly and summed in quadrature. The ladder is better and it is better by 2.76 times — not by the eight orders of magnitude the rung below measured for the same ladder's magnitude response at its ripple peaks. The stationarity that argument rests on is a property of |H| at particular frequencies, and it says nothing about where the poles are: a ladder whose poles have moved has a response that is stationary about a different curve. The left bars are the ladder, the right the cascade.
Fig. 8 The same comparison two orders up, where the cascade’s highest-Q section is the one that moves and the ladder’s advantage is still a small number.

What a sensitivity is for

It is worth closing on what the two rungs together say, because they are usually conflated.

The rung below answers how much does the response move, at a stated frequency, for a stated component. That is the question a passband specification asks, and the ladder’s answer to it is extraordinary.

This rung answers how much do the natural frequencies move, which is the question a transient specification asks — and the ladder’s answer to that is ordinary. Both are exact, both come from the same matrix, and a design whose requirement is written in the wrong one of the two is being sized by a number that is right about something else.

Which of the two a requirement is written in is usually decided by the field it comes from rather than by anybody choosing. A filter specification is a magnitude mask, so the response derivative is the right one; a settling or overshoot specification is about pole positions, so this one is — the cliff before the fastest settling is what that looks like when the pole positions matter most, with settling time falling by a third across one step of a five-thousandth sweep in the damping. A design meeting both kinds of requirement needs both derivatives, and the factor of eight orders between them is the size of the mistake available to anybody who computes one and quotes it for the other.

Part 2 on sensitivity

One argument about Sensitivity, and one of 5 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 11.

The objects named here

The third axis, after the field and the idea: the things themselves, and every essay that touches each one.

Adjoint networkBiquad cascadeComponent sensitivityComponent toleranceLadder filterPole sensitivityPolesQuality factor