Contenu principal

UE Position Estimation in NR NTN Systems Using PRS and SRS from LEO Satellites

R2026b
Since R2026b

This example estimates the user equipment (UE) position using New Radio (NR) measurements from LEO satellites in a non-terrestrial network (NTN) [2]. The low-Earth orbit (LEO) satellites serve as transmission reception points (TRPs) that transmit downlink positioning reference signals (PRS) and receive uplink sounding reference signals (SRS). The example implements two positioning methods. It uses downlink time difference of arrival (DL-TDOA) to estimate UE position from PRS-based timing measurements, and it uses multi-round trip time (Multi-RTT), which combine PRS and SRS measurements for position estimation. The example also compares both methods under identical conditions.

The example models the composite signal received at the UE by combining PRS waveforms from visible satellites selected as TRPs, applying a unique propagation delay and Doppler shift to each signal, and adding additive white Gaussian noise (AWGN) to the resulting waveform. The UE estimates the time of arrival (TOA) for each TRP by correlating the composite signal with the corresponding PRS sequence. For positioning using range and range-rate measurements from a single LEO satellite, see Receiver Position Estimation Using Range and Range-Rate Measurements in NTN Systems.

DL-TDOA and Multi-RTT Positioning Methods

DL-TDOA estimates the UE position from reference signal time difference (RSTD) measurements of DL-PRS received from multiple TRPs. The UE computes time differences between signals from pairs of satellites and solves the resulting hyperbolic equations using multilateration. This method requires inter-TRP synchronization but does not require uplink transmission from the UE. For reliable 3-D positioning, DL-TDOA requires at least five satellites. The linearized TDOA system solves for four unknowns, three spatial coordinates and the range to a reference TRP. Each additional satellite provides one RSTD equation, so five satellites provide four equations for four unknowns. Additional satellites improve geometric diversity and increase positioning accuracy.

Multi-RTT estimates the UE position from round-trip time measurements between the UE and each TRP. The UE measures receiver (Rx) to transmitter (Tx) time difference from DL-PRS, and each TRP measures gNB Rx-Tx time difference from uplink sounding reference signal (UL-SRS). The location management function (LMF) combines these measurements to compute the range for each link and determine the UE position by using trilateration. This method does not require inter-TRP synchronization but requires uplink SRS transmission. Multi-RTT requires a minimum of three satellites for 3-D positioning because the round-trip time measurement eliminates clock biases, leaving only the three spatial coordinates as unknowns.

Worst-Case LEO Link Budget

Before setting up the scenario, establish the noise level for the AWGN channel by computing the link budget at worst-case geometry. Compute the worst-case satellite link budget for a LEO satellite at minimum elevation angle. Use the slant range at this elevation to determine the maximum path loss and derive the corresponding Es/No. Then use this Es/No value to set the signal-to-noise ratio (SNR) for each resource element (RE), for the awgn channel.

% Compute expected slant range for a LEO satellite at minimum elevation
satAltitude = 500e3;                  % m (LEO orbit altitude)
minElevation = 10;                    % degrees (minimum usable elevation)
maxSlantRange = slantRangeCircularOrbit(minElevation,satAltitude,0);

% Configure satellite link budget, compute CNR and intermediate results
cnrCfg = satelliteCNRConfig;
cnrCfg.Frequency = 2;                % GHz (S-band NTN downlink)
cnrCfg.Bandwidth = 100;              % MHz (100 MHz NR channel)
cnrCfg.TransmitterPower = 10;        % dBW (satellite transmit power)
cnrCfg.TransmitterAntennaGain = 8;   % dBi (satellite antenna gain)
cnrCfg.Distance = maxSlantRange/1e3; % km (slant range)
cnrCfg.GainToNoiseTemperatureRatio = -5; % dB/K (handheld UE)
cnrCfg.MiscellaneousLoss = 3;        % dB (atmospheric and scintillation losses)
[cnr, linkInfo] = satelliteCNR(cnrCfg);
fprintf("Link Budget: CNR = %.1f dB, FSPL = %.1f dB\n",cnr,linkInfo.FSPL);
Link Budget: CNR = -4.5 dB, FSPL = 163.0 dB

Setup Satellite Scenario

Create a satellite scenario and add LEO satellites from a two-line element (TLE) file representing a constellation approximately at 500 km altitude. The example selects satellites that are visible to a ground-based UE located at Null Island (0 degrees latitude and 0 degrees longitude). The satellites serve as NR TRPs in the NTN architecture, as defined in 3GPP TS 38.305 [1].

% Create satellite scenario
startTime = datetime(2024,6,15,7,55,0);
stopTime = startTime + seconds(10);
sampleTime = 1;

sc = satelliteScenario(startTime,stopTime,sampleTime);

% Add LEO satellites from TLE file
% The leoSatelliteConstellation TLE file defines the mean orbital
% parameters of 40 generic satellites in nearly circular LEO orbits
% at an altitude and inclination of approximately 500 km and 55 degrees,
% respectively.
tleFile = "leoSatelliteConstellation.tle";
sats = satellite(sc,tleFile);

% Define UE position (Null Island)
ueLat = 0;                           % degrees
ueLon = 0;                           % degrees
ueAlt = 0;                           % meters above WGS84
ue = groundStation(sc,ueLat,ueLon,...
    Altitude=ueAlt,...
    Name="UE");

% Visualize scenario
viewer = satelliteScenarioViewer(sc);

3-D satellite scenario viewer showing LEO satellite constellation orbits over Earth with the UE ground station marked at Null Island

Select Positioning Method

Select the NR positioning method. DL-TDOA uses downlink-only PRS measurements and requires inter-TRP synchronization but needs at least five visible satellites. Multi-RTT uses both downlink PRS and uplink SRS measurements, does not require inter-TRP synchronization, and can operate with as few as three satellites.

positioningMethod = "DL-TDOA" % "DL-TDOA" or "Multi-RTT"
positioningMethod = 
"DL-TDOA"

Select Visible Satellites as TRPs

Determine which satellites are visible to the UE at the simulation start time using access analysis. Visible satellites are selected as TRPs for NR positioning. The example selects up to seven TRPs and retrieves their Earth-centered Earth-fixed (ECEF) positions for use in the positioning algorithms.

% Determine visible satellites at start time using access analysis
numSatsTotal = numel(sats);
ac = access(sats,ue);
status = accessStatus(ac,startTime);
visibleIdx = find(status);
numVisible = numel(visibleIdx);

minSatsRequired = 3 + 2*(positioningMethod == "DL-TDOA");                 % 5 for DL-TDOA, 3 for Multi-RTT
if numVisible < minSatsRequired
    error("satcom:NRPositioning:InsufficientSatellites",...
        "%s requires at least %d visible satellites. Only %d are visible.",...
        positioningMethod,minSatsRequired,numVisible);
end

% Select up to 7 visible satellites as TRPs
numTRPs = min(7,numVisible);
trpIdx = visibleIdx(1:numTRPs);
fprintf("Constellation: %d satellites, %d visible, %d selected as TRPs\n",...
    numSatsTotal,numVisible,numTRPs);
Constellation: 40 satellites, 7 visible, 7 selected as TRPs
% Get TRP ECEF positions
pos = states(sats(trpIdx),startTime,CoordinateFrame="ecef");
trpPosECEF = permute(pos,[1 3 2]);
% UE true position (geodetic)
ueLLA = [ueLat,ueLon,ueAlt];

Configure NR Carrier and Reference Signals

Configure the NR carrier, PRS, and SRS parameters. The PRS uses 12 orthogonal frequency division multiplexing (OFDM) symbols at a subcarrier spacing of 30 kHz over a bandwidth of 100 MHz, which provides high timing resolution for positioning measurements. The example configures the SRS only for Multi-RTT, where the UE transmits uplink reference signals to estimate round-trip time.

% Physical constants
c = physconst("LightSpeed");

% Carrier configuration
% - Frequency range 1 (FR1)
% - 30 kHz subcarrier spacing (SCS)
% - 100 MHz bandwidth (BW)
carrier = nrCarrierConfig;
carrier.SubcarrierSpacing = 30;    % kHz
carrier.NSizeGrid = 273;           % PRBs (100 MHz at 30 kHz SCS)
carrier.NStartGrid = 0;
carrier.NSlot = 0;
carrier.NCellID = 0;               % Each TRP is assigned a unique cell ID during configuration

% PRS configuration, as per 3GPP TS 38.211 section 7.4.1.7
% Same time-frequency PRS resources are used for all TRPs
prs = nrPRSConfig;
prs.NumRB = carrier.NSizeGrid;     % Full bandwidth PRS
prs.RBOffset = 0;
prs.CombSize = 4;                  % Comb-4 for positioning
prs.NumPRSSymbols = 12;            % 12 OFDM symbols
prs.SymbolStart = 0;
prs.REOffset = 0;
prs.NPRSID = 0;
prs.PRSResourceSetPeriod = "on";

% UL-SRS configuration (used by Multi-RTT only)
if positioningMethod == "Multi-RTT"
    srs = nrSRSConfig;
    srs.NumSRSSymbols = 4;
    srs.SymbolStart = 8;
    srs.NumSRSPorts = 1;
    srs.FrequencyStart = 0;
    srs.NRRC = 0;
    srs.CSRS = 0;
    srs.BSRS = 0;
    srs.SRSPeriod = [1 0];
end

% OFDM parameters
ofdmInfo = nrOFDMInfo(carrier);
sampleRate = ofdmInfo.SampleRate;
fSearchSpace = linspace(-carrier.SubcarrierSpacing*1e3/2,carrier.SubcarrierSpacing*1e3/2,41);

SNR and Clock Bias

Convert the link budget Es/No to the SNR corresponding to each RE used by the awgn function. Account for the ratio of fast Fourier transform (FFT) size to the number of active subcarriers, and the number of receive antennas when you perform this conversion. Compute the SNR using this equation.

SNR=EsNo+10log10(NFFTKS)-10log10(NRx).

Apply a UE clock bias of 50 ns to model receiver timing offset. For DL-TDOA, the UE clock bias is common to all measurements and gets cancelled during RSTD computation. For Multi-RTT, both UE and TRP clock biases cancel during round-trip time computation.

nRxAntennas = 1;                                                                      % Single UE receive antenna
Nfft = ofdmInfo.Nfft;                                                                 % FFT size
Ks = carrier.NSizeGrid*12;                                                            % Number of active subcarriers
snrDB = linkInfo.ReceivedEsNo + 10*log10(Nfft) - 10*log10(Ks) - 10*log10(nRxAntennas);
clockBiasUE = 50e-9;                                                                  % UE clock bias in seconds

Generate Reference Signals and Estimate Position

Generate DL-PRS waveforms from all satellite TRPs. Each satellite applies Doppler pre-compensation to the beam center, as defined in 3GPP TR 38.821 [3]. The signals then propagate through independent land-mobile satellite (LMS) channels modeled by p681LMSChannel, which applies frequency-flat fading and the true Doppler shift.

Combine all received waveforms into a single composite signal at the UE and add AWGN once to the combined signal. Estimate the TOA for each TRP by correlating the composite signal with the corresponding PRS sequence. Use joint time-frequency estimation to compensate for residual Doppler caused by the UE offset from the beam center. For Multi-RTT, process the UL-SRS path separately for each TRP because each gNB receives the signal independently. The local function estimateTOAFromPRS performs downlink TOA estimation, and the local function estimateTOAFromSRS performs uplink TOA estimation.

% Compute propagation delay from each TRP to UE using latency function
trueDelays = latency(sats(trpIdx),ue,startTime);
trueRanges = trueDelays*c;

% Convert carrier frequency to Hz for Doppler computation
carrierFrequency = cnrCfg.Frequency*1e9;                                        % Hz

% Define beam center at the satellite sub-point or cell center.
% The satellite pre-compensates Doppler to this reference point.
% UEs offset from beam center experience a residual Doppler.
beamCenterLat = ueLat + 0.5;                                                    % 0.5 deg offset (~55 km)
beamCenterLon = ueLon + 0.5;
beamCenter = groundStation(sc,beamCenterLat,beamCenterLon,Name="BeamCenter");
hide(beamCenter);                                                               % hide beam center in the viewer

[~, elevAngles, ~] = aer(ue,sats(trpIdx),startTime);
dopplerShifts = dopplershift(sats(trpIdx),ue,startTime,Frequency=carrierFrequency);
dopplerPrecomp = dopplershift(sats(trpIdx),beamCenter,startTime,Frequency=carrierFrequency);

slotDuration = 1e-3/(carrier.SubcarrierSpacing/15);                             % seconds per slot
txWaveformLength = sampleRate*slotDuration;                                     % 1 slot duration in samples

linkParams.sampleRate = sampleRate;
linkParams.carrierFrequency = carrierFrequency;
linkParams.dopplerPrecomp = dopplerPrecomp;
linkParams.dopplerShifts = dopplerShifts;
linkParams.elevAngles = elevAngles;
linkParams.snrDB = snrDB;
linkParams.fSearchSpace = fSearchSpace;
linkParams.txWaveformLength = txWaveformLength;

% Build carrier configurations for each TRP
carrierCfgs = cell(numTRPs,1);
for ii = 1:numTRPs
    carrierCfg = carrier;
    carrierCfg.NCellID = ii + 1; % NPRSID and NCellID need not be the same
    carrierCfgs{ii} = carrierCfg;
end

if positioningMethod == "DL-TDOA"
    %% DL-TDOA Positioning (TS 38.305 Section 8.12)
    % UE measures TOA of DL-PRS from each TRP and computes RSTD
    % relative to a reference TRP. Hyperbolic multilateration yields
    % the UE position.

    % Generate PRS for each TRP, apply delay and channel, then estimate TOA
    toaEstimates = estimateTOAFromPRS(carrierCfgs,prs,numTRPs,...
        trueDelays + clockBiasUE,linkParams);

    % Compute RSTD
    % RSTD_i = TOA_i - TOA_ref eliminates common UE clock bias
    refTRP = 1;
    rstd = zeros(numTRPs - 1,1);
    for ii = 2:numTRPs
        rstd(ii - 1) = toaEstimates(ii) - toaEstimates(refTRP);
    end
    % Convert RSTD to range differences
    rangeDiff = rstd*c;

    % Estimate UE position using Chan-Ho [4] initialization and Gauss-Newton
    [estLLA,posError,numIter,uePosTrue] = HelperMultiSatNTNPositionEstimate(...
        "DL-TDOA",trpPosECEF,rangeDiff,ueLLA);
    fprintf("Gauss-Newton converged in %d iterations\n",numIter);

else
    %% Multi-RTT Positioning (TS 38.305 Section 8.10)
    % The UE measures the Rx-Tx time difference from the DL-PRS for each
    % TRP. Each gNB measures the Rx-Tx time difference from the UL-SRS. The
    % LMF computes the RTT and range for each link and then estimates the
    % UE position using trilateration.

    % --- DL path: combine all TRP PRS at UE ---
    ueRxTx = estimateTOAFromPRS(carrierCfgs,prs,numTRPs,...
        trueDelays,linkParams);

    % --- UL path: each gNB receives SRS independently ---
    gNBRxTx = estimateTOAFromSRS(carrierCfgs,srs,numTRPs,...
        trueDelays,linkParams);

    % Compute RTT and ranges
    rttEstimates = ueRxTx + gNBRxTx;
    rangeEstimates = rttEstimates*c/2;

    % Estimate UE position using trilateration and Levenberg-Marquardt [5][6]
    [estLLA,posError,numIter,uePosTrue] = HelperMultiSatNTNPositionEstimate( ...
        "Multi-RTT",trpPosECEF,rangeEstimates,ueLLA);
    fprintf("Levenberg-Marquardt converged in %d iterations\n",numIter);
end
Gauss-Newton converged in 2 iterations

Analyze Position Error

Display the estimated geodetic coordinates and the 3-D position error between the true and estimated UE positions. The position error is the Euclidean distance in ECEF coordinates between the known UE location and the solver output.

latEst = estLLA(1);
lonEst = estLLA(2);
altEst = estLLA(3);
fprintf("Estimated Position: Lat=%.6f deg, Lon=%.6f deg, Alt=%.1f m\n",...
    latEst,lonEst,altEst);
Estimated Position: Lat=0.000004 deg, Lon=0.000038 deg, Alt=5.7 m
fprintf("3-D Position Error: %.2f m\n",posError);
3-D Position Error: 7.11 m

Geometric Dilution of Precision

Geometric dilution of precision (GDOP) quantifies the effect of satellite geometry on positioning accuracy. GDOP relates position error to measurement noise. Estimate the approximate position error by multiplying GDOP with the single-measurement ranging error. For DL-TDOA, form the geometry matrix using relative direction vectors between TRPs, which reflects hyperbolic measurement geometry. For Multi-RTT, form the geometry matrix using direct direction vectors from each TRP to the UE, which reflects spherical measurement geometry.

% Compute GDOP based on positioning method
if positioningMethod == "DL-TDOA"
    % DL-TDOA geometry matrix uses relative direction vectors
    G = zeros(numTRPs - 1,3);
    for ii = 2:numTRPs
        uvI = (uePosTrue - trpPosECEF(:,ii))'/norm(uePosTrue - trpPosECEF(:,ii));
        uvRef = (uePosTrue - trpPosECEF(:,1))'/norm(uePosTrue - trpPosECEF(:,1));
        G(ii - 1,:) = uvI - uvRef;
    end
else
    % Multi-RTT geometry matrix uses direct direction vectors
    G = zeros(numTRPs,3);
    for ii = 1:numTRPs
        G(ii,:) = (uePosTrue - trpPosECEF(:,ii))'/norm(uePosTrue - trpPosECEF(:,ii));
    end
end
Q = inv(G'*G);
GDOP = sqrt(trace(Q));
fprintf("GDOP = %.2f (%s)\n",GDOP,positioningMethod);
GDOP = 3.04 (DL-TDOA)

DL-TDOA and Multi-RTT Results Comparison

This table summarizes the results from both positioning methods under identical satellite geometry.

Metric

DL-TDOA

Multi-RTT

3D Position Error

7.11 m

4.49 m

GDOP

3.04

2.13

Solver Iterations

2

3

Minimum Satellites

5

3

Solver Algorithm

Chan-Ho closed-form + Gauss-Newton

Trilateration + Levenberg-Marquardt

Inter-TRP Synchronization

Required

Not required

UE Uplink Transmission

Not required

Required

Visualize Results

View the estimated position in the satellite scenario viewer. Place the estimated UE marker at the solved coordinates so that both the true and estimated positions remain visible. Zoom the camera to the UE location.

estUE = groundStation(sc,latEst,lonEst,...
    Altitude=altEst,...
    Name="Estimated UE Position");
camtarget(viewer,ue);

Satellite scenario viewer zoomed to the UE location, showing both the true UE position at Null Island and the estimated UE position marker at the solved coordinates

Further Exploration

You can extend this example in the following ways:

  • Change the number of selected TRPs using the numTRPs variable and observe how GDOP and position accuracy change with fewer or more satellites.

  • Switch between DL-TDOA and Multi-RTT using the dropdown control and compare the positioning accuracy, GDOP, and convergence behavior of the two methods under identical satellite geometry. Note that DL-TDOA requires at least five visible satellites while Multi-RTT requires only three, so at some UE locations only Multi-RTT may be available.

  • Move the UE by changing ueLat and ueLon. Observe how satellite visibility and GDOP vary with location. Satellite visibility depends on the epoch. When fewer than five satellites remain visible, use Multi-RTT for positioning.

  • Modify link budget parameters, including transmitter power, antenna gain, and elevation mask, in the satelliteCNRConfig object. Evaluate how SNR affects timing estimation accuracy and overall position error.

  • Load a different TLE file to represent an alternative constellation design with different altitude, inclination, or orbital planes. Compare positioning performance across configurations.

Supporting Files

This example uses these supporting files:

  • HelperMultiSatNTNPositionEstimate.m – Estimates UE position from NR NTN measurements using DL-TDOA or Multi-RTT method.

  • HelperNRNTNThroughput.m – Provides the jointTimeFreq method used for joint time-frequency TOA estimation with residual Doppler compensation.

References

[1] 3rd Generation Partnership Project (3GPP). 3GPP TS 38.305. "Stage 2 functional specification of User Equipment (UE) positioning in NG-RAN." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. 3GPP: February 2026.

[2] 3rd Generation Partnership Project (3GPP). 3GPP TR 38.742. "Study on GNSS (Global Navigation Satellite System) resilient NR-NTN (Non-Terrestrial Networks) operation." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. 3GPP: June 2026.

[3] 3rd Generation Partnership Project (3GPP). 3GPP TR 38.821. "Solutions for NR to support non-terrestrial networks (NTN)." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. 3GPP: March 2023.

[4] Chan, Y.T. and K.C. Ho. "A Simple and Efficient Estimator for Hyperbolic Location." IEEE Transactions on Signal Processing 42, no. 8 (August 1994): 1905-1915.

[5] Levenberg, K. "A Method for the Solution of Certain Non-Linear Problems in Least Squares." Quarterly of Applied Mathematics 2, no. 2 (1944): 164-168.

[6] Marquardt, D.W. "An Algorithm for Least-Squares Estimation of Nonlinear Parameters." Journal of the Society for Industrial and Applied Mathematics 11, no. 2 (1963): 431-441.

Local Functions

This example uses these local functions.

function toaEstimates = estimateTOAFromPRS(...
    carrierCfgs,prs,numTRPs,delays,linkParams)

    sampleRate = linkParams.sampleRate;
    maxDelaySamples = floor(max(delays)*sampleRate) + 1;
    compositeLength = linkParams.txWaveformLength + maxDelaySamples;
    compositeRx = zeros(compositeLength,1);

    prsSymbolsAll = cell(numTRPs,1);
    prsIndAll = cell(numTRPs,1);

    for ii = 1:numTRPs
        prsCfg = prs;
        prsCfg.NPRSID = ii;
        carrierCfg = carrierCfgs{ii};

        prsSymbolsAll{ii} = nrPRS(carrierCfg,prsCfg);
        prsIndAll{ii} = nrPRSIndices(carrierCfg,prsCfg);

        txGrid = nrResourceGrid(carrierCfg);
        txGrid(prsIndAll{ii}) = prsSymbolsAll{ii};
        txWaveform = nrOFDMModulate(carrierCfg,txGrid);

        % Doppler pre-compensation at satellite
        txWaveform = frequencyOffset(txWaveform,sampleRate,-linkParams.dopplerPrecomp(ii));

        % Model delay using dsp.Delay and dsp.VariableFractionalDelay
        delaySamples = delays(ii)*sampleRate;
        intDelay = floor(delaySamples);
        fracDelay = delaySamples - intDelay;

        staticDelay = dsp.Delay(Length=intDelay);
        delayedWaveform = staticDelay([txWaveform; zeros(intDelay,1)]);

        variableFracDelay = dsp.VariableFractionalDelay( ...
            InterpolationMethod="Farrow", ...
            FarrowSmallDelayAction="Use off-centered kernel", ...
            MaximumDelay=1);
        delayedWaveform = variableFracDelay(delayedWaveform,fracDelay);

        % Pass the delayed signal through the p681LMSChannel
        channel = p681LMSChannel;
        channel.SampleRate = sampleRate;
        channel.CarrierFrequency = linkParams.carrierFrequency;
        channel.SatelliteDopplerShift = linkParams.dopplerShifts(ii);
        channel.MobileSpeed = 0;
        channel.ElevationAngle = linkParams.elevAngles(ii);
        channel.RandomStream = "mt19937ar with seed";
        rxWaveform = channel(delayedWaveform);

        rxPadded = [rxWaveform; zeros(compositeLength - length(rxWaveform),1)];
        compositeRx = compositeRx + rxPadded;
    end

    compositeRx = awgn(compositeRx,linkParams.snrDB + 10*log10(numTRPs),"measured");

    toaEstimates = zeros(numTRPs,1);
    for ii = 1:numTRPs
        toaEstimates(ii) = HelperNRNTNThroughput.jointTimeFreq(...
            carrierCfgs{ii},compositeRx,prsIndAll{ii},prsSymbolsAll{ii},...
            linkParams.fSearchSpace)/sampleRate;
    end
end

function gNBRxTx = estimateTOAFromSRS(carrierCfgs,srs,numTRPs, ...
    trueDelays,linkParams)

    sampleRate = linkParams.sampleRate;
    gNBRxTx = zeros(numTRPs,1);
    for ii = 1:numTRPs
        carrierCfg = carrierCfgs{ii};

        srsSymbols = nrSRS(carrierCfg,srs);
        srsInd = nrSRSIndices(carrierCfg,srs);

        txGridUL = nrResourceGrid(carrierCfg);
        txGridUL(srsInd) = srsSymbols;
        txWaveformUL = nrOFDMModulate(carrierCfg,txGridUL);

        % Doppler pre-compensation at UE
        txWaveformUL = frequencyOffset(txWaveformUL,sampleRate,-linkParams.dopplerPrecomp(ii));

        % Model UL delay (symmetric path)
        delaySamples = trueDelays(ii)*sampleRate;
        intDelay = floor(delaySamples);
        fracDelay = delaySamples - intDelay;

        staticDelayUL = dsp.Delay(Length=intDelay);
        rxUL = staticDelayUL([txWaveformUL; zeros(intDelay,1)]);
        variableFracDelayUL = dsp.VariableFractionalDelay(...
            InterpolationMethod="Farrow",...
            FarrowSmallDelayAction="Use off-centered kernel",...
            MaximumDelay=1);
        rxUL = variableFracDelayUL(rxUL,fracDelay);

        % Pass the delayed signal through the p681LMSChannel
        channelUL = p681LMSChannel;
        channelUL.SampleRate = sampleRate;
        channelUL.CarrierFrequency = linkParams.carrierFrequency;
        channelUL.SatelliteDopplerShift = linkParams.dopplerShifts(ii);
        channelUL.MobileSpeed = 0;
        channelUL.ElevationAngle = linkParams.elevAngles(ii);
        channelUL.RandomStream = "mt19937ar with seed";
        rxUL = channelUL(rxUL);

        % Add AWGN per-TRP since each gNB receives independently
        rxUL = awgn(rxUL,linkParams.snrDB,"measured");

        gNBRxTx(ii) = HelperNRNTNThroughput.jointTimeFreq(...
            carrierCfg,rxUL,srsInd,srsSymbols,linkParams.fSearchSpace)/sampleRate;
    end
end

See Also

Objects

Functions

Topics