📶 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.
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
The probability of the entrance follows Poisson distribution and
In our simultation
- â‹‹ = 0.0334 cars/ sec
- k = 1
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)
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.
Idealy
pipenv sync
pipenv run python src/handoff.py
Or if you already got the dependencies in the pipfile
python src/handoff.py
The different parameters for each policy are listed below.
Parameters | Value |
---|---|
Threshold | -110 dBm |
Entrophy | 5 dBm |
Minimum | -125 dBm |
The possibility of changing direction when encountering intersection is listed below.
Direction | Possibility |
---|---|
Go straight | 1/2 |
Turn right | 1/3 |
Turn left | 1/6 |