# A New Centralized Clustering Algorithm for Wireless Sensor Networks
## 3 Proposed Method
### Computation of the Skip Value  
The \(skip\) parameter tries to model the inertia of the network avoiding unnecessary CHs updates. In a previous work [5; 15], we detected that the CHs election process tends to throw the same results from one round to the following one. Thus, it is commonly unnecessary to recompute the CHs. Consequently, we added the \(skip\) parameter to find a trade off between the consumption of the communications and the CHs actualization. When determining the optimal value for the \(skip\) parameter, it is necessary to know the metrics used in wireless sensor networks, which are mainly referred to the lifetime of the network. The most used three parameters checked in the WSN analysis are (i) the round when the first node dies o First Node Dies (\(FND\)), (ii) the round when at least half of the nodes are death or Half Nodes Death (\(HND\)), and (iii) the round when the last node dies or Last Node Dies (\(LND\)). Depending on the application requirements, it will be of interest to favour one of these metrics or all of them. For instance, in the case of medical sensors the first death should be used, because a bad working of the network could imply lost measurements with severe consequences on the health's patient. In other scenarios, like a WSN to measure/control the humidity of a terrain, the first death is not relevant because the WSN usually counts on with redundant sensors. If a high precision is not required, the other two performance metrics could be enough in this kind of application. The computation of the optimal value for the _skip_ parameteris going to be done through simulation. For this, the energy model to simulate data communications follows the first order radio model widely used in the related literature since its proposal in [4]. The model is described with Equations (3)-(5). \[E_{Tx}(l,d)=f(x)= \begin{cases}l\cdot(E_{elec}+E_{fs}\cdot d^{2}),&d\leq d_{0}\\ l\cdot(E_{elec}+E_{mp}\cdot d^{4}),&d>d_{0}\end{cases}  \tag{3}\]  
\[d_{0}=\sqrt{\frac{E_{fs}}{E_{mp}}} \tag{4}\]  
\[E_{Rx}(l)=E_{elec}\cdot l \tag{5}\]  
where:  
* \(l\) is the number of bits of any message. * \(E_{elec}\) the energy consumed in the transmitter or receiver circuitry for one bit. * \(d\) is the distance that any message must cover. * \(E_{fs}\) is the energy consumed by the amplifier in free space model \((d\leq d_{0})\) to get an acceptable bit error rate. * \(E_{mp}\) is the energy consumed by the amplifier in th multi-path (mp) model \((d\leq d_{0})\) to obtain an acceptable bit error rate. When a CH receives data from a contributing node, in addition to the energy spent in receiving the data, the CHs must spend energy in the data aggregation process. Therefore, the amount of energy spent in the reception process of \(l\)-bits is defined by Equation (6) for a CH:  
\[E_{Rx-DA}=(E_{elec}+E_{DA})\cdot l \tag{6}\]  
where \(E_{DA}\) is the energy spent by the processing unit of a CH when aggregating the data received from a contributing node. In a similar way to [4], the configuration values for the first order radio model used in Equations (3)-(6) are summarised in Table 2:  
Two other configuration parameters are shown in Table 3. First, parameter \(k\) (the desired number of nodes to select by the BS) is calculated based on the estimation presented in [4], as it was previously commented in Section 2. Finally, parameter \(RnoCH_{th}\) was set to 20 based on the value of \(p\) and taking into account the amount of nodes in the network. Thus it is assumed that a node should be elected as CH in no more than 20 consecutive rounds (see Equation (2)). In addition the length of the control and the data packets, \(l_{control}\) and \(l_{data}\), are 200 bits and 4000 bits respectively. These are common values in most of the research papers about clustering in WSN. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline \(E_{elec}\) & 50 nJ/bit \\ \(E_{fs}\) & 10 pJ/bit/m2 \\ \(E_{mp}\) & 0.0013 pJ/bit/m4 \\ \(E_{DA}\) & 5 nJ/bit \\ \hline \hline \end{tabular}
\end{table}