Tải bản đầy đủ (.pdf) (110 trang)

Đồ án mô phỏng hệ thống GPS bằng Matlab

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.58 MB, 110 trang )




Global Positioning System
Signal Simulation


A Thesis presented for the Degree of Bachelor of Electrical
Engineering (Honours)

By

Thiam Hock Tan

Department of Information Technology and Electrical Engineering
The University of Queensland
Australia

October 29, 2003

Candidate’s Declaration
Candidate’s Declaration

Head of School
School of Engineering
The University of Queensland
St. Lucia, Queensland 4072

Dear Professor Simon Kaplan,

In accordance with the requirements of the degree of Bachelor of Engineering (Honours)


in the division of Electrical Engineering, I present the following thesis entitled

“Global Positioning System Signal Simulation”

This thesis was performed under the supervision of Professor Kurt Kubik and co-
supervised by Dr Adam Postula.

I certify that this thesis is my own and I acknowledged that it does not contain any
material previously published for a degree at the University of Queensland or any other
institution, except where acknowledged and referenced.


Yours sincerely,


Thiam Hock Tan





i
Acknowledgements
Acknowledgements

There are a number of people that I would like to give special thanks, who have
contributed to the successful completion of this thesis. My apologies are extended to
anyone whom I may have inadvertently missed.

I would like to express my sincere appreciation to Professor Kurt Kubik and Dr

Adam Postula for assisting and guiding me along this thesis. Without their help, this
thesis will not reach the current stage and I greatly thank them for their precious time and
efforts committed in the accomplishment of this thesis.

I would like to thank Mr Bradley Houston for assisting me and helping me out
regarding my doubts in MATLAB (Simulink) and help me clarify them.

I also wish to thank my team mate, Mr Wai Cheng Yong who dedicated his time
in the hardware so that I can concentrate in the software of this thesis to the completion
of this thesis.

Special thank is express to Mr Chin Chye Neo who stay up late with me in
completing my thesis as we assist one another in our thesis, he is working on the “Ultra
Wideband (Positioning)” thesis. He is a great motivator and has a strong sense of humour
in times of difficulties to make us forget the present problems and work towards our final
goal.

Not forgetting to thank my dearest parents, Mdm Chee Kim Foo and Mr Eng Foo
Tan who offer me the best education and taking so much pain and effort in guiding me
till today. No words can represent my deepest gratitude for them. I just want to say, “It’s
all within my heart”.


ii
Abstract
Abstract

Due to the modernization and advance technological advancement, days of using the
street directory for navigation are soon going to be obsolete. Global Positioning System is
the “Gateway to the Future”. This GPS Signal Simulator has the ability to simulate the

current GPS L1 frequency at the user’s fingertips.

Realistic generation of this L1 frequency allows the user to have a deeper
understanding of what exactly the GPS signal is about and how it is coded and
modulated. Coding of this signal is done by using the Coarse Acquisition (C/A) code.
Data will spread across this C/A code before mapping onto the Binary Phase Shift
Keying (BPSK) signal. This BPSK signal is modulated onto a carrier frequency to be
transported along the communication channel.

To be able to receive without any signal variations is almost impossible due to the
extensive distance between the satellite and the receiver unit. Therefore, demonstration of
signal variation can be done by using the Doppler shift in this simulation.

Doppler Shift is the variation of frequency along the communication channel and
it greatly depends on the location of the satellite. If the satellite is just above the user and
at the closest position relative to the user, the Doppler frequency is zero. But other than
this position, all other position involves Doppler shift and thus signal variation occurs.

Other than Doppler shift, this simulation can observe the autocorrelation of any of
the 32 satellite’s available in the GPS constellation right now. Delay of any amount of
chips can be simulated to show the autocorrelation of the lag function.

With this simulation, GPS L1 signal can be analyzed and observed to assist in any
future GPS development.

iii
Contents
Contents

Candidate’s Declaration …………………… ………………………………………… i

Acknowledgements ……………………………………………………………………… ii
Abstract …………………………………………………………………………….…… iii
List of Figures …………………………………………………………………… ……. ix
List of Tables ………………………………………………………………………… xi

