You are on page 1of 9

Journal of Network and Computer Applications 35 (2012) 1352–1360

Contents lists available at SciVerse ScienceDirect

Journal of Network and Computer Applications


journal homepage: www.elsevier.com/locate/jnca

Software-defined GPS receiver on USRP-platform


Elizabeth A. Thompson a,n, Nathan Clem a, Isaac Renninger a, Timothy Loos b
a
Department of Engineering, Purdue University, Ft. Wayne, 2101 E. Coliseum Blvd., Fort Wayne, IN 46805-1499, USA
b
Raytheon Company, 1010 Production Road, Fort Wayne, IN 46808, USA

a r t i c l e i n f o a b s t r a c t

Article history: A non-real-time GPS software-defined radio was designed, built, and tested using the Universal
Received 17 July 2011 Software Radio Peripheral (USRP) platform. A hardware front-end to receive the GPS signal and
Received in revised form downconvert it to an intermediate frequency was also implemented. Subsequently, the system was
29 November 2011
used to acquire and process real GPS data to demonstrate the capability of the design.
Accepted 25 January 2012
& 2012 Elsevier Ltd. All rights reserved.
Available online 1 February 2012

Keywords:
GPS software-defined radio
USRP
Hardware implementation
GNU radio software
Linux (Ubuntu) platform
Acquisition and tracking of satellites

1. Introduction For each of the GPS satellites, the C/A code and a Navigation
Message are modulated on the L1 and L2 carriers using binary
1.1. GPS signal phase shift keying (BPSK), creating a spread spectrum signal. The
Navigation Message is transmitted at a rate of 50 bits per second
The Global Positioning System (GPS) consists of 24 to 32 (bps). Its basic format is a 1500-bit long frame containing 5 sub-
satellites (Global Positioning System, 2010). Each GPS satellite frames, each of 300 bits length. Subframes 1, 2, and 3 are identical
transmits a unique navigational signal centered on two L-band in each frame. Subframes 4 and 5 have 25 versions with the same
frequencies in the microwave region of the electromagnetic spec- structure, but different data, referred to as pages 1 to 25. The
trum: L1 at 1575.42 MHz and L2 at 1227.60 MHz (Rizos 1999). The transmission of a subframe lasts 6 s, one frame lasts 30 s, and one
L2 signal is reserved for military use and is not available to the entire Navigation Message consisting of 25 frames lasts 12.5 min
general public. GPS systems utilize Code Division Multiple Access (Borre et al., 2007). The first 8 bits in each subframe are used for
(CDMA) spread spectrum transmission. Unlike Frequency Division frame synchronization. Subframe 1 contains satellite clock and
Multiple Access (FDMA) in which each user is allocated a portion of health data, subframes 2 and 3 contain satellite ephemeris data
the spectrum for all of the time, CDMA allows every communicator which are required to compute satellite position, and subframes
access to the entire spectrum all the time, and multiple simulta- 4 and 5 contain almanac data.
neous transmissions are separated using coding theory, i.e., each The L1 carrier is also modulated with a private (P) code which is
station is assigned a unique chip sequence. To transmit a 1 bit, a reserved for military use. The C/A and P codes are generated as
station sends its chip sequence. To transmit a 0 bit, it sends the one’s pseudorandom noise and are thus referred to as PRN codes. The
complement of its chip sequence. No other patterns are permitted bandwidth of the spread spectrum signal is 2.046 MHz for the C/A
(Saha, 2010). In the GPS constellation, the unique chip sequence is code and 20.46 MHz for the main frequency band of the P code
called the coarse/acquisition (C/A) code, and each GPS satellite is (Rizos, 1999).
assigned a unique C/A code, consisting of 1023 chips. The C/A codes The goal of spread spectrum systems such as CDMA is to
are generated at the rate of 1.023 million chips per second; hence, decrease the transmitted spectral density to an extent that it is
the entire C/A code sequence repeats every millisecond (Rizos, 1999) well below the thermal noise level of an unfriendly receiver
(Stremler, 1992). Thus, the signal transmitted from each of the
GPS satellites is transmitted with enough power to ensure a
n
Corresponding author. Tel.: þ1 260 481 6361; fax: þ1 260 481 5734. minimum signal power level of 160 dBW or equivalently,
E-mail addresses: thompson@engr.ipfw.edu (E.A. Thompson),
 130 dBm at the earth’s surface (Rizos, 1999).
clemnj@ymail.com (N. Clem), isaacren1985@yahoo.com (I. Renninger),
Timothy_S_Loos@raytheon.com (T. Loos). Traditional hard-wired GPS receivers typically contain Application
URL: http://www.etcs.ipfw.edu/~thompson (E.A. Thompson). Specific Integrated Circuits (ASIC) or Field Programmable Gate Arrays

1084-8045/$ - see front matter & 2012 Elsevier Ltd. All rights reserved.
doi:10.1016/j.jnca.2012.01.020
E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360 1353

(FPGA) and are generally application specific. In contrast, a Software- In contrast, real-time processing is considerably more complex on
Defined Radio (SDR) offers flexibility in mode, operating band, and an Intel processor, requiring the use of SIMD instructions.
functionality. Use of a software receiver allows fundamental changes Disadvantages of non-real-time processing include the increased
in the receiver structure to be made solely through programm- time required to copy files and process the waveforms, as well as the
ing, without hardware redesign. Therefore, software defined GPS increased storage capacity required.
receivers are becoming increasingly attractive over their hardware
counterparts.
2. Objectives
1.2. Software-defined radio for GPS
For research and teaching purposes, a non-real-time software-
SDR is a rapidly evolving technology that is getting enormous defined GPS receiver was designed, built, and tested using the
recognition and is generating widespread interest in the receiver USRP SDR platform in conjunction with GNU Radio software and
industry (Borre et al., 2007). The receiver employs a wideband run on the Linux (Ubuntu) platform. A hardware front-end to
analog-to-digital converter (ADC) that captures all channels of the interface with the USRP was also designed and implemented. This
software radio node. The SDR receiver then extracts, downcon- paper describes the details of this implementation and testing.
verts, and demodulates the channel waveform using software on The purpose of this paper is to demonstrate how the USRP can be
a general purpose processor (Borre et al., 2007). Applying the used to realize software-defined GPS receivers.
software radio approach to GPS receivers was first proposed by
Akos (1997). Since then numerous variations have been reported.
Heckler and Garrison (2004) described a software defined GPS 3. Methodology
receiver developed at Purdue University for research and teaching
purposes that can be used in either real- or non-real time mode. Figure 1 shows the block diagram of the GPS software receiver;
Subsequently, they described how the use of single instruction Table 1 provides an itemized description of each of the components
multiple data (SIMD) operations on x86 processors could be used in this diagram. Figure 2 shows the rooftop antenna installation.
to achieve real-time performance in software-defined GPS recei- Figure 3 displays the laboratory GPS receiver setup. The hardware
vers (Heckler and Garrison, 2006). Sharawi and Korniyenko front-end is described in Section 3.1, the USRP in Section 3.2, and the
(2007) designed a non-real time GPS software receiver with an software in Section 3.3. Upon completion of the building process, the
RF front-end, downconversion to an intermediate frequency (IF) system was tested for its ability to acquire location information, as
and subsequent digitization using an analog-to-digital converter described in Section 4. Sections 4.1 and 4.2 describe the subsequent
(ADC). Lim et al. (2005) proposed the use of a pattern look-up calculation of the system gain and system SNR. The theoretical SNR
table of correlation values to reduce the computational load in the was then compared to the measured value for various quantization
software-defined GPS receiver. Pini et al. (2008) exploited the levels, as described in Section 4.3. Finally, lessons learned and
capabilities of an SDR GPS receiver to evaluate the performance of generalizations are summarized in the conclusions.
three different estimators of carrier power to noise power spectral
density. 3.1. Hardware front-end

1.3. USRP The GPSRSSMA antenna was used to capture the 1.57542 GHz
L1 GPS signal. This antenna has a voltage standing wave ratio
The Universal Software Radio Peripheral (USRP) has been used (VWSR) of 1.5:1, bandwidth of 75 MHz, and 50 O impedance. To
as the basis of numerous SDRs. Tucker and Tagliarini (2009) minimize transmission line losses in the relatively large distance
described several SDR applications such as radio scanners that between the antenna and other components in the system, an
can be implemented with USRP. Tong et al. (2009) discussed the active antenna, i.e., one with a built-in amplifier, was used. As
use of USRP for developing a software based wireless transmis- indicated in Table 1, this built-in amplifier was a 28 dB gain low
sion system that they used to test new algorithms. Wenmiao noise amplifier (LNA). As noted in the block diagram of Fig. 1, in
(2009) employed USRP to develop a cognitive radio to be used to addition to the LNA built into the antenna, an additional external
transmit and receive incompatible radio standards. Marwanto amplifier/bandpass filter was used to assist in overcoming the
et al. (2009) incorporated USRP to transmit and receive the OFDM high cable losses experienced at 1.57542 GHz. This was a 58529A
radio signal with QPSK and BPSK modulation and to evaluate the amplifier with L1 bandpass filter, which is also an active device
performance of each. Zhang et al. (2010) implemented and that is designed to be installed close to the antenna for best
evaluated cooperative communication schemes using USRP as system performance. The data sheet for the device indicates that
an alternative to simulation. Berizzi et al. (2010) demonstrated it typically provides 20 dB gain in situations where the GPS
that USRP can be used for realizing passive radars. Palmer et al. receiver and antenna are separated by large distances (up to
(2009) used USRP to investigate non-GPS navigation technologies approximately 790 feet). Thus, both the GPSRSSMA antenna and
to track the location of a receiver in the absence of GPS signals. the 58529A amplifier/bandpass filter were installed on the roof of
However, to our knowledge there are no published papers on the a building, and the 58529A was connected to the antenna via a
use of USRP to implement a software-defined GPS receiver. SM4217 adapter. The 58529A amplifier/bandpass filter was then
connected to a microwave LMR400UF coax cable, of length 50
1.4. Real-time vs. non-real time processing feet, which extended through the roof to a laboratory on the third
(and top) floor of the building. The 50 O impedance of the
There are many applications in which real-time processing of LMR400UF coax cable matched that of the antenna. Since both
GPS signals is necessary. However, to compare the performance of the GPSRSSMA antenna and the 58529A amplifier/bandpass filter
alternative algorithms, a non-real time platform is perhaps more are active devices, they require DC power to operate. The SB3500
advantageous, for several reasons. For the latter, the speed of the bias tee was used for this purpose. It is a three port network used
processor is not an issue since the data must only be saved to a to supply the DC bias while passing the radio frequency (RF)
file for postprocessing. In addition, in non-real-time applications, components with minimal attenuation. The SB3500 is designed to
MATLAB can be used for the signal acquisition and processing. operate in the range 700–2700 MHz and has the requisite 50 O for
1354 E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360

Active Antenna
(GPSRSSMA)

Amp/BPF
(58529A)

Roof
Lab

Power Supply
(Heath2718)

Evaluation Board USRP1


Bias T Down Desktop
(SB3500) Converter RFX900 Computer
(MAX2682)

Local Oscillator
(Macroni 2022A)

Fig. 1. GPS software-defined radio block diagram.

Table 1
Hardware components of the GPS software-defined receiver.

Part Description Supplier

Antenna GPSRSSMA active antenna GPSAntennas.com


with 28 dB gain low noise
amplifier (LNA)
Adapter SM4217 adapter to connect Fairview microwave
antenna to Amp
Amplifier/BP filter 58529A amplifier with L1 Symmetricom
bandpass filter
Coax Cable LMR400UF Coax Cable to
connect amplifier to bias-T
Bias tee SB3500 Fairview microwave
4.5 V power supply Heath 2718 Tri-power Heathkit
supply educational systems
Adapter SM4215 adapter to connect Fairview microwave
Fig. 2. GPS rooftop antenna installation.
bias-T to Coax
Coax Cable S6001 RG-174 Coax Cable to Pro link LLC
connect bias-T to eval board
tee to a S6001 RG-174 coax cable which in turn was connected to
and eval board to USRP
Down converter MAX2682KIT evaluation Maxim the RF input of the MAX2682KIT Evaluation Board. The MAX2682-
board KIT Evaluation Kit contains the MAX2682 downconverter as well
Coax Cable S60301 RG-174 Coax Cable Pro link LLC as all the necessary interface circuitry for ease of use. It interfaces
to connect down converter to RF signal inputs and outputs via three subminiature version
to oscillator
Oscillator 2022A function generator Marconi
A (SMA) connectors. It has six connections for inputs and outputs:
tuned to 660.42 MHz instruments LO, GND, RF, IFOUT, VCC, and SHDN. The Heath 2718 Tri-Power
USRP SDR platform Ettus research supply was used to supply 4.5 V DC to the evaluation board. The
Daughterboard RFX900 Marconi 2022A signal generator was tuned to 660.42 MHz for use
750–1050 MHz Ettus research
as the local oscillator (LO) and connected to the LO input of the
PC Dell GX280 P4, 3.6 GHz, Dell
1 GB RAM, 40 GB drive MAX2682KIT via an S60301 RG-174 coax cable. The IFOUT SMA
connector of the MAX2682KIT Evaluation Kit was connected to
the RF 1 input of the USRP via an S6001 RG-174 coax cable. The
use of 660.42 MHz for the LO resulted in downconversion of the
impedance matching. In the laboratory, the LMR400UF coax cable GPS signal to an intermediate frequency (IF) of 915 MHz.
was connected to the RF/DC type N female connector of the
SB3500 bias tee. The Heath 2718 Tri-Power supply was connected 3.2. USRP
to the BNC female connector of the bias tee, to supply 4.5 V DC to
the antenna and 58529A amplifier/filter. The third port of the bias The USRP is a hardware platform which when interfaced to a
tee, an RF type N male connector, provided the outlet for the GPS host computer via USB 2.0 port may be used to create a real-time
signal. A SM4215 adapter was used to connect this port of the bias SDR utilizing open-source GNU radio software (Ettus Research
E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360 1355

Linux
Coax going up to
Desktop
AMP/BPF and Antenna

Power Signal spectrum


Supply Generator Analyzer

Bias Tee Down Converter USRP

Fig. 3. Laboratory GPS receiver setup.

LLC, 2010). It is a motherboard which contains a Field Programmable Mac OS X, and NetBSD operating systems. Ubuntu 9.04 is a Linux-
Gate Array (FPGA) for high-speed signal processing, 4 high-speed based operating system that was used for running GNU Radio in this
analog-to-digital converters (ADC), 4 high-speed digital-to-analog project. It was initially downloaded from (Ubuntu 9.04 Live USB
converters (DAC), and auxiliary analog and digital input/output (IO) Persistent, 2010) with the intent of running it off a USB flash drive.
ports. An AC-to-DC adapter supplies its required 5 V DC power. Plug- However, the excessive rate of data transfer pushed the flash drive
in daughterboards allow the USRP to operate in various RF bands beyond its limits, and Ubuntu 9.04 was installed instead as the sole
and turn a USRP motherboard into a complete RF transceiver operating system on the computer. GNU Radio Companion was then
system. The RFX900 is a transceiver daughterboard with a frequency downloaded and installed from (Debian Package Repository for GNU
range 750–1050 MHz. In the present design, due to availability, the Radio, 2010). The GNU Radio application file usrp_rx_cfile.py was
RFX900 daughterboard was used, and the USRP was connected used to capture the data and perform digital down conversion. It
to the Dell PC via a USB 2.0 interface. Alternatively, the RFX1800 was used to read samples from the USRP and write them to a file
transceiver daughterboard, which has a frequency range 1.5–2.1 GHz, formatted as binary outputs single precision complex short values,
could have been used, thus eliminating the need for downconversion which consisted of 16-bit signed short I values interleaved with
to an intermediate frequency by the MAX2682 as well as the 16-bit signed short Q values. In the Ubuntu terminal window, this
corresponding local oscillator. Another possibility is the WBX trans- function was invoked with the proper command line options to
ceiver, which operates in the 50 MHz–2.2 GHz range, but will not specify 16-bit capture with a RFX900 daughterboard, gain of 40 dB, a
work with USRP with a serial number below 500. The USRP digitized, center frequency of 915 MHz, a decimation rate of 16, and 160
at a sampling rate of 64 MHz, the incoming analog GPS signal that million samples to be captured (40 s of signal). The decimation rate
had been downconverted to 915 MHz by the MAX2682. of 16 results in 4 MHz complex sample rate, which was adequate to
The full range signal power input on the ADCs of the USRP is avoid aliasing of the baseband GPS L1 signal. The resulting binary
40 mW (16 dBm) (Shen, 2005). There is a programmable gain file was of size 640 MB. The number of samples acquired was based
amplifier (PGA) before the ADCs to amplify weak input signals. on the necessity to capture at least 37 s of the waveform, which
The RFX900 daughterboard has a programmable gain between ensures that all 5 subframes of the waveform (6 s each) are captured
0 and 90 dB. Each daughterboard has access to 2 of the 4 high- and allows dropping the initial 1000 ms for transients.
speed ADCs and 2 of the DACs. This allows each daughterboard Once this binary file was acquired, it was transferred to a second
2 independent RF sections if real sampling is used and a single computer that was equipped with Windows XP operating system and
RF section if complex in-phase/quadrature (IQ) sampling is used MATLAB version 7.8.0.347 (R2009a), to perform some additional
(Shen 2005). processing and GPS position processing. The MATLAB software
The FPGA on the USRP performs digital down conversion from IF provided with Borre et al. (2007) was used to generate the location
to baseband, followed by low pass filtering, and downsampling to a information. However, preprocessing had to be accomplished to get
data rate which can be transmitted over USB 2.0 (Shen, 2005). The the data into the proper format for that code. The output signal from
digital down converter (DDC) on the FPGA has two inputs—in-phase the USRP is a baseband complex signal with 16 bit I values interlaced
(I) and quadrature (Q). The output of the ADCs can be routed, under with 16-bit Q, but the MATLAB software provided by Borre et al.
software control, to either the I or the Q inputs of any of the 4 DDCs. (2007) assumes an 8-bit real signal at an intermediate frequency.
All samples sent over the USB interface are 16-bit signed integers in Thus, prior to implementing the code of Borre et al. (2007), the
IQ (complex) format—i.e., 16 bit in-phase (I) interleaved with 16-bit raw USRP signal was digitally lowpass filtered, upconverted to an
quadrature (Q) data (Shen, 2005). intermediate frequency, and converted to 8-bit real signed bytes.
The lowpass filtering was accomplished using SoX software because
3.3. Software the file was too large for MATLAB. The SoX program was used to
filter the USRP raw output signal by applying a finite impulse
GNU Radio is a free software development toolkit that provides response (FIR) filter designed in MATLAB, as explained below.
signal processing to implement SDRs using off-the-shelf RF hard-
ware (GNU Radio, 2010). GNU Radio applications are primarily
written using the Python programming language, while the perfor- 3.3.1. SoX
mance-critical signal processing tasks are implemented in Cþþ (GNU Sound eXchange, abbreviated SoX, is a free cross-platform
Radio, 2010). GNU Radio is available for use with Linux, Windows, (Windows, Linux, MacOS X, etc.) digital audio editor, licensed under
1356 E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360

the GNU General Public License, and distributed by Chris Bagwell 3.3.2. MATLAB preprocessing
through SourceForge.net (SoX, 2010). For this project, SoX version The filtered output from the SoX program was fed to a MATLAB
14.3.0 was used. program that read in the 16-bit signed integer filtered basedband
A finite impulse response (FIR) Equiripple lowpass filter with a values, extracted the interlaced I and Q portions, and performed a
normalized cutoff frequency of 0.20, a normalized stopband fre- digital upconversion to an arbitrarily selected intermediate fre-
quency of 0.25, and 50 dB attenuation in the stopband was designed quency of 1 MHz per Eq. (1).
using the FDATool in MATLAB. Its frequency response is provided in    
2pnf m 2pnf m
Fig. 4. The resulting 85 filter coefficients were saved in a text file. y ¼ IUcos Q Usin ð1Þ
fs fs
Subsequently, a batch file was created to invoke SoX to filter the raw
USRP signal using these filter coefficients. This batch file was Here, I is the in-phase component, Q is the quadrature compo-
executed from the DOS prompt, which was accessed by opening a nent, fm ¼ 1 MHz, and fs ¼4 MHz. This fs/4 up-conversion allows
command window after selecting Run from the Start menu. SoX the I multiplication coefficients to be [1, 0, 1, 0, y] and the Q
treated the complex I and Q interleaved samples as a stereo audio components to be [0, 1, 0 1, 0 y] This MATLAB program then
stream, which treats the samples from left and right speakers as wrote the real values resulting from Eq. (1) to a binary file as 8-bit
interleaved in the same manner. signed integers.
Subsequently, the data type, intermediate frequency, and
sampling frequency in the initSettings.m file included in the
50 MATLAB software provided by Borre et al. (2007) were modified
as follows

settings.dataType¼‘int8’;
0 settings.IF¼ 1.0e6;
settings.samplingFreq¼4.0e6;
Magnitude (dB)

Finally, the init.m file in the Borre et al. (2007) software was
-50 invoked to find the GPS location information.

3.3.3. Navigation solution


The software receiver provided in Borre et al. (2007) performs
-100
acquisition and tracking of satellites, determination of the phase
transition of the navigation data, and demodulation and decoding
of the navigation signal to determine the position of the satellite.
The satellites are differentiated by 32 different PRN codes. The
-150
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 code phase is the time alignment of the PRN code in the block of
Frequency (Hz) x 10 6 data being processed. Since the C/A code is of length 1023, the code
phase can vary between 0 and 1022, and all these values must be
Fig. 4. Magnitude of FIR filter frequency response designed in MATLAB. tested to find the phase that produces the exact alignment with the

Fig. 5. Sample GPS output.


E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360 1357

incoming code. Successful satellite acquisition occurs when there is histogram resembles a Gaussian distribution that would be
high correlation between the locally generated PRN code and the expected for random noise.
incoming code from the satellite Borre et al. (2007). Figure 6 provides a sample display of the acquisition metrics
To demodulate the signal, the carrier frequency must be for each possible satellite using an FFT-based parallel acquisition
known. If the GPS signal has been downconverted in hardware, scheme. The acquisition metric is the ratio of the peak in the FFT
this corresponds to the IF. However, the actual frequency can profile to the next highest level in the FFT. A satellite is declared
deviate from this value up to 710 kHz, due to Doppler shift to be detected when this ratio exceeds a fixed threshold. In Fig. 6,
(Borre et al., 2007). Thus, all frequencies within 710 kHz of the the acquired signals are displayed in green.
carrier or IF must be searched in increments of 500 Hz. Figure 7 is a sample plot for one satellite of the tracking
An example of the Borre et al. (2007) output is provided in algorithm output. The upper left hand display is a Time Scatter
Fig. 5, which shows the time domain, frequency domain, and Plot of the in-phase (I prompt) and quadrature (Q prompt) output
histogram of a 20 ms portion of the received data. Note that the of the Costas loop used to track the carrier. Note the clusters
around þ1 and  1 for the in-phase signal. This is the resultant
50 bps GPS information. A time plot of the raw I prompt output is
given in the upper right hand graph, consisting of the ‘‘Bits of the
navigation message’’. The middle left plot is the raw output of the
Costas discriminator error output. The bottom left plot is this
signal after passing thru the Costa Loop filter, used to drive the
Costas loop NCO.
The right middle plot of Fig. 7 shows the magnitude outputs
formed by the magnitude of the in-phase and quadrature signal
output of the de-spreader for early, late and prompt times for a
delay-lock loop (DLL), used to time track the navigation informa-
tion. As expected, the prompt magnitude is higher than the early
and late offsets. The bottom middle and bottom right plots are the
raw DDL discriminator and filtered DDL discriminator time wave-
forms, respectively. Note Fig. 7 displays the entire 37 s of the
captured GPS waveform. The initial signal acquisition transients
are evident at the beginning of the signals.

4. Results and discussion

The location coordinates resulting from 10 trials of executing


Fig. 6. Acquired/not acquired satellites. (For interpretation of the references to the modified MATLAB software are provided in Table 2 and are
colour in this figure, the reader is referred to the web version of this article.) plotted in Fig. 8. In Fig. 8, results of each of the 10 trials are

Fig. 7. Tracking results for a single satellite.


1358 E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360

Table 2
GPS location results for 10 trials.

Test run Latitude (Time) Longitude (Time) Latitude (Decimal) Longitude (Decimal)

1 411 60 56.531200  851 60 34.376700 41.115703  85.109549


2 411 60 56.582200  851 60 34.341500 41.115717  85.109539
3 411 60 56.670700  851 60 34.811200 41.115742  85.109670
4 411 60 56.327800  851 60 34.671100 41.115647  85.109631
5 411 60 56.650400  851 60 34.249600 41.115736  85.109514
6 411 60 56.637000  851 60 34.228600 41.115733  85.109508
7 411 60 56.794500  851 60 34.574600 41.115776  85.109604
8 411 60 56.348800  851 60 33.272000 41.115652  85.109242
9 411 60 56.521300  851 60 34.037300 41.115700  85.109455
10 411 60 56.837800  851 60 35.022800 41.115788  85.109729

Actual location 41.115817  85.109572


Average 41.1157194  85.1095441
Standard deviation 4.39504E-05 0.000127531
Distance between average and actual location 2.5 m

Table 3
Gain for each component in the system*.

Component Gain (dB)

Active antenna 28.0


58529A Amp/BPF 25.0
LMR400UF Coax Cable  3.2
Bias tee  0.2
S6001 RG-174 Coax Cable  0.3
Downconverter 0
S60301 RG-174 coax cable  0.3
USRP 40.0

n
All components have an impedance of 50 O.

The processing gain, Gp, due to spectrum spreading can be


calculated using Eq. (3) (Maxim, 2010),
 
chip rate
Gp ¼ 10log10 ð3Þ
data rate
where the chip rate is 1.023 MHz, and the data rate is 50 bps.,
resulting in a processing gain of 43 dB. The final equivalent signal
Fig. 8. Plotted coordinates for the 10 trials with the average position in blue and power, Sf, was then calculated to be 2 dBm using Eq. (4).
actual location in green. (For interpretation of the references to colour in this
figure legend, the reader is referred to the web version of this article.) Sf ¼ Si þGp þ Gs ð4Þ

Note that the despreaded signal is not a physical signal, but it


displayed in orange, the average of these is shown in blue, and the is a computed signal having this equivalent signal strength.
actual antenna location is indicated in green. The difference Similarly, the final equivalent noise power was calculated to
between the average of the 10 trials and the actual antenna be 19.96 dBm using Eq. (5),
location was 2.5 m. Nf ¼ Ni þF þ Gs ð5Þ

4.1. System gain where F is the total noise figure of the system, estimated to be
that of the antenna amplifier, 2 dB. Thus, the final SNR can be
The gain/attenuation of each component of the system was computed to be approximately 22 dB.
determined or estimated from its datasheet and is listed in
Table 3. As noted above, the gain of the USRP was programmed 4.3. Quantization of the stored GPS signal
to be 40 dB at the time of data capture. The total system gain, Gs,
was 89 dB. The question arose as to the acceptable quantization of the
stored waveform used as input into the Borre software. Since the
4.2. System SNR input signal looks Gaussian in nature, as evidenced by the
histogram plot of Fig. 5, an analysis of the quantization effects
As stated above, the initial GPS signal power, Si, was -130 dBm. was made. For uniform symmetric quantization, the minimum
The initial noise power, Ni, was thermal noise, calculated using mean squared error for Gaussian input data has been well-
Eq. (2) (Noise Figure, 2010). documented in Jayant and Noll (1984).
An estimate of the receiver signal-to-noise ratio at time index k
Ni ¼ kTB ¼ 110:97 dBm ð2Þ
(SNR(k)) is computed as the output power of the receiver software
Here, k is Boltzmann’s constant, T is the noise temperature despreader with samples I(n) and Q(n) divided by the wideband input
(290 K), and B is bandwidth, approximated as 2 MHz. Thus, the power samples S(n) over multiple bit times (Van Dierendonck and
input SNR is calculated to be  19.03 dB. Braasch, 1999; IF GPS Signal Simulator Development and Verification,
E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360 1359

2003; Sayer, 2003). Thus 22.5


0 12 8B
XM 4B
WBPðkÞ ¼ @ Sðj þ kÞA ð6Þ 22 3B
j¼1 2B
1B
0 12 0 12
X
M X
M 21.5
NBPðkÞ ¼ @ Iðj þ kÞA þ @ Q ðj þ kÞA ð7Þ

SNR in dB
j¼1 j¼1
21
 
NBPðkÞ
SNRest ðkÞ ¼ ð8Þ
WBPðkÞ
20.5
where SðkÞ is the kth input sample to the Borre software and where
I(j) and Q(j) are the in-phase (I) and quadrature (Q) input samples
computed as the downconverted, and despreader output. That is, I 20
and Q are the mixed output of a local oscillator sine and cosine signals
used to downconvert the input signal to baseband and which have 19.5
been despread by the satellite’s spreading signal, PRNsat(j), which is a 5 10 15 20 25 30 35
binary (þ 1/ 1) signal modulated at the chipping rate of 1.024 MHz. Time in Seconds
Thus, the I(k) and Q(k) are computed as
Fig. 10. SNR for satellite PRN 21 as a function of time at 2-bit, 3-bit, and 8-bit
IðkÞ ¼ cosðcarrier angleðkÞÞUPRNsatðkÞUSðkÞ ð9Þ quantization. (For interpretation of the references to colour in this figure legend,
the reader is referred to the web version of this article.)
Q ðkÞ ¼ sinðcarrier angleðkÞÞUPRNsatðkÞUSðkÞ ð10Þ
Here the carrier angle(k) is the angle of the local oscillator used to increase in noise can be attributed to issues of Doppler estimation
downconvert the signal which is phase locked to the angle of the and tracking which are made worse by decreasing the SNR. These
input signal. The PRNsat(k) sequence is the chipping sequence which SNR calculations were computed using a reference SNR defined
has been phase locked to the received spreading sequence of the using 8 bits quantization, which was found to have almost
satellite. identical SNR to that of 16 bit quantization.
Figures 9 and 10 show the SNR(k) as a function of time for the
two satellites with the highest SNR levels. The estimated SNR
levels compare well to the SNR level of 22 dB calculated in Section
4.2. The MATLAB file tracking.m of the Borre et al. (2007) software 5. Conclusions
was modified to compute an SNR averaged over 100 bits or 2 s.
After removing the startup transients in this data, the mean Software Defined Radio is a rapidly evolving technology that is
value of SNR has computed over the last 30 s for various number generating widespread interest in the receiver industry. In this
of quantization levels. As shown in Table 4, the measured SNR paper, a novel approach has been introduced to implement a non-
resulting from the increase in quantization noise closely follows real-time software-defined GPS receiver using a USRP platform
that predicted by theory. As shown in the table, if the signal were and GNU radio software. The system was designed, built, and
quantized with 4 bits, the SNR decrease is negligible (0.0497 dB tested, and used to acquire and process real GPS signals. The
theoretically). For 3 bits, the SNR decrease is only 0.1595 dB. For system gain and SNR were calculated and determined. The system
2 bits quantization, the SNR degradation is only about 0.5 dB. was subsequently used to determine the SNR resulting from
Only when one bit quantization is used, the measured SNR drops various uniform quantization levels of the input signal.
by 1.83 dB, which is more than the expected 1.345 dB. This The USRP is an effective platform for implementing a software-
defined GPS receiver. It is also a platform on which to simulate
23.5 and test GPS algorithms. The book by Borre et al. (2007) with the
8B accompanying MATLAB software was ideal for academic use
4B because it describes the GPS signal and explains operation of
23 3B the software. The MATLAB software was found to be easy to use,
2B
understand and modify.
1B
One issue with non-real-time processing is that it requires the
22.5
signal to be stored and retrieved from disk. This allows for replay
SNR in dB

of the captured signal and experimentation with a variety of


22 processing algorithms but has the disadvantage of requiring large
disk files. Since the USRP sampled at a rate of 4 million samples
per second with 16 bits quantization for both I and Q components,
21.5 a 640 Mb disk file was required to save 40 s of the GPS signal. As
discussed in this paper, this signal can be quantized to 4 bits per
21 sample with minimum distortion resulting in an 80 Mb signal,
which is 8 times smaller.
Because MATLAB is an interpretive language, its processing is
20.5 slow. It takes a couple of minutes to upconvert the signal,
5 10 15 20 25 30 35 quantize it and store the results back to disk. And it takes several
Time in Seconds minutes to process a 37 s recorded segment of the GPS signal to
Fig. 9. SNR for satellite PRN 24 as a function of time at 2-bit, 3-bit, and 8-bit
compute position location. There are ways to speed up the
quantization. (For interpretation of the references to colour in this figure legend, processing which include compiling the MATLAB code using its
the reader is referred to the web version of this article.) built-in compiler or by hand coding in C processing intensive
1360 E.A. Thompson et al. / Journal of Network and Computer Applications 35 (2012) 1352–1360

Table 4
Effects of Signal quantization on SNR, theoretical and measured.

Number of Theoretical mean Theoretical noise increase Measured SNR for Difference from 8 bit Measured SNR for Difference from 8 bit
quantization Bits square error (linear) (1þ mean square error) (dB) PRN 24 (dB) SNR for PRN 24 (dB) PRN 21 (dB) SNR for PRN 21 (dB)

8 – – 22.78 21.92
4 0.0115 0.050 22.74 0.04 21.88 0.04
3 0.0374 0.160 22.64 0.14 21.78 0.14
2 0.119 0.489 22.30 0.48 21.42 0.50
1 0.363 1.345 20.98 1.80 20.09 1.83

