PART2 » History » Version 41

Version 40 (JANVIER, Thibault, 03/23/2016 12:26 PM) → Version 41/44 (JANVIER, Thibault, 03/23/2016 12:31 PM)

h1. PART 3 : Acquisition and Tracking.

{{toc}}

---

h2. 1- Introduction.

h3. a- General overview of a GPS receiver using CDMA technique.

The GPS signal generation scheme has been detailed in [[PART|PART 2]] and is using a CDMA technique which spreading sequences are the PRN codes. Thereby, the major steps of the whole communication chain can be summarized by the figure below.

p=. !CDMA_Overview.png!
*Figure 3.1* : GPS Communication Chain Overview.

Now that the transmitting side has been detailed in [[PART|PART 2]], it is possible to focus on the receiving side.
The receiving front-end filters, down-converts to an intermediate frequency and digitizes the received signal. Thus, the signal still has to be down-converted to baseband and to have its spreading sequence removed before being able to demodulate and recover the actual navigation data. The down-conversion to baseband is done by multiplying the signal at the output of the receiving front-end by a local carrier frequency which frequency matches the one of the received carrier. Therefore, the baseband signal x can be expressed as follows:

p=. !2.png!
*Figure 3.2* : Expression of the signal after downconversion to baseband .

Where:
*A* is the amplitude of the signal
*τ_j* = jT is the sampling time
*T* is the sampling period
*td(τ_j)* is the time difference between the start time of the navigation sequence and τ_j . In other words, τ_j - td(τ_j) represents the actual phase of the incoming navigation data at time τ_j.
*ts(τ_j)* is the time difference between the start time of the spreading sequence and τ_j. In other words, τ_j – ts(τ_j) represents the actual phase of the incoming PRN sequence.
*θ* is the phase shift due to non-coherent down-conversion to baseband (Doppler shift)
*n* is a white Gaussian noise
!D_tau_C_tau_expression.png!
*T_d* is the symbol period
*T_c* is the chip period
*d_k* is a navigation symbol taking its values in ±1
*c_k* is a chip symbol taking its values in ±1
*π_Td* is the standard pulse function of width Td
*π_Tc* is the standard pulse function of width Tc
*N_c* is the number of chips in one spreading code

Then, by generating a local spreading sequence that is similar to the received one and which phase matches the received one, the spreading code is removed from the signal and it is possible to retrieve the useful data.
The principle seems simple to understand, however, it highlights some practical issues that are depicted in the next subsection.

h3. b- List of the key parameters in the implementation of a GPS receiver.

To decode navigation data, one first needs to remove the incoming carrier from the signal. To do so, the carrier frequency has to be known to generate a local carrier signal and down-convert the incoming signal to baseband. Nonetheless, this carrier frequency might deviate from the expected value. Indeed, the relative motion of the satellite with respect to the receiver induces a Doppler effect that shifts the frequency of the incoming carrier. If the GPS receiver is moving, it is reasonable to assume that the maximum Doppler shift for the L1 frequency is around ± 10 kHz. Otherwise, for a stationary GPS receiver, the maximum Doppler shift for the L1 frequency is around ± 5 kHz. Once the carrier frequency is known, its phase has to be determined as well in order to have a coherent demodulation that limits the bit error rate. These uncertainties regarding the carrier frequency and its phase will have to be dealt with in the implementation of the GPS receiver.

Another key parameter is related to the PRN sequences that are used to spread the information. First of all, the satellites are differentiated by 32 different PRN sequences. Consequently, the GPS receiver has to search for the right PRN code among all the PRN sequences to remove it from the signal and decode the data. Still, knowing the right PRN code to despread the signal at the receiving side is not sufficient. Indeed, PRN codes have high correlation only for zero lag. As such, it is of prime concern to know the incoming code phase in order to generate a local PRN code that is perfectly aligned with the incoming one. In addition, the Doppler shift induces a jitter regarding the actual duration of a PRN code. Thus, the local PRN code will have to be generated taking into consideration the phase and the jitter. The software-defined GPS receiver will have to address and overcome these issues.

The practical issues that have just been highlighted can be overcome using two major processes known as acquisition and tracking (see Figure 3.3). These processes will be carefully depicted in the following sections.

p=. !4.png!
*Figure 3.3* : Block Diagram of a GPS receiver *[1]*. receiver.

---

h2. 2- Acquisition.

In order to receive and efficiently decode navigation data, the receiver must know which satellites are initially visible. This can be achieved using two common methods referred to as warm start and cold start. In a warm start, the receiver uses the information it has stored from the previous results and is able to compute which satellites are visible. In a cold start, the receiver has no stored information and has to search for the visible satellites. This process is called acquisition and aims at determining the visible satellites as well as the coarse values of the carrier frequency and the code phase of the satellite signals. Acquisition is quite time-consuming as it has to search through all possible satellites (all PRN sequences), all possible carrier frequencies taking into account the Doppler shift and all possible code phases of a given PRN sequence. As a result, a 2-dimensional search in frequency (Doppler shift) and time (code phase) is carried out for each PRN sequence. This process can be performed using a serial search acquisition, a parallel frequency space search acquisition or a parallel code phase search acquisition. These three commons methods have different characteristics regarding the execution time, their complexities and their accuracies. They will be briefly depicted in the three following subsections.

h3. a- Serial Search Acquisition.

p=. !5.png!
*Figure 3.4* : Block Diagram - Serial Search Acquisition *[1]*. Acquisition.

The serial search acquisition procedure is based on the C/A code correlation properties (see [[PART|PART 2]]) according to which the cross correlation between two different C/A codes is really low and the autocorrelation is high only for zero lag. The algorithm is described just below.
The incoming signal is multiplied by a given C/A code with a certain code phase between 0 and 1022 chips. Then, the signal is mixed with a locally generated carrier signal to remove the carrier wave of the received signal. This generates an in-phase signal I and a quadrature signal Q. As the C/A code is modulated onto the I signal, one should only take into consideration the I signal. Nevertheless, the down-conversion is non-coherent. This means that the locally generated carrier wave used to down-convert the incoming signal is not in phase with the incoming carrier wave. As a consequence, the signal of interest is divided on both I and Q signals after down-conversion. Thus, it is necessary that one should use both of the I and Q signals. These I and Q signals are integrated over 1 ms which corresponds to the length of one C/A code. By doing so, one is correlating the incoming PRN sequence with the locally generated C/A code on both I and Q signals. The outputs of both I and Q signals are finally squared and added. The final result is compared to a threshold. If the threshold is exceeded, the frequency and code phase parameters used for the locally generated signals are correct for the PRN sequence that is considered. If the threshold is not exceeded, this could be due to several reasons that are listed just below:
- The locally generated PRN sequence is not the same as the one that is received, which means that the receiver is not configured to receive signals from the actually targeted satellite.
- The locally generated PRN sequence is the right one but its code phase does not match the incoming PRN sequence.
- The locally generated carrier wave does not have the same frequency as the incoming carrier wave because of the Doppler shift.
The GPS receiver cannot know the cause that leads to low correlation. It will therefore proceed using a two-dimensional search in frequency and time for each PRN sequence in order to find the right frequency and the right code phase for the PRN sequence that is considered. Considering that the Doppler shift is around ± 10 kHz, it is reasonable to take a frequency step of 500 Hz resulting in 41 frequencies around the theoretical L1 frequency. For each frequency, 1023 different code phases are tried for the PRN sequence that is considered (recall that one C/A code contains 1023 chips). The output is computed for all the pairs “frequency/code phase” and can be plotted on a 3D graph as shown on [[PART3|PART 5 : Figure 5.3]]. Then, the maximum value from all the possibilities is computed. If this maximum does not exceed the threshold, the PRN sequence for which the search has been done corresponds to a satellite that is not visible to the receiver and the search has to be carried out for another PRN sequence. If the maximum exceeds the threshold, the satellite is acquired with coarse values of its carrier frequency and code phase.

h3. b- Parallel frequency space search acquisition.

The serial search acquisition implies to test every combination of frequencies and code phases of a given PRN sequence before being able to tell if the acquisition is successful or not. This process is really time-consuming. If the search procedure of one of the two parameters could be implemented in parallel, this would drastically decrease the acquisition time. The parallel frequency space search acquisition aims at automatically giving a coarse value of the frequency carrier of the incoming signal once the right code phase has been found. It is implemented as follows:

p=. !Parallelized_frequency_search.png!
*Figure 3.5* : Block diagram - Parallel frequency space search acquisition.

The incoming signal is multiplied by a given PRN sequence which code phase varies between 0 and 1022 chips. A Fourier transform is then used to assess the previous result in the frequency domain. The Fourier transform gives a complex signal and the output is obtained by taking the squared magnitude of this signal. When the locally generated PRN sequence corresponds to the satellite that is targeted and when the phase of this locally generated PRN sequence perfectly matches the one of the PRN sequence from the incoming signal, the output of the multiplication is illustrated as follows:

p=. !7.png!
*Figure 3.6* : Principle of Parallel frequency space search acquisition *[1]*. acquisition.

As such, the result corresponds to the carrier wave of the incoming signal. Consequently, the final output corresponds to the squared magnitude of the Fourier transform of a sine wave. In a nutshell, with a perfectly aligned PRN code of a visible satellite, the output displays a distinct peak in magnitude that corresponds to the real carrier frequency of the targeted satellite. This peak can be found using a threshold. When this threshold is exceeded, the satellite is acquired with coarse values of its carrier frequency and code phase. *(insert image p 82 of the book)*

h3. c- Parallel code phase search acquisition.

The parallel frequency search acquisition implies to test every code phase among the 1023 possible options but eliminates the need to search through the 41 frequencies around the intermediate frequency of the received signal. The parallel code phase search acquisition allows parallelizing the code phase search. Thereby, the searching process only has to go through the 41 frequencies which drastically decreases the execution time.
The parallel code phase search acquisition takes advantage of the circular cross-correlation theorem that claims that the circular cross-correlation sequence between two finite sequences of length N and with periodic repetition can be obtained as the inverse transform of the product of the individual transforms:

Let z be the circular cross-correlation sequence between x and y that are two finite sequences of length N periodically repeated.

p=. !Cross_Correlation.png!

Let Z(k), X(k) and Y(k) respectively be the discrete N-point Fourier transforms of z(n), x(n) and y(n).

p=. Z(k) = X*(k)Y(k) where X*(k) is the conjugate of X(k)

Then:

p=. z(n) = invFFT(Z(k))

Such a property allows computing the cross-correlation of the incoming PRN sequence with a locally generated PRN sequence without the necessity of shifting its code phase. Consequently, only one PRN sequence has to be generated.

The block diagram of the parallel code phase search acquisition can be illustrated by the following figure:

p=. !Parallelized_code_search.png!
*Figure 3.7* : Block diagram - Parallel code phase search acquisition *[1]*. acquisition.

The incoming signal is multiplied by two locally generated carrier signals in quadrature to produce the I and Q signals. As the phase of the incoming carrier is not known, both I and Q signals carry information about the PRN sequence that is received and both signals have to be taken into account. Thus, they are combined in a complex signal I+jQ that is fed to the Fourier transform block. The output of the Fourier transform block is multiplied by the complex conjugate of the Fourier transform of the locally generated PRN sequence (without any phase shift). The result is passed into the time domain by applying an inverse Fourier transform. Eventually, the absolute value of the output of the inverse Fourier transform corresponds to the cross-correlation of the incoming PRN sequence with the locally generated one. The result is squared and compared to a threshold.
This process is carried out for the 41 considered frequencies. If there is a peak in the cross-correlation that exceeds the defined threshold, then a satellite is acquired at the frequency that is considered. The code phase of the incoming PRN sequence corresponds to the index of this peak within the correlation that has been computed. Since the correlation is computed over each sampled code phase of the PRN sequence, the code phase of the incoming PRN sequence is more accurately estimated than with the two previous methods.



---

h2. 3- Tracking.

Once the acquisition has been processed, one is provided with a coarse estimation of the received carrier frequency of the signal and a coarse estimation of the code phase of the received PRN sequence. Thus, it is possible to start the demodulation of the navigation data (see subsection on CDMA technique). Nonetheless, the satellite from which the signal is retrieved is moving relatively to the RF receiving front end. Consequently, a Doppler shift is induced and the received carrier frequency as well as the carrier phase might change with respect to time. Likewise, this Doppler shift continuously alters the code phase of the incoming PRN sequence which creates jitter regarding the theoretical duration of a PRN sequence that is supposed to span over 1ms. If a dynamic correction is not implemented to refine the carrier frequency, the carrier phase and the code phase of the local carrier and PRN replicas, the track of the signal is lost and the demodulation of the data is no longer possible. The aim of the tracking block is to keep track of these parameters in order to successfully demodulate the navigation data over time. It is composed of a carrier tracking block (PLL) and a code phase tracking block (DLL) that are closely dependent to each other (see figure 3.3).

h3. a- Carrier Code Tracking

In order to downconvert to baseband and maximize the SNR at the demodulation stage, an exact replica of the received carrier wave has to be generated regarding its phase and its frequency. The goal of the PLL (or FLL) is to adjust the frequency and phase of the locally generated carrier wave replica so that it matches the carrier and phase of the received carrier. A simple scheme of a phase lock look system is illustrated below.

p=. !PLL.png!
*Figure 3.8* : Scheme PLL.

The incoming signal is multiplied by the local carrier replica as well as the PRN replica in order to remove the PRN sequence from the signal. It is assumed here that a perfect code replica is generated (in practice it is not the case, that is why the PLL depends on the DLL and inversely). Then, a carrier loop discriminator is used in order to assess the carrier phase error between the incoming carrier and the carrier replica. The output of the discriminator is either the actual phase error or a function of it and is filtered by a loop filter. The loop filter’s response characterizes the convergence of the PLL towards the actual phase of the incoming carrier. Its coefficients (loop of order 2) are tuned using two main parameters known as the damping ratio and the noise bandwidth. The damping ratio controls the rapidity with which the filter reaches its settling state and has an impact on the overshoot that comes along the convergence *(see figure)*. The smaller the damping ratio, the faster the convergence but the higher the overshoot. Usually, a damping ratio of 0.7 (sqrt(2)/2) is a good trade-off because it allows the filter to converge quickly without exhibiting an overshoot that it too high. Such a damping ratio has been chosen for the implementation *(see PART XX)*. The noise bandwidth of the filter sets the amount of noise that is allowed to pass through the filter. The higher the loop noise bandwidth, the noisier the estimated phase, but the faster the convergence towards the settling state. In practice, a PLL with a noise bandwidth around 20 Hz is used. The figures below illustrate the impact of the damping ratio and the noise bandwidth on the loop response.

p=. !Damping_ratio.png!
*Figure 3.9* : Influence of the damping ratio on the convergence of the PLL *[1]*. PLL.

p=. !Noise_BW.png!
*Figure 3.10* : Influence of the nois bandwidth on the convergence of the PLL *[1]*. PLL.

Finally, the numerically controlled oscillator uses the output of the filter to correct and update the phase and frequency of the local carrier wave.
As GPS signals are modulated with a BPSK scheme, it is of prime concern to use a PLL that is insensitive to 180° phase shift. This is the case of the Costas loop that is usually used in GPS receiver to recover from navigation bit transition. The block diagram of the Costas loop is illustrated in the following figure.

p=. !15.png!
*Figure 3.11* : Block Diagram of a Costas PLL *[1]*. PLL.

After multiplication of the incoming signal with a locally generated PRN sequence that is supposed to be perfectly aligned with the incoming PRN sequence, the I and Q signals can be expressed as:

p=. !IQ_Costas.png!

Where:
D(n) represents the navigation bit at time n.
ϕ is the carrier phase error between the incoming carrier wave and its local replica. This carrier phase error can be time-dependent and seen as a frequency mismatch (ϕ=2πΔft).
From the expressions of I and Q, it is possible to assess the carrier phase error ϕ or express a quantity that is proportional to the carrier phase error. Such a quantitative assessment is called a discriminator. The following table describes three discriminators that could be implemented in a Costas loop to assess the carrier phase error.

p=. !Discriminators_Costas_table.png!
*Table 3.1*: Discriminators of Costas PLL.

p=. !Discriminators_Costas_PLL.png!
*Figure 3.12* : Discriminator responses - Open loop *[1]*. loop.

By plotting the different discriminator responses for carrier phase errors ranging from -180° to 180°, one can notice that the outputs are equal to zero when the carrier phase error is equal to 0[180°]. This attests that the discriminators are non-sensitive to 180° phase shifts. Nonetheless, such a response induces a phase ambiguity of 180°. Indeed, the updating process sees such points as stable and will lock on one of them. As a result, we may retrieve the opposite signal compared to the one we were supposed to receive. To avoid such an ambiguity, GPS signals periodically carry a known pattern called a preamble to correct any possible lock ambiguity.

h3. b- Code Tracking

In order to be able to demodulate the navigation data, the locally generated PRN sequence has to be perfectly aligned with the incoming one. This means that an accurate estimation of the incoming code phase has to be provided in order to keep track of the signal. To do so, a delay lock loop is implemented in any GPS receiver. The principle of such a DLL is illustrated by Figure 3.13:

p=. !16.png!
*Figure 3.13* : Simplified Scheme of a DLL *[1]*.

For explanation purposes, one will assume that the local carrier wave is in phase with the incoming carrier and has the same frequency. As a result, the incoming signal is coherently down-converted to baseband and only the I signal is taken into consideration (recall: a BPSK modulation scheme is used to transmit the navigation data). After down-conversion, the I signal is multiplied by three replicas of the PRN sequence that is considered. Each of those replicas are locally generated and separated by a chip spacing of 0.5 chips. As a result, one can distinguish (see figure 3.14):
- An early replica
- A prompt replica that is the reference
- A late replica
Finally the three outputs are integrated and compared to each other in order to assess the code phase shift of the prompt code with respect to the incoming one. This reasoning is based on the low autocorrelation of the gold codes for lags higher than 1 chip. As a simple graphical reasoning illustrated on figure 3.14, when the autocorrelation of the incoming PRN with the early version of the replica is lower than the one computed with the late replica, the locally generated prompt code is “earlier” than the incoming one and a correction has to be done. This iterative process keeps going until the prompt code is perfectly aligned with the incoming one.

p=. !17.png!
*Figure 3.14* : Principle Early-Late DLL *[1]*.

In practice, the local carrier wave is not locked in phase and frequency with the incoming carrier. As a result, both I and Q signals are taken into account in the DLL and the scheme is as follows:

p=. !18.png!
*Figure 3.15* : Complete Scheme DLL *[1]*.

Then, the outputs are combined in a discriminator in order to assess the code phase shift between the prompt code and the incoming one and to correct this shift. Several discriminators can be used depending on the applications and the quality of the PLL that is used in parallel. If the PLL that is used in parallel is good enough, a coherent down-conversion can be carried out and a coherent DLL can be implemented. Otherwise, it is wiser to use a non-coherent DLL.

p=. !Discriminators_DLL.png!
*Table 3.2* : List of DLL discriminators

p=. !DLL_Open_Loop.png!
*Figure 3.16* : DLL Open-loop *[1]*.

The open loop responses of the previously described discriminators are displayed in figure 3.15. These open loop responses have been computed for a chip spacing of 0.5 chips (recall: separation between the early and the prompt codes). The chip spacing has an influence on the performance of the DLL. The higher the chip spacing (cannot be higher than 1), the more noise robust the DLL is. On the contrary, the smaller the chip spacing, the more accurate the estimation of the code phase shift between the prompt code and the incoming PRN sequence. In addition, the slope of the discriminator’s response around 0 plays a role in the rapidity of the convergence towards the settling state and the standard deviation of the estimated code phase. Indeed, the higher the slope, the faster the convergence, but the DLL will tend to under/overestimate the code delay at each iteration.
At the output of the discriminator, the DLL uses the same scheme as the PLL with a loop filter and a feedback of the updated code phase to the local PRN generator.

h3. b- Code Tracking and carrier tracking interactions

By looking at figures 3.11 and 3.15, one can see that the PLL and the DLL are interdependent. The PLL uses the local PRN sequence that is dynamically corrected and updated by the DLL. Likewise, the DLL uses the local carrier wave that is corrected and updated by the PLL. In order to reduce the amount of multiplications, it is possible to feed as inputs of the PLL the outputs I_P and Q_P of the DLL. By doing so, the complexity of the complete block is simplified.

p=. !19.png!
*Figure 3.17* : Complete Tracking Block *[1]*.

---

*References :*
*[1]* K. Borre, D. M. Akos, N. Bertelsen, P. Rinder, S. H. Jensen, A software-defined GPS and GALILEO receiver
*[2]* D. Kubrak, GNSS Signal Tracking Workshop, March 2016