An ideal phase detector (PD) compares a reference phase θrθr
to the output phase θoθo of the closed-loop-PLL voltage-controlled oscillator (VCO).
Ideally, the PD outputs an error voltage proportional to the phase error
θe
=
θr
-
θo
θe=θr-θo, at least for some range of
θe
θe.
If the proportionality constant is given by
Kd
Kd (volts/rad), then the error voltage is
given by
Ve
≈
Kd
θe
Ve≈Kdθe. The value of
Kd
Kd can be found from the slope of
Ve
Ve
vs.
θe
θe.
Of course, if the value of θeθe were already known, the phase detector would not be needed. More generally, we have knowledge of the complex-valued components commonly called I (in-phase) and Q (quadrature).
The received signal
is rotated by
-
θo
-θo
to produce the new complex-valued signal
r
ej
θe
rej
θe
which can written in rectangular coordinates as the complex-valued point (I Q) where
I+jQ=
r
ej
θe
I+jQ=rej
θe
.
If the PLL has perfectly tracked the input in frequency and phase, then
θe
θe
will be equal to 0.
Any received complex-valued data point at time t, let's call it (i,q), is directly related to the phase error in a cartesian-to-polar transformation.
A general model of the PD is then one that accepts inputs i and q and outputs some linear estimate of the phase error
Ve
≈
Kd
θe
Ve≈Kdθe.
The piecewise-linear sawtooth PD outputs the result of (
θr
-
θo
θr-θo
)mod-2π.
In other words, the sawtooth PD outputs exactly
θe
=
tan-1
θe=tan-1
(q/i).
Of course, such a device must be easily implemented in hardware for an analog PD or must be compuatationally efficient for a software PD.
As
tan-1
tan-1
(x) is not, a suitable approximation is often sought.
The first solution might be to utilize a lookup table for the argument x mapping it to
tan-1
tan-1.
As accuracy is improved via a larger lookup table, more memory is required and lookup time increased.
Another solution involves replacing
tan-1
tan-1
(q/i) with the mathematically equivalent
sin-1
(qi2+q2
)
sin-1(qi2+q2
)
.
Assuming the PLL is locked and the phase error
θeθe reasonably small,
sin-1
(qi2+q2
)
sin-1(qi2+q2
)
can be approximated by the argument
qi2+q2
qi2+q2
.
Since
i2+q2
i2+q2
is simply the sqrt of the input power, it can be removed using Automatic Gain Control (AGC)
for a flat-fading channel or considered part of the fixed value KdKd
for a non-fading channel.
In this case the error voltage becomes
Ve
=q
≈
Kd
θeVe=q≈Kdθe.
This corresponds to the bottom "leg" of Figure 3.
Of course, cosine shifted by π/2 is just a sinusoid and the mixer produces both DC and double-frequency terms. Therefore, this figure can be more accurately represented as
In a PLL, the double frequency terms will likely be removed by the loop filter and are of little concern.
For the pure sinusoidal input considered up to this point, zero phase error is synomonous with a single point in the I-Q plane, located on the positive I-axis. For a Binary Phase-Shifted Signal (BPSK), the signal with zero phase error actually exists at two points within the I-Q plane, as the data stream varies between a positive and negative I-axis value. This results in
θeθe being defined as zero in two locations on the I-Q plane. The approximation
Ve
=q
Ve=q
indeed gives these two zeros, but for the left-half plane has a negative slope! We must modify the approximation by taking into account the sign of I. In a first attempt, we may multiply by the value i directly:
Ve
=iq
Ve=iq.
The simplicity of the Costas solution has resulted in widespread use. However, allowing the magnitude of i to affect the approximation of Ve has limited the linear range of the phase error estimate to about (-45,+45) degrees. With the added complexity of a hard-limiter, the I-channel data can be made to affect only the sign, resulting in a much improved phase error estimate:
Ve
=Sign[i]q
Ve=Sign[i]q.
The linear range of the phase error estimate now approaches (-90,+90) degrees as seen in Figure 10.
The resulting S-curve is nearly equivalent to the ideal sawtooth.
Such a PD is considered to be a true-linear PD only if the phases are all "unwrapped" with respect to some absolute location in time.
That is, a true-linear PD must have access to
θr
θr
values of the form (eg.) 576.123 π and the PLL must output
θo
θo
values of the form (eg.) 243.163 π.
The (unfortunate?) truth is that in a system for which the reference signal and the PLL are operated on different clocks, there is no way to define and track such an absolute time reference.
The (fortunate) truth is that outside of perhaps a non-critical phase-ambiguity and some modeling details, an absolute time reference is not needed.
Knowing
θr
θr
and
θo
θo
modulo-2π is both practical and sufficient.
When the input is noisy, the effect is for the PD to occassionally map the true phase error across the discontinuity of the defining S-curve. Large-magnitude phase errors (which sit closer to the discontinuity) are affected more so than small ones. Therefore, as the SNR falls, the first effect is a softening of the sawtooth's "teeth." The sawtooth becomes more sinusoidal. As the SNR continues to fall, eventually even small-magnitude phase errors are affected and the apparent slope (defining the PD gain constant KdKd near θdθd=0) decreases in value.