## 3 Network and Management Data Analytics Functions in the 5G Network Architecture
In addition to NFs, AFs and OAM functions may also be NWDAF customers and discover NWDAF instances. For an AF that is not registered in the same trust domain as the NWDAF, the NEF will be used as a gateway for all the interactions between the AF and the corresponding NWDAF instances. In order to perform the required analytics functions, the NWDAF may need to collect data from various sources, including NFs (e.g., AMF, SMF, PCE, and UDR), AFs, and OAM functions, as a basis of the computation of network analytics. Typically, data collection is from NFs when the target data are related to individual User Equipment (UE) and network sessions. Data related to global network states, for example performance measurements of network slices and services/applications, are often obtained from OAM. Data collection may be reactive triggered by a request from a customer NF/AF/OAM function for a certain type of analytics or proactive for retrieving data needed for long-run analytics. NWDAF data collection is realized via the SBI using either the request/response mode for one-time data retrieval or the subscription/notification mode for regular data retrieval for a time period. In order to obtain the proper data needed for the requested analytics, the NWDAF is configured with the corresponding NF/AF types and/or OAM measurement types for each analytic ID it supports; therefore, it is able to send the request or subscription message to the right data sources for each type of analytics function. The 5G SBA allows the NWDAF to discover the appropriate sources for data collection via the NRF using the data availability information provided to the NRF by NFs/AFs during their registration processes. Data collection may cause additional communication overheads between the NWDAF and other system modules that may limit system scalability and degrade network performance. Therefore, it is important to achieve a balance between the completeness/preciseness of the collected data and the overheads introduced by data collection. The NWDAF should be able to efficiently obtain the required data with an appropriate level of granularity. Toward this objective, the following aspects of data collection are specified in the data retrieval request and subscription messages: granularity (individual event, a list of events, key performance indicators), temporality (periodical, on demand by the NWDAF, triggered by specific criteria, with validity period), and individuality (aggregated data vs. single scope data). The NWDAF is defined as a control plane function in the 5G SBA architecture. In addition, 3 GPP also developed a Service-Based Management Architecture (SBMA) and framework for 5G network management and orchestration following the service-oriented principle [32]. The fundamental building block of the SBMA is the Management Services (MnSs). An MnS is a set of capabilities for network management that are exposed and consumed via a standard service interface. A Management Function (MnF) is a logical entity playing the roles of MnS consumer and/or MnS producer. A set of MnSs can be freely grouped together in an MnF, and an MnF can be deployed as a stand-alone entity or embedded in an NF [33; 34]. The data analytics capabilities in the SBMA are encapsulated as an MnS referred to as Management Data Analytics Service (MDAS). MDAS plays a similar role in the 5G management plane as the NWDAF does in the control plane and works with the NWDAF in a coordinated way. According to the current 3 GPP standards, MDAS takes the responsibility of the management loop from the network wide view, while the NWDAF focuses on the control loop directly related to individual network functions. However, these two closely related aspects of data analytics capabilities in 5G networks might be integrated into one system module in practical implementations for achieving higher efficiency and better performance.