An Accurate Anchor-Free Contextual Received Signal Strength Approach Localization in a Wireless Sensor Network

Sensor localization remains a crucial function within the context of wireless sensor networks (WSNs) and is a delicate concern that has attracted many researchers’ attention. Undoubtedly, a good distance estimation between different wireless sensors allows us to estimate their accurate locations in the network well. In this article, we present a simple but very effective anchor-free localization scheme for wireless sensor networks called the contextual received signal strength approach (CRSSA) localization scheme. We use the received signal strength (RSS) values and the contextual network connectivity within an anchor-free WSN. We present and thoroughly analyze a novel joint estimation methodology for determining the range, path loss exponent (PLE), and inter-node distances in a composite fading model that addresses small-scale multipath fading and large-scale path loss shadowing effects. We formulate analytical expressions for key parameters, the node’s communication range and the PLE value, as functions of the sensor’s number, the network’s connectivity, and the network density. Once these parameters are estimated, we estimate the inter-node distances and the positions of nodes, with relatively high accuracy, based on the assumed propagation model in a two-dimensional anchor-free WSN. The effectiveness of the CRSSA is evaluated through extensive simulations assuring its estimation accuracy in anchor-free localization.


Introduction
Wireless sensor networks (WSNs) are a fundamental component in a wide range of applications, including environmental monitoring, object tracking, logistics management, and industrial operations [1].These networks consist of small, cost-effective sensor nodes that communicate wirelessly, and the precise localization of these nodes within the network is essential for their effective operation.These networks, comprising small, cost-effective sensor nodes, may require precise localization for effective operation.A review published in [2] exposed location-aware schemes, as well as parameters affecting the performance of localization during the past few years.Within the realm of WSN localization, techniques are broadly categorized into two main types: anchor-based and anchor-free methods.Anchorbased methods rely on nodes with known positions to assist in the localization process, offering high accuracy but often at the cost of reduced flexibility and increased operational expenses.In contrast, anchor-free methods, which do not depend on predefined anchor positions, offer greater flexibility and scalability, making them increasingly popular in dynamic and large-scale deployment scenarios [3][4][5].
Traditionally, localization has often relied on anchor nodes with known positions.Although these algorithms have high localization accuracy, anchors introduce limitations in deployment flexibility and incur higher operational costs.Consequently, there is a growing interest in developing and refining anchor-free algorithms, which promise a flexible structure and reduced cost.Our research directly addresses the challenges and opportunities in anchor-free localization within WSNs [6,7].In our endeavor, we introduce the "contextual received signal strength approach" (CRSSA), an innovative method leveraging the widely utilized received signal strength (RSS) metric, compatible with a broad range of commercially available sensors.This universality is a key strength, enabling diverse sensors to efficiently process RSS data extracted from standard received communication packets.Although RSS-based localization is celebrated for its simplicity and widespread applicability, it grapples with accuracy challenges stemming from the complexities and unpredictability of signal propagation, especially in industrial environments.Our previous work in developing CRSSA for one-dimensional (1D) environments showed promising results [8]; however, the problem was confined to a basic linear context or string topology.In this article, the primary research question that we address is whether extending CRSSA to two-dimensional (2D) WSNs maintains its precision and avoids divergence.Moving beyond the linear limitations of the 1D context, we aim to explore the capabilities of CRSSA in the more complex and spatially diverse 2D environments, ensuring that the transition to a higher dimensional space does not compromise the method's accuracy or lead to algorithmic instability.By thoroughly investigating signal behavior complexities, including multipath effects and environmental interference, we strive to affirm the robustness and reliability of the CRSSA for diverse and demanding conditions in industrial WSN applications [6,7].
Our research encompasses a comprehensive simulation evaluation, designed to rigorously evaluate the CRSSA in a 2D setting.We compare the performance of the 2D-extended CRSSA against established anchor-free algorithms, with a focus on determining whether the shift to 2D preserves the accuracy and stability observed in 1D environments.Special emphasis is placed on evaluating the precision of inter-node distance estimation, a critical factor in assessing the effectiveness of any localization method.The forthcoming sections will thoroughly explore the theoretical underpinnings of the 2D CRSSA, delve into the intricate signal propagation challenges in 2D environments, and present detailed results from simulations.These insights will culminate in a discussion on the practical implications of the findings, particularly how the 2D CRSSA could be implemented in real-world wireless sensor networks, addressing the unique challenges that they present.

