Matlab and filter design

Digital Filtering and Digital Filter Design is a big subject, a major aspect of digital signal processing.
See my digital signal processing notes.

Matlab tools

Matlab offers several approaches to this, in particular there is an independent approach in the System Identification Toolbox. I type "filterbuilder" at the matlab command line and this fires up a GUI that lets me select filter types and enter parameters. When it is all done it yields a new workspace variable (such as Hpn2) in my workspace.

Using the matlab command "whos Hpn2" shows me this is a matlab object of type "dfilt.df2sos" (i.e. a digital filter).

LTI models

Matlab has 4 ways to represent LTI models and can convert from one to another for you. There are TF (transfer function), SS (state space), ZPK (zero pole gain), and FRD (frequency response data) models.

The tf operator will create a TF object from two arrays (numerator and denominator). This can then be converted to a state space model

num = [1,0];
den = [1 2 1];
f = tf(num,den);
s = ss(f);
Alternately use:
f = filt(num,den);

Simulink and filters

We are currently using two types of filters in our simulink models:
Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]