Fixing RMR communication issue
[ric-app/ts.git] / docs / user-guide.rst
1
2
3 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
4 .. SPDX-License-Identifier: CC-BY-4.0
5 ..
6 .. CAUTION: this document is generated from source in doc/src/*
7 .. To make changes edit the source and recompile the document.
8 .. Do NOT make changes directly to .rst or .md files.
9
10
11 ============
12 User's Guide
13 ============
14 ---------------------
15 Traffic Steering xAPP
16 ---------------------
17
18 Introduction
19 ============
20
21 The Traffic Steering Use Case demonstrates intelligent inferences in the Near-RT RIC and E2 interaction in order to execute on the inferences.
22
23 The current Use Case is comprised of five xApps:
24
25 * KPI Monitoring xApp: Gathers the radio and system Key Performance Indicators (KPI) metrics from E2 Nodes and stores them in the Shared Data Layer (SDL).
26 * Anomaly Detection (AD) xApp: Fetches UE data regularly from SDL, monitors UE metrics and sends the anomalous UEs to Traffic Steering xApp.
27 * Traffic Steering xApp (*this one*): Consumes A1 Policy Intent, listens for badly performing UEs, sends prediction requests to QP xApp, and listens for messages from QP that show UE throughput predictions in different cells to make decisions about UE Handover.
28 * QoE Prediction (QP) xApp: Generates a feature set of metrics based on SDL lookups in UE-Metric and Cell-Metric namespaces for a given UE, and outputs Throughput predictions on the Serving and any Neighbor cells to the Traffic Steering xApp.
29 * RAN Control (RC) xApp: Provides basic implementation of spec compliant E2-SM RC to send RIC Control Request messages to RAN/E2 Nodes.
30
31
32 A1 Policy
33 =========
34
35 A1 Policy is sent to Traffic Steering xApp to define the Intent which will drive the Traffic Steering behavior.
36
37 Policy Type ID is 20008.
38
39 Currently, there is only one parameter that can be provided in A1 Policy: *threshold*
40
41 An example Policy follows:
42
43 .. code-block::
44
45     { "threshold": 5 }
46
47 This Policy instructs Traffic Steering xApp to hand-off any UE whose downlink throughput of its current serving cell is 5% below the throughput of any neighboring cell.
48
49 Receiving Anomaly Detection
50 ===========================
51
52 Traffic Sterring xApp defines a callback to listen to Anomaly Detection messages received from AD xApp. The RMR message type is 30003.
53 The following is an example message body:
54
55 .. code-block::
56
57     [
58         {
59             "du-id":1010,
60             "ue-id":"Train passenger 2",
61             "measTimeStampRf":1620835470108,
62             "Degradation":"RSRP RSSINR"
63         }
64     ]
65
66 Sending QoE Prediction Request
67 ==============================
68
69 Traffic Steering listens for badly performing UEs.
70 Each Anomaly Detection message received from AD xApp, results in a QoE Prediction Request to QP xApp.
71 The RMR Message Type is 30000.
72 The following is an example message body:
73
74 .. code-block::
75
76     { "UEPredictionSet": ["Train passenger 2"] }
77
78 Receiving QoE Prediction
79 ========================
80
81 Traffic Steering xApp defines a callback for QoE Prediction received from QP xApp. The RMR message type is 30002. The following is an example message body:
82
83 .. code-block::
84
85     {
86         "Train passenger 2":{
87             "310-680-200-555001":[2000000, 1200000],
88             "310-680-200-555002":[1000000, 4000000],
89             "310-680-200-555003":[5000000, 4000000]
90         }
91     }
92
93 This message provides throughput predictions of three cells for the UE ID "Train passenger 2". For each service cell, it lists an array containing two elements: DL Throughput and UL Throughput predictions.
94
95 Traffic Steering xApp checks for the Service Cell ID for UE ID, and determines if the predicted throughput is higher in a neighbor cell.
96 The first cell in this prediction message is assumed to be the serving cell.
97
98 If predicted throughput is higher than the A1 policy "*threshold*" in a given neighbor cell, Traffic Steering sends the CONTROL message to a given endpoint.
99 Since RC xApp is not mandatory for the Traffic Steering use case, TS xApp sends CONTROL messages using either REST or gRPC calls.
100 The CONTROL endpoint is set up in the xApp descriptor file called "config-file.json". Please, check out the "schema.json" file for configuration examples.
101
102 The following is an example of a REST message that requests the handover of a given UE:
103
104 .. code-block::
105
106     {
107         "command": "HandOff",
108         "seqNo": 1,
109         "ue": "Train passenger 2",
110         "fromCell": "310-680-200-555001",
111         "toCell": "310-680-200-555003",
112         "timestamp": "Sat May 22 10:35:33 2021",
113         "reason": "Hand-Off Control Request from TS xApp",
114         "ttl": 10
115     }
116
117 Control messages might also be exchanged with E2 Simulators that implement REST-based interfaces.
118 Traffic Steering then logs the REST response showing whether or not the control operation has succeeded.
119
120 The gRPC interface is only required to exchange messages with the RC xApp.
121 The following is an example of the gRPC message (*string representation*) which requests the RC xApp to handover a given UE:
122
123 .. code-block::
124
125     e2NodeID: "000000000001001000110100"
126     plmnID: "02F829"
127     ranName: "enb_208_092_001235"
128         RICE2APHeaderData {
129         RanFuncId: 300
130         RICRequestorID: 1001
131     }
132     RICControlHeaderData {
133         ControlStyle: 3
134         ControlActionId: 1
135         UEID: "Train passenger 2"
136     }
137     RICControlMessageData {
138         TargetCellID: "mnop"
139     }
140
141 TS xApp also requires to fetch additional RAN information from the E2 Manager to communicate with RC xApp.
142 By default, TS xApp requests information to the default endpoint of E2 Manager in the Kubernetes cluster. Currently, this is done once on startup.
143 Finally, the default E2 Manager endpoint from TS can be changed using the env variable "SERVICE_E2MGR_HTTP_BASE_URL".