Root Locus Demo of Real Poles with Feedback
Donald Tillman, Sept 18, 2018
A passive filter built with just resistors and capacitors will have its poles positioned along the negative real axis. Adding feedback to such a circuit will cause the pole positions to move, first pairing up along the real axis, and then splitting off onto the complex plane. This is an interactive simulation of that behavior.
The technical term is root locus. I call it pole dancing, although as you will see, it ends up being something between a minuet and square dancing.
A Super Concise Introduction
The transfer function of a filter is described in the form of a fraction with polynomials on both the numerator and denominator.
\( H(s) \) is the filter transfer function
\( s \) is the complex frequency \( \alpha + j\omega \)
\( z \) is the set of numerator (zero) coefficients
and \( p \) is the set of denomenator (pole) coefficients
The numerator determines the overall type of the filter (low-pass, high-pass, etc.) and the roots of the numerator polynomial are called the zeros. The denominator determines the characteristic shape of the curve (resonances, sharpness, etc.) and the roots of the denominator polynomial are called the poles.
The poles and zeros can be real or complex. Complex roots will exist as conjugate pairs. The arrangement of the poles and zeros on the complex plane is of great interest. The poles have to be on the left half of the plane for stability (for it to be a filter and not an oscillator). Poles on the real axis are smooth, gradual filter responses. Complex poles off the real axis are resonant with sharper curves.
A passive RC filter has poles positioned on the negative real axis. You can turn that into an active filter by tapping of the signal at one point, applying some gain, and feeding that signal back into the circuit at another point. It could be voltage gain or current gain, postive gain or negative gain; there are all sorts of circuit variations. Adding this feedback causes the poles on the negative real axis to move from their original positions, and come together as pairs sharing a value, then splitting off into conjugate pairs, positive and negative imaginary values with a common real value. This is called a root locus in system theory.
Here is a demonstration of that effect. Click to place poles on the negative real axis of the complex plane. Then add feedback to see how the real poles move around.
Placing the poles along the real axis creates the original polynomial. Applying feedback changes the value of one of the coefficients of that polynomial. The altered polynomial has different roots, and those are displayed here.
The primary Feedback s0 slider controls the amount and polarity of direct feedback altering the value of the 0th coefficient of the polynomial. The secondary Feedback s1 slider applies feedback as a derivative and affects the 1st coefficient of the root polynomial.
Complex poles can only exist in conjugate pairs; mirror images on either side of the real axis. So before any complex poles can be created, the real poles have to move around and pair up as double real poles. Only then can they split and leave the real axis. (‘Weirdly like sex or cell division in biology.)
Some Interesting Things To Note
- With a single pole, Feedback s0 will just move it along the X axis.
- Starting with two poles at the same location, applying positive feedback will spread them apart on the real axis. Applying negative feedback will release them from the real axis as complex conjugates, vertically, in a line straight up and down. There are similar effects for two poles placed anywhere on the real axis.
- With three poles at the same location, applying negative feedback will send two of them toward the Y axis and the third will fly to the left. Positive feedback goes in the other direction.
- For the case of three poles spread out, adding negative feedback will bring the rightmost two together first, and then they can leap off the real axis, straight lines angled toward the Y axis. Positive feedback will be the left-right reverse behavior.
- The Moog Ladder Filter has 4 real poles at the same location. As negative feedback is added, the poles split apart in an “X” shape, and grow from there. With enough feedback, the pole pair on the right side crosses the Y axis, and that's the oscillation point. Positive feedback splits the poles into a “+” shape, and is far less useful.
- With lots of poles at the same location, adding feedback spreads them out like a ferris wheel. Positive and negative feedback provide two different rotations.
- The second Feedback s1 slider addresses the second coefficient for the \(s^1\) term of the polynomial. You see this bahavior with Sallen-Key filters. So, starting with a double pole, adding positive feedback pops the poles off the real axis. But this time they go off in a semicircle. This is effectively a 2-pole filter with constant frequency and adjusting the Q.
- To simulate a State Variable Filter place two poles at the origin. That's a SVF running open loop. Then use the Feedback 0 slider to add negative \(s^0\) feedback to tune it. Without damping it's an oscillator. So then use the Feedback 1 slider to add some negative \(s^1\) feedback to adjust the Q down from infinity.
- You can use both types of feedback together and get this delightfully crazy movement of poles, where a pole on the left travels to the right, bumps into the right pole, they split, and the rest of the poles move over.
How it Works
Each mouse click adds to a list of real roots. Create a polynomial from those roots. The \(s^0\) and \(s^1\) coefficients of the polynomial get tweaked with the feedback factors. Then find the roots of the tweaked polynomial and present them on the plane. Plot a frequency response curve if the roots are all on the left hand plane.
Have fun! Tell me what you find.
Update, Jan 2023: The app has been rewritten in React, cube-law sliders for more resolution at smaller values, and the source code is up on github: Don Tillman: pole-dance.