Lines, where a wire has a length

The number that was wrong

The rung below printed 97.3 per cent of band for a five-section transformer where the answer is 134, said in its own text that the figure was wrong, and blamed a search that had converged to eight digits. The search was fine. The objective was the worst of a grid rather than the worst of a band, the band was then measured by bisecting a function that crosses its threshold five times, and the assertion guarding all of it passed — because 97.3 is still more than 92.6.

Assumes: A quarter wave, and the path the current takes back · Three families, one corner · Every derivative, and the one that is zero

Several sections, and the band they buy prints a table of how much bandwidth a multi-section transformer buys, and its five-section row read 97.3 per cent where the four-section row read 119.6. That is not a possible answer — a design with more free parameters cannot do worse at the same specification — and the essay said so, in a section of its own headed where the search gives out:

That is not a property of five-section transformers; it is the search failing to converge… The fix is a better search — a Remez exchange rather than coordinate descent.

The answer is 134.0 per cent. The search had converged to eight digits. Everything in the paragraph above was wrong except the sentence that came after it, which was right and is the reason this essay exists:

An assertion that passes is not the same as a result that is right.

Two faults, and both of them are sampling

The measurement has two stages: choose the impedances by minimising the worst reflection over a band, then measure how wide a band the result actually holds. Each stage had a fault and each fault is a continuous quantity replaced by a finite set of samples of it.

The objective was a grid

The minimax objective evaluated |Γ| at eighty-one frequencies across the band and returned the largest. An optimiser given that will drive those eighty-one values down and is entirely indifferent to what happens between them.

5 sections, equal ripple, and the band that is 134% rather than 97. computed by solving, not by drawing. The repaired five-section equal-ripple design over the band it was designed for. The horizontal rule is the 0.1 the specification allows and the 4 interior peaks sit on it, level to 8.5e-4 per cent — which is the condition for a minimax solution and is now checked rather than assumed. The dots are the eighty-one frequencies the objective used to be evaluated at: the worst of them is 0.09999998 and the worst of the design over the whole band is 0.10013858, so an optimiser shown only the dots drove them down to the specification and left the true peaks 13.9 parts in ten thousand above it. That is nothing until something downstream is a threshold, and the band measurement was one: it reported 97.34 per cent for a design that holds 134.04.
Fig. 1 The five-section equal-ripple design, with the eighty-one frequencies the objective used to see. The worst of the dots is 0.09999998; the worst of the design is 0.100139.

The worst of the grid came out at 0.09999998, which is the specification to eight digits and looks like a converged search. The worst of the design is 0.100139 — 13.9 parts in ten thousand above it. The ripple peaks of an equal-ripple design do not land on grid points, because nothing made them land there, and a maximum over a grid is not a maximum.

Thirteen parts in ten thousand is nothing, and it would have stayed nothing if the next stage had not had a threshold in it.

The band was a bisection on a function with five crossings

The band was found by bisecting between the centre frequency and twice it, looking for where |Γ| first exceeds 0.1. Bisection assumes one crossing. An equal-ripple design has one crossing for every ripple, and this one has five — and the interior ripples were 13.9 parts in ten thousand above the threshold, so four of those crossings were real.

Which one the bisection returns depends on where its bracket happens to fall. At five sections it returned an interior one, and the reported band collapsed from 134.0 to 97.3.

Both are repaired. The objective refines each interior grid maximum by golden section, which costs a few dozen extra evaluations and removes the overshoot; the band is found by walking outward from the centre and refining inside the step that first crosses, which is what “the largest interval containing the centre” actually means. The five-section row now reads 134.0 per cent and the ripples come out level to eight parts in a million.

The defect was live in three rows and visible in one

This is the part worth carrying, because it is what makes the fault a class rather than an incident.

At four sections the same overshoot was there: the design’s peaks were 0.100004, above the specification, and the bisection happened to return the outer crossing anyway. The row read 119.6 per cent, which is right. At six sections the peaks were 0.0992, genuinely below, and the row read 143.8 per cent, which is also right.

So the fault was present at four, five and six and produced a visibly wrong number at exactly one of them. Two of the three rows in the table were correct by luck of where a bisection’s bracket landed, and there was nothing in either row to say so.

