**<< Previous page TOC INDEX Next page >>**

## Motivating Example and Overview

Suppose you look up the documentation for a “comb filter” in a software package you are using, and you find it described as follows:

out(n) = input(n) + feedforward * input(n-delay1) - feedback * out(n-delay2)Does this tell you everything you need to know? Well, it does tell you exactly what is implemented, but to really understand it, you need to see itsfrequency response. Moreover, ifdelay2corresponds to more than a a few milliseconds, you probably want to see itsimpulse responseas well. The purpose of this appendix is to describe how to do this analysis.To analyze our example, let’s first write it in a more “mathematical” form:

The transfer function is derived by taking the transform of both side of this equation and solving for the transfer function, defined as :

The principles of this derivation are as follows

- The transform is a
linear operatorwhich implies- . That is, the transform of a signal
delayedby samples, , has the transform . This is theshift theoremfor transforms, which can be immediately derived from the definition of the transform, as we do below.Given the transfer function , the

frequency responseis obtained by setting , where is the sampling interval in seconds, and isradian frequencywhich ranges from (minus half the sampling rate in radians per second) to (plus half the sampling rate).

In the special case , we obtain

This special case gives insight into the behavior of the filter as its coefficients and get approach 1. When , the filter degenerates to which corresponds to ; in this case, the delayed input and output signals cancel each other out.Since the frequency response is a complex-valued function, it has a

magnitudeandphase angle. The magnitude of the frequency response is called theamplitude response, and gives the filtergainat each frequency . In this example, the amplitude response is

which, for , reduces to

FIXME: Give Matlab code and plot of amplitude response hereThe phase of the frequency response is called the

phase response. Like the phase of any complex number, it is given by the arctangent of the imaginary part of divided by its real part, and it contains information about thedelayof the filter at each frequency. The phase response is a good measure of filter delay when those delays are short (less than a few milliseconds, say). For longer delays, it is usually best to study the filterimpulse response, which can be defined as the inverse- transform of the filter transfer function (or the inverse Fourier transform of the frequency response).

FIXME: Give Matlab code and plot of phase response and impulse responseThis section has provided an overview of filter analysis in the frequency domain. We see that a complete understanding of this analysis requires understanding of

complex numbersand the elements of the transform. A tutorial introduction to these topics is provided in Music 320 Background Reader. Here we will assume that background and focus on practical digital filterstructures and their frequency-domain analysis.