Skip to content

📶 Wiresless network handoff simulator built with python!

Notifications You must be signed in to change notification settings

chonyy/handoff-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📶 Wiresless network handoff simulator built with python!

If you are not familiar with the process of handoff, strongly recommend checking out the handoff-visualizer. The visualizer visualize a tuned versoin of this simulation, which makes the process and concept easy to understand. The visualizer is built to make the concept understandable. We value the data in this simulation project.

This project is a side project of handoff-visualizer.

Simulation Structure

A block size is 120 * 80 (m^2). Cars are assummed to be moving on an extremely thin line between blocks, the line doesn't take up any space. The velocity of the car is 10m/s. In our simultation, we iterate once in a second, the cars moves 10 meter, and all the data are calculated and updated on each iteration. We run for 86400 iterations to simulate the handoffs in a day.

  • Velocity = 36km/hr = 10m/s
  • Probability of cars entrance follows Poisson distribution
  • â‹‹ = 2 cars/ min [ P(t) = â‹‹"e" ^(−"â‹‹" ) (t is in sec) ]
  • Probability of cars turning based on predefined value listed below
  • Received Power Calculation explained below

Car Entrance Distribution

The probability of the entrance follows Poisson distribution and

In our simultation

  • â‹‹ = 0.0334 cars/ sec
  • k = 1

Received Power

The received power is calculated by the formula below. Read ScienceDirect to dig deeper.

  • Base station transmission Pt(mW) = -50 dBm
  • Base = 1mW
  • 10log(Pt / Base) = dBm
  • First-meter path loss = 10 dBm
  • P0 = -50 dBm
  • Pd = -50 - 10 - 20log(d(m) / 1m)

What is handoff?

Handoff is the transition for any given user of signal transmission from one base station to a geographically adjacent base station as the user moves around.

Each time a mobile or portable cellular subscriber passes from one cellinto another, the network automatically switches coverage responsibility from one basestation to another. Each base-station transition, as well as the switching processor sequence itself, is called handoff.

Usage

Idealy

pipenv sync
pipenv run python src/handoff.py

Or if you already got the dependencies in the pipfile

python src/handoff.py

Policies parameter value

The different parameters for each policy are listed below.

Parameters Value
Threshold -110 dBm
Entrophy 5 dBm
Minimum -125 dBm

Posssibility of turning

The possibility of changing direction when encountering intersection is listed below.

Intersection with four roads

Direction Possibility
Go straight 1/2
Turn right 1/3
Turn left 1/6

About

📶 Wiresless network handoff simulator built with python!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages