modeling and testing an nr rf transmitter -凯发k8网页登录
the example shows how to characterize the impact of rf impairments, such as in-phase and quadrature (iq) imbalance, phase noise, and power amplifier (pa) nonlinearities on the performance of a new radio (nr) radio frequency (rf) transmitter. the nr rf transmitter is modeled in simulink® using 5g toolbox™ and rf blockset™.
introduction
this example shows how to characterize the impact of rf impairments such as iq imbalance, phase noise, and pa nonlinearities on the performance of an nr rf transmitter. to evaluate the performance, the example considers these measurements:
error vector magnitude (evm): vector difference at a given time between the ideal (transmitted) signal and the measured (received) signal. annex b and annex c of ts 38.104 define an alternative method for computing the evm in fr1 and fr2, respectively.
adjacent channel leakage ratio (aclr): measure of the amount of power leaking into adjacent channels and is defined as the ratio of the filtered mean power centered on the assigned channel frequency to the filtered mean power centered on an adjacent channel frequency.
occupied bandwidth: bandwidth that contains 99% of the total integrated power of the signal, centered on the assigned channel frequency.
channel power: filtered mean power centered on the assigned channel frequency.
complementary cumulative distribution function (ccdf): probability of a signal's instantaneous power to be a level specified above its average power.
the example works on a subframe by subframe basis and uses a simulink model to perform these steps:
generate the baseband waveform using 5g toolbox features.
oversample and filter the waveform by using an fir interpolation block.
import the baseband waveform into the rf transmitter subsystem block implemented by using rf blockset blocks. the model uses an rf intermediate frequency to carry the baseband information in rf blockset.
model the effects of upconverting the waveform to the carrier frequency by using the rf transmitter subsystem block. this block models the impairments introduced by an rf transmitter using rf blockset blocks.
calculate the aclr/acpr, occupied bandwidth, and channel power and depict the spectral mask by using the spectrum analyzer block.
compute the ccdf and papr.
downsample and filter the waveform by using an fir decimation block.
extract the data symbols and measure the evm by demodulating the baseband waveform.
the simulink model uses 5g toolbox and dsp system toolbox™ features to process the baseband signal (steps 1, 2, and 5-8) and uses rf blockset blocks to model the rf transmitter (steps 3 and 4). this model supports normal and accelerator simulation modes.
simulink model structure
the model contains three main components:
nr baseband generation: generates the baseband nr waveform
rf transmission: models the effects of upconverting the waveform to the carrier frequency
nr baseband reception and measurements: performs the rf measurements and calculates evm by demodulating the baseband waveform
modelname = 'nrmodelingandtestingrftransmittermodel';
open_system(modelname);
nr baseband generation
the 5g nr test model block transmits standard-compliant 5g nr test model 3.1 (nr-tm3.1) waveform for frequency range 1 (fr1), as defined in ts 38.141-1. this block is generated using the 5g waveform generator app. you can access the waveform configuration parameters in the user data of the block. this example uses the initfcn in the model callbacks to store the structure available in the user data in a base workspace variable, nrinfo
. for more information about this block, see .
to display the effect of the high-power amplifier (hpa) on the out-of-band spectral emissions, the fir interpolation block oversamples and filters the waveform. at the output of the rf transmitter subsystem block, the fir decimation block downsamples the waveform back to the original sampling rate. the multirate parameters block provides an interface to configure the parameters of the fir interpolation and decimation blocks.
the multirate parameters block also provides the option to enable or disable the 3gpp ts 38.141-1 aclr test. to visualize the spectral regrowth, the aclr test oversamples the waveform. if the perform 3gpp aclr measurement parameter of the multirate parameters block is enabled, the oversampling factor depends on the waveform configuration and is set such that the generated signal is capable of representing first and second adjacent channels. to specify the oversampling factor, disable the 3gpp aclr test. the oversampling factor parameter defines the interpolation factor in the fir interpolation block and the decimation factor in the fir decimation block.
rf transmission
the rf transmitter subsystem block is based on a superheterodyne transmitter architecture. this architecture models the effects of upconverting the waveform to the carrier frequency by characterizing these rf components:
iq modulator consisting of mixers, phase shifter, and local oscillator
bandpass filter
power amplifier
in addition to these components, this rf transmitter subsystem block also includes a variable gain amplifier (vga) to control the input back-off (ibo) level of the hpa.
set_param(modelname,'open','off'); rftransmitterblock = [modelname '/rf transmitter']; set_param(rftransmitterblock,'open','on');
use an input buffer block to send one sample at a time to the rf transmitter subsystem block.
the inport block inside the rf transmitter subsystem block converts the simulink complex baseband waveform into the rf blockset circuit envelope simulation environment. the carrier frequencies parameter of the inport block specifies the center frequency of the carrier in the rf blockset domain. the outport block converts the rf blockset signal back into simulink complex baseband.
you can configure the rf transmitter components using the rf transmitter subsystem block mask.
the rf transmitter subsystem block models typical impairments, including:
i/q imbalance as a result of gain or phase mismatches between the parallel sections of the transmitter chain dealing with the iq signal paths.
phase noise as a secondary effect directly related to the thermal noise within the active devices of the oscillator.
hpa nonlinearities due to dc power limitation when the amplifier works in saturation region.
before sending the samples onto the decode subframe block, the output buffer (after the rf transmitter) buffers all samples within a subframe.
the use of buffers in the model generates time delays. as the duration of the delay is equivalent to the transmission of a subframe, the decode subframe block does not demodulate the first subframe.
nr baseband reception and measurements
the decode subframe block performs ofdm demodulation of the received subframe, channel estimation, and equalization to recover and plot the pdsch symbols in the constellation diagram. this block also averages the evm over time and frequency and plots these values:
evm per ofdm symbol: evm averaged over each ofdm symbol.
evm per slot: evm averaged over the allocated pdsch symbols within a slot.
evm per subcarrier: evm averaged over the allocated pdsch symbols within a subcarrier.
overall evm: evm averaged over the allocated pdsch symbols transmitted. it is reflected in the evm rms display block.
annex b and annex c of ts 38.104 define an alternative method for computing the evm in fr1 and fr2, respectively. you can enable this method by enabling perform 3gpp evm measurement parameter of the multirate parameters block.
the spectrum analyzer block provides frequency-domain measurements such as aclr (referred to as acpr) and occupied bandwidth. if you disable the perform 3gpp aclr measurement parameter of the multirate parameters block, you can select the oversampling factor and the spectrum analyzer block measures the occupied bandwidth.
a power meter block, called ccdf and papr, connected at the input of the hpa block depicts the ccdf and papr measurements.
the decode subframe block discards the first received subframe (1 ms) due to processing delays. therefore, to receive one frame, you must simulate 11 ms for fdd (10 ms for the frame plus 1 ms for the initially discarded subframe period). if the simulation time is longer than 11 ms, the 5g nr test model block cyclically transmits the same nr frame.
effect of power amplifier nonlinearities
to characterize the impact of hpa nonlinearities in the evm and aclr evaluations, you can measure the amplitude-to-amplitude modulation (am/am) of the hpa. the am/am refers to the output power levels in terms of the input power levels. the local function hplothpacurve
displays the am/am characteristic of the hpa selected for this model.
hplothpacurve(); fighpa = gcf;
p1db is the power at 1 db compression point and is usually used as a reference when selecting the ibo level of the hpa. you can see the hpa impact on the rf transmitter by analyzing the evm and aclr results for different operating points of the hpa. for example, compare the case when ibo = 14 db, corresponding to hpa operating in linear region, with the case when ibo = 2 db, corresponding to hpa operating in full saturation. the gain of the vga controls the ibo level. to keep a vga linear behavior, select gain values lower than 20 db.
linear hpa (ibo = 14 db). to operate at an ibo level of 14 db, set the available power gain parameter of the vga block to 0 db. run the simulation to capture, for instance, 4 subframes (5 ms). during simulation, the model displays the evm and aclr measurements and the constellation diagram.
set_param(rftransmitterblock,'vgagain','0'); sim(modelname);
evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 0: 1.168 3.841% pdsch rms evm, peak evm, slot 1: 1.064 3.578% averaged overall pdsch rms evm: 1.118% overall pdsch peak evm = 3.8414% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 2: 1.370 5.358% pdsch rms evm, peak evm, slot 3: 1.444 4.804% averaged overall pdsch rms evm: 1.408% overall pdsch peak evm = 5.3577% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 4: 1.058 3.506% pdsch rms evm, peak evm, slot 5: 1.355 4.955% averaged overall pdsch rms evm: 1.216% overall pdsch peak evm = 4.9547% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 6: 1.173 4.465% pdsch rms evm, peak evm, slot 7: 1.229 3.950% averaged overall pdsch rms evm: 1.201% overall pdsch peak evm = 4.465%
according to ts 38.104, the minimum required aclr for conducted measurements is 45 db and the maximum required evm when the constellation is 64-qam is 8%. as the aclr values are higher than 45 db, and the overall evm, which is around 1.2%, is lower than 8%, both measurements fall within the requirements.
nonlinear hpa (ibo = 2 db). to operate at an ibo level of 2 db, set the available power gain parameter of the vga block to 12 db.
set_param(rftransmitterblock,'vgagain','12'); sim(modelname); % restore to default parameters set_param(rftransmitterblock,'vgagain','0');
evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 0: 3.248 8.864% pdsch rms evm, peak evm, slot 1: 3.332 10.166% averaged overall pdsch rms evm: 3.290% overall pdsch peak evm = 10.1664% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 2: 3.994 12.668% pdsch rms evm, peak evm, slot 3: 3.473 11.397% averaged overall pdsch rms evm: 3.743% overall pdsch peak evm = 12.6681% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 4: 3.113 8.757% pdsch rms evm, peak evm, slot 5: 3.441 10.331% averaged overall pdsch rms evm: 3.281% overall pdsch peak evm = 10.3314% evm stats for bwp idx : 1 pdsch rms evm, peak evm, slot 6: 3.009 11.736% pdsch rms evm, peak evm, slot 7: 3.180 10.707% averaged overall pdsch rms evm: 3.096% overall pdsch peak evm = 11.7364%
compared to the previous case, the constellation diagram is distorted and the spectral regrowth is higher. in terms of the measurements, the first adjacent channel aclr does not fall within the requirements of ts 38.104 and the overall evm, which is around 3%, is higher than in the previous case.
summary and further exploration
this example demonstrates how to model and test an nr rf transmitter in simulink. the rf transmitter consists of an iq modulator, a bandpass filter and amplifiers. to evaluate the performance, the simulink model considers aclr and evm measurements. the example highlights the effect of hpa nonlinearities on the performance of the rf transmitter. you can explore the impact of altering other impairments as well. for example:
increase i/q imbalance by using the i/q gain mismatch (db) and i/q phase mismatch (deg) parameters on the iq modulator tab of the rf transmitter subsystem block.
increase the phase noise by using phase noise offset (hz) and phase noise level (dbc/hz) parameters on the iq modulator tab of the rf transmitter subsystem block.
the rf transmitter is configured to work with the current nr-tm waveform parameters selected in the 5g nr test model block and with a carrier centered at 2140 mhz (fr1). if you modify the center frequency (mhz) parameter of the rf transmitter subsystem block or the waveform configuration of the 5g nr test model block, check if you need to update the parameters of the rf transmitter components and the fir filters as these parameters are set to work with the current example configuration. for instance, a change in the carrier frequency requires revising the passband frequencies and stopband frequencies parameters of the bandpass filter block inside the rf transmitter. if you select a bandwidth wider than 20 mhz, check if you need to update the impulse response duration and phase noise frequency offset (hz) parameters of the (rf blockset) block. the phase noise offset determines the lower limit of the impulse response duration. if the phase noise frequency offset resolution is high for a given impulse response duration, a warning message appears, specifying the minimum duration suitable for the required resolution.
you can use this example as the basis for testing nr-tm waveforms for different rf configurations. you can try replacing the rf transmitter subsystem block by another rf subsystem and then configure the model accordingly.
to use a different nr-tm waveform, open the 5g waveform generator app, select the nr-tm configuration, and export a new block. for more information on how to generate and use this block, see .
references
3gpp ts 38.141-1. "nr; base station (bs) conformance testing part 1: conducted conformance testing." 3rd generation partnership project; technical specification group radio access network.
3gpp ts 38.104. "nr; base station (bs) radio transmission and reception." 3rd generation partnership project; technical specification group radio access network.
local functions
function hplothpacurve() % plots the am/am characteristic of the hpa. % hpa input and output power levels obtained from simulation drivergain = [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... 18 19 20]; %#ok% gain of the vga (just for reference) inputpower = [-15.382 -14.382 -13.382 -12.382 -11.382 -10.382 -9.382 -8.382 ... -7.382 -6.356 -5.383 -4.383 -3.357 -2.357 -1.358 -0.358 0.641 1.640 2.639 ... 3.637 4.635 5.633 6.629 7.624 8.616 9.606 10.592]; % hpa input power outputpower = [9.6140 10.6140 11.6140 12.6140 13.6140 14.6140 15.614 16.605 ... 17.595 18.582 19.566 20.545 21.517 22.477 23.436 24.361 25.261 26.121 26.926 ... 27.684 28.368 28.968 29.531 30 30.412 30.764 31.069]; % hpa output power lineargain = outputpower(1) - inputpower(1); % linear gain % plot am/am characteristic of hpa plot(inputpower,inputpower lineargain,'--','linewidth',1), hold on, grid on; plot(inputpower,outputpower,'linewidth',1); plot(inputpower(7),outputpower(7),'o','linewidth',1.5); % ibo=14db plot(inputpower(19),outputpower(19),'o','linewidth',1.5); % ibo=2db plot(inputpower(21),outputpower(21),'o','linewidth',1.5); % p1db legend('linear','hpa','ibo=14db','ibo=2db','p1db','location','northwest'); xlabel('input power (dbm)'); ylabel('output power (dbm)'); title('am/am hpa'); axis('tight'); end