Main Content

gnssSignalTracker

Track phase, frequency, and delay offsets in GNSS signal

Since R2023b

Description

The gnssSignalTracker System object™ tracks the phase, frequency, and delay offsets of a global navigation satellite system (GNSS) signal. This object uses a phase locked loop (PLL), frequency locked loop (FLL), and delay locked loop (DLL) to track phase, frequency, and code phase, respectively, in the incoming signal. The object supports tracking these GNSS signals.

  • GPS — Global Positioning System for course acquisition codes (C/A-codes) [1] and L1 civil (L1C)-Data code [2]

  • NavIC — Navigation with Indian Constellation for C/A-code [3]

  • QZSS — Quasi-Zenith Satellite System for C/A-code [4]

To track the phase, frequency, and delay offsets of a GNSS signal:

  1. Create the gnssSignalTracker object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

example

gst = gnssSignalTracker creates a default GNSS signal tracker System object.

gst = gnssSignalTracker(Name,Value) sets properties using one or more name-value arguments. For example, gnssSignalTracker(GNSSSignalType="QZSS C/A") sets the type of GNSS signal to "QZSS C/A".

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Type of GNSS signal, specified as one of these options.

  • "GPS C/A"

  • "GPS L1CD

  • "NavIC L5 C/A"

  • "NavIC S C/A"

  • "QZSS C/A"

Data Types: char | string

Sample rate of the input signal in hertz, specified as a scalar greater than or equal to 1000.

Data Types: single | double

Center frequency of the input signal in hertz, specified as a nonnegative scalar.

Data Types: single | double

Integration time in seconds, specified as a numeric scalar. The value must be an integer multiple of 1e–3, and must be in the range [1e–3, 20e–3], corresponding to 1 to 20 milliseconds.

When you set the GNSSSignalType property to "GPS L1CD", IntegrationTime property is not visible and the object sets it to 10e-3 internally.

Tunable: Yes

Data Types: single | double

Pseudo-random noise (PRN) IDs of the satellites to track, specified as one of these options.

  • Scalar — Use this option to input a PRN ID for a single satellite.

  • Vector — Use this option to input PRN IDs for multiple satellites. Each element in the vector creates a new receiver tracking channel.

    The object supports tracking of a maximum of eight satellites. Hence, the length of PRNID must be less than or equal to 8.

The PRN ID value depends on the GNSSSignalType property value.

  • If GNSSSignalType is set to "GPS C/A" or "GPS L1CD" — Each element in PRNID must be an integer in the range [1, 210].

  • If GNSSSignalType is set to "NavIC L5 C/A" or "NavIC S C/A" — Each element in PRNID must be an integer in the range [1, 14].

  • If GNSSSignalType is set to "QZSS C/A" — Each element in PRNID must be an integer in the range [183, 202].

Data Types: single | double | uint8

Initial code phase offset of the tracking satellites, specified as one of these options.

  • Scalar in the range [0, 10230] — Use this option to assign the same offset value to each tracking channel.

  • Vector with elements in the range [0, 10230] — Use this option to assign an individual offset value to each tracking channel. The length of the vector must be equal to the length of PRNID.

The initial code phase offset value depends on the GNSSSignalType property value.

  • If GNSSSignalType is set to "GPS C/A", "NavIC L5 C/A", "NavIC S C/A", or "QZSS C/A" — Each element in InitialCodePhaseOffset must be an integer in the range [0, 1023].

  • If GNSSSignalType is set to "GPS L1CD" — Each element in InitialCodePhaseOffset must be an integer in the range [0, 10230].

The initial code phase offset consists of the estimated delay from the acquisition block, in number of ranging code chips.

Data Types: single | double

Initial frequency offset of the tracking satellites in hertz, specified as one of these options.

  • Scalar — Use this option to assign the same offset value to each tracking channel.

  • Vector — Use this option to assign an individual offset value to each tracking channel. The length of the vector must be equal to the length of PRNID.

You can initialize this offset value from the acquisition block.

Data Types: single | double

Option to disable the PLL, specified as a numeric or logical value of 0 (false) or 1 (true). Set this value to true to indicate the PLL is disabled.

You can specify the property using one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Tunable: Yes

Data Types: logical

Order of the PLL, specified as 1, 2, or 3.

The property can be specified as a one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Data Types: single | double | uint8

Noise bandwidth of the PLL in hertz, specified as one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Tunable: Yes

Data Types: single | double

Option to disable the FLL, specified as a numeric or logical value of 0 (false) or 1 (true). Set this value to true to indicate the FLL is disabled.

The property can be specified as a one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Tunable: Yes

Data Types: logical

Order of the FLL, specified as 1 or 2.

The property can be specified as a one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Data Types: single | double | uint8

Noise bandwidth of the FLL in hertz, specified as one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Tunable: Yes

Data Types: single | double

Order of the DLL, specified as 1 or 2.

The property can be specified as a one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Data Types: single | double | uint8

Noise bandwidth of the DLL in hertz, specified as one of these options.

  • Scalar — Use this option to assign the same value to each tracking channel.

  • Vector — Use this option to assign an individual value to each tracking channel. The length of the vector must be equal to the length of PRNID.

