Modeling and Testing an NR RF Transmitter
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™.
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.
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 by using the CCDF and PAPR block.
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 Waveform From Wireless Waveform Generator App.
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.
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
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.
According to TS 38.141-1, not all PDSCH symbols are considered for the EVM evaluation. Using the RNTI, the helper function
hListTargetPDSCHs selects the target PDSCH symbols to analyze.
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 second Spectrum Analyzer 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.
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');
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 IQ Modulator (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 Generate Wireless Waveform in Simulink Using App-Generated Block.
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.
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<NASGU> % 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