5g nr downlink aclr measurement -凯发k8网页登录
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 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 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 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 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 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% pdsch rms evm, peak evm, slot 1: 0.008 0.029% pdsch rms evm, peak evm, slot 2: 0.008 0.024% pdsch rms evm, peak evm, slot 3: 0.010 0.023% pdsch rms evm, peak evm, slot 4: 0.009 0.021% pdsch rms evm, peak evm, slot 5: 0.009 0.025% pdsch rms evm, peak evm, slot 6: 0.009 0.022% pdsch rms evm, peak evm, slot 7: 0.009 0.026% pdsch rms evm, peak evm, slot 8: 0.008 0.020% pdsch rms evm, peak evm, slot 9: 0.009 0.023% pdcch rms evm, peak evm, slot 0: 0.012 0.027% pdcch rms evm, peak evm, slot 1: 0.008 0.017% pdcch rms evm, peak evm, slot 2: 0.010 0.024% pdcch rms evm, peak evm, slot 3: 0.010 0.022% pdcch rms evm, peak evm, slot 4: 0.007 0.019% pdcch rms evm, peak evm, slot 5: 0.011 0.028% pdcch rms evm, peak evm, slot 6: 0.012 0.026% pdcch rms evm, peak evm, slot 7: 0.013 0.029% pdcch rms evm, peak evm, slot 8: 0.012 0.022% pdcch rms evm, peak evm, slot 9: 0.010 0.018% 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]
% 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% pdsch rms evm, peak evm, slot 1: 0.247 0.751% pdsch rms evm, peak evm, slot 2: 0.245 0.816% pdsch rms evm, peak evm, slot 3: 0.249 0.807% pdsch rms evm, peak evm, slot 4: 0.264 0.733% pdsch rms evm, peak evm, slot 5: 0.281 0.899% pdsch rms evm, peak evm, slot 6: 0.254 0.778% pdsch rms evm, peak evm, slot 7: 0.237 0.654% pdsch rms evm, peak evm, slot 8: 0.238 0.797% pdcch rms evm, peak evm, slot 0: 0.403 1.310% pdcch rms evm, peak evm, slot 1: 0.310 0.850% pdcch rms evm, peak evm, slot 2: 0.271 0.858% pdcch rms evm, peak evm, slot 3: 0.261 0.874% pdcch rms evm, peak evm, slot 4: 0.227 0.911% pdcch rms evm, peak evm, slot 5: 0.311 0.936% pdcch rms evm, peak evm, slot 6: 0.329 0.982% pdcch rms evm, peak evm, slot 7: 0.301 1.159% pdcch rms evm, peak evm, slot 8: 0.280 1.039% 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.