**3. Proposed system**

Our protocol is an adaptation of Low Energy Adaptive Clustering Hierarchy (LEACH) protocol that offers an improvement in the clustering procedure.

In our adaptation the random clustering of LEACH will be changed with the K-means clustering algorithm. This adaptation have been improve the clustering allocation and cluster features and generate energy efficient clustering to increase the life of WSNs.

The use of the K-means algorithm as a clustering technique for cluster formation ensures perfect clustering and reduces overheads when the CHs reelection.

This section presents the configuration of the proposed LEACH protocol adaptation, which consists of two phases: the initialization phase and the transmission phase. **Figure 4** illustrates the two phases of proposed adaptation.

**183**

**Figure 5.**

**4. Experiments and performance evaluation**

*The proposed adaptation using clustering with k-means method.*

For example, 100 sensor nodes are randomly deployed over a 100 m<sup>2</sup>

CH, so the nodes are all normal type. The **Table 2** shows simulation setting.

interest. The SB is positioned at the coordinates (50 m, 200 m). Initially, there is no

area of

**4.1 Sensor nodes deployment**

*K-Means Efficient Energy Routing Protocol for Maximizing Vitality of WSNs*

tance from k-means distance to choose the CH of each cluster.

1.**The initialization phase:** nodes are randomly distributed in the network area, after the clustering process with the K-means method begins, the choice of k-CH is made in this phase using the maximum energy and the minimum dis-

2.**The transmission phase:** the nodes of each cluster begins sending collected data to their own cluster head CH, after some iteration, (if the CH energy of cluster <=Min Energy), a CH update procedure will begin among the alive nodes belongs to the cluster using the same parameters of choice new CH(Min

distance and Max energy) as the beginning in the initialization phase.

**Figure 5** below illustrates the flowchart of operation of the proposed adaptation.

*DOI: http://dx.doi.org/10.5772/intechopen.96567*

**Figure 4.** *The two phases of the proposed adaptation.*

*Computational Optimization Techniques and Applications*

**182**

**Figure 4.**

*The two phases of the proposed adaptation.*

**3. Proposed system**

*Flowcharts of K-means algorithm.*

**Figure 3.**

the life of WSNs.

Our protocol is an adaptation of Low Energy Adaptive Clustering Hierarchy

In our adaptation the random clustering of LEACH will be changed with the K-means clustering algorithm. This adaptation have been improve the clustering allocation and cluster features and generate energy efficient clustering to increase

The use of the K-means algorithm as a clustering technique for cluster formation

This section presents the configuration of the proposed LEACH protocol adaptation, which consists of two phases: the initialization phase and the transmission

(LEACH) protocol that offers an improvement in the clustering procedure.

ensures perfect clustering and reduces overheads when the CHs reelection.

phase. **Figure 4** illustrates the two phases of proposed adaptation.


**Figure 5** below illustrates the flowchart of operation of the proposed adaptation.

**Figure 5.** *The proposed adaptation using clustering with k-means method.*
