Commit 31b82762 authored by Yann Garcia's avatar Yann Garcia
Browse files

Learning SUMO

parent 06b4759e
Loading
Loading
Loading
Loading
+234 −18
Original line number Diff line number Diff line
@@ -114,11 +114,13 @@ For the purposes of the present document, the [following] abbreviations [given i
`GIS     Geographic Information System`
`IP      Inyernet Protocol`
`K8S     Kubernetes`
`L2      Layer 2`
`LTE     Long Term Evolution`
`MEC     Multi-access Edge Computing`
`POA     Point of Access`
`POC     Proof of Concept`
`OAI     OpenAirInterface`
`RAB     Radio Access Bearer`
`REST    Representational State Transfer`
`RNIS    Radio Network Information Service`
`RSRP    Reference Signal Received Power`
@@ -282,7 +284,7 @@ $ cd inet4.6
$ make
```

##### 5.3.2.2.3 Notes
##### 5.3.2.2.4 Notes

**Note 1:** Use INet Framework online documentation to learn the basics of INet Framework.

@@ -386,7 +388,7 @@ $ iperf3 -c 192.168.3.1 -u -b 10M -t 60 -i 1
```


##### 5.3.2.3.4 Installation
##### 5.3.2.3.3 Installation

The procedure to build Simu5G/SimuLTE is the following:

@@ -398,7 +400,7 @@ $ make makefiles
$ make
```

##### 5.3.2.3.5 Notes
##### 5.3.2.3.4 Notes

**Note 1:** Use Simu5G/SimuLTE online documentation to learn the basics of Simu5G/SimuLTE.

@@ -419,56 +421,270 @@ $ opp_scavetool export -F csv results/Single-UE/*.vec -o tutorial_results.csv

##### 5.3.2.4.1 SUMO Architecture Overview

SUMO simulates roads and vehicle movement, OMNeT++ runs the network, and Simu5G models the LTE/NR protocol stack and RAN/core behavior. SUMO  is the mobility engine and Simu5G is the radio/network engine, then connect vehicle positions from SUMO to UE mobility in OMNeT++. Simu5G already supports vehicular mobility, dual connectivity, multiple gNBs/eNBs, and heterogeneous deployments, so SUMO is mainly used to drive realistic movement and handovers.

**Note:** Veins mobility manager is the bridge that synchronizes SUMO mobility updates with OMNeT++ nodes (see [clause 5.3.2.4.4](#53244-installation)).

The figure below shows the SUMO architecture overview.

![Figure 5.3.2.4.1: SUMO architecture overview](media/5.3.2.4.1.SUMOArchitectureOverview.png)

##### 5.3.2.4.2 Focused on vehicular mobility at Monaco

The SUMO framework provides several tools and scripts to import OpenStreetMap (OSM) data and generate a road network. The following tools are available:

- `netconvert`: Converts OSM data to a road network.
- `netgenerate`: Generates a road network from a road network file.
- `netedit`: Edits a road network.
- `netconvert`: Converts OSM data to a road network.
- `netgenerate`: Generates a road network from a road network file.
- `netedit`: Edits a road network.

**Note:** the link [https://www.openstreetmap.org/export](https://www.openstreetmap.org/export) can also be used to import OSM data.

The script creates a sumo road network from the given osm file is osmGet.py:
```bash
$ python3 osmBuild.py --osm-file <osm-file> --vehicle-classes all --pedestrian
```

The SUMO road network scenario looks like the following:

![Figure 5.3.2.4.2-1: Monaco Harbor Network scenario](media/monaco-harbor-1.jpg)

The OSM Web Wizard script is a web-based tool that offers an easy solutions to start modeling traffic scenarios with SUMO. The user can specify the area to model graphically through an openstreetmap map excerpt, and configure a randomized traffic demand and run and visualize the scenario in the sumo-gui. To run this tool, the following command must be run:

![Figure 5.3.2.4.2-2: OSM Web Wizard sript output](media/monaco-harbor-2.jpg)

##### 5.3.2.4.2.1 Round0: Describe the project

##### 5.3.2.4.2.1.1 The network topology

The objectives is to create a squeleton of simulation of one vehicular mobility at Monaco harbor.

The network topology is the following:

- One POA4G (4G macro cell);
- One POA5G (5G small cell);
- One high velocity UE (vehicle).
- One low velocity UE (pedestrian).

For the vehicular mobility, the following is considered:

- There is a handover from the 4G macro cell to the 5G small cell;
- The UEs are moving from the 4G macro cell to the 5G small cell;
- Simu5G/SimuLTE is using the emulation mode to connect the simulated network to the real network;
- iperf3 is used as real application on the UE side and the server side and also to measure network characteristics such as the throughput and the latency (see [Annex A](#annex-a-feasibility-study-for-replacing-the-current-network-simulation-with-simu5gsimulte-simulators)).

The figure below shows the network topology.

**TODO**: To be done


##### 5.3.2.4.2.1.2 The SUMO road network scenario

In addintion of the road network, the SUMO framework requires the "demand modelling" to be defined. The demand modelling describes the car and the pedestrian traffic flow.

**TODO**: To be refined

##### 5.3.2.4.2.1.3 Geospatial coordinates conversions

The geospatial coordinates conversions are the following:

- From the SUMO road network scenario to the Simu5G/SimuLTE simulation;
- From the Simu5G/SimuLTE simulation to the SUMO road network scenario;
- From the SUMO road network scenario to geo-coordinates;
- From the geo-coordinates to the SUMO road network scenario.

**TODO**: To be refined

##### 5.3.2.4.2.2 Round1: Create the project skeleton

The project skeleton is the following:
```bash
monaco-harbor/
├── docs
├── headers
├── Makefile
├── ned
├── omnetpp.ini
├── README.md
├── routing_files
├── scripts
├── simulations
├── src
├── stats
└── sumo
```

To build the project, the following command can be used:
```bash
console #1$ # Run the project
console #1$ clear && make clean && make && make run

console #2: Run the iperf3 server on UE-side sim-veth1
console #2$ iperf3 -d -s -B 192.168.a.b -p 5201

console #3: Run the iperf3 client on client-side sim-veth2
console #3$ iperf3 -c 192.168.c.d -u -b 10M -t 60 -i 1
```

##### 5.3.2.4.2.3 Round2: Setup the NED file and the omnetpp.ini file

The NED file that models the network topology is the following:

- One LTE eNB;
- One 5G gNB;
- One dual-access UE driven by SUMO mobility;
- One NAT router;
- One external router/server side for emulation.

The packets go through ExtLowerEthernetInterface, veth pairs, and a NAT router that rewrites addresses so external applications can talk through the simulated network.

![Figure 5.3.2.4.2.3: NED file](media/5.3.2.4.2.3.NEDFile.png)

The INI file sets the simulation parameters:
- One SUMO-driven UE;
- Dual connectivity between LTE and 5G;
- Real-time emulation through veth/NAT;
- Room for handover testing.

##### 5.3.2.4.4 Installation
##### 5.3.2.4.2.4 Round3: Describe the SUMO road scenario

The purpose is to define the road graph so vehicles circulate around the port basin and along the quay roads, with a loop that repeatedly crosses the LTE/5G overlap area. That is ideal for handover testing because the UE alternates between stronger LTE and stronger 5G zones.

**TODO**: To be refined

##### 5.3.2.4.2.5 Round4: Execute and debug the first simulation

The purpose of this clause is to execute and debug the first simulation.
The first step is to start the simulation manually:

1. Setup the veth;
2. Start the the SUMO simulation;
3. ???
4. Start the iperf3 server on UE-side sim-veth1;
5. Start the iperf3 client on client-side sim-veth2;
6. Verify that the traffic is flowing through the simulated network;
7. Terminate the simulation;
8. Delete the veth.

The second step is to start the simulation using the Makefile:
```bash
$ clear && make clean && make && make run
```

**Note:** The traffic simulation is generated in separated consoles.

##### 5.3.2.4.2.6 Round5: Conclusion

Getting this simulation working and the traffic flowing through the simulated network is a major milestone. It validates the feasibility of the new network simulation approach to replace the current network simulation approach in the ETSI MEC Sandbox [\[i.1\]](#_ref_i.1).

The next clauses introduce:
- The Veins framework to enhance this first project ([clause 5.3.2.5](#5325-viens-learning));
- Additional code to extract radio network information ([clause 5.3.2.6](#5326-gathering-network-information));
- Additional code to extract position of the UE ([clause 5.3.2.7](#5327-gathering-positions-of-the-ue));
- and network characteristics from the simulation ([clause 5.3.2.8](#5328-gathering-network-characteristics)).

##### 5.3.2.4.3 Installation

The procedure to install SUMO is the following:
```bash
$ tar xvzf ~/dev/sumo-src-1.25.0.tar.gz
$ tar xvzf ./sumo-src-1.25.0.tar.gz
$ cd sumo-src-1.25.0
$ ./configure
$ make
$ make install
$ cmake -DPython_EXECUTABLE=/usr/bin/python3.13 -DPython_INCLUDE_DIRS=/usr/include/python3.13 -DPython_LIBRARIES=/usr/lib/python3.13 -B build .
$ cmake --build build
```

##### 5.3.2.4.5 Notes
To verify that the SUMO simulation is working as expected, the following command can be used:
```bash
$ source ~/setenv.sh
$ sumo-gui
```

##### 5.3.2.4.4 Notes

**Note 1:** Use SUMO online documentation to learn the basics of SUMO.

**Note 2:** Do not forget to add SUMO environment variables to the shell profile.

**Note 3:** Using tutorial sample in command line:
#### 5.3.2.5 Veins learning

#### 5.3.2.5.1 Veins architecture overview

The Veins framework includes a comprehensive suite of models to make vehicular network simulations as realistic as possible, without sacrificing speed. The GUI and IDE of OMNeT++ and SUMO can be used for quickly setting up and interactively running simulations.

The figure below shows the Veins architecture overview.

![Figure 5.3.2.5.1: Veins architecture overview](media/5.3.2.5.1.ViensArchitectureOverview.png)

#### 5.3.2.5.2 Enhance monaco-harbor project with Veins

The purpose of this clause is to enhance the monaco-harbor project with Veins.

**TODO**

#### 5.3.2.5.3 Installation

The procedure to install Veins is the following:
```bash
$ cd sumo-src-1.25.0/tutorials/tutorial
$ sumo-gui
$ tar xvzf ./veins-src-5.3.1.tar.gz
$ cd veins-src-5.3.1
$ ./configure
$ make
$ make install
```
#### 5.3.2.5 Viens learning

#### 5.3.2.6 Gathering network information

The purpose of this clause is to gather the network information from the simulation. The network information element are the one described by the ETSI MEC 012 [\[i.5\]](#_ref_i.5) and ETSI MEC 013 [\[i.6\]](#_ref_i.6):

- S1 bearer information;
- RAB information;
- L2 measurements.

#### 5.3.2.6.1 Gathering S1 bearer information

**TODO**: To be refined


#### 5.3.2.7 Gathering positions of the UE

**TODO**: To be refined


#### 5.3.2.8 Gathering network characteristics

**TODO**: To be refined


## 5.4 Round 1: Architecture and Spikes

### 5.4.1 Introduction

The purpose of this round is:
Based on the previous round, the following tasks are proposed for this round:

- Task 1: Create the skeletons of the new network simulation approach. The goal is to go deeper in the Simu5G/SimuLTE simulation and refine all the radio network models and properties than can be set in the Simu5G/SimuLTE simulation;
- Task 2: Create a git repository for the new network simulation project, including CI/CD pipeline and documentation generation;
- Task 3: Verify that the network simulator is working as expected;
- Task 4: Evaluate some network characteristics from the simulation using iperf3.

### 5.4.2 Refine the Simu5G/SimuLTE simulation

**TODO**

### 5.4.3 Create a git repository for the new network simulation project

**TODO**

### 5.4.4 Verify that the network simulator

1. To create a reproducible environment to validate the feasibility of the new network simulation approach;
2. To create the skeletons of the new network simulation approach;
**TODO**

### 5.4.2 Local development environment
### 5.4.4 Evaluate some network characteristics

**TODO**

## 5.5 Round 2: Simu5G/SimuLTE + Veins + SUMO integration
## 5.5 Round 2: Simu5G/SimuLTE + SUMO + Veins integration

**TODO**

+19.5 KiB
Loading image diff...
+41 −0
Original line number Diff line number Diff line
@startuml "5.3.2.4.1.SUMOArchitectureOverview.png"
!include etsi-style.iuml
!pragma teoz true

title "Figure 5.3.2.4.1: SUMO architecture overview"

package "Network Model" {
  class Network
  class Junction
  class Edge
  class Lane
  class TrafficLightLogic
}

package "Vehicle Model" {
  class Vehicle
  class Route
  class Stop
}

package "Simulation Engine" {
  class Simulation
  class EventScheduler
  class MovementUpdater
}

package "Routing & Control" {
  class RouteFinder
  class TraCIConnection
}

Network *-- Junction
Network *-- Edge
Edge *-- Lane
Junction --> TrafficLightLogic
Vehicle --> Route
Simulation --> Network
Simulation --> Vehicle
Simulation --> RouteFinder
Simulation --> TraCIConnection
@enduml
 No newline at end of file
+0 −0

Empty file added.

+408 KiB
Loading image diff...
Loading