## 5 Experimental Setup and Results  
In order to obtain a general clustering algorithm, we present a clustering algorithm based on K-medoids. This will reduce energy consumption and increase network lifetime. In our proposed approach, the base station is used to collect data from all nodes that are sensing through cluster head nodes. We first gather data on node positions and residual energy, after which we compute the cluster number \(k\). By computing the mean locations for the central circle and the residual energy, we improve the K-medoids algorithm to shorten the iteration time. To find the cluster head in each iteration, we implement an algorithm, taking three parameters, residual energy, distance from base station and reliability, into account. In our studies, we deployed a 100-node network with the BS at \((50,100)\) and nodes randomly spread between \((100,100)\). The distribution of 100 nodes around the \(100\times 100\) m\({}^{2}\) network is depicted in Figure 3. Each data message is 4000 bits long, and the packet header for every type of packet is 25 bytes long. The channel's bandwidth is set at 1 Mb/s. The optimal value \(k_{opt}\) is used to fix the initial number of clusters, and once nodes begin to die, the number of clusters varies with node density. Greater clusters combine with smaller ones. The base station (BS) is a node with greater computational capabilities along with no energy constraints. It has been observed that irregular/hazardous communication can increase noise level in communication and affect the batteries of sensor nodes. Batteries are directly related to residual energy which will impact the network lifetime. Secondly, noisy data are troublesome and need additional careers. For replacement, distance between the sensors, logic and actuators is very significant. So, we have considered the following fuzzy parameters given in Table 4.  
In order to group all sensor nodes into \(k\) clusters, we employ the K-medoids technique. The K-medoids algorithm, in contrast to the K-means algorithm, represents the cluster head node using a real node rather than a hypothetical mean point. As a result, the partition approach relies on minimizing the distance between the special node and the common node. \[H=\sum_{i=1}^{k}\sum_{x\in C_{i}}dist(x,r_{i}) \tag{10}\]  
where \(C_{i}\) stands for cluster \(i\), and \(x\) is a common node in the cluster \(C_{i}\). \(H\) is the total distance between all representative nodes and common nodes. The primary goal of the K-medoid is to reduce \(H\). Here, we apply the K-medoids algorithm over 100 nodes and divide the entire network into 14 clusters which is based on the value of hyperparameter \(N\). Table 5 shows the 14 cluster heads along with their all-parametric values. It is to be noted that in our experiment there are fourteen cluster heads that can be used as alternatives, and the four criteria are distance from sink, average distance of cluster nodes, reliability of clusters and the residual energy. The distribution of 100 nodes into 14 clusters after applying the K-medoids algorithm is depicted in Figure 4. Now, we plot a box plot which is commonly referred to as a box and whisker plot, a form of chart that is frequently used in explanatory data analysis in descriptive statistics. Box plots use the data's quartiles (or percentiles) and averages to visually depict the distribution of numerical data and skewness of the whole data. Box plots display a dataset minimum score, viz., (i) first quartile (ii), second quartile which is known as median and (iii) third quartile as well as maximum scores in a five-number summary. The minimum score is the result after removing outliers. Twenty-five percent of the scores are below the first quartile value. Half of the scores are higher than or equal to this number, while the other half are lower. We applied the box plot on the co-ordinate of each node to check whether any outlier position of the node is either present or not in the range. Figure 5 shows the analysis of data points for outliers using the box plot.