Chapter 1 Introduction …………………………………………………………… 1
1.1 Overview of thesis …………………………………………………….… 2
1.2 Implementation ………………………………………………………… 2
1.3 Desired results ………………………………………………………… 3
1.4 Organization of Thesis ………………………………………………… 4

Chapter 2 Literature Review ……………………………………………………… 7
2.1 Global Positioning System ………………………………………………. 7
2.1.1 Control Segment ……………………………………………… 8
2.1.2 Space Segment ……………………………………………… 8
2.1.3 User Segment …………………………………………………. 9
2.2 GPS Signal Structure ……………………………………………………. 9
2.3 Determine User’s Location …………………………………………… 10
2.4 Pseudorange Measurement ………………………………………… … 11
2.5 Coarse Acquisition Code (C/A code) ………………………………… 12
2.6 Autocorrelation ……………………………………………………… 14
2.7 Doppler Shift ………………………………………………………… 16
2.8 Binary Phase Shift Keying (BPSK) ……………………………………. 20
2.9 Data Message Format ………………………………………………… 20
2.10 Summary of Chapter 2 ……………………………………………….… 21



iv
Contents

Chapter 3 GPS Signal Simulator in the Market …………………………………… 23
3.1 Accord GPS Correlator Simulator ………………………………… … 23
3.2 Welnavigate GS 600 …………………………………………………… 25
3.3 CAST 1000 Satellite Signal Simulator ………………………………… 27
3.4 Spirent Multi-Channel GPS/SBAS Simulation System STR4500 … … 28
3.5 Summary of Chapter 3 ……………………………………………….… 29

Chapter 4 Simulation of GPS L1 Signal Generator ……………………………… 31
4.1 Block Description …………………………………………………… 32
4.2 S-function ………………………………………………………………. 33
4.3 MATLAB function …………………………………………………… 34
4.3.1 MATLAB function (Right) …………………………………… 35
4.3.2 MATLAB function (Counter1023mega2) ……………………. 35
4.3.3 MATLAB function (Opmega) ……………………………… 35
4.4 Simulation of Part One ……………………………………………….… 36
4.4.1 Block 1 (Assign empty matrix) ……………………………… 37
4.4.2 Block 2 (50 bits data) …………………………………………. 37
4.4.3 Block 3 (Data input) …………………………………… …… 37
4.4.4 Block 4 (Sfunsv20460) …………………………………… … 37
4.4.5 Block 5 (Spreading block) ……………………………………. 38
4.4.6 Block 6 (SV 1 to 32) ………………………………………… 38
4.4.7 Block 7 (SV Selector) ………………………………………… 38
4.4.8 Block 8 (To file) …………………………………………….… 38
4.5 Interior of Part One Block 5 (Spreading Block) …………………… … 39
4.5.1 Block 1 (NA) ………………………………………………… 39
4.5.2 Block 2 (For Iterator) …………………………………………. 39
4.5.3 Block 3 (Goto i) ………………………………………………. 40
4.5.4 Block 4 (Port 1) …………………………………………… … 40
4.5.5 Block 5 (Port 2) ……………………………………………… 40
4.5.6 Block 6 (Selector) …………………………………………… 40

4.5.7 Block 7 (tmp_col) …………………………………………… 40

v
Contents
4.5.8 Block 8 (Port 3) ……………………………………………… 40
4.5.9 Block 9 (num_B_eles) ……………………………………… 41
4.5.10 Block 10 (ones(size(u))) ……………………………………… 41
4.5.11 Block 11 (Mux) ……………………………………………… 41
4.5.12 Block 12 (double(u(1):u(2))) …………………………………. 41
4.5.13 Block 13 (Port 1) …………………………………………… 41
4.6 Interior of Part One Block 6 (SV 1 to 32) …………………………… 42
4.7 Simulation of Part Two ……………………………………………… 43
4.7.1 Block 1 (Input 1M C/A XOR Data) ………………………… 44
4.7.2 Block 2 (Fc = 10.23 MHz) ……………………………….…… 44
4.7.3 Block 3 (BPSK Modulation) ………………………………… 44
4.7.4 Block 4 (10 KHz Doppler Shift) …………………………… 44
4.7.5 Block 5 (Selector) …………………………………………… 44
4.8 Interior of Part Two Block 3 (BPSK Modulation) ………………… … 45
4.8.1 Block 1 (In 1) …………………………………………………. 45
4.8.2 Block 2 (Constant) ……………………………………………. 45
4.8.3 Block 3 (Switch) ……………………………………………… 45
4.8.4 Block 4 (Step) ……………………………………………… 46
4.8.5 Block 5 (Sum) ………………………………………………… 46
4.8.6 Block 6 (Inverse) …………………………………………… 46
4.8.7 Block 7 (In 2) ……………………………………………….… 46
4.8.8 Block 8 (Modulation) ……………………………………….… 46
4.8.9 Block 9 (Out 1) ……………………………………………… 46
4.9 Interior of Part Two Block 4 (10 KHz Doppler Shift) …………………. 47
4.9.1 Block 1 (In 1) ……………………………………………….… 47
4.9.2 Block 2 (Product) …………………………………………… 47

