DsssRate11Mbps seems to have serious problems?

632 views
Skip to first unread message

Marc Reichelt

unread,
Apr 18, 2011, 9:11:25 AM4/18/11
to ns-3-users
Hi!

I am currently implementing a DTN-like application for ns-3, and
stumbled over a serious pitfall. I am simulating a MANET with 74
nodes, and currently I am testing no-DTN communication (only TCP) via
MANET without a routing protocol and then with OLSR.
However, sending messages over multiple hops via OLSR routes is nearly
impossible when I use the PhyMode "DsssRate11Mbps".
Here is the message delivery rate of a 10h example simulation with
11Mbps mode:
1.) MDR 1.01215 % (without OLSR)
2.) MDR 1.21457 % (with OLSR)

When I change the mode to "DsssRate1Mbps", the MDR increases
drastically:
1.) MDR 3.23887 % (without OLSR)
2.) MDR 24.4939 % (with OLSR)

Are there some known problems with the DsssRate11Mbps?


Thanks for helping & regards

Marc Reichelt || http://www.marcreichelt.de/

Ruben Merz

unread,
Apr 18, 2011, 10:13:54 AM4/18/11
to ns-3-...@googlegroups.com, Marc Reichelt
Hi Marc,

On 4/18/11 15:11 , Marc Reichelt wrote:
> Hi!
>
> I am currently implementing a DTN-like application for ns-3, and
> stumbled over a serious pitfall. I am simulating a MANET with 74
> nodes, and currently I am testing no-DTN communication (only TCP) via
> MANET without a routing protocol and then with OLSR.
> However, sending messages over multiple hops via OLSR routes is nearly
> impossible when I use the PhyMode "DsssRate11Mbps".
> Here is the message delivery rate of a 10h example simulation with
> 11Mbps mode:
> 1.) MDR 1.01215 % (without OLSR)
> 2.) MDR 1.21457 % (with OLSR)

This is at Dsss11, right?

> When I change the mode to "DsssRate1Mbps", the MDR increases
> drastically:
> 1.) MDR 3.23887 % (without OLSR)
> 2.) MDR 24.4939 % (with OLSR)

This is at Dsss1, right?

> Are there some known problems with the DsssRate11Mbps?

Why do you think that there is a problem? Because the MDR with 1 is
higher than the MDR with 11?

What is your traffic input rate? Are you saturating the channels? Also,
what is the average distance between nodes? Or said differently, the
average received SNR?

At 1 Mbps, your frames are longer, so you might have more collisions

R

>
> Thanks for helping& regards
>
> Marc Reichelt || http://www.marcreichelt.de/
>

Marc Reichelt

unread,
Apr 18, 2011, 10:59:18 AM4/18/11
to ns-3-users
Hi Ruben,

> >   1.) MDR  1.01215 % (without OLSR)
> >   2.) MDR  1.21457 % (with OLSR)
>
> This is at Dsss11, right?

Correct.

> >   1.) MDR  3.23887 % (without OLSR)
> >   2.) MDR 24.4939 % (with OLSR)
>
> This is at Dsss1, right?

Also right.

> Why do you think that there is a problem? Because the MDR with 1 is
> higher than the MDR with 11?
> What is your traffic input rate? Are you saturating the channels? Also,
> what is the average distance between nodes? Or said differently, the
> average received SNR?

I think there is a problem because I am using TCP connections for
transmitting messages, which normally should retransmit data if there
are collisions. And because the data I send is really small (1 kB of
payload for each message), and the send rate is at an average of 1
message per minute (randomly distributed between 0 and 2 minutes), I
would expect that the MDR should be nearly the same for 1 Mbps and 11
Mbps. So I am definitely not saturating the channels.
For the average distance and the SNR: I also did a small simulation
completely without OLSR, and just with 2 nodes using the Random
Waypoint Mobility Model on a 200x200 meter area. As for the SNR: I use
a FriisPropagationLossModel. RxGain is set to DoubleValue (-25.9) to
achieve successfull communication at 40 meters distance. With
DsssRate11Mbps, I get a delivery rate of only 11 %, while I am getting
65 % with DsssRate1Mbps...

> At 1 Mbps, your frames are longer, so you might have more collisions

So, when I am applying this to my scenarios, I should get higher MDRs
with 11Mbps than with 1Mbps - but the opposite is the case.


Regards

Marc Reichelt || http://www.marcreichelt.de/

Ruben Merz

unread,
Apr 18, 2011, 11:12:03 AM4/18/11
to ns-3-...@googlegroups.com, Marc Reichelt
Hi,

On 4/18/11 16:59 , Marc Reichelt wrote:
> Hi Ruben,
>
>>> 1.) MDR 1.01215 % (without OLSR)
>>> 2.) MDR 1.21457 % (with OLSR)
>>
>> This is at Dsss11, right?
>
> Correct.
>
>>> 1.) MDR 3.23887 % (without OLSR)
>>> 2.) MDR 24.4939 % (with OLSR)
>>
>> This is at Dsss1, right?
>
> Also right.
>
>> Why do you think that there is a problem? Because the MDR with 1 is
>> higher than the MDR with 11?
>> What is your traffic input rate? Are you saturating the channels? Also,
>> what is the average distance between nodes? Or said differently, the
>> average received SNR?

One more question, because I think I originally understood otherwise:
what is MDR for you? Is it mean delivery ratio? And how do you compute it?

> I think there is a problem because I am using TCP connections for
> transmitting messages, which normally should retransmit data if there
> are collisions. And because the data I send is really small (1 kB of
> payload for each message), and the send rate is at an average of 1
> message per minute (randomly distributed between 0 and 2 minutes), I
> would expect that the MDR should be nearly the same for 1 Mbps and 11
> Mbps. So I am definitely not saturating the channels.
> For the average distance and the SNR: I also did a small simulation
> completely without OLSR, and just with 2 nodes using the Random
> Waypoint Mobility Model on a 200x200 meter area. As for the SNR: I use
> a FriisPropagationLossModel. RxGain is set to DoubleValue (-25.9) to

You use a negative RxGain?

> achieve successfull communication at 40 meters distance. With
> DsssRate11Mbps, I get a delivery rate of only 11 %, while I am getting
> 65 % with DsssRate1Mbps...

Yaks, I was not careful enough when reading your email. I should pay
more attention. If MDR is mean delivery ratio, yes, I will happily
contradict what I believed earlier and say that a priori, it makes sense
that you receive more frames at 1 Mbps than at 11 Mpbs. Indeed, 1 Mpbs
should be more robust than 11 and you are not saturating the channel.

>> At 1 Mbps, your frames are longer, so you might have more collisions
>
> So, when I am applying this to my scenarios, I should get higher MDRs
> with 11Mbps than with 1Mbps - but the opposite is the case.

Forget that, I was not careful enough when reading your data and I
believe I first misunderstood what MDR is.

Ruben

Marc Reichelt

unread,
Apr 18, 2011, 11:22:37 AM4/18/11
to ns-3-users
Hi Ruben,

> One more question, because I think I originally understood otherwise:
> what is MDR for you? Is it mean delivery ratio? And how do you compute it?

I just calculate how many messages are received at their destination,
and how many have been created. E.g., when I create 100 messages, but
only 42 are arriving at the destination, the MDR is 42 / 100 == 42 %.

> You use a negative RxGain?

Yes. To be more exact: I derived the file examples/wireless/wifi-
simple-adhoc-grid.cc (which uses DsssRate1Mbps and RxGain of -10) and
modified the parameters to match more WiFi-like behaviour of
smartphones. And most smartphones today are able to send at 11 Mbps
and sometimes even more, and the RxGain has been justified to provide
successfull communication at 40 meters (and not 200 or 250 meters,
which is a little bit too far).

> > achieve successfull communication at 40 meters distance. With
> > DsssRate11Mbps, I get a delivery rate of only 11 %, while I am getting
> > 65 % with DsssRate1Mbps...
>
> Yaks, I was not careful enough when reading your email. I should pay
> more attention. If MDR is mean delivery ratio, yes, I will happily
> contradict what I believed earlier and say that a priori, it makes sense
> that you receive more frames at 1 Mbps than at 11 Mpbs. Indeed, 1 Mpbs
> should be more robust than 11 and you are not saturating the channel.

Ok, so you say it makes sense that the communication should be more
successfull at 1 Mbps than with 11 Mbps. What I find astounding is
that multihop (and even single-hop) communication seems to stall at 11
Mbps...

Ruben Merz

unread,
Apr 18, 2011, 11:50:07 AM4/18/11
to ns-3-...@googlegroups.com, Marc Reichelt
Hi,

On 4/18/11 17:22 , Marc Reichelt wrote:
> Hi Ruben,
>
>> One more question, because I think I originally understood otherwise:
>> what is MDR for you? Is it mean delivery ratio? And how do you compute it?
>
> I just calculate how many messages are received at their destination,
> and how many have been created. E.g., when I create 100 messages, but
> only 42 are arriving at the destination, the MDR is 42 / 100 == 42 %.

Ok

>> You use a negative RxGain?
>
> Yes. To be more exact: I derived the file examples/wireless/wifi-
> simple-adhoc-grid.cc (which uses DsssRate1Mbps and RxGain of -10) and
> modified the parameters to match more WiFi-like behaviour of
> smartphones. And most smartphones today are able to send at 11 Mbps
> and sometimes even more, and the RxGain has been justified to provide
> successfull communication at 40 meters (and not 200 or 250 meters,
> which is a little bit too far).

Ok, I see. I would have simply used another propagation model.

>>> achieve successfull communication at 40 meters distance. With
>>> DsssRate11Mbps, I get a delivery rate of only 11 %, while I am getting
>>> 65 % with DsssRate1Mbps...
>>
>> Yaks, I was not careful enough when reading your email. I should pay
>> more attention. If MDR is mean delivery ratio, yes, I will happily
>> contradict what I believed earlier and say that a priori, it makes sense
>> that you receive more frames at 1 Mbps than at 11 Mpbs. Indeed, 1 Mpbs
>> should be more robust than 11 and you are not saturating the channel.
>
> Ok, so you say it makes sense that the communication should be more
> successfull at 1 Mbps than with 11 Mbps. What I find astounding is
> that multihop (and even single-hop) communication seems to stall at 11
> Mbps...

11 Mbps is less reliable than 1 Mbps.

I am afraid that you have no other escape than find out why and where
your packets get lost... :-)

R

Marc Reichelt

unread,
Apr 18, 2011, 12:22:11 PM4/18/11
to ns-3-users
Hi Ruben,

> > Yes. To be more exact: I derived the file examples/wireless/wifi-
> > simple-adhoc-grid.cc (which uses DsssRate1Mbps and RxGain of -10) and
> > modified the parameters to match more WiFi-like behaviour of
> > smartphones. And most smartphones today are able to send at 11 Mbps
> > and sometimes even more, and the RxGain has been justified to provide
> > successfull communication at 40 meters (and not 200 or 250 meters,
> > which is a little bit too far).
>
> Ok, I see. I would have simply used another propagation model.

Which one would you use to model realistic loss and have an
approximate range at which communication is still working? I don't
like to use the RangePropagationLossModel as it is just too
unrealistic (although it is used by the ONE simulator for simulating
DTN routing algorithms). I believe the
TwoRayGroundPropagationLossModel also can't be used due to my short
range of ~40 meters, which means this model will default to the
FriisPropagationLossModel for these small ranges...


Thanks & regards

Marc Reichelt || http://www.marcreichelt.de/

Ruben Merz

unread,
Apr 18, 2011, 1:02:36 PM4/18/11
to ns-3-...@googlegroups.com, Marc Reichelt
I have been using LogDist and ThreeLogDist and tuning the parameters by
hand. Typically, I put it into octave and tune the parameters to get the
desired RSS at a given distance :-)

R

> Thanks& regards
>
> Marc Reichelt || http://www.marcreichelt.de/
>

Marc Reichelt

unread,
Apr 19, 2011, 8:19:34 PM4/19/11
to ns-3-users
Hi Ruben,

ok, I understand how it should be done. My problem is that I don't
know which RSS to choose. Is there some magic value defined in ns-3
here that defines which RSS leads to successfull communication and
which RSS does not? I think I need just a simple example how it would
be calculated.
For example, if I would choose the LogDistancePropagationLoss from
http://www.nsnam.org/doxygen-release/classns3_1_1_log_distance_propagation_loss_model.html
the formula would be:
L = L0 + 10 * n * log10 (d / d0)

By default, this model has:
n = 3
d0 = 1
L0 = -20 * log10 ( 300e6 / 5.15e9 / (4 * pi * 1) ) = 46.6777 dB
(Friis at 1 meter with 5.15 GHz)

So how would you choose the parameters when you have 802.11b (let's
say 2.407 GHz) and you still want to have successfull communication at
a distance of 50 meters, but not so much further?
I now would choose L0 to Friis at 1 meter with 2.407 GHz, resulting in
L0 = 40.071 dB. My problem now is to figger out the "successfull
communication at 50 meters" RSS part...


Thanks in advance & regards

Marc Reichelt || http://www.marcreichelt.de/

Ruben Merz

unread,
Apr 20, 2011, 4:30:35 AM4/20/11
to ns-3-...@googlegroups.com, Marc Reichelt
Hi,

On 4/20/11 02:19 , Marc Reichelt wrote:
> Hi Ruben,
>

> ok, I understand how it should be done. My problem is that I don't
> know which RSS to choose. Is there some magic value defined in ns-3
> here that defines which RSS leads to successfull communication and
> which RSS does not? I think I need just a simple example how it would
> be calculated.

There is no magic value because YansWifiPhy operates with an SNR based
model. But since it is a simulator, you can easily build a small
simulation to understand what happens: take two nodes, blast UDP packets
and make the destination move every second one meter further away from
the source. Do this simulation for every rate you want to use. Then,
using the pcap traces, plot the RSS vs througput relationship. You will
know at which RSS value at particular rate stops being reliable. You can
also put in octave/matlab/whatever the function that computes whether a
frame is dropped or not as a function of the SNR.

Also, in yans-wifi-phy.cc, you want to look at EnergyDetectionThreshold
and CcaMode1Threshold.

> For example, if I would choose the LogDistancePropagationLoss from
> http://www.nsnam.org/doxygen-release/classns3_1_1_log_distance_propagation_loss_model.html
> the formula would be:
> L = L0 + 10 * n * log10 (d / d0)
>
> By default, this model has:
> n = 3
> d0 = 1
> L0 = -20 * log10 ( 300e6 / 5.15e9 / (4 * pi * 1) ) = 46.6777 dB
> (Friis at 1 meter with 5.15 GHz)
>
> So how would you choose the parameters when you have 802.11b (let's
> say 2.407 GHz) and you still want to have successfull communication at
> a distance of 50 meters, but not so much further?

Very, very roughly, beyond 50 meters you want the RSS to be below
EnergyDetectionThreshold.

R

> I now would choose L0 to Friis at 1 meter with 2.407 GHz, resulting in
> L0 = 40.071 dB. My problem now is to figger out the "successfull
> communication at 50 meters" RSS part...
>
>

> Thanks in advance& regards

Marc Reichelt

unread,
Apr 20, 2011, 10:54:25 AM4/20/11
to ns-3-users
Hi Ruben,

Ok, I wrote a simple test program:
http://pastebin.com/AMGtffbr

However, no matter what loss model I use, the UDP communication stops
at more than 13 meters. Even though I am using a
RangePropagationLossModel with a range of 250 meters! What am I doing
wrong here? I found it really hard to test my propagation loss models
- maybe it would help new users if future versions of ns-3 included
some nice examples here?
By the way: I am using the latest stable version ns-3.10 right now.


Thanks in advance & regards

Marc Reichelt || http://www.marcreichelt.de/

On 20 Apr., 10:30, Ruben Merz <ru...@net.t-labs.tu-berlin.de> wrote:
> Hi,
>
> On 4/20/11 02:19 , Marc Reichelt wrote:
>
> > Hi Ruben,
>
> > ok, I understand how it should be done. My problem is that I don't
> > know which RSS to choose. Is there some magic value defined in ns-3
> > here that defines which RSS leads to successfull communication and
> > which RSS does not? I think I need just a simple example how it would
> > be calculated.
>
> There is no magic value because YansWifiPhy operates with an SNR based
> model. But since it is a simulator, you can easily build a small
> simulation to understand what happens: take two nodes, blast UDP packets
> and make the destination move every second one meter further away from
> the source. Do this simulation for every rate you want to use. Then,
> using the pcap traces, plot the RSS vs througput relationship. You will
> know at which RSS value at particular rate stops being reliable. You can
> also put in octave/matlab/whatever the function that computes whether a
> frame is dropped or not as a function of the SNR.
>
> Also, in yans-wifi-phy.cc, you want to look at EnergyDetectionThreshold
> and CcaMode1Threshold.
>
> > For example, if I would choose the LogDistancePropagationLoss from
> >http://www.nsnam.org/doxygen-release/classns3_1_1_log_distance_propag...

Ruben Merz

unread,
Apr 20, 2011, 11:18:15 AM4/20/11
to ns-3-...@googlegroups.com, Marc Reichelt
I have a no idea right now for your current setup. But
have a look into the wifi-adhoc.cc example.

R

On 4/20/11 16:54 , Marc Reichelt wrote:
> Hi Ruben,
>

> Ok, I wrote a simple test program:
> http://pastebin.com/AMGtffbr
>
> However, no matter what loss model I use, the UDP communication stops
> at more than 13 meters. Even though I am using a
> RangePropagationLossModel with a range of 250 meters! What am I doing
> wrong here? I found it really hard to test my propagation loss models
> - maybe it would help new users if future versions of ns-3 included
> some nice examples here?
> By the way: I am using the latest stable version ns-3.10 right now.
>
>

Marc Reichelt

unread,
Apr 20, 2011, 12:29:33 PM4/20/11
to ns-3-users
Hi Ruben,

> I have a no idea right now for your current setup. But
> have a look into the wifi-adhoc.cc example.

Ok, I will. Sadly they use the WIFI_PHY_STANDARD_80211a standard, and
not the WIFI_PHY_STANDARD_80211b with DsssRate<>Mbps as I am, so it's
not quite comparable.

However, I noticed an interesting fact: The propagation loss model
seems to work well, but it is not the reason why the packets get lost
after 13 meters.
If I change the UDP packetSize from 1000 to 100 bytes, transmissions
will work until approximately 131 meters. So now I need to figure out
why packets get lost when they are this large.
Do you have a hint?


Thanks & regards

Marc Reichelt || http://www.marcreichelt.de/

Ruben Merz

unread,
Apr 20, 2011, 12:36:48 PM4/20/11
to ns-3-...@googlegroups.com, Marc Reichelt

On 4/20/11 18:29 , Marc Reichelt wrote:
> Hi Ruben,
>
>> I have a no idea right now for your current setup. But
>> have a look into the wifi-adhoc.cc example.
>
> Ok, I will. Sadly they use the WIFI_PHY_STANDARD_80211a standard, and
> not the WIFI_PHY_STANDARD_80211b with DsssRate<>Mbps as I am, so it's
> not quite comparable.

Yes, but you could modify the example :-)

> However, I noticed an interesting fact: The propagation loss model
> seems to work well, but it is not the reason why the packets get lost
> after 13 meters.
> If I change the UDP packetSize from 1000 to 100 bytes, transmissions
> will work until approximately 131 meters. So now I need to figure out
> why packets get lost when they are this large.
> Do you have a hint?

Here is what I would do: first, enable pcap tracing and check whether
you see the frames at the receiver. If no, well, either they are not
sent (which I doubt), either they are not received because they are not
detected by the PHY i.e. their RSS values is below the energy detection
threshold. If yes, then what is their RSS (you get that with the
radiotap header)?

After that, it really depends on what is RSS value required for a
reliable decoding of the frame (it is PHY rate dependent).

Hope it helps

R

>
> Thanks& regards
>
> Marc Reichelt || http://www.marcreichelt.de/
>

Marc Reichelt

unread,
Apr 20, 2011, 2:52:47 PM4/20/11
to ns-3-users
Hi Ruben,

according to tcpdump the UDP packets are indeed received at node B. I
copied the tcpdump output of a UDP packet where the RecvCallback is
not called, neither is DoForwardUp of UDP - but DoForwardUp is called
for IPv4Endpoint:
1710.008704 1710008704us tsft 1.0 Mb/s 2412 MHz (0x00a0) -64dB signal
-101dB noise IP 10.1.1.1.49153 > 10.1.1.2.80: UDP, length 1000
1710.008714 1710008714us tsft 1.0 Mb/s 2412 MHz (0x00a0)
Acknowledgment RA:00:00:00:00:00:01

The signal here has -64 dB and noise is at -101 dB. I use
DsssRate1Mbps at a frequency of 2.412 GHz (802.11b channel 1).
All 10 UDP packets with a signal SSI of -61 dB do get through, but
only 1 of 10 UDP packets with a signal of -62 dB are fully received.

I tried to debug it, but from Ipv4Endpoint::DoForwardUp on it doesn't
go any further...


Thanks & regards

Marc Reichelt || http://www.marcreichelt.de/
Reply all
Reply to author
Forward
0 new messages