Main Content

EVM Measurement of 5G NR PDSCH Waveforms

This example shows how to measure the error vector magnitude (EVM) of NR test model (NR-TM) or fixed reference channel (FRC) waveforms. The example also shows how to add impairments including phase noise and memoryless nonlinearity.

Introduction

For base station RF testing, the 3GPP 5G NR standard defines a set of NR-TM waveforms. For user equipment (UE) testing, the standard defines a set of FRC waveforms. The NR-TMs and FRCs for frequency range 1 (FR1) are defined in TS 38.141-1 while the NR-TMs and FRCs for frequency range 2 (FR2) are defined in TS 38.141-2.

This example shows how to generate an NR waveform (TM or FRC) and add impairments. Here we consider phase noise and memoryless nonlinearities. We then calculate the EVM of the resulting signal. We plot the RMS and peak EVMs per OFDM symbol, slot, and subcarrier. We also calculate the overall EVM (RMS EVM averaged over the complete waveform). Annex B and Annex C of TS 38.104 define an alternative method for computing the EVM in FR1 and FR2, respectively. The figure below shows the processing chain implemented in this example.

Simulation parameters

Each NR-TM or FRC waveform is defined by a combination of:

  • NR-TM/FRC name

  • Channel bandwidth

  • Subcarrier spacing

  • Duplexing mode

% Select one of the Release 15 NR-TMs for FR1 and FR2 among:
% "NR-FR1-TM1.1","NR-FR1-TM1.2","NR-FR1-TM2",
% "NR-FR1-TM2a","NR-FR1-TM3.1","NR-FR1-TM3.1a",
% "NR-FR1-TM3.2","NR-FR1-TM3.3","NR-FR2-TM1.1",
% "NR-FR2-TM2","NR-FR2-TM3.1"

% or
% Select one of the Release 15 FRCs for FR1 and FR2 among:
% "DL-FRC-FR1-QPSK","DL-FRC-FR1-64QAM",
% "DL-FRC-FR1-256QAM","DL-FRC-FR2-QPSK",
% "DL-FRC-FR2-16QAM","DL-FRC-FR2-64QAM"

rc = "NR-FR1-TM3.2"; % Reference channel (NR-TM or FRC)

% Select the NR waveform parameters
bw = "10MHz"; % Channel bandwidth
scs = "30kHz"; % Subcarrier spacing
dm = "FDD"; % Duplexing mode

For TMs, the generated waveform may contain more than one PDSCH. The chosen PDSCH to analyse is based on the RNTI. By default, the following RNTIs are considered for EVM calculation:

  • NR-FR1-TM2: RNTI = 2 (64QAM EVM)

  • NR-FR1-TM2a: RNTI = 2 (256QAM EVM)

  • NR-FR1-TM3.1: RNTI = 0 and 2 (64QAM EVM)

  • NR-FR1-TM3.1a: RNTI = 0 and 2 (256QAM EVM)

  • NR-FR1-TM3.2: RNTI = 1 (16QAM EVM)

  • NR-FR1-TM3.3: RNTI = 1 (QPSK EVM)

  • NR-FR2-TM2: RNTI = 2 (64QAM EVM)

  • NR-FR2-TM3.1: RNTI = 0 and 2 (64QAM EVM)

As per the specifications (TS 38.141-1, TS 38.141-2), these TMs are not designed to perform EVM measurements: NR-FR1-TM1.1, NR-FR1-TM1.2, NR-FR2-TM1.1. However, if you generate these TMs, the example measures the EVM for the following RNTIs.

  • NR-FR1-TM1.1: RNTI = 0 (QPSK EVM)

  • NR-FR1-TM1.2: RNTI = 2 (QPSK EVM)

  • NR-FR2-TM1.1: RNTI = 0 (QPSK EVM)

For FRCs, by default, RNTI 0 is considered for EVM calculation. In case the input waveform is neither a TM nor an FRC waveform, atmost one layer is supported for EVM measurement.

The example calculates the EVM for the RNTIs listed above. To override the default RNTIs, specify the targetRNTIs vector

