Skip to content Skip to navigation


You are here: Home » Content » Phase Detectors


Recently Viewed

This feature requires Javascript to be enabled.
Reuse / Edit


Add to a lens

Add module to:

Add to Favorites

Add module to:


Phase Detectors

Module by: Christopher Schmitz. E-mail the author

Summary: This module presents an overview of Phase Detectors for use in Phase-Locked Loops.

Figure 1: The Phase Detector of a common PLL.
Figure 1 (PhaseComparitor.png)

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 VeKdθe. The value of Kd Kd can be found from the slope of Ve Ve vs. θe θe.

Figure 2: Ideal Phase Detector characteristic.
Relationship of Kd to Ve and θe
Relationship of Kd to Ve and θe (LinearPDmod2pi.png)

Variation in phase detector designs result due to the tradeoffs in hardware complexity with accuracy of the phase error estimate in analog implementations. When θeθe can be measured directly, like in software implementations, the phase detector is trivially derived from the known values of θrθr and θoθo. We see this in the QAM receiver discussed below.


Calibration to determine the gain constant of a phase detector is made possible by sending the same sinusoid into both the reference and VCO ports of the phase detector (so that both ports have the same reference frequency) while controlling the phase of one input through a variable delay. Alternately, one could control the phase by using a FIXED delay (SAW device) and making slight changes in the reference frequency.

Best Case: Piecewise Linear Phase Detectors

Figure 3: A sawtooth Phase Detector.
Sawtooth PD
Sawtooth PD (SawtoothPD.png)

A PD would only be a true-linear PD only if the phases are all "unwrapped" with respect to some absolute location in time, say, by referencing both the input reference and the PLL output to a common clock. Unfortunately, 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. Yet, 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. For data-modulated signals, say BPSK, the main effect of piece-wise (rather than absolute) linearity is an ambiguity between between the +1s and the -1s which must be cleared up by the use of a preamble or through differential encoding. We will also find later, that piecewise linearity results in depressing the Phase Detector gain constant when the reference signal is noisy. The piecewise-linear sawtooth PD outputs the result of ( θr - θo θr-θo )mod-2π.

Consider the case where the VCO "mixes" the reference signal to complex-valued baseband (also called zero-IF) signal I+jQ where the real-valued I is called the in-phase channel and the real-valued Q is called the quadrature channel. This is known as the QAM (Quadrature Amplitude Modulation) Receiver. In the figure below, θr=2πf_c tθr=2πf_c t and θo=2 π f_c_hat t + theta_hatθo=2 π f_c_hat t + theta_hat. The received reference 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 (and Ve Ve) will be equal to 0. This also implies I equals +/- r and Q is zero. In other words, the sawtooth PD outputs exactly θe = tan-1 θe=tan-1 (q/i).

Figure 4: Obtaining quadrature components.
Quadrature Channels
Quadrature Channels (quadraturePDinput2.png)
Figure 5: Relationship of θe to quadrature components I and Q. 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.
Relationship of θe to I,Q
Relationship of θe to I,Q (THETA_EvsIQ.png)

Of course, such a device must be easily implemented in hardware for an analog PD or must be compuatationally efficient for a software (or FPGA-based) PD. As tan-1 tan-1 (x) generally 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.

Traditional Small-Angle Approximation: Ve = q

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=qKdθe. This corresponds to the bottom "leg" of the QAM receiver.

Figure 6: The "traditional" mixer-type phase detector.
Traditional PD
Traditional PD (traditionalPDwithCOS.png)

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

Figure 7: The more common representation of the traditional phase detector.
Traditional PD (Common Representation)
Traditional PD (Common Representation) (traditionalPDwithSIN.png)

In a PLL, the double-frequency terms will likely be removed by the loop filter and are of little concern.

Costas BPSK: Ve = i times q

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 properly 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.

Figure 8: The "S-curve" of a Costas Phase Detector.
Costas PD Response
Costas PD Response (costasScurve.png)

Modified Costas BPSK: Ve = Sign[i]q

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.

Figure 9: The "S-curve" of a Modified Costas Phase Detector.
Modified Costas PD Response
Modified Costas PD Response (MODcostasScurve.png)

The resulting S-curve is nearly equivalent to the ideal sawtooth. In fact, even in low noise, the performance of the modified Costas phase detector and the ideal phase detector is indistinguishable.

Linearity and the Effect of Noise

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.

Figure 10: This is why noise effects the S-Curve by rounding off the peaks.
Figure 10 (ECE463phasedetector7.png)

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens


A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Reuse / Edit:

Reuse or edit module (?)

Check out and edit

If you have permission to edit this content, using the "Reuse / Edit" action will allow you to check the content out into your Personal Workspace or a shared Workgroup and then make your edits.

Derive a copy

If you don't have permission to edit the content, you can still use "Reuse / Edit" to adapt the content by creating a derived copy of it and then editing and publishing the copy.