4.9.3 Block 3 (Relay) ……………………………………………… 47
4.9.4 Block 4 (Multi-port Switch) ………………………………… 48
4.9.5 Block 5 (In 2) …………………………………………………. 48
4.9.6 Block 6 (Product1) ……………………………………………. 48
4.9.7 Block 7 (Out 1) …………………………………………… … 48

vi
Contents
4.10 Part One of Autocorrelation Simulation ……………………………… 48
4.10.1 Block 1 (SV Selector) ………………………………………… 49
4.10.2 Block 2 (SV 1 to 32) ………………………………………… 49
4.10.3 Block 3 (Autocorrelation) …………………………………… 49
4.10.4 Block 4 (Timing) …………………………………………… 49
4.10.5 Block 5 (Reshape) …………………………………………… 49
4.10.6 Block 6 (To Workspace) ……………………………………… 50
4.11 Interior of Part One Autocorrelation Block 2 (SV1 to 32) …………… 50
4.12 Part Two of Autocorrelation Simulation ……………………………… 51
4.12.1 Block 1 (From Workspace) ………………………………… 51
4.13 Summary of Chapter 4 …………………………………………………. 51

Chapter 5 User Manual ……………………………………………………………. 53
5.1 System Requirements ………………………………………………… 53
5.2 Getting the Files and Folders in the Right Location ………………… 54
5.3 Simulation Procedures for Part_1 ……………………………………… 55
5.4 Simulation Procedures for Part_2 ……………………………………… 56
5.5 Simulation Procedures for Autocorrelation_1 ……………………… 58
5.6 Simulation Procedures for Autocorrelation_2 ……………………….… 58
5.7 Summary of Chapter 5 …………………………………………………. 59

Chapter 6 Simulation Results and Analysis ………………………………………. 61

6.1 Data Stream of L1 Signal ……………………………………………… 61
6.2 Carrier Frequency of L1 Signal ……………………………………… 62
6.3 Converted Data Stream of L1 Signal ………………………………… 63
6.4 BPSK Data Stream of L1 Signal …………………………………… … 64
6.5 L1 Signal ……………………………………………………………… 65
6.6 Doppler Shift of L1 Signal …………………………………………… 66
6.7 Frequency Spectrum of Carrier ………………………………………… 67
6.8 Frequency Spectrum of L1 Signal …………………………………… 68
6.9 Autocorrelation Function of Space Vehicle ………………………….… 70

vii
Contents
6.10 Problems Encountered and Rectification ………………………………. 71
6.11 Summary of Chapter 6 ……………………………………………….… 74

Chapter 7 Conclusion ………………………………………………………… … 75
7.1 Lessons learnt ………………………………………………………… 76
7.2 Further Development of this Simulator ……………………………… 76

Appendices …………………………………………………………………………… 77
Appendix A Sfun50 ………………………………………………………………… 77
Appendix B Sfunsv20460 …………………………………………………………… 78
Appendix C Sfunsv1000 …………………………………………………………… 80
Appendix D Right ………………………………………………………………….… 81
Appendix E Counter1023mega2 …………………………………………………… 82
Appendix F Opmega ………………………………………………………………… 89
Appendix G Sfunsv1 ………………………………………………………………… 90
Appendix H Sfunxcorr ……………………………………………………………… 92
Appendix I Sfuntime …………………………………………………………… … 94


References …………………………………………………………………………… 96








viii
List of Figures
List of Figures

Figure 1.1: Picture of a satellite in space ………………………………………… … 2
Figure 2.1: GPS constellation ……………………………………………………… 7
Figure 2.2: GPS satellite signal …………………………………………………… 10
Figure 2.3: 4 satellites to get exact user’s location ……………………………….… 11
Figure 2.4: Pseudorange measurement ………………………………………… … 11
Figure 2.5: GPS C/A code generator ……………………………………………… 14
Figure 2.6: An Autocorrelation Function of SV 10 ………… …………………… 16
Figure 2.7: Doppler Principle ………………………………………………………. 17
Figure 2.8: Doppler Calculation ……………………………………………………. 18
Figure 4.1: S-function block …………………………………………………… … 33
Figure 4.2: MATLAB function block …………………………………………… 34
Figure 4.3: Block diagram of Part One …………………………………………… 36
Figure 4.4: Part One of Simulation ………………………………………………… 36
Figure 4.5: Spreading Block in Part One ………………………………………… 39
Figure 4.6: SV 1 to 32 Block in Part One ……………………………………… 42
Figure 4.7: Block diagram of Part Two …………………………………………… 43
Figure 4.8: Part Two of Simulation ……………………………………………… 43

Figure 4.9: BPSK Modulation Block in Part Two …………………………………. 45
Figure 4.10: 10 KHz Doppler Shift Block in Part Two …………………………… 47
Figure 4.11: Simulation of Autocorrelation Part One …………………………… … 48
Figure 4.12: SV 1 to 32 Block from Autocorrelation Part One ……………………… 50
Figure 4.13: Simulation of Autocorrelation Part Two ……………………………… 51
Figure 6.1: Data Stream from Part One of Simulation …………………………… 61
Figure 6.2: Carrier Frequency of 10.23 MHz ………………………………………. 62
Figure 6.3: Converted Data of Data Stream …………………………………… … 63
Figure 6.4: BPSK Data format of Data Stream …………………………………… 64
Figure 6.5: L1 signal of SV1 ……………………………………………………… 65
Figure 6.6: Doppler Shift of L1 Signal ………………………………………… … 66

ix
List of Figures
List of Figures

Figure 6.7: Frequency Spectrum of Carrier …………………………………… … 67
Figure 6.8: Frequency Spectrum of L1 Signal ………………………………… … 68
Figure 6.9: Overall View of the Frequency Spectrum of L1 Signal ………… 69
Figure 6.10: Base Band Frequency Spectrum of C/A code ……………………… 69
Figure 6.11: Autocorrelation Function of SV 10 with a “Lag” of 25 chips …………. 70

























x
List of Tables
List of Tables

Table 2.1: GPS C/A Code Assignments ……………………………………… … 13
Table 2.2: C/A Code Autocorrelation Parameters ………………………………… 15
Table 2.3: BPSK Mapping Scheme ……………………………………………… 20
Table 4.1: S-function Flag Format ………………………………………………… 34

xi
Chapter 1 Introduction
Chapter 1

Introduction


Due to the worldwide usage of advanced technology, previously only intended usage by
the United States Department of Defense has now been made free for all civilians. It cost
the United States $12 billion to build this system [1]. With the implementation of Global
Positioning System (GPS), users will be able to pin point the exact location that they are
currently in. The days of using the street directory or the map will soon be a matter of the
past.

To non - military users, GPS appears to be a navigation tool for hiking and
finding your current location. Whereas for military users, GPS is very important as it
plays a vital part in whether you win or lose in a war, as precise and definite location
must be known. Any slight error may cause dramatic effects. Therefore, GPS usage is
very wide and depends on the individual user to use it appropriately.

Due to the technological advances and advancement of the human race, the need
for accurate and immediate decision stimulated the boom of the GPS industries. GPS
receivers used to cost a “bomb” in the past, but due to great demand causing great supply,
therefore current cheapest GPS receiver cost only ten dollars.

Public transport nowadays uses GPS for navigation and receiving message from
their control centre. The GPS not only integrated into our lifestyle, but also has even
become indispensable. Faster pace of life requires quick responses and immediate
reaction. Consumers are the reason why the GPS is getting popular in our society.


1
Chapter 1 Introduction


Figure 1.1 – Picture of a satellite in space [2]


