# An Optimized Hierarchical Cluster Formation Approach for Management of Smart Cities
## 3 Proposed Approach
### Proposed Protocol (ICSI Description)  
To minimize energy consumption in the cluster formation step, the proposed research introduces an optimized version of the LEACH protocol (ICSI) to extend the durability of the network. ICSI helps in the effective delivery of messages between SNs and CHs with minimum energy and reduced bandwidth consumption using the optimal parameter selection. According to LEACH, as soon as a CH is elected it broadcasts an announcement message and, according to the shortest distance, SNs select their CHs by sending a join request message. However, each CH announces more nodes than it can add to its cluster and receives numerous join request messages from more nodes than it can add. Although each SN can receive many invitations, it can accept only one. These situations are sources of energy consumption in LEACH. Therefore, the critical questions that ICSI tries to answer are listed as follows:  
- Which nodes does each CH have to invite? - Which CH does the SN have to request to join? - For which nodes can the CH accept their joining? According to ICSI, the structure of the cluster may change each round according to the features of the CHs and SNs. These features will contribute to allocating SNs to the most suitable existing clusters. These features represent the factors of selecting optimal CHs and optimizing the cluster size, and they are listed in Table 2.  
The proposed cluster formation method of ICSI assumes that in each round, the WSN is segmented into a group of clusters defined by CHs that are elected by any election model. In the process of ICSI, each node, whether it is a CH or an SN, has a set of periodic tasks. The candidate cluster members (CCM\({}_{i}\)) of any \(CH_{i}\) are those nodes that are in its communication range with distance \(\leq\) d\({}_{0}\). The number of CCMs can serve as an indicator of the density around each CH. For any \(CH_{i}\), the set of candidate members CCM\({}_{i}\) is defined by Equation (8). \[\text{CCM}_{i}=\left\{\text{SN}_{j},\longleftrightarrow\text{d}(i,j)<\text{R}\right\} \tag{8}\]  
where SN\({}_{j}\) is any node in the communication range of CH\({}_{i}\). The required energy of any CH to receive sensed data from one node (\(Ev_{CH_{i}}\)) is derived from Equation (4) using Equation (9):  
\[Ev_{CH_{i}}=\text{E}_{i}^{R}+\text{E}_{i}^{G}+\text{E}_{T_{BS,i}} \tag{9}\]  
The maximum possible number of members of each cluster or the maximum size of a cluster (MCSize) is obtained using the \(RE\) of the CH using Equation (10):  
\[\text{MCSize }(\text{CH}_{i})=\text{int}\left(\left|\frac{RE_{CH_{i}}}{EV_{CH_{ i}}}\right|\right) \tag{10}\]  
Accordingly, the improved cluster formation process is depicted in Figure 1 as follows: \begin{table}
\begin{tabular}{l l l l l} \hline  & **Factor** & \multicolumn{1}{c}{**Meaning**} & **Calculated in** & **Competition** \\ \hline
1. & RE\({}_{\text{SN}}\) and RE\({}_{\text{CH}}\) &
\begin{tabular}{l} Residual energy in SN \\ and CH \\ \end{tabular} & Equations (4)–(7) & 1 st and 2 nd \\ \hline
2. & CEC &
\begin{tabular}{l} Communication \\ energy cost \\ \end{tabular} & Equation (11) & 1 st \\ \hline
3. & Cluster size & \
\begin{tabular}{l} Number of \\ accepted members \\ \end{tabular} &
\begin{tabular}{l} Equations (10) \\ and (12) \\ \end{tabular} & 2 nd \\ \hline
4. & CH density &
\begin{tabular}{l} Number of CH neighbors \\ \end{tabular} & Equation (8) & 2 nd \\ \hline
5. & NPF &
\begin{tabular}{l} Node power factor that can \\ keep CH alive \\ \end{tabular} & Equation (15) & 3 rd \\ \hline \end{tabular}
\end{table} 
Table 2: Optimization factors. Each CH starts the round by sending an invitation message (IM) with its spatial and energy information to each candidate member. The energy information contains the residual energy of the CH and CEC or the total energy needed for communication with the SNi. This research claims that the CEC between any two nodes reflects the effect of all factors that can influence energy consumption (Equation (11)).