GNSS Signal Simulation (GPS and Galileo Receiver) Part 1

When implementing the signal processing parts of the GPS receiver, it is necessary to have some data available for testing their functionality. The final goal is to have a GPS receiver working in real time on data obtained from a GPS antenna through an RF front end and an ADC. In the phase of developing the signal processing algorithms, however, it is not optimal to use real sampled data. The main reason for this is that it is impossible to control the properties of the received and sampled GPS signals. It is not only impossible to control the received signals, it is also impossible to know all the properties of the received signals.

The solution to this problem is to use simulated data. In lack of a suitable GPS signal simulator, it may be necessary to implement one.

A useful L1 GPS signal simulator should include the following global parameters associated with the down conversion and sampling of the signal:

Intermediate Frequency It should be possible to input the value of the IF. The IF will then be the reference frequency to which the Doppler shift of the satellite signals should be compared.

Sampling Frequency It should be possible to input the value of the sampling frequency used to sample the GPS signals.

With the possibility of setting these parameters, it would be possible to test the algorithms with simulated data with the same properties as the data sampled from a GPS antenna through an RF front end.


PRN The pseudorandom noise number corresponding to the satellite. This number indicates which of the C/A codes should be used.

Doppler The Doppler count is the frequency deviation from the IF. The Doppler count is directly associated with line-of-sight dynamics between the satellite and the receiver.

Code Phase The code phase is the time alignment of the PRN code in the received data.

P(Y) Code In addition to the C/A code, the L1 signal contains the P(Y) code. This code is modulated onto the carrier wave as a quadrature component while the C/A code is present in the in-phase component.

Data Bits The navigation data bits are phase-modulated onto the carrier wave with a frequency of 50 Hz.

Signal Strength Due to the long signal path from the satellite to the receiver in combination with a low power transmitter at the satellite, the received signal is very weak. An additional property of the GPS signal is the signal-to-noise ratio (SNR), the ratio between the signal and the noise originating from the signal path.

The signal simulator should meet the above description of the global parameters and the GPS signal properties. For each satellite it should be possible to define PRN, Doppler, and code phase. The P(Y) code is not relevant to the acquisition and tracking algorithms. As a result of that, this component is simplified in the simulator. The P(Y) code is simulated as a digital signal alternating between -1 and 1 with the P(Y) code rate of 10.23 MHz. In most cases, the navigation data are not relevant to the acquisition and tracking algorithms. So by default the navigation data signal is also simulated as a digital signal alternating between -1 and 1 with the navigation data rate of 50 Hz. This gives a data bit transition each 20 ms. If a real navigation data sequence is needed it should be possible to provide it to the simulator.

Simulink Implementation

The GPS signal simulator could be implemented in any software development tool. The only demands to the program, except the possibility of implementing the needed functionalities, are

- It should be easy to change parameters of a simulation.

- It should be possible to save the simulated data in a file that can be read by MATLAB.

The complete GPS signal simulator for one satellite implemented in Simulink. Part A generates the C/A code, Part B contains the navigation data generation, and Part C generates the simplified P(Y) code.

FIGURE B.1. The complete GPS signal simulator for one satellite implemented in Simulink. Part A generates the C/A code, Part B contains the navigation data generation, and Part C generates the simplified P(Y) code.

The MATLAB tool Simulink was chosen as the development tool for the GPS signal simulator. The main reason for this choice is that Simulink has a very intuitive user interface combined with its numerous features. One important feature in this case is that Simulink works perfectly together with ordinary M-files.

The Simulink implementation is a two-level design. The upper level is where each satellite contributing to the resulting signal is initialized. This is also where the data file in which the data should be saved is defined. The lower level is the implementation of each satellite. This is where the signal originating from each satellite is generated. The signals should include the following four components:

- C/A code

- Navigation data

- P(Y)code

- Noise.

Figure B.1 shows a screen shot of the lower level of the Simulink implementation representing the signal generation in a satellite.

The following will describe the four above-mentioned parts of the signal generator.

C/A Code Generation

The generation of the C/A code component of the GPS signal is marked with A in Figure B.1. Beginning from the left side of the figure, the source of the C/A code generator is the oscillator. This oscillator produces a squared pulse with a frequency of 1.023 MHz corresponding to the chipping rate of the C/A code. This pulse is used as input to a counter.

 C/A code counter output. (a) A complete cycle through all indexes of the code. (b) The first samples of the counter output. The initial value of the counter is the PRN code phase. In this case, the code phase is 51.

FIGURE B.2. C/A code counter output. (a) A complete cycle through all indexes of the code. (b) The first samples of the counter output. The initial value of the counter is the PRN code phase. In this case, the code phase is 51.

This counter is designed to count from 0 to 1022, referring to the 1023 chips in one PRN sequence. The counter increases its value each time a falling edge occurs in the pulse signal, that is, with a frequency of 1.023 MHz. The initial value of the counter is set by the PRN code phase, which is provided to the simulation as a parameter. The PRN code phase shifts the time alignment of the PRN code. Figure B.2 shows the output from the counter. These plots are made from a simulation with a sampling frequency of 12 MHz. A sampling frequency of 12 MHz causes 12,000 samples to last 1 ms, corresponding to one complete PRN code period.

Figure B.2a shows the output of the counter in a complete PRN code period. At sample zero the output of the counter corresponds to the PRN code phase. When the output reaches 1022 at approximately sample 11,000, the output is reset to its initial value 0. Figure B.2b is a close-up on the first samples of the output from the counter. The code phase is the initial value of the output, which in this case is 51. This figure shows the step function of the counter. Every time a chip period has passed the output, the counter increases by 1. When sampling with 12 MHz, a chip period of 1 ms/1023 lasts approximately 12 samples.

