Top Banner
Software Defined GPS/Galileo Receiver Filipe Jorge Coelho A thesis submitted to the Department of Electrotechnical Engineering in partial fulfillment of the requirements for the degree of Master of Science in Electrotechnical Engineering President: Doutor Marcelino Bicho dos Santos Advisor: Doutor Gon¸ calo Nuno Gomes Tavares Co-Advisor: Doutor Mois´ es Sim˜ oes Piedade Examiner: Doutor Jorge Manuel dos Santos Ribeiro Fernandes April 2011
131

Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Mar 15, 2018

Download

Documents

vonhu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Software Defined GPS/Galileo Receiver

Filipe Jorge Coelho

A thesis submitted to the Department of Electrotechnical Engineering

in partial fulfillment of the requirements for the degree of

Master of Science in Electrotechnical Engineering

President: Doutor Marcelino Bicho dos Santos

Advisor: Doutor Goncalo Nuno Gomes Tavares

Co-Advisor: Doutor Moises Simoes Piedade

Examiner: Doutor Jorge Manuel dos Santos Ribeiro Fernandes

April 2011

Page 2: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

ii

Page 3: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Abstract

GPS is a global navigation satellite system. There several other systems but this is the most

extended and the only fully operational. Today cars, boats and airplanes have a GPS receiver

for navigation. Most of today cell phones and some laptop have also receivers.

There are others GNSS like Galileo, GLONASS, Compass but GPS is the only one fully

operational. The aim of this work is to implement and develop a platform that allows the

development of new signal processing techniques for GNSS. This will allows the test and

implementation of new algorithms and to permits the easily upgrade of the receiver to new

signal structures or even other navigation systems.

Initially, the most important concepts of a GPS receiver operation and the signal processing is

described to the understanding of this work. The essentials concepts of Galileo and GLONASS

are also described.

Software defined radio is a radio system were some parts of the system typically implemented

in hardware are implemented in software. All but the really essential hardware parts are

removed and the ADC that convert the analog signals received in digital signal to processing

is placed closer to the antenna. This type of receivers provides the flexibility and adaptability

needed.

To allow that almost all PCs to interface with the prototype board, the USB interface is used.

It was necessary to develop a hardware system that permits the acquisition of the GNSS signals

from the space. After the hardware is developed and all the software for communication with

the PC is developed, the software used for the signal processing and to obtain a navigation

solution are described.

Keywords: GPS, GNSS, USB, receiver, software defined radio

iii

Page 4: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

iv

Page 5: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

List of Figures

1.1 GPS L1 C/A code frequency representation. . . . . . . . . . . . . . . . . . . . . 4

1.2 GPS signal modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.3 GPS navigation data structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.4 Basic demodulation scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.5 Block diagram of serial search algorithm. . . . . . . . . . . . . . . . . . . . . . 9

1.6 Block diagram of the parallel frequency search algorithm. . . . . . . . . . . . . 10

1.7 Block diagram of the parallel code phase search algorithm. . . . . . . . . . . . . 11

1.8 Costas Loop used to track the carrier wave. . . . . . . . . . . . . . . . . . . . . 12

1.9 Comparison between Costas loop discriminator responses. . . . . . . . . . . . . 13

1.10 Basic code tracking loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.11 Code tracking. (a) The late replica has the highest correlation. (b) The prompt

replica has the highest correlation. . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.12 The delay between the time of transmission and the time of reception at the

receiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.13 The relation between GPS time, Z-count, and the Z-count truncated Z-count

in the HOW of the navigation data. . . . . . . . . . . . . . . . . . . . . . . . . 18

1.14 Galileo Frequency Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.15 Modulation scheme for E1 signal. . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.16 Galileo and GPS signal Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . 22

1.17 Primary GIOVE navigation signal parameters. . . . . . . . . . . . . . . . . . . 23

1.18 Parameters to GIOVE E1-B and E1-C code generation. . . . . . . . . . . . . . 23

1.19 GPS and GLONASS L1 frequencies. . . . . . . . . . . . . . . . . . . . . . . . . 24

1.20 GLONASS and GPS specifications comparison . . . . . . . . . . . . . . . . . . 25

2.1 Block diagram of MAX2769. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

v

Page 6: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

vi LIST OF FIGURES

2.2 Evaluation Kit of MAX2769. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.3 FT2232H module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

2.4 Circuit logic of data packer. Prototype board 1 and 2 . . . . . . . . . . . . . . 34

2.5 Power supply for Board 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

2.6 Prototype board 2 data packer . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

2.7 Schematic for the MAX2769 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.8 Layout of the front layer of the second prototype board. . . . . . . . . . . . . . 39

2.9 Layout of the back layer of the second prototype board. . . . . . . . . . . . . . 40

2.10 Board number 2 front side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

2.11 Board number 2 back side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

2.12 Board number 2 front side with FT2232H module. . . . . . . . . . . . . . . . . 41

2.13 GNSS SDR block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

2.14 Front side of the GNSS SDR 1 board. . . . . . . . . . . . . . . . . . . . . . . . 44

2.15 Back side of the GNSS SDR 1 board. . . . . . . . . . . . . . . . . . . . . . . . . 45

2.16 Front side of the GNSS SDR 2 board. . . . . . . . . . . . . . . . . . . . . . . . 46

2.17 Back side of the GNSS SDR 2 board. . . . . . . . . . . . . . . . . . . . . . . . . 46

3.1 Matlab interface for programming board number 1 and board number 2. . . . . 48

3.2 Example of the probeData function frequency domain plot output. . . . . . . . 52

3.3 Example of the probeData function time domain plot output. . . . . . . . . . . 53

3.4 Example of the probeData function histogram plot output. . . . . . . . . . . . 54

3.5 Example of the plotting for tracking results. . . . . . . . . . . . . . . . . . . . . 55

3.6 Example of the plotting for the navigation solutions. . . . . . . . . . . . . . . . 57

3.7 OSGPS channel state diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.8 Example of display page 1 of OSGPS. . . . . . . . . . . . . . . . . . . . . . . . 62

3.9 Example of display page 2 of OSGPS. . . . . . . . . . . . . . . . . . . . . . . . 63

3.10 Example of display page 3 of OSGPS. . . . . . . . . . . . . . . . . . . . . . . . 64

3.11 Graphical interface of the GPS SDR. . . . . . . . . . . . . . . . . . . . . . . . . 68

4.1 Board 1 probe data plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4.2 Board 1 acquisition plot, no satellite found . . . . . . . . . . . . . . . . . . . . 73

4.3 Board 1 acquisition plot, with satellite found . . . . . . . . . . . . . . . . . . . 74

4.4 Board 1 acquisition plot, Single Frequency . . . . . . . . . . . . . . . . . . . . . 74

Page 7: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

LIST OF FIGURES vii

4.5 Board 1 acquisition, single frequency zoom . . . . . . . . . . . . . . . . . . . . . 75

4.6 Board 1 acquisition, single frequency with code chip excluded . . . . . . . . . . 75

4.7 Board 1 acquisition plot, fine frequency search . . . . . . . . . . . . . . . . . . 76

4.8 Board 1 acquisition plot, fine frequency search zoom . . . . . . . . . . . . . . . 77

4.9 Board 1 tracking plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

4.10 Board 1 Code Error and Code NCO . . . . . . . . . . . . . . . . . . . . . . . . 78

4.11 Board 1 tracking carrier error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

4.12 Board 1 tracking carrier NCO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

4.13 Board 1 navigation solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

4.14 OSGPS output for Board 1 signal processing . . . . . . . . . . . . . . . . . . . 82

4.15 OSGPS output for Board 1 in navigation state . . . . . . . . . . . . . . . . . . 83

4.16 OSGPS output for Board 1 in navigation state page 2 . . . . . . . . . . . . . . 84

4.17 OSGPS output for Board 1 page 3 . . . . . . . . . . . . . . . . . . . . . . . . . 84

4.18 OSGPS output for Board 1 page 4 . . . . . . . . . . . . . . . . . . . . . . . . . 85

4.19 OSGPS output for Board 1 page 5 . . . . . . . . . . . . . . . . . . . . . . . . . 85

4.20 Navigation Solution from the OSGPS . . . . . . . . . . . . . . . . . . . . . . . 86

4.21 Board 2 probe data function plot. . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4.22 Board 2 acquisition results plot. . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

4.23 Board 2 long tracking results plot. . . . . . . . . . . . . . . . . . . . . . . . . . 88

4.24 Board 2 small tracking results plot. . . . . . . . . . . . . . . . . . . . . . . . . . 89

4.25 Board 2 navigation solution plot . . . . . . . . . . . . . . . . . . . . . . . . . . 90

4.26 Board 3 Probe data plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

4.27 Board 3 Acquisition plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

4.28 Board 3 tracking plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

4.29 Board 3 navigation Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

4.30 Board 4 Probe data plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4.31 Board 4 Acquisition plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.32 Board 4 tracking plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.33 Board 4 navigation Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

4.34 Plot for acquisition in GLONASS receiver . . . . . . . . . . . . . . . . . . . . . 97

4.35 Probe Data in GLONASS receiver . . . . . . . . . . . . . . . . . . . . . . . . . 97

4.36 Plot of the tracking results in the GLONASS receiver . . . . . . . . . . . . . . 98

Page 8: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

viii LIST OF FIGURES

4.37 Plot of the navigation Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

6.1 Schematic for Evaluation Kit of MAX2769. . . . . . . . . . . . . . . . . . . . . 104

6.2 Schematic for the second prototype. . . . . . . . . . . . . . . . . . . . . . . . . 105

6.3 GNSS board 1 Power supply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

6.4 GNSS board 1 USB interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.5 GNSS board 1 Front end MAX2769. . . . . . . . . . . . . . . . . . . . . . . . . 108

6.6 GNSS board 1 CPLD section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

6.7 GNSS board 1 Clock section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

6.8 GNSS board 2 Power supply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

6.9 GNSS board 2 USB interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

6.10 GNSS board 2 Front end MAX2769. . . . . . . . . . . . . . . . . . . . . . . . . 112

6.11 GNSS board 2 CPLD section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

6.12 Page 1 of CPLD VHDL code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

6.13 Page 2 of CPLD VHDL code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

6.14 Page 3 of CPLD VHDL code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Page 9: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

List of Tables

1.1 Various types of delay lock loop discriminators. . . . . . . . . . . . . . . . . . . 15

ix

Page 10: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

x LIST OF TABLES

Page 11: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

List of Abbreviations

BPSK Binary Phase keying

BOC Binary Offset Carrier

CBOC Complex Binary Offset Carrier

DFT Discrete Fourier Transform

DLL Dynamic-linked library

ICD Interface Control Document

ESA European Space Agency

FIFO First In First Out

FFT Fast Fourier Transform

LFSR Linear Feedback Shift-Registers

GIOVE Galileo In-Orbit Validation Element

GLONASS GLObal NAvigation Satellite System

GNSS Global Navigation Satellite System

GPIOs General Propose Input Output

GPS Global Positioning System

NCO Numeric Controlled Oscillator

LDO Low-Dropout Regulator

ppm part per million

RF Radio Frequency

SIS Signal In Space

SMD Surface Mount Device

SMT Surface Mount Technology

TCXO Temperature-compensated crystal oscillator

TOW Time of the Week

TOA Time-of-Arrival

UART universal asynchronous receiver/transmitter

USB Universal Serial Bus xi

Page 12: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

xii LIST OF TABLES

Page 13: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Contents

Abstract iii

List of Figures viii

List of Tables ix

List of Abbreviations xi

1 Introduction 1

1.1 Introduction to Global Naviagation Systems . . . . . . . . . . . . . . . . . . . . 1

1.2 GPS Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3 GPS Receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3.1 Operation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3.2 Aquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.3.3 Carrier Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.3.4 Code Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.3.5 Pseudorange Computations . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.4 Data processing for position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.4.1 Navigation data recovery . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.5 Galileo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.5.1 GIOVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

1.6 GLONASS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2 Developed work 27

2.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.1.1 Evaluation Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.1.2 Board number 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

xiii

Page 14: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

xiv CONTENTS

2.2 Data Packer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.2.1 Board number 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.3 GNSS board 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.4 GNSS board 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3 Software 47

3.1 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

3.2 GPS sampler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

3.3 SoftGNSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

3.4 Open Source GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3.5 GPS SDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

3.6 GLONASS software receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

4 Results 71

4.1 Board 1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

4.1.1 OSGPS program results . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4.2 Board 2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4.3 Board 3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

4.4 Board 4 solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

4.5 GLONASS Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

5 Conclusions 101

6 Annex 103

References 117

Page 15: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 1

Introduction

Global Navigation Satellite Systems (GNSS) is the standard generic term for satellite naviga-

tion systems or “sat nav”. The GNSS allows electronic receivers to determine their location

(longitude, latitude and height) with a precision of a few meters using time signals transmitted

along a line-of-sight by radio on satellites. The receivers can also determine the precise time.

Most of the already available GNSS receivers utilize the Global Navigation System (GPS) but

there other GNSS system in development.

Most receivers utilized nowadays are build using hardware to perform most of the tasks

necessary to give a position and time to the users. Some of this hardware parts can be replaced

using another type of architecture. The objective of this work is to develop a solution that

proves that this is possible and used the advantages of this solution to obtain a better and

cheaper GNSS receiver.

One of the main advantages of the software defined receiver is the flexibility of the design

that allows reconfiguring the software to uses another signal or even system. And the other

advantage is the possibility of utilize various GNSS to give a more precise solution.

1.1 Introduction to Global Naviagation Systems

In 2010, the only fully operational GNSS is the United States Global Position System (GPS).

The Russian (GLONASS) is another GNSS in the process of being restored to full operation.

The European Union’s Galileo positioning system is a GNSS in initial deployment phase,

scheduled to be operational in 2014. China will expand its regional Beidou navigation system

into the Compass navigation system by 2020.

1

Page 16: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2 CHAPTER 1. INTRODUCTION

The GPS is a satellite-based navigation system or GNSS. To compute a receiver position it

uses the concept of measurement time-of-arrival (TOA). For this method to work, the position

of all transmitters need to be known and the receiver and transmitters clocks need also to

be synchronized. From TOA, the propagation time can be computed. With this time it is

possible to get a range estimate to the transmitter, multiplying the propagation time by the

speed of light. At this time, assuming the location of transmitters are known, the receiver

can compute its position.

The GPS system consists on a constellation of nominally 24 satellites (29 actual satellites)

with an orbit radius of 26,650Km, giving the satellites a period of approximately 12 hours. All

satellites have highly synchronized Rubidium or Cesium atomic clocks as a frequency reference.

The satellites broadcast Code Division Multiple Access (CDMA) ranging codes and navigation

data on two frequencies (L1)(1575.42MHz) and (L2) (1227.6MHz). All satellites broadcast

in the same frequencies but use different ranging codes with low cross-correlation properties.

Each satellite broadcasts navigation data that allows the receivers to compute the satellite

position and transmission time. The ranging code is used to determine the propagation time

of the signal. If the receiver clock was synchronized with the transmitter clock, only three

ranging measurements are needed for a 3D position solution, but since the receiver clock is

usually drifted with respect to the transmitter clock, four measurements are needed to solve

for longitude, latitude, height and receiver clock offset.

The GPS satellites generate a carrier frequency at L1 and L2 and these carrier frequencies

are then modulated with the ranging codes and navigation data using bi-phase shift keying

(BPSK). Each satellite generates two different ranging codes, the civilian Coarse Acquisition

code (C/A) code and the military P(Y) code. These are modulated onto the carriers frequen-

cies at 1.023MHz and 10.23MHz respectively. The navigation data is also modulated on the

carriers at a 50bps rate. This navigation message contains information about the satellite

position and time of transmission signal. The L1 signal carriers both civilian and military

codes, while the L2 signal is only modulated with the military code. The rest of discussion

will focus only on the civilian L1 C/A code because the military code is not accessible for

civilian use.

Modern digital receivers are typically made of three parts: a radio frequency (RF) front-end,

a digital baseband processor, and a microcontroller. The function of the RF front-end is to

convert the signal frequency to an intermediate frequency (IF) that is much lower so that the

Page 17: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.2. GPS OVERVIEW 3

signal can be sampled by an analog-to-digital converter (ADC). The digital baseband proces-

sor mission is to take care of removing the residual carrier and the PRN code (despreading

the signal). This process is, however, tightly coupled with the microcontroller. The micro-

controller examines the output of the baseband processor to determine if the incoming signal

is being tracked correctly. If the signal is not being tracked correctly, the microcontroller

adjusts the tracking parameters of the baseband processor.

There are different types of GPS receivers. The vast majority of GPS receivers on the market

today use some type of application-specific integrated circuit (ASIC) design to perform several

tasks in the receiver. This type of receivers is usually called Hardware Receiver or ASIC

receiver. This design relies on the ASIC performing most of the high-speed signal processing.

Another type of receivers is the software receiver. In this type of receivers, the objective is

to move a generic processor as close to the antenna as possible. This permits most of the

components of the ASIC receiver to be replaced by signal processing algorithms. The samples

can be processed by general propose microprocessors in real-time or can be stored to a disk

and late processed by post-processing software.

These two types of GPS receivers have their own advantages and disadvantages. The hard-

ware receivers normally are faster, performing most of the high-speed signal processing. The

software defined GNSS receivers using software to implement most functions permit the soft-

ware receiver to have good design adaptability. By changing some parameters or software, the

receiver can receive Galileo, Compass or GLONASS signals and implement GNSS integrated

navigation. Compared with the traditional hardware receiver, the software receiver has much

better expandability because of it flexibility and the development of algorithms oriented to

different domains can easily meet the different application needs.

The software defined GPS receivers are special important because they allow the implemen-

tation of non-usual algorithms for weak signal tracking or fast acquisition among other. For

research not having to wait for another version of hardware is an important feature that can

reduce development time of new algorithms. The type of receiver utilized in this work is the

software defined GNSS receiver.

1.2 GPS Overview

The GPS signal is transmitted in two frequencies L1 and L2 that are derived from a common

frequency f0 = 10.23MHz. The signals are composed by three parts: carrier, navigation data,

Page 18: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4 CHAPTER 1. INTRODUCTION

Figure 1.1: GPS L1 C/A code frequency representation.

and spreading sequence. The navigation data contain information about satellite orbits. This

information is transmitted to all satellites by the ground stations of GPS Control Segment.

The navigation data has a bit rate of 50 bps. The spreading code, also known as Pseudo

Random Noise (PRN), is another part of GPS signals. Each satellite has two unique sequences

or codes. The first one is called coarse acquisition code (C/A), and the other is the encrypted

precision code (P(Y)). The C/A code is a sequence of 1023 chips (a chip corresponds to 1bit

but does not hold information). The code is repeated each millisecond (ms) giving a chipping

rate of 1.023MHz. The code P(Y) is a longer code with a chip rate of 10.23MHz. It repeats

itself each week. The C/A code is only modulated on the L1 frequency and the P(Y) code is

modulated in the L1 and L2 frequencies [9]. The rest of discussion will only focus on the L1

C/A code.

Since the L1 frequency is essentially modulated with a 1.023MHz PRN code, the frequency

domain representation of the L1 signal looks like a sinc2 centered at the GPS L1 frequency.

More than 90% of signal energy is in the first lobe, which is 2.046MHz. Occupying at least

2MHz of spectrum in order to transmit 50Hz navigation data might seem wasteful, but the

1.023MHz C/A code has some interesting characteristics. Figure 1.1 shows a representation

of the spectrum of the GPS L1 signal with the modulated by the C/A code. In the figure it

is visible the main lobe where the majority of the signal energy is located.

Figure 1.2 illustrates the signal modulation that occurs in each satellite[4]. The modulation

utilizes the logic operation Exclusive-OR to modulate the navigation data in the PRN code.

After, the result is mixed with the carrier.

The spreading sequences used as C/A codes in GPS belong to a unique family often referred

to as Gold Codes. They are also known as pseudo-random noise (PRN) code sequences, or

simply PRN sequences. These sequences offer very desirable signal characteristics such as:

Page 19: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.2. GPS OVERVIEW 5

Figure 1.2: GPS signal modulation.

• Satellites can transmit on the same frequency

• Precise ranging

• Process gain due to despreading of PRN code

• Rejection of reflected signal

• Anti-jamming properties

The characteristics of the signal are achieved because of the correlation properties of the

codes. The cross correlation between two different C/A codes is nearly zero. All C/A codes

are nearly uncorrelated with themselves, except for zero lag. This makes it easy to find out

when two similar codes are perfectly aligned. In GPS, Doppler frequency shift occurs because

of the relative motion between the transmitter (satellite) and the GPS receiver. This Doppler

frequency shift affects both the acquisition and the tracking of GPS signal. The Doppler

frequency shift affects both a stationary and a moving GPS receiver but it is acceptable to

assume that the maximum Doppler shift is 10 kHz in the L1 frequency. For the C/A code

this shift is much smaller than L1 frequency and the maximum Doppler shift of the carrier.

The navigation data are transmitted in the L1 frequency with bit rate of 50bps. The basic

format of navigation data is a 1500-bit-long containing 5 subframes, each having a length of

