Hauptinhalt

Diese Seite wurde mithilfe maschineller Übersetzung übersetzt. Klicken Sie hier, um die neueste Version auf Englisch zu sehen.

GNSS-Simulationsübersicht

Durch die Simulation des globalen Navigationssatellitensystems (GNSS) werden Positionsschätzungen für den Empfänger erstellt. Diese Empfängerpositionsschätzungen stammen von GPS- und GNSS-Sensormodellen als gpsSensor- und gnssSensor-Objekte. Überwachen Sie den Status der Positionsschätzung im gnssSensor anhand der Verdünnung der Präzisionsausgaben und vergleichen Sie die Anzahl der verfügbaren Satelliten.

Simulationsparameter

Geben Sie die Parameter an, die in der GNSS-Simulation verwendet werden sollen:

  • Abtastrate des GNSS-Empfängers

  • Lokaler Navigationsreferenzrahmen

  • Standort auf der Erde in Breitengrad-, Längengrad- und Höhenkoordinaten (LLA)

  • Anzahl der zu simulierenden Beispiele

Fs = 1;
refFrame = "NED";
lla0 = [42.2825 -71.343 53.0352];
N = 100;

Erstellen Sie eine Flugbahn für einen stationären Sensor.

pos = zeros(N, 3);
vel = zeros(N, 3);
time = (0:N-1) ./ Fs;

Sensormodellerstellung

Erstellen Sie die GNSS-Simulationsobjekte gpsSensor und gnssSensor, indem Sie für jedes die gleichen Anfangsparameter verwenden.

gps = gpsSensor("SampleRate", Fs, "ReferenceLocation", lla0, ...
    "ReferenceFrame", refFrame);

gnss = gnssSensor("SampleRate", Fs, "ReferenceLocation", lla0, ...
    "ReferenceFrame", refFrame);

Simulation mit gpsSensor

Generieren Sie mithilfe des GPS-Sensors Ausgaben von einem stationären Empfänger. Visualisieren Sie die Position in LLA-Koordinaten und die Geschwindigkeit in jede Richtung.

% Generate outputs.
[llaGPS, velGPS] = gps(pos, vel);

% Visualize position.
figure
subplot(3, 1, 1)
plot(time, llaGPS(:,1))
title('Latitude')
ylabel('degrees')
xlabel('s')
subplot(3, 1, 2)
plot(time, llaGPS(:,2))
title('Longitude')
ylabel('degrees')
xlabel('s')
subplot(3, 1, 3)
plot(time, llaGPS(:,3))
title('Altitude')
ylabel('m')
xlabel('s')

Figure contains 3 axes objects. Axes object 1 with title Latitude, xlabel s, ylabel degrees contains an object of type line. Axes object 2 with title Longitude, xlabel s, ylabel degrees contains an object of type line. Axes object 3 with title Altitude, xlabel s, ylabel m contains an object of type line.

% Visualize velocity.
figure
plot(time, velGPS)
title('Velocity')
legend('X', 'Y', 'Z')
ylabel('m/s')
xlabel('s')

Figure contains an axes object. The axes object with title Velocity, xlabel s, ylabel m/s contains 3 objects of type line. These objects represent X, Y, Z.

Simulation mit gnssSensor

Generieren Sie mithilfe des GNSS-Sensors Ausgaben von einem stationären Empfänger. Visualisieren Sie Position und Geschwindigkeit und beachten Sie die Unterschiede in der Simulation.

% Generate outputs.
[llaGNSS, velGNSS] = gnss(pos, vel);

% Visualize positon.
figure
subplot(3, 1, 1)
plot(time, llaGNSS(:,1))
title('Latitude')
ylabel('degrees')
xlabel('s')
subplot(3, 1, 2)
plot(time, llaGNSS(:,2))
title('Longitude')
ylabel('degrees')
xlabel('s')
subplot(3, 1, 3)
plot(time, llaGNSS(:,3))
title('Altitude')
ylabel('m')
xlabel('s')

Figure contains 3 axes objects. Axes object 1 with title Latitude, xlabel s, ylabel degrees contains an object of type line. Axes object 2 with title Longitude, xlabel s, ylabel degrees contains an object of type line. Axes object 3 with title Altitude, xlabel s, ylabel m contains an object of type line.

