The reference a sweep should keep
Assumes: What a network answers, and how the answer is checked · The matrix that is ill, and the answer that is not
The node that is not in the circuit found that nodal analysis needs a node to call zero, that no circuit contains one, and that the choice changes nothing the circuit determines — every branch voltage and current is the same from every reference, to a part in on a well-behaved chain. What the choice does change is the matrix. On a twelve-section resistor chain the condition number moved by a factor of 3.3 with the reference, and the worst choice cost four digits of the answer on a star whose resistances spanned nine decades. The middle of a chain was best.
Every measurement there was at direct current, where the matrix is a real conductance matrix. It named the obvious next one: at s = jω the matrix is complex and its conditioning moves with frequency. Whether the best reference is the same at every frequency, or moves with the response’s own features, is the natural next measurement — and if it moves, a solver that chooses once for a whole sweep is choosing wrongly somewhere.
It moves. And the more useful finding is that one of the ways of choosing wrongly is nearly free, while the other — the one a careful solver that had measured the direct-current case would pick — is the expensive one.
An RC ladder with its capacitors in
The network is the resistor chain with one addition: an eight-section RC ladder of 1 kΩ in series, with 10 nF to ground at each node and a megohm beside it so that the direct-current matrix stays defined. At low frequency it is the chain the earlier essay measured. At high frequency every node is tied to ground by its capacitor, and a single section’s corner is kHz.
At each frequency the modified nodal matrix is assembled with each of the RC ladder’s ten nodes in turn called zero — the eight internal nodes, the input and the original ground — and its condition number is computed. Nothing is solved approximately: the network is the same network each time, relabelled.
At direct current the ranking is the earlier essay’s: the middle node, n4, gives a condition number of 2.76×10⁴, ground 3.50×10⁴, the far end 8.61×10⁴. Through the low kilohertz the ranking reshuffles — at a kilohertz the input is briefly best — and from 2.37 kHz ground is best, and stays best, its condition number falling towards single digits: 16.4 at a megahertz, where the far end is 318.
The switch happens well below a single section’s corner. At 2.37 kHz each capacitor’s admittance is only 0.15 of a series resistor’s conductance, but there are eight of them, and together they tie the chain to ground about as strongly as one series resistor ties neighbouring nodes. From there up the ground node is the node the matrix is most strongly organised around, and calling it zero leaves the best-balanced system.
Why ground wins at high frequency
The earlier essay’s reason for the middle was a picture: a chain referenced at one end has a matrix whose entries are all alike but whose inverse is not, because the far node’s voltage is the sum of every section’s drop; referenced in the middle it is two shorter chains. The same picture explains the move.
A capacitor to ground at every node is a path from every node to the reference if the reference is ground. At high frequency those paths dominate, so each node’s row of the matrix is mostly its own diagonal entry — its capacitor — and a diagonally dominant matrix is well conditioned. Call any other node zero and the ground node becomes an unknown whose row collects every capacitor at once, a single enormous diagonal entry coupled to every other unknown, which is exactly the shape the earlier essay found expensive in a star.
So the best reference is not a property of the network’s topology alone. It is the node the network’s dominant admittances return to, and which admittances dominate depends on frequency. Where the matrix is worst, and where the answer is not watched a fixed reference’s condition number swing with frequency; here the swing is different for each reference, and the curves cross.
The direct-current chain is worth keeping in view because the sweep begins there, and because the one thing it says that the sweep contradicts is the one a solver would be tempted to carry over. At direct current the best node is a property of the chain’s geometry, and the RC ladder’s capacitors are open circuits that do not enter it. The moment they carry current, the geometry that matters is the geometry of the admittances, and a capacitor to ground at every node is a geometry with ground at its centre.
What choosing once costs
A frequency sweep solves the same network at hundreds of frequencies, and re-choosing the reference at each is possible but seldom done: the matrix is assembled once with a fixed node removed, and only the frequency-dependent entries change. The question that matters for a solver is therefore not which reference is best where, but what a reference kept for the whole sweep costs against the best at each frequency.
The two candidates a designer would consider behave very differently. Ground, kept throughout, is never worse than 1.27 times the best — a tenth of a decimal digit, spent only at low frequency where the middle of the chain would have been slightly better. The middle node, chosen because it is best at direct current and kept, is 143 times worse than the best at high frequency: 2.2 digits, spent exactly where the RC ladder’s response is small and its digits are scarcest. The input is as bad as the middle.
The asymmetry has a reason. The middle’s advantage at direct current is a factor of 1.27 over ground; ground’s advantage at high frequency is a factor of hundreds over the middle, because at high frequency the choice is between a diagonally dominant matrix and one with a single row carrying every capacitor. A reference that is slightly suboptimal where the network is resistive and excellent where it is reactive beats one that is optimal where it is resistive and poor where it is reactive.
A longer RC ladder, and a filter
The same measurement on a sixteen-section RC ladder moves the switch lower and widens the gap. Ground becomes best from a kilohertz; kept throughout it is never worse than 1.45 times the best, and the middle node kept throughout is 515 times worse at high frequency — two and three-quarter digits.
An RC ladder is a particular network. A doubly terminated LC filter is a more realistic one for a frequency sweep, and it has inductors in series and a response that changes character at its corner.
In the filter the best reference is an internal node well below the corner and ground from 398 Hz, and ground kept for the whole sweep is at most 2.18 times the best — at the lowest frequencies, where the inductors are short circuits and the filter is two terminating resistors joined by wire. The pattern holds: the node the shunt elements return to is the right node to keep, and the price of keeping it is paid where it costs least.
What the choice does not touch
It is worth restating what is at stake, because a condition number invites more alarm than it deserves. What a network answers, and how the answer is checked is the ground rule: the solver’s answer is checked against Kirchhoff’s laws after the fact, and a reference choice cannot make a correct solve incorrect. Every branch voltage and current in these figures is the same from every reference, at every frequency, to the arithmetic’s margin; what the reference changes is how large that margin is.
The matrix that is ill and the answer that is not is the reason the margin can stay large even when the condition number does not: a bound on the worst direction says nothing about the direction the answer happens to lie in. The costs above are therefore ceilings on what a reference can lose, and the earlier direct-current measurement is the evidence that the ceiling can be reached. For a sweep that reports a response forty decibels below its input, the ceiling is the part worth respecting.
What the reference also does not touch is whether the network can be solved at all. A reference placed on a node that makes the matrix singular — a node joined to the rest only through a current source, say — is refused, not solved badly, and the answer that is perfect and absurd is the case where refusing is the only honest output. None of the references here is of that kind; every node of both networks joins the rest through an admittance at every frequency.
The sweep a filter is designed from
The frequency sweep in these figures is the same one every computed frequency response is drawn from: the network solved at a few hundred frequencies, a transfer read off each solution. One solve, read four ways is the arithmetic of reading a response from those solves, and a sweep’s cost in digits is the worst of its solves’ costs, not their average — a response is only as good as its worst-conditioned point.
That turns the cost figure into a statement about a whole response. Kept at ground, the eight-section RC ladder’s sweep never loses more than a tenth of a digit to the reference, anywhere. Kept at the direct-current optimum, it loses more than two digits in its stopband, and a stopband is where a response’s digits are thinnest, since the output there is small against the node voltages near the input that the same solve has to carry. The reference that looks careful — chosen by measuring — is the one that damages the part of the response a designer reads most closely.
The rule, and why a heuristic by degree would miss it
The earlier essay asked what rule a solver should use to choose, and offered the obvious candidate: the node with the most connections. Ground has the most connections in both of these networks — eight capacitors and eight megohms in the RC ladder — and it is the right answer at high frequency. But at direct current it is not the best, and a rule based on counting connections cannot know that the megohms are negligible there and the capacitors are open.
A better rule weighs connections by their admittance at the frequency of interest: the reference should be the node whose incident admittances are largest. At high frequency that is ground, heavily; at direct current it is spread along the chain and the middle wins narrowly. And the cost figure says the rule barely matters where it is unsure. When no node dominates, every reasonable choice is within a small factor of the best; when one node dominates, it dominates by a large factor, and choosing it is what matters.
That gives the practical rule for a sweep, and it is simple. Keep the node the reactive elements return to. In most circuits that is the ground the designer already drew, which is why simulators rarely suffer for choosing it — and why the earlier essay’s direct-current optimum, carried into a sweep, would be the expensive mistake.
What it costs in digits of the answer
A condition number is a bound on how many digits of the answer the arithmetic can lose, and the earlier essay found that on its worst reference the bound was realised: four digits lost, measured against the same matrix solved in twice the precision. At direct current that measurement can be made exactly; at s = jω the double-length solve is not available here, so the losses above are stated as condition numbers and not as measured errors.
What can be said is the scale. The RC ladder’s best condition number at high frequency is in the single digits, so a double’s sixteen digits are hardly touched from ground. Kept at the middle node, the same frequencies cost 2.2 digits more, which is still thirteen digits of answer — and the digits the arithmetic did not have is the reminder that a response being computed forty or sixty decibels down its own stopband needs those digits, since the node voltages it is a difference of are that much larger than it.
How the numbers were obtained
Each condition number is in the ∞-norm — the largest total admittance at any node, times the same for the inverse, formed column by column — for the modified nodal matrix at the stated complex frequency, with the stated node relabelled as the reference by exchanging it with ground in every element — the same routine the earlier essay used at s = 0. The best reference at each frequency is the one with the smallest condition number among all the network’s nodes.
Checked: at low frequency the best reference is required to be a node of the chain and the middle required to beat ground; at high frequency ground is required to be best. Keeping ground is required to cost less than a factor of two over the whole sweep, and keeping the direct-current best more than thirty. In the LC filter, an internal node must be best at the lowest frequency and ground from within a decade of the corner.
A bound on the loss, not the loss itself
The answer’s error is not measured at s = jω. The condition number bounds the loss; whether the bound is realised, as it was at direct current on the earlier essay’s star, needs the complex solve repeated in extended precision.
The RC ladder is lumped. An eight-section RC ladder is a crude model of a distributed line, and a ladder is not a line is where the difference between the two is measured. A line solved as a much finer RC ladder has more capacitors returning to ground and, on this evidence, an even stronger case for keeping ground as the reference — the sixteen-section figure’s 515 against the eight-section figure’s 143 is the trend, and a finer RC ladder should continue it.
Only two network families are tried. A network whose reactive elements return to different nodes — a bridged network, a filter with elements to a virtual ground, a circuit with a floating capacitor — has no single node they all return to, and the rule would have to be applied band by band.
And pivoting is the solver’s. A solver that pivots can recover some of what a poor reference costs, and the costs above are for the matrix as assembled, which is what bounds any solver.
Still open: the floating capacitor, the double-length check, and a rule that chooses
A network with no common return. A capacitor between two internal nodes returns to neither ground nor any node the designer would pick. An RC ladder with floating capacitors — a bridged-T, a coupled pair of resonators — would test whether the best reference still settles on one node at high frequency, or wanders among several.
The error at s = jω, measured. Repeating the solve in double-double arithmetic with complex entries would turn every condition number above into a measured loss of digits, and say whether the 2.2 digits the middle node costs are spent or merely risked.
A rule that weighs by admittance. Choosing, at each frequency, the node with the largest total incident admittance is cheap — it needs the matrix’s diagonal and nothing else — and the question is how close it comes to the best reference across a family of networks. If it is within a factor of two everywhere, it is the rule a sweep should use when ground is not obviously the answer.
Part 3 on nodal analysis
One argument about Nodal analysis, and one of 3 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:
The objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
Condition numberFrequency responseLadder networkModified nodal analysisNumerical errorReference node
- The conductance added so it would invert modified nodal analysis, numerical error
- The step that returns the digits numerical error, reference node