$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
This section describes the developed heterogeneous protocol in this segment. In this technique, the organization partitions the sensor hubs into four logical areas based on a pre-established edge distance. The gateway nodes and base station (BS) are put externally to the detecting field and separately at the network's center point. The hub whose distance from the gateway node is less than the pre-decided distance is allotted to fields 1 and 2. For this situation, the nodes broadcast the data to either the gateway node or the BS using direct communication. These nodes represent the homogeneous nodes. Suppose the internode space is larger than the pre-decided threshold space and nearer to the WR node. In that case, they are located in areas 3 or 4, as represented in Figure 1. These nodes are called heterogeneous hubs. Elections are carried out in the two regions, and their residual energy is employed to select CH. Information from these areas is sent to BS using the multi-hop interaction approach. The CH in Region 3 provides the final report to the gateway nodes and integrates the information before broadcasting it to the BS. The nodes in every area communicate their information with other nodes within their energy limit. When the nodes can't send information, they rest to preserve their energy.
Network model
The definition of the network structure is given in Figure 1. This network is known as G(L, BS, Ho, GW, He)in which the base station is provided as BS, the network gateway is GW, and homogeneous nodes are represented as Ho, heterogeneous nodes are shown as He and the set of communication networks that links the definite nodes (every node which includes BS, Ho, GW, He) are given as L. The features of the network are as follows: (i) As depicted in Figure 1, the network is partitioned into four sub-networks in regions 1, 2, 3, and 4. (ii) A minimum of 1 node in area 4 is associated with a node in area 3. (iii) The WR is connected to the base station in area 2. (iv) Now, the WR and the base station are connected. Every node in area 1 is associated with the BS. (v) Every node in areas three and four is not linked to the BS.
Energy consumption
In this research, the energy utilization technique is as follows: WSNs' nodes are shared randomly and do not have predetermined locations. Based on the interspace between the nodes, communication causes a significant amount of a node's energy to be lost. The two types of information transmission and gathering consume energy. Therefore, the required energy to transmit a data packet with a length of (m) bits over the distance is:
(1)
Where ETX indicates the energy utilized during data transmission of the node, the process of transmitting and receiving one bit of data has an energy dissipation of Eelec, εfs the free-space coefficient of energy dissipation, εmp represents multi-way coefficient technique's energy dissipation, and the transmission space is given as crossover, which is calculated as:
(2)
The energy utilization expected by the receiving node to get a data packet of m -bit is determined as follows:
(3)
The mentioned model can determine the energy that the CH utilizes. The energy used by the CHs fundamentally incorporates three viewpoints: energy utilization of getting data packets of user nodes, associating information, and sending the fused information to the WR. The estimation formula is given as:
(4)
The member nodes count is represented using CMnum, and EDA is the expense required to aggregate 1 bit of data; the packet's length is m. The energy consumed by the non-CH hub is just the energy utilization of transmitting information to the WR, and the numerical formula is given as:
(5)
The following is how the entire residual energy for the rth round is computed:
(6)
Where the entire remaining energy is given as in the round EtohR(r - 1), the count of CHs present in the round is represented as CHnum(r), the Nalive(r) addresses total active nodes in the round of the provided network, ECh (i) represents the energy utilization of ith CH and Enon-CH(j) indicates energy used by the non-CH(j).
Cluster selection
The algorithm utilizes the interspaces calculated from the node to the WR and energy to choose the primary clusters of the system, thereby restricting total CHs in clusters are as follows: According to the ascending fitness score of the SNs, the cluster of active SNs is partitioned into equal subsets of m (where m is the desired cluster count that is equivalent to N/p, N indicates the sensor nodes count and p CHs portion. In every subset, the first cluster head is chosen for the sensor node near the center position. Each node is added to the cluster head closest to it to create the initial cluster based on Euclidean distance. The space between the node, BS, and residual energy determines the node's fitness score.
(7)
Where the weight is given as a1, the primary energy is Ei, residual energy is given as Er, and the space from the node to the WR is shown as dBS. dmaxBS is the maximum inter-space between the SN and the WR, and dMinBS indicates the minimum space between the SN and the WR.
Self-optimized wolf optimizer (SOWO)
The CHs are chosen using the SOWO. In the wolf optimizer, the location of the prey is identified using the average mass of the three wolves (α, β, and δ) as shown in Figure 2. Considering the differentiation among BS and the node and the space between the residual energy, the node's fitness score is regarded as the primary weight of the grey wolf optimization, which is determined using Equation (8). The initial location of the prey is calculated based on Equations (8) to (11) and the optimization technique of SOWO.
(8)
(9)
(10)
(11)
Where the primary mass of the wolves α, β, and δ are ωIα, ωIβ, and ωIδ respectively, the best fitness score for α wolf is Fα, Fβ and Fδ which are computed using Equation 11. The individual nodes equivalent to the three highest fitness scores are α, β, and δ wolves. The developed protocol does not change the weight of the grey wolf optimization because the node's fitness score is changed after one data transmission is completed. To create the worldwide search capacity of the grey wolf optimizer, the loads are actively modified by vectors A and D. Here, A indicates the coefficient vector, and the remoteness from the wolf to its prey is D. Equations (12) and (15) are used to determine A and D. The position of the prey and the load upgrading formula are described as follows: the (t + 1)th iteration:
(12)
(13)
(14)
(15)
Where
specifies locations of the α wolf, β wolf, and δ wolf in the iteration (t+1), these locations
are computed using Equation (15). During the final stage of the iteration, the CH chooses which node is closer to the prey among the present nodes. The task of the CH is more complicated, so the residual energy cannot complete the task, which leads to the termination of the node. So, selecting the node with the maximum remaining energy and being nearer to the prey is essential. The node's remaining energy and the remoteness from the node to the prey are used as parameters for the fitness score used to choose the CH. The node with a lesser fitness score is identified as the cluster head. The function used to calculate the fitness value is given as:
(16)
Where weight is given as a2, node's remaining energy is represented as Ex, Emax is the maximum residual energy, and Emin is the minimal energy remaining in the cluster nodes. The distance between the prey and the node is dp, dMaxp is the maximum space between the detecting node and the prey, and dMinp is the minimum space between the SN and the prey.
Self-optimization wolf agent
Software agents monitor and manage the network sizes and node gateways. The software agents replace traditional clients and servers, which differ in local communication strategy and code mobility. Monitoring is a crucial factor in understanding management systems. Due to this significance, software agent technology was suggested to monitor node gateways within the network mesh. In addition to monitoring, it is the responsibility of the agents to update the list of network nodes. This data is essential because of the network size, so the self-configuration process can dynamically configure the routing protocol parameters. In the context of this work, these are the most desirable characteristics among many found in the behavior of software agents. Wireless agents are installed at the client node associations of a mesh router and the router itself. In identifying the network density, the agent performs particular tasks on small, standard, and large scales. The scores for the three scales (small, standard, and large) are represented. The agents shape the premise of the auto-design capacity of the proposed protocols. These agents take responsibility for the network behavior verification, along with the throughput, data packet loss ratio, interruption, throughput, idleness, dynamic and dormant hubs, and data about the connection. Network agents are stable at the mesh routers and provide the proposed protocols' self-optimization capability. Self-association emerges in network remote organizations by implanting self-x capacities (optimization, setup, fix, and security19) in the routing protocol. These capabilities enable routing protocols to be autonomous, improving network performance, failure tolerance, and protection. The following is a description of the execution of the mentioned capabilities, with an emphasis on self-configuration and self-optimization. Notably, self-functions have been executed in network layers as extensions of standard services for routing protocols (Supplementary File 1).
Cluster set (CS)
CS is a collection of multiple clusters in a network, and the clustering algorithm allows for dividing a network into various clusters. In this research, the first chosen clusters are called the first CS, considered the present ideal CS, and the present perfect CS's objective function score is computed. Modified Grey Wolf Optimizer (MGWO) can arbitrarily modify all the clusters in the present perfect CS to produce another cluster, and a majority of the newly formed clusters frame another CS; again, the objective function score of the latest CS is determined. When the objective function score of the present optimal cluster is greater than that of the newest cluster, the newly determined cluster is taken as the present ideal CS. The perfect CS is framed toward the termination's final stage. The objective function is described as:
(17)
Where weight is represented as a3, the sum of the space between the clusters in the CS is given as dTCH and the entire remoteness between the CH and the WR is shown as dTBS. The cluster and communication distance between the CH and the BS are the foundation for remote monitoring and target tracking design. If the objective function score is lower, then it demonstrates that the cluster head determination is more sensible, the CH is ideal in the cluster, and the cluster headset is perfect compared with the entire network. Algorithm 2 (Supplementary File 2) describes the SOWO pseudocode.