# A Novel Security Architecture for WSN-Based Applications in Smart Grid
## 3 Clustering Protocols in WSNs
### Related Work
Then, a node is elected CH if its remaining energy is greater than the average remaining energy for all nodes and it is the nearest one to the gravity center of the region. In [26], the authors proposed a black-hole detection model in WSNs-based applications in SG based on a clustering algorithm. The CHs are selected using trust factors. The trust factors are evaluated as a function of the energy, honesty, intimacy, and trade-off with dropped packets ratio. As consequence, only legitimate nodes are elected CHs. Minimizing energy consumption and enhancing network lifetime was the main goal of [PERSON] et al. [27]. They proposed an improved approach tothe weighted clustering algorithm by adding more specific parameters to the CHS election process, such as the distance between the nodes, remaining energy, and coactivity. The selection of the CHs is based on comparing the received signal strength indication (RSSI) and a predefined threshold. The sensor node that has an RSSI less than the predefined threshold is considered malicious, it is not eligible to be elected CH. Each non-malicious node computes a weight based on the aforementioned parameters, then broadcasts it in the network. The nodes with the highest weight become CH and other nodes are ordinary members of the cluster. In Table 1, we compare the clustering algorithms described above based on the following criteria:  
* Cluster Size: the formed clusters may have an equal or unequal size that relies on the number of nodes in the cluster. In equal size clustering, all clusters have a fixed and predefined size, however, in unequal-size clustering, the clusters have variable sizes [27]. * Heterogeneity of the energy level: the heterogeneity level of WSNs is linked to the energy levels of the nodes. A two-level WSNs contains two energy levels for nodes named advance and normal node. The advance has more energy compared to a normal node [28]. * Heterogeneity: the WSNs are classified as homogeneous or heterogeneous based on the capabilities of the sensor nodes such as power, processing, and storage [29]. * CH selection: the CH can be selected using different parameters: Energy-based or hybrid-based. The selection may also be probabilistic or non-probabilistic. * Routing approach: two approaches of routing are possible: classical routing and optimized routing. In classical routing, the selection of the base nodes is based on a timer function, which leads to irregular traffic flow in various base nodes. Optimized routing approaches are based on optimization algorithms, such as Fuzzy logic (FL), Genetic Algorithm (GA), and PSO [28]. * Clustering control: the control of the clustering in WSNs can be centralized or distributed. In the centralized approach, the sink node controls the clustering and needs global information (e.g., energy level) of the network. Moreover, it is responsible for the selection of the CHs. In a distributed approach, the sensor nodes cooperate to create the clusters [28]. * Inter-Clustering Routing: The sensor nodes and particularly the CH can communicate with the sink node in a single-hop or a multi-hop. In single-hop, the sensor nodes communicate directly with the sink node. However, in multi-hop, the sensor nodes communicate with the sink node via a mediator node in multi-hop routing [28]. * Intra-Clustering Routing: Member nodes can communicate with the CH in a single-hop or a multi-hop. In single-hop, the member nodes communicate directly with the CH, but in multi-hop, the member nodes communicate with it via a mediator node [28].