Delay in WSN Routing Protocols
6 views (last 30 days)
Show older comments
Hello I implemented a chain based routing protocol and I want to calculate the end-to-end delay or just the propagation delay. Can I do this in MATLAB and How? because I searched and found that it is very easy in other networks simulators but not in MATLAB.
7 Comments
parismita bhuyan
on 24 Apr 2018
how can I consider a constant delay in each hope I think it varies depending on the distance .please help me if you have any code of matlab plese mail me.my mail id is -bhuyanparismita.0407@gmail.com
Walter Roberson
on 24 Apr 2018
Edited: Walter Roberson
on 24 Apr 2018
Okay, a bit of terminology for communications:
- the time between when something happens and when the system starts responding to the specifics of the event is known as "latency". You might be a very fast runner, but if it takes you a full minute to notice that you are standing right near an angry snake then someone who can only hop on crutches but notices angry snakes really quickly might be the better bet to go with.
- In communications, "latency" typically takes into account best possible travel time but not bandwidth. If you are talking to a computer half way around the Earth, then when you are sending any one small packet, whether you have a 1 megabit per second link or a gigabit per second link accounts for only a small fraction of the communications time, with you being limited by the speed of electricity in a medium or the speed of light in fibre, or the speed of radio waves. If you sent the smallest possible batch of data, then how long until the other end can react?
- This is not the same as bandwidth: "bandwidth" measures how much data you can put into the system every second, but not how long it takes to get there. If you load up a truck with DVDs and drive it an hour away, then that has an amazingly high bandwidth (tens or hundreds of terrabytes per hour transferred) but a high latency (limited to driving speeds.)
- Sometimes people talking about latency only want to know about distance and communications rate over the medium, but more often latency is referring to reaction time from any cause. Like how in theory you might be able to answer the doorbell pretty quickly, but if you have a child hanging on your leg then in practice you can't do it immediately.
- Latency can depend upon load. Latency can definitely depend upon having other packets queued up for attention first -- consider, for example, that if you were to add additional CPUs then you could be paying attention to multiple packets at the same time, reducing the latency.
- Now, when you are processing and transmitting information, there are at least two components to latency: travel time (during which the data is actively on its way), and "delay".
- "delay" can include waiting for resources to become available, but it can also include the fact that processing and making decisions takes time even when the data is receiving the full attention of the system. A delay of (say) 1 millisecond to tie a message to the leg of a homing pigeon is remarkably fast on the scale of pigeons, but it is still a million bit-times for a gigabit communication link, so those delays can be important. Any time the data spends waiting rather then being traveling is "delay"
- So typically the total time to cross from one side of a network to the other is not spoken of as "delay", but rather as "latency", with "delay" being the part of that time spent in overhead or waiting (and "bandwidth" dealing with the rate of data transfer but not with how long the data takes to get there.)
- If you are modeling a system that is lightly used, then it might be a reasonable approximation to model in a constant delay per hop, with the total delay then being the constant delay times the number of hops. Again, this is time the data is not traveling, with it being necessary to add the time delay due to distance in order to find the total latency.
Answers (1)
Shahid Abbas
on 10 Feb 2021
Networking in matlab is not preffered; however this could be done through some basic assumption for delays. You can get help from the different Codes available at http://njavaid.com/downloads.aspx.
3 Comments
Shahid Abbas
on 10 Feb 2021
Adam Danz
on 11 Feb 2021
Couldn't find the part of the code that addresses this question. Could you point out that section?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!