Thesis
Thesis
June 6, 2017
Abstract
The modern Low Earth Orbit satellites (LEO-satellites) technology is highly complex and reliable than
it was yesterday. Nowadays, the LEO-satellites applications extend from civilian to military applications.
However, LEO-satellites require a Global Navigation Satellite System (GNSS) service, to achieve various
tasks which require positioning and localizing. The challenge is to have a GNSS receiver that is sensitive
enough to process weak GNSS signals, as they are buried inside the Doppler frequencies.
Therefore, a specialised data acquisition system for space environment, is utilized in the GNSS receiver
to search for visible satellites. However, when it comes to which acquisition algorithm that is suitable for
LEO-applications, what matters the most is the Doppler range. That is to say, any algorithm would work,
as long as higher Doppler frequency is considered in implementation. But, some algorithms are better and
faster than others. On the other hand, the platform in which algorithm is implemented on, does affect
the system performance. The FPGA-based data acquisition can only implement a few of the available
algorithms. In this project, we focused on serial search algorithms, which seems to be implementable on
FPGA.
i
Preface
I am thankful to my supervisor Dr. Tuan-Vu, and my advisor Tor-Alexander Johansen for their sup-
port and guidance through this project.
ii
Contents
Abstract i
Preface ii
1 Introduction 1
1.1 Thesis background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Global navigation satellite system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 GNSS Signal acquisition system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.3 LEO-Satellite overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Thesis Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 Acquisition algorithms for space-borne receiver . . . . . . . . . . . . . . . . . . . . . 3
1.3.2 Acquisition algorithms for optimizing the search time . . . . . . . . . . . . . . . . . 4
1.3.3 GNSS signal acquisition system on SoC . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.4 FPGA based GNSS signal acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Thesis outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 Delimitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.2 Report outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
iii
3.2.1 Coherent combining detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.2 Non-coherent detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.3 Differentially coherent detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3 Selection of suitable algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3.1 Detector strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3.2 Serial search data acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6 Conclusion remarks 58
6.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.3 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Bibliography 59
Appendix 60
A Simlink modells 61
A.1 Serial coherent acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
A.2 Detector & control logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
B VHDL design 67
B.1 Full stimulation code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
B.2 Synthesizable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
iv
Chapter 1
Introduction
1
Figure 1.1: General receiver function block
responsible for all digitizing operations, which allows further precessing in the GNSS receiver. The data
acquisition searches for available satellites visible to the receiver. The data tracking system removes
unnecessary parameter in the navigation data, which allows the computation of PVT. However,
navigation data from at least three different satellites to computes the PVT. That is because GNSS
utilizes intersection between parabolic curves between multiple references to localize something.This
technique is well known as time of arrival (TOA). The more satellites available, the more accuracy
positioning becomes.
However, in the GNSS receiver,the DSSS methods as well as the procedures used in the transmission
process, becomes advantageous. Only, this time it is used in the reversed order. Starting from the
last process, rather than up-conversion, the receiver down convert the GNSS signals first. Then, with
help from local signal, the GNSS receiver utilizes correlation techniques to despread energy as well as
decodes navigation message.
Furthermore, the spreading code is used to measure the transmission time from space vehicle to GNSS
receiver. It requires transmission time from at least three different satellites to compute the PVT. This
is because GNSS utilizes intersection between parabolic curves between multiple references to localize
something.This technique is well known as time of arrival (TOA). The more satellites available, the
more accuracy positioning becomes.
2
1.1.3 LEO-Satellite overview
Since the launch of Sputnik for nearly 60 years ago, hundreds of satellites have been sent into either deep
space or just to orbit the earth. The satellites near earth, can be in orbit the earth in the low earth orbit
(LEO), medium earth orbit (MEO), geosynchronous orbit(GEO), highly elliptical orbit (HEO), even other
types such as polar orbit, etc. However, in this project, on LEO is addressed. LEO-satellites are low
weighted, as a result they maintain the altitudes between 160 kilometres and 2 000 kilometres (Schäfer,
et al. 2005). With this altitude, the orbital velocity is about 8Km/s which is enough to generate high
Doppler frequency (Ali, et al. 1998) with respect to the earth’s rotation.
Today, LEO-satellites as well as Nano-satellites applications extend to wider areas both in science, civil and
military. That because technology behind them has become more and more complex and better compared
to earl ones. However, issues concerning constraints in size and weight still impose lot of challenges as
on-board instrumentations must be tiny enough to fit, and must consume very low power to concur the
power-source limitation in space.
3
1.3.2 Acquisition algorithms for optimizing the search time
An acquisition system that requires much time to search for SIS, always results in uneconomical use of
receiver’s resources. In (Anghileri et al. 2012) and (Leclre, et al. 2013) methods for reducing amount of
search number or iteration are described. One technique is to reduce sign transition as described in (Leclre
et al. 2013), which reduces number of signal search by 21%, and almost halve the memory resources for
implementation. It then concluded by the author in (Patel & Shukla 2011) that the faster the acquisition
the lesser power consumption it will require. Making it fast and low cost acquisition method. However,
the drawbacks of methods presented in above articles are based on parallel strategy, which utilizes Fourier
transformation. So far, our knowledge stretches, the FFT is hard to implement on hardware.
4
Figure 1.2: The scope of this thesis is the data acquisition system in the GPS receiver
The third chapter, takes one step further and tackles only about the GNSS signal acquisition system
with respect to the LEO-satellite application. However,the main objective of this chapter is to select which
algorithm that is suitable for GNSS signal acquisition with respect to LEO-satellite application as well as
FPGA implementations. Therefore, detection strategy and search strategy are covered in separate sections,
then suitable algorithms on behalf of searching as well as detection is selected.
Based on the result of the third chapter, the Simulink modelling of GNSS signal acquisition is handled
in the forth chapter. The main objective is to understand how the system works, and possibly use the
Simulink’s HDL coder to generate the VHDL to be used in the fifth chapter.
The firth chapter handles necessary procedures to develop VHDL code and synthesizes it on FPGA.
At last, the conclusion remarks are presented in the sixth chapter, where the major trade-off of this thesis
is summarized, and possible future work is recommended.
However, the appendix also holds important informations, such as results, codes, etc.
5
Chapter 2
G1 = 1 + z 3 + z 10 (2.1)
and
G2 = 1 + z 2 + z 3 + z 6 + z 8 + z 9 + z 10 (2.2)
Where 2.1 and 2.2 indicate the input sequence of G1 and G2 respectively. The operator + is the same
as the operator ⊕ on table 2.1, which denote an XOR logical function.
Each polynomial describes input to a 10-bit linear transfer feed-back registers (LTFSR). Which means,
the first LTFSR have bits 3 and 10 of its sequence, as the input. Regarding the second LFSR, polynomial
G2 demands bits 2,3,6,8,9 and 10 of its sequence, to be fed back. In the first LFSR the out put is the last
bit, bit 10. Yet, for the second LFSR the output depends on code-phase which corresponds to a satellite
ID, as defined on Table 2.1. Then output of the first LFSR is XORed with the second LFSR out to obtain a
6
Table 2.1: Code phase for C/A and P. The check chips are provided in octal(base 8)
SV ID No. Code phase selection Code delay Chips First 10 C/A Chips First 12 P Chips
C/A(G2i ) (X2i ) CA P
1 2⊕6 1 5 1 1440 4444
2 3⊕7 2 6 2 1620 4000
3 4⊕8 3 7 3 1710 4222
4 5⊕9 4 8 4 1744 4333
5 1⊕9 5 17 5 1133 4377
6 2 ⊕ 10 6 18 6 1455 4355
7 1⊕8 7 139 7 1131 4344
8 2⊕9 8 140 8 1454 4340
9 3 ⊕ 10 9 141 9 1626 4342
10 2⊕3 10 251 10 1504 4343
11 3⊕4 11 252 11 1642 ...
12 5⊕6 12 254 12 1750 ...
13 6⊕7 13 255 13 1764 ...
14 7⊕8 14 256 214 1772 ...
15 8⊕9 15 257 15 1775 ...
16 9 ⊕ 10 16 258 16 1776 ...
17 1⊕4 17 469 17 1156 ...
18 2⊕5 18 470 18 1467 ...
19 3⊕6 19 471 19 1633 ...
20 4⊕7 20 472 20 1715 ...
21 5⊕8 21 473 21 1746 ...
22 6⊕9 22 474 22 1763 ...
23 1⊕3 23 509 23 1063 ...
24 4⊕6 24 512 24 1706 ...
25 5⊕7 25 513 25 1743 ...
26 6⊕8 26 514 26 1761 ...
27 7⊕9 27 515 27 1770 ...
28 8 ⊕ 10 28 516 28 1774 ...
29 1⊕6 29 859 29 1127 ...
30 2⊕7 30 860 30 1453 ...
31 3⊕8 31 861 31 1625 ...
32 4⊕9 32 862 32 1712 4343
7
Figure 2.1: C/A code generator
chip of C/A. Figure 2.1 shows a CA generator that runs on 1.023MHz. Which means, each 1 ms, 1023 chips
is generated. To check if the sequence is correct, the first 10 chip as described on column 6 of Table2.1, can
be used.
P-Code generation
The PRN P-code is a raging code Pi (t) of 7 days in length at the chip rate of 10.23 Mbps. each Pi (t) pattens
is generated by the Modulo-2 sum of two sub-sequences denoted as X1 and X2i with length of 15,345,000
chips and 15,345,037 chips, respectively. According to (IS-GPS-200H), X1 is also generated in Modulo-2
sum of two sequences (X1A and X1B), with their lengths 4092 and 4093 chips respectively. The X1 epoch
is generated for each X1A’s 3750 counters, allowing the epoch to occur every 1.5 seconds after X1 patten
have been generated. X1A and X1B have input to their shift register defined as
X1A = 1 + X 6 + X 8 + X 1 1 + X 1 2 (2.3)
X1B = 1 + X 1 + X 2 + X 5 + X 8 + X 9 + X 10 + X 11 X 12 (2.4)
2.3 and 2.4 are initialized to code vector [001001001000] and [010101010100], respectively.
X2A = 1 + X 1 + X 3 X 4 + X 5 + +X 7 + X 8 + X 9 + X 10 + X 11 X 12 (2.5)
X2B = 1 + X 2 + X 3 + X 4 + X 8 + X 9 + X 1 2 (2.6)
The X2i sequences are generated by first producing an X2 sequence and then delaying it by a selected
integer number of chips, i, ranging from 1 to 37. Each of the X2i sequences is then modulo-2 added to the
X1 sequence thereby producing up to 37 unique P(t) sequences. The X2A and X2B shift registers, used to
8
Figure 2.2: Normalized C/A
generate X2, operates in a similar manner to the X1A and X1B shift registers. More about generation of
P-code, is found in the technical documentation “IS-GPS-200H”.
9
Figure 2.4: Mapping of data and C/A on carrier wave
The complete GPS signal consists of navigation message, raging code and frequency band itself. So that
the L signal leaving the antenna of the k th satellite is given as
√ √
sk (t) = 2Pc (C k (t) ⊕ Dk t)cos(2πfL1 t) + 2Pp L1(P k (t) ⊕ Dk t)sin(2πfL1 t) + 2PP L2(P k (t) ⊕ Dk t)sin(2πfL2 t).
p
(2.7)
The symbol ’⊕’ denotes the logical operation ”exclusive or”. With Pc ,PP L1 and PP L2 are the powers of
signs with C/A or P code. C k and P k are the C/A and P(Y) code sequences assigned to satellite number
k. Dk is the navigation data sequence. f 1 and f 2 are the carrier frequencies of L1 and L2. However,the
satellite transmits data on either L1 or L2 at time.Therefore, if only L1 is considered then equation 2.7
becomes:
√
sk (t) = 2Pc (C k (t) ⊕ Dk t)cos(2πfL1 t) + 2Pp L1(P k (t) ⊕ Dk t)sin(2πfL1 t)
p
(2.8)
Regardless of where the receiver is, the original signal gathers some noises on its transmission path. So that
at the receiver,the [2.8] is mixture of noises and carrier offset. Therefore, at the receiver L1 signal is given
as
S k (t) = const. × sqrt2P Dk (t − τ )cos(2π(f − ∆)(t − τ ) + θ) (2.9)
WithP being the total received power τ being the transmission delay, ∆f is the Doppler and θ is the received
phase. Mark that the P in equation 2.9 is the common interpretation for power which includes C/A, P(Y)
and noises. Whereas the values of P are presented in signal levels, which indicate the strength level of the
signal. According to Lei Dong(Dong 2005), the minimum received power is at −160.0dBW , −163.0dBW
for C/A and P respectively. As for the maximum power, the C/A get −152.0dBW and the for P it is equal
to −155.5dBW . However, in electronic systems it is commonly to present the performance in terms of
carrier-to-noise CNR and signal-to-noise SNR. The CNR defines the raw carrier power to raw noise power
in the transmission line, while SNR includes all noise and power measurement from end-to-end. The SNR
usually signifies the signal quality seen by the user-end, and is performed mostly on baseband signals.
S
SN R = (2.10)
N0 Bn
10
Figure 2.5: General front-end architecture (Originally, by Marco Rao)
Where Bn is the band width of the receiver. S, N denote signal power and noise power within the Bn .
The noise is assumed to be a one-sided white noise, and N0 is the spectral density, usually defined as
N0 = KT . According to (Dong 2005), the ratio C/N0 [dBHz] is the most representation of signal power,
due to its independence of receiver’s bandwidth. Whereas the relationship between the SNR and C/N0 can
be represented as
C
SN R(dB) = [dBHz] − Bn (dB) (2.11)
N0
with C being the total received signal power.
• Antennas
Basically, the antenna is the first instrument of the receiver, it has the main function of capturing
11
signals is space of all satellites in the constellation. However, the incoming signals hit the antenna from
different directions, which demands a circular polarized antenna. Usually, a GPS receiver’s antenna has
lower noise amplifier (LNA), initial filter and band limiting (Dong 2005) integrated in one component.
Therefore signal after the antenna stage obtains much more manageable bandwidth(Miskiewicz
et al. 2009), allowing mixers to proceed the down-conversion.
• RF mixer
Although much of high frequency is attenuated within the antenna stage, but the signal band must
be narrower and centre the receivers intermediate frequency (IF). Practically, this is known as down-
converting, which is performed by mixing the local oscillator (LO) with the incoming signal. Equations
(2.12) through (2.14) describes the involving procedure.
SIF (t) + nIF (t) = (S(t) + n(t)) ∗ 2cos(ωLo t) + Harmonics + LOf eedthrough + imagenoise (2.12)
Where ηRF (t) is equivalent to overall noise. The term yRF,i (t) denotes useful L signal, that takes the
following structure
a a i
yRF,i (t) = AiCi (t − τi,0 )di (t − τi,0 )cos[2π(fRF + fd,0 )t + φi,0 ] (2.16)
where
12
• Ai being an amplitude of the ith useful signal,
a
• τi,0 is the delay caused by the communication channel,
i
• fd,0 ) is the Doppler frequency affecting the ith useful signal,
• φi,0 being a random phase,
• fRF is the carrier frequency which depends on the GPS and on band to be analysed.
• Ci (t) is the spreading sequence assumed to have values in the set {−1, 1},
• di (t) is the navigation message.
Then the equation 2.15 can be written as:
L
X
a a i
r(t) = AiC̃i (t − τi,0 )di (t − τi,0 )cos[2π(fIF + fd,0 )t + φi,0 ] + η(t) (2.17)
i=1
That is the signal model of which impact of both quantization and filter is neglected, meaning that
characteristic of the signal is still the same, only on digital format. However, the signal must be represented
on discrete domain. That is, a sequence with sampling frequency fs = 1/Ts , denoted as x[n] = x(Ts ).
PL
Henceforth, r[n] = r(nTs ) = i=1 yi [n] + η[n], then signal model in Eq 2.20 can be rewritten as:
L
X
a a i
r[n] = AiC̃i [n − τi,0 /Ts ]di [n − τi,0 /Ts ]cos[2π(fIF + fd,0 )nTs + φi,0 ] + η[n] (2.21)
i=1
i i a
with FD,0 = (fIF + fd,0 )nTs and τi,0 = τi,0 /Ts
13
Figure 2.6: General functional blocks of an acquisition system
of acquisition is strongly based on correlation between the incoming signal and locally generated signals.
practically, for each satellite ID to acquire, the acquisition system locally generates ranging code replica of
the ID. Additionally, the local oscillator with exact FD as the receiver, generates the in-phase and quadrature
signal. Basically, the search is performed in the ±f D, where the satellite ID is said to be acquired only if
the ranging code in the incoming signal is properly aligned with the locally generated. Theoretically, the
acquisition strategy is done through serial search, where the system steps through every combination . The
parallel strategy, where either ranging code or LO is parallelized, optimizes the search. Both strategies are
further described in 3.1. However, the framework of the acquisition is shown on Figure 2.6, where each
block performs a unique logical operation(Re & Ruggieri 2007).
1. CAF evaluation
All the acquisition systems are based on evaluation and the processing of the cross-ambiguity function
(CAF)(Re & Ruggieri 2007). It is at this stage that correlation strategy is deployed, which exhibit
a sharp peak in correspondence of code delay and Doppler frequency, as shown on figure 2.7. The
approach of evaluating the CAF depends on acquisition strategy. In serial case, multiplication is used,
where the local ranging code is multiplied in both I and Q. Each LO component generates a search
vector of ±f D with adequate steps. On the other hand, when parallel strategy is used, then Fourier
transformation allows the CAF to be partially or fully performed in frequency domain. Then FFT
algorithms are used to achieve correlation. Which is shown in 3.1.2 and 3.1.3.
2. Envelope and average
However, to compute the correlation power from CAF stage, the average strategy is used. In serial,
the average strategy is performed by the utilization of integrator and dump, such that allows the
acquisition system to evaluate only chip rate (1023 chips) at a time. Then, the result is further
processed into a square function. Therefore, if any peak available, will be clearer, otherwise noises
will have relatively low amplitudes.
3. Detector
Which amplitude is reasonably to determine whether the average result is the correct signal or noise?
The detector compares the derived peak value to threshold. So, the result after comparison determine
the presence or the absence of a satellite. However, in both cases a false alarm can happen. As a
result, probability based algorithm are rather used to increase the performance of the detector, that
14
Figure 2.7: General acquisition plot. The peak location is related to code phase and Doppler frequency
is discussed in 3.2.
15
Figure 2.8: General tracking system
p
(x1 − xu )2 + (y1 − yu )2 + (z1 − zu )2 = ρ1 + c.∆b
p
2 2 2
ρ= p(x2 − xu ) + (y2 − yu ) + (z2 − zu ) = ρ1 + c.∆b + c.∆2
(2.23)
(x − xu )2 + (y3 − yu )2 + (z3 − zu )2 = ρ1 + c.∆b + c.∆2
p 3
(x4 − xu )2 + (y4 − yu )2 + (z4 − zu )2 = ρ1 + c.∆b + c.∆2
Where ∆b represents the clock bias between the one on board of the satellite and the receiver’s, ρ1 is the
reference pseudo-range and c is the speed of light. There are many ways to go from equation 2.9 to get
PVT values. However, the common as well as the simplest algorithm is based on least-squares method (Pini
et al. 2012), where the strategy of approximation utilizes the linear regression on the direct cosine matrix
(DCM) of the ECEF vector towards each satellite.
16
2.3 Common GPS receiver’s technology
2.3.1 Hardware-defined
The conversion receiver design method is based on ASIC (Application Specific Integrated Circuit)
technology. Technically, this means utilization of dedicated hardware components. Consequently, the
architecture is fixed and the system obtains no flexibility (Won, et al. 2006). To modify functionalities or
performance, either the ASIC must be re-fabricated or the circuit must be physically rebuild. Since the
ASIC is designed with a highly specialized purpose, the hardware receiver may perform faster which can
improve the power usage. However some of the drawbacks regarding the less flexibility in the hardware
receiver are:
• There is less upgrading opportunity to the newest technology.
• The prototype and development takes longer time as complexity increases.
• The production cost is relative high as a result of time and different types of hardware components
used.
• Less effective in terms of reliability and accuracy as a result of noises from discrete components and
as their performance degrades over time.
• The power usage may increase as a number of hardware increases, and as degradation takes place.
2.3.2 Software-defined(SDR)
Unlike the ASIC-based design, the Software-based performs all digital processing through general purpose
processor (GPP). The motive behind its existence is to overcome the classic limitation due to the ASIC
flexibility (Hein, et al. 2006). The main approach is to allocate the GPP close to the antenna as possible,
by employing DSP techniques. Such approach results in decrease in size, weight, and minimizes the power
consumption as well as product cost. According to (Bayendang 2015), software-defined platform is developed
through Matlab, Simulink or the combination of both. As a result the SDR-receiver offer high flexibility in
design as various programming languages can be utilized. However, using the GPP as a central unit for all
signal processing, minimizes the performance of the receiver.
17
end-to-end channel. Commonly, raging errors are categorized according to where or how they find place in
the system. Whereas six categories ephemeris data, satellite clock, ionosphere, troposphere, multipath and
receiver are the major. Somehow, each of the six categories, even affects the PVT computation. Lei Dong
in (Dong 2005) have modelled some which have direct impact on GPS receiver. Then in (Yang, et al. 2011),
how to approach the atmospheric error mitigation is shown.
18
Chapter 3
19
Figure 3.1: Serial acquisition
20
Figure 3.3: The result after multiplication in frequency domain
dimension is parallelized, allowing the system to only perform the search in frequency steps. The key element
in this algorithm is the cross correlation which is strongly based on the Fourier transformation(Boto 2014).
Just to demonstrate how the cross correlation between two finite sequences works, lets define the two
sequences x(n) and y(n) in discrete domain as
N −1
X −j2πkn
x(k) = x(n)e N (3.2)
n=0
and
N −1
X −j2πkn
y(k) = y(n)e N (3.3)
n=0
Note that both sequences have same length and also that the X ∗ denote the conjugate operation. So Figure
3.4 shows how it works. At the entry of the system, incoming signal is being multiplied by the I and Q, and
then the product is Fourier transformed. Furthermore, the resulting sequence is multiplied by the complex
conjugate of the PRN. Mark that the Fourier transformation is first applied to the PRN, before it is complex
conjugated. Next, the resulting product is transformed from frequency to the time domain, and finally the
enveloping operation is applied onto it. This operation exhibit peak signal in correspondence of the PRN.
This algorithm saves much energy consumption, especially when parameters for both FFT and IFT are
thoroughly calculated.
21
sn (t) = sincoming (t) × s∗ delayed(t − τ ) (3.6)
= A(t)A∗ (t − τ )exp(j2πfD t)exp(−j2πfD (t − τ )) (3.7)
∗ ∗
= A(t)A (t − τ )exp(j2πfD τ ) ' A(t)A (t − τ ) × 1, if τ ' 0 (3.8)
According to authors in (Wang et al. 2016) the delay-multiply search method is a seldom used algorithm
in ground GPS receivers simply because the Doppler frequency on ground it not high enough. Which would
rather result in sensitivity loss due to the several stage multiplications. However this algorithm is number
one priority for space-born receiver.
22
3.2 Detection algorithms
Usually when dealing with GPS receiver, decision making on whether the acquired satellite is true or false
comes hand in hand with acquisition concept. Technically, the receiver combines its ability of sampling
and the result from the correlator, to form a statistic based alarm. The mechanisms in a such alarm are
theoretically defined through some detector algorithms. Three algorithms, coherent detection, non-coherent
detection and differentially coherent detection, often appear in many literatures. These algorithms are
presented in (Re & Ruggieri 2007) as being depending on how the envelop and averaging is designed. That
is, whether it is the envelop which is performed first or the averaging. However, the statistic representation
is shown in (BE 2010).
If we assume an input signal having additive white Gaussian noise with the power spectral density(PSD)
defined as N0 /2 and the variance equal to σn2 , then the variance of the complex input σ 2 = 0.5σn2 . So that
the decision statistic can be represented as distributed random variable with two degrees of freedom and
the variance equal to σY2 = Mc Ns σ 2 , which can also be given as
Mc Ns Bif N0
σY2 = (3.10)
2
Equation 3.10 refers to the correlation result, which can give either a false alarm or true alarm. For both
cases, two hypotheses, satellite being present H1 or satellite being absent H0 can happen. Therefore, we
can have probability function of the decision variable for the first hypothesis given as
1 x
2σY2 exp(− 2σ 2 ), if x ≥ 0
f H0 (x) = Y (3.11)
0, if x < 0
When satellite and noise are both present in the correlator result the decision statistic function is no longer
central. In this case the second hypothesis H1 is presented as
( √
1 x+λ
2σY2 exp − 2
2σY
I0 σxλ
2 , if x ≥ 0
f H1 (x, λ) = Y (3.12)
0, if x < 0
That is for real part <{z} > 0. The λ in equation 3.10 denotes the non-centrality of the decision probability,
and it is defined in terms of correlator output as
"M N −1 #2
cXs
λ = E r(mT s)exp(−j ω̂D mT s)c(mT s − ζ̂Tchip ) (3.15)
m=0
23
If we ignore the noise contribution, then the above equation can shrink down to
M N −1 2
cXs
λ= s(mT s)exp(−j ω̂D mT s)c(mT s − ζ̂Tchip ) (3.16)
m=0
This will have an impact on the rest of the detection parameter. The new dwelling time becomes
Then the distribution of decision statistic will have variance equal to σY2 and 2K degrees of freedom, whereby
the probability density function of H0 and H1 get an additional element due to non-coherent integration.
( K−1
1 1 x
f H0 (x) = 2σ 2 Γ(K) 2σ 2 exp(− 2σx2 ), if x ≥ 0 (3.23)
Y Y Y
0, if x < 0
( K−1 √
1 x
2
2
exp(− x+λ
2σ 2
)IK−1 ( 2σxλ
2 ), if x ≥ 0
f H1 (x, λ) = 2σY λ Y Y (3.24)
0, if x < 0
With λ defined as
2
K−1 (k+1)Mc NS −1
X X
λ= E
r(mT s)exp(−j ω̂D mTs )c(mTs − ζ̂Tchip )
(3.25)
k=0 m=kMc Ns
Which is equivalent to
0.5K(Mc N s)2 C (3.26)
24
. Similar to the previous algorithm, the λ is compared to the threshold value, of which detection probability
is given as
Z ∞ √ √ !
λ Th
Pd = f H1 (x, λ)dx = Qk , , (3.27)
Th σ Y σ Y
25
3.3.2 Serial search data acquisition
Fortunately for acquisition, all of the algorithms above can be utilized, as long as the f D in the
F D = IF + f D is sufficient enough to allow the incoming signal stay within ±f D. However, the accuracy
of the system varies from algorithm to another. As we have seen, the accuracy is better if we search within
all possible combinations, however this is time and resource consuming. So the best algorithm for space
application would be the delay-multiply algorithm, or one of the parallel strategy. But this imposes that
the FFT and IFT have less length. Nevertheless, besides being appropriate for space-borne receiver and
providing good accuracy, the selected algorithm must be able to be implemented on FPGA. Therefore, as
in the case for differentially coherent detector, we better not choose the delay-multiply. To easy the work,
we will start with the serial data acquisition, because all its mathematical functions can be implemented on
hardware.
26
Chapter 4
(a) Local oscillator. Its purpose is to generate and provide the in-phase(I) and quadrature(Q)
signals to the system.There is a 900 phase different between the I and the Q. Otherwise they both
have the same amplitude, sampling frequency and the frequency f D = IF + fD . Normally, at
the receivers antenna the L1 signal have much higher frequency of up to 1575.42M Hz. However,
within the front-end, that frequency is controverted to the receiver’s intermediate frequency (IF).
We assume the receiver’s IF of 1.26M Hz and the sampling frequency of 5M Hz. For Doppler
frequency f D, we must be able to simulate both for stationary receiver which has f D equal to
5KHz, as well as the space-born receiver with Doppler value up to 35KHz.
(b) C/A gold code. As seen before, the C/A represents the ID of a satellite which is represented on
27
1023 chips. Just as mentioned, this is rather regarded as bit stream than a vector. It means that
we have to generate 1023 different bit/chip every certain mount of time, precisely a microsecond.
So to achieve that we must have a sample time of exactly 1/1.023M Hz, note that the denominator
is our sampling rate. Furthermore, the C/A consist of two 10-bit LFSR, or G1 and G2. Therefore
the sampling rate must be the same in both LFSR. The we can follow the description and the
phase table provided in the previous chapter to correctly configure the C/A gold code.
(c) Integrator and dumper. After I component and Q component are generated and multiplied
by the C/A, the system collects a sample which is a equivalent to one chip rate. For that, the
integrator and dumper of maximum index equal to 1023 is used. This subsystem is referred to
as non-coherent integrator Note that if the first index is 0 then the maximum will be 1022. And
mark two separate integrator are required for both I components and Q components.
(d) Envelop is actually the square function, and is being used in both I path and Q path. Then
after this operation. the two paths are added together before leaving the serial correlator.
2. Threshold detection
(a) Coherent integrator is optional, but as long as the receiver is not stationary, it is advised
to use it. Here, we do not require to integrate over larger area as for non-coherent integrator.
However, we need to bare in mind that the number we choose affects the threshold value. In
(Johansson, et al. 1998), it is shown that 10 is enough to be the maximum index of the coherent
integrator. And so, we must use 6 as our threshold value, to find the strongest SNR.
(b) Computing the signal power. This operation includes reading a set of data and computation
of the highest value and the average value within the read data. Then the power signal is obtained
by dividing the highest value by the average value. The quotient, which in our case is denoted
as the SNR is compared to the threshold value. It is enough to read 500 samples at a time, since
the search is normally done in steps of 500 HZ. However, from table 2.1 in chapter 2, we see that
ID No 32 has a code delay of 862. Therefore, the system must read at least up to that delay.
3. Control logic
(a) system state control. Usually, the acquisition system has many states. It could be on, off, idle,
acquiring, pending, done, etc. However, the most important is to verify if the satellite is acquired
or not. Then based on that, the system either have to change to tracking modus and at the
same time reinitialize a new search operation for a specific ID, or if time out, it can terminate
the search and start all over.
(b) internal signal control can easily be achieved based on current system state and a wish about
what next state going to be. Mainly, we have to clock signals, a 1.023 MHz and a 1.26MHz.
However, in combination with that states we can easily manipulate the internal subsystem. This
could if we want to recalculate the mid-results, such reading or recalculation of the SNR, and so
on.
28
• Unit delays
In this configuration, 10 unit delays are connected in series to present one 10-bit shift register.
feedbacks can be stretched out according to polynomial explanations. Each delay block involved
in this architecture should be initialized to 1, and sampling frequency of 1.023MHz. Drawbacks with
this design is that it is space consuming, no reset possibility and is not support for VHDL.
• D flip-flop
On hardware level, a shift register is set of flip-flops (FFs) that install data. Each FF in this set, is
equivalent to a single bit in the n-bit register. Therefore, each 10-bit LFSR requires 10 FFs. In our
simulation we require a serial register, so that all FFs are connected in serial. Similar to unit delay
configuration, the feedbacks to the registers are set with respect to their mathematical expressions
and output that satisfy the phase table. The advantages of this configuration is that it gives a feeling
of working with hardware. However, the main drawback is that it acts as a hardware in a such way
that external clock, reset and ground have to considered. At the same time, it is not in support with
HDL coder.
• Gold sequence generator
Simulink provides a faster and easier solution for gold code generation. Two of the present options are
shown on figure A.1. With the gold sequence generator, the complete ID sequence can be generated
from a single block. However, in this simulation we prefer to utilize two separate LFSR to generate a
single ID as shown on this figure
To utilize PN generator, at least these property must be properly set-up:
– Generator polynomial, which is similar to the mathematical expression of G.
– Initial states, similar to the flip-flops. If reset the sequence value goes to 1.
– Output mask vector. Bear in mind that the output of G1 is always last bit, yet for G2 the output
varies with the code phase assigned for each ID.
– Sample time, is very important especially for generating specific chip length. In our case we have
1
to generate 1023 chips every micro-second. Therefore, our sampling rate is 1.023e 6.
4.2.2 Oscillator
In the GNSS signal acquisition system, oscillation signals are required to set and limit the searching
area. Nevertheless, to generate a stimuli signal as well as In-phase and Quadrature signals, we require
an oscillator. Simulink offers different blocks that generate oscillating waves. Regarding our targeting
mission, the desirable waves must be discrete sinus and cosines. One of the possible approaches is by the
help of DSP library in Simulink. We can use a discrete wave generator which is also supported for HDL.
With 0 in the phase offset, the output is the sinus, if the phase offset is set to π/2 cosine is generated.
Choosing discrete output, requests a look-up-table computation mode, and that reduces the flexibility in
design. Additionally, the amplitude never reaches ±1. Therefore, we consider other design approaches. The
direct digital frequency synthesizer (DDFS) as shown on figure 4.2 is one of the kind mostly used in digital
oscillators(Murphy & Slattery 2004). Commonly, the direct look-up table(LUT) with linear interpolation is
used to implement the DDFS. However, other method which utilize mathematical series, can also be used
to generate a digital sinusoid. In Simulink, the numeric controlled oscillator(NCO) can be advantageous,
not only for implementing the DDFS, but also able to simulate different scenarios signal with respect to
Doppler frequencies. Figure A.6 shows NCO based DDFS implementation. Notice that the delay acts as the
holding register, if removed there will be no signal. However, for counter it is bit tricky. First of all, we are
targeting the following signal structures x1 = A ∗ sin(2πfIF + fD ) ∗ Ts and x2 = A ∗ cos(2πfIF + fD ) ∗ Ts ,
where fD is the maximum Doppler which we can change. We desire a frequency resolution of 500 Hz, by
1
definition ∆f = Ts ∗2 N Hz, then computing for N we get 14. Thus, we have such counter on figure A.7,
with sampling frequency equal to 5MHz and fD = 10KHz. However, with the suggested implementation
on figure A.6, it may result in some warnings. This may occur when quantizer result, from which values
of the look-up-table are selected, are not integer. So, the remaining option is to use a simple sine/cosine
29
source block, that implements mathematical series. However, this may still cause some trouble, as other
subsystems may interpret it as a continuous signal. But a “Zero-Order hold” block can be added to resolve
the problem.
30
the total power is processed in the threshold detector to determine the absence or the presence of a satellite
signal.
Notice that E|S| must be greater than E|N | in order to generate adequate quotient to exceed the threshold.
and if E|S| small, nearly zero the E|SN R| becomes equation 4.2, and of cause satellite is not acquired.
K ∗ E|N |
E|SN R| ≈ =1 (4.2)
K ∗ E|N |
Usually detection procedure follows complex statistics, from which various case scenarios as explained in the
detection theory in section 3.2, are considered. However, since we are targeting the hardware implementation
of mainly the correlator, we keep this very simple. Figure A.8 shows a simple implementation. The
motivation of this implantation is the M-code, which are given in (Johansson et al. 1998). However, we do
not use M-codes. Therefore, to read a specific set of data, the buffer is used, from which the search vector is
formed. Then, once the vector or data set is created, we find the average value by utilizing the Mean block,
and the maximum value by help of the Maximum block. Thereafter, the SNR is computed by dividing the
obtained maximum value by the average value. However, to avoid having zero in the denominator which
results in infinite quotient, the system forces the average to stay above zero. Which is performed by the
“nonzero mean value” subsystem on figure A.8. Finally, the system compares the quotient to the threshold
value. Note that even if the non coherent integrator outputs signal that has values of up e5 or e(x>5) , the
quotient remains between 0 and 10. Hence 6 as a threshold is reasonable.
31
Figure 4.5: Modulo-2 sum of data and C/A for satID1
32
Figure 4.6: Modulo sum on NRZ format
The first ten chips is used to check if the design is correct. Randomly, satellite ID 1, 9, 17 and 32.
Hence, results on figure 4.7 acknowledges the 10 first chip given on table 4.1.
33
Figure 4.7: 10 first bit for SV ID No 1, 9, 17 and 32
L1 signal
34
The first step of our task is to generate a stimulus signal to the acquisition system that mimic the GNSS
signal. The stimulus signal contains a satellite ID, data and the carrier wave. The carrier wave is a sinusoid
signal frequency of 1.26MHZ and phase frequency that can vary. Note that we assume the L signal after
down-converted to the receivers intermediate frequency. That is the reason why we are using 1.26Mhz rather
than the frequency of SIS. Although sinusoid wave on Figure on 4.8 are intended to represent LO output,
but each of them can be used as a carrier wave. We can see that before adding Doppler, the frequency is
exactly 1.26MHz.
As mentioned, the carrier wave carries important information of Data and ranging code, which are set
together in Modulo-2 sum as described in the above section. The Modulo-2 sum is then multiplied with
the carrier wave. The product is shown on Figure 4.9. We can see that the carrier still propagate with
1.26MHz but shifting the phase as the modulo sum changes the levels. On the other hand, if the modulo
sum is between 0 and 1, the resulting product would be as shown on Figure 4.10. Similar, can also happen
if local C/A in the next section is on incorrect format.
Figure 4.9: L signal being modulated with Modulo-2 sum of data and C/A for ID1
35
Figure 4.10: Product of carrier and incorrect modulo sum
Cross correlation
Basically, when serial acquisition is comparing similarities between its locally generated signals and
whichever incoming signal, (by whichever we mean signal with different C/A, carrier frequency or Doppler
frequency), it can be regarded as cross correlation. However, the cross correlation power will give strong
power only if the incoming signal matches the local signal, else power is less. On Figure 4.11, we test the
effect of Doppler changes when C/A is correct. The Figure 4.11A is the test signal that has no Doppler
frequency, just like the LO on B. Then we compare the result with an LO on Figure 4.11C that has Doppler
frequency equal to has 35KHz. After multiplication, we see clearly that 4.11D, which is result of A and B,
has much power than on E. By power we mean, the resulting absolute value when all elements are added
together. Clearly we see that on E, many of element will cancel each other.
36
Figure 4.12: Cross correlation, higher Doppler
Incoming signal on Figure 4.12 has 35 KHz is Doppler, same as LO on C. This time we see that the E
obtains much of power.
Figure 4.11: Cross-correlation result when incoming signal has less or equal Doppler frequency
37
Figure 4.13: When Doppler is just in the middle
If the incoming signal has nearly same Doppler frequency as the maximum Doppler frequency, the energy
is still high. As shown On Figure 4.13, the incoming signal on A has Doppler frequency equal to 17 KHz,
the LO on B has no Doppler at all, the LO on C has 35 KHz. Then we can see that when Doppler F Din
exceed F DLO on D, the energy is distributed unevenly. On the other hand, when incoming signal is within
F DLO Max, the energy tends to distribute evenly, and hence E will have much energy. Therefore, the local
oscillator must have the maximum Doppler which is expected. Beside the Doppler, C/A is also another
parameter that affect the similarities, as well as the correlation power. On Figure 4.14 we have tensionally
changed the local PRN from ID1 to ID2. Then we can see that when the incoming signal on A (obviously of
ID1), multiplies the PRN of ID2 on B, the energy on A is distributed evenly. However, if we add all those
element on C, the sum is going to be small.
Auto correlation
Nonetheless, the serial acquisition evaluate the CAF of a specific satellite ID through utilization of auto
correlation. This means that the incoming signal is similar to the local. Therefore, the autocorrelation, is
38
literally to compare similarity of a signal with itself. In this section, the local C/A and Doppler is the same
as in the incoming signal. Then we can see on Figure 4.16 how the auto correlation aligned the incoming
signal with both local Doppler and C/A. If the alignment is perfect, the energy becomes high. That is the
main principle behind the serial correlation. On Figure 4.17, we can see clearly how consecration is the
energy. Note that is we slide and of the signals on A or B, C will suffer from energy loss. Which is exactly
what we have seen above.
39
Figure 4.17: Auto correlation, energy distribution
40
Figure 4.18: Energy distribution along with data PW
Although C/A and the Doppler have direct impact on energy distribution in the serial correlator, but
it is also date dependent. Recall that modulo 2 is used to relate data and C/A, whereas, in each data PW
holds 20460 chips of CA. nevertheless, the final data bit looks like the inverted version of C/A. Therefore,
during correlation energy will be located in the data PW. As shown on Figure 4.18, the I-phase energy is
the opposite of the Q-energy. That is true because they are 900 phase offset to each other.
Averaging
The auto correlation aligns the incoming signal to the locally generated. However, to compute the correlation
power, elements must be summed up. The integrate&Dump takes care of adding exact number of one chip
rate, 1023 numbers. Such summation gives the average power over one chip rate. The average can be
negative or positive, but it gives a value to a certain number of chips, as shown on Figure 4.19. If we
compare Figure 4.18 and Figure 4.19, we can see that the energy structure is still the same for both I and
Q. Only that, rather than having energy distributed over a large area, the integrate sums them up. To
get the energy in the absolute value, we square it, which is known as enveloping. This time we get only
positive value, and they much higher than in the integration. Figure 4.20 shows what happens to the I
component, when alignments is correct. On the other hand, Figure 4.21 shows what happens when signals
are not properly aligned. The last step of non-coherent serial correlation, is to add the Q-power and the
I-power. Figure 4.22 shows the total energy. Notice that the spikes are exactly where the data changes its
pulse levels. However, if we normalized the total energy, we would get a nice peak.
If we chose not to use the NRZ format, we would get signal structure as on Figure 4.23. Still, we get
some power but it is not properly averaged. And the power will be different in Q and I depending on the
type of sinusoid in the test signal.
41
Figure 4.19: Comparison of I arm and Q arm
42
Figure 4.21: Average result when signal are not aligned
43
Figure 4.23: Averaging result when NRZ is not used
44
Figure 4.24: Threshold detection and C/A reset
45
Figure 4.25: Reset and first 10 chip
46
Chapter 5
In this Chapter we develop VHDL code which correspond to Simulink results in previous chapter. However,
L1CA is only required for stimulation purposes. That means, for implementation, we only need to design
acquisition module which also requires frequency divider. Regarding peak detection, we use simple method
that only compares the correlation power to the threshold. Therefore, we do not go deep in detection
strategy.
2. Raging code
The raging code is directly generated from Simulink HDL generator. On top of the VHDL file, the
Simulink generates a package file. This file is required to run the VHDL file in ISE design suit.
However, we must make sure that both the clock signal as well as ranging sequence is correct. Both
the chip delay and the 10 first chips of a specific satellite ID, can be used to verify this VHDL code.
3. Integrate and dump
This function is required in serial acquisition, to add correlation power. However, we can’t generate the
VHDL directly from Simulink. Therefore, we must design our own. One solution is to use the IP Core
from the ISE software. However, it is relatively easy to design VHDL code for an integrate&dump.
As shown on Figure5.1, we require two IF-loops, one for internal sum, another for counter.
4. Oscillator
The oscillator is required to generate both the sinus wave and the cosine wave. One of the approaches
to maintain oscillation digitally, is the use of direct digital frequency synthesis (DDFS). In ISE
environment, there exist the IP Core for DDFS which can be used for simulation only. Similarly,
we can generate VHDL for DDSF from Simulink. If we have to design our own DDFS, then we might
follow the architecture presented on figure 5.3.
47
Figure 5.1: Integrator and dump architecture design
48
49
Figure 5.2: Top-view of an intended architecture for stimulation only
5.2 ISim stimulation results
5.2.1 Frequency divider
Based on VHDL design in B.1, Figure 5.4 shows clock frequencies for PRN, data and LO. The data frequency
is 50 MHz which gives a clock signal that is equal to 20 ms. Then Figure 5.5 presents the frequencies for
LO and ranging code. The LO runs on 1.26MHz, that is one oscillation per 795.0 ns. The PRN frequency
is 1.023MHz which gives about 974.01 ns.
Figure 5.6 shows the stimulation result of the L1CA, it follows the VHDL code provided in B.1. We can see
the Modulo-2 sum between data and CA of satellite 1, being represented on NRZ format before multiplies
the carrier wave. The VHDL code for the NRZ, is presented in B.1. Although, this is not real L1CA, but
it is enough to generate stimuli signal to our main system.
50
Figure 5.7: Stimulation results
51
5.2.4 Detection and logic control
As mentioned in the introduction of this chapter, we design a simple detection method that only compares
the total correlation power to a threshold. Then, according to whether correlation power exceeds the
threshold, the Satellite ID is either acquired or not acquired, as shown on Figure 5.9. If acquired, the
system has to establish a new search, by resetting the PRN, as shown on Figure 5.10. Moreover, Figure
5.11 verifies the first 10 chips to be correct, and also is the reset.
52
5.3.1 Frequency divider
Figure 5.12 verifies the LO frequency of 1.26MHz. Each grid on vertical line reads 200 ns, it takes almost
4 grids to complete a single period. which gives nearly 1.26MHz clock frequency.
The CA clock on Figure 5.13 completes a single period in 977.5 ns, which gives a 1.023MHz clock.
Figure 5.14 verifies that the data frequency is 50 Hz. Notice that the each grid is 5ms. However, we
do not require data frequency to implement data acquisition on FPGA.
1.26MHz for LO
53
1.023MZ for CA
50 HZ for Data
54
5.3.2 C/A
55
Figure 5.16: Chip delay for satellite ID1
It is given that for satellite-ID, there is 5 chip delay in LFSR-G2. That is between bit 10, and output 2 ⊕ 6.
On Figure 5.16, we see that the bottom signal,“2 ⊕ 6” is delayed by 5 chips compared to the signal on top,
G2-bit10. Which verifies that the CA module is correct.
56
5.4 Suggested design for FPGA implementation
Based on stimulations and implementation results in previous sections, we can modify the codes in such
way that allows the hole system to be implemented on FPGA. Figure 5.17 describes what changes we have
to make. The local oscillator that generates the I and Q, has to be implemented on soft-core. Similar to the
threshold detector. The soft-core care either be within the same FPGA, or as an external micro controller.
However, putting soft-core in the FPGA may increase the power consumption, but it is the easiest.
All the signals involved in serial correlation must not be of type integer. We suggest a 16 bit word length
to be used. However, this requires signal converting due to two main reasons. First all, the CA is naturally
a single bit, so it must somehow be converted. The second reason is that, multiplying to vector with equal
length, the result get double length. Therefore, the multiplication result has to be converted. Otherwise,
this system seems to be the solution of how we can implement the whole data acquisition on FPGA.
57
Chapter 6
Conclusion remarks
6.1 Discussion
The main objective in this project has been to develop an FPGA-based data acquisition system for GNSS
receiver that is assumed to service the LEO-satellites. We have seen that the LEO-satellite requires an
acquisition system that considers higher Doppler frequency than 25 KHz. Hence, various algorithms can
be used. However, some are better than others. The delay-multiply is said to be the best algorithm for
space-borne receiver. On the other hand, the fact that we had to implement our design on an FPGA, serial
acquisition algorithm is chosen. This is because, it is simple to implement and has neither delays nor FFT
which could be problematic to implement on FPGA. Through chapter 4, we designed a Simulink model for
serial acquisition. the objective was to automatically generate VHDL code for the design. Unfortunately,
only ranging code was generated. The remaining operations to achieve correlation power, are relatively
simple for the design of VHDL code. Hence, in chapter 5, we combined VHDL from Simulink and our own
code to design the serial acquisition. The detection module is also attempted to be designed, but according
to our Simulink model, that involves division operation. However, division is FPGA is not that simple,
therefore, due to time constraints, the detection module could not be designed completely.
6.2 Conclusion
The serial search algorithm can be implemented on FPGA. However some modules such as detection and
local oscillator are hard to implement on hardcore. Therefore the solution is to use soft-core, which can be
designed within FPGA itself or as a separate micro-controller. The Simulink model gives a perfect picture
of how the system should work, but it does not necessarily generate VHDL. And if it does, the VHD codes
are not automatically error-free, which needs to be verified before any further processing.
58
Bibliography
D. M. Akos & J. B. Y. Tsui (1996). ‘Design and implementation of a direct digitization GPS receiver front
end’. IEEE Transactions on Microwave Theory and Techniques 44(12):2334–2339.
I. Ali, et al. (1998). ‘Doppler characterization for LEO satellites’. IEEE Transactions on Communications
46(3):309–313.
M. Anghileri, et al. (2012). ‘Reduced navigation data for a fast first fix’. In Satellite Navigation Technologies
and European Workshop on GNSS Signals and Signal Processing, (NAVITEC), 2012 6th ESA Workshop
on, pp. 1–7.
M. Baracchi-Frei (2010). Real-time GNSS software receiver optimized for general purpose microprocessors.
Ph.D. thesis, Université de Neuchâtel.
N. P. Bayendang (2015). Nano-satellite GPS receiver design and Implementation: a software-to-firmware
approach. Ph.D. thesis, Cape Peninsula University of Technology.
N. M. BE (2010). Variable dwell time verification strategies for CDMA acquisition with application to GPS
signals. Ph.D. thesis, Department of Electrical and Electronic Engineering, National University of Ireland.
P. Boto (2014). ‘Analysis and Development of Algorithms for Fast Acquisition of Modern GNSS Signals’.
J. T. Curran, et al. (2010). ‘Reducing Front-End Bandwidth May Improve Digital GNSS Receiver
Performance’. IEEE Transactions on Signal Processing 58(4):2399–2404.
L. Dong (2005). IF GPS signal simulator development and verification. National Library of Canada=
Bibliothèque nationale du Canada.
S. Gleason & D. Gebre-Egziabher (2009). GNSS applications and methods. Artech House.
G. Hein, et al. (2006). ‘Platforms for a future GNSS Receiver’. Inside GNSS 1(2):56–62.
F. Johansson, et al. (1998). ‘GPS satellite signal acquisition and tracking’. Undergraduate projects .
R. Lang, et al. (2016). ‘Re-scaling and adaptive stochastic resonance as a tool for weak GNSS signal
acquisition’. Journal of Systems Engineering and Electronics 27(2):290–296.
J. Leclère, et al. (2013). ‘Comparison framework of FPGA-based GNSS signals acquisition architectures’.
IEEE Transactions on Aerospace and Electronic Systems 49(3):1497–1518.
J. Leclère, et al. (2014). ‘Acquisition of modern GNSS signals using a modified parallel code-phase search
architecture’. Signal Processing 95:177–191.
J. Leclre, et al. (2013). ‘Modified parallel code-phase search for acquisition in presence of sign transition’.
In Localization and GNSS (ICL-GNSS), 2013 International Conference on, pp. 1–6.
S. A. Malik, et al. (2009). ‘Search Engine Trade-offs in FPGA-based GNSS Receiver Designs’. In European
Navigation Conference ENC-GNSS.
59
D. Miralles, et al. (2014). ‘Development of a Simulink Library for the Design, Testing and Simulation of
Software Defined GPS Radios’. Internal PUPR Technichal Report, Polytechnic University of Puerto Rico
pp. 6–7.
A. Miskiewicz, et al. (2009). ‘System considerations and RF front-end design for integration of satellite
navigation and mobile standards’. Advances in Radio Science: ARS 7:151.
E. Murphy & C. Slattery (2004). ‘Ask the application engineer33 all about direct digital synthesis’. Analog
Devices 38:1–5.
C. O’Driscoll (2007). ‘Performance analysis of the parallel acquisition of weak GPS signals’ .
V. Patel & P. Shukla (2011). ‘Faster methods for GPS signal acquisition in frequency domain’. In 2011
International Conference on Emerging Trends in Networks and Computer Communications (ETNCC),
pp. 84–88.
M. Pini, et al. (2012). ‘Estimation of Satellite-User Ranges Through GNSS Code Phase Measurements’.
GLOBAL NAVIGATION SATELLITE SYSTEMS p. 107.
E. Re & M. Ruggieri (2007). Satellite communications and navigation systems. Springer Science & Business
Media.
F. Schäfer, et al. (2005). ‘The inter-agency space debris coordination committee (IADC) protection manual’.
In 4th European Conference on Space Debris, vol. 587, p. 39.
J. B.-Y. Tsui (2005). Fundamentals of global positioning system receivers: a software approach, vol. 173.
John Wiley & Sons.
J. Wang, et al. (2016). ‘Performance Analysis on Delay-Multiply Acquisition for Space-Borne GNSS
Receivers’. In 2016 IEEE 83rd Vehicular Technology Conference (VTC Spring), pp. 1–5.
J.-H. Won, et al. (2006). ‘GNSS software defined radio’. Inside GNSS 1(5):48–56.
L. Yang, et al. (2011). ‘An innovative approach for atmospheric error mitigation using new GNSS signals’.
Journal of Navigation 64(S1):S211–S232.
60
Appendix A
Simlink modells
61
Figure A.3: PRN
62
Oscillator
63
Figure A.9: the Simulink of a simple control logic
64
65
Figure A.10: The Simulink model of a serial search acquisition
66
Figure A.11: Serial correlator with simplified detection and logical control
Appendix B
VHDL design
entity F u l l s c a l e S t i m u l a t i o n is
Port ( clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
enb : in STD_LOGIC ;
Peak : out integer
);
end F u l l s c a l e S t i m u l a t i o n ;
architecture Structural of F ul l s c a l e S t i m u l a t i o n is
component AquisitionSystem is
Port ( L1CA_sig : in integer ;
clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
enb : in STD_LOGIC ;
Peak : out integer );
end component ;
component L1CA is
Port ( clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
enb : in STD_LOGIC ;
L1 : out integer
);
end component ;
signal L1_to_test : integer ;
begin
Testsignal : L1CA port map ( clk = > clk , reset = > reset ,
enb = > enb , L1 = > L1_to_test );
Se ri al _a cq ui si ti on : AquisitionSystem port map ( clk = > clk ,
reset = > reset , enb = > enb , L1CA_sig = > L1_to_test , Peak = > Peak );
end Structural ;
67
L1CA structural code
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
USE ieee . numeric_std . ALL ;
entity L1CA is
Port ( clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
enb : in STD_LOGIC ;
L1 : out integer
);
end L1CA ;
component clk_div is
port (
clk_NEXYS4 : in std_logic ;
rst : in std_logic ;
LO_1260000 : out std_logic ;
Data_50 : out std_logic ;
CA_1023000 : out std_logic );
end component ;
component NRZform is
Port ( OneLevel : in STD_LOGIC ;
TwoLevel : out integer );
end component ;
component Oscilator IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
clk_enable : IN std_logic ;
-- ce_out : OUT std_logic ;
Sin_out : OUT std_logic_vector (15 DOWNTO 0);
-- sfix16_En14
Cos_out : OUT std_logic_vector (15 DOWNTO 0)
-- sfix16_En14
);
END component ;
68
signal CA_clk : std_logic ;
signal LO_clk : std_logic ;
signal CA_seq : std_logic ;
signal Data_seq : std_logic ;
signal Mod2SumOnelevel : std_logic ;
signal Mod2sumTwolevel : integer ;
signal c ar ri er Wa ve In te ge r : integer ;
begin
FreqSource : clk_div port map ( clk_NEXYS4 = > clk , rst = > reset ,
Data_50 = > Data_clk , CA_1023000 = > CA_clk ,
LO_1260000 = > LO_clk );
Dataa : alpha port map ( clk = > Data_clk , reset = > reset , enb = > enb ,
PN1 = > Data_seq );
RangingCode : alpha port map ( clk = > CA_clk , reset = > reset , enb = > enb ,
PN1 = > CA_seq );
carrierwave : Oscilator port map ( clk = > LO_clk , reset = > reset ,
clk_enable = > enb , Sin_out = > Lsin , Cos_out = > Lcos );
ca rr ie rW av eI nt eg er <= to_integer ( signed ( Lsin ));
L1 <= car ri er Wa ve In te ge r * Mod2sumTwolevel ;
end Structural ;
69
Acquisition system structural code
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
USE ieee . numeric_std . ALL ;
entity AquisitionSystem is
Port ( L1CA_sig : in integer ;
clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
enb : in STD_LOGIC ;
Peak : out integer );
end AquisitionSystem ;
component clk_div is
port (
clk_NEXYS4 : in std_logic ;
rst : in std_logic ;
LO_1260000 : out std_logic ;
Data_50 : out std_logic ;
CA_1023000 : out std_logic );
end component ;
component alpha IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
enb : IN std_logic ;
PN1 : OUT std_logic -- ufix1
);
END component ;
component Oscilator IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
clk_enable : IN std_logic ;
Sin_out : OUT std_logic_vector (15 DOWNTO 0);
-- sfix16_En14
Cos_out : OUT std_logic_vector (15 DOWNTO 0)
-- sfix16_En14
);
END component ;
component NRZform is
Port ( OneLevel : in STD_LOGIC ;
TwoLevel : out integer );
end component ;
component Avarage is
Port (
I_cor : in integer ;
70
Q_cor : integer ;
Peak : out integer ;
clk : in STD_LOGIC ;
reset : in STD_LOGIC );
end component ;
Component T h r e s h o l d A n d C o n t r o l L o g i c is
Port ( clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
Peak : in integer ;
SateliteState : out STD_LOGIC );
end component ;
signal LOcos : std_logic_vector (15 DOWNTO 0);
signal LOsin : std_logic_vector (15 DOWNTO 0);
begin
FreqSource : clk_div port map ( clk_NEXYS4 = > clk , rst = > reset ,
Data_50 = > Data_clk , CA_1023000 = > CA_clk ,
LO_1260000 = > LO_clk );
LocalPRN : alpha port map ( clk = > CA_clk , reset = > ResetCA , enb = > enb ,
PN1 = > CA );
71
correlator power Avarage
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
use IEEE . numeric_bit . all ;
use ieee . numeric_std . all ;
use ieee . st d_ lo gic _u ns ig ne d . all ;
entity Avarage is
Port (
I_cor : in integer ;
Q_cor : integer ;
Peak : out integer ;
clk : in STD_LOGIC ;
reset : in STD_LOGIC );
end Avarage ;
begin
CohIntAndDum : Process ( clk , reset , accumMax , I_cor , Q_cor )
variable accumNumber : integer := 0;
variable I_sum : integer := 0;
variable Q_sum : integer := 0;
begin
if reset = ’0 ’ then
I_sum := 0;
Q_sum := 0;
accumNumber := 0;
72
I_Env <= I_accum * I_accum ;
Q_Env <= Q_accum * Q_accum ;
end process ;
end Behavioral ;
73
Detection and control logic
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
USE ieee . numeric_std . ALL ;
entity T h r e s h o l d A n d C o n t r o l L o g i c is
Port ( clk : in STD_LOGIC ;
reset : in STD_LOGIC ;
Peak : in integer ;
SateliteState : out STD_LOGIC );
end T h r e s h o l d A n d C o n t r o l L o g i c ;
architecture Behavioral of T h r e s h o l d A n d C o n t r o l L o g i c is
type sat_state is ( Aquired , NotAquired );
signal ControlLogic : sat_state := NotAquired ;
constant Threshold : integer := 5000;
begin
process ( clk , reset , Peak , ControlLogic )
begin
if reset = ’0 ’ then
ControlLogic <= NotAquired ;
elsif rising_edge ( clk ) then
if Peak >= Threshold then
ControlLogic <= Aquired ;
else
ControlLogic <= NotAquired ;
end if ;
end if ;
end process ;
process ( ControlLogic )
begin
case ControlLogic is
when Aquired = > SateliteState <= ’1 ’;
when others = > sateliteState <= ’0 ’;
end case ;
end process ;
end Behavioral ;
74
Frequency divider
entity clk_div is
port (
clk_NEXYS4 : in std_logic ;
rst : in std_logic ;
LO_1260000 : out std_logic ;
Data_50 : out std_logic ;
CA_1023000 : out std_logic );
end clk_div ;
75
clkData <= not clkData ;
presData <= ( others = > ’0 ’);
end if ;
end if ;
end process ;
CA_1023000 <= clkCA ;
LO_1260000 <= clkLO ;
Data_50 <= clkData ;
end Behavioral ;
76
NRZ formarting
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
entity NRZform is
Port ( OneLevel : in STD_LOGIC ;
TwoLevel : out integer );
end NRZform ;
77
DDFS
LIBRARY IEEE ;
USE IEEE . std_logic_1164 . ALL ;
USE IEEE . numeric_std . ALL ;
ENTITY Oscilator IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
clk_enable : IN std_logic ;
-- ce_out : OUT std_logic ;
Sin_out : OUT std_logic_vector (15 DOWNTO 0);
Cos_out : OUT std_logic_vector (15 DOWNTO 0)
);
END Oscilator ;
BEGIN
enb <= clk_enable ;
PROCESS ( address_cnt )
BEGIN
CASE address_cnt IS
WHEN "000" = > Sin_out1 <= " 00 0 0 00 0 0 00 0 0 00 0 0 ";
WHEN "001" = > Sin_out1 <= " 00 1 1 11 0 0 11 0 1 11 1 0 ";
WHEN "010" = > Sin_out1 <= " 00 1 0 01 0 1 10 0 1 11 1 0 ";
WHEN "011" = > Sin_out1 <= " 11 0 1 10 1 0 01 1 0 00 1 0 ";
WHEN "100" = > Sin_out1 <= " 11 0 0 00 1 1 00 1 0 00 1 0 ";
WHEN OTHERS = > Sin_out1 <= " 11 0 0 00 1 1 00 1 0 00 1 0 ";
END CASE ;
78
END PROCESS ;
PROCESS ( address_cnt_1 )
BEGIN
CASE address_cnt_1 IS
WHEN "000" = > Cos_out1 <= " 00 0 0 00 0 0 00 0 0 00 0 0 ";
WHEN "001" = > Cos_out1 <= " 11 0 0 00 1 1 00 1 0 00 1 0 ";
WHEN "010" = > Cos_out1 <= " 11 0 1 10 1 0 01 1 0 00 1 0 ";
WHEN "011" = > Cos_out1 <= " 00 1 0 01 0 1 10 0 1 11 1 0 ";
WHEN "100" = > Cos_out1 <= " 00 1 1 11 0 0 11 0 1 11 1 0 ";
WHEN OTHERS = > Cos_out1 <= " 00 1 1 11 0 0 11 0 1 11 1 0 ";
END CASE ;
END PROCESS ;
END rtl ;
79
Single bit to integer converter
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
USE ieee . numeric_std . ALL ;
entity st d _ ve c t or _ c o nv e t er is
port (
clk : in std_logic ;
bit_sig : in std_logic ;
-- outsig : out std_logic_vector (3 downto 0);
integer_sig : out integer
);
end s td _ v ec t o r_ c o nv e t e r ;
architecture Behavioral of s td _ v ec t o r_ c o nv e t er is
type X is array (3 downto 0) of STD_LOGIC ;
signal vectorsig : x := ( others = > ’0 ’);
begin
process ( clk )
variable c : integer := 0;
variable siga : x := ( others = > ’0 ’);
begin
if rising_edge ( clk ) then
siga ( c ) := bit_sig ;
c := c +1;
if c = 4 then
-- converting to vector of std_logic
vectorsig <= siga ;
c := 0;
end if ;
end if ;
end process ;
integer_sig <= to_integer ( unsigned ( vectorsig ));
-- convecting to integer
end Behavioral ;
80
C/A
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
entity CAsimulink is
Port (
reset : in STD_LOGIC ;
clk : in STD_LOGIC ;
en : in std_logic ;
CA : out STD_LOGIC );
end CAsimulink ;
component alpha IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
enb : IN std_logic ;
PN1 : OUT std_logic -- ufix1
);
END component ;
begin
slow : clk_divider port map ( clksys = > clk , slow_clk = > clk_ca );
pr : alpha port map ( clk = > clk_ca , reset = > reset , enb = > en , PN1 = > CA );
end structural ;
-- - - - - - - - - - - - - - - - - - - - - - - - CA / Code with PRN phase for satelite_ID1 - -(2 xor 6) - -
LIBRARY IEEE ;
USE IEEE . std_logic_1164 . ALL ;
USE IEEE . numeric_std . ALL ;
USE work . untitled_pkg . ALL ;
ENTITY alpha IS
PORT ( clk : IN std_logic ;
reset : IN std_logic ;
enb : IN std_logic ;
PN1 : OUT std_logic -- ufix1
);
END alpha ;
ARCHITECTURE rtl OF alpha IS
81
constant s1s2 : integer := 8; -- sate1 sel2
-- Signals
SIGNAL G1_out1 : unsigned (7 DOWNTO 0); -- uint8
SIGNAL G1_out1_is_not0 : std_logic ;
SIGNAL G2_out1 : unsigned (7 DOWNTO 0); -- uint8
SIGNAL G2_out1_is_not0 : std_logic ;
SIGNAL alpha_out1 : std_logic ; -- ufix1
SIGNAL pn_reg : unsigned (9 DOWNTO 0); -- ufix10
SIGNAL pn_out : std_logic ;
SIGNAL pn_xorout : std_logic ;
SIGNAL pn_newvalue : v e c t o r _ o f _ u n s i g n e d 1 0 (0 TO 1);
-- ufix10 [2]
SIGNAL pn_value_shifted : unsigned (8 DOWNTO 0); -- ufix9_E1
SIGNAL pn_reg_1 : unsigned (9 DOWNTO 0); -- ufix10
SIGNAL pn_out_1 : std_logic ;
SIGNAL pn_xorout_1 : std_logic ;
SIGNAL pn_newvalue_1 : v e c t o r _ o f _ u n s i g n e d 1 0 (0 TO 1);
-- ufix10 [2]
SIGNAL p n_ va lu e_ sh if te d_ 1 : unsigned (8 DOWNTO 0); -- ufix9_E1
BEGIN
82
pn _v al ue _s hi ft ed _1 <= pn_newvalue_1 (0)(9 DOWNTO 1);
-- select phase
END rtl ;
83
B.2 Synthesizable
Integrator and dumper
library IEEE ;
use IEEE . STD_LOGIC_1164 . ALL ;
use IEEE . numeric_bit . all ;
use ieee . numeric_std . all ;
use ieee . st d_ lo gic _u ns ig ne d . all ;
entity C oh er en tI nt eg ra to r is
Port ( Xin : in std_logic_vector (4 downto 0);
intsum : inout std_logic_vector (4 downto 0);
Sum : out std_logic_vector (9 downto 0);
clk : in STD_LOGIC ;
reset : in STD_LOGIC );
end Co he re ntI nt eg ra to r ;
begin
Process ( clk , reset , Xin , intsum )
variable s : integer ;
variable insum : std_logic_vector (4 downto 0);
-- variable countv : std_logic_vector (7 downto 0):= ( others = > ’0 ’);
begin
if reset = ’0 ’ then
intsum <= ( others = > ’0 ’);
insum := ( others = > ’0 ’);
s :=0;
elsif rising_edge ( clk ) then
insum := insum + Xin ;
s := s +1;
if s = count then
intsum <= insum ;
insum := ( others = > ’0 ’);
s :=0;
end if ;
end if ;
end process ;
process ( intsum ) is
begin
sum <= intsum * intsum ;
end process ;
end Behavioral ;
84