# Learning Roadmap - Additional Part 1 (Interface & AI/ML Module)
This is a study notes for understanding the additional knowledge of Near-RT RIC's background, including Interface & AI/ML Module.
[toc]
# Part 1: E2 Interface related in Near-RT RIC Platform
:::success
- Goal :
- [x] Learning E2 Interface
- [x] Learning E2 Service Model
- Useful Links:
- [O-RAN.WG3.E2AP-v02.01](https://www.o-ran.org/specifications)
- [ORAN-WG3.E2SM-v02.01](https://www.o-ran.org/specifications)
:::
:::info
- Outcome (Study Note) :
- Learn about E2 Interface
- Learn about E2 Application Procedure
- Learn about E2 Service Model
:::
***
## I. E2 Interface
### A. General
**What is E2?**
* E2 stands for RAN Intelligent Controller (RIC) Control Plane Interface.
* E2 is a logical interface connecting the Near-RT RIC with an E2 Node
**What does E2 do?**
* **Policy exchange**: Near-RT RIC receives policies and configurations from the Non-RT RIC to guide its optimization decisions.
* **Data sharing**: Real-time and historical network data collected by the Near-RT RIC is sent to the Non-RT RIC for analysis and long-term strategic planning.
* **Coordination and control**: The Non-RT RIC can remotely initiate control actions through the Near-RT RIC, like triggering congestion mitigation or network slicing functionalities.
**What does E2 node consist?**
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/B18IVAsO6.png"/>
* E2 Agent used to terminate E2 interface, support global services and to forward/receive RIC service messages.
* One or more RAN Functions that support RIC services exposed by the E2 Node to the Near-RT RIC.
* Other RAN functions that do not support RIC Services.
### B. Specification Objectives
* Connectivity between Near-RT RIC and E2 Node supplied by different vendors
* Exposure of selected E2 Node data (e.g. configuration information (cell configuration, supported slices, PLMNs, etc.), network measurements, context information, etc.) towards the Near-RT RIC
* Enables the Near-RT RIC to control selected RAN functions on the E2 Node
### C. Functions
#### 1) RIC Services
Near-RT RIC Services (**REPORT**, **INSERT**, **CONTROL**, **POLICY** and **QUERY**) supported by Near-RT RIC Functional Procedures (RIC Subscription, RIC Subscription Modification, RIC Subscription Modification Required, RIC Subscription Delete, RIC Subscription Delete Required, RIC Indication, RIC Control, RIC Query)
**REPORT**: uses RIC Subsription and/or RIC Subscription Modification to ==request that E2 Node sends a **REPORT** message== to Near-RT RIC and associated procedure continues in the E2 Node after each occurence of RIC Subscription's Event Trigger.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/H1BrsRjOa.png"/>
**INSERT**: uses RIC Subsription and/or RIC Subscription Modification to ==request that E2 Node sends a **INSERT** message== to Near-RT RIC and suspends the associated procedure in the E2 Node after each occurence of RIC Subscription's Event Trigger.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SkqZ1J3Op.png"/>
**CONTROL**: ==sends a **CONTROL** message to E2 Node== to initiate a new associated procedure OR ==resume a previously suspended associated procedure== in the E2 Node.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SkFrwyn_a.png">
<figcaption>Response to RIC Service INSERT</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/rJnvk1nua.png"/>
<figcaption>Near-RT RIC initiated</figcaption>
</figure>]
**POLICY**: uses RIC Subsription and/or RIC Subscription Modification to ==request that E2 Node executes a specific **POLICY**== during functioning of the E2 Node after each occurence of a defined RIC Subscription's Event Trigger.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/r1pFky2_p.png"/>
**QUERY**: ==sends a **QUERY** message to E2 Node== to retrieve RAN-related and/or UE-related information from the E2 Node.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/Hktj1kh_T.png"/>
#### 2) E2 Support Services
* Interface Management services supported by Global Procedures (E2 Setup, E2 Reset, E2 Node Configuration Update, E2 Removal, Reporting of General Error Situations)
* RAN Function services supported by Global Procedures (RIC Service Update, RIC Service Query).
**E2 Setup**: used to **establish** the E2 interface between the Near-RT RIC and an E2 Node.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SJIKrJ2O6.png"/>
**E2 Reset**: used by either the E2 Node or Near-RT RIC to **reset** the E2 interface.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/HyiiSk2Op.png">
<figcaption>E2 Node initiated</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/S1oZU13dp.png"/>
<figcaption>Near-RT RIC initiated</figcaption>
</figure>
**RIC Service Update**: used by the E2 Node to **inform** the Near-RT RIC of any change to **the list of supported RIC services** and **mapping** of services to functions within the E2 Node.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/rkZjI13_T.png"/>
**E2 Node Configuration Update**: used by the E2 Node to **inform** the Near-RT RIC of any change to **the configuration of the E2 Node and/or E2 Node** initiated changes to TNL Associations associated with the E2 interface.
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/SyJ6UJ2u6.png"/>
**E2 Removal**: used by either the E2 Node or Near-RT RIC to **release** the E2 signaling connection.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/S1WJvk3dp.png">
<figcaption>E2 Node initiated</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/HJwePJhup.png"/>
<figcaption>Near-RT RIC initiated</figcaption>
</figure>
## II. E2 Application Protocol (E2AP)
**Relationship between E2AP and RIC Service**

### RIC Subscription Procedure
This procedure is used to establish RIC Subscriptions on E2 Node consisting of an event trigger and a sequence of RIC Service Actions.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SJhKOM8Y6.png"/>
<figcaption>RIC Subscription procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/S1jp_zUFT.png"/>
<figcaption>RIC Subscription procedure, unsuccessful operation</figcaption>
</figure>
### RIC Subscription Delete Procedure
This procedure is used to delete RIC Subscriptions on E2 Node.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/r1qfKGUYT.png"/>
<figcaption>RIC Subscription Delete procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/B1JVKz8Ya.png"/>
<figcaption>RIC Subscription Delete procedure, unsuccessful operation</figcaption>
</figure>
### RIC Subscription Delete Required Procedure
This procedure is used to enable the E2 Node to request deletion of the existing RIC Subscriptions in the E2 Node previously created for the Near-RT RIC.
> Initiated by E2 Node; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/H17KYGIKa.png"/>
<figcaption>RIC Subscription Delete Required procedure, successful operation</figcaption>
</figure>
### RIC Indication Procedure
The purpose of the RIC Indication procedure is to transfer Report and/or Insert RIC Service Action associated with a RIC Subscription procedure.
> Initiated by E2 Node; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SkE6YzIFa.png"/>
<figcaption>RIC Indication procedure, successful operation</figcaption>
</figure>
### RIC Control Procedure
The purpose of the RIC Control procedure is to initiate or resume a specific functionality in the E2 Node.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/Sk3Mqz8F6.png"/>
<figcaption>RIC Control procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/r1-P5f8t6.png"/>
<figcaption>RIC Control procedure, unsuccessful operation</figcaption>
</figure>
### RIC Subscription Modification Procedure
The purpose of the RIC Subscription Modification procedure is to modify an existing RIC subscription on an E2 node, in terms of its event trigger definition and/or the sequence of actions.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/S1ZDjMLta.png"/>
<figcaption>RIC Subscription Modification procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SyTjsfUYa.png"/>
<figcaption>RIC Subscription Modification procedure, unsuccessful operation</figcaption>
</figure>
### RIC Subscription Modification Required Procedure
This procedure is used by the E2 Node to request the Near-RT RIC for modifying an existing RIC Subscription in the E2 Node.
> Initiated by E2 Node; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/ByRInf8Ya.png"/>
<figcaption>RIC Subscription Modification Required procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/ByV53MUKp.png"/>
<figcaption>RIC Subscription Modification Required procedure, unsuccessful operation</figcaption>
</figure>
### RIC Subscription Modification Procedure
The purpose of the RIC Subscription Modification procedure is to modify an existing RIC subscription on an E2 node, in terms of its event trigger definition and/or the sequence of actions.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/S1ZDjMLta.png"/>
<figcaption>RIC Subscription Modification procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SyTjsfUYa.png"/>
<figcaption>RIC Subscription Modification procedure, unsuccessful operation</figcaption>
</figure>
### RIC Query Procedure
This procedure is initiated by Near-RT RIC to request RAN and/or UE related information from E2 Node.
> Initiated by Near-RT RIC; uses RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/Hyup3G8Kp.png"/>
<figcaption>RIC Query procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/Hkw0hfIKa.png"/>
<figcaption>RIC Query procedure, unsuccessful operation</figcaption>
</figure>
### E2 Setup Procedure
This procedure erases any existing application level configuration data in the two nodes and replace it by the one received.
> Initiated by E2 Node; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/ByMIL78FT.png"/>
<figcaption>E2 Setup procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/ByVPUmIK6.png"/>
<figcaption>E2 Setup procedure, unsuccessful operation</figcaption>
</figure>
### Reset Procedure
The purpose of the Reset procedure is to initialize or re-initialise the E2 Node in the event of Near-RT RIC failure or vice-versa.
> Initiated by E2 Node or the Near-RT RIC; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/Byd0UQIYp.png"/>
<figcaption>Reset procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/BkElPQUKa.png"/>
<figcaption>Reset procedure, unsuccessful operation</figcaption>
</figure>
### Error Indication
The purpose of the Reset procedure is to report detected errors in one incoming message, provided they cannot be reported by an appropriate failure message.
> Initiated by E2 Node or the Near-RT RIC; uses E2 Support Function signaling or RIC Service signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/BJUcwXIYa.png"/>
<figcaption>Error Indication, (E2 Node initiated) successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/Bye6vmIta.png"/>
<figcaption>Error Indication, (Near-RT RIC initiated) successful operation</figcaption>
</figure>
### RIC Service Update Procedure
The purpose of the Reset procedure is to update application level RIC Service related data needed for E2 Node and Near-RT RIC to interoperate correctly over the E2 interface.
> Initiated by E2 Node; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/Sy9mOQ8Yp.png"/>
<figcaption>RIC Service Update procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/B194u7IFa.png"/>
<figcaption>RIC Service Update procedure, unsuccessful operation</figcaption>
</figure>
### E2 Node Configuration Update Procedure
The purpose of the Reset procedure is to update application level E2 Node configuration data needed for E2 Node and Near-RT RIC to interoperate correctly over the E2 interface and to support E2 Node initiated TNL association removal.
> Initiated by E2 Node; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:70%;" src="https://hackmd.io/_uploads/B1fuOXIta.png"/>
<figcaption>E2 Node Configuration Update procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:70%;" src="https://hackmd.io/_uploads/BJTYumUtp.png"/>
<figcaption>E2 Node Configuration Update procedure, unsuccessful operation</figcaption>
</figure>
### E2 Connection Update Procedure
The purpose of the Reset procedure is to allow the Near-RT RIC to update the TNL information associated with the E2 interface connection between the E2 Node and Near-RT RIC.
> Initiated by Near-RT RIC; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/SyvnO7IKT.png"/>
<figcaption>E2 Connection Update procedure, successful operation</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:60%;" src="https://hackmd.io/_uploads/rJwTOXLFp.png"/>
<figcaption>E2 Connection Update procedure, unsuccessful operation</figcaption>
</figure>
### E2 Removal Procedure
The purpose of the Reset procedure is to remove the E2 signaling connection between the Near-RT RIC and the E2 node in a controlled manner.
> Initiated by E2 Node or Near-RT RIC; uses E2 Support Function signaling
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/SyWetQUYa.png"/>
<figcaption>E2 Removal procedure, successful operation (E2 Node Initiated)</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/SycZtQItp.png"/>
<figcaption>E2 Removal procedure, successful operation (Near-RT RIC Initiated)</figcaption>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/S15EK7IY6.png"/>
<figcaption>E2 Removal procedure, unsuccessful operation (E2 Node Initiated)</figcaption>
</figure>]
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/SJKStQLFp.png"/>
<figcaption>E2 Removal procedure, unsuccessful operation (Near-RT RIC Initiated)</figcaption>
</figure>
## III. E2 Service Model (E2SM)
**E2AP Protocol** establish the logical connection between to E2AP end-points (Near RT RIC and Open RAN CU/DU) provides services to implement an **E2 Service Model – E2SM**. These procedures are then combined to create a service model. The service model message is inserted as payload in one of the E2AP messages, as shown in Figure below.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:70%;" src="https://hackmd.io/_uploads/H1edtrUK6.png"/>
</figure>
Three services models that are implementes as xApps in Near-RT RIC :
* **E2SM Key Performance Matrix (KPM)**: reports performance metrics from the RAN, using E2 report messages.
* **E2SM Network Interfaces (NI)**: used to take the messages received by the E2 node on specific network interfaces and forward them to the Near-RT RIC domain via E2 report messages over the E2 interface.
* **E2SM RAN Control (RC)**: implements control functionalities through E2 control procedures.
### E2SM Services


### E2SM Common Elements
* **Information Element** : When specifying information elements which are to be represented by bit strings, if not otherwise specifically stated in the semantics description of the concerned IE or elsewhere, the following principle applies with regards to the ordering of bits:
- The first bit (leftmost bit) contains the most significant bit (MSB);
- The last bit (rightmost bit) contains the least significant bit (LSB);
- When importing bit strings from other specifications, the first bit of the bit string contains the first bit of the concerned information.
* **Information Element Abstract Syntax (with ASN.1)** : In case there is **contradiction** between the ASN.1 definition and the tabular format in Information Element, the ASN.1 shall take precedence, except for the definition of conditions for the presence of conditional elements, in which the tabular format shall take precedence.
---
# Part 2: A1 Interface related in Near-RT RIC Platform
:::success
- Goal :
- [x] Learning A1 Interface
- Useful Links:
- [O-RAN.WG3.A1AP-v04.00](https://www.o-ran.org/specifications)
- [O-RAN.WG3.A1GAP-v03.01](https://www.o-ran.org/specifications)
:::
:::info
- Outcome (Study Note) :
- Learn about A1 Interface
:::
***
## I. A1 in General
A1 is the **interface between** the Non-RT RIC and the Near-RT RIC.
The purpose of the A1 interface is :
* To enable the Non-RT RIC function to provide policy-based guidance,
* ML model management,
* Enrichment information to the Near-RT RIC function so that the RAN can optimize e.g. RRM under certain conditions.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:50%;" src="https://hackmd.io/_uploads/S1hsRLUFT.png"/>
<figcaption>Illustration of A1 and related interfaces in the O-RAN architecture.
</figcaption>
</figure>
## II. A1 Services
### A. A1 Policy Management Service (A1-P)
The purpose of the A1 policies is to guide the RAN performance towards the overall goal expressed in RAN intent.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:90%;" src="https://hackmd.io/_uploads/SkGOgPLFp.png"/>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:80%;" src="https://hackmd.io/_uploads/S1SCePIFp.png"/>
</figure>
### B. A1 Enrichment Information Service (A1-EI)
The A1 interface is used for discovery, request and delivery of A1 enrichment information.
The A1 interface is also used for the discovery of external enrichment information and the SMO / Non-RT RIC is responsible for the authentication of the source and the security of the direct connection.
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:90%;" src="https://hackmd.io/_uploads/r1z8bDIYp.png"/>
</figure>
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:90%;" src="https://hackmd.io/_uploads/HJodWP8KT.png"/>
</figure>
### C. A1 ML Model Management Service (A1-ML)
ML model is trained in **the SMO layer** and then used by the Near-RT RIC **to improve the optimization of the RAN**. The training of the ML model is handled by SMO internal functions. The input data for training is the same as the input data the Near-RT RIC will use for inference. The trained ML model is deployed by the SMO layer via the **O1 interface**. The performance evaluation resulting from the execution of the ML model, and the handling of explicit feedback from the ML model itself, is based on O1 observability.
## III. A1 Interface
The A1 interface is an **open logical interface** within O-RAN architecture between the Non-RT RIC functionality in the SMO and the Near-RT RIC functionality in the RAN.
**Objectives**:
1. Connect Non-RT RIC in SMO with Near-RT RIC in diverse Radio Access Networks from different manufacturers.
2. Provide policies for individual UEs or UE groups.
3. Offer fundamental feedback on policy state, allowing Non-RT RIC to monitor policy usage.
4. Supply required enrichment information to Near-RT RIC.
**Capabilities**:
- Transfer of policy management information from Non-RT RIC to Near-RT RIC;
- Policy feedback from Near-RT RIC to Non-RT RIC;
- Discovery and request of A1 enrichment information from Near-RT RIC to Non-RT RIC and delivery of A1 enrichment information from Non-RT RIC to Near-RT RIC.
### A. Signaling Procedures
**Policy Related** Procedure:
- Query policy type identifiers procedure;
- Query policy type procedure;
- Query policy type status procedure;
- Notify policy type status procedure;
- Create policy procedure;
- Query policy identifiers procedure;
- Query policy procedure;
- Update policy procedure;
- Delete policy procedure;
- Query policy status procedure;
- Feedback policy procedure.
**EI Discovery in A1 Enrichment** Procedure:
- Query EI type identifiers;
- Query EI type;
- Query EI type status;
- Notify EI type status.
**EI Job Control in A1 Enrichment** Procedure:
- Query EI job identifiers;
- Create EI job;
- Query EI job;
- Update EI job;
- Delete EI job;
- Query EI job status;
- Notify EI job status.
**EI Delivery in A1 Enrichment** Procedure:
- Deliver EI job result.
### B. A1 Interface Protocol Structure
<figure style="text-align:center;">
<img style="display:block;margin:20px auto;padding:1px;border:1px #eee;width:80%;" src="https://hackmd.io/_uploads/rypQEuLFa.png"/>
</figure>
---
# Part 3: O1 Interface related in Near-RT RIC Platform
:::success
- Goal :
- [X] Learning O1 Interface
- Useful Links:
- [O-RAN.WG10.O1-Interface.0-v08.00](https://www.o-ran.org/specifications)
:::
:::info
- Outcome (Study Note) :
- Learn about O1 Interface
:::
***
## I. O1 Notifications
An O1 notification is a **JSON encoded asynchronous notification** sent from a MnS provider to a MnS consumer over the O1 interface using REST/HTTPS.
An O1 notification shall be in one of the following formats:
- **SDO O1 format** : an O1 notification formatted as specified by a Standards Defining Organization (SDO) and sent without a VES header.
- **VES O1 format** : an O1 notification formatted as specified by VES Event Listener Specification, consisting of a common event header and domain-specific event fields. VES O1 format notifications are categorized into 2 types, based on domain:
- **Harmonized VES** : The stndDefined VES event specified in VES Event Listener Specification that allows a VES event to carry, as its payload, a notification specified by an SDO.
- **Legacy VES** : any VES event specified in the VES Event Listener Specification, except for stndDefined. Legacy VES events are fully defined in and don’t rely on an SDO to specify the content of the payload.
## II. Management Services
### A. Provisioning Management Services
Provisioning Management Services allow a Provisioning MnS Consumer **to configure attributes** of managed objects on the Provisioning MnS Provider that modify the Provisioning MnS Provider’s capabilities in its role in end-to-end network services and allows a Provisioning MnS Provider **to report configuration changes** to the Provisioning MnS Consumer.
> Used **NETCONF** : Network Configuration Protocol
### B. Fault Supervision Management Services
Fault Supervision Management Services allow a Fault Supervision MnS Provider **to report errors and events** to a Fault Supervision MnS Consumer and allows a Fault Supervision MnS Consumer **to perform fault supervision operations** on the Fault Supervision MnS Provider, such as get alarm list.
### C. Performance Assurance Management Services
Performance Assurance Management Services allow a Performance Assurance MnS Provider **to report file-based (bulk) and/or streaming (real time) performance data** to a Performance Assurance MnS Consumer and allows a Performance Assurance MnS Consumer **to perform performance assurance operations** on the Performance Assurance MnS Provider, such as selecting the measurements to be reported and setting the frequency of reporting.
### D. Trace Management Services
Trace management services allow a Trace MnS Provider **to report file-based or streaming trace records** to the Trace MnS Consumer.
File-based trace collects trace records in files that are available to the consumer with a time delay. In the case of streaming trace, the data is sent in bursts across a WebSocket connection to the consumer, maintaining the relevance of the data while minimizing transport overhead.
### E. File Management Services
File management services allow a File Management MnS Consumer **to get notification** of new available files; **query available files** and request the transfer of files between the File Management MnS Provider and the File Management MnS Consumer.
### F. Hearbeat Management Services
Heartbeat MnS Provider **sends asynchronous heartbeat notifications** to Heartbeat MnS Consumer at a configurable frequency to allow Heartbeat MnS Consumer to supervise the connectivity to the Heartbeat MnS Provider.
### G. PNF Startup and Registration Management Services
PNF Startup and Registration Management Services allow a physical PNF Startup and Registration MnS Provider **to acquire its network layer parameters** either via static procedures (pre-configured in the element) or via dynamic procedures (Plug-n-Connect) during startup.
### H. PNF Software Management Services
Software Management Services allow a PNF Software MnS Consumer **to request a physical PNF Software MnS Provider** to download, install, validate and activate a new software package and allow a physical PNF Software MnS Provider to report its software versions.
### I. PNF Reset Management Services
PNF Reset Management Services allow a PNF Reset MnS Consumer **to trigger a reset** of a HW unit of a PNF Reset MnS Provider on command.
### J. Cloudified NF Registration Management Services
The Cloudified NF Registration Management Service **supports the registration** of a Cloudified NF Registration Management Service Provider to the Cloudified NF Registration Management Service Consumer after the Cloudified NF instantiation via the O2 has completed and the NF application has initialized and is ready for final configuration and management (e.g., ready to be put in service).
---
# Part 4: AI/ML Module
:::success
- Goal :
- [x] Learning Isoforest & Random Forest
- [x] Learning VAR Module
- [x] Learning LSTM
- [x] Learning RNN
- Useful Links:
- [AI/ML in Near-RT RIC](https://www.analysysmason.com/contentassets/62ee68d6f8fd4c91b7318e97036382c9/analysys-mason_near_rt_ric_jun2021_rma07.pdf)
- [Isolation Forest Algorithm](https://towardsdatascience.com/how-to-perform-anomaly-detection-with-the-isolation-forest-algorithm-e8c8372520bc)
- [Hands On Tutorial on VAR Module](https://analyticsindiamag.com/hands-on-tutorial-on-vector-autoregressionvar-for-time-series-modeling/)
- [Introduction to LSTM](https://machinelearningmastery.com/gentle-introduction-long-short-term-memory-networks-experts/)
- [Introduction to RNN](https://www.datacamp.com/tutorial/tutorial-for-recurrent-neural-network)
:::
:::info
- Outcome (Study Note) :
- Learn about Isoforest & Random Forest
- Learn about VAR Module
- Learn about LSTM
- Learn about RNN
:::
***
## I. Isoforest & Random Forest
The Isolation Forest (iForest) and Random Forest are both machine learning algorithms with distinct applications and characteristics.
The **Isolation Forest** algorithm is primarily **used for anomaly detection**. It is an unsupervised learning method that excels at isolating anomalies (or outliers) in a dataset. The algorithm leverages the fact that anomalies are typically few in number and have attribute values that differ significantly from normal instances. By constructing isolation trees and **measuring the number of splits required to isolate an instance**, the algorithm can effectively identify anomalies. It is a fast algorithm and is available as a module in Scikit-learn, making it accessible for practical use in anomaly detection applications.

On the other hand, the **Random Forest** algorithm is a versatile ensemble learning method that can be used for both **classification** and **regression** tasks. It operates by constructing a multitude of decision trees during training and **outputting the mode of the classes** (in the case of classification) or **the average prediction** (in the case of regression) of the individual trees. Random Forest is known for its robustness and ability to handle large amounts of data with high dimensionality. It is commonly used in various domains, including finance, healthcare, and ecology, for tasks such as fraud detection, disease prediction, and species classification.

In **Near-RT RIC**, AI/ML technologies, including algorithms like Isolation Forest and Random Forest, are being integrated **to automate and optimize RAN operations**. The Near-RT RIC incorporates AI/ML into its decision-making functionalities, enabling real-time control and network optimization actions. AI/ML is recognized as a critical enabler to automate near-RT use cases, with applications in QoS-based radio optimization, real-time video optimization, and massive MIMO optimization. The integration of AI/ML technologies is expected to significantly enhance the efficacy of RAN use cases by exploiting the massive amount of data generated in the RAN.
## II. VAR Module
One of the AI/ML modules used in the Near-RT RIC is the **VAR (Vector Autoregression) module**. The VAR module is a statistical model that can be used to **analyze the relationship between multiple time series variables**. It is commonly used in finance, economics, and other fields to forecast future values of a variable based on its past values and the past values of other related variables. In the **Near-RT RIC**, the VAR module can be used to **predict network traffic patterns** and **optimize network resource allocation**. By analyzing historical data on network traffic and resource usage, the VAR module can identify patterns and trends that can be used to predict future traffic and resource needs. This information can then be used to optimize network resource allocation, ensuring that resources are allocated where they are needed most. The VAR module is just one example of the many AI/ML modules that can be used in the Near-RT RIC to automate and optimize RAN operations.
## III. LSTM
**Long Short-Term Memory** (LSTM) is a type of recurrent neural network (RNN) designed to handle the vanishing gradient problem present in traditional RNNs. LSTMs are particularly useful for learning **long-term dependencies in sequence prediction tasks**, such as time series prediction, speech recognition, and music composition. Key characteristics of LSTM networks include:
1. **Chain-like structure**: LSTMs have a chain-like structure, with repeating modules consisting of four interacting layers.
2. **Gating mechanisms**: LSTMs introduce three gating mechanisms (input gate, forget gate, and output gate) that control the flow of information through the network, allowing it to selectively remember or forget information from the input.
3. **Memory blocks**: LSTM networks have memory blocks connected through layers, with each block containing components that make it smarter than a classical neuron and a memory for recent inputs.
4. **Stacking**: LSTM networks can be stacked into deep network architectures, allowing them to address complex sequence problems in machine learning.
In the Near-RT RIC, LSTM networks can be used for various AI/ML applications, such as:
- **Time series prediction**: LSTMs can be used to predict network traffic patterns and optimize network resource allocation based on historical data.
- **Speech recognition**: LSTMs can be employed in speech recognition applications to improve the accuracy of speech-to-text conversion.
- **Music composition**: LSTMs can be used to generate music compositions based on input patterns and historical data.
- **Grammar learning**: LSTMs can be applied to grammar learning tasks, such as identifying and correcting grammatical errors in text.
By integrating LSTM networks into the Near-RT RIC, AI/ML-driven optimization can be further enhanced, leading to more efficient and effective RAN operations.

## IV. RNN
**Recurrent Neural Networks** (RNNs) are a type of artificial neural network that uses **sequential data** or **time series data**. They are commonly used for ordinal or temporal problems, such as language translation, natural language processing (NLP), speech recognition, and image captioning. RNNs are particularly useful for tasks that require the processing of sequential data, as they can capture the context and dependencies between input elements. Key characteristics of RNNs include:
1. **Sequential processing**: RNNs process input sequences sequentially, making them computationally efficient and easy to parallelize.
2. **Memory of past inputs**: RNNs have a memory of past inputs, allowing them to capture information about the context of the input sequence.
3. **Parameter sharing**: RNNs share the same set of parameters across all time steps, reducing the number of parameters and making the model more efficient.
4. **Advanced architectures**: RNNs can be enhanced with advanced architectures like Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) to address the vanishing gradient problem and improve memory capacity.
In the context of Near-RT RIC, RNNs can be used for various AI/ML applications, such as:
- **Time series prediction**: RNNs can be used to predict network traffic patterns and optimize network resource allocation based on historical data.
- **Language translation**: RNNs can be employed in language translation applications to improve the accuracy of translation.
- **Speech recognition**: RNNs can be used to improve the accuracy of speech-to-text conversion.
- **Image captioning**: RNNs can be applied to generate captions for images based on input patterns and historical data.