300bits. One subframe contains 10 words, each having a length of 30bits. Subframes 1, 2,

Page 20: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

6 CHAPTER 1. INTRODUCTION

TLM HOW5

Almanac

TLM HOW

TLM HOW

TLM HOW

TLM HOW Clock corrections and SV health/accuracy

Ephemeris parameters

Ephemeris parameters

Almanac, ionospheric model, dUTC4

3

2

1

TLM HOW5

Almanac

TLM HOW

TLM HOW

TLM HOW

TLM HOW Clock corrections and SV health/accuracy

Ephemeris parameters

Ephemeris parameters

Almanac, ionospheric model, dUTC4

3

2

1

TLM HOW5

Almanac

TLM HOW

TLM HOW

TLM HOW

TLM HOW Clock corrections and SV health/accuracy

Ephemeris parameters

Ephemeris parameters

Almanac, ionospheric model, dUTC4

3

2

1

TLM HOW5

Almanac

TLM HOW

TLM HOW

TLM HOW

TLM HOW Clock corrections and SV health/accuracy

Ephemeris parameters

Ephemeris parameters

Almanac, ionospheric model, dUTC4

3

2

1

1

1

2

2

3

3

25

250

6

12

18

24

30

Tim

e (s

econds)

Time (m

inut

es)

0.5

1.0

12.0

12.5

0

Fram

esS

ubfr

ames

Figure 1.3: GPS navigation data structure.

[3]

Page 21: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.3. GPS RECEIVERS 7

3 are repeated in each frame. The last subframes, 4 and 5, have 25 versions (with the same

structure, but different data) referred as page 1 to 25. With the bit rate of rate of 50bps, the

transmission of a subframe lasts 6s, one frame lasts 30s, and one entire navigation message

lasts 12.5 minutes[13].

All subframes begin with two special words, the telemetry and the handover word. The

telemetry is the first word of each subframe and contains an 8 bit preamble followed by 16

reserved bits and parity. The preamble should be used for frame synchronization. Handover

word contains a truncated version of time of week and subframe ID. The subframe 1 contains

information about satellite clock and health data, the subframes 2 and 3 contains satellite

ephemeris data, and subframes 4 and 5 contains satellite almanac data. Each satellite trans-

mits almanac data of all satellites but only transmit ephemeris data for itself.

Figure 1.3 shows the overall structure of an entire navigation message.

1.3 GPS Receivers

1.3.1 Operation Overview

The basic objective of a GPS receiver is to demodulate the GPS signal received and, with the

navigation data, compute the position of the receiver. Figure 1.4 shows the basic demodulation

scheme, but in order to have a carrier and PRN code replica, a lot of signal processing need to

be done first to calculate the parameters of this replicas [3]. The signal processing for satellite

navigation system is based in a channelized structure. The following section will provide an

overview of a receiver channel and the processing that occurs. Before allocating a channel

to a satellite, the receiver must know which satellites are currently visible. There are two

common ways. One is called warm start and the other is the cold start. In warm start, the

receiver combines information in the stored almanac data and the last position computed by

the receiver. The almanac is used to compute coarse positions of all satellites at the actual

time. These positions are then combined with the receiver position in an algorithm computing

which satellites should be visible. If the receiver has been moved far away since it was turned

off or the almanac data are outdated, the found satellites do not match the actual visible

satellites. In this case, the receiver has to make a cold start. In this mode, the receiver starts

searching for satellites from scratch. The method of searching is referred to as acquisition.

An acquisition search for all possible satellites is quite time-consuming, this is the reason why

Page 22: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

8 CHAPTER 1. INTRODUCTION

Carrier wave replica PRN code replica

Incoming

signalNavigation data

Figure 1.4: Basic demodulation scheme.

the warm start is preferred if possible.

1.3.2 Aquisition

The purpose of acquisition is to identify all satellites visible to the user and determine coarse

values of carrier frequency and code phase of satellites signals. The satellites are differentiated

by the 32 PRN sequences. The second parameter, code phase, is the time alignment of the

PRN code in the current block of data. It is necessary to know the code phase to generate

a local PRN code that is perfectly aligned with the incoming signal because this is the only

way to remove the incoming code. The third parameter is the carrier frequency, which in case

of down conversion corresponds to IF. The frequency can be different because of the Doppler

effect. In most cases it is sufficient to search the frequencies such that the maximum frequency

error will be less than or equal to 500Hz.

There are three standard methods of acquisition: serial search acquisition, parallel frequency

space search acquisition, and parallel code phase search acquisition. The serial search acqui-

sition is based on multiplication of locally generated carrier signals and PRN code sequences.

The generated PRN sequence has a certain code phase, from 0 to 1022 chips. The incoming

signal is initially multiplied by the the locally generated PRN sequence, after this the signal

is multiplied by a locally generated carrier signal to generate the in-phase signal I, and multi-

plied by a 90o phase-shift version of locally generated carrier signal to generate the quadrature

signal Q.

The I and Q signals are integrated over 1ms, corresponding to the length of one C/A code,

and finally squared and added. Ideally, the signal power should be located in the I part of the

signal since the C/A code is only modulated on that but this does not always happen because

the phase of the received signal is unknown. If the output exceeds a predefined threshold, the

frequency and code phase parameters are correct and can be passed to tracking algorithms.

The serial search algorithm performs two different sweeps resulting in a very large number

Page 23: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.3. GPS RECEIVERS 9

Incoming

signal

Local

oscillator

I

Q

Σ

PRN code

generator

( )2

( )2

Output

90°

Figure 1.5: Block diagram of serial search algorithm.

of combinations. This is a very time consuming algorithm but with a very straightforward

implementation.

The second method of acquisition referred to as parallel frequency space search acquisition

parallelizes the search for the one parameter. The incoming signal is multiplied by a locally

generated PRN sequence, corresponding to a specific satellite and a code phase between 0 and

1022 chips. The resulting signal is transformed into a frequency domain by a Fourier transform

and the result is squared. The Fourier transform could be implemented as a discrete Fourier

transform (DFT) or as a fast Fourier transform (FFT)[11]. In this algorithm, with a perfectly

aligned PRN code, the output of the Fourier transform will show a distinct peak in magnitude.

This peak will be located at the frequency index corresponding to the frequency of the carrier

wave signal. The accuracy of the determined frequency depends on the length of the DFT.

While the parallel frequency search acquisition method only steps through the 1023 different

code phase, the serial search acquisition method steps through all the possible code phases

and carrier frequencies. Depending of the implementation of the frequency domain transform,

it should be possible to make a faster implementation of this method compared to the serial

search method.

Figure 1.6 shows a block diagram of the algorithm described.

The parallel frequency search method eliminates the search through the possible different

frequencies, the parallel code phase search method eliminates the search through all possible

code phases.

Page 24: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

10 CHAPTER 1. INTRODUCTION

Incoming

signalOutput

PRN code

generator

Fourier

transform | |2

Figure 1.6: Block diagram of the parallel frequency search algorithm.

The goal of acquisition is to perform a correlation with the incoming signal and a PRN

code. Instead of multiplying the input signal with 1023 code phases, it is more convenient to

make a circular cross correlation between the input and the PRN without shifted code phase.

Figure 1.7 is a block diagram of the parallel code phase search algorithm. The multiplication

of the incoming signal by a locally generated carrier signal generating the I signal and the

multiplication by a 90o phase-shifted version of the carrier signal generate the Q signal. The I

and Q signals are combined to form a complex input signal x(n) = I(n) + jQ(n) to the DFT

function. The generated PRN code is transformed into the frequency domain and the result

is complex conjugated.

The Fourier transform of the input is multiplied with the Fourier transform of the PRN code.

The result of the multiplication is transformed into the time domain by an inverse Fourier

transform. The absolute value of the output of the inverse Fourier transform represents the

correlation between the input and the PRN code. If a peak is present in the correlation, the

index of this peak marks the PRN code phase of the incoming signal.

Compared to the previous methods, the parallel code phase search acquisition method reduces

the search space to only the possible carrier frequencies. For each different satellite acquisition,

one Fourier transform of the generated PRN code must be done, and for the different carrier

frequencies one Fourier transform and one inverse Fourier transform must be performed. The

performance depends on implementation of these functions. The accuracy of the carrier

frequency is similar to the serial search method but the code phase is more accurate as it

gives a correlation value for each sampled code phase.

For the methods described, to guarantee optimal performance, it must be ensured that no

data transitions occur in the analyzed data sequence. To prevent a navigation bit transition to

occur on the data sequence, should be used two consecutive sequences with maximum size of

Page 25: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.3. GPS RECEIVERS 11

Incoming

signal

I

Q

PRN code

generator

Fourier

transform| |2

Fourier

transform

Inv Fourier

transform

Complex

conjugate

Output

Local

oscillator

90°

Figure 1.7: Block diagram of the parallel code phase search algorithm.

10ms so at least one of the sequences will not include a data transition. Some compromise has

to be made has the increasing in the data length increases the probability of detecting correct

parameters for a certain satellite but also makes the process more computational demanding.

The minimum size of data length is 1ms because this is the size of a complete C/A code.

To guarantee that no data transition occurs in the data sequence, the algorithm must be

performed again if the acquisition on the first data sequence is unsuccessful.

There are others algorithm special developed for the acquisition of weak signals [13].

1.3.3 Carrier Tracking

The main purpose of tracking is to refine the coarse values of code phase and carrier frequency

to keep track of these as the signal properties change over time. The accuracy of the final

value of the code phase is connected to the accuracy of the pseudorange computed later on.

The tracking contains two parts, code tracking and carrier frequency/phase tracking. The

tracking is running continuously to follow the changes in frequency as a function of time. If

the receiver loses track of a satellite, a new acquisition must be performed for that particular

satellite.

To demodulate the navigation data successfully, an exact carrier wave replica has to be gen-

erated. To track a carrier wave signal, phase lock loops (PLL) or frequency lock loop (FLL)

are often used. The problem with using an ordinary PLL is that it is sensitive to a 180ophase

shift of the input signal carrier wave. Due to navigation bit transitions, the PLL used in a

Page 26: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

12 CHAPTER 1. INTRODUCTION

Incoming

signalNCO carrier

generator

Carrier loop

filter

Carrier loop

discriminator

PRN code

90°

I

Q

Lowpass

filter

Lowpass

filter

Figure 1.8: Costas Loop used to track the carrier wave.

GPS receiver has to be insensitive to 180o phase shifts.

Figure 1.8 shows a Costas loop. GPS receivers use this loop because Costas loop is insensitive

to 180o phase shifts. The Costas loop utilizes two multiplications, one multiplying the input

signal and the local carrier wave and other multiplying the input signal by a 90o phase-shift

carrier wave. But first the PRN code is multiplied by the incoming signal to despread the

signal. The PRN code signal comes from the code tracking loop.

The goal of the Costas Loop is keep all energy in the I (in-phase) arm. To keep the energy in

the I arm, it is necessary to have feedback to the oscillator. The arctan discriminator is the

most precise of the Costas discriminator, but it is also the most time-consuming.

In figure 1.9 the responses for most common Costas loop discriminators are represented. In

this figure it can be seen that the discriminator output are zero when real phase error are 0

and +/- 180o. This is why Costas loop is insensitive to 180o phase shifts in case of a navigation

bit transition.

The output of the phase discriminator is filtered to predict and estimate any relative motion

of the satellite and the Doppler frequency.

1.3.4 Code Tracking

The first steps in Figure 1.10 is converting C/A code to baseband, by multiplying the incoming

signal with a perfectly aligned replica of the carrier wave. After that the signal is multiplied

by three replicas with a spacing of +/- half chip called early, prompt and late. After this

Page 27: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.3. GPS RECEIVERS 13

−150 −100 −50 0 50 100 150−100

−50

0

50

100

True phase error [°]

Dis

crim

inat

or

outp

ut

[°]

arctan(Q/I)

sign(I)*Q

I*Q

Figure 1.9: Comparison between Costas loop discriminator responses.

Incoming

signal

Local

oscillator

Integrate

& dump

PRN code

generator

Integrate

& dump

Integrate

& dump

E

P

L

I

IE

IP

IL

Figure 1.10: Basic code tracking loop.

Page 28: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

14 CHAPTER 1. INTRODUCTION

1

Generated signals

Incoming signal

−1 0

E

P

L

−1/2

Early

Prompt

Late

Chips

Correlation

1

1/2

01

Generated signals

Incoming signal

−1 0

E

P

L

−1/2

Early

Prompt

Late

Correlation

Chips

1

1/2

01/2

(a) (b)

Figure 1.11: Code tracking. (a) The late replica has the highest correlation. (b) The prompt

replica has the highest correlation.

second multiplication, the three outputs are integrated and dumped giving a numerical value

indicating how much the specific code replica correlates with the code of the incoming signal.

The highest peak should be the prompt replica.

The DLL with three correlators is optimal when the local carrier wave is locked in phase and

frequency. But when there is a phase error on the local carrier wave, the signal will be more

noisy, making it more difficult for the DLL to keep track on the code. So, instead, the DLL

in a GPS receiver is often designed with six correlators. This design has the advantage that

it is independent of the phase on the local carrier wave. If the local carrier wave is in phase

with the input signal, all the energy will be in the in-phase arm. But if the local carrier phase

drifts compared to the input signal the energy will switch between the two arms.

If the code tracking loop performance has to be independent of the performance of the phase

lock loop, the tracking loop has to use both the in-phase and quadrature arm to track the code.

The DLL needs a feedback to the PRN code generator if the code phase has to be adjusted.

There are different DLL discriminators used for feedback. The table 1.1 lists common DLL

discriminators used for feedback.

The requirements of a DLL discriminator are dependent on the type of application and the

noise of the signal. The space between the early, prompt, and late codes determines the noise

bandwidth in the DLL. If the discriminator spacing is larger than 1/2 chip, the DLL would

be able to handle wider dynamics and be more noise robust; on the other hand, a DLL with

Page 29: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.3. GPS RECEIVERS 15

Type Discriminator Characteristics

Coherent IE − IL Simplest of all discrimina-

tors. Does not require the

Q branch but requires a good

carrier tracking loop for opti-

mal functionality

Noncoherent (I2E +Q2E)− (I2L +Q2

L) Early minus late power.

The discriminator response

is nearly the same as the

coherent discriminator inside

+/-half chip.

Noncoherent(I2

E+Q2

E)−(I2

L+Q2

L)

(I2E+Q2

E)+(I2

L+Q2

L)

Normalized early minus late

power. The discriminator has

a great property when the

chip error is larger than a 1/2

chip; this will help the DLL to

keep track in noisy signals.

Noncoherent IP (IE − IL) +QP (QE −QL) Dot product. This is the only

DLL discriminator that uses

all six correlators outputs.

Table 1.1: Various types of delay lock loop discriminators.

Page 30: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

16 CHAPTER 1. INTRODUCTION

Transmitted

code

Received

code

0 1 70 71

Time [ms]

Frame 1 Frame 71 Frame 72

Figure 1.12: The delay between the time of transmission and the time of reception at the

receiver.

a smaller spacing would be more precise. In modern GPS receivers, the discriminator spacing

can be adjusted while the receiver is tracking the signal, this permits that a code lock is not

loss occurs when the signal-to-noise ratio suddenly decreases using a wider code spacing.

1.3.5 Pseudorange Computations

Precise estimation of the pseudorange from a satellite to the receiver is crucial for a modern

C/A code GPS receiver. A pseudorange measurement is computed as the travel time from

the satellite to the receiver multiplied by the speed of light in vacuum. The receiver has to

estimate exactly when the start of a frame arrives at the receiver. This is done by adding the

code phase to the time when the frame entered the receiver.

In Figure 1.12, the satellite transmits the start of the C/A code at t = 0ms. This signal

is received by the receiver approximately 70ms after it is transmitted by the satellite. To

calculate an accurate pseudorange and thereby an accurate position, the exact start of the

C/A code in frame 71 figure 1.12 has to be found. The receiver has a time tag for the start of

the frame. The problem is then to determine exactly where the start of the code is in frame

of data. The sampling frequency puts a limit in the resolution of the pseudorange calculated.

The minimum difference between two pseudoranges is dependent of the sampling frequency.

∆p =c

fS

Where c is the velocity of light in the vacuum and fS is the sampling frequency. Since the

prompt code is precisely aligned with the incoming signal to the nearest sample, the maximum

Page 31: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.4. DATA PROCESSING FOR POSITION 17

error as a result of the discrete samples will be half of ∆p.

1.4 Data processing for position

1.4.1 Navigation data recovery

The output from the tracking loop is the in-phase arm of the tracking block truncated to the

values 1 and -1. One navigation bits is 20ms (50 bps). The bit rate of the navigation data

is 50bps. The sample rate of the output from tracking block is 1000sps corresponding to a

value each ms and only one navigation data. To find the bit transition time a zero crossing is

located, all other bit transition are located 20ms apart from the first detected bit transition.

When navigation bits have been obtained, they must be decoded. First the beginning of a

subframe must be found. The beginning of a subframe is marked with a 8-bit-long preamble.

The authentication procedure checks if the same preamble is repeated every 6s corresponding

to the time between the transmissions of two consecutive subframes. Each subframe contains

300bits divided into 10 30-bits words. There are 6 parity bits in every word. If the parity

check is successful the received data was interpreted correctly.

To find the beginning of a subframe, the preamble is searched through a correlation. When

a preamble is found, the correlation function gives a maximum value or a minimum value

because the Costas loop used in the tracking loop can track a signal with phase +/-180o. The

method to determine which of the maximum or minimum values that really is a beginning

of a subframe includes the determination of the delay between two consecutive maximum

correlation values. Only if the delay is exactly 6s and the parity checks do not fail is the

beginning of a subframe indicated.

When the correct preambles are located, the data for each subframe can be extracted. If the

correlation shows that the preamble is inverted, the entire navigation data must be inverted.

The decoding is following the scheme from IS-GPS-200D. The first task is to determine the

time when the current subframe was transmitted from the GPS satellite.

The first word of a subframe is the telemetry word (TLM) that contains the preamble and

parity bits. The second word is the hand over word (HOW) that include a truncated version

of time of the week (TOW). This number is referred as Z-count. The Z-count is the number of

seconds passed since the last GPS week rollover in units of 1.5s. The rollover happens at the

midnight between Saturday and Sunday. The Z-count value in HOW is a truncated version

Page 32: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

18 CHAPTER 1. INTRODUCTION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 180

0 1 2 3 4 5 6 7 8 9 10 11 12

0 1 2 3

GPS time

Z-count

Truncated

Z-count

seconds

Figure 1.13: The relation between GPS time, Z-count, and the Z-count truncated Z-count in

the HOW of the navigation data.

containing only the 17 most significant bits (MSB) that increase in 6s steps corresponding to

the time between transition of two consecutive navigation subframes.

The truncated version of Z-count in the HOW corresponds to the time of transmission of

the next navigation data subframe. To get the time of the current subframe, the truncated

Z-count should be multiplied by 6 and 6s should be subtracted from the result.

The remaining parameters of the navigation data are also decoded according ICD-GPS-200.

To track a CDMA signal, three local copies of PRN code are generated half chips apart. These

codes are named early, prompt, and late. The codes are correlated with the incoming I and

Q data (after the carrier Doppler has been removed). The basic concept of signal tracking is

keep the power in the early and late correlators balanced ensuring that the local prompt and

incoming codes are aligned. The code tracking discriminator normally has some type of Early

minus Late discriminator and a tracking loop that tries to keep that number constant.

The GPS carrier is tracked by the result 1ms correlation I and Q values to detect carrier phase.

By using frequency lock loop (FLL) or phase lock loop (PLL) as a discriminator, delta-phase

or delta-frequency can be detected and corrected. Any shift in I or Q will be detected as a

frequency/phase error and the frequency will be adjusted to compensate.

When the signals are properly tracked, the C/A code and the carrier wave can be removed

from the signal, leaving only the navigation data bits. The value of a data bit is found by

integrating over a navigation period of 20 ms. After reading about 30s of data, the beginning

of a subframe must be found in order to find the time when the data was transmitted from

the satellite. When the time of transmission is found, the ephemeris data for the satellite

must be decoded. This is used later to compute the position of the satellite at the time of

transmission. Before making position computations it is necessary to compute pseudoranges.

Page 33: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.5. GALILEO 19

Figure 1.14: Galileo Frequency Plan.

The pseudoranges are computed based on the time of transmission from the satellite and the

time of arrival at the receiver that are based on the beginning of the subframe. The final

task of the receiver is to compute a user position based on the pseudoranges and the satellite

positions.

1.5 Galileo

Galileo is the European global navigation satellite system providing a highly accurate, guar-

anteed and global position service under civil control. It is inter-operable with GPS and

GLONASS, the two other current GNSS.

The fully deployment Galileo system consists of 30 satellites (27 operational and 3 spares),positioned

in three circular Medium Earth Orbit planes at a nominal average orbit semi major axis of

29601.297 Km, and at an inclination of the orbital planes of 56 degrees with reference to the

equatorial plane[14].

This European GNSS is different of the GPS because it is a service under civil control and

the GPS is under USA military control. When designing the Galileo signals the situation

was very different from the days when the GPS signals were designed. Nowadays applications

with difficult signal reception set the specifications for GNSS. Now the receivers may be used

in the woods or indoors. This puts most demanding efforts in signal design.

The frequency plan of the Galileo GNSS and others signals is represented in Figure 1.14 .

The Galileo frequency band have been selected in the allocated spectrum for Radio Navigation

Page 34: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

20 CHAPTER 1. INTRODUCTION

Satellite System (RNSS) and in addition to that, E5a, E5b and E1 bands are included in the

allocated spectrum for Aeronautical Radio Navigation Services (ARNS), employed by Civil-

Aviation users, and allowing dedicated safety-critical applications.

The L1 open service (OS) signal is transmitted in the frequency f1 = 1575.42 MHz. The signal

is composed of three channels, called A, B and C. L1-A is identical to L1 public regulated

service (PRS), which is a restricted access signal. Its ranging codes and navigation data are

encrypted. The data signal is the L1-B (B channel of L1) and the data-free signal is L1C (C

channel of L1). A data-free signal can be also called a pilot signal. The L1C signal is used

only for ranging measurements and is not modulated by navigation data.

The L1 OS signal has a code of 4092 code length with a 1.023 MHz chip rate giving a

repetition of 4ms. On the pilot channel a secondary code with length of 25 chips extends the

repetition interval to 100ms because each primary code period is modulated with one chip of

the secondary code.

The signal transmitted by the Galileo system uses the Right-Hand Circular Polarization

(RHCP). This is the same type of polarization of the GPS.

The Galileo utilizes a different type of codes to solve the cross-correlation. The solution

utilized to solve the difficulty to separate the wanted signal form the unwanted signals is use

very long codes. This solution has a potential undesired effect in the acquisition phase of the

receivers, so the codes have been designed with escape routines called tiered code. In this

type of codes, the codes are build in layers, so in strong signal the acquisition can utilize only

one phase. In more difficult condition, the process can utilize the full-length code.

Figure 1.15 shows the modulation of the E1 Galileo Signal.

The E1 signal is modulated using complex binary offset carrier (CBOC) modulation.

In Figure 1.15, the signal components are generated as follows:

• eE1−B form the navigation data stream DE1−B and the ranging code CE1−B, then

modulated with the sub-carriers scE1−B,a and scE1−B,b.

• eE1−C (pilot component) form the ranging code including its secondary code, then

modulated with the sub-carriers scE1−C,a and scE1−C,b.

The symbol rate for the channel B of the E1 signal is 250 symbols/s. The channel C of the

signal do not contain any data, it is the pilot channel.

The primary spreading codes can be either linear feedback shift register-based pseudo-noise

sequences or optimized pseudo-noise sequences. The optimized codes need to be stored in

Page 35: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.5. GALILEO 21

Figure 1.15: Modulation scheme for E1 signal.

the memory and are normally called memory codes. The E1-B and E1-C primary codes are

pseudo-random memory code sequences. The secondary codes are fixed sequences memory

codes.

The complete navigation data are transmitted on each data component as a sequence of

frames. A frame is composed of several sub-frames, and a sub-frame is composed of several

pages.

In the Galileo system there are some techniques to correct the transmission errors using

Forward Error Correction and Interleaving to minimize burst errors.

The navigation data contain all the parameters that enable the user to perform position

service.

• Ephemeris which is needed to indicate the position of the satellite to the user receiver;

• Time and clock correction parameters which are needed to compute pseudo-ranges;

• Services parameters which are needed to identify the set of navigation data, satellites,

and indicators of signal health;

• Almanac, that contains the information about the position of all satellites with a reduced

accuracy.

In Figure 1.16, the red line shows the Galileo L1 signal spectrum and the blue line the GPS

L1 signal spectrum. In this figure, it’s possible to see that the effect of the BOC modulation

Page 36: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

22 CHAPTER 1. INTRODUCTION

-5 -4 -3 -2 -1 0 1 2 3 4 5

-95

-90

-85

-80

-75

-70

-65

-60

-55

-50

Frequency (MHz)

Pow

er/

frequency (

dB

/Hz)

Power Spectral Density Estimate via Welch

GPS

Galileo

Figure 1.16: Galileo and GPS signal Spectrum

in the signal spectrum. It’s clear that the BOC permits less interference between the two

signals.

1.5.1 GIOVE

The Galileo system is currently in a development phase and the GIOVE (Galileo In Orbit

Validation Element) is the name of each satellite given by the European Space Agency (ESA)

to this validation satellites. In the moment there are two satellites in the space with the names

GIOVE-A and GIOVE-B .

These GIOVE-A and GIOVE-B signals are representative for the future Galileo navigation

signals in terms of spreading code chip rates, spreading symbols, spectrum shape, and data

rates, with exception of the E1-A signal type of GIOVE-B, and the data rates signals E1-A

and E6-A of both GIOVE satellites. Future Galileo signals can be different especially the

spreading codes, navigation message format and detailed navigation message content. [1]

The GIOVE satellites can transmit signal in the E1 and E5 or in the E1 and E6 frequency

band at same time. Figure 1.17 shows the type of signal transmitted and its modulation for

the two satellites.

The signal in the E1 band is not the same for the two satellites. The GIOVE-A satellite, in

the channel B and C, utilizes a BOC(1,1) modulation. The GIOVE-B utilizes another type

Page 37: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.5. GALILEO 23

SignalComponent

X-YModulation Type

Chip Rate

RC,X-Y [Mcps]

Sub Carr.

RS,X-Y,a

[MHz]

RS,X-Y,b

Symb. Rate

RD,X-Y [sps]

E5

Mode 1: E5a-I 50

E5a-Q n/a

E5b-I 250

E5b-Q

AltBOC(15,10) 10.23 15.345 n/a

n/a

Mode 2a: E5a-I 50

E5a-QQPSK(10) 10.23 -15.345 n/a

n/a

Mode 2b: E5b-I 250

E5b-QQPSK(10) 10.23 +15.345 n/a

n/a

E6

E6-A BOCcos(10,5) 5.115 10.230 n/a 100

E6-B 1000

E6-CBPSK(5) 5.115 n/a n/a

n/a

E1

GIOVE-A: E1-A BOCcos(15,2.5) 2.5575 15.345 n/a 100

E1-B 250

E1-CBOC(1,1) 1.023 1.023 n/a

n/a

GIOVE-B: E1-A BOCcos(15,2.5) 2.5575 15.345 n/a 100

E1-B 250

E1-CCBOC(1,6,1,10/1) 1.023 1.023 6.138

n/a

Figure 1.17: Primary GIOVE navigation signal parameters.

E1-A

GIOVE-A: BR 1 204000051o [3,5,20,25] 25 All cells logical 1

BR 2 204204057o [1,2,3,5,11,16,20,25] 25 GIOVE-A: 100000000o -

GIOVE-B: Memory code: Primary code P1-1 CS5a

E1-B

BR 1 23261o [4,5,7,9,10,13] 13 All cells logical 1

BR 2 30741o [5,6,7,8,12,13] 13 GIOVE-A: 15603o -

GIOVE-B: 11774o -

E1-C

BR 1 20033o [1,3,4,13] 13 All cells logical 1

BR 2 23261o [4,5,7,9,10,13] 13 GIOVE-A: 14603o CS25a

GIOVE-B: 04277o CS25a

Figure 1.18: Parameters to GIOVE E1-B and E1-C code generation.

of modulation called Complex Binary Offset Carrier (CBOC).

The satellites utilizes a spreading code different from the ones present in the Galileo Interface

Control Document [14]. GIOVE spreading codes consist of a primary sequence (primary code)

and a secondary code used for pilot channel and for signal with low data rate.

The code in the GIOVE-B for the E1-A and E6-A are memory codes. All the others primary

spreading codes are generated as truncated M-sequences that can be implemented using linear

feedback shift-registers (LFSR). Secondary codes are store in the memory and are very short.

The parameter utilized to generate the codes for the GIOVE-A and GIOVE-B signals are

described in the figure 1.18.

The GIOVE-A and GIOVE-B satellites are the only satellites at the moment that permit

receive Galileo signals. The signal is not exactly the same, but has the same properties as

Page 38: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

24 CHAPTER 1. INTRODUCTION

All GPS satellites use

an L1 frequency

centered at

1575.42 Mhz

GLONASS satellites each have a unique or an antipodal frequency

For GLONASS L1: L1 = 1602 MHZ + (n x 0.5625) MHz

n = 1

L1 = 1602.5625

n = 5

L1 = 1604.8125n = 10

L1 = 1607.625

MHz

Figure 1.19: GPS and GLONASS L1 frequencies.

the future Galileo satellites. So these satellites can be utilized to test the performance of a

receiver and algorithms for the Galileo System.

1.6 GLONASS

The GLONASS is a GNSS operated for the Russian Government by the Russian Space Forces.

It is designed to provide a service to determine the position in three dimensions as well

synchronized system time. The system is composed by 24 satellites to be fully operation and

provide continuous global coverage. The document that describes the system and signal of

the GLONASS System is “GLONASS: Interface Control Document” [10]

To calculate a position, the receiver needs a minimum of 4 satellites in view to solve the three

position unknowns and time unknown.

The GLONASS satellites utilize the same pseudo-range code for all the satellites. The

GLONASS satellites transmit at slightly different frequencies. Each satellite is indentified

by the frequency of the transmission. There are several channel for the GLONASS satellites.

Two satellites utilize the same frequency in the transmission. These satellites are in oppo-

site sides of the earth. The GLONASS system utilizes Frequency Division Multiple Access

(FDMA).

Figure 1.19 shows the relation in the frequency between the GPS and GLONASS signals.

The L1 frequency channels are calculated as:

L1 = 1602MHz +(nx0.5625)MHz

where

n = frequency channel number.

Page 39: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1.6. GLONASS 25

Parameter Detail GLONASS GPS

Satellites Number of satellites 21 + 3 sparesa

21 + 3 sparesa

Number of orbital planes 3 6

Orbital plane inclination (degrees) 64.8 55

Orbital radius (kilometers) 25 510 26 560

Signals Fundamental clock frequency (MHz) 5.0 10.23

Signal separation techniqueb

FDMA CDMA

Carrier frequencies (MHz) L1 1598.0625 - 1609.3125c

1575.42

L2 1242.9375 - 1251.6875 1227.6

Code clock rate (MHz) C/A 0.511 1.023

P 5.11 10.23

Code length (chips) C/A 511 1 023

P 5.11 x 106

6.187104 x 1012

C/A-code Navigation Superframe duration (minutes) 2.5 12.5

Message Superframe capacity (bits) 7 500 37 500

Superframe reserve capacity (bits) ~620 ~2 750

Word duration (seconds) 2.0 0.6

Word capacity (bits) 100 30

Number of words within a frame 15 50

Technique for specifying satellite

ephemeris

Geocentric Cartesian

coordinates and their

derivatives

Keplarian orbital

elements and

perturbation factors

Time referenced

UTC (SU) UTC (USNO)

Position reference (geodetic datum)e

PZ-90 WGS84

Figure 1.20: GLONASS and GPS specifications comparison

The GLONASS satellite signal indentifies the satellite and provides:

• position, velocity and acceleration vector at a reference epoch to compute satellites

position.

• synchronization bits, data age and satellite health.

• offset of GLONASS time from UTC.

• almanac of all others GLONASS satellites.

Figure 1.20 the specification of the GPS and GLONASS are compared. The figure shows the

difference in the modulation utilized and the difference in the structure of the navigation data

transmitted.

The GLONASS is being restored by the Russian Government. The utilization of both GPS

and GLONASS can bring some advantages for the user receiver.

Page 40: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

26 CHAPTER 1. INTRODUCTION

One is that with more satellites in the sky its more probable that the minimum number

of satellites for finding a position is tracked. This is special importance in difficult signal

reception conditions as in cities with tall building and dense woods. For a GPS only or

GLONASS only receiver, the minimum number of satellites is four. For a GPS/GLONASS

receiver, the minimum number of satellites is five. The additional satellite is needed in order

to solve the unknown time different between the GPS system and GLONASS system.

More satellites also reduce the horizontal and vertical dilution of precision factor. This in-

creases the precision of the position calculation.

Page 41: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 2

Developed work

During the development of this work, several prototype boards are developed. First a proto-

type board has developed using a Evaluation kit of the IC MAX2769[8] and all the interface

logic to the PC. This prototype board is called Board 1.

After the Board 1 is developed, another board was developed. This board is called Board 2

and it is based in the Board 1 but developed using a custom PCB for the MAX2769 and not

an Evaluation Kit.

The next boards developed were the Board 3 and Board 4. This board is based in a design

from a open hardware project.

The next section describes the hardware utilized, principally the IC MAX2769 and the EV

kit for this IC.

The other sections in this chapter describe the development of the prototype boards.

2.1 Hardware

The analog front end used was the MAX2769. Figure 2.1 shows a block diagram of the front

end. The analog front end performs a single-conversion of the GPS signal at 1575.42MHz to

a programmable IF frequency. This chip incorporates a dual Low Noise Amplifier (LNA) and

mixer, followed by the image-rejection filter, Programmable Gain Amplifier (PGA), Voltage-

controlled oscillator (VCO), crystal oscillator, and a ADC.

This front end eliminates the need for external IF filter by implementing on-chip monolithic

filters and only needs a few external components to form a complete low-cost GPS receiver

solution. The integrated delta-sigma fractional-N frequency synthesizer allows programming

27

Page 42: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

28 CHAPTER 2. DEVELOPED WORK

LNAOUT

VCCRF

MIXIN LD

SHDN

ANTFLAG

I0 Q0

Q1

I1 CLKOUT

XTAL

LNA2

PGM

LNA1

+

CPOUT

VCCVCO

CS

SCLK

MAX2769

ANTBIAS

VCCADC

12

10

9

24

26

1125

27

TSENSSDATA828

IDLE

VCCCP1323VCCIF

14 VCCD22

19 17 16

3 5

18

4 6

15

7

20

2

21

1

N.C.

ADC

ADC

FILTER

PLL

LNA2

LNA1

VCO

90

0

3-WIRE

INTERFACE

Figure 2.1: Block diagram of MAX2769.

of the IF frequency within a +-40Hz accuracy with any reference. The integrated ADC

outputs 1 or 2 quantized bits for both I and Q channels, or up to 3 bits in the I channel.

Output format is either at the CMOS logic or at limited differential logic levels.

The front end incorporates two LNA and two inputs for passive and active antennas. The

LNA1 is typically used with a passive antenna because it has a higher gain that LNA2. The

LNA2 is internally matched to 50 ohms. The chip includes a low-dropout switch to bias an

external active antenna. An active antenna flag logic output is provided to know when an

active antenna is connect to the bias circuit. This chip can commute between LNA1 and LNA2

using the integrated active antenna sensor. The quadrature mixer is internally matched to 50

ohm and requires a low-side LO injection. The output of LNA and the input of the mixer are

brought off-chip to use a SAW filter.

The front end integrates a PGA and a AGC. The AGC is used to automatically program the

PGA gain to provide the ADC with an input that optimally fills the converters and establishes

a desired magnitude bit density at its outputs.

The baseband or IF filter can be programmed to be a lowpass filter or a complex bandpass

filter. The bandwidth of the filter can be selected to be 2.5MHz, 4.2MHz, 8MHz, or 18MHz.

In the case of the complex band pass filter, the central frequency can be programmed. The

Page 43: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.1. HARDWARE 29

Figure 2.2: Evaluation Kit of MAX2769.

frequency synthesizer can be adjusted to tune to a required VCO frequency.

A serial interface is used to program the MAX2769 for configuring the different operation

modes. The interface utilized is the SPI protocol controlled by three signal: SCLK (serial

clock), CS (chip select), and SDATA (serial data). There are no data send by the chip to this

interface.

This front end is very flexible. This permits that GPS, Galileo, and GLONASS signals to be

received.

2.1.1 Evaluation Kit

In a first phase, an Evaluation Kit (EV kit) for the MAX2769 from Maxim IC. This kit

simplifies evaluation of the MAX2769 chip. This kit contains standard 50 Ω SMA ports for

access input and output to test and evaluate the module.

The kit includes a parallel port for programming the chip using the 3-wire interface.

The schematic of the EV kit for MAX2769 can be seen in the Figure 2.2. This EV kit has

SMA connections for the two LNAs. One to be utilized with passive antennas and the other

one to be utilized with active antenna.

Page 44: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

30 CHAPTER 2. DEVELOPED WORK

The active antenna needs a power source. The power to the LNA goes in the same cable of

the RF signal. The DC bias current is input in the cable utilizing a bias inductor. The DC

component of the signal is blocked from the entry of the LNA of the MAX2769. This power

can be supplied by the dedicated pin in the MAX2769. If this pin is utilized, the LNA can be

selected by an internal switch automatically by a current sensor in the Bias pin.

In the EV board there is a connection for the LNA output. The correct LNA input can

be selected by the integrated current sensor. The EV kit comes with the place for the bias

inductor, but it is not installed. So in order to utilize the MAX2769 chip to bias the active

antenna, a bias inductor as been installed.

The LNA output connection can be utilized to measure the gain of the two LNA. It can be

also be utilized in conjunction with SMA the connection of the mixer in. In the middle of the

two and in order to filter unwanted signals from the mixing stage, a SAW filter can be placed.

The EV kit also contains a connection for the clock sections of the chip. One SMA connection

is for the REF signal/xtal pin. The MAX2769 chip can utilize a crystal to produce the clock

with the internal oscillator. Also a clock reference signal can be utilized for producing the

clock. In the EV kit there are three different options for the clock generation. In one case, a

crystal can be used, in the other a Temperature-compensated crystal oscillator (TCXO), and

finally there is a SMA connector to input a reference signal.

In the EV kit received, a TCXO is installed. This TCXO has a frequency stability of +/-

0.5ppm. To utilize the clock reference connector as a clock reference source, the TCXO has

to be removed.

A clock out SMA connection is provided. This is a important connection to observe the clock

signal and analyze the quality of the signal.

The output signals of the I and Q channels of the MAX2769 can be analog. In this configu-

ration, the ADC is not utilized.

A large number of test points and jumper exists in the EV kit. This allows easy access to

several signals.

This module can be configured utilizing the parallel interface in the board. A program for

the EV kit is provided by MAXIM.

This program has two main interfaces. In the “entry” interface, several parameters can be

chosen such as the number of ADC bits and the parameters of the filters.

The second is the “Registers” interface which is a direct interface to access the MAX2769

Page 45: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.1. HARDWARE 31

registers. In this interface, the bits can be chosen one by one.

2.1.2 Board number 1

The EV kit for the MAX2769 is a good starting point to build a software defined GPS receiver.

The board is already tested and the RF design of the board is validated by MAXIM. But

the EV kit alone does not do anything. The digital output signals of the board have to be

acquired and transferred to the PC to do the required signal processing.

Therefore, an interface between the module and the PC is needed. Various interfaces can be

utilized. The required characteristic for this interface are:

• throughput

• availability

• reliability

• cost

The throughput necessary for this application depends on the frequency clock utilized. In

the EV kit, the frequency clock is 16.368 MHz. The MAX2769 ADC can output a maximum

of 4 bits, 2 for the I channel and other 2 bits for the Q channel. So the throughput of the

interfaces has to be at least 8 MB/s.

The interface chosen was the Universal Serial Bus (USB). This is a popular interface, used in

almost all PCs[2]. The interface in this version is the 2.0 High-speed mode which has sufficient

throughput for this application.

After the interface for the board has been chosen, the interface need to be implemented.

To perform the interface between the ADC data bits and the USB bus, the FT2232H[5] chip

from FTDI is used. This chip is a dual high-speed USB to multipurpose UART/FIFO con-

verter. It is capable of handling the entire protocol on the chip, so no firmware programming

is necessary. There are available USB drivers so it is not necessary to develop drivers to this

chip.

To facilitate the design of the interface, a module from the FTDI utilizing the chip FT2232H

was used to perform the interface.

This module contains a FT2232H chip, a mini-USB connector and Low-Dropout Regulator

(LDO). The regulator takes the 5V and output a voltage of 3.3V. This voltage is used to

power the module.

Page 46: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

32 CHAPTER 2. DEVELOPED WORK

Figure 2.3: FT2232H module

The EV kit requires 3 different power supplies voltages, 3.3V, 5V and -5V. The 3.3V can be

connected to the LDO output in the USB module. The 5V can be connected to the 5V for

the USB power pin. The -5V supply voltage has to be generated using a DC/DC inverter.

The chip utilized is MAX764 form MAXIM IC.

The interface used for programming the EV Kit was the SPI interface in the channel A

of the chip. The interface for transferring the data to the PC is asynchronous FIFO. The

synchronous FIFO could not be used with the USB chip but only work in master mode and

could not receive a clock from the outside. The solution is to utilize the asynchronous FIFO

and the clock from the EV kit is the write signal for the interface.

The FIFO data has 8 parallel lines and the ADC only provide 4 bit per sample. So the data

rate from the board to the PC is 16MB/s.

The registers of the MAX2769 needed to be configured. The EV kit comes with a parallel

port and software to configure the MAX2769 using a SPI bus. Most modern PCs don’t have

