Digital Signal Processing Using MATLAB and Wavelets

Chapter 3 - Filters

We are often interested in manipulating a signal. For example, you might turn up the volume on a stereo system, boost the bass (low-frequency sounds), or adjust sounds in other frequency ranges with the equalizer. These examples are not necessarily digital signal processing, since they can also be done with analog parts, but they do serve as examples of ways we might want to change a signal. Filters allow us to change signals in these ways. How does a filter function? Architecturally, how do we make a filter? We will examine these questions and more in this chapter.

Figure 3.1 (top) shows an example signal, the low temperatures from Chapter 1, "Introduction.' In the middle, we see the output from a lowpass filter, i.e., a filter that keeps the low-frequency information. Notice how much it looks like the original. Also, you may see that the filtered version has one more value than the original, owing to the effect of the filter (the number of filter outputs equals the number of inputs plus the number of filter coefficients minus one). The bottom graph on this figure shows the output from a highpass filter, which allows the rapidly changing part of the signal through. We see that most of the points are around zero, indicating little change. However, a visible dip around output 5 shows how the big change between input samples 4 and 5 becomes encoded here.

Shown in Figure 3.2 is the original frequency content of the example input signal (top). The distinctive pattern seen here owes its shape to the sharp drop between the end of the input signal and zeros used to pad the signal. The sinc function can be used to model this phenomenon, and often windows are used to minimize this effect by allowing the signal to gradually rise at the beginning, then slowly taper off at the end. A triangle function is one example of such a window.

In the middle of Figure 3.2, the lowpass impulse response appears, which gives us an idea of how the filter will affect our signal. The low frequencies will get through it well, but the higher frequencies will be attenuated (zeroed out). For example, an

Figure 3.1: An example signal, filtered.
.

input frequency of 60 Hz will still be present in the output, but only at about 10% of its original strength. We can see this by looking at the spot marked 60 along the x-axis, and looking up to see the lowpass impulse response is right around the 10% mark on the y-axis.

The bottom plot on Figure 3.2 has the highpass impulse response, showing the opposite effect of the plot above it. This one will allow the high-frequency content through, but attenuate the low-frequency content. Note that both filters here are not ideal, since they have a long, slow slope. We would expect that a good filter would have a sharper cutoff, and appear more like a square wave. These filters were made using only 2 filter coefficients, [0.5, 0.5] for the lowpass filter, and [0.5, -0.5] for the highpass filter. These particular values will be used again, especially in Chapter 9, "The Wavelet Transform.' For the moment, suffice it to say that having few filter coefficients leads to impulse responses like those seen in Figure 3.2.

Figure 3.2: The frequency content of the example signal, and low/highpass filters.

Finite Impulse Response (FIR) filters are a simple class of filters that perform much of the work of digital signal processing. They are composed of multipliers, adders, and delay elements. In diagrams showing filters, we show a plus sign within a circle. Strictly speaking, this is a summation whenever the number of inputs is greater than two. Architecturally, the summation can be implemented with an adder tree.

Multipliers are rather complex parts, so sometimes they may be replaced by simpler parts. For example, to multiply by 8, it is easier to shift the number three places to the left (since 23=8 ). Of course, the drawback here is that a shift register is not as flexible as a multiplier, and this would only work if the value-to-multiply-by is always a power of 2.

The delay elements can be thought of as registers, in fact, since registers are used to store a value for a short period of time, a register actually implements a delay element. Having two registers in a row has the effect of delaying the signal by two time units. In Figure 3.3, we show this for the general case. The output from the delay unit(s) appears as a time-shifted version of the input. When the second input value enters a single delay unit, the first input value would exit, leading to $x[n]$ entering on the left and $x[n-1]$ exiting on the right. If we consider a group of $k$ delay units, $x[n-k]$ would exit as $x[n]$ enters.

Figure 3.3: A digital signal, delayed, appears as a time-shifted version of itself.

The name "Finite Impulse Response' comes from the way the filter affects a signal. An impulse function is an interesting input, where the signal is 0 everywhere, except for one place where it has the value of 1 (a single unit). An FIR filter's response to this input is finite in duration, and thus it bears the name Finite Impulse Response filter.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: DSP Boards
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.