How to generate user defined sensor network in WSN and cluster head selection

7 views (last 30 days)
I generated sensor network with 500 nodes now my question is user has to define the number of nodes as well as it has to generate the number of cluster head for that particular nodes in WSN.

Accepted Answer

Walter Roberson
Walter Roberson on 2 Apr 2018
You can use input() or questdlg(). If you use questdlg() then remember that you will get a cell array of character vectors and will need to use str2double to get numeric form.
  4 Comments
Ravi Kumar Poluru
Ravi Kumar Poluru on 5 Jul 2018
Professor, I generated random number of sensor nodes but i dont know how to calculate the number of cluster head for that
Walter Roberson
Walter Roberson on 5 Jul 2018
In your situation, how do you distinguish a cluster head from others?
Sometimes cluster heads are decided by dividing the overall area into fixed-position zones, and then finding one cluster head per zone. But there are other techniques for finding cluster heads that involve trying to share the energy use equally, since cluster heads have to transmit and receive more and to longer distances. There is no one "right" method -- which means that you have to define (and document) how you are going to decide which nodes are cluster heads.

Sign in to comment.

More Answers (0)

Categories

Find more on WSNs in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!