The scope is clickable & draggable - interactive demo is here.
Bode plot of the discrete low-pass filter (interactive).
It has occurred to me that most engineers and scientists are quite familiar with the basic formula of an infinite-impulse response (IIR) low-pass filter (LPF):
This low-pass filter variation is easy to implement on processors or FPGAs.
Also, such filter should in some way correspond to the following first-order continuous-time transfer function:
In this short tutorial, we will derive the relationship between the corner frequency "omega" in the continuous time domain and the "a" coefficient in the sampled time domain.
First-order IIR Low-pass Filter Design & Discretization
A continuous-time domain filter with input and output signals is shown below:
Continuous-time domain signals and a digital filter are represented as:
The formula to discretize a transfer function preceded by a zero-order hold follows:
From Laplace to Z-domain lookup table:
A bit more rearranging leads to:
The next step is to do an inverse Z-transform:
And shift by one sample:
A basic MatLab script (below) verifies the equivalency between the continuous transfer function and its discrete time-domain counterpart.
Note that the sampling rate was chosen as 500 Hz and the break frequency as 50 rad/s or ~8 Hz.
Magnitude and Phase Bode plots of a continuous low-pass filter with corner frequency 50 rad/s. The discrete counterpart has 200 Hz sampling frequency.
Q: Can IIR (infinite-impulse response) filters become unstable?
A: Yes. These filters have a negative-feedback path and a single incorrect parameter computation can result in oscillations or output out-of-bound instability.
The benefit of IIR filters is their ease of use with constant coefficients and a simple transfer function representation.
FIR filters are generally used in more advanced digital signal processing (DSP), such as in transceivers.
Version of this article is 6/25/2017.