targetRNTIs = [];

To print EVM statistics, set displayEVM to true. To disable the prints, set displayEVM to false. To plot EVM statistics, set plotEVM to true. To disable the plots, set plotEVM to false

displayEVM = true;
plotEVM = true;
if displayEVM
    fprintf('Reference Channel = %s\n', rc);
end
Reference Channel = NR-FR1-TM3.2

To measure EVM as defined in TS 38.104, Annex B(FR1) / Annex C(FR2), set evm3GPP to true. evm3GPP is disabled by default.

evm3GPP = false;

Create waveform generator object and generate the waveform

tmwavegen = hNRReferenceWaveformGenerator(rc,bw,scs,dm);
[txWaveform,tmwaveinfo,resourcesinfo] = generateWaveform(tmwavegen,tmwavegen.Config.NumSubframes);

Impairment: Phase Noise and Nonlinearity

This example considers two impairments: phase noise and memoryless nonlinearity. Enable or disable impairments by toggling the flags phaseNoiseOn and nonLinearityModelOn.

phaseNoiseOn = true;
nonLinearityModelOn = true;

Normalize the waveform to fit the dynamic range of the nonlinearity.

txWaveform = txWaveform/max(abs(txWaveform),[],'all');

The waveform consists of one frame for FDD and two for TDD. Repeat the signal twice. We will remove the first half of the resulting waveform to avoid the transient introduced by the phase noise model.

txWaveform = repmat(txWaveform,2,1);

Introduce phase noise distortion. The figure shows the phase noise characteristic. The carrier frequency considered depends on the frequency range. We use values of 4 GHz and 28 GHz for FR1 and FR2 respectively. The phase noise characteristic is generated with the pole/zero model described in R1-163984, "Discussion on phase noise modeling".

if phaseNoiseOn
    sr = tmwaveinfo.Info.SamplingRate;

    % Carrier frequency
    if tmwavegen.Config.FrequencyRange == "FR1" % carrier frequency for FR1
        fc = 4e9;
    else % carrier frequency for FR2
        fc = 30e9;
    end

    % Calculate the phase noise level.
    foffsetLog = (4:0.1:log10(sr/2)); % model offset from 1e3Hz to sr/2
    foffset = 10.^foffsetLog;    % linear freq offset
    PN_dBc_Hz = hPhaseNoisePoleZeroModel(foffset,fc,'C');
    figure; semilogx(foffset,PN_dBc_Hz);
    xlabel('Frequency offset (Hz)');
    ylabel('dBc/Hz');
    title('Phase noise model'); grid on

    % Apply phase noise to waveform
    pnoise = comm.PhaseNoise('FrequencyOffset',foffset,'Level',PN_dBc_Hz,'SampleRate',sr);
    pnoise.RandomStream = "mt19937ar with seed";
    rxWaveform = zeros(size(txWaveform),'like',txWaveform);
    for i = 1:size(txWaveform,2)
        rxWaveform(:,i) = pnoise(txWaveform(:,i));
        release(pnoise)
    end
else
    rxWaveform = txWaveform; %#ok<UNRCH>
end

Introduce nonlinear distortion. For this example, use the Rapp model. The figure shows the nonlinearity introduced. Set the parameters for the Rapp model to match the characteristics of the memoryless model from TR 38.803 "Memoryless polynomial model - Annex A.1".

if nonLinearityModelOn
    rapp = comm.MemorylessNonlinearity('Method','Rapp model');
    rapp.Smoothness = 1.55;
    rapp.OutputSaturationLevel = 1;

    % Plot nonlinear characteristic
     plotNonLinearCharacteristic(rapp);

    % Apply nonlinearity
    for i = 1:size(rxWaveform,2)
        rxWaveform(:,i) = rapp(rxWaveform(:,i));
        release(rapp)
    end
end

The signal was previously repeated twice. Remove the first half of this signal. This avoids any transient introduced by the impairment models.

if dm == "FDD"
    nFrames = 1;
else % TDD
    nFrames = 2;
end

rxWaveform(1:nFrames*tmwaveinfo.Info.SamplesPerSubframe*10,:) = [];