Anchor-Free Localization
In the field of anchor-free localization within WSNs, several techniques and algorithms have been proposed.Youssef et al. [9] introduced a clustering-based approach, dividing the network into clusters, each with its gateway node responsible for generating a local relative map.These local maps are then combined to obtain the global network layout.However, it is worth noting that managing these clusters can introduce significant complexity into the localization process.Arbula et al. [10] also employed clustering but in a distributed manner, initially localizing clusters and then integrating them together to achieve networkwide localization.While cluster-based approaches offer advantages in certain scenarios, they frequently require intricate coordination and management, adding to the overall complexity of the localization system.The work in [11] took advantage of the sensor clustering approach to organize the network topology and the triangle test method to determine cluster heads.A local coordinate system was formed within each cluster, and a fusion algorithm was proposed to unify all clusters into a uniform coordinate system.In the work referenced as [12], Wang et al. introduced a distributed cluster-based anchor-free node localization algorithm by employing a clustering approach for single-hop nodes and the time of arrival (ToA) technique to estimate inter-node distances.Then, a cluster synchronization was employed, where all nodes within a cluster are harmonized, and local coordinates are determined based on angle and distance information.The final step was the global localization phase.The most recent work in [13] presented an efficient anchor-free algorithm (EAFLA), which grouped nodes into one-hop clusters and estimated distances between nodes within each cluster using RSS.For nodes not within one hop, the Kleincrock model [14] and Al-Kashi's theorem (cosine law) were used to derive the positions of sensors in the network.In contrast, our CRSSA streamlines the localization process by avoiding the complexities associated with clustering.Utilizing contextual connectivity information alongside the readily available RSS metric, the CRSSA aims to achieve precise localization without the overhead of managing multiple clusters or gateway nodes, thereby simplifying operations and reducing costs.
The authors in [15] proposed a range-based anchor-free approach, where distances between all pairs of sensors within communication range were known, while distances beyond this range were considered unknown.Contrasting with this approach, the CRSSA operates on the principle that no distances are pre-known, even among proximate sensors.This challenges the traditional reliance on pre-established distances within communication range, as seen in [15].An anchor-free localization approach was introduced in [16], utilizing a single node as a global reference position.This node sends a special active packet through the network, and when received by a sensor, the sensor would calculate the angle and distance to the node.However, this approach required all sensors to be equipped with angle-measuring devices.The authors in [6] proposed the ladder diffusion node localization algorithm (LDLA) anchor-free localization algorithm, in which each sensor calculated its relative position with the sink node.Activation packets were broadcast by the sink node, and when received, a sensor would relay them using the ladder diffusion method.This allowed sensors to adjust their coordinate systems based on received packets from source nodes and neighbor node positions, but this method also shared the same limitation of requiring angle-measuring devices for effective localization.The work in [7] presented a method that achieved positioning through beacon data interaction between a rotating antenna on the base station and sensor nodes.The sensors determined their positions based on the vertical elevation angle of the antenna, the horizontal rotation angle, and distance information from the node to the base station antenna.In comparison, the CRSSA approach diverges significantly by being designed to work with the inherent capabilities of almost all commercial sensors, eliminating the need for specialized hardware.This adaptability makes the CRSSA not only more cost-effective but also more versatile, as it can be implemented in a wider range of environments without the need for complex setups or additional equipment.
In [17], the authors utilized the LDLA approach and introduced the sunflower algorithm (SFO) for implementing range-free anchor-free localization in WSNs using distance vector-hop (Dv-Hop) and considering the distance vector routing protocol.This method adopted a radio channel model based on free space attenuation, a simplification that may not align with the complexities of real-world signal propagation in various environments.While this approach provides a basic framework, it potentially overlooks the nuanced signal behaviors often encountered in environments with physical obstructions or interference.CRSSA diverges from this conventional one, adopting a more realistic view of signal propagation behavior in WSN environments.CRSSA enhances the accuracy and reliability of localization, adapting to the diverse and dynamic nature of signal interactions.This adaptability is particularly crucial in real-world applications where signal propagation can be unpredictable and complex.Table 1 summarizes anchor-free localization studies as well as used techniques and approaches.
In localization techniques utilizing RSS, it is essential to consider the precision and variability of the signal across different fading models.However, the majority of localization studies in WSN assume a propagation model where the received power is related to distance by a path loss model with zero-mean Gaussian noise, such as in [18][19][20].An anchor free algorithm for one-hop nodes is proposed in [21], where it computes the inter-node distances based on RSS and the centroid techniques.The nodes are then located by using the average of the inter-node distances.However, this algorithm does not provide highly accurate position estimates, especially in situations with a high degree of measurement noise or non-line-of-sight conditions, and it does not take into account signal propagation characteristics.An anchor-based hybrid localization algorithm in the absence of knowledge of the transmit power and PLE value is presented in [18]; these parameters are estimated using a Kalman filter, and an unknown node is localized based on RSS/AOA (angle of arrival) information.The authors in [19] proposed a method that utilized the RSS value at the unknown node and the most valuable player algorithm to localize it in the grid system.Also, in [20], the authors proposed anchor-based range-free algorithms based on RSS measurements, namely support vector regression (SVR) and SVR + Kalman filter (KF).On the other hand, many studies, including [22,23], emphasize the importance of accurate signal propagation models in wireless communication systems, especially when accounting for phenomena like multi-path fading and shadowing effects.Traditional models like the lognormal distribution for large-scale shadowing effects [24] and the gamma distribution as an alternative [25] have their limitations.In realistic environments, where these phenomena coexist, a composite fading distribution becomes necessary.For our CRSSA method, we have utilized the Nakagami-m model, as detailed in [26][27][28].This model is particularly effective in capturing the variability of signal fading in diverse environmental conditions.Employing the Nakagami-m model enhances the adaptability and accuracy of the CRSSA, ensuring its effectiveness across a range of WSN scenarios and solidifying it as a robust solution for the complexities of real-world signal propagation.