this port and almost all laptops also don’t have it. This parallel port also activates the pins

that control the shutdown and idle mode of the chip.

To suppress these limitations, a connection between the parallel port and the FT2232H mod-

ules was made. The FTDI chip implements the USB to SPI conversion. The channel A of

the chip is utilized to perform the configuration of the MAX2769. The hardware control pins

of the chips are controlled by the GPIOS that are available in this configuration of the FTDI

chip.

Page 47: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.2. DATA PACKER 33

Using this connection, the parallel port is not a requirement for the receiver to work.

2.2 Data Packer

In the first prototype board, the interface USB utilizes a chip from the manufacturer FTDI.

The chip reference number is FT2232H. This chip performs a conversion between a USB

2.0 interface to multiple standard interfaces and has two independent channel. In this case,

the chosen conversion was USB2.0 to SPI in channel A and USB2.0 to asynchronous FIFO

interface for channel B.

This mode configures the FT2232H channel B to make a FIFO interface with 8 bits wide.

Since the packet size is 8 bits and the GPS front end provides a maximum of 4 bits, if directly

connected, only 4 of 8 bits will contains data. To overcome this problem, a data packer was

developed.

The idea of the data packer is to utilize all the 8 bits of the packet and send data to the PC

at half the data rate. To do that a logic circuit was designed. This circuit places in a group of

flip-flop one group of 4 bits and in other group of flip-flop the other group of 4 bits. The FIFO

interface is connected to the outputs of these flip-flop. When the Clock signal goes to the

FIFO interface, all the 8 bits of the packet contains data. The clock signal is only activates

when new samples are in the flip-flops. This clock signal is half the clock of the MAX2769.

2.2.1 Board number 2

After proving the concept with the Board 1, a second board was planned. The first board

proves that is possible to make a software defined GPS receiver with the chip MAX2769 and

a USB 2.0 High speed Interface.

In the first prototype, the EV kit for the MAX2769 was utilized. In this second prototype,

the EV kit is not utilized and the MAX2769 is directly utilized in the circuit. This solution

has several advantages over the first prototype:

• much lower cost;

• less power hungry;

• smaller size;

The module for the FTDI FT2232H chip is also utilized in this prototype. This module is

compact and is relatively cheap when compared to the EV kit for MAX2769 so it is utilized

Page 48: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

34 CHAPTER 2. DEVELOPED WORK

CLK

Q1

Q0

I1

I0

MAX2769

Counter

QA

QB

QC

QD

Flip-flop

Q1

Q2

Q3

Q4

D1

D2

D3

D4

Flip-flop

Q1

Q2

Q3

Q4

D1

D2

D3

D4

USB interface

D1

D2

D3

D4

D5

D6

D7

D8

CLK

CLK/2

CLK/2

CLK/2

CLK/2

Figure 2.4: Circuit logic of data packer. Prototype board 1 and 2

in this second prototype. The idea was not to change the interface part of the prototype, so

this part is almost the same as the the first prototype. The major changes was in the RF part

of the board.

The EV kit for MAX2769 is a good starting port to build this section of the board. But the

EV kit has many features which are not needed.

The EV kit was designed to make the evaluation of the MAX2769 easier. With that purpose

in mind, several connections are brought out of the PCB utilizing special transceivers and

SMA connections in order to test special parameters of the board. Also several connections

to the power supplies are connected using jumpers providing a easy method to measure the

power consumption. A driver also exists to the parallel port. These are features are not

necessary for the application.

Only the essential components are utilized to make the second prototype. The datasheet for

the MAX2769 has a typical application circuit that also helped to develop the circuit for the

second prototype.

The power for the second prototype comes for the bus. The USB can supply 500mA at 5V to

the more power hungry devices and 100mA to normal Devices. When devices are connected

to the bus, a negotiation occurs and the more power hungry devices can get permission to

Page 49: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.2. DATA PACKER 35

VBUS

GND

0.01uF

C4

2.2uF

C6

1uF

C7

VCC_A

4K7

R4

100K

R5

Q1

PMOS-2

VCC

PWREN

C43

IN1

OUT5

2

CBYP4

ON/OFF3

GND

U2

LP2985AIM5-3.3

IN1

OUT5

2

CBYP4

ON/OFF3

GND

U3

LP2985AIM5-3.3

GND

GNDGNDVBUS

1uF

C1

GND

0.01uF

C3

2.2uF

C5

VCC_D_IN

GND

VCC_S

Figure 2.5: Power supply for Board 2.

consume more power. So the bus has sufficient power for the prototype to operate.

To convert the voltage to the required values, low dropout regulators are utilized. The USB

module contains a LDO that convert the 5V received form the USB power line to 3.3V.

Figure 2.5 shows the power supply for Prototype board 2 is showed.

In order to minimize the noise in the supply voltage, two LDOs are used for the MAX2769.

One supplies the voltage to the digital part of the chip and the other supplies the voltage for

the analog part of the chip. These LDOs are directly powered by the voltage from the bus.

Figure 2.5 shows how the voltage provided to the data packer part of the chip is controlled.

The pin PWREN is an active low power enable output. This pin is used to power down

when the device is in USB suspend or has not been configured. This pin output 0 in normal

operation and 1 when USB suspend or the device is not configured. The power to the glue

logic of the data packer is power by the LDO in the USB module and controlled by the

PWREN pin.

Figure 2.6 shows the schematic for the data packer described in an early section of this chapter.

The idea of the data packer is to put together two samples in order to lower the data rate in

the USB line.

First the signals that comes form the MAX2769 are buffered using the IC 74HC541. After

this the clock signal is inverted using the IC 74HC04. This output enters in the counter with

part number 74HC 393 and is divided by two. This signal is also inverted.

After being buffered, the signals enter in two flip-flops 74HC374. The clock for these flip-flops

comes from the counter and it negated output. So one flip-flop saves the even samples and

the other saves the odd samples.

In the board there is a circuit supervisor that provides a correct reset condition on the power

Page 50: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

36 CHAPTER 2. DEVELOPED WORK

OE1

CLK11

D13

Q12

D24

Q25

D37

Q36

D48

Q49

D513

Q512

D614

Q615

D717

Q716

D818

Q819

VCC20

GND10

U6

SN74HC374

OE1

CLK11

D13

Q12

D24

Q25

D37

Q36

D48

Q49

D513

Q512

D614

Q615

D717

Q716

D818

Q819

VCC20

GND10

U5

SN74SN374

GND

GND

GND

VCC_S

GND

OE11

A12

A23

A34

A45

A56

A67

A78

A89

GND10

Y811

Y712

Y613

Y514

Y415

Y316

Y217

Y118

OE219

VDD20

U7

SN74HC541

GND

GND

CLKOUT

Q1

Q0

I1

I0

100pFC34

0.1uF

C35

GND

CLKOUT_B

RESET2

CLK1

QA3

QB4

QC5

QD6

GND7

VDD14

U9A SN74HC393

GND7

VCC14

A1

Y2

U8ASN74HC04

GND

GND7

VCC14

A3

Y4

U8BSN74HC04

CLKOUT/2

CLKOUT/2

CLKOUT/2

CLKOUT/2

D0

D1

D2

D3

D4

D5

D6

D7

VCC_S

100pFC36

0.1uF

C37

GND

CLKOUT_B

Q1_B

Q0_B

I1_B

I0_B

Q1_B

Q0_B

I1_B

I0_B

Q1_B

Q0_B

I1_B

I0_B

VCC_S

100pFC32

0.1uF

C33GND

100pF

C39

0.1uF

C38VCC_S

GND

GND

GNDGNDVCC_SVCC_S

100pF

C41

0.1uF

C40

GND

VCC_S

Figure 2.6: Prototype board 2 data packer

Page 51: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.2. DATA PACKER 37

100pFC19

0.1uFC18

GND

VCC_D_IN

100pFC10

0.1uFC11

GND

VCC_A

10

0p

F

C13

0.1

uF

C12

GND

VCC_A

10

0p

FC15

0.1

uF

C14

GND

VCC_A

10

0p

F

C17

0.1

uF

C16

GND

VCC_D_IN

100pFC21

0.1uFC20

GND

VCC_A

ANTFLAG

SHDN

GND

VCC_D_IN

10

0p

FC

23

0.1

uF

C2

2GND

15pFC24ID

LE

LD

SD

AT

A

SC

LK

CS

10

0p

F

C26

0.1

uF

C25

GND

33nH

L1

10

0p

F

C27

LNAOUT

MIXIN

20

K

R2

0.4

7n

F

C28

27

pF

C29

GND

LNAOUT MIXIN

0.47nFC30

GND GND

TS

EN

S

LNA1

LN

A2

0.4

7n

FC

31

I1

I0

Q0

CLKOUT

Q1

ANTFLAG1

LNAOUT2

ANTBIAS3

VCCRF4

MIXIN5

LD6

SHDN7

SD

AT

A8

SC

LK

9

CS

10

VC

CV

CO

11

CP

OU

T1

2

VC

CC

P1

3

VC

CD

14

XTAL15

CLKOUT16

Q117

Q018

VCCADC19

I020

I121

N.C

.2

2V

CC

IF2

3ID

LE

24

LN

A2

25

PG

M2

6L

NA

12

7T

SE

NS

28

E.P

AD

.2

9

U1

MAX2769

GND

ONLY INSTALL CAP OR SAW

X1

Y2

P1

SMA

GND

P2

SMA

GND

GND

GND1

IN2

GND3

GND4

OUT5

GND6

F1

SAW EPCOS

1

2

3

P3

Header 3

ANTBIAS

VBUS

ANTBIAS

GN

D2

OU

T3

VC

C4

E/D

1

U4

TCXO

Figure 2.7: Schematic for the MAX2769

up. This IC has the part number TPS3836. The IC also has an input for generating a reset

using a external signal. This pin is utilized to implement a button for reset.

Figure 2.7 shows the circuit for the MAX2769.

In the PCB there are SMA connectors for the active antenna LNA2 and for the passive

antenna LNA1. To bias the active antenna there are two options, which are chosen using a 3

pins headers. The bias inductor can be connected the antenna bias pin of the MAX2769 or

the voltage from the USB.

In the board there is an option for placing a SAW filter between the LNA output and the

mixer input. If the SAW filter is not placed, a DC-blocking capacitor can be placed instead.

The reference clock signal in this case is provided by a TXCO to provide a stable reference to

Page 52: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

38 CHAPTER 2. DEVELOPED WORK

MAX2769.

To minimize the power supply noise, several decoupling capacitor are placed in all power

supply pins of the IC. Every power pin has two decoupling capacitor, one with a large value

and other with several order of magnitude smaller.

After was schematic is ready, the PCB layout was made.

The first decision was to put the USB module in a header and not directly in the board.

This solution allows the module to be easily removed and placed in the board. This solution

also allows that some components to be placed below the USB module saving PCB space.

The PCB can be seen as having two parts. In one part the components that make the glue

logic for the USB interface and the USB module is place together. In the other part, all the

components that make the MAX2769 work are placed together.

The data packer glue logic are placed below the USB module and in the bottom layer. This

saves space in the board. The width of the board is defined by the width of the USB module.

The decoupling capacitors are place near the Power supply pins for better isolation of power

supply noise.

The layout of the MAX2769 part of the board is more complicated. This part is more sensitive

to noise and other problems that affect the GPS signal.

The LNA input of the chip are internally matched to 50Ω. Also the LNA output and the

mixer input pin are matched to 50 Ω. So the connection between these pins must have a

characteristic impedance of 50 Ω.

The microstrip is the only option for the transmission line in a dual layer PCB. The required

trace width of the tracks was calculated with the help of the built-in impedance calculator

of the Altium designer. The calculated width to achieve the 50Ω characteristic impedance

is 3mm. This is a very large value for this relatively small PCB. To minimize the difference

between the impedance, the lines that should have 50 Ω were made as large as possible.

The length of the transmission lines is also very important for performance. The track has

been designed with the minimum length and with the minimum discontinuities in the opposite

side of the board in order to provide a better approximation of a ground plane bellow the

transmission lines.

The decoupling capacitors are placed in the closest position of the power supply pin that they

are connected.

Figure 2.8 shows the layout of the Front Layer of the second prototype Board.

Page 53: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.3. GNSS BOARD 1 39

Figure 2.8: Layout of the front layer of the second prototype board.

Figure 2.9 shows the layout of the Back Layer of the second prototype Board.

2.3 GNSS board 1

The Board number 3 is based on a project “GNSS SDR” from the site http://gnss-sdr.ru.

This site also has a English version in http://gnss-sdr.ru/index.php?blogid=2.

This is an interesting project for this application because there are some similarities between

my project and the GNSS SDR project.

The owner of the GNSS SDR project makes a description of its project. The motivation for

this project was the advantages of the Software Defined Receivers. The main advantages of

this technology:

• simplification of implementation;

• increasing in flexibility in parameters of device as IF, sampling frequency;

• new opportunities for signal processing.

In the description of the project, the following tasks of the front-end are referred:

• receives signals for GNSS and GPS signal in L1 Band, amplifies them, filters, digitalizes,

and transmits to a PC via a USB 2.0 interface

• can generate a reference to the user

Page 54: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

40 CHAPTER 2. DEVELOPED WORK

Figure 2.9: Layout of the back layer of the second prototype board.

Figure 2.10: Board number 2 front side

.

Page 55: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.3. GNSS BOARD 1 41

Figure 2.11: Board number 2 back side.

Figure 2.12: Board number 2 front side with FT2232H module.

Page 56: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

42 CHAPTER 2. DEVELOPED WORK

• accepts a clock reference signal from an external source or works with the built in crystal

oscillator (TCXO)

• accepts commands from the USB interface.

To implement the analog reception of the GNSS signals is used the chip MAX2769 from

Maxim (the same of on board 1 and 2 is used). This chip performs the function of direct

conversion and requires a small amount of external components. To construct the analog

section to this chip only one external SAW filter is needed. The disadvantage of this chip is

linked with its advantage: as the receiver is a direct conversion, the suppression of the image

channel is only 25dB.

To implement the USB interface a USB-bridge form Cypress is used with the part number

CY7C68013A[12]. In the structure of this chip an 8051 microcontroller is included. The mi-

crocontroller performs the control function of the USB-bridge. This controller is also controls

the MAX2769.

A TCXO is used as the reference generator. The quartz used generates a stable signal with

a frequency of the 16 MHz and a stability of ± 2.5 ppm. In the project, the signal from the

TCXO is buffered using an operational amplifier. After this the signal goes to the MAX2769

and to another IC and is fed to the output connector.

It is possible to work with a signal from an external reference oscillator. The operation of

MAX2769 can be changed. The mode of operation is determinate by the control firmware of

the CY7C69013A.

The owner also enumerates the main differences between this front end and similar products,

namely:

i. Can be utilized with a reference signal generator. This option can be useful when dealing

with software receivers. For example, to evaluate the impact of the clock in the receiver

performance;

ii. Provides the signal output of the reference generator. This option can be used, for

example, to connect an external frequency converter that will work with signals in the

range of the L2 band;

iii. Can specify any mode in MAX2769. This option permits that the external reference

oscillator can have a frequency between 8 and 44MHz.

Page 57: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.3. GNSS BOARD 1 43

Data

clk

Data

clk

4 16

Interface

USB2.0

1575.41 MHz

sclk

sdata

cs

REFERENCE CLOCK IN

CLOCKOUT

Figure 2.13: GNSS SDR block diagram.

The GNSS SDR Block diagram is shown in figure 2.13

Using an antenna connected to the LNA port of the MAX2769, after the signal is amplified

and filtered, the ADC performs the conversion of received signals. The ADC can output 1, 2

or 3 bits per signal for the I channel or 1 or 2-bit for I and Q channels.

A Complex Programmable Digital Circuit (CPLD) XC9572XL from Xilinx is used to perform

the data packer function described before. To program the CPLD, some code in VHDL are

developed. The function of the data packer is store the new data bits in a shift register until

the 16 bits utilized in the parallel interface with the data bridge is full with new data.

The reference clock can come either form the TCXO or from a external oscillator.

The GNSS SDR is an open project in both hardware and software. In the site, the owner

makes available the project files for the PCB. The files for the PCB are made by the KiCAD.

The KiCAD is a free program for designing PCBs.

The owner also release the firmware for the USB-bridge CY7C68012A and the VHDL code

for the CPLD.

With this it is possible to make the PCB and put all together to get a functional GNSS

software defined receiver.

Page 58: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

44 CHAPTER 2. DEVELOPED WORK

Figure 2.14: Front side of the GNSS SDR 1 board.

The technology for manufacturing this PCB is four layers PCB with a minimum via drill size

of 0.20mm and the clearance of 0.20mm and 0.25mm of minimum track size.

This makes this PCB more expensive than our second prototype board.

2.4 GNSS board 2

The GNSS board 2 is based on GNSS board number 1. This board is a smaller version of the

previous board. The GNSS board 1 has several parts that are not needed for the application

in cause, so in order to make a cheaper and smaller board this board was developed.

Except for the TCXO, the clock section of the board 1 is completely removed.

In board 1, the clock section also has LDO that convert the 5V from the USB to the 3V to

supply all of the ICs in this section. With the reduction of the components in this section,

the only component that needed power is the TCXO, to avoid this LDO, the power supply

for this section is removed and the TCXO supply pin is connected to the power supply of the

digital part of the MAX2769.

In order to make the design smaller, some components that were in the front side of the PCB

have been moved for the back side. Also the LEDS part of the design was changed. In the

original board, the 3 LEDS have a dual footprint in the PCB. To make the design smaller,

Page 59: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

2.4. GNSS BOARD 2 45

Figure 2.15: Back side of the GNSS SDR 1 board.

the position and the footprint for the LEDS are changed to only utilize SMD LEDS so the

size occupied is much smaller.

Page 60: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

46 CHAPTER 2. DEVELOPED WORK

Figure 2.16: Front side of the GNSS SDR 2 board.

Figure 2.17: Back side of the GNSS SDR 2 board.

Page 61: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 3

Software

3.1 Interface

In order to acquire the samples in the PC from the PCB boards, software and firmware needed

to be developed. The chip that makes the interface between the PCB and the USB are the

same for board number 1 and board number2. Another chip is utilized for the USB interface

in the GNSS SDR board 1 and the GNSS SDR board 2.

MAXIM, manufacturer of MAX2769, supplies a program that makes the programming of the

MAX2769 easy by means of a graphical interface. The problem with this is that this program

uses a parallel PC interface. In order to make the programming of the MAX2769 easy and

quick utilizing the USB interface a program was developed for this purpose.

The language used for creating this program is MATLAB[7]. With MATLAB, a graphical

interface was created with the most important aspects of the programming easily accessible.

Figure 3.1 shows the graphical interface for the program. The interface provides a way of

knowing the state of the configuration of the MAX2769. This configuration is easily changes

by clicking in the right spot in the table.

The interface is developed in MATLAB but the communication is developed in C++ and

made accessible in MATLAB using special feature called MEX.

MEX stands for MATLAB Executable[7]. MEX-files are dynamically linked subroutines pro-

duced from C, C++ or Fortran source code that, when compiled can be run from within

MATLAB as they were MATLAB files or built-in functions. The reason to use this type of

files is the need to access the DLL files provided by the FTDI to perform communication with

the FT2232H module.

47

Page 62: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

48 CHAPTER 3. SOFTWARE

Figure 3.1: Matlab interface for programming board number 1 and board number 2.

One reason for using the FT2232H chip is its ability to perform the entire USB protocol.

Normally for this type of devices it is necessary to write a firmware for the chip and to develop

of a device driver for the operating system. The driver is a computer program allowing the

higher-level computer program to interact with a hardware device. For the FT2232H this

driver is supplied by FTDI. The way to communicate with this device is to use some of the

DLLs provided by FTDI.

There is a DLL for the “D2XX” device driver. The “D2XX” is the drivers utilized in this

case because it allows direct access to the chip. There are other specific DLL to implement

several protocols. The SPI, JTAG and I2C are protocols with a dedicated DLL.

When the program is started, it calls a MEX-file called SPIinit. This function has the task

of opening a connection between the program and the FT2232H. This function also has the

task to close the connection.

This MEX function makes use of the D2XX DLL and the SPI DLL. The first task is to count

the number of FTDI devices connected to the bus. If no devices are connected, the function

returns with a negative value. If there are devices connected, it tries to find the right channel,

in this case the channel A. After, this function tries to initialize the device. If it successfully

several parameters of the interface are configured. The clock of the interface and the latency

Page 63: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.1. INTERFACE 49

are the first parameters in the configuration. In this case, the speed of the interface is not

critical because the SPI bus is only used for the configuration of the MAX2769. The next

thing is the state of the chip select in the interface, in this case active low. In the mode of SPI

bus interface, the FT2232H has 8 GPIOs. This pins are utilized for controlling the shutdown

and idle pins of the MAX2769 and for reading the state of the antenna flag pin and the LD

pin of the MAX2769. Here the pins are configured has input or output and it initial values

are defined. If all goes right a handle for the device is returned from the function.

In the case of a successful initialization of a device, several options in the interface become

available. The table that represents the registers of the MAX2769 is filled with the default

values. The values of others parameters in the interface are saved in a XML file. This file is

