Frequency, which is the same solve

The level the phase cannot know

Bode's gain–phase relation runs both ways. Given only the phase of a lead network, its companion integral returns the gain's shape across six decades to 0.055 dB. It cannot return the gain's level, because multiplying a network by a constant changes no phase anywhere. The level is one number, −20.000 dB here, and it has to come from outside the phase: one gain reading at any frequency supplies it. The same integral fed an all-pass reads a flat gain as a double pole, 6.021 dB down at the all-pass's frequency and 40.086 dB down a decade above it.

Assumes: The phase the magnitude already knows · One solve, read four ways

The phase the magnitude already knows fed Bode’s integral the gain of a solved lead network, with its phase thrown away, and got the phase back to two hundredths of a degree. The phase a decibel buys turned the same relation into an exchange rate: ninety degree-decades of phase for every twenty decibels the gain moves between its two ends. Both essays ran the relation one way, from gain to phase.

It runs the other way too. For a network in the minimum-phase class, the phase measured at every frequency fixes the gain at every frequency, and the integral that does it is the companion of the one already measured. But the two directions are not mirror images of each other, and the difference is one number. Something is lost going from phase to gain that is not lost going from gain to phase, and the loss can be named exactly: the gain’s level.

A phase that ignores a constant

Take any network and multiply its output by a positive constant. Every gain on its Bode plot moves up or down by the same number of decibels, and every phase stays exactly where it was, because a positive real number has a phase of zero. One solve, read four ways reads the gain and the phase as the length and the angle of one complex number, and scaling a complex number by a positive real stretches its length and leaves its angle alone. So no measurement of phase, however complete, can say which member of that family it was taken on. The phase fixes the gain up to a constant and not beyond.

The companion integral says so in its own form. Written with the logarithm of the gain, M=lnHM = \ln|H|, it is

M(ω0)M(0)=2ω02π0φ(ω)/ωφ(ω0)/ω0ω2ω02dω,M(\omega_0) - M(0) = -\frac{2\omega_0^2}{\pi}\int_0^\infty \frac{\varphi(\omega)/\omega - \varphi(\omega_0)/\omega_0}{\omega^2 - \omega_0^2}\,d\omega,

and the thing to read first is the left-hand side. The integral returns a difference of log-gains, the gain at ω0\omega_0 relative to the gain at direct current. It never returns a gain. The constant M(0)M(0) has to be supplied from somewhere else, and until it is, the curve the integral draws has a shape and no position.

The integrand looks singular where ω=ω0\omega = \omega_0 and is not: the bracket in the numerator vanishes there as well, so a plain midpoint rule on a logarithmic grid that never lands exactly on ω0\omega_0 converges without any special treatment. That is a practical difference from the gain-to-phase direction, whose weight has a genuine logarithmic singularity that had to be integrated in closed form before its answers were right.

The lead, rebuilt from its phase

The test network is the one both earlier essays used: a resistor with a capacitor across it, over a second resistor, with its zero at 1 kHz and its pole at 10 kHz. Its gain is one tenth at direct current and one at high frequency, and its phase rises from zero to a peak of about 55° between the two corners and falls back to zero.

The gain recovered from the phase alone, right in shape, with its level supplied by the gain at direct current. computed by solving, not by drawing. The lead, 1.00 kHz to 10.0 kHz, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±3 decades of 1.00 kHz. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying the direct-current gain, −20.000 dB, places it. The placed curve lies within 0.055 dB of the solved gain across the drawn band, worst at 794 kHz.
Fig. 1 The lead’s gain, solved at 1601 frequencies over sixteen decades (solid), and the same gain rebuilt from the phase alone over ±3 decades of 1 kHz. Without a level the rebuilt curve sits at 0 dB at direct current (dashed). Supplied with the direct-current gain, −20.000 dB, it lies on the solved curve (dots) to within 0.055 dB across the six decades drawn, the worst of it at 794 kHz, near the top of the band.

The dashed curve is what the phase alone says. It has the lead’s shape exactly: flat below the zero, rising through both corners, flat above the pole, twenty decibels from one plateau to the other. It sits twenty decibels too high everywhere, because the integral assumed the gain at direct current was one and the network’s is a tenth.

Supplying that one number moves the whole curve down by 20.000 dB and puts it on the solved gain to 0.055 dB. Nothing else was adjusted. The whole of what the phase did not know is one decibel figure, and the whole of what it did know is everything else about the gain across six decades.

The twenty decibels between the plateaux came out of the phase. That is the area theorem from the earlier essay running backwards: the phase’s area fixes how far the gain moves between its ends, and a curve rebuilt from the phase must move by the same amount. What the area cannot fix is where the move starts.

One reading, taken anywhere

The level does not have to be the gain at direct current. The integral fixes every difference in log-gain, so the gain at any single frequency pins the whole curve, and which frequency that reading comes from is a matter of convenience.

The gain recovered from the phase alone, right in shape, with its level supplied by one reading. computed by solving, not by drawing. The lead, 1.00 kHz to 10.0 kHz, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±3 decades of 1.00 kHz. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying a single gain reading at 100 kHz, −19.945 dB, places it. The placed curve lies within 0.055 dB of the solved gain across the drawn band, worst at 2.24 Hz.
Fig. 2 The same lead rebuilt from the same ±3 decades of phase, with its level taken from a single gain reading at 100 kHz instead of from the gain at direct current. The constant that reading implies is −19.945 dB, and the placed curve lies within 0.055 dB of the solved gain across the band, now worst at 2.24 Hz at the bottom of it.

Pinned at 100 kHz, the constant comes out as −19.945 dB rather than −20.000. The 0.055 dB difference is not a disagreement about the level. It is the integral’s own truncation error at 100 kHz, carried into the constant, and it moves the worst of the error from the top of the band to the bottom. Pinned at the bottom, the error collects at the top; pinned at the top, it collects at the bottom. The size of the worst error is the same both ways, because it is set by how much phase the integral was given, not by where the level came from.

The practical reading is that a phase measurement plus one gain measurement at any frequency is a complete description of a minimum-phase network’s gain. A frequency-response analyser measuring a loop records both at every frequency and needs neither of these results. But a phase-only instrument — a phase detector, a time-interval counter reading the delay between two zero crossings — is one gain reading away from a complete magnitude plot, provided the network is in the class.

How much phase the gain needs

The ±3 decades above are a choice, and the integral’s error depends on it. The gain-to-phase direction had a clean answer for how much gain the phase needed: its weight falls away as 2eu2e^{-|u|} in the logarithm of frequency, so each decade of gain left out removed a fixed fraction of what remained. The companion’s kernel has a tail of the same kind, and it can be measured by rebuilding the same gain from less and more of the phase.

Each decade of phase buys the gain one decimal digit, once the phase has come back to zero. computed by solving, not by drawing. The worst gap between the gain rebuilt from the phase and the solved gain, across ±3 decades of 1 kHz, against how many decades of phase the integral is given, for the lead (whose phase returns to zero at both ends) and the low-pass with a zero (whose phase settles at −90°). The lead's gap is 0.0547 dB at three decades and 0.00547 at four, 10.0 times smaller per decade. The low-pass's is 5.981 dB at three decades and 0.0860 at five, because the phase outside the band is not zero and leaving it out is a real omission. Holding the last phase constant beyond the band takes it to 0.0592 dB at three.
Fig. 3 The worst gap between the gain rebuilt from the phase and the solved gain, across ±3 decades of 1 kHz, against how many decades of phase either side the integral is given. For the lead the gap is 0.0547 dB at three decades and 0.00547 at four, exactly ten times smaller per decade. For a low-pass whose phase settles at −90° it is 5.981 dB at three decades and 0.0860 at five; holding that settled phase constant beyond the band takes it to 0.0592 dB at three.

For the lead, once the band is wide enough to contain both corners, every further decade of phase buys the gain one more decimal digit: 0.0547 dB at three decades, 0.00547 at four, and a ratio of 10.00 between them. That is the kernel’s tail falling as the first power of frequency. It is the same rate the other direction pays, which is the symmetry one would hope for between two halves of one relation, and it is worth having as a number rather than a hope: a gain required to a hundredth of a decibel across six decades needs the phase for about one decade beyond each end of them, and every decade further buys another digit.

The low-pass curve is the one that does not follow that rule, and the reason is the most useful thing on the figure.

A phase that does not come back

The lead’s phase returns to zero at both ends of the spectrum, so leaving out the phase beyond the band leaves out something small. Most networks are not like that. A low-pass with two poles and a zero ends at −90°, and a phase that has settled at −90° is not small anywhere above the band. Leaving it out of the integral is not a truncation of a tail. It is leaving out a real part of the answer.

The gain recovered from the phase alone, 5.98 dB out at worst, with its level supplied by the gain at direct current. computed by solving, not by drawing. The low-pass, zero at 3 kHz, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±3 decades of 1.00 kHz. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying the direct-current gain, 0.000 dB, places it. The placed curve lies within 5.981 dB of the solved gain across the drawn band, worst at 1.00 MHz.
Fig. 4 A low-pass with poles at 1 kHz and 10 kHz and a zero at 3 kHz, its gain rebuilt from ±3 decades of its phase with nothing assumed beyond. The rebuilt gain follows the solved one through the corners and then parts from it: 5.981 dB too high at 1 MHz, the top of the drawn band, where the solved gain has fallen 49.5 dB.

Through the corners the rebuilt gain is right. Above about 100 kHz it bends away and sits 5.98 dB above the solved gain at 1 MHz, which is the top of the drawn band and the top of the phase it was given. The integral is doing exactly what it was asked: it has been told the phase is zero beyond 1 MHz, and a network whose phase returned to zero there would have to stop falling there. So the rebuilt gain starts to level off where the real one keeps going.

The fix is the one anybody reading the phase plot would make without thinking. The phase above 100 kHz is visibly settled at −90°, so assume it stays there.

The gain recovered from the phase alone, right in shape, with its level supplied by the gain at direct current. computed by solving, not by drawing. The low-pass, zero at 3 kHz, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±3 decades of 1.00 kHz, with the phase held at its last value beyond that. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying the direct-current gain, 0.000 dB, places it. The placed curve lies within 0.059 dB of the solved gain across the drawn band, worst at 1.00 MHz.
Fig. 5 The same low-pass and the same ±3 decades of phase, with the last phase in the band held constant beyond it on both sides. The rebuilt gain now lies within 0.059 dB of the solved gain at 1 MHz, the worst point of the band, against 5.981 dB when the phase outside the band was left out.

Holding the settled phase constant beyond the band takes the worst gap from 5.981 dB to 0.059, a hundredfold, and puts the low-pass on the same footing as the lead. The extrapolation is a model, and it has a hidden premise: that nothing happens above the band. A network with another pole two decades further up would bend the phase again, and the extrapolation would be wrong by that pole’s contribution. But it is the right default, and it turns a network whose phase never comes back into one the integral can handle with the same band.

The same point has a sharper form. A constant phase is itself a gain slope. The rule of thumb the earlier essays derived as the constant-slope case of the gain-to-phase integral — twenty decibels a decade of fall for every −90° of phase — runs backwards here: a phase held at −90° beyond the band is the statement that the gain falls at twenty decibels a decade there. Holding the phase constant and continuing the gain’s slope are one extrapolation, written in two units.

It also warns about signs. An inverting amplifier’s phase sits at 180° at every frequency, and a constant 180° is, to this integral, the phase of a gain rising forty decibels a decade. The sign of a network has to be taken out of its phase before the phase is read as a gain, which is exactly the constant-factor problem again with a negative constant: 1-1 has no magnitude to speak of and 180° of phase.

An all-pass read as a double pole

Everything so far has assumed the network is minimum phase. The gain-to-phase direction met networks that were not, and failed quietly: fed the gain of a lead with an all-pass behind it, it returned the lead’s phase and missed the all-pass’s entirely, because the all-pass has no gain to read. The companion direction fails the other way round, and not quietly.

Fed an all-pass's phase, the integral returns a double pole for a gain that is flat. computed by solving, not by drawing. The first-order all-pass at 1.00 kHz, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±6 decades of 1.00 kHz, with the phase held at its last value beyond that. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying the direct-current gain, 0.000 dB, places it. The solved gain is flat at 0 dB, but the one read from the phase is −6.021 dB at 1.00 kHz against a solved 0.000 dB, and −40.086 dB at 10.0 kHz against 0.000 dB: an all-pass's phase is exactly a double pole's, so the integral reads it as one, falling forty decibels a decade.
Fig. 6 A first-order all-pass at 1 kHz, whose gain is exactly 0 dB at every frequency, with its gain rebuilt from ±6 decades of its phase and the settled phase held beyond them. The rebuilt gain is −6.021 dB at 1 kHz and −40.086 dB at 10 kHz, falling at forty decibels a decade above the all-pass’s frequency: the gain of a double pole.

The all-pass’s phase is 2arctan(ω/ωa)-2\arctan(\omega/\omega_a). That is also, exactly, the phase of a double real pole at ωa\omega_a, 1/(1+s/ωa)21/(1 + s/\omega_a)^2. Two networks share that phase: one with a gain of 0 dB everywhere, and one that is 6.021 dB down at ωa\omega_a and falls forty decibels a decade above it. Only the second is minimum phase, so the integral returns it: −6.021 dB at 1 kHz and −40.086 dB at 10 kHz, which is 10log10(1+x2)2-10\log_{10}(1 + x^2)^2 at x=1x = 1 and x=10x = 10 to the third decimal place.

The two directions’ failures are worth setting side by side. Gain to phase, an all-pass makes the answer too small: the integral reports the minimum-phase network’s lag and misses the all-pass’s extra lag entirely. Phase to gain, it makes the answer too falling: the integral takes the extra lag at face value and invents the gain slope a minimum-phase network would need to produce it. The first failure looks like a plausible phase. The second looks like a network that is not there.

Fed the phase of a lead with an all-pass behind it, the integral reads the all-pass as a double pole. computed by solving, not by drawing. The lead, 1.00 kHz to 10.0 kHz, followed by a first-order all-pass that changes no magnitude, solved at 1601 frequencies over sixteen decades, and its gain rebuilt by Bode's companion integral from the phase alone over ±6 decades of 1.00 kHz, with the phase held at its last value beyond that. The integral returns a difference of log-magnitudes and nothing else, so the curve it gives has no level: drawn as if the direct-current gain were one, it is the dashed curve. Supplying the direct-current gain, −20.000 dB, places it. The solved gain is the minimum-phase network's, but the one read from the phase is −23.054 dB at 1.00 kHz against a solved −17.033 dB, and −43.054 dB at 10.0 kHz against −2.967 dB: an all-pass's phase is exactly a double pole's, so the integral reads it as one, falling forty decibels a decade.
Fig. 7 The lead followed by the all-pass at 1 kHz. Its solved gain is the lead’s, −17.033 dB at 1 kHz and −2.967 dB at 10 kHz. The gain rebuilt from its phase is −23.054 dB and −43.054 dB at the same two frequencies: the lead’s gain with a double pole’s subtracted, 6.021 dB and 40.087 dB below the truth.

Behind the lead the effect is the same, added. The rebuilt gain is the lead’s gain less the double pole’s: 6.021 dB short at 1 kHz, where the lead’s own gain is −17.033, and 40.087 dB short at 10 kHz. The lead’s rise is still in the reading; it has been bent downward by a slope that belongs to nothing in the circuit.

Two measurements and one test

That last figure contains a test for the minimum-phase class that needs no twin network to compare against.

Measure a network’s gain and phase across a band. Rebuild the gain from the phase with the companion integral, level it from one of the measured gains, and subtract the measured gain. For a minimum-phase network the difference is the integral’s truncation error, which the band figure puts at under a hundredth of a decibel once the phase runs a decade past the band. For a network with a first-order all-pass in it, the difference is 20log10(1+(ω/ωa)2)-20\log_{10}(1 + (\omega/\omega_a)^2): exactly 6.02 dB at the all-pass’s frequency and forty decibels a decade above it. The difference does not merely say that the network is outside the class. It says where the all-pass is, because the frequency at which the gap reaches 6.02 dB is its frequency.

The energy that arrives first ended on the same question from the time side, and found that a step going the wrong way proves a right-half-plane zero while a mirrored zero far above the poles undershoots by half a per cent and may be missed. The frequency test has a different blind spot. A far-away all-pass puts its 6 dB where the band has already run out, and an all-pass in the middle of the band is caught by a margin of tens of decibels. The two tests are good at opposite ends of the range, which is the same thing that essay found about undershoot and delay.