% Visualize velocity.
figure
plot(time, velGNSS)
title('Velocity')
legend('X', 'Y', 'Z')
ylabel('m/s')
xlabel('s')

Figure contains an axes object. The axes object with title Velocity, xlabel s, ylabel m/s contains 3 objects of type line. These objects represent X, Y, Z.

Verwässerung der Präzision

Das gnssSensor-Objekt verfügt im Vergleich zu gpsSensor über eine Simulation mit höherer Wiedergabetreue. Beispielsweise verwendet das gnssSensor-Objekt simulierte Satellitenpositionen, um die Empfängerposition zu schätzen. Dies bedeutet, dass die horizontale Präzisionsverminderung (HDOP) und die vertikale Präzisionsverminderung (VDOP) zusammen mit der Positionsschätzung gemeldet werden können. Diese Werte geben an, wie genau die Positionsbestimmung auf Grundlage der Satellitengeometrie ist. Kleinere Werte weisen auf eine genauere Schätzung hin.

% Set the RNG seed to reproduce results. 
rng('default')

% Specify the start time of the simulation.
initTime = datetime(2020, 4, 20, 18, 10, 0, "TimeZone", "America/New_York");

% Create the GNSS receiver model.
gnss = gnssSensor("SampleRate", Fs, "ReferenceLocation", lla0, ...
    "ReferenceFrame", refFrame, "InitialTime", initTime);

% Obtain the receiver status. 
[~, ~, status] = gnss(pos, vel);
disp(status(1))
      SatelliteAzimuth: [7x1 double]
    SatelliteElevation: [7x1 double]
                  HDOP: 1.1290
                  VDOP: 1.9035

Sehen Sie sich das HDOP während der gesamten Simulation an. Es kommt zu einem Rückgang des HDOP. Dies bedeutet, dass sich die Satellitengeometrie geändert hat.

hdops = vertcat(status.HDOP);

figure
plot(time, vertcat(status.HDOP))
title('HDOP')
ylabel('m')
xlabel('s')

Figure contains an axes object. The axes object with title HDOP, xlabel s, ylabel m contains an object of type line.

Überprüfen Sie, ob sich die Satellitengeometrie geändert hat. Suchen Sie den Index, bei dem der HDOP gesunken ist, und prüfen Sie, ob dies einer Änderung der Anzahl der sichtbaren Satelliten entspricht. Die Variable numSats erhöht sich von 7 auf 8.

% Find expected sample index for a change in the
% number of satellites in view.
[~, satChangeIdx] = max(abs(diff(hdops)));

% Visualize the satellite geometry before the
% change in HDOP.
satAz = status(satChangeIdx).SatelliteAzimuth;
satEl = status(satChangeIdx).SatelliteElevation;
numSats = numel(satAz);
skyplot(satAz, satEl);
title(sprintf('Satellites in View: %d\nHDOP: %.4f', ...
    numSats, hdops(satChangeIdx)))

Figure contains an object of type skyplot.

% Visualize the satellite geometry after the
% change in HDOP.
satAz = status(satChangeIdx+1).SatelliteAzimuth;
satEl = status(satChangeIdx+1).SatelliteElevation;
numSats = numel(satAz);
skyplot(satAz, satEl);
title(sprintf('Satellites in View: %d\nHDOP: %.4f', ...
    numSats, hdops(satChangeIdx+1)))

Figure contains an object of type skyplot.

Die HDOP- und VDOP-Werte können als Diagonalelemente in Mess-Kovarianzmatrizen verwendet werden, wenn Positionsschätzungen des GNSS-Empfängers unter Verwendung eines Kalman-Filters mit anderen Sensormessungen kombiniert werden.

% Convert HDOP and VDOP to a measurement covariance matrix.
hdop = status(1).HDOP;
vdop = status(1).VDOP;
measCov = diag([hdop.^2/2, hdop.^2/2, vdop.^2]);
disp(measCov)
    0.6373         0         0
         0    0.6373         0
         0         0    3.6233