The advent of the importance
of Digital Signal Processing was heralded by the arrival of inexpensive,
powerful microprocessors and the discovery of the fast fourier transform. The ability to process a signal in real-time
has led to the integration of DSP technology into countless areas of our
lives. Everything from such devices as mobile phones, multimedia
computers, video recorders, CD players, modems, and automobiles now utilize
DSP’s in some fashion.
An important operation in
digital signal processing is that of filtering a signal. Filtering is done for many reasons – filters
can remove unwanted parts of the signal, such as random noise. They can extract
useful parts of the signal, such as the components lying within a certain
frequency range. The general process
used to filter analog signals is as follows:
- Using an analog to digital converter, sample and
digitize the analog signal. The
result will be stored as a sequence of bits.
- Apply the filter to the data. This involves numerous multiplies (to
find the product of the data sample and the filter coefficients) and adds
(to find the sum of the current and previous weighted data samples).
- The filtered signal is then passed through a
digital to analog converter to convert the signal back to its original
analog form.
Thus, while analog filters
work operate on voltages and currents, digital filters operate on sequences of
bits.
The “theory” behind a
digital filter is as follows:
Suppose the signal that we wish to apply our
digital filter to is originally in the form of a voltage waveform described by
the function
V = x
(t)
where t is time and can be any positive real
number.
This signal is sampled at time intervals h
(the sampling interval). The sampled value at time t = kh (where k is a
positive integer) is
xi
= x (kh).
Thus the digital values returned by the ADC
to be transferred to the DSP can be described by the sequence
x0,
x1, x2, x3, ...
corresponding to the values of the signal
waveform at times t = 0, h, 2h, 3h, ... (where t = 0 is the
instant at which sampling begins). Note
that each xn is represented by a sequence of bits.
At time t = nh (where n is
some positive integer), the values available to the processor, stored in
memory, are
x0,
x1, x2, x3, ... , xn
Note that the sampled values xn+1,
xn+2 etc. are not available as they occur in the future. Thus, we cannot design anticipative digital
filters, as they would require the knowledge of future sampled values of the
signal.
The filter H is applied to each data
sample. In general, the value of the
filtered signal at a particular instance depends on previous values of the
signal. A filter’s order describes how
many previous inputs the output of the filter depends on. For example, the output of a 2nd
order filter depends on the current signal sample and the two previous signal
samples. Thus, a filter’s order is an
integer greater than or equal to zero. The digital output from the processor to
the DAC consists of the sequence of values
y0, y1,
y2, y3, ... , yn