Where the constant goes in practice

Most real uses of this relation are about loops, and a loop’s gain has the constant built in. What is left at crossover reads stability off one frequency, where the loop’s gain passes unity, and that frequency depends entirely on the level: raise the gain by six decibels and the crossover moves to wherever the shape is six decibels lower. The phase at a given frequency does not move at all when the gain is scaled. So the phase margin of a minimum-phase loop depends on the level only through where the crossover lands, and the level is the one number its phase cannot supply.

That is the same statement as the constant-factor argument, seen from a design: the shape of a loop’s response is fixed by where its poles and zeros are, and the gain knob moves the shape up and down without touching the phase curve at all. Two measurements of one margin reads the margin in time as well as in frequency, and both readings move with the knob for this one reason. Every loop in the straight lines, and where they are not the curve and the zero that lifts the lines is drawn with the gain as the free parameter, for this reason. The phase is the part of the loop the gain knob cannot touch, and so it is the part that sets the ceiling on how far the knob can be turned.

The same structure turns up far from circuits. The permittivity a loss forbids applies the relation’s cousin to a dielectric: a material’s loss at every frequency fixes how its permittivity changes with frequency, and leaves the permittivity’s value at one frequency to be measured. The loss is to the permittivity what the phase is to the gain, and the missing constant is the same kind of number — a level that any single measurement supplies and that no amount of the other quantity can.

How the numbers were obtained

Every network is solved by nodal analysis at 1601 frequencies spaced a hundred to the decade over sixteen decades, and the phase is unwrapped as it is swept. The companion integral is evaluated by the midpoint rule on those cells, in units of frequency over 1 kHz, from whatever band of phase a figure names; beyond that band the phase is either omitted or held at its last value, as each caption says. The integral was checked against the closed-form log-gain of a single pole, where it agrees to seven parts in a billion at the corner, before it was used on any network here. The level is either the solved gain at direct current or the solved gain at one named frequency less the integral’s value there. The all-pass reading is compared with the closed form of a double real pole, and the all-pass’s own gain with 0 dB, at every drawn frequency.

What these results leave out

They use real poles and zeros throughout. A resonant pair has a phase that swings through ninety degrees in a narrow band, and rebuilding its gain peak from that swing is the same integral with a much steeper phase to sample, where the grid rather than the band may set the error.

They rebuild a gain from a phase that is known exactly. A measured phase has noise in it, and the companion integral weights a phase error at a distant frequency by the kernel’s tail, so a phase error of a degree spread across the band enters the gain as something like a slope rather than as a local blip. How a phase measurement’s noise becomes a gain error is the question a real instrument would need answered, and it is not measured here.

And the all-pass is first order. A second-order all-pass has the phase of a resonant double pole pair, so the integral would read it as a peaked low-pass, and whether the gap then still names the all-pass’s frequency and quality factor as cleanly as 6.02 dB names a first-order one’s is open.

Still open: noise in the phase, a resonant all-pass, and the test run blind

A noisy phase. The companion kernel falls as the first power of frequency, so a phase error far from the frequency being rebuilt still reaches it. Adding a seeded noise to the solved phase and rebuilding the lead’s gain many times would give the gain error’s spread against the phase noise’s size — the number that says whether a phase-only instrument can produce a gain plot worth reading.

A second-order all-pass. Its phase is a resonant pair’s phase, so the gap between a measured gain and the gain rebuilt from the phase should be a resonant pair’s gain, with a peak rather than a corner. Whether the peak’s height and width read back the all-pass’s quality factor, and how small a quality factor still leaves a gap the band can see, would extend the test above from one kind of excess phase to the kind a delay-equalising filter such as the one in flat delay, bought with more delay actually contains.

The test with no answer in hand. Every network here is known to be in or out of the class before the test is run. Running the gap on a network with an unknown mixture of zeros, including a mirrored zero far above the band, would say how often the test is right when it has nothing to be right against, and at what distance above the band a right-half-plane zero stops being visible at all.

Part 4 on Minimum-phase

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

The objects named here

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

All-passBode plotExcess phaseGain phase relationMinimum-phaseVerification