1.1 Overview of thesis

The purpose of this thesis is to understand and simulate a Global Positioning System
(GPS) signal simulator. The thesis basically consists of two parts, the software and the
hardware implementation. This thesis will be covering the software simulation and
another thesis will be covering the hardware implementation. Job scopes are divided so as
to be able to finish the assigned task efficiently and effectively.

At the end of this thesis, both software and hardware will be able to complement one
another and deeper understanding between the two areas provide a very good opportunity
to learn in the above two aspects. Precious experiences are gathered throughout this thesis
and valuable knowledge acquired.

1.2 Implementation

Software implementation will be done on MATLAB (Simulink) platform. All simulations
in this thesis are real values from the satellites, unless otherwise stated. The binary data

2
Chapter 1 Introduction
are coded with coarse acquisition code, commonly known as C/A code before mapping
onto a binary phase shift keying (BPSK) signal with a carrier frequency, simulating the
transmission of data over the channel. Certain affecting attributes, for instance Doppler
shift will be applied to the BPSK waveform to see the resultant effect as in real life
system. Although the receiver is not required in this thesis, but autocorrelation is done so
that some aspects of the receiving end will be learned through this process.

Hardware implementation is to design and fabricate the frequency synthesizer for
the GPS signal simulator. The main concern is to generate the L1 signal carrier frequency
at 1575.42 MHz carrier frequency and to be able to lock this frequency using the phase

lock loop. Details on the hardware development and the fabrication process of the
frequency synthesizer can be found in the thesis “GPS Signal Simulator” written by my
partner, Yong Wai-Cheng [3].

1.3 Desired results

The intended result is to build a GPS signal simulator. But due to the limitation of
equipments and human resource, the thesis scope change slightly to suit our present
settings. For software development, creation of the GPS L1 signal generator is required
using MATLAB Simulink platform. Whereas for the hardware development, designing
and building the frequency synthesizer is the main task involved. Tasks are broken down
into different modules, so that different modules can be connected together to form the
whole signal simulator.

The GPS signal simulator is currently available in the market. But due to the
specialization in this particular area of interest, each GPS signal simulator could cost up
to tens of thousands or even hundred of thousands U.S. dollars. Therefore the knowledge
acquired in this thesis is very valuable in today’s market due to the intense specialization.




3
Chapter 1 Introduction
1.4 Organization of Thesis

In this thesis we report on the simulation of Global Positioning System (GPS) signal L1
using MATLAB software. This software is particularly useful in technical computing and
simulating program. With the help of Simulink, which is a model based and system level
design in real time simulation of the GPS signal can be carried out realistically.


The topics layout for each chapter is as follows. In chapter 1, the GPS signal will
be introduced and briefly discussed to let the reader have a basic understanding before
going into further details, the implementation, followed by the purpose of this thesis. The
initial plan that this thesis is going to achieve and the actual results achieved. Chapter 2
will consist of a comprehensive review on GPS. The background knowledge and relevant
studies will be presented for a clearer picture. Topics covering in this thesis will be
enhanced with detailed descriptions on individual topic to have a better understanding.

Chapter 3 analyses the GPS signal simulator currently available in the market and
their individual functions and cost. The main objective is to tap into the vast area of
lucrative market of GPS. In chapter 4, the simulation of the GPS signal generator will be
discussed in details. Due to the limitations of the software and the computer that the
software is running on, certain constraints are present and made known. Moving in depth
into MATLAB (Simulink) block sets and how they are incorporated in this thesis
simulation. M files and S-functions are the two main components in this section that
requires much attention. Individual block will be discussed and described in details.

Chapter 5 is the user manual for the Simulink simulation. This chapter provides
comprehensive steps for the user to operate the simulation. The steps for individual part
of the programs are described fully and the user only needs to follow the instructions and
operate accordingly. Blocks that allow changes are specified in the manual to assist the
user so that the programs would be able to maximize and enhanced the simulation to the
fullest potential.


4
Chapter 1 Introduction
In chapter 6, the MATLAB (Simulink) results will be analyzed and compared
with the theoretical findings. The problems encountered during the simulation process

will be addressed and rectified accordingly.

Lastly, chapter 7 is the conclusion for this thesis. Whereby all the lessons and
knowledge gathered from this thesis will be acknowledge and any future plans to carry on
the thesis.


