This project explore the use case of machine learning and artifical intelligence in wireless communication, particularly autonomous mmWave base station selection based on LiDAR data for autonomous vehicle.
The main contributions of this repository can be summarised as follows:
- Developed a modular and scalabe simulation methodology using Webots and MATLAB to accurately simulate an urban environment with traffic consisting of autonomous vehicle and mmWave Base Stations
- Used ray-tracing to accurately estimate the signal strength
- Developed and tested various ML/AI methodologies to accurately select the best base station.
- Implemented federated learning for more privacy focussed approach and tested the robustness of the given model.
A detailed manuscript can be found here.
We recommend using Ubuntu 18.04 for this project
All the following commands assume that the github repo is located at home folder of the system.
-
For simulation Webots R2021a has been used. Official download links and installation guide can be found here, here and here
Also, install the following libraries for SUMO
sudo apt-get install libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libgl2ps-dev
Please add the following lines to bashrc/zshrc file or update the env accordingly. The following lines assume that webots has been installed in default location
WEBOTS_HOME="/usr/local/webots"; export WEBOTS_HOME LD_LIBRARY_PATH=${WEBOTS_HOME}/lib/controller; export LD_LIBRARY_PATH LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WEBOTS_HOME}/lib; export LD_LIBRARY_PATH
Also, for the project we are using python 3.7, so add the following line to your bashrc/zshrc file or to the env.
PYTHONPATH=${WEBOTS_HOME}/lib/controller/python37; export PYTHONPATH
Please also note that, for running webots change "python" to "python3" in preferences menu of webots.
-
For simulation SUMO 1.12.0 has been used. Official installation guide can be found here
Also add the following lines to bashrc/zshrc accordingly:
SUMO_HOME="/usr/share/sumo"; export SUMO_HOME LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"/usr/share/sumo/bin";
-
For simulation MATLAB R2021a has been used. Official release page can be found here
-
In order to ensure all the libraries are working correctly, we recommend either creating a virtual environment using Pyenv (or any other virtual env tool) or anaconda.
-
Using PIP and virtual environment
Pyenv Installation Guide: Link
Pyenv virtualenv installation guide: Link
Create a virtual environment using the following commands
cd ~/FedBase pyenv install 3.7.11 pyenv virtualenv 3.7.11 webots_ml pyenv local webots_ml pip install -r requirements.txt
-
Using conda Installation Guide
conda env create -f requirements.yml conda activate webots_release37
-
All the data paths, save paths and log paths are stored in ./config.json
. In order to modify the above paths, please edit ./config.json
accordingly.
- In order to change the map, change the attribute
use_map
to eitherRossyln
orChicago
- In order to change number of base stations, change the attribute
use_BS
toBS_3
orBS_5
accordingly.
-
Firstly, initiliaze webots simulation by running
./Data_Generation/simulation/webots/worlds/osm.wbt
in webotswebots ./Data_Generation/simulation/webots/worlds/Rossyln.wbt
OR
webots ./Data_Generation/simulation/webots/worlds/Chicago.wbt
-
After running the webots simulation for the required time, please reset the simulation and then exit webots. The data will be stored at the path specified in config.xml
-
Then run the preprocessing
python ./Data_Generation/preprocessing/main.py
This will apply necessary preprocessing techniques to LiDAR and constrcut the required OSM files of each data points, which then can be used to accurately calculate power using MATLAB.
-
Now, for final step, run the
./Data_Generation/simulation/matlab/ray_power.m
matlab ./Data_Generation/simulation/matlab/ray_power.m
- To run deep neural network mentioned in the paper, pleas run
./Base_Station_Selection/main.py
python ./Base_Station_Selection/main.py