What Are Transfer Functions, Poles, And Zeroes?
Transfer functions are a way of describing the frequency and phase response of a LTI (linear time invariant) system. The system can be anything with a measurable input and output, e.g. mechanical spring/mass/dampers, electronic RLC circuits, e.t.c. This page will put an emphasis on electrical transfer functions in the continuous-time domain.
The Laplace Domain
Transfer functions are usually written in the Laplace domain using the variable , where is equal to:
where:
is the real part which determines the exponential increase/decrease
is the imaginary number (), also seen as in maths ( is used in electronics as to not get confused with current)
is the angular frequency, in units . Remember that
Because we normally only care about what happens to steady-state sinusoidal signals (i.e. transients have all died away), we can simplify the equation by setting , as encodes the exponentially increasing/decaying components. This is essentially simplifying the general Laplace transform to the simpler Fourier transform, and thus becomes:
Transfer functions describe the relationship between output and input (typically of voltage, but it doesn’t have to be). The below equation shows this relationship. We will use the symbol is represent the transfer function (we are referring to a continuous-time system here, you might see used for a discrete-time system).
The above equation is great, but is really just one of those “be definition” equations and doesn’t tell you anything about an electrical system (e.g. filter). The real usefulness comes in when you can write in terms of the circuit components, typically using KVL/KCL. This lets you write the transfer function with a polynomial on top and bottom:
This is much more useful! It tells use everything we need to know about the electrical system (more on this below).
Magnitude and Phase
Note that because we are using the complex variable , the transfer function encodes both magnitude and phase relationships between the output and input. On it’s own, it’s complex in nature and not really useful for deducing anything “measurable”. But, using two clever tricks, you can separately extract the magnitude and phase response equations from . The below diagram shows the value of at a single frequency , and how the magnitude and phase information is encoded in this (more on this below).
Bear in mind that the above plot shows at a single frequency. This point will move around as the frequency changes. The magnitude response is found by taking the magnitude of , which is as shown in the below equation.
You might see the magnitude (gain) written as . This is equivalent to the magnitude of , i.e.:
A is used with for the gain rather than because the process of taking the magnitude of removes all imaginary components, leaving a function which is just dependent on and not .
To calculate the magnitude of the numerator and denominator, you generally:
- Substitute in for into the polynomials on the top and bottom of the transfer function.
- Simplify any ‘s that are now risen to powers. For example, , , e.t.c.
- Group all the real components together, and group all the imaginary components together, so it’s in the form .
- Now that we’ve grouped the real and imaginary components, we can use the rule . This removes the imaginary component from the equation.
- Simplify as needed.
The phase response is found by finding the angle of the complex number from the positive x-axis, as shown below:
where:
is the argument (implemented with in many software packages)
is the imaginary part of
is the real part of
Rather than finding the imaginary and real parts of the entire transfer function to calculate the phase, it can be easier to work out the real/imaginary parts for the numerator/denominator separately:
is sometimes written as . When calculating the phase response it removes the imaginary components of the complex numbers and you’re left with an angle that is a function of just .
Poles and Zeroes
A value of that causes the a transfer function to be 0 is called a zero, and a value of that causes the transfer function to be infinite is called a pole. Zeroes generally occur when a factor in the numerator is 0 (one notable exception is that a zero can also occur as , if the denominator is of higher order than the numerator), poles generally occur when a factor in the denominator is 0. Poles that have an imaginary component always come in pairs (conjugate pairs).
Intuitively, you can think of zeroes as places in where the system completely blocks a certain frequency (as the numerator goes to 0, so does the entire function). A poles is a frequency where the system has infinite response (at least mathematically, as the denominator goes to 0, the function goes to infinity). Poles in the right-half of the Argand diagram (which have a positive real component) cause the system to diverge towards infinity, and your system will be unstable.
The zeroes are the roots of the numerator polynomial, and the poles are the roots of the denominator polynomial. For this reason they are also referred to generally as roots.
The poles and zeros of a system can tell you much about how the system performs — it can tell you if the system is stable, and how fast it responds. In fact, the poles and zeroes completely characterize the filter, except for the overall gain constant 1.
For example, the transfer function below has a pole at the origin and a zero at infinity. This simple transfer function represents an integrator. A constant voltage applied to it will result in an output climbs without any limit. However, at high frequencies, the output is essentially zero as the positive and negative parts of the waveform are averaged out over time.
Pole Zero Plots (Argand Diagrams)
Poles and zeroes are plotted in a Argand diagram in what is called a pole-zero plot to give the reader an understanding on how the circuit responds.
- Zeroes contribute +90 of phase and increase the magnitude, above the zero frequency.
- Poles contribute -90 of phase and decrease the magnitude, above the pole frequency.
Poles are normally drawn as X’s on the graph, and zeroes as O’s. Unless you are building an oscillator, poles in the right-hand half of the plane (having a positive real component) are a bad thing, as they represent an instability.
Group Delay
The group delay is defined as the negative of the slope of the phase vs. frequency plot. This can be written mathematically as:
where:
is the phase response of the filter, also written as
Intuitively, you can think of group delay as the time delay in seconds that a signal takes to pass through a filter as a function of frequency. Group delay has units of seconds. All casual filters (e.g. analogue filters) will have a non-zero, positive group delay. “Flatish” group delay plots in the passband are generally desirable as this means all frequencies will take the same time to pass through the filter, and thus the signal at the output will have minimal distortion (distortion is a result of different frequencies being delayed for different amounts of time).
Group delay for a number of 4-order filter tunings is shown below. The Bessel filter tuning aims to have maximally flat group delay across the pass-band of the signal (at the expense of other metrics we don’t talk about here). You can see this in the plot with the straight green line.
Group delay can be calculated in Python with scipy
. scipy
provides the scipy.signal.group_delay()
function which takes as input the numerator and denominator coefficients of the transfer function and returns the calculated group delay.
The Transfer Function Of A Low-Pass RC Filter
A first-order low-pass RC filter has the transfer function:
Using , we can replace with to get:
This system has a pole at and a zero at .
We can find the magnitude response of this low-pass RC filter by taking the magnitude of , remembering that the magnitude of a complex number is defined as:
The above equation shows the final result. Notice that by finding the magnitude, the imaginary components are gone! We can plot this on a graph.
We can find the phase response of the low-pass RC filter by using rule in .
Transfer Function Design Tools
Wolfram Alpha
Wolfram Alpha can take a transfer function and calculate many of it’s properties. It recognises the keywords transfer function
in front of the numerator/denominator. For example, if you input in it’s search bar (which is a 2nd-order Bessel-tuned filter):
It will spit back at you things like the unit step response, state space representation, zeroes and poles, bode plot, Nyquist plot, Nichols plot, Root locus plot, gain margin and phase margin2. Click here to jump to these results in Wolfram Alpha.
OKAWA Transfer Function Analysis and Design Tool
The OKAWA Electric Design website has a Transfer Function Analysis and Design tool which can calculate many of the same things the Wolfram Alpha tool can3.
Further Reading
See the Filter Tunings page for info Butterworth, Chebyshev, Bessel and Elliptic analogue filter tunings and how to create their transfer functions from specific polynomials.
If you are interested in digital filters, you can check out the Windowed Moving Average Filters page and the Exponential Moving Average (EMA) Filters page.
Footnotes
-
MIT: Department of Mechanical Engineering. 2.14 Analysis and Design of Feedback Control Systems: Understanding Poles and Zeros. Retrieved 2022-10-24, from https://web.mit.edu/2.14/www/Handouts/PoleZero.pdf. ↩
-
Wolfram Alpha. Results from providing the input text “transfer function (3)/(s^2+3s+3)“. Retrieved 2022-10-22, from https://www.wolframalpha.com/input?i=transfer+function+%283%29%2F%28s%5E2%2B3s%2B3%29. ↩ ↩2
-
OKAWA Electric Design. Transfer Function Analysis and Design Tool. Retrieved 2022-10-23, from http://sim.okawa-denshi.jp/en/dtool.php. ↩