functions such as signal search and dispreading and making them Marwanto A, et al. Experimental study of OFDM implementation utilizing GNU
a MATLAB callable function. radio and USRP—SDR. Proceedings of the IEEE International Conference on
Communications 2009:132–5.
Because the configuration described in this paper has been a
Maxim. Designing a Low-Cost, Low Component-Count GPS Reveiver. Retrieved
successful platform for research, it will be a starting point for May 4, 2010 from /http://pdfserv.maxim-ic.com/en/an/AN3952.pdfS.
further work including the implementation of a real-time system. Noise Figure. (March 27, 2010). Retreived August 5, 2010 from /http://en.wikipedia.
The focus of this effort will be the quantization of the signal and org/wiki/Noise_figureS.
the resulting simplifications to the arithmetic processing. Pini M, et al. Performance evaluation of C/N0 estimators using a real time GNSS
software receiver. Proceedings of the IEEE ISSSTA 2008:32–6.
Palmer D., et al. Non-GNSS Radio Positioning Using the Digital Audio Broadcasting
(DAB) Signal. In: Proc. of the 22nd Intl Tech Meeting of the Satellite Division of
Acknowledgments the Institute of Navigation, 2009, pp. 2172–2180.
C. Rizos, GPS Satellite Signals. (1999). Retrieved August 1, 2010 from /www.gmat.
The authors would like to thank Raytheon Company, Fort unsw.edu.au/snap/gps/gps_survey/chap3/311.htmS.
A. Saha, Spread Spectrum, CDMA, and GPS. Retrieved August 1, 2010 from http://
Wayne, Indiana, for sponsoring this project. alumni.cs.ucr.edu/  saha/stuff/cdma_gps.htm.
Stremler F. Communication Systems. 3rd Ed Reading: Addison-Wesley; 1992
References p. 628.
Sharawi M, Korniyenko O. Software-defined radios: a software GPS receiver
example. Proceedings of the IEEE/ACS International Conference on Computer
D.M. Akos. A Software Radio Approach to Global Navigation Satellite System Systems and Applications 2007:562–5.
Receiver Design, Ph.D. Dissertation, Ohio University, 1997. Shen D. (August 8, 2005). Tutorial 4: The USRP Board. Retrieved July 25, 2010 from
Borre K, et al. A Software-Defined GPS and Galileo Receiver: A Single Frequency /http://www.snowymtn.ca/gnuradio/gnuradiodoc-4.pdfS.
Approach.Boston: Birkhauser; 2007. SoX. (May 30, 2010). Retrieved July 29, 2010 from /http://en.wikipedia.org/wiki/
Berizzi F, et al. USRP Technology for Multiband Passive Radar. Proceedings of the SoXS.
IEEE Radar Conference 2010:225–9. Development of a Block Processing Carrier to Noise Ratio Estimator for the Global
Debian Package Repository for GNU Radio. Retrieved July 25, 2010 from /http:// Positioning System, Michelle Marie Sayer, Master’s Thesis, Ohio University,
gnuradio.org/redmine/wiki/gnuradio/DebianPackagesS. College of Engineering and Technology, August 2003.
Ettus Research LLC. Retrieved August 1, 2010 from /www.ettus.comS. Tucker D, Tagliarini G. Prototyping with GNU radio and the USRP—where to begin.
Global Positioning System (August 1, 2010). Retrieved August 2, 2010 from
Proceedings of the IEEE Southeastcon 09 (SECON) 2009:50–4.
/http://en.wikipedia.org/wiki/Global_Positioning_SystemS.
Tong Z, Arifianto M, Liau C. Wireless transmission using universal software radio
GNU Radio. Retrieved July 25, 2010 from /http://gnuradio.org/redmine/wiki/
peripheral. Proceedings of the 2009 International Conference on Space Science
gnuradioS.
and Communication 2009:19–23.
Heckler G., Garrison J. ‘‘Architecture of a Reconfigurable Software Receiver,’’
Ubuntu 9.04 Live USB Persistent (Windows Install). Retrieved July 25, 2010 from
Proceedings of the 17th International Tech Meeting of the Satellite Division,
ION GNSS, 2004, pp. 947–955. /http://alexsantidote.com/ubuntu/
Heckler G, Garrison J. SIMD Correlator Library for GNSS Software Receivers’’. GPS ubuntu-904-live-usb-persistent-windows-installS.
Solutions 2006;10:269–76. Van Dierendonck AJ, Braasch Michael. GPS Receiver Architectures and Measure-
IF GPS Signal Simulator Development and Verification, Lei Dong, Master’s Thesis, ments. Proceedings of the IEEE 1999;87:48–64.
University of Calgary, Department of Geomatics Engineering, Calgary, Novem- Wenmiao S. ‘‘Configure Cognitive Radio Using GNU Radio and USRP,’’ Proceedings
ber, 2003, pp. 94–95. of the 3rd IEEE Intl Symposium on Microwave, Antenna, Propagation and EMC
N.S. Jayant and P. Noll, Digital Coding of Waveforms, Bell Telephone Laboratories Technologies for Wireless Communications, 2009, pp. 1123–1126.
(1984), pp. 115–129. Zhang J, et al. Implementation and evaluation of cooperative communication
Lim D, et al. An efficient signal processing scheme and correlator structure for schemes in software-defined radio testbed. Proceedings of the IEEE INFOCOM
software GPS receiver. Proceedings of the ION NTM 2005:1026–32. 2010:1–9.

You might also like