Skip to content

Instantly share code, notes, and snippets.

@sarahrbek
Last active August 14, 2018 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarahrbek/42ada442757c7d44f5a0e30c57a4a04a to your computer and use it in GitHub Desktop.
Save sarahrbek/42ada442757c7d44f5a0e30c57a4a04a to your computer and use it in GitHub Desktop.

Expanding the receiver to BEIDOU B2a

This document provides a description of the work developed for GNSS-SDR during the GSoC 2018 program. The project intended to extend the capabilities of the GNSS-SDR software by providing a working implementation of acquisition and tracking of Beidou B2a signals. The addition of BeiDou B2a signals will increase the overall satellite visibility of the receiver and move the receiver towards providing coverage for all worldwide GNSS systems. As Beidou B2a consists of a data signal and a pilot signal with navigation information on the data signal, that is the focus of this project.

Team

Team Member Function
Sara Hrbek Developer
Damian Miralles Mentor
Luis Esteve Mentor

Project

This project aims to implement acquisition and tracking of the Beidou B2a signal, into GNSS-SDR. The initial state of a GNSS receiver is acquisition. The signals from the GNSS satellites generally consist of three parts: the carrier, the pseudo-random noise codes and the data bits. Some signals, for example GPS L5 and Beidou B2a among others also contain two signals transmitted 90 degrees out of phase from each other, in addition to also containing a secondary code. The signals are received at very low signal to noise ratio, actually below the noise floor. In order to acquire the signals, the pseudo-random noise (PRN) codes and the carrier frequencies are used. Both the PRN codes and the carrier frequencies have to be aligned to find the signal. Each satellite, has its own PRN code which is used for identification. The receiver generates a replica of the PRN code, shifting through all 10230 chips of the code, for each PRN to find out what signals are available. The second search space is the carrier frequency, which has a Doppler shift applied to it. In a cold start all possible Doppler shifts are required to check for in order to find the signal. GNSS-SDR already has a generic acquisition algorithm utilizing fast fourier transforms (FFT) for the delay space, which means that the bulk of this project is to implement the codes for Beidou B2a such that they can be used as an input for the existing acquisition algorithm.

After the available signals have been found, the next step is to maintain track of them. Since the satellites move with some speed over the sky, the Doppler frequency as well as the code frequency will change over time. The GNSS-SDR tracking algorithm utilizes a delay locked loop (DLL) for tracking the PRN code, and a phase locked loop (PLL) to track the carrier frequency.

Beidou B2a Acquisition

The Beidou B2a signal is fully described in [1]. The signal is transmitted on the L5 band at the frequency 1176.42MHz. It has two 90 degrees out of phase signals, a data signal and a pilot signal. The data signal as the name eludes to contain all the navigation data necessary to use the signals for positioning. The pilot signal can be used for longer coherent acqisition. Since there are no data bits it should be possible to acquire signals at a lower carrier to noise ratio (C/N0) utilizing the longer coherent integration. The Beidou B2a codes are 1 ms long, and contain 10230 chips, thus the chipping rate is 10.23MHz. The codes have very good auto-correlation properties. They are generated through modulo-2 addition of two 13-stage linear feedback shift registers shown below.

Primary Codes

The 13 stage linear feedback shift registers provide the so called G1 and G2 sequences which are then modulo-2 added to generate the final code. The G1 generator polynomials are

G1_data = 1 + x + x^5 + x^11 + x^13

G2_data = 1 + x^3 + x^5 + x^9 + x^11 +x^12 +x^13

For the pilot codes, the generation is similar, albeit with different polynomials for the G1 and G2 sequences.

G1_pilot = 1 + x^3 + x^6 + x^7 + x^13

G2_pilot = 1 + x + x^5 + x^7 + x^8 +x^12 +x^13

The initial 13 bit register for the G1 sequence are all ones. For the G2 sequence, the initial bits are different for each PRN and are provided in [1], Table 5-2. The 13 bit register for the G1 sequence is reset to its initial values at the 8190th chip.

This project is mainly focused on the data component of the Beidou B2a signal which contains the data for navigation. TODO

  • Code generation of data component
  • Code generation of pilot component is implemented but not tested.

Secondary Codes

Secondary codes for the data channel are 5 ms long, and consists of a 5 bit code [ 0 0 0 1 0 ]. For the pilot signal the secondary codes are 100 ms, and consists of truncated Weil codes.

The existence of the secondary codes reduces the coherent integration time, unless the secondary codes are removed. However, it is still possible to acquire the signal without decoding the secondary codes, the secondary code will simply show up as a part of the navigation message and can be removed at a later time.

For this project, two versions were explored. The first utilizing only the primary code, and the second generating the primary code with of the data signal was generated as 5 replicated codes with the 5 bit secondary code xor:ed with it. The secondary codes for the pilot signal were not implemented.

Some work still remains to fully implement acquisition with the secondary code included.

TODO

  • Secondary code generation of data component
  • Secondary code generation of data component fully integrated with acquisition

In the front-end, the analog signal is received, down converted to a lower frequency (called the intermediate frequency (IF)) quantized and sampled. This means that there are a specific number of samples per chip, such that the code needs to be sampled appropriately to provide an precise replica that can be cross-correlated with the incoming signal.

In acquisition the sampled codes are generated and the cross-correlated through the FFT to find the offset code-phase where the two codes line up. The Doppler frequency offset from the IF frequency is also found through shifting through the different frequency offsets finding the one that provides the strongest correlation peak.

An acquisition adapter to map between the generic FFT acquisition and code generation was implemented following the general convention. It was set to utilize only the primary codes for the data signal.

TODO

  • Acquisition adapter for Beidou B2a data signal
  • Unit test for Beidou B2a acquisition. 90 % done

Beidou B2a Tracking

When the signal has been acquired it is necessary to maintain track of it to obtain the navigation bits. Tracking is in essence a refined version of acquisition, it geneates a code replica, but only shifts it by 0.5 chips in either direction. These shifts are called correlators and they are labeled Early, Prompt and Late correlators, which are put in place such that the prompt correlator should have the highest correlation energy, and the Early and Late should be balanced. The DLL utilizes the Early and Late correlators through a discriminator function and then filters the result, providing a frequency offset with which the next code frequency should be adjusted.

The PLL works in a similar way. The Early, Prompt and Late correlators are multiplied with the IF frequency with both a cosine and a sine version then called inphase and quadrature versions. Now we are up to 6 correlators, Inphase: Early, Prompt and Late as well as Quadrature: Early, Prompt and Late. The phase discriminator is the 2 quadrature arctangent function of the Inphase Prompt and Quadrature Prompt correlators. The result of this discrimmiator is filtered and provides a carrier frequency offset for the next iteration.

A generic tracking function is already implement in the GNSS-SDR, so the work for providing Beidou B2a tracking is to develop the adapter for this specific signal between code generation and all the connections such that the Beidou B2a can utilize this generic tracking function. TODO

  • Tracking adapter for Beidou B2a data signal
  • Unit test for Beidou B2a tracking. 80 % done

Description of Work

Beidou B2a data component code generations were implemented. A version of the code which includes the secondary code for the data component was also written, although not fully tested. The acquisition adapter functions were written for use of Beidou B2a, as well as the tracking adapter functions. Unit tests were created, but were not finalized.

Code

Below are the most important commits for the code development.

  1. 767dcead755 : The first commit of this project.
  2. 766accdf422 : Adding the configuration files and initial code generation.
  3. fad13916d9f : Added acquisition parameters for Beidou.
  4. 1a453abc6dd : Connected the flowgraph
  5. 9f2d4fa0e65 : Code generation verification, acquisition functional
  6. 3e3770c7620 : Added tracking files
  7. f4c221609c5 : Tracking functional
  8. b431c7835165 ; Added acquisition unit test
  9. 227c1b99245 ; Added tracking unit test
  10. 24a31852d38 : Unit tests
  11. add8b6191cd : Latest commit

The code will be integrated into the GNSS-SDR as a single pull request.

Results

