# A GPS Phase-Locked Loop Performance Metric Based on the Phase Discriminator Output
## 2 PLL Operation  
The phase lock loop (PLL) is essentially a feedback control system that creates a replica carrier signal and attempts to keep its frequency and phase aligned with the incoming carrier signal. This work focuses specifically on the PLL because it is most susceptible to wideband interference, and will lose lock before the delay-lock loop (DLL) does [5]. Figure 1 shows the PLL block diagram. The input to the PLL is the intermediate frequency (IF) signal \(s(t)\), which may be written for a single satellite as,  
\[s(t)=\sqrt{2C}D(t-\tau)x(t-\tau)\cos\left(\omega_{IF}t+\psi(t)\right) \tag{1}\]  
where \(C\) is the signal power, \(D\) is the navigation data message, \(x\) is the code, \(\tau\) is the code delay, \(\omega_{IF}\) is the intermediate frequency (in rad/s), and \(\psi(t)\) is the phase process which includes all Doppler effects due to user and satellite motion, as well as both receiver and satellite clock instabilities. The receiver clock instability is a consequence of the down-conversion in the receiver's front-end.  
The input signal is first multiplied by the code replica obtained from the receiver's delay lock loop (DLL). This process is called code wipe-off because, if the replica code is aligned perfectly with the incoming, the code will be removed from the signal. In this work, perfect code alignment is assumed, which allows the signal, after mixing with prompt code, to be written as,  
\[y(t)=\sqrt{2C}D(t-\tau)\cos\left(\omega_{IF}t+\psi(t)\right) \tag{2}\]  
The signal \(y(t)\) is then multiplied by two replica signals from the numerically controlled oscillator (NCO), called in-phase and quadrature signals, \(x_{I}\) and \(x_{Q}\), respectively,  
\[x_{I}(t) =\sqrt{2}K\cos(\omega_{IF}t+\hat{\psi}(t)) \tag{3}\] \[x_{Q}(t) =-\sqrt{2}K\sin(\omega_{IF}t+\hat{\psi}(t)) \tag{4}\]  
where \(K\) is the RMS amplitude and \(\hat{\psi}(t)\) is the replica phase process. This mixes the signal down to baseband (carrier wipe-off). Then there is a coherent averaging (i.e., integrate and dump) operation followed by the discriminator, which is sometimes called a phase detector because it estimates the phase error between input and replica signals. In this work, the discriminator output is called the tracking error. The loop filter is a compensator designed to achieve desired system response, and it designates the 'order' of the phase lock loop [12]. The loop filter output is fed to the numerically controlled oscillator (NCO) which generates the replica carrier signals, and closes the loop. Additional detailed information on the complete GPS signal processing technique (from signal capture at the antenna through pseudorange computation) is available in [12; 13; 14].  
Figure 1: Phase lock loop block diagram.  
The receiver clock is a reference input to the NCO. Therefore, the receiver clock phase-noise can be modeled as a disturbance on the NCO output. However, in this work, the PLL is implemented in software, and there is no additional phase-noise contribution from the NCO. The effect of both satellite and receiver oscillator phase noise will enter the PLL through the input signal (due to mixing the the receiver front-end). In addition, our PLL uses the common two-quadrant arctangent discriminator and a third-order loop filter (more on the loop filter in Section 3).