5

















Chapter 2 Literature Review
Chapter 2

Literature Review


This chapter will discuss about the relevant background knowledge and information
required in the undertaking of this thesis.

2.1 Global Positioning System

As of updated on September 16, 2003 there are 31 satellites presently in space orbiting.
But only 24 satellites are in used, the rest are spares [4]. They are arranged in 6 orbital
planes with 4 satellites each plane. There are 3 segments in GPS, namely control, space
and user segment.



Figure 2.1 – GPS constellation [4]

7
2.1 Global Positioning System
2.1.1 Control Segment

Master Control Station – This station is located at Falcon Air Force Base in Colorado
Springs, Colorado. It controls the overall management of the remote monitoring and
transmission sites. As the main centre for support operations, it calculates any position or
clock errors for each individual satellite according on the information received from the
monitor stations. If error is found, it will “order” the appropriate ground antenna to relay
the requisite corrective information back to that particular satellite [5].

Monitor Stations – There are altogether five monitor stations located at Falcon Air
Force Base in Colorado, Hawaii, Ascension Island in the Atlantic Ocean, Diego Garcia
Atoll in the Indian Ocean, and Kwajalein Island in the South Pacific Ocean. The monitor
stations checks the exact altitude, position, speed, and the overall health of the orbiting
satellites. The control segment uses the information collected by the monitor stations to

predict the behaviour of individual satellite’s orbiting and clocking status, making sure
that they remain in acceptable limits. The prediction data is up linked to the satellites for
transmission back to the users. A station can perform a track up of up to 11 satellites at a
time. This “check up” is performed twice a day as the satellites complete their journeys
around the earth [5].

Ground Antenna – Ground antennas are used to monitor and track the satellites. They
also transmit corrective information to back to the individual satellites [5].

2.1.2 Space Segment

The space segment consists of the satellites and the Delta rockets that launch the satellites
from Cape Canaveral, in Florida. The satellites move in circular orbit at an altitude of
10,900 miles (17,500 km) with a period of 12 hours. The orbits are tilted to the earth’s
equator by 55 degrees to ensure the coverage of the polar regions. As they are powered
by the solar cells, the satellites will orientate themselves to face toward the sun for power

8
2.1 Global Positioning System
and their antennas toward the earth for transmission. There are a total of 24 satellites
positioned in 6 orbital planes to ensure coverage of the entire earth [6].

2.1.3 User Segment

The user segment implies to all the users of the global positioning system. They can be
classified into two groups, military users and non – military users. The military uses the
GPS in a wide range of scope, from navigation tools to target designation, air support to
the integration of smart weapons [7]. For the civilians, GPS are used in daily life
applications, providing point-to-point navigation in public bus services, navigational
usage by the hikers and mountaineers, and many more. With the integration of the GPS in

our life, the GPS will be a cornerstone of the future air traffic management (ATM).
Providing a high degree of safety and precision while reducing delays and increasing
airway capacity [7].

2.2 GPS Signal Structure

The satellites broadcast ranging codes and navigation data on two frequencies using a
technique called Code Division Multiple Access (CDMA) [8]. There are only two
frequencies in use by the system, L1 (1575.42 MHz) and L2 (1227.6 MHz). In this thesis,
only L1 is used, as we concentrate only on the primary frequency and not the secondary
frequency L2. Equation of L1 is as follows,

SL1 (t) = G1 C/A SV(t) d(t) cos (Wc t) + G2 PSV(t) d(t) sin (Wc t) [8]

The fundamental frequency (fo) is 10.23 MHz, L1 is 154 times fo and L2 is 120 times fo.

9
2.2 GPS Signal Structure

Figure 2.2 – GPS satellite signal [2]

2.3 Determine User’s Location

The GPS uses 3 satellites to capture the user’s location and the fourth satellite to get the
precise timing so that the distance of the user can be tracked and derived. The basic
navigation method measures the signal delay between 3 satellites and the user equipment,
computes from these the ranges to form 3 spheres, and their intersection position indicate
the user’s position. A fourth satellite is required to perform the calculation, as time is the
fourth unknown factor therefore requiring a fourth input for explicit solution. The need
for the fourth satellite is due to the almost perfect atomic clock that is being used in the

