## 3 WSN Protocols  
As mentioned previously, WSN are multiple network devices that communicate with each other while signalling to send and receive information. The protocol structure consists of three main parts: location-based routing, hierarchical network routing, and flat network routing [35].  
* Location-based routing In this routing protocol, each node in the network is identified by its location. Location-based routing can be determined by calculating the distance to the closest neighbouring node to ensure the accuracy of the distance. That is conducted using two techniques: the first is to find the coordinate of the neighbouring node, and the second is to use a global position system (GPS) [36; 37; 38]. In all routing protocols, energy is the primary factor to be considered. Therefore, the architectural aspect of location-based routing is that all nodes should change their state from active to sleep mode when there is no activity [37].
* [noitemsep]
* Heretical network routing  
The general idea of this approach is to cluster all the nodes in the network and then choose cluster heads responsible for sending the information to the sink, which saves communication energy and makes Wireless Sensor Networks more scalable [36]. These protocols work depending on two layers: in the first layer, the CH is selected in the network, and in the second layer, routing is performed [37; 38].
* Flat network routing  
In flat network routing, all the nodes in the network have the same rules and responsibilities for collecting the data or communicating with the base station. The nodes work similarly [37; 39], and the base station sends signals to some cluster areas and waits for a response from the nodes located in these clusters to facility-centric characteristics [26; 27; 28].  
In WSN, feature scaling is a critical preprocessing step in implementing machine learning algorithms, particularly in scenarios involving heterogeneous sensor parameters such as energy levels and spatial positions. Whereas the KNN algorithm is employed for clustering and cluster head (CH) selection, feature scaling ensures fair and accurate distance comparisons between nodes. Feature scaling in WSNs includes heterogeneous parameters, fair distance comparisons, and improved clustering efficiency.  
WSN nodes are characterised by diverse parameters, such as spatial positions (coordinates) and energy levels. Spatial positions are typically measured in meters, while energy levels are expressed in joules or nanojoules. Feature scaling ensures that all parameters contribute equally to the distance metric. The method treats each parameter equally by normalising or standardising the data, leading to more balanced and accurate clustering decisions. Without proper scaling, the disparity in the range of values for different parameters can lead to biased results, negatively impacting the clustering process and overall network performance.  
As was mentioned previously, WSN can be defined as a collection of a large number of nodes that are used to sense the environment of the network and are able to communicate between them. This section will analyse the communication and implementation of four types of protocols. Then, the modified version for LEACH, SEP, TEEN, and DEC will be presented and compared with the original protocol.