PART3 » History » Version 68

JANVIER, Thibault, 03/23/2016 11:39 AM

1 46 JANVIER, Thibault
h1. PART 5 : Implementation and results.
2 2 COLIN, Tony
3 20 COLIN, Tony
{{toc}}
4 2 COLIN, Tony
5 47 JANVIER, Thibault
This part is dedicated to explain and illustrate the main steps that have been done in order to retrieve a navigation signal and to compute the position of the receiver from the pseudo-range measurements of 4 satellites. [[PART|PART 2]], [[PART2|PART 3]] and [[PART41|PART 4]] provided a theoretical background on GPS signals, the main blocks of a GPS receiver and methods to compute the position using the navigation data. Now, it is time to put this theoretical knowledge into practice.
6 47 JANVIER, Thibault
As lots of VIs have been created, a UML diagram has been drawn to illustrate the structure of the overall code. For each main step that will be described, a link to the UML diagram will be provided, the different VIs to be taken into consideration will be listed, a few key points regarding the implementation will be clarified and the results will be displayed.
7 2 COLIN, Tony
8 2 COLIN, Tony
---
9 2 COLIN, Tony
10 4 COLIN, Tony
h2. 1 - Starting point.
11 2 COLIN, Tony
12 49 JANVIER, Thibault
h3. a - Quid about LabVIEW.
13 1 COLIN, Tony
14 49 JANVIER, Thibault
Labview is a modular dataflow programming language that relies on block diagrams interconnected with each other. Each block diagram represents a node, a function that can be run as soon as its inputs are available. Then, it computes outputs used as inputs by other nodes. Any created program can be reused as a node in a higher-level program, hence the modularity of Labview. While running a program, each input can be controlled thanks to a user interface known as a “front panel”. Likewise, every output can be monitored and displayed using the front panel. As a matter of fact, the front panel is closely linked to the program called the “block diagram”. Indeed, every primary input of the block diagram are defined and controlled via the front panel.
15 1 COLIN, Tony
16 49 JANVIER, Thibault
h3. b - Receiver scheme and milestones.
17 34 COLIN, Tony
18 49 JANVIER, Thibault
The software-defined GPS receiver to be implemented should take as an input a sampled signal that has been received and down-converted by an RF receiver front-end. As our RF receiver front-end was missing an antenna, we used a recorded GPS raw signal from the output of an RF front end (from CD *[1]* under GNSS_signal_records/GPSdata-DiscreteComponents-fs38_192-if9_55.bin). In order to read properly the data that are contained in the recorded file, one needs to know the sampling frequency and the intermediate frequency of the raw signal.
19 49 JANVIER, Thibault
Sampling frequency = 38.192 MHz
20 49 JANVIER, Thibault
Intermediate frequency = 9.55 MHz
21 50 JANVIER, Thibault
The following diagram sums up the general structure of the GPS receiver to be implemented.
22 1 COLIN, Tony
23 50 JANVIER, Thibault
p=. !SDR_GPS_Receiver.png!
24 50 JANVIER, Thibault
*Figure 5.1*: General receiver sheme.
25 34 COLIN, Tony
26 34 COLIN, Tony
h3. c - Local C/A code generation.
27 34 COLIN, Tony
28 43 COLIN, Tony
The files involved are :
29 55 COLIN, Tony
- _CA_Code.vi_ : attachment:"SnapCACode.png"
30 55 COLIN, Tony
- _CA_generatorG1.vi_ : attachment:"SnapG1.PNG"
31 56 COLIN, Tony
- _CA_generatorG2.vi_ : attachment:"SnapG2.png"
32 4 COLIN, Tony
33 51 JANVIER, Thibault
These VIs allow generating a PRN sequence according to the satellite ID and the sampling frequency. Indeed, the newly generated PRN sequence has to be multiplied with the incoming signal. Knowing that the period of one PRN sequence is 1 ms, the length of the generated sequence has to be adjusted according to the sampling frequency. With a sampling frequency of 1.023 MHz, a sampled PRN sequence with 1023 samples is generated. With a sampling frequency of 38.192 MHz, a sampled PRN sequence with 38192 samples is generated.
34 51 JANVIER, Thibault
35 52 JANVIER, Thibault
p=. !PRN_sequence.png!
36 52 JANVIER, Thibault
*Figure 5.2*: Example of a locally generated PRN sequence.
37 52 JANVIER, Thibault
38 53 JANVIER, Thibault
In Figure 5.2, a PRN sequence corresponding to satellite 21 has been generated with a sampling frequency of 38.192 MHz. This PRN sequence lasts 1 ms (a zoom has been done on the figure in order to see the sequence of chips).
39 52 JANVIER, Thibault
40 4 COLIN, Tony
---
41 4 COLIN, Tony
42 4 COLIN, Tony
h2. 2 - Acquisition.
43 1 COLIN, Tony
44 43 COLIN, Tony
*See the UML Diagram of Section 2 under :* attachment:"Acquisition.png"
45 43 COLIN, Tony
46 43 COLIN, Tony
The files involved are :
47 44 COLIN, Tony
- _Main_Acquisition.vi_ : attachment:"SnapAcquisition.PNG"
48 44 COLIN, Tony
- _Acquisition_subVI.vi_ : attachment:"SnapAcquisitionSub.png"
49 55 COLIN, Tony
- _CA_Code.vi_ : attachment:"SnapCACode.png"
50 43 COLIN, Tony
51 58 JANVIER, Thibault
In [[PART2|PART 3]], three different methods for acquisition have been described. Each of these methods exhibits different performances regarding the execution time and the accuracy of the frequency and code phase estimations. It has been explained that the parallel code phase search acquisition is less time consuming than the others. Likewise, it is more accurate regarding the estimation of the code phase, which will facilitate the convergence of the DLL towards its settling state. Thereby, the parallel code phase search acquisition will be implemented.
52 59 JANVIER, Thibault
53 57 JANVIER, Thibault
The parallel code phase search acquisition requires to search among the frequencies around the intermediate frequency of the raw signal because of the Doppler that is induced by the motion of the satellite relatively to the receiver. This searching process is finite, meaning that the range of ± 10 kHz around the intermediate frequency has to be swept with a frequency step. Such a frequency step induces a frequency mismatch between the actual frequency of the raw signal and the local frequency of the receiver. This frequency mismatch translates into losses during the acquisition process. A common GPS receiver exhibits 1 dB of loss during the acquisition process. Such a loss is reached provided that:
54 57 JANVIER, Thibault
55 57 JANVIER, Thibault
p=. !Loss_acquisition.png!
56 57 JANVIER, Thibault
57 57 JANVIER, Thibault
Where ∆f is the maximum frequency mismatch and T_coh is coherent time of integration.
58 57 JANVIER, Thibault
Given that we integrate over 1 ms, which corresponds to the period of one PRN sequence, the maximum frequency mismatch should be less than 500 Hz. By using a frequency step of 500 Hz, the searching process has to go through 41 different frequencies to cover the range of ± 10 kHz around the intermediate frequency and the maximum frequency mismatch is 250 Hz. Thus, the acquisition process exhibits less than 1 dB of losses.
59 1 COLIN, Tony
60 59 JANVIER, Thibault
The acquisition process is carried out over 1 ms which corresponds to the period of one PRN sequence. Nonetheless, the code phase is not known during the acquisition process. As a result, the integration time is likely to overlap over two actual incoming PRN sequences as it is illustrated on the following figure.
61 59 JANVIER, Thibault
62 60 JANVIER, Thibault
p=. !Acquisition_Duration.png!
63 60 JANVIER, Thibault
*Figure 5.3*: Acquisition - Integration duration.
64 60 JANVIER, Thibault
65 61 JANVIER, Thibault
As mentioned in [[PART|PART 2]], one navigation bit contains 20 PRN sequences and last 20 ms. As one does not know whether the acquisition process is aligned with an incoming PRN sequence, the acquisition might be carried out while there is a navigation bit transition. In that case, the result from the acquisition is erroneous and the receiver might consider that a satellite is not visible whereas it actually is (worst case when the navigation bit transition occurs at the middle of the acquisition process). To overcome this issue, the acquisition process is run twice on two successive milliseconds. By doing so, at least one acquisition iteration does not include any navigation transition bit.
66 59 JANVIER, Thibault
67 61 JANVIER, Thibault
Once the navigation bit transition has been taken care of, the acquisition is successful when a satellite is visible and one is provided with a coarse estimation of the carrier frequency of the GPS raw signal as well as its code phase. Nevertheless, the frequency error can be up to 250 Hz. Such an error cannot be handled by the PLL once the acquisition outputs are given as inputs to the tracking block. Consequently, the frequency estimation has to be refined. As the code phase is known with a good accuracy thanks to the acquisition, it is possible to remove it from the raw signal. If it is removed over 1 ms of the raw signal, there is no bit transition and only the carrier of the raw signal is left (see Figure 3.6 of [[PART2|PART 3]]). Then it is possible to refine the estimation of the carrier by computing the Fourier transform of the carrier.
68 1 COLIN, Tony
69 64 JANVIER, Thibault
The link and the figure below illustrate the front-panel of the Main_Acquisition VI.
70 62 JANVIER, Thibault
71 63 JANVIER, Thibault
p=. attachment:"Main_Acquisition_1.png"
72 1 COLIN, Tony
73 64 JANVIER, Thibault
p=. !Main_Acquisition_2.png!
74 64 JANVIER, Thibault
*Figure 5.4*: Acquisition results.
75 4 COLIN, Tony
76 4 COLIN, Tony
---
77 4 COLIN, Tony
78 1 COLIN, Tony
h2. 3 - Tracking.
79 45 JANVIER, Thibault
80 43 COLIN, Tony
*See the UML Diagram of Section 2 under :* attachment:"Track.png"
81 43 COLIN, Tony
82 44 COLIN, Tony
The files involved are :
83 1 COLIN, Tony
- _Main_Carrier_Tracking.vi_ : attachment:"SnapTracking.png"
84 44 COLIN, Tony
- _CalcLoopCoeff.vi_ : attachment:"SnapCalcLoopCoeff.PNG"
85 1 COLIN, Tony
86 66 JANVIER, Thibault
The theory of the PLL and DLL has been detailed in [[PART2|PART 3]]. In order to assess the carrier phase error and the code phase error, several discriminators can be used for the PLL and the DLL. The discriminators used for the PLL and the DLL are given in the following table:
87 4 COLIN, Tony
88 67 JANVIER, Thibault
p=. !Table_PLL_DLL_discriminators.png!
89 67 JANVIER, Thibault
*Table 5.1*: Choice of PLL and DLL discriminators.
90 67 JANVIER, Thibault
91 68 JANVIER, Thibault
The DLL aims at updating the code phase of the locally generated PRN sequences for them to be perfectly aligned with the incoming PRN sequences. A PRN sequence is supposed to span over 1 ms. Therefore, the updating process of the DLL will be carried out over 1ms and the signal will be cut into slots of 1ms for the computation. Nonetheless, because of the Doppler shift that is induced by the motion of the satellite relatively to the receiver, the duration of an incoming PRN sequence might vary around 1 ms. Thus, a phase shift is introduced by that Doppler shift on the next millisecond to process. The DLL analyses this phase shift and adjusts the size of the window (=slot) for the next iteration. This way, the updating process vary around 1 ms and keep track of the code phase.
92 35 COLIN, Tony
93 35 COLIN, Tony
p=. !TrackingMin.PNG!
94 4 COLIN, Tony
95 4 COLIN, Tony
---
96 4 COLIN, Tony
97 4 COLIN, Tony
h2. 4 - Navigation Data decoding.
98 13 COLIN, Tony
99 10 COLIN, Tony
*See the UML Diagram of Section 4 under :* attachment:"NavigationData.PNG".
100 29 COLIN, Tony
101 1 COLIN, Tony
h3. a - Delimiting subframes.
102 29 COLIN, Tony
103 55 COLIN, Tony
The files involved are :
104 44 COLIN, Tony
- _FindPreamble.vi_ : attachment:"SnapFindPreamble.png"
105 55 COLIN, Tony
- _TestFindPreamble.vi_ : attachment:"SnapTestFindPreamble.PNG"
106 44 COLIN, Tony
- _GenerateFrame.vi_ : attachment:"SnapGenerateFrame.png"
107 1 COLIN, Tony
- _ParityCheck.vi_ : attachment:"SnapParityCheck.PNG"
108 1 COLIN, Tony
109 23 COLIN, Tony
p=. !Preamble1.PNG! !Preamble2.PNG!
110 26 COLIN, Tony
111 29 COLIN, Tony
p((((. *Figure 5. :* Cross-correlation between navigation frame and local preamble. *Figure 5. :* Subframes with index of delimitation.
112 23 COLIN, Tony
113 29 COLIN, Tony
h3. b- Decoding ephemeris and information within the frame.
114 29 COLIN, Tony
115 55 COLIN, Tony
The files involved are :
116 44 COLIN, Tony
- _Ephemeris.vi_ : attachment:"SnapEphemeris.png"
117 44 COLIN, Tony
- _BinaryArrayToDecimal.vi_ : attachment:"SnapBinaryArrayToDecimal.PNG"
118 44 COLIN, Tony
- _twosComp2dec.vi_ : attachment:"SnapTwosComp2dec.PNG"
119 4 COLIN, Tony
- _ParityCheck.vi__ : attachment:"SnapParityCheck.PNG"
120 4 COLIN, Tony
- _TestEphemeris.vi_
121 1 COLIN, Tony
122 4 COLIN, Tony
---
123 43 COLIN, Tony
124 10 COLIN, Tony
h2. 5 - Elementary blocks for localization.
125 14 COLIN, Tony
126 4 COLIN, Tony
*See the UML Diagram of Section 5 under :* attachment:"Localization.PNG"
127 31 COLIN, Tony
128 1 COLIN, Tony
h3. a - Satellite position.
129 31 COLIN, Tony
130 55 COLIN, Tony
The files involved are :
131 44 COLIN, Tony
- _SatellitePosition.vi_ : attachment:"SnapSatellitePosition.png"
132 44 COLIN, Tony
- _TestSatellitePosition.vi_ : attachment:"SnapTest_satellite_position.PNG"
133 23 COLIN, Tony
- _Check_time.vi_ : attachment:"SnapCheckTime.PNG"
134 31 COLIN, Tony
135 8 COLIN, Tony
p=. !SatPos.PNG!
136 32 COLIN, Tony
*Figure 5. :* Interface with ephemeris as input and illustration of the satellite position.
137 1 COLIN, Tony
138 32 COLIN, Tony
h3. b - Pseudoranges.
139 32 COLIN, Tony
140 8 COLIN, Tony
The file involved is :
141 33 COLIN, Tony
_PseudorangesComputation.vi_
142 1 COLIN, Tony
143 33 COLIN, Tony
h3. c - Least Square solution for position determination.
144 33 COLIN, Tony
145 55 COLIN, Tony
The files involved are :
146 44 COLIN, Tony
- _LeastSquarePosition.vi_ : attachment:"SnapLeastSquare.png"
147 44 COLIN, Tony
- _SatelliteRotationECEF.vi_ : attachment:"SnapSatelliteRotationECEF.PNG"
148 44 COLIN, Tony
- _toTopocentric.vi_ : attachment:"SnaptoTopocentric.PNG"
149 55 COLIN, Tony
- _CartesianToGeodetic.vi_ : attachment:"SnapCartesianToGeodetic.PNG"
150 1 COLIN, Tony
- _TroposphericCorrection.vi_ : attachment:"SnapTropospheric.PNG"
151 43 COLIN, Tony
152 43 COLIN, Tony
h2. 6 - Receiver position computation.
153 43 COLIN, Tony
154 43 COLIN, Tony
*See the UML Diagram of Section 6 under :* attachment:"Receiver.PNG"
155 43 COLIN, Tony
156 55 COLIN, Tony
The files involved are :
157 55 COLIN, Tony
- _ComputeReceiverPosition.vi_ : attachment:"SnapReceiver.png"
158 44 COLIN, Tony
- _NavigationProcess.vi_ : attachment:"SnapNavigationProcess.PNG"
159 55 COLIN, Tony
- _CartesianToGeodeticForUTM.vi_ : attachment:"SnapCartesianToGeodeticForUTM.PNG"
160 43 COLIN, Tony
- _CartesianToUTM.vi_ : attachment:"SnapCartesianToUTM.png"
161 43 COLIN, Tony
162 2 COLIN, Tony
h2. 7 - Complete UML Diagram of the receiver.
163 41 COLIN, Tony
164 6 COLIN, Tony
*The UML diagram with real size is available under :* attachment:"UMLDiagram.png"
165 40 COLIN, Tony
166 40 COLIN, Tony
Here is a small overview of the structure :
167 40 COLIN, Tony
168 40 COLIN, Tony
p=. !UMLDoverview.PNG!
169 2 COLIN, Tony
170 3 COLIN, Tony
---
171 3 COLIN, Tony
172 3 COLIN, Tony
*References :* 
173 1 COLIN, Tony
*[1]* K. Borre, D. M. Akos, N. Bertelsen, P. Rinder, S. H. Jensen, A software-defined GPS and GALILEO receiver