Bug 1012 - Throp propagation model bug
Throp propagation model bug
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: uan
ns-3-dev
All All
: P3 normal
Assigned To: Leonard Tracy
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-22 11:01 EDT by Salva Climent
Modified: 2010-12-23 18:19 EST (History)
3 users (show)

See Also:


Attachments
Test code (2.35 KB, text/plain)
2010-10-22 11:01 EDT, Salva Climent
Details
patch solving bug 1012 (1.13 KB, patch)
2010-11-15 08:30 EST, Andrea Sacco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Salva Climent 2010-10-22 11:01:08 EDT
Created attachment 1003 [details]
Test code

Hello,

I've done a little test with the uan throp propagation model. I wanted to see how far a node can transmit with a fixed transmission power (by default 190dB). And surprisingly I've found the node transmitting up to 13km with 190 dB. Whats more if I decrease the tx power to 10 dB the node transmits even farther! Almost 14km.

I've red the paper “Modeling the Underwater Acoustic Channel in ns2” and taken a look into the ns2 model code. 

In the paper and in the ns2 code the attenuation is calculated with a subtraction sing and that's why it's then added to the transmission power in order to get the reception power.

In the ns3 code the method UanPropModelThorp::GetPathLossDb returns always a positive value that is then added to the tx power at UanChannel::TxPacket.

If I'm correct the  UanPropModelThorp::GetPathLossDb should return the same value but in negative form or do a subtraction at the UanChannel::TxPacket method.

I'm attaching the code used to do the tests.
Comment 1 Leonard Tracy 2010-10-22 12:02:41 EDT
Yes there's a typo in this algorithm.  I'll provide a patch.
Comment 2 Andrea Sacco 2010-11-15 08:30:56 EST
Created attachment 1014 [details]
patch solving bug 1012
Comment 3 Andrea Sacco 2010-11-15 08:33:28 EST
I've made a modification to the UanChannel::TxPacket method, changing the way the received power dB is computed.
As highlighted by Salva, the pathloss has to be subtracted from the transmission power dB value.

Now, using the test code proposed by Salva, it is possible to verify the receiving power goes down with increase in transmission distance.

As a note, I've noticed the maximum transmission distance, with defaults value is about 520m.
Comment 4 Tom Henderson 2010-12-23 18:19:52 EST
changeset: d9b06f3ad3e7