Model, Simulate, and Test 5G NR PHY in MATLAB
Overview:
This presentation demonstrates how 5G Toolbox provides 3GPP New Radio standard-compliant models to drive your design and verify complete 5G physical layer systems or components with MATLAB.
Highlights Include:
- Uplink and downlink 5G NR waveform generation
- Channel models as specified in TR 38.901 including tapped delay line (TDL) and clustered delay line (CDL), as well as ray-tracing models
- Link-level simulation reference design, enabling you to measure throughput of a downlink or an uplink 5G link over 2-D or 3-D channel model
- Synchronization procedures including cell search, MIB and SIB1 decoding
- Beamforming strategies for 5G systems (beam sweeping, or SRS and CSI-RS based)
- ACLR and EVM measurement in the presence of RF impairments
- Brief discussion of O-RAN, AI for wireless, system-level simulations and NTN links
Hello and welcome to this presentation of 5G Toolbox. My name is Marc Barberis and I am a part of the Application Engineering Group at bat365.
In this presentation, we will have a look at how 5G Toolbox lets you model, simulate and test 5G Systems. This presentation is based on release 2023a of 5G Toolbox.
The agenda for this presentation is as follows
- I will introduce the main goal of 5G Toolbox
- We will see how to quickly generate 5G waveforms
- Once we have waveforms, we can put them in a scenario with channel models and a receiver to measure throughput for an end-to-end link
- We will have a look at how to model beamforming for those links
- We will also have a look at measurements such as EVM and RF impairments
- As well as other application areas including O-RAN, deep-learning, system-level simulation and NTN
- Before concluding this presentation
Let’s start with a quick overview of what is in 5G Toolbox.
5G NR specifications are readily available on the web. This means you can just download them but reading and understanding the specifications takes time.
{A] Implementing those also takes time.
[A} And, as you would expect, implementing them correctly, which is, making sure your implementation is correct, takes the most time.
[A] 5G Toolbox does all that work for you. It implements the 5G NR specifications and provides a verified environment for your work. Therefore, 5G Toolbox lets you focus on what matters.
I will not be talking about the 5G standard in this presentation. If you want to get up to speed on the standard, I refer you to our great 2-day class that covers the 5G physical layer in detail. You can see a link to the class on this slide.
Let’s have a look at how our customers currently use 5G Toolbox.
[A] The first application is to generate 5G compliant waveforms with all possible bandwidths and configurations allowed by the standard. We support off-the-shelf waveforms such as Fixed Reference Channels and Test Models, as well as full custom waveforms.
[A] Another popular application is to look at 5G performance. You can set up an end-to-end link level simulation with transmitter, receiver, and impairments, and analyze the throughput.
[A] A third popular application is EVM and ACLR measurement, typically to investigate the impact of RF impairments or a piece of equipment such as a power amplifier on the quality of the waveform.
[A] Finally, you can feed an actual waveform captured in the field or in a lab and have 5G Toolbox analyze it. In particular, for a downlink waveform, 5G Toolbox can perform initial synchronization and acquisition of master information block and system information type I.
[A] In each case, it is useful to keep in mind that you can connect your MATLAB session to the real world. You can export and import real-world data through an instrument with Instrument Control Toolbox, or an SDR board such as Zynq, Pluto or Ettus boards, by downloading a support package for the board.
What are the main benefits of 5G Toolbox:
It includes 5G-specific functions and examples.
It comes with extensive documentation. This is very important. I do sometimes encounter companies with an internal simulator, but it is hard to use and maintain. 5G Toolbox is maintained by bat365 and comes with extensive documentation.
It is verified against external sources.
And it includes full MATLAB source code. Concretely, this means that if you look at any example and open any function in the Toolbox, you can see the source code all the way to the leaf level.
To conclude the overview of the toolbox, I want to mention the most prominent new feature in Release 2023a. As part of Release 17, the 5G standard allows for increased subcarrier spacing and bandwidths as shown on the table. These updates are meant for the new FR2-2 frequency band, which ranges from 52 to 71 GHz. Release 2023a of 5G Toolbox supports subcarrier spacings up to 960kHz and bandwidths up to 2GHz.
This concludes this quick overview of the toolbox. Now, I am going to show you the toolbox and start with waveform generation.
What type of waveform can you generate with 5G Toolbox? You can generate off-the-shelf waveforms specified by 3GPP. Some of them are called test models or NR-TMs, others are called fixed-reference channels or FRCs. Or you can generate full custom uplink and downlink waveforms.
The easiest way to generate those waveforms is to use the 5G Waveform Generator App. So, let’s have a look at the App in action.
I select the App tab and start the 5G Waveform Generator. I can select custom downlink, custom uplink, a test model, a downlink FRC, or an uplink FRC.
Let’s start with an uplink FRC.
You first select the frequency range of interest: FR1 for sub-7GHz or FR2 for mmW. You then pick the modulation scheme and coding rate: let’s select 64 QAM, and then one of the available FRCs: let’s pick the last one, with 30kHz and 100 MHz bandwidth.
You can also add impairments such as phase or frequency offset [select phase offset], phase noise, or non-linearities [select memoryless cubic nonlinearity], and generate the waveform simply by clicking on the Generate button.
You can see the 100MHz spectrum of the waveform at the top. At the bottom, the OFDM grid shows that most of the time frequency resources are occupied by uplink data or PUSCH.
You can now export this waveform to the MATLAB workspace or a file [click on Export] or generate a MATLAB script that recreates this exact waveform [scroll through script], or a Simulink block. Alternatively, if you have an instrument or an SDR board connected, by switching to the Transmitter tab, you can configure the instrument by indicating the carrier frequency and transmission power and transmit that waveform over the air.
The principle is exactly the same for downlink FRCs or [show it] test models.
In summary, you have a great, interactive way to generate pre-defined 5G waveforms.
Next, we will generate a custom downlink waveform. You can see that there are many parameters you can set up, starting with the frequency range, bandwidth, and cell ID, but also all sorts of parameters for the synchronization burst, PDSCH, CSI-RS, and PDCCH. And this includes the CORESETs and associated search spaces. Let’s generate the waveform and the corresponding MATLAB script.
As you can see, the generated code shows you how to set up all those parameters from the command line. This makes the Wireless Waveform Generator App a great way to get started with complex 5G waveforms, even if you intend to later work with MATLAB code.
In summary, 5G Toolbox lets you quickly generate off-the shelf standard-compliant 5G waveforms. You can generate those waveforms interactively or with a script. The generated baseband I/Q waveform is unencrypted and ready for further use.
I now want to give a little more insight into what the different components in the waveforms are.
5G Toolbox supports all channels defined in the standard, including data, control, broadcast and random access, as well as all signals including synchronization, demodulation, tracking, channel sounding and positioning.
Release 2023a of 5G Toolbox includes R17 updates to those waveforms and signals, as shown on the slide. As mentioned in the introduction, one of the most obvious updates is the ability to generate waveforms with a bandwidth of up to 2GHz and a subcarrier spacing of up to 960kHz. But there are other noteworthy updates such as support for QAM1024 or 32 HARQ processes.
Let me conclude this section about waveform generation by stating again that 5G Toolbox gives you access to both full custom and off-the-shelf waveforms. It supports all channels and signals defined in the standard and lets you generate waveforms from the Wireless Waveform Generator App or MATLAB code.
Next, we want to look at setting up a complete 5G NR end-to-end link for throughput simulation.
The 3GPP standardization body came up with channel models called tapped delay line and cluster delay line, in a document called TR 38.901. These channels come with very many options and parameters, but they also come with predefined profiles called A, B, C, D, and E. 5G Toolbox offers those profiles as well as the full custom option.
What are those TDL and CDL channels? Think of TDL as the traditional 4G or 3G channel, with a delay and power profile and each tap has a Rayleigh fading characteristic.
The CDL, on the other hand, is quite interesting because, as shown on the right side of the slide, it models clusters of rays leaving the transmit antenna, each ray being associated with a given elevation and azimuth angle; and the same happens on the receive side. Therefore, this model includes 3D propagation, and it is particularly suited for beamforming simulation. Note that the antenna model in the CDL channel is quite sophisticated, with arrays of panels of cross-polarized antenna arrays. In addition, the CDL channel model in 5G Toolbox lets you specify any type of antenna or antenna array.
The TDL and CDL channel models are extremely useful channel models. They are what is called a stochastic model and represent a type of propagation conditions. On the other hand, they are not purely geometric and never exactly match the propagation conditions of any specific location.
At the other end of the spectrum are channel models that are meant to closely reflect the propagation conditions between a transmitter and receiver at very specific locations with detailed surrounding information. This is what is called a ray-tracing channel model. You can perform ray-tracing analysis between one or several gNodeBs and one or several UEs taking into account buildings and surfaces.
The ray-tracing engine allows up to 10 reflections off the ground and buildings. Release 2023a introduces a new capability: the ability to model diffraction.
Now that we have generated waveforms and seen which propagation channels are available, we can continue building up our simulation and set up a complete end-to-end link.
5G Toolbox comes with fully configured end-to-end examples for each direction. On the downlink, we can see all the DLSCH and PDSCH processing stages, including waveform generation in blue, propagation, and the receive chain in red with closed-loop feedback for HARQ and precoding. At the output, we get the physical bits that were transmitted, and we can derive the throughput versus SNRs for this scenario, as shown on the right side.
This lets you investigate the performance of a 5G uplink or downlink for various levels of noise, signal bandwidths, modulation types and so forth.
Let me show you where you will find those examples in 5G Toolbox.
I bring up the 5G documentation. If we go to our list of examples, you can select the end-to-end category in the category list. The first two examples show throughput measurement for the downlink and the uplink.
If I select the uplink for example, you can see the overview of the link. Here we see how we set up the PUSCH parameters including modulation, coding rate, DMRS type, and so forth. Scrolling all the way down to the receiver, you can see perfect or practical synchronization, followed by perfect or practical channel estimation, equalization, MIMO decoding, and LDPC decoding. As a result, we can check the CRC, request retransmissions, and compute the throughput.
Next, I want to point out quite a different application, which is positioning based on the positioning reference signals or PRS. The scenario is that a UE can receive PRS from three or more base stations. As base stations are synchronized, the UE can apply time difference of arrival on the received PRS to determine its position by triangulation.
To introduce the next example, here is a quick refresher of what happens when a UE first attempts to get on the network.
The gNB periodically transmits a synchronization signal burst, with several repetitions beamformed in different directions. The UE detects and decodes the best beam. This gives him enough information to locate and decode the next piece of information, the System Information Block Type 1 or SIB1. Once the SIB1 is decoded, the UE has gained enough information to be able to make its presence known by sending a RACH message to the base station.
This example performs all those steps up to the retrieval and recovery of the SIB1. What is very exciting about this example is that you can input your own waveform acquired in the field or in a lab, and it will process it and perform initial synchronization.
Alternatively, you can of course generate a synthetic waveform with beam sweep and send it through a propagation channel before entering the receiver.
Let us look at the Cell Search example in MATLAB. You can find it under “Signal reception”.
Let me open and run the example.
We see the SSB pattern, with 8 quasi-repetitions of the original SSB, as well as 8 repetitions of something else that we will get to later.
(Show PSS correlations) On the receive side, we first perform coarse frequency correction by pre-correcting the waveform with multiples of the half-carrier spacing. You can see that the maximum is obtained for the blue curve, which corresponds to PSS = 0, and an estimated frequency offset of 0Hz, as expected as there is no frequency offset introduced here.
Now that the primary synchronization sequence has been identified, we can perform fine frequency offset correction and detect the secondary synchronization sequence:
(Show SSS correlations) It is one of the possible 336 and, at that point, the receiver has knowledge of the physical cell identity.
(Show DMRS correlations) The UE can also tell, even if it had not received any of the other SSBs, that it received the first SSB of the burst, by looking at the SNR of the DMRS sequence in that SSB. This is useful information for the gNodeB because it can reuse the same beamforming to target this UE in the future.
(Show PBCH constellation) Here, you can see the equalized constellations for the BCH. The master information block was correctly received, and the information decoded. The EVM on the BCH is about 8%.
(Show highlighted CORESET) Now that the MIB has been recovered, the UE can go after the common CORESET, and we can see that the next repeated part in the waveform is the PDCCH followed by the SIB1, which is carried by the PDSCH. (Show the strongest PDCCH & PDSCH).
Finally, the SIB1 is decoded.
Next, I want to address beamforming in a bit more detail, as it is a central part of the 5G standard.
Beamforming in 5G can take many forms. We have just seen beam sweeping applied to the synchronization signal block. There is also a procedure for beam refinement among the shipping examples.
But the two examples I want to highlight address two other aspects of beamforming and make use of channel sounding signals such as sounding reference signals or SRS on the uplink and channel state information reference signals or CSI-RS on the downlink for CQI/PMI/RI reporting.
This example is applicable to TDD transmission, where the uplink and downlink channels are reciprocal.
This is a very sophisticated 5G example that shows how to perform multi-user downlink beamforming based on channel estimation performed on the reception of SRS sent by multiple UEs. The base station determines not only the beamforming matrix but also which UE to schedule, based on the quality of the channel for each UE and their relative orthogonality. And scheduling and precoding happen on a subband basis.
Because this scenario is based on SRS and the UE doesn’t need to be notified of any precoding, there is no need for any reporting of channel state information here. The base station is free to compute anything it needs to and make its own decisions.
In this next example, the situation is very different. First, this scenario applies to both TDD and FDD transmissions because there is no assumption that the channel is reciprocal.
Here, the base station is sending channel state information reference signals or CSI-RS to UEs on the downlink. The UE reports channel state information including precoding, rank information, and channel quality information.
The standard defines several techniques for precoding reporting, based on various codebooks called Type I, Type II, and eType II. 5G Toolbox supports all those options, with eType II the latest addition, in release 2023a.
In this section, I want to show how 5G Toolbox can help with measurements such as EVM and ACLR. This is important if you want to evaluate the impact of a component in the chain on transmission quality. This could be a power amplifier or a modulator.
5G Toolbox ships with an ACLR measurement example.
The example first generates a 5G NR waveform, as we saw in our earlier section.
Then it upsamples and filters the waveform and computes the ACLR.
You will find the ACLR example in the test and measurement section. This is a live script, which avails us of interactive controls.
Let me open and run the live script [Run it and wait for it to complete].
You can see how we select the source waveform. We then design a low-pass filter that reduces emission in the adjacent bands and run two paths in parallel: one with the unfiltered waveform and one with the filtered waveform, in order to study the impact of the filter. Both waveforms then undergo a non-linearity. This non-linearity creates spectral regrowth. We compute the EVM and ACLR for the unfiltered waveform and the filtered waveform in parallel.
First, we can see that the EVM for the unfiltered waveform is very low at 0.01%. This means we must be operating in the linear region of the non-linearity. If we look at the EVM of the filtered waveform, we see that it is a bit higher, at 0.25%. This increase in EVM is attributable to the lowpass filter.
Regarding ACLR, we can see that the spectrum of the unfiltered waveform shows strong spectral regrowth right outside of the band, whereas the one of the filtered waveform exhibits a much stronger decay. Correspondingly, the filter improves the ACLR from 41dB to 71dB.
The next example is dedicated to measuring EVM on a 5G NR waveform. In this example, we generate an ideal waveform with 5G Toolbox and add a model of phase noise impairments, IQ imbalance and power amplifier non-linearities. It reports the EVM for both control and data and analyzes the EVM variations over time and frequency as displayed in this 3D plot on the top right. The same example exists for the uplink as well.
Often, when you want to measure EVM, you may want to either generate a waveform with MATLAB and export it through a waveform generator or import an external waveform into MATLAB to perform EVM analysis – or both.
The example shown here does both: it generates a waveform in MATLAB, transmits it over the air with an instrument, captures the waveform with another instrument, and imports it back into MATLAB for EVM analysis.
For this reason, it is a great example to refer to if you are interested in that kind of flow.
The impairments we have seen so far can be easily modeled in baseband in MATLAB by using capabilities in Communications Toolbox such as phase noise, non-linearities or IQ imbalance. If you want to go beyond those impairments and look at effects such as intermodulation, leakage, S-parameters and more complex amplifier models, you can take advantage of RF simulation capabilities in our RF Blockset product.
Several examples in 5G Toolbox illustrate how to bring in those more complex impairments together with 5G waveform generation and analysis. As you can see on this slide, the RF part is modeled with RF Blockset, which works within Simulink. RF simulation here uses circuit envelope, a technique that provides much more accuracy than simpler models but runs much faster than detailed RF simulations.
This leads me to the last section of my presentation, where I want to mention a few other topics that are also part of 5G Toolbox and would each deserve a longer introduction on their own.
First, O-RAN is a very popular topic. The ability to mix and match equipment from different vendors has motivated the need for standardized interfaces and transmission protocols at those interfaces. One popular split is called 7.2x.
5G Toolbox offers the ability to generate bit streams at the 7.2x interface including one of 3 compression techniques. You can export the bit stream to a PCAP file for analysis by a packet analyzer or verification of your own interface. Both control and user planes are supported.
Deep Learning is an area that is showing great promise for wireless communications for applications such as scheduling, physical layer optimization, cross-layer optimizations and so forth.
5G Toolbox ships with several examples of deep learning applications, some of which are shown on this slide. You will also find examples of classification, another popular topic, for example recognizing whether the input waveform contains any 5G or LTE component.
One of the latest additions is the CSI Feedback with Auto-encoders example. This topic deserves a much longer presentation and, if you are interested, look for the webinar called Beamforming for MU-MIMO in 5G NR on the bat365 website.
This is a topic that is being worked on by 3GPP in Release 18: how to efficiently compress channel state information and replace those codebooks we talked about earlier: Type I, Type II, and eType II.
All these examples show a complete flow starting with data generation and automatic labeling, training, verification, and deployment.
While 5G Toolbox is primarily focused on the physical layer, you will find an increasing number of examples that address the larger problem of system-level simulation.
The main objective of those larger simulations is to estimate the throughput at the cell level as opposed to a single link. 5G Toolbox offers unique capabilities in this area as you will find examples with full physical layer simulations, which provide the greatest accuracy, as well as passthrough PHY, which provide the greatest speed and, importantly, abstracted PHY, which is an intermediate level of modeling.
For abstracted PHY, enough physical layer is modeled to accurately measure the SINR of each receive link. Then performance is predicted based on knowledge of link performance under various transmission conditions and SINR. This simulation is quite accurate but does not require full modeling of the PHY with detailed coding and equalization.
The final topic of this section is non-terrestrial networks or NTN. Release 17 added new capabilities in the 5G standard to better support NTN links.
This example taken from Satellite Communications Toolbox extends the throughput capabilities to an NTN link. There are several key differences with a terrestrial link:
- The transmission channel is quite different. Two options are available. The narrowband channel and the TDL channels, which are defined in TR 38.811
- Doppler shift is much higher due to the satellite speed. Some of it can be pre-compensated in the transmitter, at least for the center of the beam, while the rest must be tackled in the receiver
- Finally, up to 32 HARQ processes are available. This higher number of processes is necessary to accommodate the higher latency of the link
Let me conclude this presentation by highlighting three key facts about 5G Toolbox.
First, you can easily generate 5G NR waveforms, either off the shelf or custom
Second, 5G Toolbox comes with complete examples for end-to-end links, synchronization and measurements, as well as additional topics beyond the physical layer.
Third, you have full MATLAB source code for everything in the toolbox
And, of course, we have done the hard work of verification, which lets you focus on what matters to you.
If you want to learn more about 5G Toolbox, visit our 5G Toolbox page at bat365/products/5g.
You will find information about all topics, with links to examples, videos and additional resources.
Sign up for our training class or watch related webinars shown on this slide.
Related Products
Learn More
Featured Product
5G Toolbox
Up Next:
Related Videos:
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other bat365 country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)