till.com Articles

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) = \frac{z_ns^n + \ldots + z_2s^2 + z_1s + z_0} {p_ns^n + \ldots + p_2s^2 + p_1s + p_0} \]

Where:

\( 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.

Interactive Demo

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.

What's Happening?

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

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.

The polynomial roots are found with this Javascript implementation of the Durand–Kerner method.

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.

Copyright 2018, J. Donald Tillman

Email: don -at- till.com

Web page: till.com