A data set for testing was provided by @dmiralles2009. Below is the skyplot which shows what satellites are available for acquisition. Note that this plot was generated through the use of two-line elements (TLE) which is not as accurate as almanacs. Low elevation satellites may not be picked up due to building coverage of the antenna. skyplot

The IGS website provides an overview of which Beidou satellites are available and their PRN number allocation as well as description. Hence PRN numbers 19, 22, 21, 27, 28, 30 should be visible.

Acquisition results are shown below for PRN 22, 27 and 30. Acquisition parameters for these figures were set to 5 ms coherent integration with 1 non-coherent summation and no data bit check. It should be mentioned that with this configuration PRN 21 and 19 were also picked up in acquisition although they were thrown out in tracking.

PRN 27 is shown in the skyplot as visible, which is also reflected in the gnss-sdr beidou B2a acquisition code. Below is the a figure from the acquisition matrix, generated through the gnss-sdr. The figure shows a strong auto-correlation peak for PRN 27. prn27acquisition

The 3D figure is split up so that the frequency and code phase can be more easily distinguished below. prn27acquisition_split

PRN 30 is also acquired with the Beidou B2a acquisition. prn30acquisition prn30acquisition_split

PRN 22 is much weaker than PRN 27, as evident in the below auto-correlation figures, generated from the gnss-sdr acquisition code. This PRN could benefit from longer coherent integration with the secondary codes enabled. prn22acquisition prn22acquisition_split

It is possible that there are more signals in the data set that are not currently picked up with these settings. However, it is clear that Beidou B2a acquisition is functional.

Below are tracking results for PRN 22, 27 and 30. The secondary codes are not removed, which is why the data bits does not show up clearly as one would expect with for example GPS L1 C/A that does not have a secondary code. PRN 22 tracking data shows the prompt I and Q values. Tracking is working well since the prompt discriminator is above the early and late, and the latter two are balanced. Prompt Q show only noise, while information is contained in Prompt I. prn22trackingdata

The DLL performance of tracking is shown here: prn22trackingcode

PLL performance is shown here: prn22trackingcarrier

The same type of plots are generated for PRN 27 and 30. Signals which are stronger than PRN 22 discussed above. prn27trackingdata prn27trackingcode prn27trackingcarrier

prn30trackingdata prn30trackingcode prn30trackingcarrier

Below is a printout from the gnss-sdr running the Beidou B2a configuration:

"Current receiver time: 1 s

Tracking of Beidou B2aData signal started on channel 0 for satellite Beidou PRN 30 (Block BEIDOU 3M8)

Beidou B2aData secondary code locked in channel 0 for satellite Beidou PRN 30 (Block BEIDOU 3M8)

Tracking of Beidou B2aData signal started on channel 1 for satellite Beidou PRN 27 (Block BEIDOU 3M3)

Beidou B2aData secondary code locked in channel 1 for satellite Beidou PRN 27 (Block BEIDOU 3M3)

Current receiver time: 2 s

Current receiver time: 3 s

Current receiver time: 4 s

Current receiver time: 5 s

Current receiver time: 6 s

Current receiver time: 7 s

Current receiver time: 8 s

Current receiver time: 9 s

Current receiver time: 10 s

Tracking of Beidou B2aData signal started on channel 2 for satellite Beidou PRN 22 (Block BEIDOU 3M6)

Beidou B2aData secondary code locked in channel 2 for satellite Beidou PRN 22 (Block BEIDOU 3M6)

Current receiver time: 11 s

Current receiver time: 12 s

Current receiver time: 13 s "

To Do

The unit tests needs a little bit of additional work. They are written but not fully functional yet.

  • Finalize unit tests for acquisition
  • Finalize unit tests for tracking

Conclusions

Acquisition and tracking was implemented for the Beidou B2a signal. Results show that 3 signals were acquired in the data set and that tracking is functional for the same 3 signals.

References

[1] BeiDou Navigation Satellite System Signal In Space Interface Control Document, Open Service Signal B2a (Version 1.0), China Satellite Navigation Office December, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment