0% found this document useful (0 votes)
75 views10 pages

"Teach Yourself" Signal Processing at University College London

This document summarizes a tutorial for teaching signal processing concepts to undergraduate students at University College London. The tutorial uses MATLAB to allow students to work through exercises on their own time. It covers topics like sampled signals and spectra, data filtering and smoothing. The goal is to reinforce lecture concepts by providing visual demonstrations and hands-on practice with signal processing techniques. Exercises analyze real experimental data and teach skills like least squares fitting and goodness of fit testing. The tutorials are designed to help students develop both technical skills and professional competencies required for their engineering degrees.

Uploaded by

MekaTron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views10 pages

"Teach Yourself" Signal Processing at University College London

This document summarizes a tutorial for teaching signal processing concepts to undergraduate students at University College London. The tutorial uses MATLAB to allow students to work through exercises on their own time. It covers topics like sampled signals and spectra, data filtering and smoothing. The goal is to reinforce lecture concepts by providing visual demonstrations and hands-on practice with signal processing techniques. Exercises analyze real experimental data and teach skills like least squares fitting and goodness of fit testing. The tutorials are designed to help students develop both technical skills and professional competencies required for their engineering degrees.

Uploaded by

MekaTron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

"TEACH YOURSELF" SIGNAL PROCESSING AT UNIVERSITY COLLEGE LONDON

N F Thornhill CEng MIEE


Department of Electronic and Electrical Engineering
Universlty College London
London WClE 7 J E
1. Introduction
Linear systems theory underlies many areas in an electronic
engineering undergraduate degree course, and students begin to meet
important linear systems concepts very early in their courses, in
circuit analysis and communications, for example. The areas of
application can be very disparate. While circuit analysis tends to
involve continuous, causal signals and analogue systems, control systems
may include computer controllers and sampled signals driving analogue
plant which produces continuous signals. In some cases, such as
experimental data analysis and curve fitting, the relationship with
linear systems theory may not be very evident at all.
This breadth of application of the subject can lead to
difficulties
within the undergraduate curriculum, because Departments may need to
decide whether to teach the material in a dedicated course or whether to
introduce its different aspects as they arise in the areas of
application. A course on systems and signals can cover the material in a
systematic way and highlight relationships, for example between
continuous time and discrete time transform methods. However, some
students may find such a course conceptually difficult and little
different from a maths course. Moreover, much of the material is likely
to be duplicated in the courses which use the material for specific
applications. If the curriculum is
already under pressure to cover
basic subjects in the time available, the best alternative may be to
teach relevant aspects of systems and signals theory in the course where
it is applied, and to attempt to draw together the strands outside the
ciassroom. This is the intent of the UCL "Teach Yourself" tutorials.
This paper describes a set of tutorial guides prepared for this
purpose and used by undergraduates in the Department of Electronic and
Electrical Engineering at University College London. The tutorials are
based on the PC MATLAB matrix and vector handling package and students
work through them in their own time. The tutorials cover the theory of
linear systems and signals, but since the topic of today's colloquium is
the teaching o f digital signal processing, the paper concentrates on the
ones which deal with sampled signals. They provide a working knowledge
of sampled signals and spectra and of data filtering and smoothing,
including a statistical goodness-of-fittest for model validation. The
advanced material reinforces lecture courses by providing graphical
visualisations of convolution, sampled data systems and the z-transform.
The other tutorials (not reported in this paper) deal with s-plane and
frequency domain analysis, continuous control systems design and
simulation of systems containing nonlinearities.
The paper will present examples of teaching material and exercises
from the tutorials, but first explores their context within an overall
strategy for student education and development in Electronic and
Electrical Engineering, which is ultimately shaped by the
IEE
Accreditation requirements.

211

2 . The educational context

The first year syllabuses UCL incorporate "tasters" of more advanced


topics. This allows the students to develop an overview of the
importance of the topics and to use them early on in project and
laboratory work, while waiting for later visits to ?.he same material to
provide mathematical formalism and rigour. Another advantage is that
students who do not choose advanced courses in any area nevertheless
have an appreciation of the basic material.
Like others courses leading to professional qualifications, the UCL
BEng promotes personal development as well as technical training. First
and second year students have opportunities for writing reports and
verbal presentations in a relatively secure environment before moving to
higher risk exposure in the final year of the BEng course._ The "Teach
Yourself" tutorials contribute realistic technical material for some of
these professional development exercises.
The tutorials reported in this paper provide about twenty five hours
of EA2 material involving the study of abstract concepts, preparation of
reports and delivery of a presentation. In addition, the tutorials
contribute towards EA1 because the students learn to use a numerical
analysis tool and essential techniques for dealing with large sets of
experimental data.

3. The MATLAE uackaee


MATLAB'
is a self contained package for scientific and engineering
numerical calculations which can run on a variety of hardware platforms.
It can be programmed in a high level procedural language, and has
numerous built in routines which can be used interactively. The basic
data unit is a matrix and functions generally take matrices as
arguments. M A T W has several features to recommend it for classroom
use, the most important being its extensive on line "HELP" facility,
which contains almost the whole manual. It can also be used as a
calculator or spreadsheer and graphics package for preparing diagrams
and tables for reports.
4.

"he first vear tutorials

This section highlights some of the material covered in the "Teach


Yourself" tutorials for first year students, each of which takes four to
six hours to think through and complete.
4.1 Modelling, Data Analysis and S t a t i s t i c s : After an introduction to
the MATLAB package, students in their first year use MATLAB to analyse
experimental data from an instrument they have built in the electronics
laboratory to measure the Young's modulus of a steel bar. The aim of the
tutorial is not only to demonstrate principles, but also to provide
techniques for dealing with the immediate problem of analysing the large
amounts of experimental data collected during tha nine hour laboratory
class.
The tutorial shows how to perform an analytical least squares fit of
a model that is linear in its parameters, and to assess the goodness of
fit using the chi-square statistic. The data sets are far too large to
expect students to complete this analysis using a calculator, but the
MATLAB matrix and vector commands make the least squares and chi-square

212

analyses relatively painless. Although MATLAB has a built-in least


square fit routine, the students do not use it in this exercise. They
are asked instead t? derive the normal equations for the straight line
fit for minimising E , the sum of the squares of the errors ei between
the experimental data and the straight line model, where:

-i-1cN (ei2

% load files of input and output data

load vin
load vout
i = kength(vout)
% compute sums for the lurst squares normal quation
sum-io = sum(vin.*vout);
sum-i = sum(vin);
sum-o z sum(vout);
sum-ii = sum(vin.*vin);
% Set up the normal equation n = Ap. where p is VSCM
A = [sum-ii sum-i
sum-i I]

of parameLers

n=[sum-io
sum-01;
% Solve the mamx equation for p
p=inv(A)*n;
% Compute some predicted output values and draw the graphs.

voutpr E p(l)*vin + p(2);


p 1o t ( v i n ,v o u t , . )
hold
p lot ( v In ,v out p r, )

Figure 1. MATLAB sequence for

lineear least squares fit

Figure 1 shows a typical sequence of MATLAB commands that a pair of


students would complete under guidance from the tutorial sheet,
inserting their own numerical data which has previously been typed using
a word processor. The clarity of the procedure, with all the detailed
numerical calculations hidden from view, and the immediacy of tha
graphical result encourage understanding and experimentation. They go on
to calculate a goodness-of-fitmeasure, the sum of the squares of the
ratios of the modelling and measurement errors:

- ci-1(e/cli
N

R~

The quantity U is the magnitude of the measurement error that the


students have noted for the ith measurement, where not all the a v2lues
are necessarily the same. We emphasise the statistical nature of R and

213

give a qualitative definition of a 50% fit as oye passing through half


of the error bars. They use a chi-square table or a program that
provided in the workspace to find the probability that the value of R
they have calculated "has a value that can reasonably be accounted for
by random measurement error". Those who 9ave underestimated the
measurement error often find their calculated R value has a vanishingly
low probability and have to re-evaluate their optimistic view of their
experimental competence.
There are several educational points to note. Firstly, the tutorial
gives a method for a treatment of measurement errors. It introduces the
least squares fit, and emphasises that it is possible to quantify how
well a model fits data. On the other hand, the discussion of the
chi-square statistic is superficial and gives few leads that students
can develop further for themselves. It is worth noting the tutorial do5s
not use the minimum variance straight line fit (minimisation of R )
since this has a less evident geometrical interpretation, so some rigour
has been sacrificed for clarity. The exercise has also neglected the
probability distribution of the experimental measurements. Although this
is a straightfoward concept, there is too little time in the lab to
properly investigate the statistics of the measurement error.
Our experience in the assessment of this work is that all the
students can extend the least squares fit technique to a quadratic model
and some will be able to apply it to a harmonic series model where both
the frequencies and amplitudes are unknown. Although many regard the
chi-square test merely as a procedure, some start to develop a deeper
insight into the nature of random sampling.
4 . 2 Signals, Filtering and Spectra: A second tutorial, also for first
year students, introduces filtering and the Fourier transform to
complement lectures on analogue filters and harmonic analysis. The
"teach yourself" tutorial derives a digital filter by a backward
difference approximation to a single pole R-C filter, while the MATLAB
fast Fourier transform function gives an approximation to the continuous
spectrum of a signal, which can be inspected to see the noise and signal
components in a set of test data before and after filtering.
I104

Power meclrum of unfiltered data

50

IO0
frequcne.v

-i A

I50

200

250

'no

250

/HZ

Power spectrum of l i l l e r e d d a l e

Filter has -3dE point a t 40Hz

50

I no

frequcnrv

140

/HI

Figure 2 . Results showing signal spectra before and after filtering.

The introauction of " z " had not at first been intended as a subject
for the tutorial, but was included because the MATLAB FILTER command
requires as parameters the polynomial coefficierts of a z-plane rational
transfer function. The tutorial introduces " z " as a delay operator,
but the role of " z " in integral transform theory is left until the
second year.
The digital filter is treated as an algorithm that mimics an analogue
filter, with no consideration of problems of practical implementation.
Since MATLAB is so easy to use, students find it entertaining to play
around with the - 3 6 8 point and with the effects on the signal and its
spectrum of repeated filtering. Figure 2 shows some typical results
reported by first year students.
The MATLAB fast Fourier transform function seems to give few
conceptual problems even though the formal development is left until the
second year. The text of the tutorial does include some mathematical
background to introduce MATLAB'S complex FFT and explores the effect of
sampling and aliasing. The approach (figure 3 ) is non mathematical and
attempts to relate the ideas to a concept they may remember from their
school days, namely diffraction patterns from a grating.
"An FFT operates on a sa of dam poinu. The rime function is thus a spiky function
which only has a value at the times when the data poinu were meLMcd Iris ZM ar
all other times. as shown in the diagram below. The envelope of this spiky function
is a nice smooth function, and we hope rhar the FTT of thc spiky function wiu be
qual to the true Fourier "sfom of the smooth function. Unfortunately.they are not
qd.The ~pecmnnof the spiky function i s shown below. The effect of the spikes is
that the spec"
of the smooth signal r e p e u ~itself at inrclvals along the frequency
nxir whae the intervals M qual to the sampling frqumcy. This effect is called
' d k i n g ' and is similar to thc higher order spectra you see from a diEraction gracing.
However, unless thae are a lor of high frquencies present in rhe signal IO cause a
long 'tail' in rhe me s e p c " . we should be okay if we only w the FTT to calculate
the w m u n for frequencies which art small compared with the sampling frequency,
say less than half. Alternatively, you could low-pass firm the signal frst to remove
high frequencies that might cause errors."

Spiky sampled function with smooth envelope

Aliasing in a sampled spectrum

Figure 3. Text from the tutorial describing effects of the FFT


to first year students.
By the end of their first year, UCL students have some qualitative
experience of signals and their spectra, the effects of filtering and o f
computer algorithms that mimic analogue filters. All discretisations,
however, have been fine grained and
treated
as
approximate
representations of continuous signals and spectra.

5. The second vear tutorials


The second year "Teach Yourself" tutorials in signal processing
combine MATLAB demonstrations with a more mathematical
approach.
MATLAB'S graphics capabilities help students to build up a visual image
of some of the abstract mathematical concepts. The main drawback with
its use as a teaching aid for engineering mathematics is that all topics
must be treated as discrete approximations.

5.1 D i g i t a l filtering In the second year, digital filters are treated


more formally than in the first year in a MATLAB tutorial covering
frequency domain design as well as discretisation of an analogue filter.
The lecture courses cover the mathematical formalism, while the tutorial
aims
to provide graphical visualisation. The text includes an
explanation of the relationship of the poles of the z-transform to the
geometrical sequence basis functions of a discrete time signal (see
figure 4 ) . The impulse responses of FIR and IIR filters are examined and
a section of the tutorial gives the concept of aliasing an immediate
impact by calculating identical samples from two different waveforms.
A sampled exponential signal can be w r i m thus:
y M = yO.[1,

12. a3. a4.

....)

It is a geometric Wries. The ( ) notarion means 'a signal whose samples are

..' the values m the braces. Obviously the Scrics mnvcrges if a<l and

diverges if 01. maponding with arable and unstable exponentials. The


value of 'a' parametaises this sampled exponential signal and tells us
which of all possible sampled exponential rignrlr it is. Most sampled
signals of interest m linear systems uulysis can be built up from a
weighted sum of sampled exponential signals using various values of 'a'.
The z-transform of this signal is:

Y(z) = y0.[l
= y,[l

+ a z 1 + a2.r-2+ 8 3 . 1 3 + ......

- r z ' ] -1 = yo. z / (z-a)

Thus the z-transform of a signal which is a geomemc series paramercrised


by the value of 'a' has a pole when Z=LIt also has a ZQO when zd. This
pole-zero patrem completely characreriser the sequence y[k] apart from the
scaling factor yo. There is a unique relationship between the parameter in the
basis function and h e pole position in the transformed domain.

Figure 4 . Tutorial text introducing z-plane pole-zero pattern


for a sampled exponential signal.
The test data set provided for the students' exercises represents
simulated ramp output from a sensor on a satellite contaminated by a low
frequency disturbance and random noise. The object of the exercise is to
reconstruct the wanted ramp signal.
The tutorial takes three approaches to filter design, where two are
causal and one is acausal. One of the methods for causal filter design
is the discretisation of an analogue filter through a difference
approximation to the filter's differential equation, a method first
encountered in the first year tutorial. The other is a direct design in
the frequency domain, where the discrete time frequency response

evaluated on the unit circle in the z-plane is matched to a desired


template. The students specify the desired template and use MATIAB's
"WLEWALK" command to derive a filter with a response that cJosely
matches the template. Although the Yule-Walker paper is referenced , we
do not discuss the details other than to point out that the technique is
a curve fitting exercise. Using MATLAB, we can thus show students a
powerful digital filter design method and outline the principles
involved.
Real time implementation is hinted at in the tutorial, but more
practical design considerations are neglected. We believe that final
year project students addressing the difficulties of real time
implementation will have a sufficiently strong understanding of the key
concepts to be able to conduct their own programme of investigations by
practical and theoretical analysis and through simulation.

- Convolution. MATLAB easily lends itself to


investigation of the concept of convolution. The tutorial approaches a
convolution integral as the limit of the sum of the responses to a
series of time delayed impulses. The MATLAB C O W function performs such
a summation.
N- 1
c(n+l)
C a(k+l).b(n-k)
k-0
5 . 2 Time Domain Analysis

Students are expected by the end of the exercise to be able to correctly


identify a(.) as a sequence of impulsive inputs and b(.) as the time
delayed impulse response, and to explain the limits on the dummy
variable k in the summation.
The tutorial is based upon a hypothetical time
trajectory
representing blood alcohol level after "a quick gin and tonic" which is
said to represent an impulsive alcoholic input. After calculating the
blood alcohol trajectory in response to t w o gins and tonics separated in
time, the students consider the response to a pint of beer drunk over
twenty minutes. A suitable discretised data set is provided for
teetotallers, but students are invited to generate their own input
functions to represent their own drinking pattern. The last exercise
examines the blood alcohol response to a sinusoidal drinking pattern
called the "all day binge".
The aim throughout the tutorials is to keep technical examples
relevant. In the first year, students are interested in their own data
for the Young's modulus experiment. The space sensor example for the
second year students is rather contrived, but the disturbances to be
eliminated from it have some sort of physical explanation. Convolution
is traditionally a hard concept, so the aim of the alcohol example is to
relate the mathematics to an example which may draw upon a student's
intuition of the likely time responses, as well as capturing his or her
imagination and providing some entertainment at the end of a long
session.
6. Student Assessment

The first year "Teach Yourself" tutorials provide an opportunity f o r an


assessment that helps to build a student's professional competence. The
work is reported together with the results from the
laboratory

2t7

experiment for measuring Young's modulus. Each student makes a joint


oral presentation with his or her laboratory partner to a tutor and is
assessed against a detailed marking scheme. They are given guidance
about the visual materials to prepare and the scheme lets them make the
first formal presentation in relative security and get immediate
feedback.
The assessment of the second year tutorial material is through a
written report, in which students are asked to provide answers to
theoretical exercises posed in the text as w"1
as reporting their
designs. Among such exercises is a proof that z
signifies a unit delay
in a z-transform, and a demonstration that the values of the samples in
the impulse response of an FIR filter are equal to the "b" coefficients
in the z-plane zeros polynomial. The mathematical basis of the subject
is examined both in regular course tests and at the end of year.
7. Assessment of tutorial effectiveness
In the absence of a control group who do not do the tutorials, it is
hard to quantify the effectiveness of the tutorials. They were
introduced in 1987 and first year classes were surveyed for t w o years
for their responses to this and other new material in the laboratory
courses. The students responded to questions about the combined
laboratory experiment to measure Young's modulus and the
"Teach
Yourself" tutorials. One of the questions asked how easy they had found
each exercise and the other asked students to rate whether the effort
they had put in was worthwhile. On average, in both 1988 and 1989, 70%
of students found the exercises in the survey easy or moderately easy
and 84% of them found them worthwhile.
They found the "Teach Yourself" tutorial and the associated Young's
modulus experiment more difficult than average (45% said easy or
moderate in 1988, 65% in 1989), while the number feeling it worth their
effort was below average in 1988 (79%) and above average in 1989 (91%).
The method of presentation was simplified in 1989, and this change may
have contributed to the greater student satisfaction in that year. The
measure of whether the exercise is "worthwhile" is a difficult one to
apply, since students may consider a long and difficult analysis less
worthwhile than a more simple exercise, especially if it carries the
same marks. The ratio of those finding it an easy exercise to those
finding it worthwhile is a measure which might eliminate this effect.
For every two students who found the tutorial an easy exercise about
three considered it worthwhile, which was the highest such ratio in the
survey. By contrast, an exercise designed to demonstrate some principles
of digital electronics was considered both easier and more worthwhile
than average, yet the ratio was below unity with fewer students finding
it worthwhile than finding it easy.
The
average
results for the
assessment of
the combined
instrumentation and data analysis exercise in 1988 and 1989 were within
half a percent of the means for all first year laboratory assessments.
Comparable results are not available for second year due to the more
complex methods of coursework assessment. In first year, at least, it
seems the tutorials are effective and challenging and provoke as good a
performance as the average.
A survey of final year students in 1990/1 provided estimates that of
a class of 67, 20 of them are using MATLAB in their final year project

work (other than for plotting graphs for presentations), and that 12 are
taking digital signal processing related projects. For comparison, 9 of
the 67 students are doing projects in microwaves, radar or antennas.
Clearly, DSP is as well represented among final year students as other
popular aspects of engineering activity.
8. Comments

The Teach Yourself approach appears to be of value within the UCL


curriculum, giving students an opportunity to organise part of their
studies responsibly and independently. We have observed that the
greatest hurdle to a student completing Teach Yourself tutorial is
actually getting started, and have thus written short compulsory
supervised sessions into the laboratory timetable during which students
start their Tutorial. Afterwards, the timing is up to the student.
Other advantages suggested by colleagues concern the value of MATLAB
in demonstrating mathematical principles. It helps provide a deeper
insight into mathematical relationships, in many cases by providing a
pictorial o r graphical representation, while giving an opportunity to
cover the lecture material a second time with a different emphasis and
approach.
The aim of the Teach Yourself tutorials is to illustrate and draw
together aspects of linear systems analysis which are presented in
different course units within the curriculum, and include the digical
signals tutorials described in this paper. They are a response to the
problem of how to teach an EE foundation subject in a busy timetable. We
believe they do enhance the students understanding of linear systems,
signals and digital signal processing and that they provide a vehicle
for various aspects of an engineering undergraduates professional
training. In the absence of national testing of electronic engineering
undergraduates, however, it is hard to assess whether UCL students are
any better or worse than comparable undergraduates elsewhere. All it is
really possible to do is to report our methods and invite comment and
criticism, and this is the purpose of the present paper.
9. Conclusion

The Teach Yourself tutorials serve more than one educational purpose.
They provide a set of instructions for performing useful data analysis
and modelling tasks ( E A l ) ,
as well as providing a vehicle for
professional training (EA2) and instruction in concepts in digital
filter design and signal processing.
Although it is difficult to assess their effectiveness in an
objective manner, the polls and surveys suggest that although students
find the material stretching it is worth their efforts. An enthusiasm
for mathematical modelling and signal processing using MATLAB appears to
stay with some students into the third year.
Lastly, the approach also suits staff since the tutorial sessions in
the computer laboratory have no safely implications and require only
light supervision which can be provided by a single staff member
assisted by a postgraduate student.

10. Acknowledeements

I would like to thank Dr David Haigh of the Department of E&E


Engineering at University College London for some very useful comments
and suggestions about this paper, and also for comments and corrections
he made to the "Teach Yourself" tutorials when they were being preparad.
11. References

1. PC MATLAB, The Mathworks Inc, 20 North Main St, Suite 250, Sherborn
MA 01770, USA.
2. Kreysig, E., Table Al2: Chi-square distribution, Advanced Engineering
Mathematics (6th Ed), Wiley, New York, 1988, pA96.
3 . Friedlander, B., and Porat, B., The modified Yule-Walker method of
A R M spectral estimation, IEEE Transactions on Aerospace Electronics
Systems, 20, 1984, ~158-173.

N F Thornhill
26th NOV 1990

2/10

You might also like