Issue/Paper
Technique and Approach Youssef et al., 2005 [9] In order to obtain the global network layout, the authors proposed an anchor-free clustering-based approach to generate local maps that are then combined together.

Propagation Models Relevance
In the context of localization techniques utilizing RSS, it is crucial to consider the precision and variability of the signal at both small and large scales of fading models.Failure to consider these factors can lead to misleading performance assessments on the relevance of any proposed localization solution based on using RSS.Many studies have highlighted the significance of accurate signal propagation models in wireless communication systems, considering phenomena such as multi-path fading and shadowing effects [22].
The lognormal distribution has been traditionally used to represent large-scale shadowing effects [24], but it often appears inflexible due to its relatively inconvenient algebraic representation.In fact, it involves parameters and assumptions that may not always accurately capture the complexity of real-world scenarios, such as variations that can occur in the large-scale shadowing effects in different environments.Therefore, the conditions and assumptions of the lognormal distribution might not hold in practice, leading to a less flexible model, adaptable to changes in environmental conditions or other factors that can influence large-scale shadowing effects.Hence, the gamma distribution has been largely used as a substitute for lognormal distribution [25].Nevertheless, in a realistic environment, they happen simultaneously; therefore, composite fading distribution is commonly required in wireless communication modeling.However, even if Nakagami-gamma (generalized K) and Nakagami-inverse Gaussian (NiG) approaches model simply the shadowed fading, neither of them endures the match over the whole range of fading and shadowing values [24].Recent studies and analyses presented in the literature show that the composite Nakagami-lognormal (NL) distribution proposed in [26] to obtain the outage probability has been widely employed to model the mixture of small-scale fading and shadowing, and it fits in more measurement campaigns than the other distributions [27,28].

