- DSP log - http://www.dsplog.com -

First order digital PLL for tracking constant phase offset

Posted By Krishna Sankar On June 10, 2007 @ 12:15 am In DSP | 14 Comments

Considering a typical scenario where there might exist a small phase offset between local oscillator between the transmitter and receiver.

[1]

Figure 1 : Transmitter receiver with constant phase offset

In such cases, it might be desirable to estimate and track the phase offset such that the performance of the receiver does not degrade.

A simple first order digital phase locked loop for tracking the constat phase offset can be as

Assuming that the transmitter signal $x(n)$ gets rotated by a constant phase $\phi$, the received signal $y(n) = x(n)e^{j\phi}$. In a simple no-noise case, assuming that the phase offset is small (and the signal gets decoded correctly), the estimate of phase offset is,

$\theta(n) = \arg\left\{\hat{x}^\ast(n)y(n)\right\}$.

Typically, a first order phase locked loop which converges to $\phi$is used for facilitating synchronous demodulation.

[2]

Figure 2 :

#### First order digital phase locked loop (PLL)

(adapted from Fig 5.7 of [Mengali [3]])

The estimate $\theta(n)$ from each sampling instant is accumulated to form the estimate $\hat{\phi}(n)$. This estimated phase is removed from the received samples$y(n) = x(n)e^{j\phi(n)}$ to generate $x(n)e^{j\phi(n) - j\hat{\phi}(n)}$. The parameter$\alpha$is a non-zero positive constant in the range $(0\ 1]$ controls the rate of convergence of the loop. Higher value of $\alpha$indicates faster convergence, but is more prone to noise effects. Lower value of $\alpha$is less noisy, but results in slower convergence.

Assuming $\alpha=1$, the phase estimate at the output of the filter is

$\hat{\phi}(n) = \hat{\phi}(n-1) + \theta(n-1)$.

Substituting, $\theta(n) = \phi(n) - \hat{\phi}(n)$, then

$\hat{\phi}(n) = \hat{\phi}(n-1) + \phi(n-1) - \hat{\phi}(n-1)=\phi(n-1)$.

A simple Matlab code to simulate this can be as follows:

% random +/-1 BPSK source
xn = 2*(rand(1,1000) >0.5) - 1;
% introducing a phase offset of 20 degrees
phiDeg = 20;
% first order pll
alpha = 0.01;
phiHat = 0;
for ii = 1:length(yn)
yn(ii) = yn(ii)*exp(-j*phiHat);
% demodulating circuit
xHat = 2*real(yn(ii)>0) -1 ;
phiHatT = angle(conj(xHat)*yn(ii));
% accumulation
phiHat = alpha*phiHatT + phiHat;
% dumping variables for plot
phiHatDump(ii) = phiHat;
end

plot(phiHatDump*180/pi,'r.-')

[4]

Figure 3: Convergence of $\hat{\phi}$for two $\alpha$values.

Reference:

URL to article: http://www.dsplog.com/2007/06/10/first-order-digital-pll-for-tracking-constant-phase-offset/

URLs in this post:

[1] Image: http://www.flickr.com/photos/8649381@N03/537288934/

[2] Image: http://www.flickr.com/photos/8649381@N03/538176397/