A Unit Disc propagation model for MiXiM

This entry was posted by on Thursday, 7 April, 2011 at

MiXiM’s analogueModels provide some neat opportunities to make propagation models of great detail and complexity. But what if you want to use the simplest of all, the Unit Disc (Graph) model? You simply state a ‘communication’ range and within that range all nodes receive the message, outside they don’t. Simple as that. We did the work for you.

Unit Disc propagation

What it does

Simply put, a Unit Disc (Graph) model takes a single input: the transmission range R. Within R, all receivers have probability 1 to receive the packets. Outside, they have probability 0, illustrated by the gray vehicles in the image above.

How to get it

Download the code from here. Essentially, it is just a .h and .cc file, and a config.xml file to tell analogueModels to use it.

Oh and some required modifications:

Needs some init code, in the .h file:

 53     /**
 54      * @brief Creates and initializes a UnitDiscModel with the
 55      * passed parameter values.
 56      */
 57     AnalogueModel* initializeUnitDiscModel(ParameterMap& params);

In the .cc file:

 17 #include 
 37     else if (name == "UnitDiscModel")
 38     {
 39         return initializeUnitDiscModel(params);
 40     }
146 AnalogueModel* PhyLayerp::initializeUnitDiscModel(ParameterMap& params){
148     // init with default value
149         double range = 200.0;
150         //Get config value if available
151         if (params.count("range") > 0)
152             range = params["range"].doubleValue();
154         bool useTorus = world->useTorus();
155         const Coord& playgroundSize = *(world->getPgs());
157         return new UnitDiscModel(&move, useTorus, playgroundSize, coreDebug, range);
158 }

Note that in this case you may also want to tweak your tx power (omnetpp.ini) and maybe disable BER calculations (as there’s no realistic Signal to Noise ratio).

From UnitDiscModel.h:

 * UnitDiscConstMapping is subclassed from SimpleConstMapping for convenience.
 16  * This model defines a simple "Communication Range", there is no attenuation.
 17  * Inside the range, the mapping is 1 (no attenuation)
 18  * Outside the range, the result is 0 (100% attenuation)
 19  * Note that this does in NO WAY reflect reality!
 20  *
 21  * Important: note that Decider performs BER calculations. For true unit-disc,
 22  * you may want to disable this (Decider80211p contains a useBERcalculations
 23  * switch for this).
 24  *
 25  * Important: note that the BaseConnectionManager::CalcInterfDist calculates a
 26  * "maximum interference range" based on transmission power and simple pathloss.
 27  * This distance is then used as an optimisation within ConnectionManager to only
 28  * connect those nodes which have some probability of communicating - the others
 29  * are just too far away. For proper results, this maximum interference range
 30  * must be greater than the 'range' specified by the UnitDisc model - otherwise
 31  * the PHY and Analogue models are ok, but nodes in the far reaches of the range
 32  * will not receive signals due to this optimisation. This means they will not 
 33  * get the Signals but the analogue model mappings will contain interference 
 34  * (e.g. an RSSI large enough to be busy while it is reported not to be).
 35  *
 36  * @author Martijn van Eenennaam, Wouter Klein Wolterink
 37  * DACS, University of Twente 2011

Important Notice: Unit Disc propagation is not realistic, however it provides a great tool for e.g. protocol analysis where the exact nature of the underlying channel is not very important, or for first-time evaluations. Usually, evaluation of a Unit Disc model is very quick as there is only a boolean decision involved.

And sometimes you want to use a propagation model about which you can be certain you understand the error you make by using it; more complex does not always imply better, as stochastic fading and pathloss models can easily clutter MAC-layer effects.

The OMNeT++ Network Simulation Framework

The MiXiM framework.

van Eenennaam, E.M. (June 2008) A Survey of Propagation Models used in Vehicular Ad hoc Network (VANET) Research, paper written for course Mobile Radio Communication, University of Twente.

2 Responses to “A Unit Disc propagation model for MiXiM”

  1. Ream


    If understand your work here: You created your own analogue model to work with the already implemeted UnitDisk connection manager (in MiXiM), right ? In this case, I would like also to know what PHY implementation you used in your model ?

    I have also a request, could you please repair the download link. It’s broken 🙂

    Many thanks in advance !
    Best regards,


  1. IEEE802.11 implementation in MiXiM @ Freeminded.org

Leave a Reply