Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/core/open_close_dbase_connection.php on line 0

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/clustering-for-wireless-networks/index.php(0) : eval()'d code on line 22

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/clustering-for-wireless-networks/index.php(0) : eval()'d code on line 35

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/get_ad_type_position.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/load_ads.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/sponsor_found.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/load_links.php on line 0

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/clustering-for-wireless-networks/index.php(0) : eval()'d code on line 161

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/clustering-for-wireless-networks/index.php(0) : eval()'d code on line 164

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/clustering-for-wireless-networks/index.php(0) : eval()'d code on line 167
data structure for ace
projectus.freehost7.com:UG and PG level projects,mini projects and many more here ...



Data structures for implementation of ACE

In MATLAB each element of the array is a structure with several fields.The fields can be added one at a time or an entire element can be added with a single statement. Structures can be declared using the struct command. Structures can be declared as needed and so can the fields.

Structure of Node:

In ACE implementation, we have defined node as a global to make it available to all the functions declaring global. To distinguish each node form other nodes we need to generate identity number (ID) for each node, coordinates of each node to locate their position and their states to find out their status of unclustered, clustered, and cluster-head. Node IDs are stored in MATLAB arrays as shown below.

global node;

node=struct('ID',-1,'state','','membership','','x_coord',-1,'y_coord',-1);

Node has the struct array with fields:

ID: The Identity number is generated for each node to distinguish from other nodes and their coordinates (X_coord, Y_coord) are required to locate their position.

State: The nodes have three possible states: clustered, unclustered and cluster head. A cluster is the follower of one or more clusters and unclustered is not a follower of any cluster where as cluster head is leader of cluster. The state is to find out the status of the each node. Initially, all nodes are in unclustered state.

Membership: The node can be follower of more than one cluster but can pick a single cluster when protocol is running to form a membership only at the end of protocol.

X_coord: The X_coord coordinate locate the position of X_coord node and populate the array to generate random x coordinate for node.

Y_coord: The Y_coord coordinate locate the position of Y_coord node and populate the array to generate random y coordinate for node.

 

Structure of cluster

Clustering of wireless sensor nodes that are randomly spread over an area will result in several numbers of clusters whose size will depend on the communication distance and the density of sensor nodes. The structure of a cluster is as shown below:

global cluster_id_global; cluster_id_global=struct('clusterID','');

cluster = struct('clusterID','','clusterHead',-1,'cluster_members',-1);

Cluster has the struct array with fields:

Cluster ID

ClusterHead

Cluster members

 

Cluster ID: To distinguish each cluster from other clusters unique cluster id is generated. Any number of clusters can be generated with unique cluster ID for each cluster.

Cluster member: A cluster consists of a single node as cluster head also called as cluster leader and a number of nodes as followers. The nodes that are cluster followers are usually called as cluster members.

Each cluster comprise of a single cluster head and a several cluster member. The formation of cluster is purely based on self-elective process. Each cluster head will periodically POLL its followers to determine the best candidate to become the cluster head. The node that would have the greatest number of nodes as followers will be the best candidate for cluster head.