read in the initialization.

In the interface, the SPI initialization block has a button named “Connect” and a label that

describes the state of the connection to the device. This button is used to connect the program

to the device when no device is connected and is used to disconnect the device when the device

is connected.

In the registers block of the interface, there is a table with 10 rows and 28 columns. The rows

represent the register numbers and the columns represent the bit number. The values initial

filled in the table are the default values. To change a value in this table, a click in the right

cell is necessary.

In the bottom of this group, there is a check box called “Auto Send”. When this check box

is asserted, any change in the register table is only send using the SPI interface. The “Send”

button is utilized to configure the MAX2769 with the values in the Registers table. The

“Save” and “Load” are used to save and load the values in the register table in a file.

In the “Hardware Control” group, there are three check boxes. These control the state of

the “Shutdown”, “IDLE” and the “Red Led”. The shutdown and idle signals control the

operation of the MAX2769. The red led is a led placed in the Board number 2. Also in

this group, there are two labels that are changed according to the values of the LD pin and

Antenna flag pin of the MAX2769. There is a “Read Status” button. This button is used to

read the value of the LD and Antenna flag pins. These values are also read when the states

of the hardware control check boxes are changed.

In order to write a value in a register of the MAX2769, another MEX-file was created, called

“SPIwrite”.

Page 64: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

50 CHAPTER 3. SOFTWARE

The SPIwrite function has two modes of operation. The function receives the data from the

MATLAB program and sends it to the SPI interface. In one mode, the function receives a

handle created by the SPIinit function, address of the registers and the data to send to the

SPI interface. In the other mode no address is given to the function and the data passed to

the function are for all the registers.

The interface in the MAX2769 does not allow the read operation of the MAX2769 registers.

To read and write values in the GPIOs, a MEX-file was created. The file is called “SPIhwcon-

trol”. This function can be used to read and write values for the GPIOs in the FT2232H. If

only the handle is passed to the function only the read operation is realized. If a data vector

is given to the GPIOs, the write and read operation are realized. The data send to the write

operation have to include all the GPIOs. The data send to write operation relative to the

input pins are ignored by these operations.

The “Sampler” group is the interface for controlling a program that transfers the samples

from the board to the PC using the USB2.0. In this group of controls, the text editor box and

the slider are connected and are used to choose the number of seconds in the record. There

are two check boxes named “3bits/2bits” and “IQ format”. These boxes control the format

conversion of the samples acquired from the MAX2769. The state of this check box determines

the conversion of the samples in the ADC format to the signed 8 bits integer format and if

the I and Q channels are used.

The “overwrite” check box when asserted writes the new samples file. If there is a file with

the same name it will be overwrite. If this check box is not asserted and if a file already exist,

it will not be replaced and the program will rename the new file.

The “Start” button calls the GPS sampler program and communicates all the parameters

defined to this program. The GPS sampler program will be described in the next section.

The “Process data” group of controls has the function of processing a previous acquired sample

file. In the text edit box, the file to process is chosen. Using the button named “Process”

starts the processing of the file using a program that will be described in a next section.

3.2 GPS sampler

This is the program used to realize the communication of the samples for the MAX2769 ADC

to the PC. This program is based on the program “GPS1A Sampler Win32” from the project

“OpenSoureGPS”. This project can be found at “http://sourceforge.net/projects/osgps/”.

Page 65: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.2. GPS SAMPLER 51

The program begins reading the configuration for the XML file that come from the MATLAB

interface program. In this section the name that come from the other program and the

overwrite check box are taken into account. After this the USB interface is configured. In

this section, the program tries to determine if the device is connected and if the channel B is

not used. Next a handle for this channel is created and the channel is reset.

The type of buffer is used is a circular buffer. In this type of buffer, the last position is

connected to the first position. This buffer is implemented using a vector, and when the last

position is reached, the first position is the next to be utilized.

This type of buffer is utilized to implement a FIFO buffer. In this type of buffers, the first

element entering is the first to leave the buffer. For this type of buffers, this circular buffer is

well suited.

After this, threads are initialized. There are two threads: one for file writing and other for

USB reading operations. After putting the two threads running, the main function waits for

the end of the threads.

The function of the first thread is to write data read from the USB interface. This thread

waits for data to be available in the buffer and writes it to the file. It is in this thread that

the samples are converted from the ADC format to a signed 8 bit format. The conversion is

done using a Look-up table for each number of bits. This thread is always running until that

the signal from the other thread is activated. After this the buffer is empty and the thread is

terminated.

The thread that read samples from the USB interface is critical in this program. The thread

priority of this thread is raised to real time priority. This thread is responsible to read the

data from the USB. In order to the chip in the interface not to enter in overflow, it is necessary

to place sufficient USB request in the queue.

To allow fast execution of this thread, only the indispensables tasks are realized. This thread

reads data from the USB interface, writes it in the circular buffer and check if a buffer overflow

occurs. The conversion format is made by the other thread.

After the desired number of samples is transmitted, a XML report file is created, and the

program ends.

A library is utilized to make the write and read the XML files. This library is the “Apache

Xercesc C++”.

This program has no graphical interface and runs in the command line.

Page 66: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

52 CHAPTER 3. SOFTWARE

0 2 4 6 8 10 12 14 16 18

−20

−10

0

10

20

Frequency (MHz)

Ma

gn

itu

de

Frequency domain plot

Figure 3.2: Example of the probeData function frequency domain plot output.

3.3 SoftGNSS

“SoftGnss” version 3 is the name of one of the software in MATLAB used for processing the

files acquired using a GPS sampler program.

This program is free and can be redistributed and/or modified. The software comes in a

companion DVD from the book named “Software Defined GPS and Galileo Receiver”[3].

This software implements a complete software defined GPS receiver but is not designed to be

have good performance. This complete package can process a GPS signal and execute all the

steps, namely acquisition, tracking and navigation solutions.

This software is not optimized but it is a great starting point to learn the various aspects of

the GPS signal processing.

The entering point of this software program is a script called “init.m”. This sets up the

environment for this program to run. After this a function named “initSettings” is called. In

this function structure that has the configuration for important parameters in the program is

initialized.

The most important settings in this structure are:

• number of milliseconds to process;

• number of channel in the receiver;

• I channel samples or I and Q samples processing;

• File name to process;

Page 67: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.3. SOFTGNSS 53

0 0.005 0.01 0.015−8

−6

−4

−2

0

2

4

6

Time domain plot

Time (ms)

Am

plit

ud

e

Figure 3.3: Example of the probeData function time domain plot output.

• data type to read and Format (I channel or I and Q channel);

• IF frequency, sampling frequency and code frequency;

• satellite list, search band size, acquisition threshold;

• navigation solution settings (code tracking loop and carrier tracking loop parameters);

• and some constants.

These settings are used in most functions in the program. After the settings are initialized,

the samples file is read and the data is displayed by the “probeData” function that utilizes

the settings structure.

This function displays a time domain plot, a frequency domain plot and a histogram of the

data read. Figure 3.2 shows the frequency domain plot of the samples file.

Figure 3.3 shows the plot of the samples acquired in the time domain. In the figure it can be

seen the almost random nature of the signal.

Figure 3.4 shows the histogram of the data in the samples file. This histogram should look

like a Gaussian function. This is caused by the random nature of the signal being sampled.

Also if the histogram is not close to a Gaussian function, the gain in the ADC can be set too

Page 68: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

54 CHAPTER 3. SOFTWARE

−5 0 50

1

2

3

4

5

6

x 105 Histogram

Bin

Num

ber

in b

in

Figure 3.4: Example of the probeData function histogram plot output.

high or too low, or the automatic gain control is turn off.

After the probeData makes the data plot, the user is asked if he wants to proceed to the

acquisition. If the user chooses to proceed the postProcessing script is run.

First the acquisition of the signals is made, after the channels are prepared for the run. After

this the signal is tracked. When the tracking of the signal ends, the solution for navigation is

computed and the results are plotted.

This program is adapted to processing samples from the I channel or processing the I and Q

channel samples. The data mode used is chosen in the initSettings function. The first step

in this program is the acquisition. The task of the acquisition is to detect the GPS signal

in the sample file and determine its carrier frequency and the code phase. In the acquisition

function, the first steps are initialization of some variables needed to the calculation. These

variables are samples for 1ms of data (1 code period), the sampling period, table with all PRN

codes and allocation of memory space for the calculations and results.

After this initialization, real acquisition starts. The acquisition performed utilizes the parallel

code search. The acquisition is performed for all the satellites contained in the acquisition list

in the settings structure. The acquisition processing is equal for all satellites. This acquisition

is performed in two consecutive code periods, to include the possibility of one data transition

in the middle of one code sample.

The algorithm utilized for the acquisition in this program is the parallel code frequency search.

Page 69: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.3. SOFTGNSS 55

−2000 0 2000

−2000−1000

01000

Discrete−Time Scatter Plot

I prompt

Q p

rom

pt

0.1 0.2 0.3 0.4 0.5

−2000

0

2000

Bits of the navigation message

Time (s)

0.2 0.4−0.05

00.05

0.1

Time (s)

Am

plitu

de

Raw PLL discriminator

0.1 0.2 0.3 0.4 0.5

1000

2000

3000

Correlation results

Time (s)

0.2 0.4

20

30

40

Time (s)

Am

plitu

de

Filtered PLL discriminator

0.2 0.4−0.4−0.2

00.20.4

Time (s)

Am

plitu

de

Raw DLL discriminator

0.2 0.4−3−2−1

01

Time (s)

Am

plitu

de

Filtered DLL discriminator

I2

E+ Q2

E√

I2

P+ Q2

P√

I2

L+ Q2

L

Figure 3.5: Example of the plotting for tracking results.

After the circular correlations for all frequency bins are calculated, the maximum power is

determined and the corresponding code phase and frequency bin. One code chip around the

peak is excluded from the results. After the chip with the maximum value is removed, the

second maximum is found. If the ratio of the first maximum for the second maximum is

bigger than the threshold defined, a successful acquisition is performed. If the acquisition is

successful, a fine acquisition is realized for improving the precision of the frequency of the

signal acquired. This fine acquisition is realized using a long version of the code. The C/A

code is removed from the signal using the detected code phase. After this the DFT is applied

to long data and the maximum is find. As more points are used in the DFT, the resolution is

bigger and the frequency can be more precisely detected.

After the code phase and frequency of the signal are determined, these values are saved in a

structure and the acquisition continues for all the others satellites in the acquisition list.

The postProcessing creates the channel structure for the tracking function begins to run.

Then the tracking processing begins. The tracking module begins by initializing the all the

variables and allocating memory space for the results.

The tracking of the channels is performed one after the other. In the tracking of one channel,

the C/A code is calculated for this channel. The processing of the data is performed in the

number of codePeriods determined by the number of milliseconds to process.

In this loop, the first step is the read to samples needed to process. After the early code, the

Page 70: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

56 CHAPTER 3. SOFTWARE

late code and the prompt code are calculated. The carrier to mix the signal to baseband is

generated. The carrier generated is mixed with the data for the sample data to obtain the

baseband signal.

After the early, late and prompt version of the code are correlated with the I channel and Q

channel data.

The values calculated are used to determine the error in the PLL and to determine the

correction to make in the carrier NCO. These values are also utilized to calculate the DLL

error and the correction to make in the code NCO. The track values are saved and the process

is repeated for all the code periods needed.

After the tracking for one channel is over, the tracking for the other channel begins until the

tracking for all channels is completed.

With the tracking solution, the function postNavigation tries to find a navigation solution for

this data. The navigation solution can only be found if the number of milliseconds tracked is

bigger than 36000 (36 seconds) and if there are 4 or more satellites in the tracking results.

The first step in achieving the navigation solution is to find the preamble. For finding the

preamble, the results from the prompt code tracking results are used. For each value, if the

results is bigger than 0 the bit is determined as 1 and if less than 0 the bit is determined

as -1. Then, the preamble and the vector of bits are correlated to find the maximum and a

possible preamble. To validate the preamble, the distance between the two first preambles

must be 6000 milliseconds. Then, the navigation bits close to the preamble start are checked

for parity. If this is OK, the preamble is found and checked.

With the start of the preamble, the bits can be calculated. After the bits are calculated, for

each position solution, the pseudoranges are determined and the solution for the satellites

position and the clock correction can be determined.

With the satellite position, clock corrections and the pseudoranges, it possible to calculate

the user position. The position solution is converted to geodetic and UTM coordinate system.

After the navigation solution is calculated, the results are plotted.

In Figure 3.5, the result from the tracking of a channel is plotted. In this figure, the I and

Q component of the baseband signal are plotted. In the other plot in the figure there is a

representation of the bits of the navigation data. The value of the navigation data is the

tracking value of the prompt code.

In the second row of the plot, the raw PLL discriminator and the plot for the Early, Late

Page 71: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.3. SOFTGNSS 57

10 20 30 40 50 60

−30

−20

−10

0

10

20

30Coordinates variations in UTM system

Measurement period: 500ms

Var

iatio

ns (

m)

−10 0 10

−15

−10

−5

0

5

10

15

East (m)

Positions in UTM system (3D plot)

Nor

th (

m)

30

210

60

240

90270

120

300

150

330

180

0015

304560

75

90 13

20 4 23

17

10

Sky plot (mean PDOP: 3.1026)

ENU

MeasurementsMean Position Lat: 39°4′51.2114′′ Lng: −8°27′12.0429′′ Hgt: +153.8

Figure 3.6: Example of the plotting for the navigation solutions.

Page 72: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

58 CHAPTER 3. SOFTWARE

and Prompt code correlation value are showed. In the third row of the plot, the filtered PLL

discriminator value is plotted. In the same row, there is also the plot of the Raw and filtered

DLL discriminator.

The raw DLL or raw PLL discriminator represent the error in the NCOs. The filtered DLL

and PLL represent the values of the discriminators.

Figure 3.6, the navigation solution is shown. In the first row, the navigation solutions are

plotted in the Earth Fixed Earth Center coordinate system. In the second row, the first plot

shows the position in two dimensions. The red point represents the mean position. The plot

in the right side shows the relative position of the satellite in the sky.

3.4 Open Source GPS

These are complete software solutions for a software defined GPS receiver. One of these soft-

ware is available in http://http://sourceforge.net/projects/osgps/. This software is developed

to allow the acquisition, tracking and demodulation signal from GPS satellites. OSGPS is

initially developed to work with a Zarlink GP2021 12 channel GPS correlator chip but now

can be used with software defined receivers hardware. This makes it possible to use this

software with the boards developed in this work [6].

The OSGPS software has two major sections, the main routine and the interrupt service

routine. The 3 major objects are the GPS receiver, the Channel, and the Satellite. The

satellite interacts with the channel through the RF signal. One Channel can only be associated

with one satellite at the same time. This software is capable of processing 12 channels. The

channel interacts with the GPS receiver using the GPS ISR (interrupt service routine). The

ISR permit the direct communication between the channel and the GPS receiver using flags.

These signals can be utilized to tell to the main program when to calculate the navigation

solution, when to check the satellite visibility and when a new frame data is ready.

In the initialization of the receiver, there are three modes of starting. The cold start is a

bootstrap. This mode of initialization is used if the receiver does have enough information to

determine which satellites are in view. It must search every PRN code to see if it is available.

In addition, the position or the receiver clock are not known, the range of Doppler to be

searched is also very wide. The warm start acquisition mode can be utilized if an almanac

is available and a rough idea of the receiver’s position is available. The Doppler search can

be narrowed and the satellites in the sky can be calculated. The last starting mode is hot

Page 73: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.4. OPEN SOURCE GPS 59

0

Idle

1

Acquisition

2

Confirmation

3

Pull-in

4

Tracking

C/No < C/N_Thresh

N_ms > Npull && (!Carrier lock || !Code lock)

C/No • C/N_Thresh

N_ms • Npull

N_ms = m && n < n_thresh

Sat in view

Promp_mag && dither_mag • Thresh

N_ms < m

Sat not in view

Sat not in view

Promp_mag || dither_mag < Thresh

N_ms = m && n • n_thresh

N_ms > Npull && (Carrier lock && Code lock)

Figure 3.7: OSGPS channel state diagram.

start. This is used when data needed for a warm start is available along with valid clock and

ephemeris data. As soon as the start of a subroutine is found, the range measurements form

the satellite can be used.

The diagram in the Figure 3.7 shows the states in a channel of the OSGPS receiver. There

are 5 states for the channel.

In the Idle state, the channel waits until a satellite is in view to move to the Acquisition state.

In the Acquisition state, the receiver performs an acquisition using the serial search algorithm

searching in code and frequency space. Every millisecond the code phase is change in half a

chip space and this code phase is search. To pass to the next state the acquisition prompt

and dither magnitude must be greater than a determined threshold.

In the Confirmation state, the result code phase and carrier frequency determined in the

acquisition are used to perform the correlation with the incoming signal. If the result is above

the threshold for a predetermined number of milliseconds, the channel passes to the next

Page 74: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

60 CHAPTER 3. SOFTWARE

state. If not, the state transits to the acquisition state.

In the Pull-in state, the receiver tries to refine the values given by the acquisition step. There

is a high degree of confidence that the signal has been found. But, because the correlation

peak is so wide in frequency, the result may be very distant. The pull-in state attempts to

track the signal using a combination of frequency and phase tracking to lock on the carrier.

There is also a code tracking loop to track the code in the received signal. In order to avoid

transients the loop is not immediately closed. The loops are updated every millisecond. The

pull-in state tries to find the end of the navigation bit for the tracking state start in the

beginning of a bit. In the last millisecond of this state, the average correlation value, phase

error and data bit is checked to decide whether or not to go into the tracking state. The pull-in

state is the last state of detection. If the carrier and the code are lock after a predetermined

number of milliseconds, the receiver passes to the next state.

The code tracking loop is a classic DLL updated every millisecond. The carrier tracking loop

has both a phase lock loop (PLL) and a frequency locked loop (FLL). The PLL track the

signal with less noise but is limited in the phase error that it can tracks. The FLL works with

large phase errors but with more noise. Both correlators are one quarter chip spacing from

the peaks. Both the in phase and both quadrature correlators are added. In the beginning

of the state in order to get a bigger range of tracking, the carrier DCO start with the weight

toward a FLL and its weighting is decreased as a function of time until PLL dominates.

The next state is Tracking. In the tracking state, the receiver tries to track the changes

in the code phase and the Doppler frequency to demodulate the GPS signal and retrieve the

navigation data. With navigation data and the pseudorange is possible to find a user position.

The carrier loop commands are calculated at the start of each code period and the code loop

commands are calculated at start of each navigation bit. When the code loop commands are

calculated, the data bit is determined and sent to the preamble routine the preamble in the

navigation message.

The preamble detection is checked in several steps. First the preamble and the inverse of the

preamble bits are checked. Then, the parity of the word 0 and word 1 is tested. The subframe

number is checked. The TOW is checked against the receiver time. The navigation message

is continuously recorded in a circular register.

For the position, velocity and time computations, various steps are needed.

The almanac is used to calculate a low accuracy position of the satellite. This position is used

Page 75: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.4. OPEN SOURCE GPS 61

to determine if the satellite is visible. The ephemeris routine computes the precise position

of the satellite and the satellite clock offset from GPS time.

There are corrections to the pseudorange calculation. The lower part of the atmosphere (the

Troposphere) slows down the radio waves independently of it the frequency. The pseudorange

has to be compensated. The OSGPS utilizes a model to correct this effect. The upper part of

the atmosphere (the Ionosphere) also slows down the signal. However this delay is a function

of the frequency. With a measurement in the L2 band, this error can be almost eliminated.

Since L2 measurements are not available, the pseudorange is corrected with the navigation

data.

To compute the position, the software utilizes the Least Squares algorithm that minimizes

the square of the difference from the measured range for each satellite and a position fix.

This software was initially developed to support a GPS hardware correlator chip. But in later

development, the code is modified to support the software defined GPS receiver. In order

to achieve this functionality, the data structure and interrupt structure was keep, but some

functions were added. The main function is heavily modified to work with GPS data from a

file and functions were created to simulate the hardware correlator. This function simulates

the chip registers and the interrupt routines.

Figure 3.8 is showed the output of the OSGPS program in the page 1. The top line indicates

the software version number. The next line shows the clock time and date. This data comes

from the system time in the computer adjusted by GPS time when a navigation solution is

available. This is followed by the Time Of Week (TOW) in seconds, and (once the receiver

has acquired satellites) the measurement time. The next lines give the receiver location and

velocity. The receiver position is given in degrees: minutes: seconds. The speed is the

horizontal magnitude in m/s and heading in degrees from north. The measurement time

interval in seconds is also provided. On the next line we have the number of satellites being

tracked that have a valid ephemeris, the “state” of the receiver , almanac validity and GPS

week. The lower section tells what each channel is doing and is different for each page. For

each channel we have:

• Satellite PRN assigned2

• Channel state (1 through 4, each described in greater detail later)

• nfreq or the search integer Doppler offset multiplier

Page 76: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

62 CHAPTER 3. SOFTWARE

Figure 3.8: Example of display page 1 of OSGPS.

• Azimuth in degrees

• Elevation in degrees

• Predicted Doppler frequency in Hz

• Number of data bits read (1 to 1500)

• Number of data frames read.

• sub-frame id (1 to 5)

• ura (an integer indicating how accurate the clock and orbit data is)

• almanac page number (when the almanac is being down loaded)

• number of missed correlation values

• carrier to noise ratio (C/No) in dB-Hz

Figure 3.9 show the second page of the output of OSGPS program. It includes the channel

state and PRN number from page 1 and additional information on:

• The satellite TLM telemetry word

Page 77: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.5. GPS SDR 63

Figure 3.9: Example of display page 2 of OSGPS.

• TOW time of week updated every 6 seconds.

• Validity (1 means the ephemeris data is usable)

• TOW sync (1 means the time of week has been synchronized)

• Offset (the number of data bits the start of a frame is offset in the circular data register)

Figure 3.10 shows the page 3 of the output of OSGPS program. It includes the channel state

and PRN number from page 1. It adds information on the troposphere and ionosphere delays

(in meters) being used in the computation of the navigation solution.

3.5 GPS SDR

This software is named “GPS SDR”. This software utilizes a different approach. It is optimixed

for performance.

The GPS-SDR is coded in the C++. Some of the abstract, and performance inhibiting, aspects

of C++ are not used. These include polymorphism, operator overloading, and inheritance.

Page 78: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

64 CHAPTER 3. SOFTWARE

Figure 3.10: Example of display page 3 of OSGPS.

The main point of the software to absorb is the idea of a “threaded object”. Each discrete

task that the receiver must perform (i.e. decoding the satellite ephemerids) is given a plainly

named object and an associated thread. The object can be treated like a black box with an

input and output(s). The threaded object will be fed data through a blocking pipe, which

will be read by the object’s Import() method. The method will perform its duties on the

data it received, and then send the resulting data to it’s destination via a Export() method.

Note that the blocking pipes achieve two things at once. The pipes both allow data to flow to

and from a process as well as timing the process. Since the process will block on its Import()

call if the incoming pipe is empty, no assignment of thread execution frequencies is required.

Threads are executed as needed when data is made available to them.

This program can be run in an command line alone or can be run with a graphical interface.

The connection between the program and the graphical interface is made automatically using

named pipes.

This program can be used for real time processing of GPS signals.

The first task of the program is to process the arguments passed in the command line. The

arguments in the command line can choose the mode of operation of GPS SDR. The sample

Page 79: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.5. GPS SDR 65

data can be get from the disk or the USRP.

After this, one function tries to determine which instruction sets are supported in the current

processor. The determination is used evaluate the possibility of using determined instruction

for real time operation.

The next task is the initialization of the communication pipes between the different objects.

The object threads are started. The objects are keyboard, PVT (Position Velocity Time),

correlator, acquisition, ephemeris, commando, SV select (satellite selection), telemetry, FIFO

(first-in first-out) and “patience” (watchdog).

If the threads start to run, the main program waits for the end of the threads to exit.

There is a pipe between the acquisition thread and the select satellite thread. The acquisition

thread waits for a request from the select satellite thread. The request determines the type

of acquisition. The acquisition can be a strong acquisition, medium acquisition or a weak

acquisition. In a strong acquisition 1 millisecond of data is used, for medium acquisition 10

milliseconds of data are used and in a weak acquisition 310 milliseconds are read.

The data is read from the FIFO. The next step is to perform the acquisition algorithm. The

type of acquisition is already determined. The acquisition is done using 250Hz spacing in the

Doppler search band. To calculate the baseband signal, the frequency domain of the code is

already calculated and the multiplication with sample data implemented using the assembly

language for efficiency. After this multiplication, an inverse DFT is performed in the result

and converted to a power. The maximum is found and saved. After all the frequency bins in

the search space are analyzed, the power is compared with the threshold and the result of the

acquisition is determined.

In the medium acquisition, 10 ms of coherent integration is used. Since in 10 ms, a navigation

bit transition can occurs, the algorithm is done for 2 consecutive blocks of 10 ms, so that

at least one block does not contain a navigation data transition. After the correlation of 10

milliseconds, the maximum is detected. If this value is bigger than the threshold defined for

the medium acquisition, the satellite is acquired.

In the weak acquisition, 300 ms is used for the signal acquisition. This is done using 10 ms

of coherent integration and 15 incoherent integrations. There are two groups of 10 ms each

called even and odd. These groups are used so that one group does not have a navigation bit

transition. The 10ms coherent integration are repeated 15 times for incoherent integration.

The maximum value is found and if it is bigger than the defined weak acquisition threshold

Page 80: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

66 CHAPTER 3. SOFTWARE

the satellite is acquired.

In the end of the acquisition, a message is sent to the selected satellite object in order to begin

the tracking of the acquired satellite.

The select satellite object is responsible for choosing the satellite for a channel. This is the

object that determines the type of acquisition. This object communicates with the Telemetry

object to give information about the state of this object. To begin the acquisition, one empty

channel is found. If the type of start is not cold start, the rough position of the satellites

can be determined. With a rough receiver position, the select satellite object determines the

visible satellites. This object sends a message to the acquisition and waits for the answer.

The result of this acquisition is communicated to the correlator object.

The correlator object is used to implement a correlator function in software. The correla-

tor object is responsible for generating the PRN code and implementing the multiply and

accumulate function. This for the process of carrier wipe off.

The channel object is responsible for controlling one channel of the GPS SDR program. In the

channel object initialization, the initial values for all the tracking loops are calculated. The

channel controls the PLL and the DLL necessary to track the carrier frequency and the code

phase in the GPS signal. This channel also estimates the value of the Carrier to noise ratio

(C/N0). The channel makes the demodulation of the navigation data and bit tracking. The

frame is also synchronized in this object and also parity check. The demodulated ephemeris

data from the navigation data is send to the ephemeris object.

The ephemeris object is responsible for the parsing of the navigation data. The data comes

from the ephemeris object. This object reads, parses the data and calculates the ephemeris

and almanac.

The FFT object has the task of performing the FFT and inverse FFT.

The GPS source object has the task to control the source of the GPS data. The source can

from a GPS front end hardware or a GPS file. In this object the data is read form the source

and converted to the appropriate format.

The FIFO object is responsible for storing the packet of a GPS signal until the process of this

packet start.

The patience thread is a watchdog and has the task of monitoring the operation of the program.

If the program stops processing data, the watchdog is triggered and the execution ends.

The PVT object is responsible for all the computation related to the position, velocity and

Page 81: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.6. GLONASS SOFTWARE RECEIVER 67

time solutions. The navigate function computes the solutions for the position, velocity and

time. There are various functions with different task in this object. This object checks for

error in the measurement and calculate the pseudorange.

The telemetry is responsible for communicating all the information about the objects created

with the graphical interface.

The graphical interface was developed using the graphic library “wxWidgets”. The program

that makes the graphical interface receives messages from the Telemetry object of the GPS

SDR program and displays the information in a intuitive way. Figure 3.11 shows the primary

windows interface for the GUI of the GPS SDR.

The graphic interface shows the state of the connection, the number of the messages and the

serial bandwidth in the connection groups of control. The task health shows the execution of

object in the GPS SDR program.

In the left side of the interface, the windows group of controls show various button. Clicking

in the buttons, a new window appears to show information relative to the name of the button.

There are windows for PVT, ephemeris, channel, pseudorange, almanac, satellite select, board,

health, commands, message and speedometer.

3.6 GLONASS software receiver

This software is distributed by the site http;//gnss-sdr.ru. This software was developed with

based on the previous described software defined GPS receiver developed in Matlab. This

GLONASS receiver is written for Scilab, an open-source analogue of Matlab.

The structure of the code is the same of the GPS receiver. The init scrip begin the execution,

and the initSettings function initializes the structure settings that contains all the parameters

for the receiver.

After this, the data is read from the file is displayed in several ways. Like the GPS version

of this code, the data is displayed in the time domain, in the frequency domain and in a

histogram.

The user choses if he wants to continue. If the answer is positive, the acquisition begins. The

acquisition is also very similar with the GPS acquisition. But the GLONASS has a different

signal structure. All the GPS satellites transmit in the same frequency and use a CDMA

technique. Each GPS satellites have it own PRN code. This code makes possible to acquire

the signal for each satellite. The GLONASS uses a different system. The GLONASS utilizes

Page 82: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

68 CHAPTER 3. SOFTWARE

Figure 3.11: Graphical interface of the GPS SDR.

Page 83: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

3.6. GLONASS SOFTWARE RECEIVER 69

a FDM system, so all the satellite have the same PRN code, but each satellite transmit in a

slightly different frequency.

The acquisition algorithm is the same as in the GPS receiver. For each satellite in the

acquisition list, the code is transformed in the frequency domain. The carrier to mix with the

sample signal is generated. The frequency of this carrier is determined by the Doppler that

is being searched and by the center frequency of the channel. This carrier is mixed with the

signal to convert to baseband. After this, the signal is converted to the frequency domain.

The result is multiplied by the frequency domain version of the code. The inverse DFT of the

last result is the correlation of the code and the baseband signal.

The remaining code is to find the maximum in the search space. If the maximum of the

correlation and the second peak ration is bigger than the threshold defined in the settings

structure the signal is detected in the data and the result of the acquisition are refined using

a longer data sampled.

After the acquisition, the channels are filled and the tracking begins.

The tracking is very similar to the tracking function in the GPS software receivers. Three

versions of the code are created. The early, late and prompt versions. The carrier is generated

to mix with the sample data to convert the signal to baseband.

After the carrier is removed from the sample data, the early, late and prompt versions are

correlated with the baseband signal. After this, the error in the phase lock loop (PLL) is

calculated. This value is used to update the carrier NCO.

The error in the code is also found and the result is used to update the value of the code

NCO.

The process to determine the navigation data is also similar with the GPS version of the code.

The first task is to find the preamble of the data. After the tracking results are transformed

in binary values make a mean of all result during a bit. A function called ephemeris extracts

the ephemeris information from the navigation data.

With the beginning of the frames it is possible to calculate the pseudoranges. The ephemeris

permits the calculation of the satellite position and the clock correction factor. The algorithm

for calculate the solution is the least square.

After the position is found, a conversion in the coordinate system occurs. This process is

repeated until all tracking data is used.

Then, the navigation solution is plotted.

Page 84: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

70 CHAPTER 3. SOFTWARE

The principal differences between the GPS and GLONASS version of this code are: in the GPS,

all satellites transmit in one frequency and each have a different PRN code, in the GLONASS,

all satellites have the same PRN code and transmit in a slightly different frequency. Also the

data transmitted is different. But the same algorithm is used for the acquisition and tracking.

Page 85: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 4

Results

4.1 Board 1 Results

In the section the results for the Board 1 are showed. The results showed first are achieved

using the SoftGPSS program using the Matlab programming language. In the figure 4.1, the

shows the plot from the probe data function.

In the first row, the frequency domain plot is displayed. The shape of the IF filter is clearly

visible. The settings in the MAX2769, are set the IF filter to 2 MHz bandwidth and a central

frequency of approximate 4 MHz. The settings for the central frequency are defined utilizing

the SPI interface. The bits that change the central frequency of the filter are know but the

relation between this bit and the central frequency is not explained. The changes in the

central frequency are made observing the results and not following some given equation.

In the second row, the time domain plot of a part of the incoming signal is plot. This show

a signal a apparently random signal. In this row, there is also a plot for the histogram of the

incoming signal. This histogram shows an approximate Gaussian distribution. The value 1

has more samples that the value -1 but the values 3 and -3 are considerable less that the 1

and -1 values. This shows that gain in the programmable gain amplifier is not set to high. In

the setting utilized the PGA is utilized with automatic control gain.

The figure 4.2 show a plot for the results of an acquisition. In this figure, the signal for the

searched satellite is not found. This plot is a three dimensional plot. In the x dimension, the

different code phases are represented. In the y dimension, the different frequency bins utilized

in the frequency search are displayed. In the z dimension, the magnitude of the acquisition

result is showed.

71

Page 86: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

72 CHAPTER 4. RESULTS

0 0.005 0.01 0.015−3

−2

−1

0

1

2

3Time domain plot

Time (ms)

Am

plitu

de

0 1 2 3 4 5 6 7 8

−10

−5

0

5

10

15

Frequency (MHz)

Mag

nitu

de

Frequency domain plot

−4 −2 0 2 40

1

2

3

4

5

6

x 105 Histogram

Bin

Num

ber

in b

in

Figure 4.1: Board 1 probe data plot

Page 87: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 73

SamplesFrequencyBins

Magnitude

Figure 4.2: Board 1 acquisition plot, no satellite found

In resume, the x represent the code phase, y represent the frequency and the z the result of

acquisition. If a signal is acquired, the results of the acquisition are much bigger that the rest

of the results and the code phase and frequency that correspond the maximum value, is the

frequency and the code phase of the signal acquired.

In the figure 4.3, the results for a acquisition is plot. In this plot is clearly visible the peak

that corresponds to the signal acquired. The peak is not a unique point, but a group of points.

This is happens because, if the frequency bin is close to the frequency of satellite signal, the

results of acquisition is also similar. The same happens in the code search space. If the code

phase is close to the real code phase of the signal, the result of the acquisition is also close.

In the figure 4.4, the plot from the frequency bin that has the maximum value is showed. In

this plot, the peak is clearly bigger that the rest of the results. With this scale, the width of

these peaks cannot be seen.

The figure 4.5 shows a zoom of the previous figure around the peak. This figure shows that

the peak is several samples width.

The figure 4.6 the results from the same acquisition are showed, but in this plot the results

around the maximum are excluded. After the peak is excluded, the results for the other code

phases are similar. In the acquisition function, the acquisition is declared successful if ratio

between the first peak and the peak found in this figure is large that the threshold defined in

Page 88: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

74 CHAPTER 4. RESULTS

Magnitude

FrequencyBins

Samples

Figure 4.3: Board 1 acquisition plot, with satellite found

Magnitude

Samples

Figure 4.4: Board 1 acquisition plot, Single Frequency

Page 89: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 75

0 50 100 150 200 250 300 3500

2

4

6

8

10

12x 10

6

Samples

Figure 4.5: Board 1 acquisition, single frequency zoom

0 2000 4000 6000 8000 10000 12000 14000 16000 180000

2

4

6

8

10

12

14x 10

5

Figure 4.6: Board 1 acquisition, single frequency with code chip excluded

Page 90: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

76 CHAPTER 4. RESULTS

0 0.5 1 1.5 2 2.5

x 106

0

0.5

1

1.5

2

2.5

3x 10

4

Figure 4.7: Board 1 acquisition plot, fine frequency search

the settings structure. By default, the threshold is 2,5.

In the figure 4.7 show the fine frequency search. This figures show the results for the search of

the fine frequency. This graphic is obtain utilizing a large group of samples contains several

PRN codes periods. After a parallel frequency search is performed utilizing the code phase

determined in the first steps of acquisition. The first half and second half of the points

showed are symmetric. A search for the maximum is performed and the result is converted

to Frequency. This is the frequency of the acquired signal.

The figure 4.8 is a zoom of the previous figure around the peak frequency.

The figure 4.9 shows a plot form the tracking function. This tracking is showed for 300

milliseconds of data. In this plot, the output of the I correlator and the Q correlator is

showed with the Q value in one axis and the I value in the other axis. The quality of the

tracking is showed by the two groups formed. In one group, the values are close to each other

and have a value that is symmetric to the other group. This samples are in the majority

formed by the I value and have a low Q value.

In the plot in the right, the navigation bits are clearly visible. The transitions of the navigation

bits are sharp and is easy to decide if the bits is positive or negative. The conversion between

these values and the navigation bits are determined after finding the preamble. The preamble

can be inverted. If this happened, all bits are inverted.

Page 91: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 77

0 50 100 150 200 250 300 3500

0.5

1

1.5

2

2.5

3x 10

4

Figure 4.8: Board 1 acquisition plot, fine frequency search zoom

−2000 0 2000

−2000−1000

01000

Discrete−Time Scatter Plot

I prompt

Q p

rom

pt

0.05 0.1 0.15 0.2 0.25 0.3

−2000

0

2000

Bits of the navigation message

Time (s)

0.1 0.2 0.3−0.05

00.05

0.1

Time (s)

Am

plitu

de

Raw PLL discriminator

0.05 0.1 0.15 0.2 0.25 0.3

1000

2000

3000

Correlation results

Time (s)

0.1 0.2 0.3

20

30

40

Time (s)

Am

plitu

de

Filtered PLL discriminator

0.1 0.2 0.3

−0.4−0.2

00.2

Time (s)

Am

plitu

de

Raw DLL discriminator

0.1 0.2 0.3

−2−1

01

Time (s)

Am

plitu

de

Filtered DLL discriminator

I2

E+ Q2

E√

I2

P+ Q2

P√

I2

L+ Q2

L

Figure 4.9: Board 1 tracking plot

Page 92: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

78 CHAPTER 4. RESULTS

0 10 20 30 40 50 60 70 80 90 100−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Time (milliseconds)

Code ErrorCode NCO

Figure 4.10: Board 1 Code Error and Code NCO

In this figure is also visible that the correlator value for the prompt code is almost always

bigger that the early and the late code. The objective of code tracking is to always get the

prompt value than the early and late version.

In the figure 4.10 , the values for the Code Error and the Code NCO. The code NCO controls

the numeric controlled oscillator. This oscillator produces the frequency for the code and

is modulated using the C/A for this satellite. As the relative motion of the receiver and

the satellite produce a Doppler frequency in the carrier frequency, also occurs in the code

frequency. To track this, the correlators are used to determine the error in the Code Phase.

The code NCO is subtracted from the nominal code frequency. So if the code error is positive,

also the code NCO is positive in order to make the frequency smaller. With the frequency

smaller, the code phase of the generated signal can be caught by the code phase of the incoming

signal. If the code error is negative, the code NCO is also negative in order to make the code

frequency bigger and the phase of the generated signal can caught the incoming signal.

In this figure, the magnitude of the code error never diverges from the zero. The code NCO

has a component that is proportional of the code error and other component from the previous

code NCO.

Page 93: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 79

0 20 40 60 80 100−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

0.02

0.03

0.04

0.05

Figure 4.11: Board 1 tracking carrier error

Page 94: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

80 CHAPTER 4. RESULTS

0 20 40 60 80 10015

20

25

30

35

40

45

Time (milliseconds)

Figure 4.12: Board 1 tracking carrier NCO

The figure 4.11 shows the carrier error in the tracking loop. The error is never diverging from

the zero. The figure 4.12 shows the carrier NCO. As in the code NCO, the carrier NCO is

used generate the carrier for demodulation. These values are used to change the frequency of

the generated carrier. The objective is to never lose the track of the satellite signal. On part

of the carrier NCO is determined by the carrier error determined. The other part is related

with the previous value of the NCO. The changes in the NCO are proportional to the carrier

error.

The figure 4.13 shows the results from the navigation solution. The results are obtained

with a period of 500 milliseconds. The results are showed first using the coordinate system

Earth center earth fixed. In this system the coordinate system has three axis centered in

earth center and with on axis in the direction of north, other east and the other up. In

the figure the solution is showed in the relation to the mean position. The up axis shows a

larger variation compared with the axis of the north and east coordinates. This is normal

because the error in this dimension is normally bigger. This happens due to the location of

Page 95: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 81

10 20 30 40 50 60−30

−20

−10

0

10

20

30Coordinates variations in UTM system

Measurement period: 500ms

Var

iatio

ns (

m)

−10 0 10

−10

0

10

East (m)

Positions in UTM system (3D plot)

Nor

th (

m)

30

210

60

240

90270

120

300

150

330

180

001530

456075

90 13

20 4 23

17

10

Sky plot (mean PDOP: 3.1026)

ENU

MeasurementsMean Position Lat: 39°4′51.2114′′ Lng: −8°27′12.0429′′ Hgt: +153.8

Figure 4.13: Board 1 navigation solution

Page 96: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

82 CHAPTER 4. RESULTS

Figure 4.14: OSGPS output for Board 1 signal processing

the satellites. The signal received in the receiver is only from the satellites above a determined

mask angle. Because of that the information is less in the up dimension. This is described as

dilution of precision.

The results are also showed in a two dimension plot. In this plot the mean position is plot in

red, and its value is showed in latitude, longitude and height. In this plot, the variation for

the latitude and longitude are less than 10 meters. In the last plot, a sky plot of the satellites

is plotted. This plot shows the location of the satellites in the sky. This important to get an

idea of the precision of the measurements. If few satellites are tracking, the precision of the

measurement will be smaller. Also if all satellites are in on side of the globe, the result will

be also degraded. The value showed with the name PDOP is display. This value is called

dilution of precision and measures the distribution of the tracked satellites. A smaller value

means a better distribution, and better precision of measurement. In this cause, the satellites

are evenly spaced.

4.1.1 OSGPS program results

The next figure shows the results of the board 1 using the OSGPS program. To obtain these

solutions a rough position is given for the receiver and an almanac is downloaded to use in

the program. The time is obtained from the computer. These three elements are used to

determine the visible satellites and to estimate the Doppler frequency.

Page 97: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 83

Figure 4.15: OSGPS output for Board 1 in navigation state

In the figure 4.14, the OSGPS output is showed. In this figure there are 8 satellites in

tracking state but none in the with pseudorange calculations. In this figure is also possible

to the different information from the program as the azimuth, elevation, Doppler frequency

and others about the channels. In the last row there are the CNo (Carrier to Noise ratio)

that measure the signal to noise ratio of the modulated signal. In most receivers, if the CNo

is lower than 30 the channel is not tracked. If the CNo is bigger than 40 the signal is easily

tracked.

The figure 4.15 show the output of the program OSGPS in the navigation state. In this state,

the program calculates the position and updates these values in the plot. The state 4 in the

figure represent the navigation state. The position, speed position and heading are update in

the navigation solutions.

In this figure 4.16, the page 2 of the OSGPS program is plotted. The Telemetry and TOW

words are showed for each channel and the state of each channel.

In the figure 4.17, the parameters for the correction of the ionosphere and troposphere errors

are showed.

In the figure 4.18, the pseudoranges and the rate of change of the pseudoranges are plotted

for all the channels being tracked.

In the figure 4.19 the page 5 of the OSGPS program is plotted. This page shows the errors

in the frame detector and discrimination.

Page 98: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

84 CHAPTER 4. RESULTS

Figure 4.16: OSGPS output for Board 1 in navigation state page 2

Figure 4.17: OSGPS output for Board 1 page 3

Page 99: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.1. BOARD 1 RESULTS 85

Figure 4.18: OSGPS output for Board 1 page 4

Figure 4.19: OSGPS output for Board 1 page 5

Page 100: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

86 CHAPTER 4. RESULTS

Figure 4.20: Navigation Solution from the OSGPS

Page 101: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.2. BOARD 2 RESULTS 87

0 0.005 0.01 0.015−3

−2

−1

0

1

2

3Time domain plot

Time (ms)

Am

plitu

de

0 1 2 3 4 5 6 7 8 9 10−15

−10

−5

0

5

10

15

Frequency (MHz)

Mag

nitu

de

Frequency domain plot

−4 −2 0 2 40

2

4

6

8x 10

5 Histogram

Bin

Num

ber

in b

in

Figure 4.21: Board 2 probe data function plot.

In this figure 4.20, the navigation solutions are plot in a satellite image. This gives an idea of

the variation of the solution. In this figure, the solution is concentrated.

4.2 Board 2 Results

Figure 4.21 shows the probe data function plot. The frequency domain version of the data

file is plotted. Compared with the plot from the Board 1, this seems less a ideal filter. The

passband of the filter is not entirely flat and there are several frequencies that have more

energy that the remaining that look like peaks.

Figure 4.22 shows the results of the acquisition. In this figure, there are 7 green bars that

represent the number of the acquired satellites.

Figure 4.23 shows the results of the tracking function for one of the channels. This figure

shows that the satellite is tracked all the time of the plot. In the first row in left, the discrete

time plot shows the result for the I and Q correlator output. In the tracking result for the

Board 1, the results make two groups of results. In this plot, the results are much closer to

the 0 and to each other. In the first row in the right, the result in the I correlator, the results

Page 102: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

88 CHAPTER 4. RESULTS

0 5 10 15 20 25 300

1

2

3

4

5

6

7

8

9

10Acquisition results

PRN number (no bar − SV is not in the acquisition list)

Acq

uisi

tion

Met

ric

Not acquired signalsAcquired signals

Figure 4.22: Board 2 acquisition results plot.

Figure 4.23: Board 2 long tracking results plot.

Page 103: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.3. BOARD 3 RESULTS 89

−1000 0 1000−1000

0

1000Discrete−Time Scatter Plot

I prompt

Q p

rom

pt

0.2 0.4 0.6 0.8 1

−1000

−500

0

500

1000

Bits of the navigation message

Time (s)

0.5 1

−0.2

−0.1

0

0.1

0.2

Time (s)

Am

plitu

de

Raw PLL discriminator

0.2 0.4 0.6 0.8 1

500

1000

1500

2000

Correlation results

Time (s)

0.5 1

−50

0

50

Time (s)

Am

plitu

de

Filtered PLL discriminator

0.5 1

−0.5

0

0.5

Time (s)

Am

plitu

de

Raw DLL discriminator

0.5 1

−2

0

2

4

Time (s)

Am

plitu

de

Filtered DLL discriminator

I2

E+ Q2

E√

I2

P+ Q2

P√

I2

L+ Q2

L

Figure 4.24: Board 2 small tracking results plot.

are much closer to 0 than in the previous result for the Board 1.

The other plot in this figure also shows much more variation that in the Board 1 results. In

the plot of the prompt, early and late correlator results, the early and late results are closer

to the prompt results than in the previous results.

Figure 4.24 shows the tracking result of one satellite during less time than the previous figure.

Here more detailed can be seen. In the plot named “Bits of the navigation message”, the

positive and negative results are much close than before. In some cases, the results even cross

the zero only during the time of one bit.

Figure 4.25 shows the navigation solution for the Board 2. In the first row, the variations

between the instantaneous position solution and the mean position solution are showed. Com-

paring with the results of the board 1 is clearly visible that the variation in the second case

is bigger than the first case. The plot also shows that the variation for the Up coordinate is

much bigger than the other coordinates.

4.3 Board 3 Results

In this section, the results for the board 3 are showed.

The figure 4.26 shows the results of the plot for the probe data function. In this figure, the

Page 104: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

90 CHAPTER 4. RESULTS

10 20 30 40 50 60 70

−100

−50

0

50

100

150

Coordinates variations in UTM system

Measurement period: 500ms

Var

iatio

ns (

m)

−40 −20 0 20 40

−40

−20

0

20

East (m)

Positions in UTM system (3D plot)

Nor

th (

m)

30

210

60

240

90270

120

300

150

330

180

001530456075

90

32

23

24 17

11

13

20

Sky plot (mean PDOP: 3.8236)

ENU

MeasurementsMean Position Lat: 39°4′51.3993′′ Lng: −8°27′12.0079′′ Hgt: +143.8

Figure 4.25: Board 2 navigation solution plot

Page 105: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.3. BOARD 3 RESULTS 91

0 0.005 0.01 0.015−3

−2

−1

0

1

2

3Time domain plot

Time (ms)

Am

plitu

de0 1 2 3 4 5 6 7 8

−15

−10

−5

0

5

10

Frequency (MHz)M

agni

tude

Frequency domain plot

−4 −2 0 2 40

0.5

1

1.5

2

2.5

x 105 Histogram

Bin

Num

ber

in b

in

Figure 4.26: Board 3 Probe data plot

first row shows the frequency domain plot of the sampled signal. In this figure the shape of

the filter can be seen and the shape is what is expected, a bandpass filter with 2 MHz with a

central frequency close to the IF frequency.

In the last row in the left, there is a plot in the time domain of the sampled signal. In

the right there is a histogram for the sampled signal. The histogram look like expected, an

approximation to a Gaussian function. In this plot the value -1 is a little higher than expected,

but in general looks like the expected value.

In the figure 4.27 the results for the acquisition are showed. In this plot the green bars

represent the acquired satellite signals. The height of the bars represent the ration between

the highest peak and the second highest peak, so the higher the bars the better. In this

acquisition 7 satellites are acquired with a good value in the acquisition results.

The figure 4.28 shows the tracking function plot for one of the signals. In this figure, in the

first row is possible to see that the I and Q plot are concentrated around two unique spot

close to the I axis. This is what is expected in this type of demodulation. The result of the

correlation must be higher for the prompt I correlator.

In this figure is also possible to see that the prompt value of correlation is bigger than the

late and early results of the correlators.

In plot for the code NCO and code error, the plot is close to expected. The value of the

code error does not diverge from 0. In the carrier NCO and code error, the plot is close to

Page 106: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

92 CHAPTER 4. RESULTS

0 5 10 15 20 25 300

1

2

3

4

5

6

7Acquisition results

PRN number (no bar − SV is not in the acquisition list)

Acq

uisi

tion

Met

ric

Not acquired signalsAcquired signals

Figure 4.27: Board 3 Acquisition plot

Figure 4.28: Board 3 tracking plot

Page 107: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.4. BOARD 4 SOLUTIONS 93

10 20 30 40 50 60 70−40

−30

−20

−10

0

10

20

Coordinates variations in UTM system

Measurement period: 500ms

Var

iatio

ns (

m)

−10 0 10

−10

−5

0

5

10

East (m)

Positions in UTM system (3D plot)

Nor

th (

m)

30

210

60

240

90270

120

300

150

330

180

001530456075

90

23

24

32

11

20 17

13

Sky plot (mean PDOP: 3.7319)

ENU

MeasurementsMean Position Lat: 39°4′51.3702′′ Lng: −8°27′11.8925′′ Hgt: +83.2

Figure 4.29: Board 3 navigation Solutions

expected. The value of the carrier error does not diverge from 0.

The figure 4.29 show the navigation solution for the board 3. In the first row, the results for

the navigation solution are plot in North, East and Up coordinates are plotted. The solution

in the North and East coordinates are close to the mean position. The variation in the solution

in the Up coordinate is bigger than the other coordinates variation. In the last row in the

left, the solution is plotted in the North and East coordinates. The solution in blue is close

to mean position in red. In the left of this row, the sky plot of the satellites is plotted.

4.4 Board 4 solutions

The figure 4.30 shows the plot of the probe data function. The shape of the IF filter comes is

plot the first row. The filter look like the expected, with 2 MHz bandwidth and centered on

the IF. In this figure is also a plot in the time domain the last row on the left. In the right,

there is a histogram of the sampled signal. This plot has the shape of the expected value, the

Gaussian function.

The figure 4.31 show the result for the acquisition. This plot shows that the acquisition is

Page 108: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

94 CHAPTER 4. RESULTS

0 0.005 0.01 0.015−3

−2

−1

0

1

2

3Time domain plot

Time (ms)

Am

plitu

de

0 1 2 3 4 5 6 7 8

−10

−5

0

5

10

15

Frequency (MHz)

Mag

nitu

de

Frequency domain plot

−4 −2 0 2 40

2

4

6

x 105 Histogram

Bin

Num

ber

in b

in

Figure 4.30: Board 4 Probe data plot

successful. There are 6 satellites acquired, this results are showed in green.

The figure 4.32 show the tracking results for one of the acquired satellites. In the first row on

the left, the I and Q prompt correlator values are plot. In this plot is visible the two distinct

group of values with almost all energy in the I sampled. In the right in the first row, the I

prompt correlator results is plot. The bits are clearly visible in this plot. The code plot in

the second row shows that the prompt code is almost always bigger than the late and early

code correlator value. The other plots in this figure show that the code error and the carrier

error shows do not diverge from 0.

The figure 4.33 shows the results for the navigation solution. The solution is showed in the

first row plot, the coordinates are in the Earth Center Earth Fixed. The North and East

coordinates, the solutions are close to the mean position. In the Up coordinate, the variation

is larger than in the others coordinates. In the last row the navigation solutions are plot in

the East and North coordinates. The mean position is showed in red and the other solutions

in blue. The solutions are close to the mean position. In the right of the last row, the plot of

the position of the satellites in the sky is showed.

Page 109: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.4. BOARD 4 SOLUTIONS 95

0 5 10 15 20 25 300

1

2

3

4

5

6

7

8Acquisition results

PRN number (no bar − SV is not in the acquisition list)

Acq

uisi

tion

Met

ric

Not acquired signalsAcquired signals

Figure 4.31: Board 4 Acquisition plot

Figure 4.32: Board 4 tracking plot

Page 110: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

96 CHAPTER 4. RESULTS

10 20 30 40 50 60 70−40

−30

−20

−10

0

10

20

30

40

Coordinates variations in UTM system

Measurement period: 500ms

Var

iatio

ns (

m)

−20 −10 0 10 20−20

−10

0

10

East (m)

Positions in UTM system (3D plot)

Nor

th (

m)

30

210

60

240

90270

120

300

150

330

180

0015

304560

75

90

7

2 8

4

26

5

Sky plot (mean PDOP: 4.0246)

ENU

MeasurementsMean Position Lat: 39°4′51.2355′′ Lng: −8°27′11.8009′′ Hgt: +90.2

Figure 4.33: Board 4 navigation Solutions

4.5 GLONASS Receiver

The results obtained with GLONASS Receiver were achieved utilizing a file which contains

samples from GLONASS signals. This file was download from the site http://www.gnss-sdr.ru.

The figure 4.34 shows the result for the acquisition of GLONASS satellites. The figure shows

the values for the acquisition, the acquisition satellites are represented by green bars. The

satellites not acquired are displayed in green. The channel 3, 4, 5, 9, 10 and 11 contains

signals for satellites.

The figure 4.35 shows information about the data contains in the samples file. In the first

rows, the frequency spectrum of the data is plotted. In the second row, the plot of the time

domain of the I channel and the Q channel. In the last row, the histogram for the I and Q

channel is plotted. The histogram for the two channels shows the expected envelope. The -1

and 1 value is expected the approximate double samples that the -3 and 3 bins.

The figure 4.36 shows the result of the tracking. The plot in the first shows the results from

the I and Q correlator. In the left side, the results are plotted in the I and Q. In the right

side, the I and Q are plot in relation to the time. The next line shows the value for the

Page 111: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.5. GLONASS RECEIVER 97

Figure 4.34: Plot for acquisition in GLONASS receiver

Figure 4.35: Probe Data in GLONASS receiver

Page 112: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

98 CHAPTER 4. RESULTS

Figure 4.36: Plot of the tracking results in the GLONASS receiver

discriminator of the PLL. The green line plot shows the values from the prompt correlators.

The red line shows the plot from the late correlators. The blue line plot shows the value of the

early correlators. The last line shows the plot for the filtered PLL discriminator, the values

from the DLL discriminator and the values from the filtered DLL discriminator.

The figure 4.37 shows the navigation solution in the GLONASS receiver. In the first line,

shows the evolution of the solution in time. These solutions are given in a form of Earth

Center Earth Fix. In this coordinate system the center of earth is the origin. The coordinates

are given in North, East and Up form. In this plot the variations from the mean value.

In the next line, the solutions are plotted in 3 Dimension and the mean value is showed. In

the right side, the position in the sky of the satellites is plotted.

Page 113: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

4.5. GLONASS RECEIVER 99

Figure 4.37: Plot of the navigation Solutions

Page 114: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

100 CHAPTER 4. RESULTS

Page 115: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 5

Conclusions

The goal of this work is to develop a software defined GPS receiver. To achieve this goal it was

necessary to develop a hardware platform to perform the reception, frequency conversion and

the analog to digital conversion of the different GNSS signals. Several prototype boards were

developed to make the analog front-end and the digital conversion. After this conversion, the

digital samples are transmitted to a PC.

The interface chosen for transmission of the data from the front-end to a PC was the USB2.0.

During the development of this work some problems arose with this interface because the

bandwidth is shared among devices. So the data rate was to be low to ensure that the data

is not lost. Different interface controllers have different throughputs.

After the data is transferred, it has to be processed. For this signal processing, some open

source programs were utilized. These programs process the data acquired from the analog

front-end and perform the acquisition and the tracking of the signals. These programs also

produce the navigation solutions.

The prototype boards developed show that is possible to acquire GNSS signals and, after

processing the data acquired, the signal can be tracked and a position solution can be ob-

tained using the signals acquired by the developed front-end. The results of this work also

demonstrate that the prototype boards have different levels of performance. These differences

can be explained by the different PCB layout and the technology utilized to make the PCB.

With a poor layout and with more noise in the board, the system performance degrades and

the results obtained are less precise.

This work also shows that there are several open source communaties that provide support

for the software defined radio and the software defined GNSS receivers. The programs from

101

Page 116: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

102 CHAPTER 5. CONCLUSIONS

the open source community are fully capable of producing navigation solutions.

The system developed has the flexibility to be reprogrammed and with a new antenna and

filters, the acquisition and tracking of GLONASS signals is possible. The acquisition and

tracking of the Galileo system does not require new algorithm, only small changes to accom-

modate the difference in the signal structure.

For future work, the program used to obtain the navigation solution can be made to work

in real-time. Also a weak signal processing can be implemented. There is a possibilitie to

implement a dual GNSS receiver. Utilizing two analog front-ends, two different GNSS can

be used to increase the availability of satellites in difficult environment and to increase the

precision and the accuracy of the navigation solution.

Page 117: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

Chapter 6

Annex

103

Page 118: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

104CHAPTER

6.

ANNEX

5

5

4

4

3

3

2

2

1

1

E E

D D

C C

B B

A A

VCC_D_IN

VDD_D

VCC_BUFF

IDL

E_

B

DATA

VCC_A

VCC_D_IN

VCC_D_IN

VCC_D_IN

VCC_IF

VCC_ADC

VCC_A VCC_VCO

VCC_VCO

VCC_A

VCC_RF

VCC_A

VCC_CP

VCC_A

VCC_TCXO

VCC_D

VCC_D

VCC_CP

CS_B

VCC_A

VCC_D_IN

VCC_RF

VC

C_

IF

S_

CL

K

VCC_ADC

CP_OUT

Q_OUT

SHDN_B

I_OUT

VCC_D_IN VCC_BUFF1

IDLE_B

SHDNB_IN

CS_B_IN

I1

SCLK_IN

Q1

Q0

LD_OUT

CLK

ID_EB_IN

D_IN

I-

I+

Q+

Q-

CLK_OUT

VCC_D

+5

-5

+5

+3

+5

-5

VDD_D

VDD_D

VCC_TCXO

+5

-5

VCC_BUFF

-5

+5

-5

-5

-5

+5

+5

VCC_BUFF

VCC_BUFF1

FILTER_IN

RF_LNA1_IN

VP5_IN

VN5_IN

LOCK_DET REF_IN

RF_LNA2_IN

I_OUT_ANA

Pin1

RSX-5 Xtal: Pin 1 to AC Coupling Cap. Others shorted to GND

Interposer Part # 9500-0019-2

Q_OUT_ANA

I-_OUT

I+_OUT

Q-_OUT

Q+_OUT

CLK_OUT

Note: R47, R48, R52, R54 are 0 ohms in Analog Mode,

OPEN

OPEN OPEN

OPEN

OPEN OPEN OPEN

OPEN

OPEN

OPEN

OPEN

OPENOPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPENOPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPEN

OPEN

MAXIMMAX2769 Evaluation Kit

REV 4A Sheet 1 of 1R47, R48, R52, R54 are OPEN in Digital Modes.

ANALOG VERSION

OPEN

OPEN

OPENOPEN

OPEN

C37

100n

C37

100n

R48 0R48 0

R27100kR27

100k

R44 0R44 0

R420KR420K

R71

0 ohm

R71

0 ohm

C180.1uC180.1u

C70

1uF

C70

1uF

R39 1kR39 1k

R1147.5R1147.5

C10

100p

C10

100p

+

C6110u

+

C6110u

1

23

45

J2J2

12

W10W10

R20100kR20100k

R37

1k

R37

1k

C1

0.1u

C1

0.1u

W5W5

C58

0.01u

C58

0.01u

C12

100p

C12

100p

C631uC631u

C4710pFC4710pF

R6

10K

R6

10K

3 1

2

W14W14

R600R600

1

23

45

J7J7

C25 10nC25 10n

R29100kR29

100k

C348pC348p

C280.47nC280.47n

3 4

5

1 6

2

T2

ADTT4-1

T2

ADTT4-1

C591uC591u

R15

47.5

R15

47.5

C55

0.1u

C55

0.1u

R40

1k

R40

1k

7OUT

8GND

J9DJ9D

R5

00

R5

00

R430R430

SHDN3

IN1

OUT5

BP4

GND2

U1

MAX8510EXK29+

U1

MAX8510EXK29+

C22

0.1u

C22

0.1u

C3

0.1u

C3

0.1u

C16

0.1u

C16

0.1u

C67100pC67100p

R12

75

R12

75

W2W2

C41100nC41

100n

R53 0R53 0

R1R1

L2 33nHL2 33nH

IN1

CG

22

CG

55

OUT4

G3

U11

SAFEB1G57KA0F00R1S

U11

SAFEB1G57KA0F00R1S

Y2

RSX-5

Y2

RSX-5

C29

10n

C29

10n

C42100nC42100n

R65 10KR65 10K

A1

TP10

LOCK_DET

TP10

LOCK_DET

1A1

1Y2

2A3

2Y4

3A5

3Y6

GND7

4Y8

4A9

5Y10

5A11

6Y12

6A13

VCC14

U23

SN74LV07ADR

U23

SN74LV07ADR

R70

10k

R70

10k

C65

10n

C65

10n

C3010nC3010n

R13

75

R13

75

C15 10nC15 10n

C69 6.8nC69 6.8n

C43100nC43100n

R19

75

R19

75

1

23

45

J10J10

R38200R38200

R59 0R59 0

C5 100pC5 100p

C60

1u

C60

1u

R510

R510

R33 0R33 0

A1

TP15

SHDNB

TP15

SHDNB

ANT_FLAG1

LNA_OUT2

ANT_BIAS3

VCC_RF4

MIX_IN5

LD6

7SHDNB D

AT

A8

CLK

9

CS

_B

10

VC

C_V

CO

11

CP

_O

UT

12

VC

C_C

P13

14

VC

C_

BU

FF

15REF/XTAL

16CLK_OUT

Q1_OUT17

Q0_OUT18

VDD_ADC19

I0_OUT20

21

I1_OUT

22

OU

T_

BY

P

VC

C_IF

23

/ID

LE

24

LN

A_N

225

PG

M26

LN

A_IN

127

TS

EN

S28

U21

MAX2769ETI+

U21

MAX2769ETI+

12

W19 JUW19 JU

C68 6.8nC68 6.8n

R62 10KR62 10K

W18W18

L3 12uL3 12u

A1 TP5

INPTP5INP

A1TP1

ANT_FLAG

TP1

ANT_FLAG

C27

10n

C27

10nC70.1u

C70.1u

1

23

45

J6J6

3 1

2W15W15

C54100nC54100n

R670R670

12

W20 JUW20 JU

R56 0R56 0

A1 TP3

CP_OUTTP3

CP_OUT

1A1

1Y2

2A3

2Y4

3A5

3Y6

GND7

4Y8

4A9

5Y10

5A11

6Y12

6A13

VCC14

U28SN74LV07ADR

U28SN74LV07ADR

IN1

CG

22

CG

55

OUT4

G3

U10SAFEB1G57KA0F00R1S

U10SAFEB1G57KA0F00R1S

31

2

W16W16

C338pC338p

R5

10K

R5

10K

C36

6.8n

C36

6.8n

R54

0

R54

0

R34 0R34 0

R16

22.1

R16

22.1

5OUT

6GND

J9CJ9C

R21 0R21 0

R61 10KR61 10K

3 4

5

1 6

2

T1

ADTT4-1

T1

ADTT4-1

A1TP11

VCOM_ADCTP11

VCOM_ADC

R22 0R22 0

C14

100p

C14

100p

C56

100p

C56

100p

VCC11

VCC22

IN-3

NC14

NC25

IN+6

VEE77

VEE88

EN9

REF10

VEE411

VEE312

VEE213

VEE114

OUT15

GND16

U18

MAX4444ESE+

U18

MAX4444ESE+

W8W8

R7

10

KR

71

0K

C57

0.01u

C57

0.01u

3 4

5

1 6

2

T3ADTT4-1

T3ADTT4-1

W1W1

C64

1u

C64

1u

1

23

45

J3J3

C17

0.1u

C17

0.1u

R10 0R10 0

C48 100nC48 100n

GND11

VCC4

GND22

OUT3

U8

IT3200B

U8

IT3200B

R420R420

C2427pC2427p

R2520kR2520k

R64 10KR64 10K

C11

100p

C11

100p

C44 100nC44 100n

R35200R35200

R69

10k

R69

10k

R520R520

R5

70

R5

70

W4W4

VCC11

VCC22

NC3

NC14

IN5

NC26

VEE57

VEE68

EN9

OUT+10

VEE411

VEE312

VEE213

VEE114

OUT-15

GND16

U14MAX4447ESE+

U14MAX4447ESE+

R660

R660

C53100nC53100n

R28100kR28100k

R58 0R58 0

C5110pF

C5110pF

R49 0R49 0

3 1

2

W13W13

C39 100nC39 100n

3 1

2

W23W23

3OUT

4GND

J9BJ9B

C31100pC31100pA

1TP2T_SEN

TP2T_SEN

R8

10

KR

81

0K

VCC11

VCC22

IN-3

NC14

NC25

IN+6

VEE77

VEE88

EN9

REF10

VEE411

VEE312

VEE213

VEE114

OUT15

GND16

U12MAX4444ESE+

U12MAX4444ESE+

R310R310

C4

0.1u

C4

0.1u

R47 0R47 0

R910KR910K

12

W12W12

R23 0R23 0

R41 1kR41 1k

C26 6.8nC26 6.8n

R170

R170

1

23

45

J11J11

R32 0R32 0

C23

0.1u

C23

0.1u

C40 100PC40 100P

C4610pF

C4610pF

1

23

45

J12J12

A1

TP4INNTP4INN

1313

2525

1212

2424

1111

2323

1010

2222

99

2121

88

2020

77

1919

66

1818

55

1717

44

1616

33

1515

22

1414

11

JDR1JDR1W6W6

C19

0.1u

C19

0.1u

W7W7

1

23

45

J8J8

R4

60

R4

60

R26

100k

R26

100k

R2 0R2 0

C2

0.1u

C2

0.1u

C45

100n

C45

100n

C21

100n

C21

100n

R5

50

R5

50

W28W28

R4

50

R4

50

C38 100nC38 100n

C328pC328p

C66 100nC66 100n

R2420kR2420k

R36200R36200

C50 0.1uC50 0.1u

1OUT

2GND

J9AJ9A

31

2

W17W17

C6

10u

C6

10u

12

W11W11

C8

100p

C8

100p

9OUT

10GND

J9EJ9E

W9W9

SHDN3

IN1

OUT5

BP4

GND2

U2

MAX8510EXK29+

U2

MAX8510EXK29+

+C6210u

+C6210u

C35

8p

C35

8p

C52

10pF

C52

10pF

R1447.5R1447.5

R63 10KR63 10K

C49

100n

C49

100n

R3

01

0K

R3

01

0K

C9

100p

C9

100p

1

23

45

J1J1

R68 0R68 0

R18 75R18 75

W3W3

Figu

re6.1:

Schem

aticfor

Evalu

ationKitof

MAX2769.

Page 119: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

1051

1

2

2

3

3

4

4

D D

C C

B B

A A

Title

Number RevisionSize

A4

Date: 10-04-2011 Sheet ofFile: C:\Users\..\GPS.SchDoc Drawn By:

100pFC19

0.1uFC18GND

VBUS

GND

0.01uFC4

2.2uF

C6

1uF

C7

VCC_A

VCC_D_IN

100pFC10

0.1uFC11GND

VCC_A

100pF

C13

0.1

uF

C12

GND

VCC_A

100pF

C15

0.1

uF

C14

GND

VCC_A

100pF

C17

0.1

uF

C16

GND

VCC_D_IN

100pFC21

0.1uFC20

GND

VCC_A

ANTFLAG

SHDN

GND

VCC_D_IN

100pF

C23

0.1

uF

C22

GND

15pFC24

IDL

E

LD

SD

AT

AS

CL

KC

S

100pF

C26

0.1

uF

C25

GND

33nH

L1

100pF

C27

LNAOUT

MIXIN

20K

R2

0.4

7nF

C28

27pF

C29

GND

LNAOUT MIXIN

0.47nFC30

GND GND

TS

EN

S

LNA1

LN

A2

0.4

7nF

C31

OE1

CLK11

D13

Q12

D24

Q25

D37

Q36

D48

Q49

D513

Q512

D614

Q615

D717

Q716

D818

Q819

VCC20

GND10

U6

SN74HC374

OE1

CLK11

D13

Q12

D24

Q25

D37

Q36

D48

Q49

D513

Q512

D614

Q615

D717

Q716

D818

Q819

VCC20

GND10

U5

SN74SN374

GND

GND

GND

VCC_S

VCC

VCC

VCC

GND

GND

GND

VCC

VCC

GND

VCC

VCC

OE11

A12

A23

A34

A45

A56

A67

A78

A89

GND10

Y811

Y712

Y613

Y514

Y415

Y316

Y217

Y118

OE219

VDD20

U7

SN74HC541GND

GND

I1I0

Q0

CLKOUTQ1

CLKOUTQ1Q0I1I0

100pFC34

0.1uFC35

GND

CLKOUT_B

RESET2

CLK1

QA3

QB4

QC5

QD6

GND7

VDD14

U9A SN74HC393

GND7

VCC14

A1

Y2

U8ASN74HC04

GND

GND7

VCC14

A3

Y4

U8BSN74HC04

CLKOUT/2

CLKOUT/2

CLKOUT/2

CLKOUT/2

D0D1D2D3

D4D5D6D7

D4D5D6D7

VCC_S100pFC36

0.1uFC37

GND

CLKOUT_B

Q1_BQ0_BI1_BI0_B

Q1_BQ0_BI1_BI0_B

Q1_BQ0_BI1_BI0_B

VCC_S

100pFC32

0.1uFC33GND

ANTFLAG1

LNAOUT2

ANTBIAS3

VCCRF4

MIXIN5

LD6

SHDN7

SD

AT

A8

SC

LK

9

CS

10

VC

CV

CO

11

CP

OU

T12

VC

CC

P13

VC

CD

14

XTAL15

CLKOUT16

Q117

Q018

VCCADC19

I020

I121

N.C

.22

VC

CIF

23

IDL

E24

LN

A2

25

PG

M26

LN

A1

27

TS

EN

S28

E.P

AD

.29

U1MAX2769

GND

CLKOUT/2

TXERXF

VCC

VCCSCLK

SDATADO

CSGPIOL1GPIOL0GPIOL3GPIOL2

GPIOH4

GPIOH5

GPIOH7SUSPEND

ONLY INSTALL CAP OR SAW

IDLESHDN

ANTFLAGLD

X1

Y2

P1

SMA

GND

P2SMA

GND

100pF

C39

0.1uF

C38VCC_S

GND

GND

GNDGNDVCC_SVCC_S

100pF

C41

0.1uF

C40

GND

RESET

VCC_S

VBUS

4K7R4

100KR5

Q1

PMOS-2

VCC

PWREN

PWREN

VCC_S

POWEN OR GPIOH ?

100pFC43

GND

RED_LED

D1

GREEN

VBUS

200

R7

GND

D2

RED

91

R8

GND

RED_LED

IN1

OUT5

2

CBYP4

ON/OFF3

GND

U2

LP2985AIM5-3.3

IN1

OUT5

2

CBYP4

ON/OFF3

GND

U3

LP2985AIM5-3.3

GND

GNDGNDVBUS

1uF

C1

GND

0.01uFC3

2.2uF

C5

VCC_D_IN

GND

GND

VCC

CT1

GND2

MR3

RESET4

VDD5

U10

TPS3836 S1

SW-PB

GND

GND1

IN2

GND3

GND4

OUT5

GND6

F1

SAW EPCOS

123

P3

Header 3

ANTBIAS

VBUS

ANTBIAS

GND7

VDD14

RESET12

CLK13

QA11

QB10

QC9

QD8

U9B

SN74HC393GND

GND7

VCC14

A5

Y6

U8C SN74HC04

GND7

VCC14

Y8

A9

U8DSN74HC04

GND7

VCC14

Y10

A11

U8ESN74HC04

GND7

VCC14

Y12

A13

U8FSN74HC04

GND

PWRSAV#

SIWUB

VCC_S

RD#

VCC_S

GPIOH1GPIOH0GPIOH3GPIOH2

GPIOH6

GN

D2

OU

T3

VC

C4

E/D

1

U4TCXO

V3V3CN2-1

GNDCN2-2

V3V3CN2-3

GNDCN2-4

V3V3CN2-5

GNDCN2-6

ADOCN2-7

RESETCN2-8

AD2CN2-9

AD1CN2-10

VIOCN2-11

AD3CN2-12

AD5CN2-13

AD4CN2-14

AD7CN2-15

AD6CN2-16

AC1CN2-17

AC0CN2-18

AC3CN2-19

AC2CN2-20

VIOCN2-21

AC4CN2-22

AC6CN2-23

AC5CN2-24

SUSPENDCN2-25

AC7CN2-26

VBUSCN3-1

GNDCN3-2

VCCCN3-3

GNDCN3-4

CSCN3-5

CLKCN3-6

DATACN3-7

PWRENCN3-8

BC7CN3-9

BC6CN3-10

BC5CN3-11

VIOCN3-12

BC4CN3-13

BC3CN3-14

BC2CN3-15

BC1CN3-16

BC0CN3-17

BD7CN3-18

BD6CN3-19

BD5CN3-20

BD4CN3-21

VIOCN3-22

BD3CN3-23

BD2CN3-24

BD1CN3-25

BD0CN3-26

M1

FT2232H_MINI_MODULE

GPS receiver

Filipe Coelho

Figu

re6.2:

Schem

aticfor

thesecon

dprototy

pe.

Page 120: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

106 CHAPTER 6. ANNEX

Figure 6.3: GNSS board 1 Power supply.

Page 121: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

107

Figure 6.4: GNSS board 1 USB interface.

Page 122: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

108 CHAPTER 6. ANNEX

Figure 6.5: GNSS board 1 Front end MAX2769.

Page 123: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

109

Figure 6.6: GNSS board 1 CPLD section.

Figure 6.7: GNSS board 1 Clock section.

Page 124: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

110 CHAPTER 6. ANNEX

Figure 6.8: GNSS board 2 Power supply.

Page 125: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

111

Figure 6.9: GNSS board 2 USB interface.

Page 126: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

112 CHAPTER 6. ANNEX

Figure 6.10: GNSS board 2 Front end MAX2769.

Page 127: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

113

Figure 6.11: GNSS board 2 CPLD section.

Page 128: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

114 CHAPTER 6. ANNEX

data_packer.vhd Tue Mar 22 21:37:43 2011

Page 1

1 ----------------------------------------------------------------------------------

2 -- Company: BMSTU

3 -- Engineer: Gavrilov A.

4 --

5 -- Create Date: 12:42:27 01/22/2010

6 -- Design Name:

7 -- Module Name: data_packer - Behavioral

8 -- Project Name:

9 -- Target Devices:

10 -- Tool versions:

11 -- Description: This module takes 4 bits as input. It collects during 4 clocks

input and then

12 -- outputs 16 bits. It also generates write strobe.

13 -- Dependencies:

14 --

15 -- Revision:

16 -- Revision 0.01 - File Created

17 -- Additional Comments:

18 --

19 ----------------------------------------------------------------------------------

20 library IEEE;

21 use IEEE.STD_LOGIC_1164.ALL;

22 use IEEE.STD_LOGIC_ARITH.ALL;

23 use IEEE.STD_LOGIC_UNSIGNED.ALL;

24

25 entity data_packer is

26 port ( clk : in STD_LOGIC; -- clock.

27 rst : in STD_LOGIC; -- reset.

28 di : in STD_LOGIC_VECTOR(3 downto 0); -- Data in bits

29 do : out STD_LOGIC_VECTOR (15 downto 0); -- Data out bits.

30 SLWR: out STD_LOGIC; -- Write strobe out.

31

32 FLAGA : in STD_LOGIC; -- Look at cy7c68013a documentation.

33 FLAGB : in STD_LOGIC; -- Look at cy7c68013a documentation.

34 FLAGC : in STD_LOGIC; -- Look at cy7c68013a documentation.

35 IFCLK : in STD_LOGIC; -- Look at cy7c68013a documentation.

36 CLK0 : in STD_LOGIC; -- Look at cy7c68013a documentation.

37

38 SLRD : out STD_LOGIC; -- Look at cy7c68013a documentation.

39

40 AntFlag_in : in STD_LOGIC; -- Look at MAX2769 documentation.

41 LD_in : in STD_LOGIC; -- Look at MAX2769 documentation.

42 AntFlag_out : out STD_LOGIC; -- output signal for LED.

43 LD_out : out STD_LOGIC; -- output signal for LED.

44

45 ref_clk_sel : in STD_LOGIC; -- Select signal for clock source

for MAX2769.

46 ext_freq_dsbl : out STD_LOGIC; -- Control signal for clock buffer

amplifier.

47 TCXO_dsbl : out STD_LOGIC; -- Control signal for clock buffer

amplifier.

48

49 err_out : out STD_LOGIC); -- Just another LED.

50 end data_packer;

51

52 architecture synth of data_packer is

53 type state_type is (rcv1, rcv2, rcv3, rcv4, rcv5, rcv6, rcv7, rcv8); --FSM

Figure 6.12: Page 1 of CPLD VHDL code.

Page 129: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

115

data_packer.vhd Tue Mar 22 21:37:43 2011

Page 2

states.

54 signal state_reg: state_type := rcv1;

55 signal state_next: state_type; --FSM.

56 signal delay_line_reg, delay_line_next: STD_LOGIC_VECTOR(13 downto 0) := (others=>

'0'); -- Delay line.

57 signal data_out_reg, data_out_next: STD_LOGIC_VECTOR(15 downto 0) := (others=>'0');

-- register for output signal.

58 begin

59

60 process (clk)

61 begin

62 if (clk'event and clk = '1') then

63 state_reg <= state_next;

64 delay_line_reg <= delay_line_next;

65 data_out_reg <= data_out_next;

66 end if;

67 end process;

68

69 --Next-state logic.

70 --process(state_reg, delay_line_reg, data_out_reg, di)

71 process(state_reg, di)

72 begin

73 state_next <= state_reg;

74 delay_line_next <= delay_line_reg;

75 data_out_next <= data_out_reg;

76

77 case state_reg is

78

79

80 when rcv1 =>

81 state_next <= rcv2;

82 --delay_line_next(13 downto 12) <= di(1 downto 0);

83 delay_line_next(1 downto 0) <= di(1 downto 0);

84 SLWR <= '0';

85

86 when rcv2 =>

87 state_next <= rcv3;

88 --delay_line_next(11 downto 10) <= di(1 downto 0);

89 delay_line_next(3 downto 2) <= di(1 downto 0);

90 SLWR <= '1';

91

92 when rcv3 =>

93 state_next <= rcv4;

94 --delay_line_next(9 downto 8) <= di(1 downto 0);

95 delay_line_next(5 downto 4) <= di(1 downto 0);

96 SLWR <= '1';

97

98 when rcv4 =>

99 state_next <= rcv5;

100 --delay_line_next(7 downto 6) <= di(1 downto 0);

101 delay_line_next(7 downto 6) <= di(1 downto 0);

102 SLWR <= '1';

103

104 when rcv5 =>

105 state_next <= rcv6;

106 --delay_line_next(5 downto 4) <= di(1 downto 0);

107 delay_line_next(9 downto 8) <= di(1 downto 0);

Figure 6.13: Page 2 of CPLD VHDL code.

Page 130: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

116 CHAPTER 6. ANNEX

data_packer.vhd Tue Mar 22 21:37:43 2011

Page 3

108 SLWR <= '1';

109

110 when rcv6 =>

111 state_next <= rcv7;

112 --delay_line_next(3 downto 2) <= di(1 downto 0);

113 delay_line_next(11 downto 10) <= di(1 downto 0);

114 SLWR <= '0';

115

116 when rcv7 =>

117 state_next <= rcv8;

118 --delay_line_next(1 downto 0) <= di(1 downto 0);

119 delay_line_next(13 downto 12) <= di(1 downto 0);

120 SLWR <= '0';

121

122 when rcv8 =>

123 state_next <= rcv1;

124 --data_out_next <= delay_line_reg & di(1 downto 0);

125 data_out_next <= di(1 downto 0) & delay_line_reg;

126 SLWR <= '0';

127

128 end case;

129

130 end process;

131

132 do <= data_out_reg;

133 -- SLWR <= clk;

134

135 SLRD <= '0';

136 AntFlag_out <= '0';

137 LD_out <= '0';

138 ext_freq_dsbl <= '0';

139 TCXO_dsbl <= '0';

140

141

142 -- AntFlag_out <= AntFlag_in;

143 -- LD_out <= LD_in;

144

145 -- TCXO_dsbl <= '1' when ref_clk_sel = '0' else '0';

146 -- ext_freq_dsbl <= '0' when ref_clk_sel = '0' else '1';

147

148 -- SLRD <= '0';

149

150

151 end synth;

152

153

Figure 6.14: Page 3 of CPLD VHDL code.

Page 131: Software Defined GPS/Galileo Receiver - Técnico Lisboa · PDF fileA thesis submitted to the Department of Electrotechnical Engineering ... 6.12 Page 1 of CPLD VHDL code ... RF Radio

References

[1] European Space Agency. GIOVE-A+B Public SIS ICD. 2008.

[2] Jan Axelson. USB Complete, The Developer’s Guide. Lakeview Research LLC, Madison,

2009.

[3] Kai Borre. A software-defined GPS and Galileo receiver. Birkh¨auser, 2007.

[4] S. Esterhuizen. The design, construction, and testing of a modular gps bistatic radar

software receiver for small platforms. Master’s thesis, University of Colorado, 2004.

[5] FTDI. FT2232H datasheet. 2010.

[6] Clifford Kelley. Open source gps. http://home.earthlink.net/ cwkelley/, 2004.

[7] MathWorks. Matlab documentation. http://www.mathworks.com/help/techdoc/, 2010.

[8] MAXIM. MAX2769 datasheet. 2010.

[9] NAVSTAR. GPS Interface Control Document. 2008.

[10] Russian Institute of Space Device Engineering. GLONASS: Interface Control Document

(Edition 5.1). 2008.

[11] Oppenheim and Wilsky. Signals And Systems - 2nd Ed.-. 1996.

[12] Cypress Semiconductors. FX2LP-CY7C68013A datasheet. 2011.

[13] James Bao-Yen. Tsui. Fundamentals of Global Positioning System Receivers: A Software

Approach. John Wiley and Sons, Inc., New York, 2000.

[14] European Union and European Space Agency. Galileo Interface Control Document. 2010.

117