## 3 Methodology
### System Model
#### 3.1.7 Choosing the Neighbor Head Node  
When the power level surpasses a specific threshold, an individualized message, known as a \"welcome\" message, is dispatched to every neighbor head node (NHN) situated within the network domain. By leveraging the strength of the incoming signal, each node adeptly computes its relative distance from the receiver, thus facilitating the formation of tire combinations of varying sizes [18; 19]. Upon reception of this message, the node promptly evaluates its own competition radius, encompassing neighboring nodes, and subsequently generates a comprehensive report to be relayed to the sink. This report encapsulates crucial information, including the node's current expected remaining power, the corrected nearest-neighbor (NN) value, and the unique node identifier. In the context of our proposed NBEER methodology, a node's eligibility to assume the role of an NN is predicated solely upon its possession of greater residual power in comparison to the nodes within its radius or neighbor. In order to engender a heterogeneous composition of clusters, it is imperative that each node undergoes a meticulous process to identify its NHN. Remarkably, nodes endowed with more remaining power within the NBEER framework shoulder more vital responsibilities, imparting a distinct character to the ensuing cluster configuration. Consequently, clusters positioned farther from the sink, which boost heightened residual power, adopt a single-hop topology, and accommodate a greater number of nodes relative to clusters in closer proximity to the sink, which instead employ a multi-hop topology. As the spatial span between sensor nodes and sinks widens, sensor nodes blessed with augmented residual energy play a pivotal role in replenishing their respective neural networks. Moreover, it is imperative to exercise caution with nodes possessing diminished remaining power, as their assigned NN values should be reduced to mitigate the risk of premature depletion. The evaluation and representation of the NN parameter constitute indispensable facets within the system's operation and optimization. \[NN=\left[\frac{1-W(X_{Max}-X(Qa-Bs))}{X_{Max}-X_{Min}}-G\left(1-\frac{I_{remaining }}{I_{maximum}}\right)\right]NN^{0} \tag{4}\]  
In the proposed system, the variable \(X(Q_{a},BS)\) denotes the distance between \(Q_{a}\), i.e., a sensor node and the base station (BS). The weights w and g are factors used in the calculations. The value \(NN^{0}\) represents the maximum number of nearest neighbors, NN, considered. The variables \(I_{remaning}\) and \(I_{max}\) represent the remaining power of a node and the maximum energy of the main node, respectively. It is assumed that all nodes possess equal energy levels; \(X_{max}\) and \(X_{min}\) indicate the maximum and minimum distances between the base sink and the sensor nodes. Upon receiving a push notification from a sensor, the system proceeds to select the neighboring master node from the closest nodes. Subsequently, the base station generates a matrix and broadcasts the notification to all sensor nodes within the network. This matrix is then made visible for reference and analysis. Overall, the system incorporates distance calculations, neighbor selection, and matrix broadcasting to facilitate efficient communication and coordination among the sensor nodes and the base station. In our wireless sensor network, let us delve into the intriguing realm of variables and their fascinating roles. Behold, the mystical symbol \(X(Q_{a},BS)\) representing the ethereal distance \(Q_{a}\) between a sensor node and the esteemed base station (BS). As we journey deeper, we encounter w and g, enigmatic factor weights, and witness the emergence of \(NN^{0}\), a symbol denoting the pinnacle of NN's existence. Amidst this symphony of knowledge, we encounter the remaining I, a measure of a node's unwavering power, while \(I_{max}\) shines as the embodiment of energy dwelling within the main node, where all nodes share equal energy blessings. But that is not all!