The pulse a loop has room for
Assumes: The staircase on the way out · What is left at crossover
A converter’s output pulse can be one clock-long rectangle, which is the hold, or several convolved together: two give straight lines between the samples, four the cubic B-spline. Four rectangles and no filter measured what that buys a converter feeding a loudspeaker — each rectangle is one more sinc, worth one more pole of image rejection, and at three or four times oversampling the cubic replaces the analogue filter entirely, at a price of two clocks of delay that nobody listening hears.
Half a clock against a pole moved the straight line inside a control loop, where delay is not latency but phase at the crossover, and found it the cheaper way to reject an image: the pole that does the second sinc’s job sits at the crossover and lags forty-five degrees there, while the straight line’s extra half clock costs degrees for a loop crossing over at a fraction of its clock. It ended by asking what happens to the cubic. Four rectangles are worth three poles. Three poles at the crossover cost 135 degrees, and the cubic’s extra clock and a half cost . The question was the crossover below which the long pulse is the only way to get that much rejection into a loop at all — and the answer turns out to be that there is no crossover at which the poles are a way at all.
The same rate, rectangle by rectangle
The first thing to settle is whether a longer pulse changes the trade the straight-line essay measured, and it does not. Each rectangle multiplies the converter’s response by one more sinc, and relative to the signal at the crossover a sinc leaves the nearest image, at of the clock, lower by exactly — a distance ratio, which the nulls are where nothing is found to be what every sinc does at an image’s own frequency. That factor does not depend on how many sincs came before. So each rectangle adds the same rejection and the same half clock, and the analogue pole that matches it is the same pole, at times the crossover, lagging the same forty-five degrees.
The consequence is that the straight-line essay’s crossing, , where a half clock and a pole cost the same phase, is the crossing for every rectangle of every pulse. Below a quarter of the clock an extra rectangle is always the cheaper filter, rectangle for rectangle. If that were the whole story the cubic would be the straight line three times over and would need no essay — the pole-per-rectangle law that the pole a straight line is worth began from, applied three times.
Ninety degrees, and three poles that want 135
It is not the whole story, because a loop does not pay per rectangle. It pays in total, out of a fixed budget.
An integrator plant lags ninety degrees on its own, so a loop around it has ninety degrees of margin before anything else is added, and everything a reconstruction lags comes out of those ninety. The pulses cost — straight lines through the origin, steeper for each rectangle. The hold followed by three equal poles costs the hold’s plus three arctangents, and since each pole sits at the crossover each arctangent is very nearly forty-five degrees: the curve starts above 135 degrees at the slowest loop drawn and climbs. It never comes below the ninety-degree line. No crossover, however low against the clock, leaves the hold-and-three-poles loop any margin at all.
The cubic’s line, , crosses the forty-five-degree mark at a sixteenth of the clock and the ninety-degree mark at an eighth. Below a sixteenth, a loop built on the cubic keeps more than forty-five degrees of margin; between a sixteenth and an eighth it keeps some; above an eighth it keeps none, and a loop with a delay in it can then fail on more than one side, as stable, and unstable with less gain found. That is the boundary the straight-line essay asked for, and its shape is different from what it expected. The poles do not lose to the cubic below some crossover; they lose everywhere, and the cubic wins only where it fits.
What the marched loop does with them
A phase argument treats a sampled loop as a continuous one with a delay in it. The marched loop is the measurement.
At a twentieth of the clock the hold and the straight line step cleanly with no measurable overshoot, the quadratic pulse overshoots 2.9 per cent and the cubic 13.6. The hold followed by three poles at the crossover rings and grows, and is drawn until it leaves the axis. The slider on the figure at the head of the page moves the crossover to 3 per cent of the clock, where the cubic too steps cleanly, and to a sixteenth, where it overshoots 26.4 per cent; the three-pole loop grows at every setting.
So the cubic’s rejection can be put into a loop and the equal poles’ cannot. That reads like a verdict on poles, and it is narrower than that. It is a verdict on poles matched one for one to the sincs they replace, which is the definition the straight-line essay used; each such pole sits at the crossover because a sinc’s rejection is a distance ratio and a single pole achieves the same ratio only from the bottom of the band. Three of them put all three of their forty-five degrees exactly where the loop is counting. A designer would not build that filter, and the fair comparison spends the same margin on poles placed where they are best — which is done below.
Forty-five degrees, marched
First, the phase estimate of where each pulse spends forty-five degrees deserves checking, since it was optimistic for the straight line at a fifth of the clock.
The overshoots at the forty-five-degree points are 25.3, 26.0 and 26.4 per cent for the straight line, the quadratic and the cubic — very nearly one number. The longer the pulse, the slower the loop at which its delay reaches that margin, and the slower the loop the better a continuous estimate describes the sampled one; the cubic’s forty-five degrees arrive at a sixteenth of the clock, comfortably inside the range where the estimate holds. The hold, whose half clock reaches forty-five degrees only at a quarter of the clock, overshoots 57.1 per cent there, which is the failure of the estimate the straight-line essay found, at its most extreme.
The cubic’s overshoot climbs steeply with the crossover: none at 3 per cent of the clock, 4.6 at 4, 13.6 at 5, 26.4 at a sixteenth, and 65.5 at a tenth. A loop crossing over at a tenth of its clock — a common ratio for a fast digital controller — cannot use the cubic, and the reason is visible in the lag figure: at a tenth the cubic alone spends seventy-two of the ninety degrees.
A pulse is a delay with a little gain taken off
The overshoot at the forty-five-degree points is about 26 per cent, where the margin a delay spends found 28.7 per cent for a loop whose forty-five degrees came entirely from a pure delay. The difference is the pulse’s own magnitude. A pulse of rectangles is a delay of clocks and a factor of on the gain, which at the cubic’s forty-five-degree point is , a quarter of a decibel. Less gain moves the crossover down a little, and at the lower crossover the delay lags a little less, so the real margin is slightly more than forty-five degrees and the overshoot slightly less.
The correction is small and it runs in the pulse’s favour. It is the same sinc that does the rejecting, felt at the crossover rather than at the image: a few tenths of a decibel of droop there, the price the staircase on the way out measured for a converter feeding a loudspeaker, here repaying a degree or two of margin.
Spending the margin well
The fair comparison fixes what the loop must keep and asks how much rejection the rest will buy each way. Keep forty-five degrees of margin; the hold’s half clock is unavoidable on both routes; what is left — ninety, less forty-five, less — can be spent on lengthening the pulse or on poles after the hold, and the poles may be any number, placed anywhere.
At 5 per cent of the clock the budget holds a pulse of five rectangles, which puts the image 127.9 dB below the signal. The best arrangement of equal poles the same budget allows is six poles, and it reaches 67.2 dB. At a sixteenth of the clock the budget holds the cubic exactly, for 94.1 dB, against 54.1 from five poles; at 3 per cent, eight rectangles and 241.5 dB against eleven poles and 108.2. Where three rectangles or more fit, the pulse buys between two-fifths more and more than twice as much as the poles. At a tenth of the clock, where only the straight line fits, the two are close — 38.2 against 33.7 dB — and at an eighth the straight line’s 33.8 beats a single pole’s 25.9.
The margin kept does not change the ranking. Keeping thirty degrees at 5 per cent of the clock buys six rectangles and 153.5 dB, against 84.5 from nine poles; keeping sixty buys three rectangles and 76.7, against 49.7 from four. The ranking does not depend on the margin chosen.
Where the best poles go
The search also says where the poles should be, and it is not where the matched pole sat. The best equal poles for a fixed phase budget sit close to half the clock — 0.476 at a 5 per cent crossover, 0.42 to 0.53 across most of the figure — well above the band and well below the image. Each then lags only a few degrees at the crossover and still attenuates the image substantially, because the image is twice as far above it as it is above the crossover.
That is why the matched pole was the wrong pole to compare with in a loop. Matching each pole to a sinc’s rejection forces it to the crossover, where its phase is most expensive; spreading the same phase across several higher poles buys more rejection for it. Even so, the pulse wins, and the reason is the identity every one of these comparisons has turned on: a rectangle’s rejection is a fixed distance ratio of per half clock, which for a slow loop is a very large ratio bought with a very small phase, while a pole’s is capped by how far from the crossover the phase budget lets it sit. The slower the loop, the larger that advantage, and at 3 per cent of the clock it is a factor of more than two in decibels.
Four sincs, measured
The rejection figures rest on each rectangle adding exactly . That is a statement about transforms and it is worth checking on the waveforms a converter actually emits.
Read from the transform of each output, the hold leaves the image 25.6 dB below a signal at a twentieth of the clock, and each further rectangle adds the same 25.6: 51.1 for the straight line, 76.7 for the quadratic, 102.3 for the cubic, each to a thousandth of a decibel of times the distance ratio. At a tenth of the clock the step is 19.1 dB and the cubic reaches 76.3. One knob, and the two exponents it turns found the hold’s image rejection growing with the oversampling ratio; here the same ratio, seen from inside a loop, is the crossover, and the pulse’s length multiplies it.
A motion loop, worked
A motor drive clocked at 20 kHz with a current loop crossing over at 1 kHz runs at a twentieth of its clock. Its converter — a pulse-width modulator’s average, or a digital-to-analogue converter driving a linear amplifier — would put an image near 19 kHz into the winding, which is audible and heats the copper. Held, that image is 25.6 dB below the signal; with a straight-line output 51.1; with the quadratic pulse 76.7, at an overshoot of 2.9 per cent; with the cubic 102.3, at 13.6.
If the specification is sixty decibels the quadratic pulse meets it with nearly the whole margin intact, a clock and a half of delay at 20 kHz being 75 µs. Meeting it with poles after a hold means 34 dB more from the filter; the best equal poles for a forty-five-degree loop at this crossover reach 67.2 dB in total, so they can, but six of them near 10 kHz is an analogue filter of sixth order whose tolerance, temperature drift and component count a pulse does not have. A pulse is arithmetic in the converter’s own logic, and it drifts with nothing.
A loop clocked ten times faster than its crossover has a different answer. At a tenth of the clock only the straight line fits a forty-five-degree margin, it gives 38.2 dB, and two well-placed poles give nearly the same. Such a loop, if it needs more rejection, needs a faster clock more than it needs either.
What a designer should take
Count reconstruction against the margin, not against the filter it replaces. An integrator loop has ninety degrees; a pulse of rectangles spends of them. The longest pulse a loop can afford while keeping a margin is rectangles, rounded down: four — the cubic — at a sixteenth of the clock for forty-five degrees, two at an eighth.
Never match analogue poles one for one to the sincs a long pulse would supply: they sit at the crossover, and three of them leave no margin at any speed. If poles must be used, place them near half the clock and use several; where a pulse of three rectangles or more would fit, they will buy between about half and three-quarters of what it would.
And trust the phase estimate more for long pulses than for short ones. The forty-five-degree points of the straight line, the quadratic and the cubic all overshoot about 26 per cent when marched, because the longer the pulse the slower the loop at which it reaches that margin. Two measurements of one margin is why the step is still the measurement to believe, and what is left at crossover is how a margin is read when a loop can be cut.
How the loops were marched
The loop is marched in units of clocks. At each clock edge the controller takes the plant’s output and the converter’s next sample is one minus it; the converter’s output inside each clock is the sum of the last samples’ B-spline pulses, evaluated only within the clock it belongs to, since the next sample has not been taken. The plant integrates at a gain putting the continuous crossover at of the clock; when poles are present, the converter’s output passes through a cascade of them first. Integration is fourth-order Runge–Kutta at eighty steps a clock for at least forty clocks and eight loop time constants, and the cascade integrator is checked against the single-pole one on the straight line before it is trusted with three poles. A loop is called unsettled when its last sixth swings more than its first. The best poles are searched over every count from one to four hundred, each at the corner that spends an equal share of the budget at the crossover. Images are read from twenty-clock records of each output at 256 points a clock.
What it leaves out
Filters other than equal real poles. A Butterworth or Bessel filter of the same order places complex poles and spends its phase differently; a Bessel filter is designed to have the flattest delay, which is exactly the quantity a loop counts. The comparison here is against the simplest analogue filter of each order, and a better one would close part of the gap. Whether it closes all of it is a calculation on the same budget.
Plants that are not integrators. A plant with its own pole near the crossover already spends some of the ninety degrees, so every pulse fits at a slower loop than drawn. The ranking per unit of phase is unaffected, since it does not involve the plant.
A mechanical resonance. The image is not the only thing a motion loop wants attenuated between its crossover and its clock; a structural mode often matters more, and a pole near it attenuates the mode while a pulse attenuates mainly near the clock’s multiples. That trade is not drawn here.
Still open: the delay-flat filter, the resonance between, and the pulse that is not a spline
A Bessel filter against the pulse. A Bessel filter is the analogue filter whose phase is most nearly a pure delay, so in a loop it should behave most like a pulse of the same delay. Matching its order and delay to the cubic’s two clocks and comparing the image each leaves would say whether a pulse is better than any analogue filter of equal delay or only better than equal real poles.
A resonance between the crossover and the clock. A two-mass plant with a mode at, say, a third of the clock is the case a motion loop’s designer actually meets. A pulse’s attenuation at a third of the clock is a few sincs’ worth; a pole placed at the mode attenuates it far more. Where the mode is, relative to the clock and the crossover, decides which reconstruction protects the mechanism better, and the marched two-mass loop would draw the boundary.
A pulse designed for the loop. The B-splines are one family; a converter can emit any pulse it can compute. A pulse that puts zeros on the image’s band while keeping its delay shorter than a spline of equal rejection — trading the spline’s smoothness for less delay — would move the longest-pulse boundary, and the question is how far below clocks the delay can be pushed for sincs’ worth of rejection.
Part 8 on reconstruction
One argument about Reconstruction, and one of 8 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.
Anti imaging filterDesign tradeoffFilter orderLoop gainPhase marginReconstructionZero-order hold
- The band a sampled loop repays in design tradeoff, loop gain, phase margin, zero-order hold
- Flatness, and the two currencies it is bought in design tradeoff, reconstruction, zero-order hold
- The capacitance the bias takes away design tradeoff, loop gain, phase margin
- The capacitor across the upper resistor design tradeoff, loop gain, phase margin
- The floor a second capacitor removes design tradeoff, loop gain, phase margin
- The gain added to buy a margin design tradeoff, loop gain, phase margin