"Teach Yourself" Signal Processing at University College London
"Teach Yourself" Signal Processing at University College London
211
212
-i-1cN (ei2
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.
- ci-1(e/cli
N
R~
213
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
50
I no
frequcnrv
140
/HI
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."
....)
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
Y(z) = y0.[l
= y,[l
+ a z 1 + a2.r-2+ 8 3 . 1 3 + ......
2t7
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 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
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