5G NR Downlink ACLR Measurement
This example shows how to measure the adjacent channel leakage ratio (ACLR) for 5G NR test models (NR-TMs) in frequency range 1 (FR1) and FR2 using 5G Toolbox™.
Introduction
The ACLR is the ratio of the filtered mean power centered on the assigned channel frequency to the filtered mean power centered on an adjacent channel frequency. This example performs ACLR measurements for an NR downlink waveform, as defined in TS 38.104 Section 6.6.3. To model the effect of out-of-band spectral emissions, the example applies spectral regrowth on an oversampled waveform by using a high power amplifier (HPA) model.
Generate NR-TM Waveform
Use the MATLAB class hNRReferenceWaveformGenerator to generate 5G NR-TMs for FR1 and FR2. You can generate the NR-TM waveforms by specifying these parameters:
NR-TM name
Channel bandwidth
Subcarrier spacing
Duplexing mode
For more information, see the 5G NR-TM and FRC Waveform Generation example.
% Select the NR-TM waveform parameters nrtm = "NR-FR1-TM1.2"; % NR-TM name and properties bw = "20MHz"; % Channel bandwidth scs = "15kHz"; % Subcarrier spacing dm = "FDD"; % Duplexing mode % Create generator object for the above NR-TM tmWaveGen = hNRReferenceWaveformGenerator(nrtm,bw,scs,dm); % Ensure no windowing to highlight impact of filtering on ACLR tmWaveGen = makeConfigWritable(tmWaveGen); tmWaveGen.Config.WindowingPercent = 0; % Generate waveform [tmWaveform,tmWaveInfo] = generateWaveform(tmWaveGen); samplingRate = tmWaveInfo.Info.SamplingRate; % Waveform sampling rate (Hz) % Visualize the associated PRB and subcarrier resource grids displayResourceGrid(tmWaveGen);
Display Results
The associated PRB resource grid (top) depicts the allocation of the different components (PDCCH, PDSCH, CORESET and SS Burst) in each BWP. The grid does not plot the amplitude of the signals only the signal locations in the grid.
The SCS specific carrier resource grids (middle) along with the minimum guardbands, aligned relative to the overall channel bandwidth.
The subcarrier resource grid (bottom) indicates the amplitude levels of the generated waveform. If just one color is shown, all the components have the same amplitude.
Calculate ACLR Parameters
The helper function hACLRParametersNR.m calculates the parameters required for ACLR measurement. It returns a structure with these fields:
Bandwidth
: the channel bandwidth associated withtmWaveform
, in Hz. This is the overall bandwidth of the assigned channel.MeasurementBandwidth
: the ACLR measurement bandwidth in Hz.AdjacentChannelOffset
: a vector of NR center frequencies, in Hz, for adjacent channels.OSR
: the integer oversampling ratio of the inputtmWaveform
required to create a signal capable of representing 1st and 2nd adjacent channels.SamplingRate
: the sampling rate of the oversampled signal used to measure ACLR. IfOSR = 1
, this signal is the input waveform; ifOSR > 1
, this signal is the input waveform upsampled byOSR
. Therefore:aclrParameters.SamplingRate = OSR*samplingRate
(input waveform sampling rate).
aclrParameters = hACLRParametersNR(tmWaveGen.Config); disp(aclrParameters);
Bandwidth: 20000000 MeasurementBandwidth: 19080000 AdjacentChannelOffset: [-40000000 -20000000 20000000 40000000] OSR: 4 SamplingRate: 122880000
Filter Waveform to Improve ACLR
The generated waveform has no filtering, so there are significant out-of-band spectral emissions owing to the implicit rectangular pulse shaping in the OFDM modulation (each OFDM subcarrier has a sinc shape in the frequency domain). Filtering the waveform improves ACLR performance.
Design a filter with a transition band that starts at the edge of the occupied transmission bandwidth (aclrParameters.MeasurementBandwidth
) and stops at the edge of the overall channel bandwidth (aclrParameters.Bandwidth
). This filter involves no rate change, it just shapes the spectrum within the original bandwidth of the waveform.
% Design filter lpFilt = designfilt('lowpassfir',... 'PassbandFrequency',aclrParameters.MeasurementBandwidth/2,... 'StopbandFrequency',aclrParameters.Bandwidth/2,... 'PassbandRipple',0.1,... 'StopbandAttenuation',80,... 'SampleRate',samplingRate); % Apply filter filtTmWaveform = filter(lpFilt,tmWaveform);
Oversampling and HPA Nonlinearity Model
To create a signal capable of representing 1st and 2nd adjacent carriers, for example, to represent aclrParameters.Bandwidth
with at most 85% bandwidth occupancy, oversample the NR waveform. After oversampling the signal, employ an HPA model to generate out-of-band distortion. For example, to simulate the HPA behaviour, you can use the Rapp method, which is widely used in wireless applications to generate AM/AM distortion. In MATLAB®, you can use the Memoryless Nonlinearity object to model the Rapp method. To highlight the impact of filtering on the ACLR measurements, apply the oversampling and HPA nonlinearities first to the filtered NR signal and then to the same NR signal without filtering.
% Apply required oversampling resampled = resample(tmWaveform,aclrParameters.OSR,1); % Not filtered filtResampled = resample(filtTmWaveform,aclrParameters.OSR,1); % Filtered % Create and configure a memoryless nonlinearity to model the amplifier nonLinearity = comm.MemorylessNonlinearity; nonLinearity.Method = 'Rapp model'; nonLinearity.Smoothness = 3; % p parameter nonLinearity.LinearGain = 0.5; % dB nonLinearity.OutputSaturationLevel = 2; % It limits the output signal level % Signal conditioning to control the HPA input back-off level resampled = resampled/max(abs(resampled)); % Not filtered filtResampled = filtResampled/max(abs(filtResampled)); % Filtered % Apply the amplifier model to the NR waveforms txWaveform = nonLinearity(resampled); % Not filtered txFiltWaveform = nonLinearity(filtResampled); % Filtered
Calculate NR ACLR
The hACLRMeasurementNR.m helper function measures the NR ACLR using a square window on adjacent channels. It also measures the power (in dBm) of the signal in the main channel.
% Calculate NR ACLR aclr = hACLRMeasurementNR(aclrParameters,txWaveform); % Not filtered filtAclr = hACLRMeasurementNR(aclrParameters,txFiltWaveform); % Filtered
Calculate Error Vector Magnitude
The hNRDownlinkEVM.m helper function measures the error vector magnitude (EVM) of NR-TM or fixed reference channel (FRC) waveforms. The function calculates the root mean square (RMS) and peak EVMs per OFDM symbol, slot, subcarrier, and overall EVM.
% EVM configuration parameters evmCfg.PlotEVM = false; evmCfg.SampleRate = aclrParameters.SamplingRate; evmCfg.Label = tmWaveGen.ConfiguredModel{1}; % Measure the EVM related statistics for the transmitted waveform without filtering evmInfo = hNRDownlinkEVM(tmWaveGen.Config,txWaveform,evmCfg)
EVM stats for BWP idx : 1 PDSCH RMS EVM, Peak EVM, slot 0: 0.009 0.023% DM-RS RMS EVM, Peak EVM, slot 0: 0.006 0.012% PDSCH RMS EVM, Peak EVM, slot 1: 0.008 0.029% DM-RS RMS EVM, Peak EVM, slot 1: 0.005 0.011% PDSCH RMS EVM, Peak EVM, slot 2: 0.008 0.024% DM-RS RMS EVM, Peak EVM, slot 2: 0.006 0.012% PDSCH RMS EVM, Peak EVM, slot 3: 0.010 0.023% DM-RS RMS EVM, Peak EVM, slot 3: 0.008 0.018% PDSCH RMS EVM, Peak EVM, slot 4: 0.009 0.021% DM-RS RMS EVM, Peak EVM, slot 4: 0.004 0.009% PDSCH RMS EVM, Peak EVM, slot 5: 0.009 0.025% DM-RS RMS EVM, Peak EVM, slot 5: 0.006 0.010% PDSCH RMS EVM, Peak EVM, slot 6: 0.009 0.022% DM-RS RMS EVM, Peak EVM, slot 6: 0.006 0.012% PDSCH RMS EVM, Peak EVM, slot 7: 0.009 0.026% DM-RS RMS EVM, Peak EVM, slot 7: 0.004 0.006% PDSCH RMS EVM, Peak EVM, slot 8: 0.008 0.020% DM-RS RMS EVM, Peak EVM, slot 8: 0.006 0.011% PDSCH RMS EVM, Peak EVM, slot 9: 0.009 0.023% DM-RS RMS EVM, Peak EVM, slot 9: 0.006 0.013% PDCCH RMS EVM, Peak EVM, slot 0: 0.012 0.027% PDCCH DM-RS RMS EVM, Peak EVM, slot 0: 0.005 0.012% PDCCH RMS EVM, Peak EVM, slot 1: 0.008 0.017% PDCCH DM-RS RMS EVM, Peak EVM, slot 1: 0.003 0.005% PDCCH RMS EVM, Peak EVM, slot 2: 0.010 0.024% PDCCH DM-RS RMS EVM, Peak EVM, slot 2: 0.006 0.010% PDCCH RMS EVM, Peak EVM, slot 3: 0.010 0.022% PDCCH DM-RS RMS EVM, Peak EVM, slot 3: 0.005 0.010% PDCCH RMS EVM, Peak EVM, slot 4: 0.007 0.019% PDCCH DM-RS RMS EVM, Peak EVM, slot 4: 0.003 0.004% PDCCH RMS EVM, Peak EVM, slot 5: 0.011 0.028% PDCCH DM-RS RMS EVM, Peak EVM, slot 5: 0.005 0.010% PDCCH RMS EVM, Peak EVM, slot 6: 0.012 0.026% PDCCH DM-RS RMS EVM, Peak EVM, slot 6: 0.004 0.005% PDCCH RMS EVM, Peak EVM, slot 7: 0.013 0.029% PDCCH DM-RS RMS EVM, Peak EVM, slot 7: 0.009 0.019% PDCCH RMS EVM, Peak EVM, slot 8: 0.012 0.022% PDCCH DM-RS RMS EVM, Peak EVM, slot 8: 0.006 0.014% PDCCH RMS EVM, Peak EVM, slot 9: 0.010 0.018% PDCCH DM-RS RMS EVM, Peak EVM, slot 9: 0.005 0.008% Averaged RMS EVM frame 0: 0.009% Averaged overall PDSCH RMS EVM: 0.009% Overall PDSCH Peak EVM = 0.029234% Averaged overall PDCCH RMS EVM: 0.011% Overall PDCCH Peak EVM = 0.028711%
evmInfo = struct with fields:
PDSCH: [1x1 struct]
PDCCH: [1x1 struct]
PerCfg: [1x1 struct]
% Measure the EVM related statistics for the transmitted waveform with filtering
evmInfoFilt = hNRDownlinkEVM(tmWaveGen.Config,txFiltWaveform,evmCfg);
EVM stats for BWP idx : 1 PDSCH RMS EVM, Peak EVM, slot 0: 0.257 0.757% DM-RS RMS EVM, Peak EVM, slot 0: 0.230 0.670% PDSCH RMS EVM, Peak EVM, slot 1: 0.247 0.751% DM-RS RMS EVM, Peak EVM, slot 1: 0.220 0.538% PDSCH RMS EVM, Peak EVM, slot 2: 0.245 0.816% DM-RS RMS EVM, Peak EVM, slot 2: 0.272 0.841% PDSCH RMS EVM, Peak EVM, slot 3: 0.249 0.807% DM-RS RMS EVM, Peak EVM, slot 3: 0.242 0.742% PDSCH RMS EVM, Peak EVM, slot 4: 0.264 0.733% DM-RS RMS EVM, Peak EVM, slot 4: 0.244 0.602% PDSCH RMS EVM, Peak EVM, slot 5: 0.281 0.899% DM-RS RMS EVM, Peak EVM, slot 5: 0.233 0.759% PDSCH RMS EVM, Peak EVM, slot 6: 0.254 0.778% DM-RS RMS EVM, Peak EVM, slot 6: 0.261 0.820% PDSCH RMS EVM, Peak EVM, slot 7: 0.237 0.654% DM-RS RMS EVM, Peak EVM, slot 7: 0.290 0.612% PDSCH RMS EVM, Peak EVM, slot 8: 0.238 0.797% DM-RS RMS EVM, Peak EVM, slot 8: 0.223 0.562% PDCCH RMS EVM, Peak EVM, slot 0: 0.403 1.310% PDCCH DM-RS RMS EVM, Peak EVM, slot 0: 0.237 0.559% PDCCH RMS EVM, Peak EVM, slot 1: 0.310 0.850% PDCCH DM-RS RMS EVM, Peak EVM, slot 1: 0.135 0.210% PDCCH RMS EVM, Peak EVM, slot 2: 0.271 0.858% PDCCH DM-RS RMS EVM, Peak EVM, slot 2: 0.158 0.312% PDCCH RMS EVM, Peak EVM, slot 3: 0.261 0.874% PDCCH DM-RS RMS EVM, Peak EVM, slot 3: 0.132 0.216% PDCCH RMS EVM, Peak EVM, slot 4: 0.227 0.911% PDCCH DM-RS RMS EVM, Peak EVM, slot 4: 0.126 0.242% PDCCH RMS EVM, Peak EVM, slot 5: 0.311 0.936% PDCCH DM-RS RMS EVM, Peak EVM, slot 5: 0.177 0.323% PDCCH RMS EVM, Peak EVM, slot 6: 0.329 0.982% PDCCH DM-RS RMS EVM, Peak EVM, slot 6: 0.155 0.326% PDCCH RMS EVM, Peak EVM, slot 7: 0.301 1.159% PDCCH DM-RS RMS EVM, Peak EVM, slot 7: 0.138 0.270% PDCCH RMS EVM, Peak EVM, slot 8: 0.280 1.039% PDCCH DM-RS RMS EVM, Peak EVM, slot 8: 0.143 0.237% Averaged overall PDSCH RMS EVM: 0.253% Overall PDSCH Peak EVM = 0.89869% Averaged overall PDCCH RMS EVM: 0.303% Overall PDCCH Peak EVM = 1.3105%
Display Results
Display the spectrum and the adjacent channel leakage ratios.
Not Filtered
According to TS 38.104 Section 6.6.3.2, the minimum required ACLR for conducted measurements is 45 dB. As some of these ACLR values are lower than 45 dB, they do not fall within the requirements.
hACLRResultsNR(aclr,aclrParameters,txWaveform,'(not Filtered)');
Filtered
The performance improves when the generated waveform is filtered. The ACLR results with the filtered waveform are higher than the minimum required value.
hACLRResultsNR(filtAclr,aclrParameters,txFiltWaveform,'(Filtered)');
Local Functions
function hACLRResultsNR(aclr, aclrParameters, waveform, arg) minACLR = 45; % 4th input argument is plot title qualifier if nargin > 3 titleText = [' ' arg]; elseif nargin > 1 titleText = []; else titleText = []; waveform = []; end % ACLR values and ticks for bar chart values = round([aclr(1:end/2) 0 aclr(end/2+1:end)],1); tick = 1:numel(values); ticklabel = tick-ceil(numel(tick)/2); labelvec = tick; labelvec(ceil(end/2)) = []; % Do not plot label for 0dB ACLR on channel % Plot NR Spectrum if ~isempty(waveform) figure; [spectrum, frequency] = pwelch(waveform, kaiser(8192*4,19), [], [], ... aclrParameters.SamplingRate, 'centered', 'power'); frequency = frequency * 10^(-6); % MHz spectrum = 10*log10(spectrum / max(spectrum)); adjacentChannelLabel = [ticklabel(1:floor(length(ticklabel)/2)) ... ticklabel(floor(length(ticklabel)/2)+2:end)]; % Select 'x' and 'y' limits to show the adjacent channels in the plot xLimitRight = aclrParameters.AdjacentChannelOffset + (aclrParameters.MeasurementBandwidth/2); xLimitRight = xLimitRight * 10^(-6); % MHz xLimitLeft = aclrParameters.AdjacentChannelOffset - (aclrParameters.MeasurementBandwidth/2); xLimitLeft = xLimitLeft * 10^(-6); % MHz yLimits = [min(spectrum)-20 max(spectrum)+10]; ylim(yLimits); xlim([min(frequency) max(frequency)]) hold on; for i = 1:length(aclrParameters.AdjacentChannelOffset) patch('XData',[xLimitRight(i) xLimitRight(i) xLimitLeft(i) ... xLimitLeft(i)],'YData', [yLimits fliplr(yLimits)], ... 'FaceColor','y','FaceAlpha',0.2) % Plot adjacent channels text(aclrParameters.AdjacentChannelOffset(i)*10^(-6), i, sprintf('%d', ... adjacentChannelLabel(i)), 'HorizontalAlignment', 'Center', ... 'VerticalAlignment', 'Top'); % Plot adjacent channel labels end plot(frequency, spectrum); hold off; xlabel('Frequency (MHz)'); ylabel('Normalized Power (dB)'); title(strcat ('NR Spectrum', titleText)); legend('Adjacent channels', 'Location', 'SouthEast') end % Plot NR ACLR figure; hold on; yline(minACLR,'r'); bar(values, 'BaseValue', 0, 'FaceColor', 'yellow'); hold off; set(gca, 'XTick', tick, 'XTickLabel', ticklabel, 'YLim', ... [0 0.2*max(values)+max(values)]); for i = labelvec text(i, values(i), sprintf('%0.1f dB',values(i)), ... 'HorizontalAlignment', 'Center', 'VerticalAlignment', 'Top'); end title(strcat('NR Adjacent Channel Leakage Ratio', titleText)); xlabel('Adjacent Channel Offset'); ylabel('Adjacent Channel Leakage Ratio (dB)'); legend('Minimum required ACLR'); end
References
[1] 3GPP TS 38.104. “NR; Base Station (BS) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.