SPIN protocol low performance

194 views
Skip to first unread message

Amit Gosavi

unread,
Feb 7, 2012, 6:31:18 PM2/7/12
to castalia-...@googlegroups.com
I have implemented the SPIN protocol to compare my protocol  with. However, I am not getting expected results from it. I am getting very low performance against the claim of actual SPIN protocol.  I suspect that is because nodes experiencing high packet loss. I have implemented it at application level with packet exchange at network level. Can anybody explain me the log mentioned below and tell me why I am getting such a low performance for SPIN protocol? Any help is highly appreciated. Thank you.

module:SN.node[0].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 0.679969 
Castalia| module:SN.node[0].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 59 Failed with interference
Castalia| 2 Failed, non RX state
Castalia| 4 Received despite interference
Castalia| 294 Received with NO interference
Castalia| simple output name:TXed pkts
Castalia| 12 TX pkts
Castalia| module:SN.node[0].Communication.MAC
Castalia| simple output name:TunableMAC packet breakdown
Castalia| 12 Received from App
Castalia| 298 received data pkts
Castalia| 12 sent data pkts
Castalia| module:SN.node[0].Application
Castalia| index:1 simple output name:Packets received per node
Castalia|
Castalia| index:2 simple output name:Packets received per node
Castalia|
Castalia| index:3 simple output name:Packets received per node
Castalia|
Castalia| index:5 simple output name:Packets received per node
Castalia|
Castalia| index:6 simple output name:Packets received per node
Castalia|
Castalia| index:9 simple output name:Packets received per node
Castalia|
Castalia| index:10 simple output name:Packets received per node
Castalia|
Castalia| index:11 simple output name:Packets received per node
Castalia|
Castalia| index:12 simple output name:Packets received per node
Castalia|
Castalia| index:14 simple output name:Packets received per node
Castalia|
Castalia| index:15 simple output name:Packets received per node
Castalia|
Castalia| index:16 simple output name:Packets received per node
Castalia|
Castalia| index:17 simple output name:Packets received per node
Castalia|
Castalia| index:19 simple output name:Packets received per node
Castalia|
Castalia| index:20 simple output name:Packets received per node
Castalia|
Castalia| index:23 simple output name:Packets received per node
Castalia|
Castalia| histogram name:Application level latency, in ms
Castalia| histogram_min:0 histogram_max:200
Castalia| histogram_values 130 67 42 26 12 11 5 1 2 1 1
Castalia| module:SN.node[1].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 0.681577 
Castalia| module:SN.node[1].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 5 Failed with NO interference
Castalia| 44 Failed with interference
Castalia| 9 Failed, non RX state
Castalia| 10 Received despite interference
Castalia| 287 Received with NO interference
Castalia| simple output name:TXed pkts
Castalia| 16 TX pkts

--
Regards,

Amit Gosavi

Athanassios Boulis

unread,
Feb 7, 2012, 7:34:29 PM2/7/12
to castalia-...@googlegroups.com
I do not remember what SPIN does, nor do I know the details of your simulation (I see from the output that you have at least 23 nodes but no more info). So I have no idea what you expect to get. I can give you some general advise though.

From the Radio output I can see that you have some interference, but it does not seem overwhelming.
I would play with the wireless channel parameters and the MAC parameters to see how does this affect performance.
For example, make it an ideal channel. Or with TunableMAC use dutycycle=1 to have a basic CSMA/CA protocol. Use reTx in the MAC or not.
If the results are considerably different then you can dig deeper by looking at traces, to figure out what is happening.
Maybe you will find something wrong with your implementation of SPIN, or even something wrong with SPIN design itself (e.g.,  making very simplifying assumptions on the channel, or radio) 

Amit Gosavi

unread,
Feb 7, 2012, 7:55:43 PM2/7/12
to castalia-...@googlegroups.com
Yes you are right. I am simulating with 25nodes. Please let me know I am doing right thing?

By making channel IDEAL you mean changing:

SN.node[*].Communication.Radio.mode = "IDEAL". Is this correct?

I am not sure how to change TunableMac to use dutycycle=1.

Can you tell me where can I find the bandwidth of channel? I want to set the bandwidth to 1Mbps. 

Thank you for your help.

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To post to this group, send email to castalia-...@googlegroups.com.
To unsubscribe from this group, send email to castalia-simula...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castalia-simulator?hl=en.



--
Regards,

Amit Gosavi

Athanassios Boulis

unread,
Feb 7, 2012, 8:17:42 PM2/7/12
to castalia-...@googlegroups.com
On 8 February 2012 11:55, Amit Gosavi <gosa...@gmail.com> wrote:
Yes you are right. I am simulating with 25nodes. Please let me know I am doing right thing?

By making channel IDEAL you mean changing:

SN.node[*].Communication.Radio.mode = "IDEAL". Is this correct?

No, this just makes the radio IDEAL (ideal SNR-> BER curve). You can use it (set it) along with setting the channel properties to ideal (0 sigma and 0 bidirectional sigma). You can also play with the collision model.
 

I am not sure how to change TunableMac to use dutycycle=1.


Read the manual: chapter 4 talks about the modelling and theres is an appendix at the end with all parameters. Also search the forum with relevant keywords . You should be able to find all relevant info. But first read the manual.

 
Can you tell me where can I find the bandwidth of channel? I want to set the bandwidth to 1Mbps. 

I do not know what you mean by channel bandwidth. Maybe you mean the radio datarate? Again read the manual to understand the basic Castalia models (channel, radio etc)
 

Amit Gosavi

unread,
Feb 9, 2012, 6:57:09 PM2/9/12
to castalia-...@googlegroups.com
I apologize for the last time. I accidentally put my reply to wrong thread. I carefully read the manual. Might be I am not getting the concept of setting the parameters you suggested. 

1) I found the dataRate(kbps) in CC2420.txt which is 250(kbps) for both idea and normal mode. So to change it to say 1Mbps do I need to modify the original CC2420.txt or create my own file and set parameters required by me?

2) I am not getting the difference between the dataRate and physDataRate(Sec.4.3.1)? How can I set the dataRate 
in the configuration file?

3) From the manual what I understand about the duty cycle is:

        dutycycle=listenInterval/(listenInterval+sleepTime)

  So if I want my radio always listening I set dutycycle to 0.1 and listenInterval to 0.1 is that correct? (Here I assume in listenmode Radio can send and receive packets.)

Thank you.

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To post to this group, send email to castalia-...@googlegroups.com.
To unsubscribe from this group, send email to castalia-simula...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castalia-simulator?hl=en.



--
Regards,

Amit Gosavi

Athanassios Boulis

unread,
Feb 9, 2012, 8:34:26 PM2/9/12
to castalia-...@googlegroups.com
On 10 February 2012 10:57, Amit Gosavi <gosa...@gmail.com> wrote:
I apologize for the last time. I accidentally put my reply to wrong thread. I carefully read the manual. Might be I am not getting the concept of setting the parameters you suggested. 

It would have been good to include the missed message here so that everybody can have a full picture. Now it's probably too late, with the discussion moving on.
 

1) I found the dataRate(kbps) in CC2420.txt which is 250(kbps) for both idea and normal mode. So to change it to say 1Mbps do I need to modify the original CC2420.txt or create my own file and set parameters required by me?
Better create your own file. Or you can simply create a new Mode in the radio configuration, naming it "SuperFast" or some other telling name, and giving it the dataRate value you want. You will have to understand thought that this is an unrealistic mode (keeping all other parameters the same, and just increasing the datarate), but maybe this is not very important for you now.
 

2) I am not getting the difference between the dataRate and physDataRate(Sec.4.3.1)? How can I set the dataRate 
in the configuration file?
Read the manual about how to set parameters/configurations of the Radio. 

difference of dataRate in the radio and in a MAC protocol: Many MAC protocols need to know the dataRate of the Radio in order to set certain timers. Instead of automatically reading the parameter from the radio (which in real hardware is not an option), we have chosen to have another MAC parameter which the user has to make sure that it matches the radio dataRate. Changing the MAC dataRate does not change the actual Radio dataRate, it only changes what the MAC *thinks* is the radio dataRate. 


3) From the manual what I understand about the duty cycle is:

        dutycycle=listenInterval/(listenInterval+sleepTime)

  So if I want my radio always listening I set dutycycle to 0.1 and listenInterval to 0.1 is that correct? (Here I assume in listenmode Radio can send and receive packets.)

So if you put these numbers in the simple formula above, and solve for sleepTime, what will you get?

 

ousba...@gmail.com

unread,
Apr 19, 2017, 7:23:07 AM4/19/17
to Castalia Simulator
do you have SPIN protocol 

JAMES

unread,
Apr 20, 2017, 7:43:55 PM4/20/17
to Castalia Simulator

hi
Any one can give me the SPIN protocol code under omnet ++ ??

Thank you

Reply all
Reply to author
Forward
0 new messages