broadcasting a packet in wireless sensor networks
4 次查看(过去 30 天)
显示 更早的评论
I am using MATLAB for simulating a wireless sensor network. How can I simulate the operation of broadcasting a packet into a network containing 50 wireless sensor nodes? thank you
0 个评论
回答(4 个)
cesar silva
2019-11-28
编辑:cesar silva
2019-11-28
Mister Walter,
Well, ty for your answers. Surely very usefull.
First of all, as i said, never heard about matlab 1 month ago. I am not also a programmer, i am a T.I. infrastructure. Telling you this because in the link below i plublished my code... (Last version from now - nov 28th 2019). To you, that surely don't need, because already a high level pro, just as "case study" and to the others that need something "partially made" in Wireless Sensor network routing problems... (https://github.com/cesarfgs/matlab-wsn-code)
My question to you, Mister Walter:
1) do you thing the implemented code "gets near" the reality about transmitted packets? What more you think is possible to implement?
2) From now on, starting as this code is right now, i will implement a ACO to, using the same "original WSN generated", increases network life time, avoiding routes/nodes to die (Whats your point of view?)
Cheers mister Walter, valuable contributions...
DESCRIPTION OF THE CODE AVAILABLE IN GITHUB LINK ABOVE:
1) you can choose node number (nodeNo parameter)
2) you can choose node signal range (range parameter - Its a 1x1 Kilometer area, algo range in meters)
3) once network nodes position randomly formed and all nodes neighbors by radius (range) criteria...
3.1) Shorthestpath nodes discovered between node 1 (sender) and node 2 (receiver) start energy consumption due routing (forward) task...
3.2) As soon 1 node dies, current route becames "useless"
3.3) New shortest path is discovered... (restart 3.1 till no more routes available)
4) I assume that every energy consumption loop is 1 packet transmittion
5) At the end, it "reports":
5.1) All routes discovery events from the begging till the end of network (no more routes)
5.2) hop count of each route iteration
5.3) Nodes involved (In the same order they are met in route)
5.4) Hypothetical packets transmitted
5.5) Dead node number (ID) every iteration
6) It also plots the original WSN
7) ALso plot every routing loop result and report
8) Mark all nodes involved ini each route event
9) Mark all dead nodes
10) Write reports to an external file into same folder the main.m file is
I hope it helps some one....
0 个评论
Walter Roberson
2019-11-28
You write code that simulates creating a broadcast packet. You write code that simulates transmitting the packet, including dequeuing it at the source and queuing a noise corrupted version of it at each intermediate nodes transceiver ports, and you write code that simulates the transceiver doing any hardware level checks normally done, and you write code that simulates the hardware layer passing the packet to the software layer for any CRC and so-on checks, and you write code that simulates rejecting the packet or accepting it and putting it onto the node's input queues.
You write all of this code yourself. Because MATLAB does not offer a general wireless sensor network model. (It does, though, offer a LTE toolbox)
0 个评论
cesar silva
2019-11-28
编辑:cesar silva
2019-11-28
Well, i made a WSN with X nodes, connected due signal radius range (Nothing more than a euclidean requisite).
After it i found shortestpath from sender node - destination node... after it a hypothetical energy consumption starts for all notes involved (Assuming its because of packet forwardinig job)... it keep going on till one of the nodes (die) coz of 0 energy. At this point need path found and all startis again.
i Assume that every full energy consumption iteration in "router nodes" is 1 packet sent... and so on...
Wondering how can i cal/simulate Packet delivery ratio, throughtput, and so on....
i attached 2 SS (the "original" network and the last one... after 10 iterations), till network "dies" coz of no more available paths between sender-receiver...
Any ideia abt pdr etc?
PS: Didn't upload intermediate SS's... they just shows nodes dieing... (Just for ilustration propouses...)
best regards.
1 个评论
Walter Roberson
2019-11-28
When you are running simulations, it is common to have two sections relevant to each packet. One section is the simulated and possibly corrupted packet -- the packet as seen by devices. The other section is true information about the packet, such as the actual source and destination and possibly size and other information might be useful.
Then as you run the simulation, you simulate waveforms and whatever else is relevant for your model, but you also use the true information to update statistics.
When you are talking about throughput, it is common to take into account at least two factors: utilization of channels, and information bytes successfully delivered. For example what a user generally cares about in downloading a file is the rate at which data bytes from the file are transferred. However from a network engineering perspective you need to know how "full" the transmission medium is, because that gives you information about whether it is even possible to increase the data transfer rates.
There is a third layer to consider as well, which is the protocol layer. Different protocols stuff data into the transmission medium in different ways, so selecting the right protocol or tuning the protocol can be important for end to end throughput.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!