The output from the counter is provided as input to the next block of the C/A code generation part. This block is a so-called look-up table which is actually just an array indexed by the input to the block. In this case, the look-up table is a two-dimensional array containing the 32 possible PRN codes; see Section 2.3 for details on PRN codes. The first dimension indicates which of the 32 PRN codes should be used. This is the satellite supplied to the simulation. The second dimension indicates which of the 1023 chips that should be accessed. This is the input to the look-up table block. In this case, the array is input to the simulation from the MATLAB workspace. That is, before starting the simulation, the array with the PRN codes has to be generated. The implementation of the PRN code generator is described in Section 6.2. The resulting C/A code signal is shown in Figure B.3.

 C/A code. (a) A complete cycle through a complete PRN code period. (b) The first samples of the C/A code.

FIGURE B.3. C/A code. (a) A complete cycle through a complete PRN code period. (b) The first samples of the C/A code.

The sampled C/A code is multiplied with the sampled navigation data in the next block. The navigation data is also a binary data sequence consisting of — 1′s and 1 ‘s. The sampled navigation data generation will be described in the following section.

When the C/A code is combined with the navigation data, it must be modulated onto a carrier. This carrier is generated as a cosine wave in a voltage-controlled oscillator (VCO). The VCO has an input from a ramp block. This block simulates the change in frequency as a function of the Doppler rate. If the Doppler rate is zero, the frequency of the VCO remains constant.

The BPSK modulation of the C/A code and data signal is implemented as a multiplication of the signal with the generated carrier wave.

Navigation Data Generation

The generation of the navigation data component of the GPS signal is indicated within part B in Figure B.1. As mentioned earlier, the bit rate of the binary navigation data sequence is 50 Hz. In the simulator, the generator signal to the navigation data sequence is obtained from the output of the counter in the C/A part. As seen in Figure B.2a, the counter resets after running through a complete PRN code sequence. As mentioned, this period is 1 ms corresponding to a rate of 1 kHz. To obtain a 50 Hz signal from the signal supplied by the C/A counter, the first block in the navigation data part is a counter, which increases its value on every falling edge of the input signal. The counter resets when it reaches 20, that is, every 20 ms corresponding to 50 Hz. That is, the output from the first counter in the navigation data part of the simulator supplies a 50 Hz signal to the next block.

The next block is also a counter. This counter works in the same way as the counter in the C/A part. That is, it increases its output value with every falling edge of the input signal, and it resets at the end of a period. In this case, the period is set to be one navigation data frame corresponding to 1500bits.

The next block is a look-up table much similar to that of the C/A part of the simulator. In this case the look-up table contains a two-dimensional array, where the first dimension selects whether or not there should be any navigation data transitions in the data. The second dimension is the index of the navigation bit to be the output from the look-up table. In case no navigation bit transitions are wanted, the look-up table always outputs the value 1. In the other case where navigation bit transitions are wanted, the look-up table outputs alternating -1′s and 1′s.

The output from the navigation data part is provided to the C/A and the P code part through a multiplicator.

P Code Generation

The generation of the P code component of the GPS signal is indicated within Part C in Figure B.1. As mentioned before, the P code component is not relevant to the acquisition and tracking algorithms and should thus only be simulated as a squared pulse alternating between -1 and 1. In the GPS signal simulator this signal is implemented as a squared pulse generator with a frequency corresponding to the chipping rate of the P code, which is 10.23 MHz.

In the second block of the P code part, this signal is combined with the navigation data sequence. This is done in a similar way as the C/A part by multiplication of the two signals.

The carrier generation part in the lower left corner is also almost similar to the carrier generation part in the C/A part. The only difference here is that the VCO has a 90° phase shift compared to the other VCO. The result of this is that the P code VCO generates a sine wave compared to the C/A VCO’s cosine wave. The combined P code and navigation data signal is BPSK modulated onto the carrier in the multiplication block.

The final block of the P code part is a gain block. This block decreases the modulated P code signal by 3 dB in the same way as it is done in the signal generator in the GPS satellites.

Combining the Signal Components

The last part of the GPS signal simulator is located at the right-most part of Figure B.1. Here, the two modulated codes are combined, resulting in a complete GPS signal. The two components are simply added together as in-phase and quadrature components of the final signal.

The last part of the signal simulator is the addition of noise. This noise generator block is indicated with green in Figure B.1. The amount of noise is selected from an input to the simulation. The resulting noise from the noise generator is added to the GPS signal.

Upper-Level Implementation

When the lower level of the Simulink implementation of the GPS signal generator has been implemented, the upper-level implementation can be designed. The upper-level implements the different satellites needed in the simulation and selects the file in which the simulated data should be saved. Figure B.4 shows an example of how the upper level of the signal simulator could be implemented. In this case, the simulator contains four different satellites. Each of the satellites has different values of PRN, PRN code phase, Doppler shift, and Doppler rate that are typed into a window that pops up when one of the boxes in Part A is double-clicked.

The GPS signal simulator implemented in Simulink. This simulation includes four different satellites and saves the data in a file. The other window pops up when one of the signal simulator boxes are double-clicked. This window is used to set all values for one of the satellites in the simulation.

FIGURE B.4. The GPS signal simulator implemented in Simulink. This simulation includes four different satellites and saves the data in a file. The other window pops up when one of the signal simulator boxes are double-clicked. This window is used to set all values for one of the satellites in the simulation.

Next post:

Previous post: