# Implanting Intelligence in 5G Mobile Networks--A Practical Approach
## 2 Tutorial & Background
### Network Data Analytics Function  
The 3 GPP (TS 29.520) introduces relatively a new Network Data Analytics Function (NWDAF) in the 5G SBA as a core network function that supports intelligent and autonomous network operations and service management. NWDAF is a general architecture through which various data-driven artificial intelligence (AI) / machine learning (ML) analytical technologies can be integrated with the 5G networks. Figure 2 shows the NWDAF architecture where it collects the data from different modules such as network functions e.g., (AMF, SMF, and PCF) application functions (AFs), the unified data repository (UDR), and operation, administration, and management (OAM) system to perform the network analytics.  
Typically, the data are collected from the NFs when the data are related to the individual UE or network sessions. However, the data related to the global network states, such as performance measurements of network slices and services/applications, are often obtained from OAM. NWDAF can collect the data in two ways either reactively requests the particular customer (NF/AF/OAM) for a certain type of information or proactively retrieves the data for long-run analytics. The NWDAF realizes the data collection via a service-based interface (SBI) using either the request/response mode to collect the data for one time or subscription/notification mode to regularly retrieve the data for a certain time period. Once the data are collected, it performs the analytics and delivers this analytics information to the requested NFs, AF, and OAM to make optimal decisions about network operations and management actions. The NWDAF generates two main types  
Figure 1: 5G Service Based Architecture.  
Figure 2: Architecture of Network Data Analytics Function.  
of analytical information (i) statistical information and (ii) prediction information [17]. The statistical information includes traffic load and resource utilization of network slices, network/service performance measurements, and user mobility pattern analysis. However, the prediction information comprises temporal and spatial traffic distribution predicted for a future time period and UE location prediction for a future time instant. The 5G SBA allows the NWDAF to be deployed as single or multiple virtual network functions (VNF) on the same network domain. The multiple instances of NWDAF can be deployed as either a central NF, a collection of distributed NFs, or a combination of both. When multiple instances of NWDAF are deployed, each instance may provide a certain type of analytics. The interaction between the NWDAF and the NFs is a consumer-provider model. That is, 5G SBA allows the consumer of the NWDAF to discover and select the suitable NWDAF instance to obtain the specific analytics via the network NRF. After discovering an NWDAF instance, the consumer NFs can either retrieve the data via SBI request/response messaging protocol to obtain one-time analytical information per request or may subscribe to a certain type of analytic service offered by the NWDAF instance to regularly receive notification messages from the NWDAF instance that delivers analytical information generated from the service.  
Concludingly, some of the main use cases of 5G NWDAF are: (i) load-level computation and prediction for a network slice instance; (ii) load analytics information and prediction for a specific NF; (iii) network load performance computation and future load prediction; (iv) UE mobility-related information and prediction; (v) QoS sustainability which involves the reporting and prediction of QoS change [18].