Worksheet 4 Digital Signal Processing 1 Introduction to Digital

Techniques of Physics
Worksheet 4 | Digital Signal Processing
1 Introduction to Digital Signal Processing
The eld of digital signal processing (DSP) is concerned with the processing of signals
that have been converted into digital data. DSP techniques have found application in
many areas including image processing, instrumentation and control, data compression,
audio, telecommunications and biomedicine to name but a few. Although primarily
a subject area of electronic engineering, an understanding of DSP can be extremely
valuable to anyone involved in science and technology, including physicists. Modern
physics experiments invariably use a data acquisition (DAQ) system to collect and
record data in digital form. The methods of DSP are then used to extract the required
information from the data. This might be done in real-time as the data is acquired or
`o-line' as the rst step in the analysis of the data.
1.1
Discrete-time Systems
A signal processor can be pictured as a `black box' with an input that receives a signal
and an output that transmits a version of that signal after it has been transformed
in some way. A digital signal processor receives and processes discrete-time signals
i.e. signals that have been sampled at regular time intervals1. A sampled signal is
basically a representation of a continuous signal d(t) by its values at discrete instants of
time, xn = d(nT ), where T is the interval between regular samples, and n = 0; 1; 2; : : :.
Sampled signals are usually digitised, i.e. each sample is converted to a numerical value
representing the magnitude of the signal at the instant of the sample, which enables
them to be processed digitally. With both sampling and digitisation there is a loss of
information and there are resulting side eects. An understanding of the side eects is
essential when considering DSP systems.
A system that process discrete-time signals is said to be linear if it obeys the principle
of superposition, i.e. the response of the system to two or more inputs is equal to the
sum of the separate responses to each input in the absence of other inputs. For example,
if a discrete-time input signal an gives rise to the output signal cn and bn gives rise to
dn then the input signal an + bn produces cn + dn . A discrete-time system is said to be
1 Signals
need not be time-based but for the purposes of this document we are going to always talk
in terms of time-based signals
1
yn
=
k=0
X1
hk xn k
(1)
2
where hk is the impulse response of the system. The convolution operation is shown
graphically in gure 1; each output is generated by a sum of products between one input
xn k and one coeÆcient from the impulse response of the discrete-time system, hk . As
a side remark, one might expect the convolution to be symmetrically centred around
a given xn value, using input data from both xn+i and xn i . However, in a real-time
data processing system, where one wants to generate an output with minimum delay
after acquiring each new input sample, the xn+i data are not available at the time of
the acquisition of xn, and so the convolution sum must work backwards from the most
recently acquired data.
If the input signal is in the form of an impulse i.e. xn = : : : ; 0; 0; 1; 0; 0; : : : the output
of the system is hk (although shifted in time.) Any input signal can be considered as a
sequence of impulses with dierent amplitudes so, by the principle of superposition, the
output is a sum of the responses to the individual input impulses. Hence, the output
is the convolution of the input signal with impulse response described by equation 1.
It is important to appreciate that the values of impulse response completely dene the
system. Once you know the impulse response you know everything about the system
and can calculate the output for any input signal.
An alternative and complementary way of looking at signals and the response of
systems is in the frequency domain. Signals can be described by the amplitude and phase
of their frequency components and systems can be described by their frequency response.
time invariant
if its output does not depend on the time that the input is applied, i.e.
the input signal xn gives output yn then the time-shifted input signal xn+i will give the
output yn+i. When a discrete-time system is both linear and time invariant its output
yn for an input signal xn is given by the convolution sum
Figure 1: The convolution of a sampled signal with a real-time system.
}
Converting between time domain and frequency domain descriptions involves the Fourier
transform, which allows a periodic signal d(t) with period T to be decomposed as a set
of components:
() =
d t
Cn
=
X1
= 1
1Z 2
n
T
Cn ej 2nt=T
T=
T=2
()
=
X1
n=
1
d t e j 2nt=T dt
Cn
(cos 2nt=T + j sin2nt=T )
(2)
A time domain signal x(t) and its frequency domain equivalent X (!) form a Fourier
transform pair and are related by:
X (! ) = F [x(t)]
x(t) = F 1 [X (! )]
(3)
where F represents the Fourier transform and F 1 represents the inverse Fourier transform. In general, X (!) is complex and can be written in the amplitude-phase form
jX (!)j exp(iX (!)) where X (!) is the frequency dependent phase angle. Similarly, a
system's impulse response h(t) forms a Fourier transform pair with the system's frequency response or transfer function, H (!):
H (! ) = F (h(t))
h(t) = F 1 (H (! )):
(4)
Since H (!) is a complex function it can modify both the amplitude spectrum and the
phase spectrum of the input signal.
In the frequency domain, the output of a system, Y (!), is calculated by multiplying
the input, X (!), by the transfer function H (!) i.e.
Y (! ) = H (! )X (! ):
(5)
Equation 5 is the frequency domain equivalent of convoluting the input signal in the
time domain with the impulse response, as can be seen by taking the Fourier transform
of y(t) = h(t) x(t) where the operator represents convolution:
F [y(t)] = F [h(t) x(t)]
F [y(t)] = F [h(t)] F [x(t)]
Y (! ) = H (! )X (! ):
(6)
In this working we have made use of the convolution theorem which states that
convolution in the time domain is equivalent to multiplication in the frequency domain
.e.
F [x1 (t) x2(t)] = X1(!)X2(!):
(7)
3
Similarly, multiplication in the time domain is equivalent to convolution in the frequency domain i.e.
F [x1 (t)x2 (t)] = X1(!) X2 (!):
(8)
When thinking about signal processing problems it can be very helpful to keep these
two relationships in mind.
Figures 2a){d) show a number of kinds of signals in the time domain, and their
representation in the frequency domain, which can be obtained by the application of
the Fourier Transform. The frequency domain diagrams show only the magnitude of
the frequency components, without any phase information; in general, the Cn coeÆcient
of any component is complex. A pure sine wave has only one frequency component, so
appears in a) as a delta function at the frequency of the signal. Note that a corresponding
frequency component exists with negative frequency, but the coeÆcient is of opposite
sign. The more general signal shown in b) is made up of a range of frequency components,
and in the arbitrary (non-periodic) signal case these components will form a continuous
distribution. For a periodic signal, such as the rectangular pulse shown in c), then
only discrete frequency components are required. The components are spaced by 1=T ,
where T is the period of the signal, and for the rectangular wave the coeÆcients of
the frequency components are given by the sinc() function, with nodes spaced by 1= ,
where tau is the width of each pulse. A special case of the periodic rectangular pulse
is the sampling function shown in d), where the width of the pulse has been reduced to
zero. The components are still spaced by 1=T , where T is now the sampling period, and
hence s = 1=T is the sampling frequency. The components are all of uniform height since
the nodes of the envelope are spaced at n1 | realistic sampling involves non-zero
sampling times, and so the distribution of components is not completely uniform.
1.2
Sampling
A sampled signal can be considered as being non-zero only at the regular sampling
instants and zero at other times. In the time domain, this is equivalent to multiplying
the continuous analogue signal by the innite sequence of Dirac delta functions (spaced
by the sampling period T ) which make up the sampling function. As has already been
stated in Section 1.1, multiplying in the time domain is equivalent to convolution in the
frequency domain so we need to take the Fourier transforms of the input signal and the
sampling function and convolute them.
First, consider again the pure sine wave; when multiplied in the time domain with the
sampling function, one obtains the sampled signal shown in Figure 2.e). The convolution
of the delta function of the signal with the sampling function results in the signal
appearing with an oset of d on either side of each integer multiple of the sampling
frequency, s. This pattern of signal appearing in upper and lower sidebands around
repeated harmonics of the sampling frequency, s, can be understood by expanding the
4
Time Domain
a)
Frequency Domain
Fourier Transform
Sinusoidal signal
0
t
b)
0 d
f
0
f
Arbitrary signal
0
c)
t
Periodic rectangular pulse
T
1/T
d)
f
t
0
-3/
T
0
-2/
1/
2/
3/
Sampling function
t
-s
Multiplication
e)
0
-1/
s=1/T
0
f
Convolution
Sampled sinusoidal signal
f)
0
t
-s-d -s+d
-d 0 d
s-d
s+d
f
Sampled arbitrary signal
0
t
-s
0
s
f
Figure 2: Time-domain { Frequency-domain equivalence and the eect of sampling a
signal.
5
sampling function, consisting of delta functions at times t = 0; T; 2T : : :, as a Fourier
series in terms of its cosine components as
z (t) = a0 + a1 cos !s t + a2 cos 2!s t + (9)
where !s = 2=T . If d(t) is a sinusoidal signal, sin !dt, then the sampled waveform x(t)
is given by multiplying the two time-domain functions
x(t) = sin !d t (a0 + a1 cos !s t + a2 cos 2!s t + )
= a0 sin !dt + a21 sin(!s !d)t + a21 sin(!s + !d)t +
a2
a2
sin(2
!s ! d ) t +
(10)
2
2 sin(2!s + !d)t + where the n!s !d terms follow from sin A cos B = [sin(A + B ) + sin(A B )]=2.
In general the input signal will consist of a range of frequencies with an upper limit,
which is perhaps determined by the limited frequency response of a transducer (see
Figure 2.b). When this signal is multiplied in the time domain by the sampling function
the result is the sampled signal shown in Figure 2.f). The convolution of the frequency
domain representations of the input signal and the sampling function is achieved by the
same expansion around harmonics of s applied to every frequency component of d(t).
This results in the frequency domain picture shown, with symmetric images of the input
signal around each integer multiple of the sampling frequency (only a few are shown on
the gure).
Problems occur if the input signal contains frequencies greater than s=2, the so-called
Nyquist frequency. In this case, the repeated spectra start to overlap as illustrated
in Figure 3 and it becomes impossible to distinguish in this overlap between input
frequencies greater than s=2 and those less than s=2. This eect is called aliasing2. The
conclusion of this analysis is that frequencies greater than s=2 cannot be recovered once
the signal has been sampled at s. Not only is information from frequencies greater than
s=2 lost, but these frequencies appear as frequencies below s=2, distorting the description
of the frequencies which are truly below s=2. To avoid the confusion of lower and higher
frequencies, it is good practice to remove the higher frequencies by applying a low-pass
lter at the input of sampling circuit to remove all frequency components above s=2.
If the signal contains useful information at frequencies > s=2 then it is necessary to
increase the sampling frequency.
1.3
The Fast Fourier Transform
The fast Fourier transform (FFT) is a very useful tool for estimating the frequency
content of signals. The algorithm is highly eÆcient and using modern microprocessors
2 The
familiar eect in lms of spoked wheels appearing to rotate more slowly than we know to be
the case, or even in reverse, is closely related to aliasing; the rotation of the wheel corresponds to a
periodic waveform and the sampling is provided by the camera shutter.
6
-fs
fs
0
f
Figure 3: Aliasing in the frequency domain.
it is possible to do real-time frequency analysis of signals in the audio frequency range.
The FFT is a special form of the more general discrete Fourier transform (DFT). In
turn, the DFT is a discrete-time form of the Fourier transform. That is, the input
time domain data is in the form of a sequence of discrete values and the output is a
set of discrete frequency amplitude-phase values. The DFT and Fourier transform are
therefore related but are not exactly equivalent.
The DFT of a sequence of N discrete-time values xn, where n = 0; 1; : : : N 1, is
given by:
NX1
1
p
Xk =
xn ei2kn=N
(11)
N n=0
where k = 0; 1; : : : N 1. Hence, the DFT returns N complex values Xk which represent
the amplitude and phase for the harmonic frequencies f = ks=N where s is the sampling
frequency. The inverse DFT is given by:
1 NX1 X e i2kn=N :
(12)
x = p
n
N k=0
k
The FFT is mathematically identical to the DFT but the number of data points is
restricted to 2M where M is an integer. FFT's are much faster because the algorithm
takes advantage of computational redundancies in the DFT.
The discrete nature of the DFT results in side eects which need to be appreciated
when using the DFT (or FFT) to analyse signals. The rst problem is aliasing has
already been discussed. This problem can be solved by increasing the sampling frequency
until the frequencies of interest are below the Nyquist frequency.
The second problem occurs because a signal component with frequency not exactly
equal to one of the harmonic frequencies f = ks=N cannot be properly represented.
The result is that its amplitude is shared between nearby harmonics. This eect can be
reduced by increasing the number of data points either by analysing more points or, if
that is not possible, by adding zero values to the end of the data. This improves the
7
No window
-fsine
fsine
f
Rectangular window
-fsine
fsine
f
Figure 4: The eect of a rectangular window on a sine wave in the frequency domain.
spectral resolution of the DFT by reducing the spacing of harmonic frequencies, f ,
since for an N -point DFT f = s=N .
The third problem is spectral leakage and is the result of analysing only the nite
time interval N=s. In order to resolve a signal into a nite set of discrete frequency
components, the DFT assumes that the signal is periodic (non-periodic signals require
a continuous spectrum of innitessimally-spaced components). However, in obtaining
a nite number (2M ) of input samples a signal of innite duration has eectively been
multiplied by a rectangular window function to give a signal of nite duration. In the
frequency domain this is equivalent to convoluting the frequency spectrum of the signal
with the Fourier transform of the window function. The simple rectangular window
function in the time domain transforms to a sinc() function in the frequency domain,
with the width and spacing of the sinc function's lobes being inversely related to the
width of the rectangular window.
Convolution with the input signal, as shown in Figure 4, with a wide central lobe and
the long tails of the sinc function results in the smearing of each frequency component in
the signal, so that it \leaks" across several frequency bands. For frequencies for which
the sampling duration (N T ) is an integer multiple of the true period of the signal,
the assumption by the DFT of a periodic signal is valid and the DFT works as if a
nite window function had never been applied, hence no spectral leakage. The spectral
leakage problem problem can be improved rstly by increasing the width of the time
8
window, and secondly by using window functions other than a rectangle which shape
the input waveform to look more like a periodic waveform. Such window functions have
shorter tails in the frequency domain, and so introduce less spreading over neighbouring
frequencies when convoluted with the signal.
1.4
Digital Filters
Digital lters are discrete-time systems that modify the amplitude and/or phase of
signals in a frequency-dependent way. Filters are usually used to extract only the frequencies of interest from a signal. Very often lters are used to remove noise which
contaminates a signal. The great advantage of digital ltering over using analogue lters is that virtually any kind of digital lter can be realized and implemented in a
exible and convenient way. The properties of a lter are determined completely by its
impulse response and digital lters can be designed to have any arbitrary impulse response. If the impulse response is of nite length the lter is a Finite Impulse Response
(FIR) lter and the output can be calculated directly from the convolution sum presented earlier. In the context of implementing a digital lter, the values of the impulse
response become the lter coeÆcients.
Designing FIR lters is relatively straightforward. The impulse response required
to implement the lter is obtained as a Fourier Transform of the desired frequency
response. A simple and useful example is the ideal low-pass lter response HD (!) shown
in Figure 5. A lter with this ideal response removes all frequencies above the cut-o
angular frequency !c (the frequency range has been normalised so that the sampling
angular frequency is 2). Notice that the frequency response repeats because of the
discrete-time nature of the signals. The impulse response can be calculated by taking
the inverse Fourier transform of HD (!), resulting in
!c sin(n!c )
;
n 6= 0
h =
n
=
!c
n!c
n
=0
(13)
where n is an integer and 1 < n < +1. Immediately we see that we have a problem
because an innite number of values are required. To produce a practical lter it is
necessary to use only a `window' of values of hn around n = 0. This is equivalent to
multiplying the impulse response by a rectangular window and the result is that the
frequency response deviates from the ideal low-pass response (in a manner analogous
to the spectral leakage caused by multiplying a time-domain signal by a rectangular
window). Rather than multiply the frequency response by a rectangular window, other
window functions can be used to reduce some of these problems in the same way that
spectra from the FFT can be improved by using a suitable time-domain window function.
9
HD(ω)
-2π
-ωc
ωc
0
2π
ω (normalised)
Figure 5: Ideal low-pass lter frequency response.
It is highly recommended that you do some supplementary reading on digital signal
processing before attempting this worksheet. Search for keywords \Digital Signal Processing" or \Digital Filters". Some example titles are listed at the end of the worksheet
(any one of these should contain useful analyses of sampling and ltering | and there
are many similar texts).
2 Exercises
Week 5, Session 1/2
2.1
Sampling
Use Mathcad to simulate sampling of a sine wave of frequency f at a sampling frequency
s = 100 Hz. Use the form sin(2f nT ) where initially f = 10 Hz and T = 1=s and plot
the sample values on a graph3. Note that sampled input data is best stored in an array
of samples, rather than as a function of time or sample number; this approach will be
needed for the later exercises (it is also advisable to treat time in the same way, as
tn = nt, and not to use integer values of time t = n). Describe the appearance of the
sampled signal as you increase f in several steps from a few Hz to the Nyquist frequency
s=2 and then above the Nyquist frequency (make sure you include frequencies just a few
Hz either side of the Nyquist frequency). At exactly the Nyquist frequency, it is necessary
3 This
may sound diÆcult, but all it means is that you plot the values of a sine wave at discrete
intervals of T = 0:01 seconds. The sampling is done for you by using nT as the time variable in plotting
the sine wave, rather than any other arbitrary time-base. Note that whenever you plot a continuous
function with MathCad you are actually plotting its value at a few discrete points | the \curve" you
see is due to the connection of discrete points by the default option for displaying a trace. Presentation
of discrete or sampled data is made clearer by using other Trace option to explicitly show that the data
is discrete, such as bar, point, symbol or stem.
10
to introduce a phase shift into the signal in order to see the sampled waveform. Compare
graphs for frequencies separated by multiples of the sampling frequency i.e. (f + N s)
where N is an integer. Also compare negative and positive frequencies in the formula.
At each stage try to justify what you observe by thinking in the frequency domain.
2.2
Discrete-time Systems
We are going to investigate the properties of a discrete-time system which has the
following nite impulse response:
h0 = 0:081
h1 = 0:247
h2 = 0:344
h3 = 0:247
h4 = 0:081
Using equation 1, plot the output of the system for a unit impulse input i.e. xn = 0
for all values of 0 < n < N (N 10) apart from one value xm = 1, where m = 4 (or 5
or 6 etc). Verify that the output of the convolution of x with h is in fact the impulse
response h given above, but shifted in time (remember that Mathcad's arrays run from
zero by default.) Note that in constructing the convolution following equation 1 an error
will be produced if xn k is addressing a non-existent element of x, i.e. n k < 0. There
are a number of ways of tackling this, of which simply starting the convolution at x4 is
the crudest | in a real application valuable transient data might be contained in the
rst samples of x and by not processing them some information may be lost. A little
bit of thought and an if (n k 0; : : :) construction should do the trick (non-existent
data from before x0 can be presumed to be zero).
Investigate the response of the system to a sampled input sine wave (such as those
produced in the rst exercise), changing the frequency of the input between zero and the
Nyquist frequency. Comment on the amplitude and phase delay responses you observe,
plotting the amplitude response as a function of frequency. What kind of frequency
response is this? What function is h performing?
The extraction of amplitude response can be \automated" by using 2D arrays with
dimensions of sample number and frequency index for both input and output, as for
studying forced oscillations and resonance in Worksheet 2. Generate the input data
with frequencies taken from an array fi with values covering the range 0{100 Hz. The
maximum point on the output waveform for input frequency fi can be determined using
the max() function acting on the ith column of output values, which may be extracted
using the A<i> operator (see p 156). To avoid transient eects, copy the latter part in
time (covering a complete cycle for all frequencies) of the output array to a new array
before apply the max() function. Automation of the phase-delay response is too complex
11
to do here, but the approximate behaviour can be determined by visually comparing
input and output waveforms for several frequencies.
Finally, try sampled square waves of dierent frequencies, starting with f 5Hz
and going up to the Nyquist frequency. Comment on what you see, particularly how the
shape of the output is dierent to the input (think in terms of the frequency components
of the square wave input and what eect the transfer function of h will have on each
component.) A square wave with period can be generated using a construction such
as:
sqn = if(mod(nT; ) < =2; 1; 1)
where the square wave will only be regular if =2 is an integer multiple of the sampling
interval T , so stick to these frequencies.
Week 6, Session 1
2.3
Using the Fast Fourier Transform
Mathcad includes the built-in functions t() and it() for performing the Fast Fourier
Transform and Inverse Fast Fourier Transform respectively (see p 180). Note that t()
and it() only work if supplied with a vector of N = 2M samples, and that they then
return frequency components n = 0 : : : N=2.
Use the t() function to analyse a sampled sine wave generated using:
x1n = sin(2f nT )
where n is an integer such that 0 n N 1 (N = 2M is the number of samples), f
is the frequency of the input sine wave, and T = 1=s (s is the sampling frequency and
should initially take the same value as N , so that the sampled input covers 1 second
of data). Start by using N = 64 and f = 6:0 and comment on what you see. Then
try scanning f from 6.0 to 7.0 Hz in steps of 0.25 Hz and comment on what you see.
Since the output t() is complex, you should look at the modulus of the individual
components.
Try changing the number of data points, N , you use without changing the sample
frequency, s. First x the input frequency to f = 6:25 Hz and set the number of
samples to 128 and then 256, then x the frequency to f = 7:0 Hz and half the number
of samples. Compare how each frequency appears to when N = 64 and try to explain
any changes you observed. Return to N = 64 and f = 7:0 Hz and try doubling the
sample frequency, s. Again, comment on what has changed relative to s = 64 and why.
Note that with each new frequency it is necessary to avoid the possibility
of re-using data in old versions of
x
from previous waveforms; this can be
done either by renaming the input array for each frequency or by explicitly
setting its contents to zero before generating each new sampled sine wave.
12
It is particularly important to use a new vector when reducing the number
of samples, since once declared, a Mathcad vector can only have its number
of elements increased.
Think about how the Fourier Transform is attempting to represent the input in terms
of a certain set of frequency components. Can you explain why certain values of f are
free of spectral leakage? What determines the frequency components of the Fast Fourier
Transform? The Fast Fourier Transform has been presented with samples within a
nite time window, but will attempt to analyse the input as if it were an innte periodic
function which repeats outside the sampling window. Why are some frequencies better
suited to this treatment than others? If the input waveform is being multiplied by a
rectangular window in the time domain, what is the equivalent picture in the frequency
domain?
It should be clear by now that there are eects which limit the spectral resolution
that can be achieved using a FFT. The nite resolution limits our ability to resolve
individual spectral components when spectral leakage is present. Look at the FFT
spectrum of the sum of two sine waves, given by:
zn = sin(2f1 nT ) + 0:1 sin(2f2 nT )
where f1 = 4:1 and f2 = 7 using N = 64 data points, s = N and T = 1=s. It is very
hard to resolve the smaller sine wave because of spectral leakage from the larger sine
wave. So far, we have eectively been using a rectangular window of width N samples
i.e. the sampled sine wave has been multiplied by a function zn0 = zn wn, where wn = 1
for 0 < n < N 1 and wn = 0 otherwise. Now see what happens when you multiply
the data by the Hanning window function given by:
2(n N=2) ):
(14)
w = 0:5 + 0:5 cos(
n
N
Plot the windowed version of zn0 and comment on the dierence between this and the
original zn plot (clearest by overlaying them). Then perform the t() and comment on
the changes you see in the frequency response and try to explain them, considering the
frequency domain equivalent of multiplying zn by the windowing function, wn. You will
nd it helpful to compare the frequency domain representations of the rectangular and
Hanning windows.
Week 6, Session 2
2.4
Designing a Digital Filter
Use equation 13 to calculate the impulse response for a low-pass nite impulse response
(FIR) lter with a normalised cut-o frequency wc = 2=10. Use a rectangular window
13
of width 128 to start with. Arrange the centre of the impulse response hn so that it
is a maximum at n = 64, and be sure to repair the \glitch" in the centre of the sinc
function. Look at the amplitude response of the lter by using t() to calculate the
transfer function corresponding to this impulse response (which has been realised with
a nite number of coeÆcients). Compare this amplitude response with the ideal from
which the impulse response was derived, thinking about the important characteristics
of an amplitude response in both the pass band (low frequencies), the stop band (high
frequencies) and the transition between the two. The logarithmic plotting option will
allow you to look at the frequency response above the cut-o frequency.
Try changing the width of the rectangular window containing the impulse response
(always using 2M samples), re-centring the impulse response in the new window. Comment on what you see, considering how changes to the rectangular window aect the
frequency domain. Now return to 128 coeÆcients and multiply the impulse response
by the Hanning window function Compare the frequency response to that of the original
128 coeÆcient lter and comment on the changes you see, trying to explain them by
thinking in both time and frequency domains.
2.5
Using a Digital Filter
Finally, add some noise | random positive and negative uctuations | generated using
the rnd() function to a sine wave. Use your FIR lter from the previous exercise to lter
the noisy signal to reduce the noise (in the same way as you ltered various sine waves
in exercise 2.2), while preserving the input sine wave (its frequency should clearly be
below the lter cut-o frequency). Plot the noisy input signal and your ltered output
on top of each other and comment on the results . Use the FFT to analyse the frequency
content of the noisy signal before and after it is ltered by the FIR lter. See if there
is any improvement when using the Hanning window function applied to the impulse
response.
Suggested reading:
It is highly recommended that you do some supplementary reading on digital signal
processing before attempting this worksheet. Search for keywords \Digital Signal Processing" or \Digital Filters". Some example titles are listed below (any one of these
should contain useful analyses of sampling and ltering | and there are many similar
texts).
A. Bateman and W. Yates, Digital Signal Processing Design, Pitman, 1988.
M. Bellanger, Digital Processing of Signals, 2nd Ed., John Wiley and Sons, 1988.
J. Dunlop and D.G. Smith, Telecommunications Engineering, 3rd Ed., Chapman and
Hall, 1994.
14
R.W. Hamming, Digital Filters, 2nd Ed, Prentice-Hall, 1983.
L.B. Jackson, Digital Filters and Signal Processing, Kluwer, 1986.
R. Kuc, Introduction to Digital Signal Processing, McGraw-Hill, 1988.
P.A.Lynn, Introductory Digital Signal Processing with Computer Applications, Wiley,
1989.
A. Peled, Digital Signal Processing: Theory, Design and Implementation, Wiley, 1976.
15