Assumptions
In developing the CRSSA for WSNs, our methodology is predicated on a set of foundational assumptions.These assumptions are designed to mirror realistic deployment scenarios and signal propagation behavior in WSN environments, ensuring that our approach is both practically relevant and scientifically rigorous.Key  Ensuring Comprehensive Network Connectivity: In our model, we assume that the network is fully connected without any disconnected sub-networks, which is crucial for the effective functioning of the CRSSA method.This complete connectivity is essential for preventing information isolation and ensuring that data can flow seamlessly throughout the entire network.To ascertain and maintain this level of network integrity, we utilize Dijkstra's theorem in our simulations.This helps in identifying the most efficient paths and avoiding scenarios where parts of the network become isolated, thereby safeguarding the reliability and effectiveness of the localization process across the entire network.
These assumptions form the backbone of our approach, allowing us to develop and evaluate the CRSSA in a controlled yet realistic manner, simulating conditions representative of typical WSN applications.

Propagation Model
The communication between two sensors is hence assumed to be affected by both shadowing and small-scale fading resulting from obstructions and multi-path propagation, respectively [28].In function of the transmitting power, P t , the received power at distance d is well known [29] and expressed as Antenna gains are included in PL(d), the path loss at distance d, defined as follows: where PL(d 0 ) is the free space path loss calculated at d 0 , the close-in reference distance, γ is the path loss exponent, (2 ≤ γ ≤ 6), and X is the composite when fading and shadowing affect the signal simultaneously, known as Nakagami-lognormal fading.Using the properties and theories in [30][31][32], the pdf of the Nakagami-lognormal (NLN) power u is defined by Equation (4.76) in [24], as where m is the shape parameter (m ≥ 1/2), Γ(m) is the gamma function, z is the average power, and f (z) is treated to be lognormal with mean µ and variance σ 2 .

Network Model and Overview
N nodes are randomly uniformly deployed in a 2D square area A such that A >> πR 2 , where R is the communication range of each node.We assume a fully connected network, i.e., no node is isolated.Figure 1 illustrates an example of a sensor network where N nodes are randomly deployed in a 2D square area.The regular nodes, depicted as blue dots, and a sink node depicted as red square.Unknown nodes are interconnected by dashed lines representing direct or 'one-hop' connections between two neighboring nodes at a particular instant, underscoring the localized structure of the network at that precise moment.This figure challenges traditional models that typically portray coverage areas as well-defined circles with a fixed radius.Instead, it adopts a more realistic approach by acknowledging the variability and irregularities in signal propagation pertinent to sensor networks.This approach more accurately captures the real-world environmental and spatial challenges faced by sensor networks.As a result, the figure not only depicts standard coverage areas but also those under disturbance, shown in cyan, illustrating the complexities and nuances of data transmission and signal propagation in specific sensor network scenarios.

Connectivity
Two nodes (i and j) are neighbors at one hop if they are connected; hence, C ij is a random variable presenting the connectivity context information defined as where i = {1, • • • , N}, j = {1, • • • , N}, and j ̸ = i.P threshold is the power detection threshold, and d is the distance separating i and j.The global connectivity context information matrix CI is then defined as CI = [C ij ] N×N . (5)

