<< 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)
The phase tracking algorithm Equation 11 converges to the correct phase offset (in this case -0.8  or to some multiple -0.8+nπ) depending on the initial estimate.
The phase tracking algorithm [link] converges to the correct phase offset (in this case -0.8or to some multiple - 0 . 8 + n π ) depending on the initial estimate.

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.

  1. How does the stepsize mu affect the convergence rate?
  2. What happens if mu is too large (say mu=10 )?
  3. Does the convergence speed depend on the value of the phase offset?
  4. How does the final converged value depend on the initial estimate theta(1) ?

Investigate these questions by making suitable modifications to pllsd.m .

  1. What happens if the phase slowly changes over time? Consider a slow, small amplitude undulation in phoff .
  2. Consider a slow linear drift in phoff .
  3. What happens if the frequency f0 used in the algorithm is (slightly) different from the frequency fc used to construct the carrier?
  4. What happens if the frequency 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 J S D ( θ ) 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 J S D ( θ ) depends on the frequency f 0 , the time k T s , and the unknown Φ (through r p ( k T s ) ), as well as the estimate θ . Recognizing that the averaging operation acts as a kindof lowpass filter allows considerable simplification of J S D ( θ ) . Rewrite [link] as

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask