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

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.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 2일
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

Professor Walter Roberson, Can u give suggestion how to generate random nodes in wireless sensor nodes and how to calculate the number of nodes based on the number of nodes
"and how to calculate the number of nodes based on the number of nodes"
?? You seem to be asking to calculate something in terms of the exact same thing?
"Can u give suggestion how to generate random nodes in wireless sensor nodes"
First you have to decide what properties the random distribution needs to have. Is there a fixed number of nodes per cell? Is there a particular range of number of nodes per cell? Are the cells a fixed shape? Is there a minimum distance between nodes? Is there a maximum distance? When the minimum or maximum distances are being discussed, are they only within that particular node or do they cross-over into other nodes?
One technique that is of use in some situations, is to place points on a regular grid first, and then to start randomly moving them. If you start with positions that fill all of the constraints, and if you only accept a movement if the constraints are still met afterwards, then at the end the constraints would still be met.
Professor, I generated random number of sensor nodes but i dont know how to calculate the number of cluster head for that
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 WSNs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by