<< Chapter < Page | Chapter >> Page > |
The output of the lowpass filter in the demodulator
is a signal with the spectrum shownin
[link] (drawn using
plotspec(x3,1/M)
).
The spectrum in
[link] should compare
quite closely tothat of the transmitter baseband in
[link] ,
as indeed it does.It is easy to check the effectiveness of the lowpass filter
design by attempting to use a variety of different lowpassfilters, as suggested in
[link] .
Recall the discussion in
[link] of
matching two scaled pulse shapes.Viewing the pulse shape as a kind of marker, it is reasonable
to correlate the pulse shape with the received signal in orderto locate the pulses. (More justification for this
procedure is forthcoming in Chapter
[link] .)
This appears in
[link] as the block
labelled “pulse correlation filter.”The code in
idsys.m
implements this using the
filter
command
to carry out the correlation (rather than the
xcorr
function), though the choice was a matter
of convenience.(Refer to
corrvsconv.m
in Exercise
[link] to see how
the two functions are related.)
The first 4
samples of the resulting signal
y
are plotted in
[link] (via
plot(y(1:4*M))
).
The first three symbols of the message (i.e.,
m(1:3)
)
are
, 3, and
, and
[link] shows why it is best to take the
samples at indices
.
The initial delay of 125 corresponds to half the length of the lowpass filter(
0.5*fl
) plus half the length of the correlator filter
(
0.5*M
) plus half a symbol period (
0.5*M
),
which accounts for the delay from the start of each pulse to its peak.
Selecting this delay and the associated downsampling are accomplished
in the code
% downsample to symbol rate
z=y(0.5*fl+M:M:end);
in
idsys.m
, which recovers the
-spaced samples
z
.
With reference to
[link] , the parameter
in the downsampling block is 125.
A revealing extension of
[link] is to plot the oversampled waveform
y
for the complete
transmission in order to see if the subsequent peaks of the pulsesoccur at regular intervals precisely on
source alphabet symbol values, as we would hope.However, even for small messages (such as the wiener jingle),
squeezing such a figure onto one graph makes a detailedvisual examination of the peaks fruitless.
This is precisely why we plotted
[link] —to see the detailed timing information for the first few
symbols.
One idea is to plot the next four symbol periods
on top of the first four by shifting the start of the second blockto time zero.
Continuing this approach throughout the data recordmimics the behavior of a well-adjusted oscilloscope
that triggers at the same point in each symbol group.This operation can be implemented in M
atlab by first
determining the maximum number of groups of
4*M
samples
that fit inside the vector
y
from the
l
th sample
on. Let
ul=floor((length(y)-l-1)/(4*M));
then the
reshape
command can be used to form a matrix
with
4*M
rows and
ul
columns. This is easily plotted
using
plot(reshape(y(l:ul*4*M+124),4*M,ul))
and the result is shown in
[link] .
Note that the first element plotted in
[link] is the lth
element of
[link] .
This type of figure, called an
eye diagram ,
is commonly used in practice as an aid introubleshooting. Eye diagrams will also be used routinely
in succeeding chapters.
Notification Switch
Would you like to follow the 'Software receiver design' conversation and receive update notifications?