Implementation and Analysis of Signal Tracking Loops for Software Defined GPS Receiver

: Software defined GPS receiver has been developing because it can be processed advanced signal algorithms and also developed for precise navigation. Signal processing modules such as signal acquisition, signal tracking and navigation demodulation are implemented in software to estimate the receiver position, velocity and time (PVT). Signal tracking is important task in order to estimate the receiver’s and satellites position by demodulating navigation bits which are obtained from this. In this paper, implementation and analysis of signal tracking loop is mainly described and there are two main tracking loop as carrier and code tracking loop on GPS L1 signal. Delay Locked Loop (DLL) is to track code delay or code phase of GPS Coarse or Acquisition (C/A) code while Phase Locked Loop (PLL) is used to track GPS L1 carrier frequency as well as Doppler Frequency Shift. The implementation of DLL and PLL, and analyses of parameters which effects on navigation bits is also briefly discussed. The results confirm the analysis of signal tracking loops for software defined GPS receiver based on the experimental studies. The real time applications for software defined GPS receiver are very important to implement the navigation system in future because of the effective analyses on theoretical consideration


Introduction
GPS is Global Positioning Systemwhich provides positioning services to Military as well as Civil users. It was launched in 1973 by the United State (U.S) and fully operational in 1995. GPS comprises three main segments: space segment, control segment and user segment. Space segments includes satellite vehicles (SV) which operate about 20,200 km (12,550 miles)in MEO (Medium Earth Orbit). Control Segment is composed of ground stations to track and monitor satellites transmissions and send data commands to the constellation of them. User segment consists of antenna and receivers which provides user's location coordinates and accurate time [1].
The user can estimate the position by the computation of the range between the receiver and satellites which called pseudoranges. The range between receiver and satellites is called pseudorange instead of a range because of clock bias between receiver's clock and satellites' clock. So the receiver also need to estimate delay time when the GPS signal travels from the satellites to the receiver with the speed of light. Nowadays, software version of GPS receivers is developing and it is easier to implement and analysenew advanced algorithms for position accuracy enhancing. Therefore, in order to implement the new algorithms, it is necessary to analyse the simulation of existingalgorithms and parameters. Moreover, software receiver has many advantages over traditional hardware receivers in since it can be reconfigurable, reprogrammable and it is also cost effective. This paper mainly discusses about the analysis of tracking loop which affects the estimation of user's position later. Real GPS signal from the antenna is used to process the algorithms and the front-end is for down-converting the RF (radio frequency) signal into IF (intermediate frequency) signal for further signal processing in software. MATLAB programming language is used to implement and analyse the signal tracking loopsand real input satellite signal is obtained from front-end device. Figure 1 shows block diagram of GPS software receiver.

GPS Signal Tracking Loop
There are two tracking loop in GPS receiver: code tracking loop and carrier tracking loop. It is needed to keep track the two parameters obtained from the acquisition stage: carrier (Doppler) frequencyand code phase since they changeover time. Therefore, code tracking loop's task is to continually trackfor code phase and carrier tracking loop is for Doppler frequency shift. In order to obtain only navigation message from modulated signal, code demodulation and carrier demodulation must be performed. So, code removal can be performed by multiplying the C/A code of input signal with local C/A code replica and carrier is also removed by multiplying the carrier of input signal with local carrier wave. Figure 2 shows basic demodulation to obtain navigation data bits [2].

Delay Locked Loop (DLL)
Code tracking loop or Delay Locked Loop (DLL) is for tracking of code phase of the signal. The incoming satellite signal is divided into in-phase (I) and quadrature (Q) which is 90˚ phase shifted version of I. The local C/A code generates three codes: Early (E), Prompt (P) and Late (L) codes. The common spacing between each code is ± 0.5 and it determines the noise bandwidth in DLL. It also determines the dynamic range of the signal and accuracy in the positioning result. The, the outputs are integrated and are compared with discriminator to produce code error between the incoming GPS signal and local code. The code loop discriminator is an error function that depends on the two correlation functions, early and late [4]. There are different types of discriminator function and the analysis of the effect of using different early-late spacings, discriminators and noise bandwidth is discussed in the simulation results of this paper.

Phase Locked Loop (PLL) or Costas Loop
To keep track of phase error between carrier of the incoming signal and local carrier wave, carrier tracking loop or PLL is implemented. In GPS, Costas loop is used instead of simple PLL because it can still keep track the phase shifted signal which is caused by the navigation transitions. As in DLL, the outputs of phase discriminator are filtered and estimate the phase offset and when the signal is in a phase locked condition, the prompt output of the in-phase arm produces the navigation data bits and quadrature arm is at steady state with a minimum amplitude. Figure 3 shows structure of the basic tracking loop. It contains filter and numerical controlled oscillator (NCO). The task of filter is to filter noise in the error measurements due to the noise in the tracked signal and NCO is a signal generator to generate replica of the tracked signal. Transfer functions of loop filter and NCO are described as in equations (1) and (2).  where K 1 is the gain of NCO, K 2 is that of phase discriminator, is natural frequency and is damping ratio [5]. . Second Order PLL [5]. Figure 4 shows second order PLL and digitized PLL by applying bilinear transform is as following equations (4) to (6).
Therefore, two coefficients a and b are as in equations (7) and (8) Early-Late Normalized Envelope Where B n is the noise bandwidth which controls the amount of noise allowed in the filter. Figure 5 shows the block diagram of complete tracking loop with both DLL and PLL for GPS software receiver. It includes code and carrier tracking loop. DLL and PLL are combined in this scheme and the I E , I L , Q E and Q L are for implementation of Code discriminator while I P and Q P are used for carrier discriminators. When signal is in locked condition, I P produces bits of navigation message [5].

Implementation of DLL and PLL
In Delay Locked Loop (DLL), firstly local C/A code is needed to three local codes with general ± ½ chips apart between each code to correlate with the C/A code of the incoming signal. The discriminator signal is ε= E L (11) When = 1, the prompt code is perfectly aligned with the incoming C/A coded signal, no shift is necessary. < 1, a phase shift to the left has occurred, shift the codes to the right. > 1, a phase shift to the right has occurred, shift the code to the left. Different types of non-coherent DLL discriminators are shown in Table 1. Dot Product is the only DLL discriminator that uses all six correlator outputs. It produces nearly true linear error output within ± ½ chip. Early-Late Power discriminator response is nearly the same as the coherent discriminator inside ± ½ chip. Early Minus Late Envelope produces good tracking error within ± ½ chip of input error. Early Minus Late Envelope Normalized has a great property when the chip error is larger than ± ½ chip: it helps DLL to keep track in noisy signals. Table 2 gives the Different Types of DLL Discriminators. In PLL, phase error can be minimized when correlation in the quadrature-phase arm is minimum and the correlation value in the in-phase arm is maximum. Table 3 shows different phase discriminator function and arctangent discriminator outputs the real phase error of the signal. Table 3. Different Types of PLL Discriminators [2].

D=sign(I K )(Q K )
The discriminator output is proportional to sin ( ).
D=I K Q K The discriminator output is proportional to sin (2 ) d=tan -1 Q K I K The discriminator output is the phase error ( Figure 6 shows implementation of proposed GPS software receiver. The incoming GPS signal is obtained from GPS antenna and the front-end (RTL2832u) is used to down convert the RF signal into IF (Intermediate Frequency) signal in order to perform signal processing in laptop or PC using MATLAB programming language. The input signal from the frond-end is converted into complex I and Q signal.

Implementation and Analysis of Code Tracking Loop (DLL) and Carrier Tracking Loop (PLL)
Code and carrier error of PRN 26 in 3700 ms (3.7 sec) are shown in Figures 9 and 10 respectively. For DLL, loop gain (k or K 1 K 2 ) of 1, noise bandwidth (B n ) of 2 Hz, zeta ( ) of 0.7 and discriminator (Early-Late) spacing (d s ) of 0.5 is chosen. For PLL, k of 0.25, B n of 25 Hz, of 0.7 are chosen.  Changing different parameters such as discriminator functions, discriminator spacing, damping ratio and noise bandwidth on both DLL and PLL are discussed in this section. The effect of changing different correlator spacing values in code error is shown in Figure 11. Figures 12, 13 and 14 shows DLL outputs with different damping ratio, loop gain and noise bandwidth of 1000 ms of the resulted signal. Figure 15 shows DLL outputs with different discriminator functions which are described in Table 1.    Firstly, three values of early-late spacing are tested. Among three values, small one reduces the code phase dynamic range and code error variance. Moreover, the larger value of becomes wider code phase compared to the other three lower values in testing with four different damping ratio. However, in contrast of damping ratio, lower value of loop gain k can make wider tracking dynamics. Loop noise bandwidth (B n ) controls the noise in the filter. So, larger value of bandwidth allows larger noise in the code tracking loop. In Figure 15, four different DLL discriminator functions are test and the results show that other discriminator functions has quite low code phase values than Early-Late Envelope Normalized function. So, it can produce more correct code phase values than the other functions and it is more suitable for implementation of DLL tracking loop. Result of PLL outputs is also analyzed by changing different parameters as in DLL. Figure 16 shows the outputs of PLL with different damping ratio . The greater the value of , the faster the settling time in carrier loop and the further with the carrier of incoming signal. In case of loop gain k which described in Figure 17, large values which are greater than 0.25 causes fast lock in PLL but small variations of carrier outputs. In contrast with loop gain, larger value of noise bandwidth B n allows more variations of PLL outputs. In figure 18, B n = 40 Hz causes large variations of PLL and that means it doesn't provide correct converge in the incoming signal. Moreover, arctangent discriminator can provide correct PLL outputs among three PLL discriminator functions which are mentioned in Table 1 because its output is the real phase error and Figure 19 describes the results.    According to the results of the analysis of code and carrier tracking loop, the prior values of each parameters for both DLL and PLL are the best choice to provide the correct navigation data bits. Figure 20 to 23 shows the results of the navigation bits of four acquired satellites (PRN 26, 23, 22 and 16) listed in Table 4.

Conclusion
This paper presents the implementation of code and carrier tracking loop with different values of each parameter and their effects. The input GPS signal is recorded from RF-front end (RTL2832u) and since the antenna is not in sky space, there are few satellites in the current captured signal. In acquisition results, four satellites (PRN 26,23,22 and 16) are acquired and all satellites have lower ±10 kHz which are maximum value of Doppler frequency caused by the motion between satellites and receiver. For the results of tracking loop, only PRN 26 is used to describe since the results are similar with each other. In an implementation of code and carrier tracking loop, outputs of DLL and PLL for 1000ms of the signal are described. The analysis of the effect of different values for damping ratio, loop gain, noise bandwidth has been presented. For DLL, three different discriminator or early-late spacing values are tested and narrow values makes greater accuracy and smaller code phase variance. Bits of navigation message are successfully obtained from the in-phase of the prompt output of DLL. MATLAB programming language is used in the proposed GPS software receivers. The main goal is to study the parameters based on their effects on both tracking loops for future implementation of advanced GPS software receiver. The findings of this research outcome are confirmed based on the theoretical analysis.