how to do multihop communication in wsn by using matlab ?

i want to do multihop communication in matlab. which means, like this
in this diagram that read color line represent's finding the nearer cluster head by communicating through the neighborhood node. so now i want to find nearer cluster head through the nodes.Display which cluster head is nearer and display other cluster head and display through which node it's finding.

7 Comments

Arul - are you providing a source cluster and destination cluster, and the code is supposed to find the shortest path between the two (and so draw the red line)?
Does the algorithm always just go from the source cluster head to the nearest cluster head of some other cluster and continue in that manner until the destination cluster is reached?
I think that you should outline your algorithm so that it is clear to the reader (and to you) what the steps are to get from the source to the destination.
1. ya we can take any one of the cluster head as a source cluster head. And after this i need to send the data from source cluster head to sink node through the efficient path. The 'X' symbol represent the sink node (above diagram)
2. ya. The algorithm will always go from the source cluster head to the nearest cluster head and it will reach the destination node(sink node).
3. By considering the distance the cluster head will choose the nearer node and it will try to transmit the data to sink node (destination node) by choosing the efficient path.
The algorithm will always go from the source cluster head to the nearest cluster head and it will reach the destination node(sink node).
So even if the nearest cluster head is not on the most efficient/shortest path to the sink node, the path will still go through there?
So even if the nearest cluster head is not on the most efficient/shortest path to the sink node, the path will still go through there?
ya it should go. Because data should reach sink node.
finally some how it should reach destination node(sink node).
I have already did some 50% just look at my code "http://www.mathworks.in/matlabcentral/answers/153186-how-to-extract-the-value-from-voronoi-diagram-in-matlab"
So the algorithm that you need to implement is something like the following
  1. Starting with the source cluster head, using the Euclidean distance metric (or some other) find the cluster (say m) whose head is closest to the source using all available clusters.
  2. Within cluster m, find the node that is the closest to the source cluster head. This node will be the node in between the source cluster head and the m cluster head.
  3. If the destination node is in cluster m, then we are finished and the path is set.
  4. If the destination node is not in cluster m, then mark the source cluster and cluster m as unavailable.
  5. From cluster m, find that cluster (say n) from the list of available clusters that is closest to the head of cluster m.
  6. Find the node in cluster m that is closest to the n cluster head, and use that as the next node in the path.
  7. Repeat step 1-6, with cluster n as the source cluster node, until complete.
Arul - verify that the above is correct (you will know for sure) and then try to implement it. If you get stuck on a particular part of the code then please ask for clarification and/or help.

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 4 Sep 2014

Commented:

on 7 Sep 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!