Analysis from Spatial Data
A complete spatial randomness (csr) is synonymous with a homogeneous Poisson process in R d .("This process has the property that, conditional on N(A).The number of events in a bounded region A ⊂ R d , the events of the process are independently and uniformly distributed over A. That is, given N(A) = n, the ordered n tuple of events (s 1 , ..., [33] (p.586).Distances may be measured between sample and nearest events.For a completely spatial process, i.e., a homogeneous Poisson process, the distribution theory for nearest neighbor distances is well known [34], where the density of the positive random variable W in R 2 is Theoretical calculations show that, under csr in R 2 , the probability G(r) that the distance from a chosen event to its nearest event is less than or equal to r can be expressed by where λ is the intensity of the homogeneous point process.For the homogeneous Poisson process, the probability that there are no events within distance x for an arbitrary point is e (−λπx 2 ) .Hence, the distribution function of the point to the nearest event distance is 1 − e (−λπx 2 ) , x > 0.

From Spatial Data to WSN
Applying this analysis from spatial data, in a sensor network, the random point is the random node (sensor) [35].Thus, the pdf of the distance, β > 0, of a node to its nearest neighbor is Moreover, the probability that this distance is less than or equal to the communication range R is then expressed as (i) In a one-dimensional case N nodes are randomly uniformly deployed on a distance d max = [0, x max ].Let v be the number of nodes located in an interval [x 1 , x 2 ] with a probability p = x 2 −x 1 d max [35].Let ξ be a random variable denoting the number of nodes in a defined interval.Therefore, the probability that v of N are placed with [x 1 , x 2 ] is for N >> 1 and (x 2 −x 1 ) d max << 1, this solution can be approximated with a Poisson distribution, with p = x 2 −x 1 d max , and keeping the density λ = N d max constant: Thus, the probability that a node has v neighbors within its communication range R, is the same as the probability in Equation ( 11), but the distance interval is on 2R such as (ii) In two-dimensional deployment N nodes are deployed randomly on surface A, providing a realistic representation of random node placement in practical scenarios.Under this assumption, the average number of nodes per unit area is denoted by λ = N/A.This allows us to compute the probability P(ξ = v) that any subset of v nodes from the total N nodes falls within a specific sub-area A 0 of the system plane A, delimited by the communication range R of a node, with A 0 = πR 2 ; hence, analogously to (11), P(ξ = v) is obtained as (13)

Probabilistic Approach in Interpreting RSS
In our examination of the network's connectivity, we consider R to represent the average effective communication radius, assuming a homogeneous propagation environment.This radius is crucial for estimating the area Ā within which a typical sensor node can communicate, calculated as the area of a circle, Ā = π R2 .This average range is pivotal in our probabilistic approach for interpreting the RSS values.The expected average number of neighbors falling within a radius R around a given node is described as Acknowledging R as an average range allows us to probabilistically interpret the RSS data from sensors, providing a basis for inferring the likelihood of node connectivity within this range.This average range, and the area that it defines, become key in localizing nodes and optimizing the performance of the CRSSA method in a WSN setting to find the number of adjacent or one-hop neighbors for each node, which is pivotal for deducing its communication range.
This calculation represents the expected count of adjacent neighbors for any given node i, providing an assessment of the network's connectivity.On the other hand, the number of connected neighbors, n i , to node i = 1, • • • , N, can be obtained from the connectivity context data as Further, the average number of adjacent neighbors per node is derived by the connectivity matrix considering the individual communication ranges, which may vary due to environmental dynamics but are averaged out across the network: By leveraging the connectivity matrix, we can accurately determine the average number of connected neighbors for each node, thereby enabling a detailed analysis of network density and communication coverage.This level of specificity is crucial for the effective implementation of the CRSSA method as it directly impacts the localization accuracy within the WSN.

• Range Estimation, R
The values in Equations ( 14) and ( 16) are equivalent; hence, based on these equations, the average range R is estimated as • PLE Estimation Theoretical and measured-based propagation models indicate that average received signal power decreases logarithmically with distance [29].Hence, based on the logdistance path loss model, and assuming the estimated average communication range obtained in Equation ( 17) as the maximal distance reached by a transmitted signal when the received power measured at this node is equal to the power detection threshold P threshold , the PLE, γ, can be estimated as γ = −P threshold + PL(d 0 ) • Inter-node distance estimation Our proposed approach is an anchor-free solution; thus, it estimates the relative positions with respect to a coordinate system established by a reference group of nodes.Relative positioning information is sufficient for some applications, such as location-aided routing or direction-based routing algorithm [36].Moreover, the recovery of the network's key propagation characteristics and its geometry can be addressed by relative positioning mainly from the connectivity information.
In relative localization, nodes are localized with respect to each other; thus, we estimate the distance separating them.In this work, we will focus on estimating the distance separating two neighbors nodes at one hop.Since the objective is to prove the efficiency of the proposed CRSSA, distances between nodes at more than one hop are beyond the scope of this work and will be addressed in future publications.
Based on the log-distance path loss model, the value of the estimated PLE in Equation ( 18), and the received power value obtained at neighbor node k, Pr ik is the received power at node k, and each node i = 1, • • • , N, estimates its distances separating its connected neighbor nodes, • Localization of nodes To estimate the positions of nodes, we exploit estimated inter-node distances, RSS values, and the sink position.Our approach employs a gradient-based optimization method with weighted residuals, utilizing the RSS values as a key factor in the objec-tive function.Subsequently, we assess the accuracy of the estimated positions through the calculation of the NRMSE.

Flowchart and Algorithm
To summarize the previous discussion, the flowchart in Figure 2, and the neighbor discovery phase, as well as Algorithm 1, to jointly estimate the PLE value, the inter-node distances are presented below.
Deploy N nodes randomly in a XY plane.Calculate the number of neighbors of node i, n i ← using (15)

START
8 end 9 Derive the average number of adjacent neighbors n ← using (16) 10 Estimate the mean range R using ( 17) Estimate the inter-node distance between neighbor nodes i and k, dik ← using 13 Estimate the positions of nodes ( xi , ŷi ) using gradient-based optimization method with weighted residuals.

Neighbor Discovery Phase
To build the neighbor connectivity context matrix, each node i(i = 1, • • • , N) has to discover its neighbors by sending through the network a HELLO message containing its identity, a single-bit variable receivedhello equal to 1 if a full HELLO has been received from the neighbor, and a neighbor Set (NeighS), which is updated when a HELLO packet is received from the neighbor.The neighbor connectivity context matrix C ij assigns a value of 0 or 1 for each pair of nodes depending on the neighborhood information.We assume a non-symmetric connectivity context matrix.The value of the matrix is set as follows for each pair of sensors i and j, where If receivedhello is 1 for both sensors i and j, If receivedhello is 1 for sensor i and 0 for sensor j, C ij = 1 and C ji = 0.

3.
If receivedhello is 0 for both sensors i and j, C ij = C ji = 0. Once the packet is successfully received by a node, the NeighS is updated by adding the identity of the node transmitting the HELLO packet.At this step, each node is aware of its neighbors and their numbers.The information concerning each node connectivity context matrix is sent to the sink node in charge of computational operations.After a successful exchange of HELLO packets, nodes can automatically establish adjacency and can start to send and route data between them.After the neighbor discovery phase, the information on global connectivity is used by the sink node to estimate the channel parameters and the inter-node distances.lines show the median of the error.A significant relationship is identified, as shown in Figure 3, between the Nakagami shape parameter m and the localization error.Notably, the results showed that as m increases from 1 to 5, the median localization error progressively decreases from 5.5% to 4% of the range.This improvement aligns with the theory that a higher m indicates a signal less prone to fading, resulting in greater accuracy.However, a key observation is that the most significant changes occur at m = 1, where the model exhibits the most multipath fading.Beyond m = 5, improvements become marginal, with the error slightly increasing to 4.01% for m = 6.This indicates a plateau in performance gains, influenced by other limiting factors such as the path loss exponent or shadowing.Additionally, it is important to note that, for m = 1, the error increases by 1.5% from its ideal level observed at m = 5.

γ: PLE Parameter Variable
In this subsection, the results presented in Figure 4 show the estimation NRMSE by varying the value of γ while m = 4 and σ = 4dB.Similarly, boxplots show the results of 100 runs conducted using the parameters listed in Table 4.They show how the data error is extended, and red lines show the median of the error.Low errors show the approach stability.The interval of NRMSE values ranges between 0.01 and 0.11.Another relationship is identified in this case between the PLE value γ and the localization error.Remarkably, the results showed that as γ increases from 2.5 6, the localization error progressively decreases from 9% to 1% of the range.This enhancement is explained by the fact that smaller PLE values translate into higher average-range values.Thus, the number of neighbors within range, yet at more than a single-hop distance, gets increasingly larger, thus biasing more seriously the estimate in (17).

σ: Lognormal Shadowing Standard Deviation Variable
In this subsection, the impact of varying σ is studied.Simulations parameters are listed in Table 5. Figure 5 presents boxplots illustrating the results of 100 runs.They show how the data error is extended, and red lines show the median of the error.It can be observed that NRMSE values increase with the σ value, without exceeding 0.12 when σ = 6 dB.Correspondingly to intuitive expectations, where σ introduces randomness in the received signal power, the median localization error progressively increases from 2% to 8% of the range.

Node's Number Impact
This approach relies on the network contextual information.The node's number impact study is crucial as it affects the network density, λ.In fact, this latter is a key parameter studied in different WSN applications.Bulusu [38] proposed Equation (22) to calculate λ as where N is the number of nodes in area A, and R is the nominal range of each node.However, the authors in [39] propose a more precise equation as where density is measured in nodes per m 2 .A higher node density introduces less distance between nodes; thus, the impact of this network parameter is crucial in this study since it affects the number of neighbor nodes within a communication range.
The CRSSA is tested with a different number of nodes without changing the deployment area.Boxplots in Figure 6 show the simulation results for different N, by illustrating how errors are extended.Simulation parameters are listed in Table 3.As observed, the maximal NRMSE value does not exceed 0.065 for N = 100.An important observation is drawn from Figure 6: the median localization error denoted by red lines remains stable when varying N, where it changes from 4.1% to 4.2% of the range.Once more, the results indicate a plateau in performance gains and validate the effectiveness of the approach.

Results Comparison
After proving the competence of the CRSSA in different and varying channel parameters and numbers of nodes, we evaluate its performance by comparing the NRMSE against state-ofthe-art anchor-free localization techniques proposed in recent studies, namely, Shah et al. [21], SFO [17], and EAFLA [13].Shah et al. employed a time division multiple access (TDMA) scheduling algorithm, where each node broadcasts a beacon message containing its unique node ID.RSS measurements are then utilized to estimate distances between nodes, and the centroid and average distance are computed for localization.
The SFO technique applied in [17] involves an approach using the DV-Hop algorithm.This technique leverages the principles of SFO to optimize node positions based on hop distances obtained from the DV-Hop algorithm.
The EAFLA proposed in [13] begins by electing cluster heads and forming clusters according to the low-energy adaptive cluster hierarchical (LEACH) protocol.Distances between nodes are then estimated using a combination of the RSS signal transmission model and the Kleinrock and Sylvester model [14].
In Figure 7, we evaluate the NRMSE under specific parameter settings (γ = 3, σ = 4, and m = 4).We present results in blue boxplots.Our proposed approach consistently outperforms existing benchmark methods found in the literature.The NRMSE achieved by our approach falls within an impressive range of [0.03, 0.058].In comparison, errors obtained using the SFO method vary between 0.16 and 0.189, Shah et al.'s approach yields errors within [0.45, 0.1], and errors with the EAFLA range from 0.07 to 0.26.This demonstrates the superior accuracy and precision of our proposed method, consistently achieving lower NRMSE values across the specified parameter configurations when compared to existing state-of-the-art approaches.

Node Localization
In order to localize sensors, we adopt a gradient-based optimization method with weighted residuals, utilizing the RSS values as a key factor in the objective function.Neighbors at one hop of each node are positioned using the estimated inter-node distances.The sink's neighbors are localized based on the known position of the sink, and then the rest of the sensors are positioned.Figure 8 shows that our proposed methodology consistently surpasses other anchor-free localization techniques found in the literature.The NRMSE achieved by our approach falls within a range of [0.02, 0.045].In contrast, errors obtained using the SFO method vary between 0.089 and 0.16, Shah et al.'s approach yields errors within [0.12, 0.18], and errors with the EAFLA range from 0.09 to 0.16.This highlights the superior accuracy and precision of our proposed method, consistently attaining lower NRMSE values.

Discussion
As presented above, we aim through extensive simulations to show the efficiency of our approach by achieving low errors in estimating inter-node distances in a WSN, as well as its stability when varying different propagation parameters in conditions simulating a realistic model.Moreover, our technique outperforms the benchmark anchor-free approach in the same propagation models and same assumptions.
Hence, our anchor-free technique relies on using the contextual network information consisting of connectivity, network density, and node number to overcome any variation in the WSN deployment environment.In other words, our technique adjusts and adapts the estimation of the main unknown parameters, R and γ, by using derived equation functions of propagation model parameters as well as deployed network parameters.After that, R and γ are used in estimating the inter-node distance based on the received power model, allowing us to accurately find the relation between distance and received power without using any extra device or known nodes.Then, the nodes are localized based on the estimated inter-node distances.This will drastically decrease the cost of the WSN since no anchor nodes are needed and the aim is to achieve a relative positioning in some WSN applications.

Conclusions and Future Work
In this paper, we present an anchor-free localization technique in 2D WSN.Analytical expressions for the average communication range, PLE value, and inter-node distances are derived.The introduction of the CRSSA in this article marks a substantial advancement in wireless sensor networks (WSNs), showcasing a novel anchor-free localization technique that leverages RSS and contextual connectivity.This approach sets a new standard in localization accuracy within WSNs, highlighting the study's innovative edge and technical proficiency.The study's robust theoretical framework and comprehensive simulative evaluations are particularly noteworthy, demonstrating the method's effectiveness and superiority in precision compared to existing localization methods like EAFLA.Additionally, the anchor-free nature of the CRSSA emerges as a pivotal development, offering enhanced flexibility and cost-effectiveness in sensor network deployments, which are crucial in the evolving realm of wireless communications.
The potential of the CRSSA in the field of WSNs is underscored by its adaptability and economic efficiency.Future research avenues, such as addressing real-time computational efficiency and undertaking experimental validations in diverse real-world settings, will further cement its practicality and application scope.Integrating the CRSSA with emerging technologies and considering dynamic environments where node mobility is a factor will expand its utility and relevance.
This study, therefore, not only provides a significant contribution to WSN localization techniques but also opens up exciting possibilities for future innovation and practical applications, setting a new benchmark in the field.
among these assumptions are: i.Random 2D Deployment with Unknown Initial Positions: All sensors, unaware of their own positions initially, are randomly deployed across a two-dimensional plane, mirroring diverse real-world deployment scenarios.After deployment, they are assumed to remain stationary.This static nature simplifies the analysis by eliminating the variable of sensor movement, focusing our study on the efficacy of localization under stable conditions.ii.Adoption of Nakagami-Lognormal Model for Real-World Scenarios: The adoption of the composite Nakagami-lognormal (NL) distribution model is pivotal in accurately representing the signal fading and shadowing effects in various environments.
By utilizing this model, the CRSSA effectively adapts to realistic signal propagation scenarios, enhancing the robustness and reliability of the localization process in diverse WSN settings.The composite NL distribution is employed to model the mixture of small-scale fading and shadowing.iii.Varied and Dynamic Communication Range Based on Propagation Model: While each sensor operates within a communication range R, this range is influenced by the specific propagation model in use, particularly the composite NL distribution.This approach acknowledges the variability in signal strength and range due to environmental factors, ensuring a more accurate representation of real-world WSN conditions.iv.Dynamic Communication Ranges: Given the reliance on the composite NL propagation model, the communication ranges between sensors are dynamic, reflecting the variability in signal propagation.This dynamic range adds realism to our model, acknowledging the fluctuating nature of signal strength in different environmental conditions.v.