Digital Signal Processing Reference
In-Depth Information
Suppose that we are given the transfer function of an IIR filter:
k = 0 b k z k
1 + k = 1 a k z k
H(z 1 )
=
There are two equivalent approaches to find the frequency response of this filter
as described below.
We find the inverse z transform h(n) of H(z 1 ) , which gives an infinite number
of samples of its unit impulse response, and now we can evaluate its frequency
response or its DTFT as H(e )
= r = 0 h(n)e jωr . The other approach uses
+ k = 1 a k y(n
= k = 0 b k x(n
the difference equation y(n)
k)
k) and finds
the DTFT of both sides as given by
Y(e ) 1 +
a k e jωk
N
M
X(e )
b k e jωk
=
k
= 1
k
= 0
so that
k = 0 b k e jωk
1 + k = 1 a k e jωk
H(e )
=
(3.66)
H(z 1 ) z = e , provided both exist.
To compute and plot the magnitude, phase, and/or the group delay of the FIR
or IIR filter transfer functions H(z 1 ) , we use the MATLAB functions freqz,
abs, angle, unwrap, grpdelay very extensively in signal processing and
filter design. These functions are found in the Signal Processing Toolbox of
MATLAB.
When the sequence of coefficients b k and a k are known, they are entered as
the values in the vectors for the numerator and denominator. The function freqz
is used with several variations for the input variables as described below:
In short, we can state that H(e )
=
[h,w] = freqz(num,den,w)
[h,w] = freqz(num, den, f, Fs)
[h,w] = freqz(num,den,K,Fs)
[h,w] = freqz(num,den,K,'whole')
[h,f] = freqz(num,den,K,'whole',Fs)}
The vectors num and den are the row vectors of the numerator and denominator
coefficients a k and b k , respectively. The function freqz computes the values
of the frequency response as a column vector h at the discrete values of the
frequency w . The set of default frequencies w lie between 0 and π ,andtheset f
is the vector of values for the frequencies we can arbitrarily distinguish between
0and Fs/2 ,where Fs is the sampling frequency in hertz. We can choose a value
for K as the number of frequency points within the default range; preferably K
Search WWH ::




Custom Search