Read the first part here: https://blog.magmaindia.org/ran-protocol-stack-sdap-pdcp-rlc/
Read the second part here: https://blog.magmaindia.org/ran-protocol-stack-mac-phy-part-2/
5. PHY-Layer (functions)
CRC
First we need a mechanism to detect error on the level of transport block. For this purpose CRC(Cyclic Redundancy Check) is calculated and added to the transport block. On the receiver side, CRC can be used to detect error in the transport block level and request retransmissions if transport block is fully corrupt.
A 24 bit CRC is used for payloads larger than 3824 bits and if payload is smaller than the 16 bit CRC is used.
LDPC Coding
We have seen error detection mechanism in transport block level , let see procedure for error correction. When it comes to channel coding , which is used for error correction ,NR uses LDPC Coding.
LDPC uses a parameter called BASE GRAPH , that governs the coding process. In our support to LDPC base graphs, one for small transport block and one for large transport block.
LDPC uses two parameter :-
1. Transport Block Size(TBS)
2. Code Rate
When a TBS and Code rate is above the threshold then Base-Graph1 is used otherwise BaseGraph-2 is used.
If transport block is larger than it will be segmented into small block known as code block before performing LDPC Coding to it.
Channel Coding is the process of adding additional bits that makes the information resilient to the channel attenuation.
Although it result in the reduntation of data rate , it is essential to combat the attenuation.
So some of the error can be corrected without retransmission using channel coding process. In this case , we need to apply LDPC coding to each code-block to improves its resiliency and to correct some of the small error.
Rate Matching
Not all the output bit of LDPC coding step can be transmitted in a given transmitted time. So after the LDPC coding , rate matching takes the coded bits and extract the exact set of bits that can be transmitted in a given transmission time of interval. It is perform separately for each code block.
Scrambling
The Device (UE) may hearing signals from multiple gNB simultaneously. So can the UE differentiate the incoming signals into separate gNB’s at the very low layers of the protocol-stack.
Because in high layer , we have different ways of addressing the devices. But a PHY-layer , the device needs a mechanism so that it can listen to one gNB and ignore the information from interfering gNB.
The Scrambling Block of code is multiplied by scrambling sequence.
Now the device that knows the scrambling sequence can see the information corresponding to the correct gNB as a signal. So in this way UE can listen to the intended gNB and treat all the other gNB as interference signals(as ignored).
Modulation
After scrambling is done , now its time for modulation. So in downlink data modulation, we transform block of scrambled bits from 1’s and 0’s to a corresponding complex modulation symbols.
Now one symbol can represent ‘n’ bits depending on what is the modulation type that’s used.
Supported Modulation schemes:-
QPSK, 16QAM, 64QAM and 256QAM in both downlink and uplink.
Layer Mapping
It is important to recall that NR supports special multiplexing , it means it can be transmit more than one layer of data simultaneously using benefits of multiple antenna technologies.
Since many of the NR Radio includes multiple antennas. It is often possible multiple layers are supported. In this step, the complex value modulation symbols that needs to be transmitted are mapped into one or more layer.
Antenna Mapping and Pre-coding
After mapping to different layers, the next step is to map the corresponding virtual antenna ports.
In order to different data layer to be decoded as if they are different layers on the receiver they need to be pre-coded. Pre-coding are based on the channel conditions , the pre-coding process maps the different number of layers into the corresponding number of virtual ports.
This uses precoding matrix .It is selected based on ‘what is the current channel conditions’.
Resource and Physical Antenna Mapping
From the previous step of antenna mapping , we have the symbols for each virtual antenna ports. The Resource Block mapping takes the modulation symbols to be transmitted on each antenna ports and maps to the set of resource block assigned by the MAC’s scheduler for current transmission.
Resource block are shared together with control and reference signals. The other resource block fro actual data transmission.
Number of physical antenna is larger than number of virtual antenna ports, which is used in pre-coding stage. So, linear mapping is applied to map from virtual antenna port to physical antenna.
For mapping, we take the data that is mapped different virtual antenna port and put them into the right time and frequency resource block, which is correspond to the decision made by scheduler. And we also placed the control signals here and then we put it to the actual physical antenna port.
OFDM, DAC, RF
Till now, symbols are mapped into the OFDM waveform together with corresponding cyclic prefixes. Now they are converted to analog waveform using Digital to Analog Converter(DAC). And then converted to RF frequencies and fed to the Antenna for transmission.
If Analog-Beam Forming is used , it is carried out in the time domain just before transmission.
6. RRC-NAS
SDAP is unique for User-Plane Protocol Stack . Similarly RRC and NAS are unique to Control-Plane Protocol Stack. They are responsible for connection set up, mobility and security related functions.
NAS(UE-AMF)
NAS function operate between AMF in core network and the device. It includes following functions NAS(Non-Access Stratum):-
- Authentication
- Security
- Idle-Mode Procedures(Paging)
- Assigning IP Addresses to the devices
RRC(UE-gNB)
It operates between RRC in gNB and RRC in UE. It is responsible for handling the RAN related control-plane procedures such as
- System Information Broadcast
- Paging
- Connection Management
- Mobility Functions
- Measurement Configuration and reporting
- handling of devices capabilities
In NR there are 3 states of RRC:-
- RRC Idle
- RRC Connected
- RRC Inactive
The RRC Idle are used soon after the device is powered ON or when the device first enter to the coverage area of network.
In RRC Idle there is no RRC context that means there is no necessary parameter for communication between the UE/device and network.
The necessary parameter that are established as apart of connection procedure, helps with the communication between the UE/device and network. But in Idle State, these information is not yet available. And the device does not belong to any specific cell yet.
No data transfer take place because the device just sleeps most of the time to reduce the batter consumption in this state. It periodically wakes up to receive paging information if there is any paging information from the network. If there is any uplink data to be sent from device then the device has to do the random access procedure to get the UL-Synchronization scheduling.
This will leads the device from RRC Idle to RRC Connected State.
As a part of moving from idle to connected state, the RRC context is established in both the device/UE and network. In RRC Connected mode, the context is established and all the parameter necessary for communication between the UE and RAN are known to both UE and network.
In this case the device is explicitly belongs to a cell and cell to which devices is belong, is known to the network.
An identity is used for the devices for signaling purposes between the device and network. The connected state intended for data transfer to and from device.
Every time the device goes from RRC IDLE to Connected, there is lots of control signaling. Since, often time the amount of data sent is quite small and to have all that control signals just for sending a small amount of data is not very efficient.
For this purpose, a new state is introduced in NR known as RRC Inactive
A procedure called RRC-Suspended is used to go from connected to inactive state and RRC-Resume is used to go from inactive state to connected state.
RRC Inactive state , the entire RRC context is stored both in the devices and the gNB. Hence the transition from connected to inactive state is quite fast.
There is no need for any core network signaling . Since the RRC context is already is place in the network. The transition from inactive to connected can happen entirely in RAN. At the same time, the device is allowed to go to sleep in a similar way as in IDLE SATE.
So, it provide the energy saving benefit of idle state , but also readiness to go into the connected state very easily without much control signal overhead. This state provide good trade-off between performance and energy efficiency.