4 quarter-wave sections between 50 Ω and 200 Ω. computed by solving, not by drawing. |Γ| computed by cascading exact line impedances from the load back to the source, so every multiple reflection is in it. The binomial design is exact at the centre and holds |Γ| below 0.10 over 82.1% of the centre frequency, against 17.1% for a single section. The equal-ripple design, found by minimax search rather than from a table, covers 119.6% at the same worst reflection — 46% more — and its ripples come out level to 2.0e-2%, which is the check that the search converged.
Fig. 2 Four sections, where the same overshoot existed and the reported band was right anyway. Nothing on the page distinguishes this case from the one below it.
5 quarter-wave sections between 50 Ω and 200 Ω. computed by solving, not by drawing. |Γ| computed by cascading exact line impedances from the load back to the source, so every multiple reflection is in it. The binomial design is exact at the centre and holds |Γ| below 0.10 over 92.6% of the centre frequency, against 17.1% for a single section. The equal-ripple design, found by minimax search rather than from a table, covers 134.0% at the same worst reflection — 45% more — and its ripples come out level to 8.5e-4%, which is the check that the search converged.
Fig. 3 Five sections, repaired. The band is 134.0 per cent and the ripples are level to eight parts in a million, which is the condition for a minimax solution and is now checked.

The assertion that passed

The figure guarded itself with two claims: that the ripples are level, and that the equal-ripple design covers more band than the binomial one.

The first was true — the search had converged, and the levelness was 2 × 10⁻¹⁴ per cent. It was measuring the design, and the design was fine.

The second was true as well: 97.3 per cent is more than the binomial design’s 92.6. It is also thirty per cent short of the right answer, and no ordering assertion can see that, because an ordering assertion is satisfied by any number on the correct side of another number.

That is the general shape and it is worth stating as a rule. An assertion of the form A is bigger than B has a blind spot the size of the gap between them. Where the two are far apart — as here, where the true ratio is 1.45 and the assertion would have passed at 1.01 — the guard is nearly vacuous. The repair is not more assertions of that form; it is one assertion about a quantity with a known value, and the equal-ripple condition supplies one: the extrema must all be equal, which is a statement with no free parameter in it, and the repaired figure asserts exactly that. It is also the assertion that would have caught the original fault, because a design whose peaks are above its own grid maximum is not equal-ripple over the band being reported.

The deeper point is that this problem did not need an optimiser at all.

Within the small-reflection approximation the equal-ripple multi-section transformer has a closed-form solution and has had one since the 1950s. The reflection is required to be a Chebyshev polynomial in a mapped frequency,

Γ(θ)=ATN ⁣(cosθcosθm)\Gamma(\theta) = A\, T_N\!\left(\frac{\cos\theta}{\cos\theta_m}\right)

with θₘ fixed by the band and A fixed by the value at direct current. Expanding that in cosines of multiples of θ gives the reflection at each junction, and the impedances follow from Γₙ = ½·ln(Zₙ₊₁/Zₙ). The expansion here is done by quadrature rather than from a table of coefficients, because the function is a trigonometric polynomial of known degree — so the quadrature is exact — and because a table indexed by the number of sections is a table somebody has to extend.

A minimax problem with a closed-form answer, given to a search that starts in the wrong place. computed by solving, not by drawing. The worst reflection over a full octave, for three ways of choosing the section impedances. Coordinate descent started at the binomial design reaches 0.0413 at six sections; the same descent started at the closed-form Chebyshev design reaches 0.0093, which is 4.4 times better. The closed form on its own is between them: it solves the small-reflection problem exactly, and the exact cascade of lines is not that problem — at six sections it says 0.0070 and delivers 0.0119. So the right arrangement is neither one nor the other: a closed form to start from and a local search to finish, which is what a search cannot supply for itself.
Fig. 4 Three ways of choosing the impedances, against the number of sections. The two lower curves are the same local search from two different starting points.

Three things come out of comparing the three.

Up to five sections it does not matter where the search starts. Coordinate descent from the binomial design and the same descent from the closed form land within a few per cent of each other: 0.1057 against 0.1055 at three sections, 0.0442 against 0.0443 at four, 0.0191 against 0.0185 at five. The rung below’s diagnosis was wrong at five sections because there was nothing wrong with the search at five sections.

At six it matters entirely. From the binomial design the descent reaches 0.0413; from the closed form it reaches 0.0093, which is 4.4 times better. So the diagnosis was correct about the mechanism and out by one in the order at which it bites — the descent does stop early on a flattened objective, one section further along than the essay said.

And the closed form on its own is not the answer either. It solves the small-reflection problem exactly, and a cascade of real lines is not that problem: at six sections the design says its ripple will be 0.0070 and the exact cascade delivers 0.0119, seventy per cent more. Every multiple reflection that the approximation drops is in the cascade.

So the arrangement that is actually right is neither: a closed form to start from and a local search to finish. The closed form supplies what a search cannot supply for itself, which is a starting point in the right basin; the search supplies what the closed form cannot, which is the difference between the approximation the theory is built on and the network that will be built.

The same shape, elsewhere in this collection

Two other essays in this collection are about the same distinction and it is worth naming, because three instances of one shape are a pattern rather than a coincidence.

The three tolerances that do nothing replaces six hundred sampled ladders with a quadratic form, and finds a property — a three-dimensional null space — that no sample of a five-dimensional box could have landed on. A sample of a set is not the set.

Zero in, and not zero out finds that a filter’s round-off floor is the white sequence the standard model says it is, above a word length, and several times worse below it. A model of a quantity is not the quantity.

And this one: a maximum over a grid is not a maximum, and a bisection is not a search for a boundary unless the boundary is crossed once.

Matching 50 Ω to 200 Ω with 51.7 mm of 100.0 Ω line. computed by solving, not by drawing at 261 frequencies. The reflection at the design frequency is 4.6e-17 — nothing, to the arithmetic — against 0.600 for the bare junction, which throws 36% of the power back. It stays under 0.1 from 0.914 to 1.086 of that frequency, a band of 17.1%.
Fig. 5 One section, where none of this can happen: with a single free impedance there is nothing to search, no interior ripple and one crossing on each side. The case that is trivially right is also the case that cannot expose the fault.

What the transformer trade actually is, corrected

With the row repaired, the table says what it was always going to say, more cleanly.

An equal-ripple design covers about 45 per cent more band than a binomial one at the same worst reflection, and the figure is remarkably stable with order: 35 per cent at two sections, 44 at three, 46 at four, 45 at five. That is the same trade three families, one corner measures between Butterworth and Chebyshev for a transfer function, in the same direction and of the same size, which is what one expects of the same mathematics pointed at a reflection instead of a gain.

5 sections, equal ripple, and the band that is 134% rather than 97. computed by solving, not by drawing. The repaired five-section equal-ripple design over the band it was designed for. The horizontal rule is the 0.1 the specification allows and the 4 interior peaks sit on it, level to 8.5e-4 per cent — which is the condition for a minimax solution and is now checked rather than assumed. The dots are the eighty-one frequencies the objective used to be evaluated at: the worst of them is 0.09999998 and the worst of the design over the whole band is 0.10013858, so an optimiser shown only the dots drove them down to the specification and left the true peaks 13.9 parts in ten thousand above it. That is nothing until something downstream is a threshold, and the band measurement was one: it reported 97.34 per cent for a design that holds 134.04.
Fig. 6 The overshoot reading taken at five sections rather than three, which is what the transformer trade actually is once the number is corrected. The design that maximises band is not the one that minimises the worst reflection, and the gap between them widens with the section count — so the single figure of merit the earlier essay quoted was measuring one of the two and being read as the other.

What the corrected row adds is that the trade does not run out. The old table appeared to show it collapsing at five sections, which would have been a real and interesting result about diminishing returns; it showed nothing of the kind.

The assertion that would have caught it

Three guards were available and the figure had the weakest of them.

An ordering assertion — the equal-ripple design beats the binomial one — passed on a number thirty per cent short, for the reason given above.

A shape assertion would have caught it immediately: the band a design holds must increase with the number of sections, because a five-section transformer contains a four-section one as a special case. That claim compares two of the figure’s own outputs, it has no tolerance in it, and it is exactly the kind of statement that belongs in the site’s own gate rather than inside a generator — because a generator sees one slider position at a time and this claim is about two. It is in the gate now, over every order from one to six.

And a condition with a known value is the strongest of the three, which is the equal-ripple condition itself: at the optimum the extrema are equal, exactly, with no free parameter. The old figure did assert levelness — and it passed, at 2 × 10⁻¹⁴ per cent, because it measured the levelness of the peaks the search had found inside the band the search was given. The repaired version asserts it over the band that is being reported, which is the band the bisection returned, and those are the same interval only when nothing has gone wrong.

That last distinction is the one worth carrying to another figure. An assertion is only as good as the interval it is evaluated over, and when a routine’s output includes an interval, the assertion has to be evaluated over the output rather than over the input.

The answer that is perfect and absurd is the other end of the same spectrum: there the solver produces a number that is exactly right and describes nothing, and the repair is a refusal rather than a check. Here the routine produced a number that was wrong and plausible, which is harder, and the only defence is a claim about a quantity whose value is known in advance.

How much of the collection this touches

The repaired routine is used by one generator and one essay, so the blast radius is small, and the five-section row was the only visibly wrong number. The rung below has been corrected — its table, and the section that carried the wrong diagnosis.

What is worth checking rather than assuming is whether the same two faults are anywhere else, and both are searchable. A bisection for a boundary is safe only where the function crosses once, and this site has several: the band edges of a filter, the amplitude at which a model departs, the frequency at which two curves swap. Most of those are monotone by construction and one is not — an equal-ripple filter’s passband edge has the same structure as this one, and what a steep skirt costs measures it. That one is safe for a different reason: its ripple is specified rather than searched for, so its peaks sit exactly on the specification rather than a fraction above it.

A maximum over a grid is the more common of the two and the harder to find, because it never produces an impossible number — it produces a slightly optimistic one. That is the same difficulty the digits the arithmetic did not have describes for a lost digit: an answer that is wrong by a little and right in every other respect has nothing to distinguish it from an answer that is right. The rule that comes out of this is cheap to follow: where an optimiser’s objective is a maximum, refine the interior maxima before returning it, at a cost of a few dozen evaluations per call. It is in one place here and it should be in every place the site minimises a worst case.

What is not in this model

No loss. Every line here is lossless, and the mismatch that the cable hides is the essay about what attenuation does to a reflection measurement: it flatters it. A six-section transformer is six quarter-waves long, and at the band edges that is a substantial length of line whose loss would both reduce the reflection and dissipate what it reduces.

No dispersion and no discontinuities. The junctions between sections are ideal here — an abrupt change of impedance with no shunt capacitance at the step — and a real transformer has one at every junction. Five junctions of a few tenths of a picofarad shift the response by more than the approximation error the refinement above removes.

And no Remez exchange. The named fix is still not implemented and is now not needed for the same reason: with a closed-form start the local search converges to a design whose extrema are level to parts in a million, which is the exchange algorithm’s own stopping condition reached by other means. An exchange would be faster and would be provably optimal; the difference at these orders is not measurable in the answer.

The habit this belongs to

The rung below did the right thing with what it had. It printed a number it could see was wrong, labelled it, refused to hide it behind the assertion that passed, and wrote down what it thought the cause was.

It was wrong about the cause, and it was wrong in the direction that a reader could check — the search had converged, and that is visible in the same output the essay was quoting from. What made it findable later was not a better instrument. It was going back to a paragraph that said this is wrong and here is why and asking whether the second half was true.

Two assertions that would have caught it, and one that would not

It is worth being specific about what kind of check the guard should have been, because the one that existed was not weak so much as pointed at the wrong quantity.

The assertion in place required the five-section band to exceed the four-section band, which it did: 97.3 against 92.6. That is a monotonicity check, and monotonicity checks are the ones this collection reaches for most often — the band that closes with the order and what a steep skirt costs both assert trends across a slider rather than values at a frame, for good reasons. What a trend cannot catch is an error that preserves the trend, and a bisection that stops at the first of five crossings does exactly that.

Two checks would have caught it and neither is expensive. The first is to assert the count of threshold crossings before bisecting on any of them, which turns a silent wrong answer into a refusal — the same move the answer that is perfect and absurd argues for, where a solver that answers a badly posed question for eight decades before declining is worse than one that declines sooner. The second is to compare the objective’s own value at the reported band edges against the threshold it was supposed to be at, which is one evaluation and no new machinery.

The general form is worth carrying. A search returns two things — a location and a value — and an assertion on the location alone tests the optimiser rather than the answer. Checking that the value at the reported location is what it was asked to be costs nothing and is what separates several sections, and the band they buy as it now stands from the version this essay is about.

Part 4 on matching

One argument about Matching, 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:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

The objects named here

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

BisectionChebyshevClosed formImpedance matchingNumerical errorQuarter-wave transformerReflection coefficientVerification