<< Chapter < Page | Chapter >> Page > |
Ts=1/10000; time=1; t=0:Ts:time-Ts; % time interval and time vector
fc=100; phoff=-0.8; % carrier freq. and phaserp=cos(4*pi*fc*t+2*phoff); % simplified received signal
mu=.001; % algorithm stepsizetheta=zeros(1,length(t)); theta(1)=0; % initialize vector for estimates
fl=25; h=ones(1,fl)/fl; % fl averaging coefficientsz=zeros(1,fl); f0=fc; % initialize buffers for avg
for k=1:length(t)-1 % run algorithm filtin=(rp(k)-cos(4*pi*f0*t(k)+2*theta(k)))...
*sin(4*pi*f0*t(k)+2*theta(k)); z=[z(2:fl), filtin]; % z's contain fl past inputs theta(k+1)=theta(k)-mu*fliplr(h)*z'; % convolve z with h and update
end
pllsd.m phase tracking minimizing SD
(download file)
Observe that the averaging is not
implemented using the
filter
or
conv
commands because the complete input
is not available at the start of the simulation. Instead,the “time domain” method is used, and the code here may
be compared to the fourth method in
waystofilt.m
. At each time
k
, there
is a vector
z
of past inputs.
These are multiplied, point by point, with the impulseresponse
h
, which is flipped in time so that the
sum properly implements a convolution. Because the filteris just a moving average, the impulse response is
constant (1/
fl
) over the length of the filtering.
Use the preceding code to “play with” the SD phase tracking algorithm.
mu
affect the convergence
rate?mu
is too large (say
mu=10
)?theta(1)
?Investigate these questions by making suitable modifications
to
pllsd.m
.
phoff
.phoff
.f0
used
in the algorithm is (slightly) different from the frequency
fc
used
to construct the carrier?f0
used
in the algorithm is greatly different from the frequency
fc
used
to construct the carrier?How much averaging is necessary? Reduce the length of the averaging filter. Is it possible to make the algorithm work with no averaging? Why does this work? Hint: Yes, it is possible. Consider the relationship between [link] .
Derive [link] .
The performance function
of
[link] provides a mathematical
statement of the goal of an adaptive phase tracking element. The methodis defined by the algorithm
[link] and
simulations such as
pllsd.m
suggest that the algorithm
can function as desired. But
why does it work?
One way to understand adaptive elements, as discussed in [link] and shown in [link] , is to draw the “error surface” for the performance function. But it is not immediately clear what thislooks like, since depends on the frequency , the time , and the unknown (through ), as well as the estimate . Recognizing that the averaging operation acts as a kindof lowpass filter allows considerable simplification of . Rewrite [link] as
Notification Switch
Would you like to follow the 'Software receiver design' conversation and receive update notifications?