The GPS Receiver - polito.it · THE GPS RECEIVER. Analog and Telecommunication Electronics prof....
Transcript of The GPS Receiver - polito.it · THE GPS RECEIVER. Analog and Telecommunication Electronics prof....
THE GPS RECEIVER
Analog and Telecommunication Electronicsprof. Dante Del Corso
- A.Y. 2013/2014 -
Ruggero Balteri – s206828
SUMMARY
1. - Fundamental concepts behind the GPS
Distance measurement – example 1
The Light pulse Transmitter – example 2
2. The structure of GPS
3. Fundamentals of GPS C/A Code Signal Structure
4. GPS Receiver basic architecture
The five steps
The main building blocks of a GPS receiver
5. Practical implementation with an Arduino
Ruggero Balteri - s206828 2
MAIN TASK OF A GPS RECEIVER
Reception of the signal from satellites.
Extract satellite data from the signal.
Measure the distance from the user to each satellite the user receiver tracks.
Calculation of user’s position.
Ruggero Balteri - s206828 3
GPS receivers DO NOT send data.
DISTANCE MEASUREMENT –EXAMPLE 1
Ruggero Balteri - s206828 4
THE LIGHT PULSE TRANSMITTER –EXAMPLE 2
Let us consider:
a car moving in an ideal straight road from A to B.
In A and in the car there is an ideal clock.
Every time a clock counts to 20,000µs (20ms) it rolls over to zero and starts over again.
When the clock in A rolls over (time zero) a light pulse is emitted.
Note that:
Ruggero Balteri - s206828 5
Our final goal is to measure the distance of the car from A.
Distance Time to travel at speed of light
AB 6000km 20msresolution 300m 1µs
Ruggero Balteri - s206828 6
All clocks are synchronized.
FINAL REMARKS
The GPS is not a NOT a pulsed system
By locking the signal sent by satellites you can recreate a copy of the atomic clock in the receive
If you consider another atomic clock in B (in sync with A) you can minimize the error by considering the same bias:
�Δ𝑡𝑡𝐴𝐴 = 𝑇𝑇𝑟𝑟𝑟𝑟𝑟𝑟𝐴𝐴 − 𝑇𝑇𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 − 𝑇𝑇𝑏𝑏𝑟𝑟𝑠𝑠𝑡𝑡𝐴𝐴Δ𝑡𝑡𝐵𝐵 = 𝑇𝑇𝑟𝑟𝑟𝑟𝑟𝑟𝐵𝐵 − 𝑇𝑇𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 − 𝑇𝑇𝑏𝑏𝑟𝑟𝑠𝑠𝑡𝑡𝐵𝐵
Ruggero Balteri - s206828 7
⇒ 𝑇𝑇𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 =𝑇𝑇𝑟𝑟𝑟𝑟𝑟𝑟𝐴𝐴 + 𝑇𝑇𝑟𝑟𝑟𝑟𝑟𝑟𝐵𝐵 − 𝑇𝑇𝑏𝑏𝑟𝑟𝑠𝑠𝑠𝑠𝐴𝐴 − 𝑇𝑇𝑏𝑏𝑟𝑟𝑠𝑠𝑠𝑠𝐵𝐵 − Δ𝑡𝑡𝐴𝐴 + Δ𝑡𝑡𝐵𝐵
2
Ruggero Balteri - s206828 8
S1
x1
S2
x2
S3
x2
By analogy:
3 satellites are needed to determine the position on a 3D space
BUT
at least 4 satellites are required to properly solve the user position and the user clock error.
THE STRUCTURE OF GPS
To recap: 1. Antenna receives GPS signals2. RF chain3. AD converter4. Acquisition of satellites signals5. Tracking -> Ephemeris data and pseudo-ranges 6. User Position
The Control segment monitor the performance of the GPS satellites
The Space segment 24 satellites at a distance of 20.000km from mean sea level
The User segment Calculate the sent time and received time and multiply by the speed of
light.
Ruggero Balteri - s206828 9
GPS C/A CODE SIGNAL STRUCTURE
Key concepts:1. PRN (pseudo-random noise) generator2. BPSK modulation (Bit Phase shift modulation3. Code division multiple access (CDMA)
Ruggero Balteri - s206828 10
Ruggero Balteri - s206828 11
Ruggero Balteri - s206828 12
GPS RECEIVER BASIC ARCHITECTURE
The basic steps:
RF Down-conversion
Signal Acquisition
Data Demodulation
Data Clock Recovery, SV Clock Replication
“Time Sent-Received information.”
The last step usually requires a microcontroller.
Ruggero Balteri - s206828 13
THE BUILDING BLOCKS OF A GPS RECEIVER
Antenna Uniform gain over
a very wide spatial angle. Frequency selection Reject multi-path effect
Pre-amp
Demodulation 1st BP filter -> image
rejection 1st mixer 2nd BP filter -> out of band signal rejection 2nd mixer -> downconverted
Ruggero Balteri - s206828 14
Ruggero Balteri - s206828 15
Benefits of downconversion:• Easier design of sharp BPF• Correct amplification of the signal without problems related to feedback oscillation• Digital sampling of the signal is easier.
1. Sum frequency components are generated, but these are eliminated by the bandpassfilter
2. Fequency separation of the desired and image signals is twice the IF
3. the filtering becomes difficult if a single downconversion
4. Downconversion is often accomplished in more than one stage, with high first IF (30–100 MHz) to permit image rejection.
5. The frequency of the signal is now low enough to be digitally sampled.
INTERFACING A GPS RECEIVER WITH ARDUINO
Ruggero Balteri - s206828 16
Ruggero Balteri - s206828 17
GPS Shield
Arduino 2009
GPS module
Ruggero Balteri - s206828 18
Final IC Soldering headers GPS Shield Arduino 2009 GPS module
NMEA 0183
ASCII based protocol
There are several NMEA messages, but the most relevant for us is represented by the string $GPRMC
Ruggero Balteri - s206828 19
Example$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70N° parameter Actual Value Description
1 220516 Time Stamp2 A validity - A-ok, V-invalid3 5133.82 current Latitude4 N North/South5 42.24 current Longitude6 W East/West7 173.8 Speed in knots8 231.8 True course9 130694 Date Stamp10 4.2 Variation
$GPRMC,235316.000,A,4003.9040,N,10512.5792,W,0.09,144.75,141112,,*19$GPGGA,235317.000,4003.9039,N,10512.5793,W,1,08,1.6,1577.9,M,-20.7,M,,0000*5F$GPGSA,A,3,22,18,21,06,03,09,24,15,,,,,2.5,1.6,1.9*3E
TINYGPS – A SMART ARDUINOLIBRARY
no need to deal with NMEA commands
1. Instance TinyGPS object
2. Feed the method “.read()” with NMEA data
3. If the method “.encode()” returns “true” then the sentence can be parsed
4. Use the methods: “f_get_position()”, “crack_datetime()”, “f_altitude()”… to extract all the needed information
Ruggero Balteri - s206828 20
Ruggero Balteri - s206828 21
Include the libraries:SoftwareSerial.h
TinyGPS.h
Define Constants:RX, TX pins
Baud Rate of GPS and Arduino.
Create:New TinyGPS object
New Uart Connection
Is there any Data on the RX pin?
Feed all received data to the method “.read()”
Does the method “encode()” return “true”?
NO
Call the function “getgps()” and Print on video:Latitude and longitude,
Date and time,Altitude,Speed.
YES
NO
YES
A simple algorithm
OutputLat/Long: 45.04378, 7.67608Date: 5/13/2014 Time: 16:32:43.99Altitude (meters): 248.00Speed(kmph): 0.41
Ruggero Balteri - s206828 22
The end ◊
Title: “Fundamentals of Global Positioning System Receivers - A Software approach”Author: James Bao-Yen Tsui
Title: “Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems”Author: Paul D. Groves
Title: “GPS & Galileo: Dual RF Front-end Receiver and Design, Fabrication, and Test”Author: Jaizki Mendizabal
Title: “Fundamentals of GPS Receivers: A Hardware Approach”Author: Dan Doberstein
Title: “Global Positioning Systems, Inertial Navigation, And Integration”Authors: Mohinder S. Grewal, Lawrence R. Weill, Angus P. Andrews
Title: “Signal Acquisition And Tracking For A Software Gps Receiver” (Thesis)Author: Sophia Y. Zheng
Datasheet: GLOBALSAT GPS Module EM-506Company: Globalsat Technology CorporationWebsite: www.globalsat.com.tw
Arduino – www.playground.arduino.cc/Tutorials/GPS
NMEA – www.aprs.gids.nl/nmea
TInyGPS – www.arduiniana.org/libraries/tinygps
Sparkfun – www.sparkfun.com