Inside Collection (Course): Fundamentals of Signal Processing(thu)

Summary: Investigation of different aspects of filtering in the frequency domain, particularly the use of discrete Fourier transforms.

Because we are interested in actual computations
rather than analytic calculations, we must consider the details
of the discrete Fourier transform. To compute the
length-*a unit-sample input, which has
*.

This statement is a very important result. Derive it yourself.

The DTFT of the unit sample equals a constant (equaling 1). Thus, the Fourier transform of the output equals the transfer function.

In the time-domain, the output for a unit-sample input is known as the
system's unit-sample response, and is denoted by
*in terms of the discrete-time Fourier
transform*.

Returning to the issue of how to use the DFT to perform
filtering, we can analytically specify the frequency response,
and derive the corresponding
length-

Derive the minimal DFT length for a
length-

In sampling a discrete-time signal's Fourier transform

Express the unit-sample response of a FIR filter in terms of difference equation coefficients. Note that the corresponding question for IIR filters is far more difficult to answer: Consider the example.

The difference equation for an FIR filter has the form

For IIR systems, we cannot use the DFT to find
the system's unit-sample response: aliasing of the unit-sample
response will *always* occur. Consequently,
we can only implement an IIR filter accurately in the time
domain with the system's difference
equation. *Frequency-domain implementations are
restricted to FIR filters.*

Another issue arises in frequency-domain filtering that is
related to time-domain aliasing, this time when we consider the
output. Assume we have an input signal having duration

In words, we express this result as "The output's duration equals the input's duration plus the filter's duration minus one.". Demonstrate the accuracy of this statement.

The unit-sample response's duration is

The main theme of this result is that a
filter's output extends longer than either its input or its
unit-sample response. Thus, to avoid aliasing when we use DFTs,
the dominant factor is not the duration of input or of the
unit-sample response, but of the output. Thus, the number of
values at which we must evaluate the frequency response's DFT
must be at least

Before detailing this procedure, let's clarify
why so many new issues arose in trying to develop a
frequency-domain implementation of linear filtering. The
frequency-domain relationship between a filter's input
and output is *always* true:
*continuous* frequency variable

Did you know that two kinds of infinities can be
meaningfully defined? A countably infinite quantity
means that it can be associated with a limiting process
associated with integers. An uncountably infinite
quantity cannot be so associated. The number of rational
numbers is countably infinite (the numerator and denominator
correspond to locating the rational by row and column; the total
number so-located can be counted, voila!); the number of
irrational numbers is uncountably infinite. Guess which is
"bigger?"

Suppose we want to average daily stock prices
taken over last year to yield a running weekly average
(average over five trading sessions). The filter we want is a
length-5 averager (as shown in the unit-sample response),
and the input's duration is 253 (365 calendar days minus
weekend days and holidays). The output duration will be

Figure 2 shows the input and the filtered output. The MATLAB programs that compute the filtered output in the time and frequency domains are

```
Time Domain
h = [1 1 1 1 1]/5;
y = filter(h,1,[djia zeros(1,4)]);
Frequency Domain
h = [1 1 1 1 1]/5;
DJIA = fft(djia, 512);
H = fft(h, 512);
Y = H.*X;
y = ifft(Y);
```

The

`filter`

program has the
feature that the length of its output equals the length of
its input. To force it to produce a signal having the
proper length, the program zero-pads the input
appropriately.`fft`

function
automatically zero-pads its input if the specified transform
length (its second argument) exceeds the signal's
length. The frequency domain result will have a small
imaginary component — largest value is An interesting signal processing aspect of this example is demonstrated at the beginning and end of the output. The ramping up and down that occurs can be traced to assuming the input is zero before it begins and after it ends. The filter "sees" these initial and final values as the difference equation passes over the input. These artifacts can be handled in two ways: we can just ignore the edge effects or the data from previous and succeeding years' last and first week, respectively, can be placed at the ends.

- « Previous module in collection Understanding Pole/Zero Plots on the Z-Plane
- Collection home: Fundamentals of Signal Processing(thu)
- Next module in collection » Linear-Phase FIR Filters

Comments:"Electrical Engineering Digital Processing Systems in Braille."