# How is the phase of a local oscillator synchronized to the carrier for demodulation?

How are phases of a wireless TR/RX pair synchronized for coherent demodulation?

I understand PLLs will match the frequency of the local oscillator to the carrier via maintaining a constant phase difference between the received signal and the local oscillator but for coherent demodulation the phases of the oscillators need to also be synchronized(at least as far as I understand).

How is this done?

Look for Costas Loop on Wikipedia

The general idea is that the carrier phase changes slowly, whereas the data changes quickly. This allows a slow loop to track the carrier phase.

Although the technique can be applied to the RF, and can be done with analogue processing, these days it is invariably done digitally, and at the complex baseband.

• The problem is, for base-band conversion if your carrier frequency is at a 90 degree phase with local oscillator your baseband signal is 0. Apr 30, 2018 at 6:15

By using an oscillator that produces 0 and 90 degree outputs, those LOs driving 2 mixers to produce I and Q at a lower (IF) frequency, and some DSP later used to tweak out the phase errors and the ongoing phase rotations, precise phase lock can be avoided.

• Ok, so you don't do direct base-band conversion, does the IF frequency prevent the issue of a mixer producing 0 out if you're unlucky enough to have your local osc at a 90 degree shift from carrier? Apr 30, 2018 at 6:19
• That seems correct, FourierFlux. Apr 30, 2018 at 6:38

I understand PLLs will match the frequency of the local oscillator to the carrier via maintaining a constant phase difference between the received signal and the local oscillator but for coherent demodulation the phases of the oscillators need to also be synchronized(at least as far as I understand).

If the frequency is matched by the PLL, then the phase difference must be constant (other than for slow moving phase-drift that is being corrected for because phase-drift means frequency-shift and the PLL that you describe can correct this).

Depending on the type of phase detector the "natural" or neutral phase difference may be at 90 degrees or 0 degrees. For instance, an XOR gate used as a phase detector will naturally settle on 90 degrees as the "locked-in" position but a phase-frequency detector like below: -

Will naturally settle at 0 degrees. Picture from here.

The bigger problem comes when you don't have a carrier (such as with many phase modulation schemes). That's where a Costas loop comes in but there are other methods.

• This is a digital PLL though but for analog signals does it still apply? May 1, 2018 at 2:02
• @FourierFlux in my answer I touched on an EXOR and PFD, both of which are digital in nature. However, the good old fashioned 4 quadrant multiplier (regular RF mixer) will give the same 90 degrees phase shift as an EXOR and is of course analogue. Any complexity signal (across a reasonable BW) can be converted to in_phase and quadrature components so this 90 degree shift is of minor inconvenience. However, digital PLLs are used with analogue signals up to a certain frequency. May 1, 2018 at 7:00
• IIRC though the issue isn't the phase shift in of itself, it's that if you mix a 90 degree shifted signal with the original your baseband output will be 0. So you need to have two separate mixers? May 1, 2018 at 7:03
• Your baseband output will only be zero if there is no modulation present - you choose your PLL low pass filter in such a way as to give you the baseband output when there is modulation. Such as with FM; the filter is slow hence the VCO remains at centre frequency but the output of the phase comparator (with light filtering) is the data recovered. May 1, 2018 at 7:07
• Hmm, I think the same issue will happen regardless of the modulation, at least in digital communication systems(I think). May 2, 2018 at 5:29