next up previous
Next: Finite impulse response (FIR) Up: Digital filter design with Previous: Digital filter design with

Infinite impulse response (IIR) filters

These correspond to recursive systems derived from DE's of the form :

displaymath952

So there will be 2 Matlab arrays a and b to be calculated in the design.

Butterworth filters
The Butterworth design is good for flatness in the pass band and monotonic frequency response overall.It is not as good as some for sharp roll-off.

Some Matlab conventions :

  1. If the filter type is unspecified it defaults to low pass
  2. The frequency scale is normalized frequency ( tex2html_wrap_inline958 ) rather than our usual digital frequency ( tex2html_wrap_inline872 ).
  3. A cut-off frequency ( tex2html_wrap_inline962 ) is where the response falls to tex2html_wrap_inline964 of the pass band response.

% Examples of Butterworth filter design using Matlab function "butter"
%
[b,a]=butter(n,0.4)  % nth order low pass filter with normalized
%						 cut-off frequency 0.4
[b,a]=butter(n,0.4,'high')  % nth order high pass filter
[b,a]=butter(n,[0.2 0.5])    % 2*nth order bandpass filter with edge
%						 frequencies 0.2 and 0.5
[b,a]=butter(n,[0.2 0.5],'stop')    % nth order bandstop filter with edge
%						 frequencies 0.2 and 0.5
%
y=filter(b,a,x) % This applies the filter to the input data "x"

Other IIR filter types implemented in Matlab are :

displaymath477

See the Matlab on-line help for how to use these functions.

Direct IIR filter design

Direct filter design means that the response is specified directly i.e. numerically in the frequency domain (so we are not limited to the standard types like low pass , bandpass etc.)

The Yule-Walker design implemented with Matlab `yulewalk'

[b,a]=yulewalk(n,f,m)
%
% n is the order of the transfer function or DE
% f is a vector of frequency points ranging from 0 to 1 where the response
% is to be specified
%
% m is a vector containing the desired response at the frequencies
% specified in f

Yule-Walker example - a double bandpass filter



Keith Jones
Tue Oct 27 11:32:15 EST 1998