Tunable: Yes

Data Types: single | double

Usage

Description

[trackedWave,trackInfo] = gst(gpsWave) tracks the phase, frequency, and delay in the input waveform gpsWave, and returns the integrated version of the signal trackedWave, after correcting the respective phase, frequency, and delay errors.

This object implements the tracking algorithms specified in [5].

Input Arguments

expand all

Input waveform, specified as a column vector.

gpsWave can be of any length, but gst performs signal integration on SampleRate*IntegrationTime number of samples. gpsWave can be a complex baseband signal or a real intermediate frequency (IF) signal, depending on the value of IntermediateFrequency.

Data Types: single | double
Complex Number Support: Yes

Output Arguments

expand all

Integrated output signal, returned as a matrix of the same precision type as the input.

Each row of the matrix represents the integrated value of gpsWave for the set IntegrationTime. Each column of the matrix represents the tracked values for the corresponding PRN IDs. Hence, the number of columns is equal to the length of PRNID. Each column in the matrix is of length equal to floor(size(gpsWave,1)/(SampleRate*IntegrationTime)).

Complex Number Support: Yes

Tracking information, returned as a structure containing these fields.

FieldDescription
PhaseError

Output of the phase discriminator in the PLL that contains the residual error in the phase of the signal.

PhaseEstimate

Output of the numerically controlled oscillator (NCO) of the PLL that contains the phase offset estimate.

FrequencyError

Output of the frequency discriminator in the FLL that contains the residual error in the frequency of the signal.

FrequencyEstimate

Output of the NCO of the FLL that contains the frequency offset estimate.

DelayError

Output of the early-late discriminator in the DLL that contains the residual error in the delay of the signal.

DelayEstimate

Output of the NCO of the DLL that contains the delay estimate.

All fields of the structure have the same data precision and length as that of the trackedWave.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
cloneCreate duplicate System object
isLockedDetermine if System object is in use
resetReset internal states of System object

Examples

collapse all

Generate a waveform from four GPS satellites without any impairments, and track the signal.

Initialize the configuration parameters.

numsat = 4;
PRNIDs = [7; 11; 20; 28];
SampleRate = 5e6;                    % In samples/sec
upfac = SampleRate/1.023e6;
numSamples = round(SampleRate*1e-3);   

Generate the spreading code with the help of the gnssCACode function.

cacode = 1 - 2*double(gnssCACode(PRNIDs,"GPS"));
[u,d] = rat(upfac);
idx = 1:d:u*size(cacode,1);
upcacode = cacode(ceil(idx/u),:);
upcacode = upcacode(1:numSamples,:);
pcoderand = (1-2*repmat([1; 0],size(upcacode,1)/2,1))/sqrt(2);  

Generate random data for 20 bits.

numBits = 20;                             % Generate waveform for 20 bits
numCACodeBlocksPerBit = 20;
data = 1 -  2*randi([0 1],numBits,1);
numsteps = numBits*numCACodeBlocksPerBit; 

Create the tracking object and set its properties.

gst = gnssSignalTracker(PRNID=PRNIDs,SampleRate=SampleRate);
tr = zeros(numsteps,numsat);
trinfo = struct("PhaseError",[],"PhaseEstimate",[],"FrequencyError",[],"FrequencyEstimate",[], ...
                "DelayError",[],"DelayEstimate",[]);  

Generate the waveform in a loop and track it.

for istep = 1:numsteps
     % Generate waveform
     bitidx = floor((istep-1)/numCACodeBlocksPerBit) + 1;
     iqsig = (pcoderand + 1j*upcacode).*data(bitidx);
     waveform = sum(iqsig,2);
   
     % Track generated waveform
     [tr(istep,:),trinfo(istep)] = gst(waveform);
end

Plot the constellation of the tracking output. While the loops are converging, frequency offset varies in the signal. You can observe this in the phase offset in the plot.

scatterplot(tr(:))

References

[1] IS-GPS-200, Rev:N. "NAVSTAR GPS Space Segment/Navigation User Segment Interfaces." GPS Enterprise Space & Missile Systems Center (SMC) - LAAFB, Aug 22, 2022.

[2] IS-GPS-800, Rev:J. "NAVSTAR GPS Space Segment/User Segment L1C Interfaces." GPS Enterprise Space & Missile Systems Center (SMC) - LAAFB, Aug 22, 2022.

[3] ISRO-IRNSS-ICD-SPS-1.1. "Signal in Space ICD for Standard Positioning Service." ISRO satellite navigation programme. August 2017.

[4] IS-QZSS-PNT-004. "Quasi-Zenith Satellite System. Interface Specification. Satellite Positioning, Navigation and Timing Service." Cabinet office, Government of Japan. January 25, 2021.

[5] Kaplan, Elliott D., and C. Hegarty, eds. Understanding GPS/GNSS: Principles and Applications. Third edition. GNSS Technology and Applications Series. Boston; London: Artech House, 2017.

Extended Capabilities

Version History

Introduced in R2023b

expand all