satellite-timing signal compared to the normal clock in the receiver. The atomic clock is
much more precise then the clock used in the GPS receiver. Any slight error in the user
clock could results in a huge difference in the exact location. It is extremely
uneconomical for every GPS receiver to contain an atomic clock which cost around 50 to
100 thousands U.S. dollars, therefore the fourth satellite come into place.


10
2.3 Determine User’s Location


Figure 2.3 – 4 satellites to get exact user’s location [2]
2.4 Pseudorange Measurement
The location of the user is obtained by using pseudorange measurement. The
measurement of the receiver is achieved by recording the actual time taken for the
relevant code to travel from the satellite to the user’s receiver. Multiply this actual time
recorded by the speed of light to convert this timing into actual distance. The process for
this measurement is in operation when the receiver picks up the signal from the satellite
and compares the incoming signal to the internally generated C/A code, the difference in
time is the travel time for the signal from the satellite to the receiver.

Travel Time x Speed of Light
Figure 2.4 – Pseudorange measurement [2]

11
2.5 Coarse Acquisition Code (C/A code)
2.5 Coarse Acquisition Code (C/A code)

There are 37 pseudo random noise (PRN) sequences used for the C/A codes. Each
satellite (SV) has its individual C/A code. The C/A code is also known as the Gold code,

the code has good auto and cross correlation properties. The cross correlation of the Gold
code is such that the correlation function between two different sequences is low. Every
satellite broadcasts a different code, repeating it over and over again. It contains no actual
data; it is simply an identifier. These codes are binary, consisting of “zeros” and “ones”.
Each individual zero and one is called a chip instead of a bit because they contain no
data. They are of a fixed pattern and length that are repeated indefinitely. The C/A code is
1023 chips long with a broadcasting frequency of 1.023 Mega chips per second. It is
repeated every millisecond, and each chip is 293m (or 0.978 microsecond) long. The
whole sequence is about 300km long [9].

Two shift registers are needed to generate the C/A code. They are G1 and G2,
which represents shift register one, and shift register two respectively. The polynomial
for register G1 is 1 + X
3
+ X
10
and the polynomial for register G2 is 1 + X
2
+ X
3
+ X
6
+
X
8
+ X
9
+ X
10
. Using this two shift registers, the C/A code can be generated as shown in

Figure 2.5. The initial conditions for these two registers are set to all ones.

But for the case of C/A code, not all the bits in register G2 are used. Specific bits
from register G2 are tapped for different satellite. Satellite is also known as Space
Vehicle (SV). The bits that are to be tapped for different space vehicles are shown in
Table 2.1.

SV PRN ID G2 Phase Taps First 10 Chips
1 2 & 6 1100100000
2 3 & 7 1110010000
3 4 & 8 1111001000
4 5 & 9 1111100100
5 1 & 9 1001011011
6 2 & 10 1100101101

12
2.5 Coarse Acquisition Code (C/A code)
7 1 & 8 1001011001
8 2 & 9 1100101100
9 3 & 10 1110010110
10 2 & 3 1101000100
11 3 & 4 1110100010
12 5 & 6 1111101000
13 6 & 7 1111110100
14 7 & 8 1111111010
15 8 & 9 1111111101
16 9 & 10 1111111110
17 1 & 4 1001101110
18 2&5 1100110111
19 3 & 6 1110011011

20 4 & 7 1111001101
21 5 & 8 1111100110
22 6 & 9 1111110011
23 1 & 3 1000110011
24 4 & 6 1111000110
25 5 & 7 1111100011
26 6 & 8 1111110001
27 7 & 9 1111111000
28 8 & 10 1111111100
29 1 & 6 1001010111
30 2 & 7 1100101011
31 3 & 8 1110010101
32 4 & 9 1111001010


Table 2.1 – GPS C/A Code Assignments [10]

The first 10 chips in Table 2.1 are used to verify the generated C/A code, to
ensure that they are correctly generated. They are represented in octal notation. Take SV
1 for example. The binary representation is 1100100000, which is the octal representation
equivalent of 1440, that is specified in most GPS textbook. If the first 10 chips of the
generated code for SV1 tallies with the first 10 bits of SV1 as describe above, then the
generated code is proved to be correct.


13

×