## 5 Random Linear Network Coding for 5G New Radio
### Introduction to 5G NR  
**Overall 5G NR Architecture:** The 5G system architecture consists of a 5G Access Network (AN), 5G Core (5 GC) Network and the UE [73]. The 5G AN comprises an NG-RAN and/or non-3 GPP AN connecting to a 5G Core Network. NG-RAN focuses on the radio interface protocol architecture and contains NG-RAN nodes termed next-generation NodeB (gNB), providing NR user plane and control plane protocol terminations towards the UE. The gNBs are interconnected with each other and are also connected by means of the NG interfaces to the 5 GC, most importantly to the AMF (Access and Mobility Management Function) and to the UPF (User Plane Function), as illustrated in Figure 6[74]. For the details on 5G NR architecture and other 5 GC entities and interfaces, we refer the interested reader to [73]. **5G NR Radio Protocol Architecture - User Plane:** Figure 7 (left) illustrates the protocol stack for the gNB user plane that includes Service Data Adaptation Protocol (SDAP), PDCP, RLC, MAC and PHY sublayers. The new SDAP sublayer is introduced to 5G NR targeting specifically Quality of Service (QoS) control in NG-RAN. SDAP handles: i) the mapping of 5G QoS flows to data radio bearers (DRBs), and ii) marking of 5G QoS flow Identifier (QFI) to a QoS flow in both DL and UL packets. We will discuss in more detail 5G QoS architecture later in this subsection. The main functions of PDCP sublayer remain similar to 4G LTE (e.g., header compression, ciphering and integrity protection), with the exception of one important new feature called PDCP PDU duplication. The PDCP duplication offers the possibility of sending the same PDCP PDUs twice: once on the original RLC entity and a second time on the additional RLC entity. The original and duplicate PDCP PDUs are transmitted on different carriers. The two different logical channels can either belong to the same MAC entity, e.g., via carrier aggregation (CA), or to different logical channels in the case of multi-connectivity, i.e., dual connectivity (DC) [74]. As we discuss later, combined with the PDCP duplication feature, PDCP could provide an ideal place for RLNC sublayer integration. The RLC protocol preserved most of the LTE functionalities, including ARQ-based error correction, segmentation and reassembly of SDUs, etc. Similarly, the main services and functions of the MAC  
Figure 6: 5G NR System Architecture. sublayer resemble those in LTE and include, e.g., error correction through HARQ, priority handling between UEs by means of dynamic scheduling, and priority handling between logical channels of one UE by means of logical channel prioritisation. **QoS Architecture in 5G NR:** Basic granularity for QoS control in LTE EPC/E-UTRAN is EPS bearer/E-UTRAN Radio Access Bearer (E-RAB). EPS bearer/E-RAB established when UE connects to a PDN is called the default bearer, while any additional bearer is referred to as a dedicated bearer. Each bearer is characterized by the same packet forwarding treatment (e.g., scheduling policy, queue management policy, rate shaping policy, RLC configuration, etc.). A bearer is called guaranteed bit-rate (GBR) bearer if it is provided dedicated network resources, otherwise, it is called non-GBR bearer. In 5G, the concept of QoS flow is introduced which is considered the finest data flow granularity that receives the same forwarding treatment. Providing different QoS forwarding treatment requires separate 5G QoS flows. Multiple QoS flows are part of a packet data unit (PDU) session: an association between the UE and a PDN [73]. For each UE, the 5 GC may establish one or more PDU sessions carrying QoS flows of different QoS level. QoS flow ID (QFI) identifies a QoS flow within a PDU session and indicates a specific QoS forwarding behavior (e.g., packet loss rate, packet delay budget). At the NG-RAN, the QoS flows are mapped to one or more data radio bearers (DRBs).