Code Monkey home page Code Monkey logo

handoff-simulator's Introduction

๐Ÿ“ถ 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

handoff-simulator's People

Contributors

chonyy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.