Measurements

The function, hNRPDSCHEVM, performs these steps to decode and analyze the waveform:

  • Synchronization using the DM-RS over one frame for FDD (two frames for TDD)

  • OFDM demodulation of the received waveform

  • Channel estimation

  • Equalization

  • Common Phase error (CPE) estimation and compensation

  • PDSCH EVM computation (enable the switch evm3GPP, to process according to the EVM measurement requirements specified in TS 38.104, Annex B (FR1) / Annex C (FR2)).

The example measures and outputs various EVM related statistics per symbol, per slot, and per frame peak EVM and RMS EVM. The example displays EVM for each slot and frame. It also displays the overall EVM averaged over the entire input waveform. The example produces a number of plots: EVM vs per OFDM symbol, slot, subcarrier, and overall EVM. Each plot displays the peak vs RMS EVM.

cfg = struct();
cfg.Evm3GPP = evm3GPP;
cfg.TargetRNTIs = targetRNTIs;
cfg.PlotEVM = plotEVM;
cfg.DisplayEVM = displayEVM;
cfg.Label = tmwavegen.ConfiguredModel{1};

% Compute and display EVM measurements
[evmInfo,eqSym,refSym] = hNRPDSCHEVM(tmwavegen.Config,rxWaveform,cfg);
EVM stats for BWP idx : 1
 RMS EVM, Peak EVM, slot 0: 2.850 7.856%
 RMS EVM, Peak EVM, slot 1: 3.102 9.824%
 RMS EVM, Peak EVM, slot 2: 2.834 7.085%
 RMS EVM, Peak EVM, slot 3: 3.001 9.065%
 RMS EVM, Peak EVM, slot 4: 3.021 8.534%
 RMS EVM, Peak EVM, slot 5: 3.278 9.404%
 RMS EVM, Peak EVM, slot 6: 2.908 7.831%
 RMS EVM, Peak EVM, slot 7: 3.277 10.594%
 RMS EVM, Peak EVM, slot 8: 2.956 8.429%
 RMS EVM, Peak EVM, slot 9: 3.226 10.358%
 RMS EVM, Peak EVM, slot 10: 2.798 8.623%
 RMS EVM, Peak EVM, slot 11: 2.862 10.057%
 RMS EVM, Peak EVM, slot 12: 3.143 10.240%
 RMS EVM, Peak EVM, slot 13: 2.972 8.496%
 RMS EVM, Peak EVM, slot 14: 2.831 8.171%
 RMS EVM, Peak EVM, slot 15: 2.913 9.364%
 RMS EVM, Peak EVM, slot 16: 3.076 8.554%
 RMS EVM, Peak EVM, slot 17: 3.069 8.106%
 RMS EVM, Peak EVM, slot 18: 3.272 11.256%
 RMS EVM, Peak EVM, slot 19: 2.787 8.312%
Averaged RMS EVM frame 0: 3.013%
Averaged overall RMS EVM: 3.013%
Overall Peak EVM = 11.2561%

Local functions

function plotNonLinearCharacteristic(memoryLessNonlinearity)
% Plot the nonlinear characteristic of the power amplifier (PA) impairment
% represented by the input parameter memoryLessNonlinearity, which is a
% comm.MemorylessNonlinearity Communications Toolbox(TM) System object.

% Input samples
x = complex((1/sqrt(2))*(-1+2*rand(1000,1)),(1/sqrt(2))*(-1+2*rand(1000,1)));

% Nonlinearity
yRapp = memoryLessNonlinearity(x);

% Release object to feed it a different number of samples
release(memoryLessNonlinearity);

% Plot characteristic
figure;
plot(10*log10(abs(x).^2),10*log10(abs(x).^2));
hold on;
grid on
plot(10*log10(abs(x).^2),10*log10(abs(yRapp).^2),'.');
xlabel('Input Power (dBW)');
ylabel('Output Power (dBW)');
title('Nonlinearity Impairment')
legend('Linear characteristic', 'Rapp nonlinearity','Location','Northwest');
end

Related Topics