Monday, October 18, 2010

Ricean Fading based probabilistic Link Error

OAR ns extensions for Fading:

The error-part is extended from another online patch from CMU and Rice Univ.

Cite from OAR site:
"Although the CMU implementation results in an accurate simulation of the wireless channel for each individual flow, the fading components of channels for different flows are identical, a scenario not encountered in practice. This arises due to the fact that the index into the pre-computed channel table (used to look-up the components of fading envelope) is chosen based on the simulator's time instant, which is identical for all flows. To more realistically model the wireless channel for multiple users we modified the implementation such that channel lookup indexes are a function of the flow and time."

How to use

Three files:
  • prop_ricean.h
  • rice_table.txt
A table has to be created in a file to store all fading components.
File rice_table.txt maintains the table used by Ricean Fading Model.

Original Description from CMU package
  There is a sample script in the simscript directory.  You will need
  this and the file "rice_table.txt".

  You should be able to run the sample script "rjp-sample.tcl".  This
  is just a slightly modified version of the example script
  wireless-mitf.tcl which is in the NS distribution.

  Parameters for the Ricean Fading:  The fading model is used to
modulate the output of a large-scale fading model. In this case, it
uses TwoRayGround as the large-scale model. 
  For the Ricean Fading model:

  MaxVelocity   :  This parameter determines the doppler spectrum.
      The value of this parameter is the maximum speed of any objects in the
      environment (could be nodes).  It is NOT the speed of the
      nodes themselves.

  RiceanK  : The Ricean K factor

  LoadRiceFile :  The file containing a table of in-phase and
   quadrature-phase ricean components.  This has to do with the
   computation of the fading enveloped and doesn't have to be changed. 
   Just load the provided file "rice_table.txt"  in the simscript directory.

  The provided script uses the NORT routing as the routing protocol
  (it is a NULL routing protocol).
  This is not provided with the NS distribution.  You can add
  and nort.h to a directory called nort/ in your NS source directory,
  add nort/nort.o  to, run configure and then make to
  include support for this.

I did some minor changes, and the three files can be downloaded here:

The files prop_ricean.* should be put in the directory of ./mobile of ns source tree and the ricean_table.txt should be put in the same directory with simulation tcl-script.

Some lines in Tcl to enable this new propagation model:

set val(prop)           Propagation/Ricean          ;# radio-propagation model

set prop_inst [$ns_ set propInstance_]

$prop_inst MaxVelocity  2.5;
$prop_inst RiceanK        6;
$prop_inst LoadRiceFile  "rice_table.txt";

Reference Links:

1. Rice OAR software (
2. CMU Additions to the NS network simulator to handle Ricean and Rayleigh fading

No comments: