Control Systems
First-Order Low-Pass Filter Discretization

First-Order Low-Pass Filter Discretization

Interactive Low-Pass Filter Studio

The scope is clickable & draggable - interactive demo is here.

Your browser does not support the HTML5 canvas tag.

Input: Sine
Input: Step
Corner Frequency "w": 5.00rad/s
Sampling Frequency "fs": 500.00Hz
Your browser does not support the HTML5 canvas tag.
Your browser does not support the HTML5 canvas tag.

Bode plot of the discrete low-pass filter (interactive).

Your browser does not support the HTML5 canvas tag.
Your browser does not support the HTML5 canvas tag.


The Basics

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

  1. Determine the corner frequency of your low-pass filter. The corner frequency should be at most 10% of the system sample rate.
  2. Discretize- use the "zero-order hold" approach. The reason to use this approach is to emulate the sample & hold behavior:

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:

MatLab script

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.

MatLab(©) Code

% First-order Low-Pass Filter Discretization
% Control Systems Academy team
% 6/25/2017

clc; format compact

% Continuous time filter
s = tf('s');
w = 50; % rad/s

H = w/(s+w)

T = 1/500;
Hd = c2d(H,T,'zoh')

opts = bodeoptions;
opts.FreqUnits = 'rad/s';
opts.XLim = [0.01, 10000];
opts.Grid = 'on';

bode(H,Hd, opts)

% no more

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.

Thought Nuggets

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.



Proportional Controller Implementation

In MatLab, DSPs, and FPGAs.


Control System Block Diagram

The fundamentals of signal flow.


System Modeling With Transfer Functions

Introduction to dynamic systems.


Fourier Series Demo

It is all sine waves.

Please leave us a comment regarding the content at this page.

Website Partially Powered by w3.css