# Residual carrier tracking with PLL

Residual carrier systems such as PCM/PM/NRZ and PCM/PM/Bi-phase are common in space applications. Compared to suppressed-carrier systems such as BPSK, the literature sources on residual-carrier systems are pretty old, dating back from the 1970s. The demodulators described in these sources are analogue. I'm having some trouble with GNU Radio SDR implementation of these analog structures, in particular, carrier recovery with PLL. In residual carrier systems, shown above, there is an unmodulated carrier on the Q-channel (pilot) that is used for carrier recovery. The transmitted signal is $$$$\mathrm{s\left ( t \right )} = \mathrm{\sqrt{2P}}\sin \left [ \mathrm{\omega_{0}t + \sum_{i=1}^{M}\theta_{i}d_{i}\left ( t \right )} \right ]$$$$ where M is the number of subcarriers and $$\theta$$ is the modulation index. The modulation index determines the ratio between the power in the data carrier and the residual carrier. Assuming no subcarriers (M = 1), the PCM/PM signal takes the form: $$$$\mathrm{s\left ( t \right )_{M=1}} = \mathrm{\sqrt{2P}\cos \theta_{ 1} \sin \omega_{0}t + \sqrt{2P}d_{1}\left ( t \right )\sin\theta_{ 1}\cos \omega_{0}t}$$$$ In I/Q format, this becomes: $$$$\mathrm{s\left ( t \right )_{M=1}} = \mathrm{I\left ( t \right )\cos \omega_{0}t - Q(t)\sin \omega_{0}t}$$$$ where $$$$\label{i} \mathrm{I\left(t\right)} = \mathrm{\sqrt{2P}s_{1}\left ( t \right )\sin\theta_{1}}$$$$ and $$$$\label{q} \mathrm{Q\left(t\right)} = \mathrm{-\sqrt{2P}\cos \theta_{1}}$$$$

Im having a problem with implementing the carrier tracking loop, in particular, I dont know what phase error detector to use. The signal in question is shown above, where the residual carrier can be seen as a peak at DC.
For BPSK(suppressed carrier) Costa’s loop, the phase error detector is pretty straightforward and is given by $$$$e(kTs) = Q(kTs)*slice(I(kTs));$$$$ Both I and Q channels are used by the PED, as shown in the diagram above. On the other hand, residual-carrier systems use the Q channel only for carrier phase recovery. I have tried different PEDs on my own without any luck.

float
residualPhaseRecovery_impl::phaseDetectorPM(gr_complex out) const
{
//return imag(out)*slice(real(out)); //Costa's loop, for BPSK
return imag(out); // Naive Residual carrier PED. Doesnt work.
}


What would be the appropriate PED in this case?

EDIT Another receiver structure that could be used (?) is shown below (Rice, Digital Communications: A discrete Approach). All I need is an equation for the "Compute Phase Error" block.

• Residual carrier should make life easier. In gr-analog, there are 3 PLL blocks, one of which is carrier tracking, that should keep you tracking along (for slow movement of the center frequency due to doppler). In the spectrum of the received signal you should be able to see the carrier/pilot tone peak. Commented Jan 26, 2019 at 22:53
• I have tried the PLL carrier tracking block. It configured it to track between $Freqmax = \mathrm{2\pi}$ and $Freqmin = \mathrm{-2\pi}$ with a loop bandwidth of $2*\pi*0.001$. Is this a proper way to configure the block? The output of the match filter still has the DC peak (instead of being flat). Commented Jan 27, 2019 at 14:19
• freqmax = fmax * math.pi/(Fs/2.0), freqmin = fmin *math.pi/(Fs/2.0). Where you expect the residual carrier to be found in the frequency rang of [fmin, fmax] Hz. loop bandwidth is set to some small number (much less than pi), whose exact value depends on how reactive you want the PLL to be. Your flowgraph doesn't show you using any real hardware, so that "DC" peak is your residual carrier that you're generating, right? That's what the PLL is gong to phase lock to. Commented Jan 30, 2019 at 18:44

I have been facing this problem of phase synchronization with my PCM/PM/SP-L signals as well, and found a temp solution by filtering away the residual carrier.

For carrier offset correction, there are two gnuradio blocks that work, the FLL Band Edge and PLL Carrier Tracking, but I found that the FLL Band Edge blocks works better together with the built-in Costas Loop block when dealing with PM signals with a residual carrier. This is completely from anecdotal experience though, and I have not done any proper characterization of the blocks performance.

One hacky solution of the phase synchronization problem might be to filter away the carrier of the signal before feeding it into the Costas Loop. This filter step should be after carrier offset correction, before Costas Loop. Since the presence of the residual carrier makes the IQ constellation of a Binary PM signal offset from the origin, filtering away the carrier will center the PM signal about the origin, and the Costas Loop PLL can lock its phase to that of a standard BPSK.

## Rough Flow Graph:

PCM/PM RX -> FLL Band Edge -> Highpass Filter -> PFB Clock Sync -> Costas Loop -> BPSK Demodulator

• Wouldn’t it be easy to just PLL lock to the carrier that is there? As long as the carrier is 6dB stronger a PLL will lock to it Commented Jan 12, 2020 at 12:46
• This is throwing away the part of the signal designed to make it easy to lock to, then locking to it the hard way. Commented Jan 1, 2022 at 16:19

I'm not familiar with what Gnu radio offers, but in pure signal processing terms, you're way overthinking this.

You just need a plain old PLL, with a plain old phase detector that multiplies the incoming signal with the NCO output, a plain old loop filter, and a plain old NCO with a sine wave output.

This is the sort of PLL you'd use in a synchronous AM radio receiver. From a very brief web search, it looks like you want to use Gnu Radio's PLL Carrier Tracking to make this happen -- this should give you a cleaned-up version of the carrier, which you can then use to do whatever further processing you need to do.