Next Article in Journal
Hybrid-Frequency-Aware Mixture-of-Experts Method for CT Metal Artifact Reduction
Next Article in Special Issue
Early Detection of Virtual Machine Failures in Cloud Computing Using Quantum-Enhanced Support Vector Machine
Previous Article in Journal
On Axis-Reversible Rings
Previous Article in Special Issue
Continuous Smartphone Authentication via Multimodal Biometrics and Optimized Ensemble Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Improved Particle Swarm Optimization for Three-Dimensional Indoor Positioning with Ultra-Wideband Communications for LOS/NLOS Channels †

by
Yung-Fa Huang
1,
Tung-Jung Chan
2,*,
Guan-Yi Chen
3 and
Hsing-Wen Wang
4,*
1
Department of Information and Communication Engineering, Chaoyang University of Technology, Taichung 413310, Taiwan
2
Department of Communication Engineering, National Penghu University of Science and Technology, Magong 880011, Taiwan
3
Merry Electronics Co., Ltd., Taichung 408213, Taiwan
4
Department of Business Administration, National Changhua University of Education, Changhua 500208, Taiwan
*
Authors to whom correspondence should be addressed.
This article is a revised and expanded version of a paper entitled “PSO-Optimized Anchor Weighting for NLOS-Resilient UWB Localization in Multipath Indoor Environment,” which was presented at International Conference on Cloud and Network Computing 2025, Fuzhou, China, 6–8 June 2025; pp. 200–211.
Mathematics 2026, 14(3), 493; https://doi.org/10.3390/math14030493
Submission received: 16 December 2025 / Revised: 26 January 2026 / Accepted: 28 January 2026 / Published: 30 January 2026

Abstract

In this study, an improved particle swarm optimization (PSO) algorithm is designed to construct a weighting model for line-of-sight (LOS) and non-line-of-sight (NLOS) channels in an ultra-wideband (UWB) indoor positioning system. In the proposed algorithm, the particle position represents candidate weight vectors, and the fitness function is defined by the 3D positioning error over multiple test points. An optimized weight modeling framework is proposed for a multi-anchor, three-dimensional UWB indoor positioning system under LOS and NLOS channels. First, the three-dimensional positioning problem is formulated as a multilateration model, and the tag coordinates are estimated via a linearized matrix equation solved by the least-squares method, which explicitly links anchor geometry and ranging errors to the positioning accuracy. To evaluate the proposed method, extensive ranging and positioning experiments are conducted in a realistic indoor environment using up to eight anchors with different LOS/NLOS configurations, including dynamic scenarios with varying numbers of NLOS anchors. The results show that, compared with the conventional unweighted multi-anchor scheme, the PSO-based weighting model can reduce the average 3D positioning error by more than 30% in typical LOS-dominant settings and significantly suppress error bursts in severe NLOS conditions. These findings demonstrate that the combination of mathematical modeling, least-squares estimation, and swarm intelligence optimization provides an effective tool for designing intelligent engineering positioning systems in complex indoor environments, which aligns with the development of smart factories and industrial Internet-of-Things (IIoT) applications.

1. Introduction

With the continuous advancement of urbanization, the demand for accurate indoor positioning technologies has increased significantly. Studies have reported that individuals spend the majority of their daily lives within indoor environments, accounting for approximately 70% to 90% of their total time [1]. Consequently, positioning systems have evolved into a fundamental enabling technology that supports a wide range of modern applications. Based on their operating environments, positioning technologies are generally categorized into outdoor and indoor systems. Outdoor positioning is predominantly supported by Global Navigation Satellite Systems (GNSS), such as the Global Positioning System (GPS) and China’s BeiDou Navigation Satellite System, which are extensively utilized in both military and civilian applications. Under open-sky conditions, these systems typically achieve positioning accuracies in the order of 5–10 m [2,3]. However, in indoor environments, satellite signals suffer from severe attenuation, diffraction, and multipath propagation caused by walls, floors, ceilings, and other obstacles, rendering GNSS-based positioning unreliable or ineffective [4]. As a result, conventional outdoor positioning technologies cannot be directly extended to indoor scenarios, necessitating the development of dedicated indoor positioning solutions.
In recent years, the rapid proliferation of smartphones, wearable devices, and smart terminals has led to a dramatic increase in wireless data traffic, thereby imposing stringent requirements on transmission rate, latency, and system reliability. To meet these demands, advanced wireless communication technologies such as fifth-generation mobile communication (5G) and LTE-Advanced (LTE-A) have been introduced, offering enhanced spectral efficiency, higher throughput, and reduced latency [5]. These characteristics make 5G a key enabler for emerging paradigms such as the Internet of Things (IoT) and the Artificial Intelligence of Things (AIoT). The 5G framework integrates multiple innovative technologies, including massive multiple-input–multiple-output (MIMO), ultra-dense network deployment, novel multiple-access schemes, full-spectrum utilization, and software-defined networking (SDN)-based architectures, enabling high-capacity, high-reliability, and low-latency communication services [6]. Beyond communications, these technological advancements also provide new opportunities for wireless positioning. In particular, positioning techniques exploiting millimeter-wave (mmWave) frequencies in 5G systems have attracted considerable attention, as their propagation characteristics are comparable to those of ultra-wideband (UWB) systems.
A wide variety of technologies have been investigated for indoor positioning, including LiDAR [7], Wi-Fi [8], ZigBee [9], Bluetooth [10], radio frequency identification (RFID) [11,12], infrared-based systems, and ultra-wideband (UWB) technology [13,14,15]. Among these approaches, UWB has emerged as a particularly promising solution due to its fine time resolution and strong resistance to multipath interference, enabling centimeter-level positioning accuracy [16]. Such high precision is essential in indoor environments, where even small localization errors may lead to incorrect spatial interpretation or misidentification of room-level positions [17]. Owing to these advantages, UWB is widely regarded as one of the most effective technologies for high-accuracy indoor positioning applications.
As indoor environments become increasingly complex, future positioning systems are expected to evolve from two-dimensional to three-dimensional localization. In scenarios such as multi-story buildings, warehouses, and industrial facilities, planar positioning alone is insufficient to represent actual spatial relationships. Three-dimensional positioning provides a more comprehensive description of objects or human locations by incorporating vertical information, which is particularly important in environments with significant height variations [18]. In this study, UWB technology is employed for indoor localization, and a three-dimensional positioning model is established to estimate spatial coordinates. Experimental results demonstrate that when all anchors and tags operate under line-of-sight (LOS) conditions, positioning errors can be constrained to the centimeter level. However, the presence of even a single anchor under non-line-of-sight (NLOS) conditions can cause a substantial degradation in positioning accuracy. Further experiments using multiple anchors indicate that optimal positioning performance is achieved only when all anchors maintain LOS links.
In practical indoor deployments, it is often unavoidable that some anchors operate under NLOS conditions. Taking into account the requirements of UWB positioning systems, including real-time performance, continuity, robustness to noise, and computational efficiency, particle swarm optimization (PSO) is selected as a suitable and balanced optimization approach [19,20,21,22]. Accordingly, this study adopts PSO instead of alternative metaheuristic algorithms such as the genetic algorithm (GA) [23], firefly algorithm (FA), or social spider optimization (SSO). To mitigate the adverse effects of NLOS conditions on localization accuracy, an improved PSO-based method is proposed to suppress the influence of NLOS measurements. By adaptively adjusting the weightings of multi-anchor ranging information within the PSO framework, the proposed approach effectively reduces NLOS-induced errors in three-dimensional positioning. The results indicate that the proposed method enhances system robustness and improves localization feasibility across diverse and challenging indoor environments.

2. Positioning Methods

2.1. Ultra-Wideband

In specific applications, UWB technology commonly utilizes a frequency range from 3.1 GHz to 10.6 GHz. This broad frequency range provides ample space to transmit large amounts of data and allows signals to convey more information in a shorter period of time. Moreover, a characteristic of UWB signals is their very low transmission power, which helps to minimize interference with other wireless communication devices while maintaining high communication quality and achieving precise time positioning and distance measurement. These features make UWB highly useful in applications requiring high data transmission rates and high precision in positioning, such as indoor positioning systems, IoT devices, and short-range wireless communications [24].

2.1.1. Ultra-Wideband Standards

UWB technology is regulated by a series of international and national standards, which guide its development, application, and management. Among these, the IEEE 802.15.4a/z standard [25], established by the IEEE, focuses on precise positioning and timing for low-power personal area networks, applicable to indoor navigation, asset tracking, and IoT devices. In the United States, the Federal Communications Commission regulates the frequency band usage and transmission power of UWB, limiting it to the 3.1 to 10.6 GHz range to minimize interference with other wireless services [25]. In Europe, standards set by the European Telecommunications Standards Institute define technical requirements and testing methods to ensure the compatibility and performance of UWB devices. Additionally, the International Organization for Standardization and the International Electrotechnical Commission have also established international standards involving UWB technology, aimed at providing a unified global technical framework to promote its international recognition and widespread application. As technology continues to advance, these standards will continually be updated to address new technical challenges and market demands.

2.1.2. DW1000 Chip

DW1000 is a UWB wireless chip developed by Decawave, widely used in indoor positioning and communication systems that require high precision and low power consumption. This chip is based on the IEEE 802.15.4-2011 UWB standard [25] and is specially designed to provide accurate time measurement capabilities, supporting cm-level positioning accuracy. A distinctive feature of the DW1000 chip is its ability to operate across different UWB frequency bands, including the 3.5 GHz to 6.5 GHz range, and it can achieve data transfer rates of up to 10 Mbps upon adjusting the pulse repetition frequency [26,27].

2.1.3. ESP32 UWB Module

This study utilizes the Makerfabs ESP32 UWB module, as shown in Figure 1. Based on the DW1000, it functions like a continuous scanning radar, capable of precisely locking onto another device (referred to as an Anchor) and communicating with it to calculate its position. It employs the ESP32-WROOM/WROVE central processing unit manufactured by Espressif Systems Co., Ltd. (Shanghai, China) and offers a maximum ranging distance of 45 m. Once the device is in proximity to another UWB device, it begins ranging through bi-directional two-way ranging (TWR).

2.2. Line-of-Sight and Non-Line-of-Sight Channels

LOS and NLOS channels are two fundamental conditions in wireless communication systems that affect signal propagation and reception quality. In LOS channels, there is a direct, unobstructed path from the transmitter to the receiver, typically providing the best communication quality and the least signal attenuation. In contrast, in NLOS channels, the signal may encounter various obstacles (such as buildings, trees, or other objects) before reaching the receiver, leading to increased signal attenuation, scattering, diffraction, or reflection, thereby affecting the reliability and accuracy of communication.
The impact of LOS and NLOS channels on UWB indoor positioning systems is significant, mainly reflected in positioning accuracy and reliability. In LOS channels, the UWB signal is transmitted directly from the transmitter to the receiver without any obstacles, typically offering the best positioning accuracy and minimal signal attenuation. On the other hand, in NLOS channels, due to the presence of walls, furniture, or other obstacles that block or reflect the UWB signal, signal attenuation, scattering, and multipath effects occur. These effects often impact the signal’s time of arrival, thus reducing positioning accuracy and increasing positioning errors. Therefore, understanding and addressing these channels are crucial for enhancing the performance of UWB indoor positioning systems. Common technical strategies include using Kalman filters to restore signal variations caused by NLOS channels and deploying multiple receivers to reduce the impact of NLOS channels on the system.

2.3. Ranging Principle

TWR is a technique used in wireless communication to measure the distance between two devices, applicable to wireless systems such as UWB. This method involves two devices alternately sending and receiving signals, thereby calculating the total round-trip time of the signals [28], as shown in Figure 2. In the process of bi-directional two-way ranging, initially, one device (commonly referred to as the transmitter) sends a signal to another device (the receiver). After receiving the signal, the receiver sends another signal back after a certain delay time. When the original transmitter receives this return signal, it can calculate the total time taken for the signal to be sent and received. By multiplying this time by the speed of signal propagation (such as the speed of light), the distance can be calculated.
Bi-directional TWR is a method that uses wireless communication technology to measure the distance between two devices, involving alternating signal transmission and reception between the two devices. In Figure 3, there are two devices, a tag and an anchor, which engage in multiple signal exchanges to calculate the distance between them. The terms t r o u n d A = t 4 t 1 and t r o u n d B = t 3 t 6 represent the signal propagation time—that is, the time it takes for the signal to travel from one device to another. The terms t r e p l y A = t 3 t 2 and t r e p l y B = t 7 t 6 represent the time taken by the anchor to send a response signal after receiving the poll and final signals, respectively. The signal flight time t p r o p can be represented by
t p r o p = t r o u n d A + t r o u n d B t r e p l a y A t r e p l a y B 4
The distance d can then be represented as
d = t p r o p × c
where c represents the speed of light ( 3 × 10 8 m/s). TWR is widely used across various fields due to its ability to provide direct and accurate distance measurements, such as in obstacle detection for autonomous vehicles, 3D imaging, robotic navigation, and interactive entertainment systems.

2.4. Three-Dimensional Spatial Positioning Methods

The proposed localization framework enables three-dimensional positioning using multiple reference anchors. To resolve an unambiguous position in three-dimensional space, a minimum of four anchors with known spatial coordinates is necessary. After obtaining the range measurements between the target tag and the anchors, expressed as ( d i ,   i = 1 ,   2 ,   ,   M ), geometric constraints are formed in space. For the representative case where M = 4 , four distance-based geometric loci are generated, as illustrated in Figure 4. The spatial point that simultaneously satisfies all four constraints is identified as the estimated position of the target tag.
Let the coordinates of the UWB anchor points be represented as A 1 ( x 1 , y 1 , z 1 ), A 2 ( x 2 , y 2 , z 2 ), A 3 ( x 3 , y 3 , z 3 ) … A i ( x i , y i , z i )… A M ( x M , y M , z M ). The coordinates of the tag are represented as (x, y, z). Let d ^ 1 , d ^ 2 ,   d ^ 3 d ^ i represent the i-th estimated distances from the tag to each anchor point. Consider a set of M UWB anchors whose fixed spatial positions are given by A i = ( x i ,   y i ,   z i ) ,   i = 1 ,   2 ,   ,   M . The three-dimensional location of the target node is described by the unknown vector ( x ,   y ,   z ) . Let d i denote the range estimate associated with the signal path between the target and the i-th anchor. These range observations impose distance constraints between the unknown target position and the known anchor coordinates, from which the localization model is constructed as follows:
{ ( x ^ x 1 ) 2 + ( y ^ y 1 ) 2 + ( z ^ z 1 ) 2 = d ^ 1 ( x ^ x 2 ) 2 + ( y ^ y 2 ) 2 + ( z ^ z 2 ) 2 = d ^ 2 ( x ^ x 3 ) 2 + ( y ^ y 3 ) 2 + ( z ^ z 3 ) 2 = d ^ 3 ( x ^ x M ) 2 + ( y ^ y M ) 2 + ( z ^ z M ) 2 = d ^ M
After organizing, a system of linear equations (Equation (4)) can be obtained:
{ 2 x ^ ( x 2 x 1 ) + 2 y ^ ( y 2 y 1 ) + 2 z ^ ( z 2 z 1 ) = d ^ 1 2 d ^ 2 2 + x 2 2 x 1 2 + y 2 2 y 1 2 + z 2 2 z 1 2 2 x ^ ( x 3 x 1 ) + 2 y ^ ( y 3 y 1 ) + 2 z ^ ( z 3 z 1 ) = d ^ 1 2 d ^ 3 2 + x 3 2 x 1 2 + y 3 2 y 1 2 + z 3 2 z 1 2 2 x ^ ( x M x 1 ) + 2 y ^ ( y M y 1 ) + 2 z ^ ( z M z 1 ) = d ^ 1 2 d ^ M 2 + x M 2 x 1 2 + y M 2 y 1 2 + z M 2 z 1 2
Then, by organizing the aforementioned equations and utilizing matrix calculations, the three-dimensional coordinates of the tag can be obtained as follows:
X b ^ = w ,
where
X = [ 2 ( x 2 x 1 ) 2 ( y 2 y 1 ) 2 ( z 2 z 1 ) 2 ( x 3 x 1 ) 2 ( y 3 y 1 ) 2 ( z 3 z 1 ) 2 ( x M x 1 ) 2 ( y M y 1 ) 2 ( z M z 1 ) ] ,
b ^ = [ x ^ y   ^ z ^ ] ,
and
w = [ d ^ 1 2 d ^ 2 2 + x 2 2 + y 2 2 + z 2 2 x 1 2 y 1 2 z 1 2 d ^ 1 2 d ^ 3 2 + x 3 2 + y 3 2 + z 3 2 x 1 2 y 1 2 z 1 2 d ^ 1 2 d ^ M 2 + x M 2 + y M 2 + z M 2 x 1 2 y 1 2 z 1 2 ] .
Through the operation of the matrices, the coordinates of the point to be located ( x ^ ,   y ^ ,   z ^ ) are determined by solving for the matrix b ^ . If the inverse of matrix X T X exists, solving Equation (5) yields
X T X × b ^ = X T × w .
The result can be organized as follows:
( X T X ) 1 × X T X × b ^ = ( X T X ) 1 × X T × w
where the transpose of matrix X is presented as X T . The coordinates of the tags can be determined as follows:
b ^   = [ x ^ y ^ z ^ ] =   ( X T X ) 1 X T w

2.5. Particle Swarm Optimization

PSO is a representative swarm-based optimization technique originally introduced by Kennedy and Eberhart in 1995 [30,31]. The algorithm is motivated by observations of collective search behaviors in natural groups, such as bird flocks, where individuals exploit both self-acquired knowledge and information exchanged within the group to reach favorable locations.
In PSO, the optimization problem is explored within a d -dimensional search space populated by n candidate solutions, referred to as particles. Each particle corresponds to a potential solution, whose state is described by a position vector X i d = ( x i 1 , x i 2 , ,   x i d ) and an associated velocity vector V i d = ( v i 1 ,   v i 2 ,   ,   v i d ) .
During the iterative search process, particles evaluate their fitness values to record two key reference states: the best position previously attained by the particle itself, denoted as X i d , p b e s t ( x i 1 ,   x i 2 ,   ,   x i d ) , and the best position discovered by the entire swarm, denoted as X i d , g b e s t ( x 1 , g b e s t , x 2 , g b e s t , , x d , g b e s t ) . The search dynamics of PSO are governed by the balance between individual learning and social cooperation. Specifically, particle trajectories are adjusted according to both the particle’s own historical best experience and the collective knowledge of the swarm. Under this mechanism, particle velocities are updated as follows:
V i d k + 1 = w ( k ) V i d k + 1 + r 1 c 1 ( X i d , p b e s t k X i d k ) + r 2 c 2 ( X i d , g b e s t k X i d k ) ,
where k denotes the iteration index. The coefficients c 1 and c 2 represent the cognitive and social learning parameters, respectively, while r 1 and r 2 are independent random variables uniformly distributed in the interval [ 0 , 1 ] , introducing stochastic diversity into the search behavior. The inertia weight w ( k ) controls the influence of the previous velocity and is employed in this study to suppress excessive velocity growth and enhance algorithmic stability.
To regulate the exploration trade-off, a linearly decreasing inertia strategy is adopted, given by
w ( k ) = w m a x w m a x w m i n k m a x × k ,
where w m a x     and w m i n denote the upper and lower bounds of the inertia weight, respectively, and k m a x is the predefined maximum number of iterations. This adaptive adjustment encourages extensive global exploration in early iterations and progressively emphasizes local refinement as convergence proceeds.
Finally, particle positions are updated according to
X i d k + 1 = X i d k + V i d k + 1 ,
thus completing one iteration of the PSO search process.

3. Multi-Anchor Indoor Positioning Experiments

To enhance the accuracy of UWB indoor positioning technology in three-dimensional space, this study employs a multi-anchor system for positioning experiments. This section provides a detailed introduction to the experimental setup, including the detailed layout of the experimental environment, the equipment used, and the technical parameters, as well as each step of the experimental process. Additionally, this section analyzes the experimental data to explore the specific impact of multi-anchor configurations on improving the precision of UWB indoor positioning.

3.1. Ranging Experiments

This ranging experiment utilized one anchor and one tag, testing at five different distances between the anchor and the tag (100 cm, 200 cm, 300 cm, 400 cm, 500 cm). To minimize the impact of angles on the ranging results, the measurements were conducted face-to-face between the anchor and the tag. Each testing point underwent 1000 measurements, and the results are shown in Figure 5. In Figure 5, the error values for distances of 100 cm to 500 cm between the anchor and the tag are −8.2, 4, −4.1, 3, and 1.3 cm, respectively.
Figure 6 shows the probability density function (PDF) plots of ranging error value distributions for each test distance in the ranging experiment. The width of the distribution reflects the variance characteristics of the errors. The standard deviation distributions at 500 cm and 400 cm are wider, indicating greater variability in errors at these distances. The standard deviation distribution at 100 cm is narrower, indicating less error variability.
Figure 7 presents the distribution of ranging errors under LOS and NLOS conditions at different distances. In the figure, the solid line represents the error distribution under LOS conditions, while the dashed line represents the error distribution under NLOS conditions. In the LOS channel, the error distribution is symmetrically narrow and peaked, concentrated around 0 cm with a standard deviation range of about 8 cm. This shows that, under LOS conditions, measurement errors are very small, location estimation is highly precise, and the error distribution is more concentrated. In contrast, the NLOS channel, due to unstable signal transmission, shows a wider error distribution with a peak at about 32 cm and a standard deviation range of about 12 cm. This indicates that under NLOS conditions, measurement errors are larger and more pronounced, increasing the uncertainty in location estimation. Moreover, the error values in NLOS channels vary due to differences in obstructions. Therefore, based on the standard deviation of ranging measurements in a ranging experiment, the LOS and NLOS channels can be decided.

3.2. Multi-Anchor Positioning Experimental Environment

The experimental measurements were carried out in Room 209.1 of the Information Building at Chaoyang University of Technology. During the tests, fixed anchor nodes transmitted signals to mobile tags, which measured distances using the TWR method and transmitted the data to a local processing system for subsequent positioning computations. To ensure consistency across repeated trials, the anchors were mounted on the walls using hooks, minimizing the potential for human-induced positioning errors. The tags were placed on adjustable tripods to facilitate flexible relocation between measurement points, as illustrated in Figure 8.
To maintain experimental accuracy, all anchors except the eighth were deployed under LOS conditions. The measurements were performed within a three-dimensional space measuring 620 cm × 783 cm × 282 cm, as depicted in Figure 9. A total of eight anchors were employed, indicated by blue markers in the figure, with their precise spatial coordinates provided in Table 1. The experiment utilized a single tag, and 27 designated test points (TPs) were selected for evaluation, shown as red markers in Figure 9. The coordinates corresponding to these test points are summarized in Table 2.

3.3. Results of Multi-Anchor Positioning Experiment

In this experiment, we conducted 1000 individual measurements for each test point (TP). The 3D average positioning error ε i ¯ for T P i , as listed in Table 3, is as follows:
ε i ¯ = n = 1 N ( x i , n x ^ i , n ) 2 + ( y i , n y ^ i , n ) 2 + ( z i , n z ^ i , n ) 2 N
In this experiment, x i , n , y i , n , and z i , n denote the true X, Y, and Z coordinates of the i-th test point, while x ^ i , n , y ^ i , n , and z ^ i , n   represent the corresponding estimated coordinates. For each TP, a total of N = 1000 measurements were collected. The three-dimensional positioning tests were conducted using 4, 5, 6, 7, and 8 anchors, with the anchors sequentially added from A 1 to A 8 . The full set of experimental results is presented in Table 3.
Analysis of Table 3 shows that the maximal positioning error occurs at T P B 2 with 22.7 cm, while the minimal error of 6.2 cm is observed at T P E 11 . Table 3 also provides the overall average positioning errors for each anchor configuration, offering a comprehensive assessment of system performance. The average errors for 4, 5, 6, 7, and 8 anchors are 13.9, 10.5, 8.5, 8.8, and 12.6 cm, respectively, indicating that increasing the number of anchors generally improves localization accuracy. However, the relatively high error observed with eight anchors is attributed to A 8 being located in an NLOS channel relative to the test points. Similarly, the slightly higher error for seven anchors compared to six arises because A 7 is positioned near the edge of the measurement area; its larger angular spread relative to the test points contributes to increased ranging errors.
Figure 10, Figure 11, Figure 12, Figure 13 and Figure 14 show the PDF of the positioning error T P B 2   with 4A, 5A, 6A, 7A, and 8A, respectively. In Figure 10, during the 4A experiment for TPB2, the error PDFs for x, y, and z show that the error for x is about −1 cm, that for y is 9 cm, and that for z is −20 cm. It is evident from the figure that the error and distribution on the z-axis are significantly larger than those on the other axes, which may be due to the small z-axis errors among the anchors in our experimental environment, leading to larger calculated errors for the z-axis in the positioning equations.
In Figure 11, Figure 12, Figure 13 and Figure 14, as more anchor points are added, the error values and distributions for all three axes become smaller, demonstrating that multi-anchor positioning not only reduces the error values but also increases positioning stability.
In Figure 13, with the addition of A 7 , which is positioned at the edge of the positioning environment, the error values on all three axes increased from the original 0, 4, and 7 cm to −1, 9, and −9 cm, respectively. This increase in error can be attributed to A 7 ’s edge location, which affects the angular measurements and contributes to larger errors due to the angles involved.
Figure 14 incorporates A 8 , which is situated on an NLOS channel. The inclusion of A 8 leads to a significant increase in both the error values and error distribution. This is because NLOS conditions typically introduce disruptions in signal propagation, such as reflections, diffractions, and scattering, which, in turn, increase measurement inaccuracies and variability in the data collected.

3.4. Experiment on the Impact of NLOS on Multi-Anchor Positioning

From the experimental results in the previous section, it can be observed that, when all anchor points are in LOS conditions, the addition of even one NLOS anchor significantly increases the error in the positioning system. To gain a deeper understanding of the impact of NLOS channels on the accuracy of multi-anchor positioning systems, this section presents four specifically designed experimental configurations. These experiments will explore, in detail, how the number of anchor points in NLOS channels affects the overall positioning accuracy, with the aim of providing more precise system design and optimization recommendations.
This section covers four experimental designs aimed at observing the impact of NLOS channels on multi-anchor indoor positioning systems. These experiments use anchor points in different channels to explore how NLOS channels increase positioning errors. The positions of the anchor points remain fixed, with the only variables being the number of anchor points and the introduction of NLOS conditions. The detailed design is given in Table 4.
In Table 5, as the number of anchor points increases from 4 to 8, the positioning error ε i ¯ at the test points shows varying degrees of change. For example, T P A 1 ’s error increases from 17.2 cm with four anchors to 28.4 cm with eight anchors; T P B 2 ’s error slightly increases from 22.7 cm to 23.0 cm, while T P I 2 ’s error increases dramatically from 11.8 cm to 164.9 cm. This indicates that, in NLOS channels, increasing the number of anchor points does not necessarily improve positioning accuracy and may, in fact, lead to increased errors due to exacerbated NLOS effects among the anchors.
Similarly, in Table 6, the results for E 2 , like those for E 1 , also show that increasing the number of anchor points does not necessarily have a positive impact on positioning errors. Particularly in the case of T P C 2 , the error increases from 10.0 cm with four anchors to 29.5 cm with eight anchors. This further confirms that, in NLOS channels, too many anchor points can introduce more signal attenuation and multipath effects, thereby increasing the overall uncertainty of the positioning system.
The data in Table 7 show that, at T P C 3 , when the number of anchor points increases from four to eight, the positioning error increases significantly from 16.3 cm to 82.5 cm. This substantial increase highlights the significant impact of NLOS channels on positioning errors. Additionally, for T P C 3 , the error decreases from 49.6 cm to 39.5 cm but then increases again to 79.1 cm. This indicates that, while NLOS channels can, in some cases, improve positioning accuracy, continuously adding more anchor points in NLOS channels will eventually lead to a decline in positioning accuracy.
In Table 8, positioning was performed using only one anchor in an LOS channel. Due to the difficulty in providing reliable positioning data with just one anchor in LOS conditions, the average error in E 4 was the worst among all the experiments. However, the table shows that, for some points, the 8A error values are lower than the 4A values, such as for T P A 3 , T P B 1 , T P E 3 , and others. This is because the positioning accuracy with 4A was severely affected by the NLOS channel, and adding more anchors helped average out the signal noise. However, if the additional NLOS channel anchors have too large an error, it can instead amplify the overall error.
These experiments demonstrate that increasing the number of anchor points in NLOS channels does not always lead to better positioning accuracy and may, in fact, negatively impact system performance due to the exacerbation of NLOS path effects. Therefore, this study proposes using the PSO algorithm to mitigate the impact of NLOS on positioning accuracy.

4. Improved PSO Algorithms

In the previous section, it was observed that increasing the number of anchor points in NLOS channels could potentially exacerbate NLOS path effects, leading to a negative impact on system performance. To enhance the accuracy of UWB indoor positioning technology in three-dimensional space, this study proposes the use of a PSO algorithm with anchor weight adjustments to mitigate the impact of NLOS on positioning accuracy. Through the anchor weight PSO positioning method, we anticipate effectively reducing positioning errors in NLOS channels, thereby improving the applicability and accuracy of UWB systems in complex environments.
Results from the preceding investigation reveal that, in environments dominated by NLOS propagation, simply increasing the number of deployed anchors does not guarantee performance gains. Instead, additional anchors may introduce further biased range information, thereby amplifying NLOS-related distortions and deteriorating localization reliability. To overcome this limitation and improve three-dimensional indoor positioning accuracy, this study develops a PSO-based localization approach in which the contribution of each anchor is explicitly weighted. By dynamically regulating anchor influence within the optimization process, the proposed method seeks to attenuate the impact of unreliable NLOS measurements on the final position estimate. Consequently, the approach is expected to achieve enhanced positioning precision under challenging propagation conditions, improving the robustness and practical deployment potential of UWB systems in complex indoor scenarios.

4.1. Fitness Function

This study develops a PSO-driven localization approach in which anchor contributions are selectively regulated to counteract the influence of NLOS propagation on indoor positioning performance. Rather than treating all anchors equally, the proposed method embeds anchor-specific influence factors directly into the PSO objective evaluation, allowing measurements affected by NLOS conditions to exert reduced impact on the solution search. By iteratively adjusting these influence factors, the optimization process identifies a balance among anchors that yields the lowest positioning error under NLOS-dominated environments. Based on this formulation, the objective function employed in the proposed method is expressed as follows:
f i = m = 1 M D p m , i D e m × ω A , L i n k
Within the proposed objective formulation, f i denotes the evaluation outcome of the i-th solution candidate. The quantity D p m , i specifies the Euclidean separation between the location represented by that candidate and the m-th reference node, whereas D e m corresponds to the range information acquired from the same reference node with respect to the estimated target position. To account for heterogeneous propagation conditions, an anchor-specific influence coefficient ω A , L i n k is incorporated to characterize the credibility of each measurement link. This coefficient is differentiated according to the propagation state of the link, with measurements affected by obstructed paths contributing less to the objective evaluation. In the proposed scheme, the influence coefficients assigned to unobstructed and obstructed anchors are not fixed independently but scaled relative to one another. Considering a total of M reference anchors, among which K operate under unobstructed conditions and L are affected by obstruction, the weighting strategy is constructed accordingly.
In the proposed formulation, the fitness value f i corresponds to the evaluation outcome of the i -th candidate solution. The quantity D p m , i   describes the spatial separation between the location encoded by the i -th particle and the m -th reference anchor, whereas D e m   denotes the range measurement associated with the same anchor and the estimated target position. An anchor-dependent modulation coefficient, denoted by ω A , L i n k , is introduced to characterize the reliability of each signal path. This coefficient is adjusted according to the propagation condition of the corresponding link, thereby differentiating between unobstructed and obstructed transmission scenarios. Links affected by NLOS propagation are intentionally assigned lower influence to reduce their impact on the optimization outcome. In this study, the modulation coefficients for unobstructed and obstructed links are scaled proportionally rather than treated as independent constants. Assuming a total of M anchors, among which K exhibit unobstructed propagation and L are subject to obstruction effects, the anchor modulation factor ω A , L i n k is defined as follows:
ω A , L i n k = ω A , L O S = p K ,   a n c h o r L O
and
ω A , L i n k = ω A , N L O S = q L ,     a n c h o r N L ,
where LO represents the subset of LOS anchors and NL represents the subset of NLOS anchors respectively. The corresponding scaling parameters are constrained such that their combined contribution remains unity: that is, p + q = 1 .
Algorithm 1 summary (pseudocode) is as follows:
Algorithm 1. An Improved PSO Algorithm Based on Channel Weighting
Input: Anchor positions A m , distance samples D e m ( n ) ,   n = 1 , 2 , , N
Output: Estimated target position x ^ = [ x ^ ,   y ^ ,   z ^ ]
Step 1: Distance Statistics Estimation
1: for each anchor m do
2:   Compute mean D ˉ e m = = 1 N n = 1 N D e m ( n ) and
      standard deviation σ m = 1 N 1 n = 1 N ( D e m ( n ) D ˉ e m ) 2
3: end for
Step 2: LOS/NLOS Anchor Classification
4: Determine threshold σ t h
5: Classify anchors into LOS and NLOS
6: Compute K = |{m| σ m < σ t h } | and L = |{m| σ m σ t h } |
Step 3: Anchor Weight Assignment
7: Assign weights ω A , L O S   = p K ,   ω A , N L O S   = q L
Step 4: Particle Initialization
8: Initialize particles { x i ,   v i }
9: Set p b e s t i     x ^ i
Step 5: Fitness Evaluation
10: for k = 1 to k m a x do
Step 6: PSO Update
11:   Update inertia weight w ( k )
12:   for each particle   i do
13:     Compute fitness f i
14:     Update p b e s t i if necessary
15:   end for
16:   Update g b e s t
17:   Update particle velocities and positions
18: end for
Step 7: Termination
19: return g b e s t
The PSO algorithm in this study is employed as an offline calibration method to construct the optimal weighting model using a set of reference sample data. Once the optimal weight ratios are converged upon, they are applied to the real-time least squares positioning solver.
In the 9:1 configuration, the three LOS anchors receive weights of 0.3 each, with the residual 0.1 assigned to NLOS anchors—distributed as 0.1 for the single NLOS anchor in 4A or 0.05 per anchor in 5A’s dual-NLOS setup. Weight ratios p:q of 7:3 (I), 8:2 (II), 9:1 (III), and 9.5:0.5 (IV) were tested to quantify their influence on positioning error. The PSO parameters appear in Table 9.

4.2. Fitness Weight Ratio Experiment

This study utilized 6 anchors (A1–A6) and 18 test locations from Section 3, with spatial coordinates and weight distributions documented in Table 10 and Table 11 and Figure 15. With LOS anchor count fixed at three, their individual values ( ω A , L O S ) remain invariant. Expanding the anchor set introduces additional NLOS units that partition the residual weight budget, causing per-anchor NLOS values ( ω A , N L O S ) to decline proportionally.
To approximate the variability and propagation challenges encountered in practical indoor settings, the experimental configuration employs six anchor nodes for three-dimensional positioning evaluation. Among these anchors, A 1 ,   A 2 , and A 3 are deployed under LOS conditions, while the remaining anchors operate in NLOS environments. This arrangement is intended to emulate signal degradation phenomena such as attenuation and multipath effects introduced by obstacles.
To examine how different anchor weighting strategies influence localization performance, multiple weight allocations are incorporated into the fitness function, specifically ratios of 7:3, 8:2, and 9:1. These configurations progressively reduce the contribution of anchors affected by NLOS propagation, enabling an assessment of how varying degrees of suppression impact positioning accuracy and facilitating the identification of an effective weighting scheme.
Figure 16 presents the resulting positioning error trends corresponding to the tested ω A ratios. The results show a general reduction in localization error as the influence of NLOS anchors is diminished. However, a minor performance degradation is observed at configuration IV, where the mean error in the six-anchor setup increases from 27.6 cm to 28.9 cm. Based on these observations, the 9:1 weighting ratio, which yields the lowest overall error, is selected for use in subsequent experimental evaluations.

4.3. PSO Performance Evaluation Under Varying Environmental Conditions

Results from the preceding experiments indicate that the weight configuration corresponding to case III yields the most favorable localization performance. Under this setting, the average positioning error is substantially reduced, decreasing from the baseline values of 45.9 cm, 48.2 cm, and 48.2 cm to 29.2 cm, 27.9 cm, and 27.6 cm, respectively. These findings suggest that increasing the relative contribution of anchors operating under LOS conditions can effectively suppress positioning degradation in environments affected by NLOS propagation.
To further examine the robustness and adaptability of the proposed anchor-weighted PSO approach, four distinct experimental environments listed in Table 4 are incorporated into the evaluation framework. By applying the proposed method across these heterogeneous scenarios, the practical effectiveness of the weighting strategy under different propagation characteristics can be systematically assessed. The corresponding experimental outcomes are summarized below, and the weight allocations adopted for each environment are provided in Table 12.
As shown in Table 12, the number of anchors operating under LOS conditions remains unchanged across the evaluated scenarios. Consequently, the assigned values of ω A , L O S remain constant regardless of the total number of anchors involved in positioning. In the specific case of E 1 _ ω A , L O S , where no anchors are affected by NLOS propagation, all four anchors operate under LOS conditions. As a result, the total weight is evenly distributed, and each anchor is assigned a weight of 0.25.
Table 13 presents a comparative analysis of localization errors across multiple environments, evaluated both with and without the proposed anchor-weighted PSO strategy. The results demonstrate that, for the majority of test scenarios, incorporating anchor weighting within the PSO framework leads to a noticeable reduction in positioning error, confirming the effectiveness of the proposed approach.
An exception is observed in the E 1 environment, where the positioning errors obtained with P S O 5 A and P S O 6 A slightly exceed those achieved using the conventional four-anchor configuration without weighting. This outcome indicates that when an environment already provides four anchors operating under unobstructed propagation conditions, the benefit of the proposed method becomes marginal. In such cases, the baseline four-LOS-anchor configuration already offers high localization precision, and the inclusion of additional measurements from anchors affected by NLOS propagation—despite being assigned reduced influence—introduces residual bias that can adversely affect the final position estimate.
Among the remaining experimental scenarios, the most pronounced performance improvement is observed in the E 2 environment. This outcome can be attributed to the presence of three anchors operating under unobstructed propagation conditions, which supply the anchor-weighted PSO algorithm with a relatively strong set of reliable range constraints. Under this configuration, the incorporation of additional NLOS-affected anchors with reduced influence enables the optimization process to compensate for the bias introduced by anchor A 4 , thereby achieving a noticeable reduction in localization error.
By contrast, although the proposed method also provides corrective effects in the E 3 and E 4 environments, the magnitude of improvement remains limited. In these cases, the scarcity of anchors operating under LOS conditions restricts the availability of high-quality reference information, leaving the weighting mechanism with insufficient leverage to substantially mitigate NLOS-induced errors. As a result, only modest accuracy gains are realized in these more challenging scenarios.

4.4. Dynamic Simulation Analysis of Anchor-Weighted PSO

The purpose of this experiment is to assess the robustness and positioning precision of the proposed approach under conditions involving environmental variability. To this end, a trajectory consisting of 24 predefined test points (TPs) was established within the experimental area, as illustrated in Figure 17, with the corresponding spatial coordinates provided in Table 14. In order to systematically evaluate the method’s behavior under differing propagation characteristics, the experimental setup was partitioned into four distinct scenarios, each defined by a different number of anchors affected by NLOS conditions. This structured design enables a detailed examination of the algorithm’s performance across a range of challenging indoor environments and facilitates an objective assessment of its applicability and reliability in real-world deployment.
Table 15 summarizes the sequence of environmental transitions considered in this experiment. As the target tag progresses along the predefined path, the propagation conditions gradually become more adverse, thereby providing a basis for evaluating the corrective capability of the anchor-weighted PSO localization method. Within the table, the notation LO is used to denote the group of anchors operating under unobstructed signal conditions, whereas NL identifies those affected by NLOS propagation.
Analysis of the results presented in Table 16 indicates that, for test points T P 1 through T P 12 , the four-anchor (4A) configuration achieves exceptionally high localization precision, as each of these points is supported by at least four LOS anchors. Under this setup, the minimum observed error is as low as 1.7 cm. In contrast, when additional NLOS-affected anchors are included in the six-anchor (6A) configuration, the overall positioning accuracy decreases. Although the anchor-weighted PSO method does not produce substantial improvements in scenarios already supported by more than four LOS anchors, it generally provides modest accuracy enhancements in most cases. An exception is observed at T P 7 , where the application of the weighting method unexpectedly results in a slight increase in the positioning error.
For test points T P 13 through T P 18 , where NLOS propagation effects are more pronounced, the proposed method demonstrates substantial corrective capability. Notably, at T P 16 , the localization error is dramatically reduced from 50.5 cm to 3.6 cm, indicating that the algorithm effectively compensates for the bias introduced by obstructed anchors and enhances positioning performance in challenging environments.
Finally, for T P 19 through T P 24 , the number of LOS anchors is limited, restricting the influence of high-quality reference measurements. In this scenario, the anchor-weighted PSO method provides only minor reductions in positioning errors, highlighting its limitations when the majority of anchors operate under NLOS conditions. Overall, these results emphasize that the method’s effectiveness is strongly dependent on the availability of reliable LOS measurements, while still providing meaningful improvements in scenarios with mixed LOS/NLOS anchor distributions.

5. Conclusions

This study evaluated a multi-anchor UWB three-dimensional positioning system based on a PSO framework, with particular focus on the effects of LOS and NLOS propagation and the benefits of an anchor-weighted PSO strategy. Experiments were conducted across multiple anchor configurations and dynamic test points to assess positioning accuracy under varying environmental conditions.
The baseline results indicate that, with 4 to 8 anchors, positioning errors were maintained within 13.9, 10.5, 8.5, 8.8, and 12.6 cm, respectively. When all anchors operated under LOS conditions, the system achieved consistently low errors, demonstrating the high intrinsic accuracy of UWB technology. However, the presence of NLOS paths significantly increased positioning deviations, confirming the negative impact of obstructed signal paths.
Analysis of individual test points along the dynamic trajectory further illustrates the influence of LOS availability on localization performance. For test points T P 1 through T P 12 , the four-anchor configuration already provided high precision, with a minimum error of 1.7 cm. In these cases, the anchor-weighted PSO method offered only minor improvements, except at T P 7 , where it slightly increased the error. This suggests that, when sufficient LOS anchors are present, the weighting strategy has limited impact.
For T P 13 through T P 18 , where NLOS propagation is more prominent, the proposed method exhibited significant corrective capability. At T P 16 , for example, the localization error decreased sharply from 50.5 cm to 3.6 cm. This demonstrates that the anchor-weighted PSO effectively mitigates NLOS-induced distortions when combined with LOS anchors. Conversely, for T P 19 through T P 24 , the scarcity of LOS anchors constrained the effectiveness of the method, resulting in only modest error reductions. These results highlight that the method’s performance is closely linked to the presence of reliable LOS measurements.
The aggregate experimental results across multiple anchor setups further support these observations. In the E 2 environment, leveraging low-weighted NLOS measurements alongside LOS anchors allowed the method to reduce errors by 37%, 38%, and 39% for 4, 5, and 6 anchors, respectively. In contrast, in the E 1 scenario, where sufficient LOS anchors were already present, the weighting method produced minimal benefit and occasionally slightly increased the positioning error. These findings emphasize that the anchor-weighted PSO approach is most effective in mixed LOS/NLOS conditions, while its impact diminishes in environments already dominated by high-quality LOS anchors.
Overall, the results confirm that UWB three-dimensional positioning exhibits high accuracy under ideal LOS conditions and that the anchor-weighted PSO method can significantly enhance performance in environments affected by NLOS propagation. The method provides a robust and practical solution for improving localization in complex indoor scenarios, particularly when NLOS anchors are present and LOS coverage is limited.
Future research plans will further improve the robustness and rigorous statistical validation of models by experimentally demonstrating PSO, GA, SSO, FA, and other evolutionary algorithms in real-time and different-scale environments.

Author Contributions

Conceptualization, Y.-F.H., T.-J.C. and H.-W.W.; methodology, Y.-F.H., T.-J.C. and G.-Y.C.; software, G.-Y.C.; validation, Y.-F.H.; formal analysis, Y.-F.H.; investigation, G.-Y.C.; resources, T.-J.C.; data curation, T.-J.C.; writing—original draft, T.-J.C. and H.-W.W.; writing—review and editing, Y.-F.H., T.-J.C. and H.-W.W.; visualization, T.-J.C.; Supervision, Y.-F.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Science and Technology Council (NSTC), Taiwan, with grant number NSTC 112-2221-E-324-010.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

Author Guan-Yi Chen was employed by the company Merry Electronics Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PSOParticle swarm optimization
GAGenetic algorithms
FAFirefly algorithms
SSOSocial spider optimization
UWBUltra-wideband
LOSLine-of-sight
NLOSNon-line-of-sight
IIoTIndustrial internet-of-things
GNSSGlobal Navigation Satellite System
GPSGlobal Positioning System
IoTInternet of things
AIoTArtificial intelligence of things
SDNSoftware defined networking
RFIDRadio frequency identification
TWRTwo-way ranging

References

  1. Chen, L.; Julien, O.; Lohan, E.S.; Seco-Granados, G.; Chen, R. Mobile Geospatial Computing Systems for Ubiquitous Positioning. Mob. Inf. Syst. 2018, 2018, 9138095. [Google Scholar] [CrossRef] [Scilit]
  2. GPS.GOV. GPS Performance & Accuracy. 2024. Available online: https://www.gps.gov/sites/default/files/2025-07/2022-GPS-SPS-performance-analysis.pdf (accessed on 15 December 2025).
  3. Akyildiz, I.F.; Su, W.; Sankarasubramaniam, Y.; Cayirci, E. A Survey on Sensor Networks. IEEE Commun. Mag. 2002, 40, 102–114. [Google Scholar] [CrossRef] [Scilit]
  4. Er Rida, M.; Liu, F.; Jadi, Y.; Algawhari, A.A.A.; Askourih, A. Indoor Location Position Based on Bluetooth Signal Strength. In Proceedings of the 2015 2nd International Conference on Information Science and Control Engineering, Shanghai, China, 24–26 April 2015; pp. 769–773. [Google Scholar]
  5. Xu, Y.; Gui, G.; Gacanin, H.; Adachi, F. A Survey on Resource Allocation for 5G Heterogeneous Networks: Current Research, Future Trends, and Challenges. IEEE Commun. Surv. Tutor. 2021, 23, 668–695. [Google Scholar] [CrossRef] [Scilit]
  6. Shafi, M.; Molisch, A.F.; Smith, P.J.; Haustein, T.; Zhu, P.; De Silva, P.; Tufvesson, F.; Benjebbour, A.; Wunder, G. 5G: A Tutorial Overview of Standards, Trials, Challenges, Deployment, and Practice. IEEE J. Sel. Areas Commun. 2017, 35, 1201–1221. [Google Scholar] [CrossRef] [Scilit]
  7. Huang, Y.-F.; Chen, C.-M.; Liao, J.-Y.; Chan, T.-J. An Improved Localization Method Using Light Detection and Ranging for Indoor Positionings. Electronics 2025, 14, 4904. [Google Scholar] [CrossRef] [Scilit]
  8. Wski, S.; Spachos, P. Wi-Fi Indoor Positioning System Based on RSSI Measurements from Wi-Fi Access Points—A Tri-lateration Approach. Int. J. Electron. Telecommun. 2016, 62, 247–252. [Google Scholar]
  9. Wei, Z.; Zhou, Z. A Combined Filtering Method for ZigBee Indoor Distance Measurement. Sensors 2024, 24, 3164. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  10. Sun, W.; Yang, F. A Robust Indoor Positioning Method based on Bluetooth Low Energy with Separate Channel Information. Sensors 2019, 19, 3487. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  11. Merenda, M.; Catarinucci, L.; Colella, R.; Iero, D.; Della Corte, F.G.; Carotenuto, R. Exploiting RFID Technology for Indoor Positioning. In Proceedings of the 2021 6th International Conference on Smart and Sustainable Technologies (SpliTech), Bol and Split, Croatia, 8–11 September 2022; pp. 1–10. [Google Scholar]
  12. Rossi, F.; Tomeo, S.; Bellavista, P. RFID-Based Indoor Positioning Using Edge Machine Learning. IEEE Commun. Surv. Tutor. 2023, 24, 450–465. [Google Scholar]
  13. Sung, S.; Kim, H.; Jung, J.-I. Accurate Indoor Positioning for UWB-based Personal Devices using Deep Learning. IEEE Access 2023, 11, 222–229. [Google Scholar] [CrossRef] [Scilit]
  14. De Cock, C.; Tanghe, E.; Joseph, W.; Plets, D. Robust IMU-Based Mitigation of Human Body Shadowing in UWB Indoor Positioning. Sensors 2023, 23, 8289. [Google Scholar] [CrossRef] [Scilit]
  15. Barral, V.; Escudero, C.J.; García-Naya, J.A.; Catoira, R.M. NLOS Identification and Mitigation Using Low-Cost UWB Devices. Sensors 2019, 19, 3464. [Google Scholar] [CrossRef] [Scilit]
  16. Yang, Z.; Wang, Y.; Chen, G.; Zhang, Y. Research on High Precision Indoor Positioning Technology of UWB. J. Navig. Position. 2014, 2, 31–35. [Google Scholar]
  17. Xu, S. Optimal Sensor Placement for Target Localization Using Hybrid RSS, AOA and TOA Measurements. IEEE Commun. Lett. 2020, 24, 1966–1970. [Google Scholar] [CrossRef] [Scilit]
  18. Chen, X.; Xie, Y.; Zhou, Z.; He, Y.; Wang, Q.; Chen, Z. An Indoor 3D Positioning Method Using Terrain Feature Matching for PDR Error Calibration. Electronics 2024, 13, 1468. [Google Scholar] [CrossRef] [Scilit]
  19. Guo, H.; Li, M.; Zhang, X.; Gao, X.; Liu, Q. UWB indoor positioning optimization algorithm based on genetic annealing and clustering analysis. Front. Neurorobotics 2022, 16, 715440. [Google Scholar] [CrossRef] [Scilit]
  20. Cuevas, E.; Cienfuegos, M.; Zaldívar, D.; Pérez-Cisneros, M. A swarm optimization algorithm inspired in the behavior of the social-spider. Expert Syst. Appl. 2013, 40, 6374–6384. [Google Scholar] [CrossRef] [Scilit]
  21. Ariyaratne, M.K.A.; Pemarathne, W.P.J. A review of recent advancements of firefly algorithm: A modern nature inspired algorithm. In Proceedings of the 8th International Research Conference; KDU: Ratmalana, Sri Lanka, 2015; pp. 61–66. [Google Scholar]
  22. Qiu, J.; Xie, J.; Cheng, F. A hybrid social spider opti-mization algorithm with differential evolution for globaloptimization. J. Univers. Comput. Sci. 2017, 23, 619–635. [Google Scholar]
  23. Chen, Y.Y.; Huang, S.P.; Wu, T.W.; Tsai, W.T.; Liou, C.Y.; Mao, S.G. UWB System for Indoor Positioning and Tracking With Arbitrary Target Orientation, Optimal Anchor Location, and Adaptive NLOS Mitigation. IEEE Trans. Veh. Technol. 2020, 69, 9304–9314. [Google Scholar] [CrossRef] [Scilit]
  24. Che, F.; Ahmed, Q.Z.; Lazaridis, P.I.; Sureephong, P.; Alade, T. Indoor Positioning System (IPS) Using Ultra-Wide Bandwidth (UWB)—For Industrial Internet of Things (IIoT). Sensors 2023, 23, 8360. [Google Scholar] [CrossRef] [Scilit]
  25. Coppens, D.; Shahid, A.; Lemey, S.; Van Herbruggen, B.; Marshall, C.; De Poorter, E. An Overview of UWB Standards and Organizations (IEEE 802.15.4, FiRa, Apple): Interoperability Aspects and Future Research Directions. IEEE Access 2022, 10, 70219–70241. [Google Scholar] [CrossRef] [Scilit]
  26. Decawave. DW1000 User Manual; User Manual; Decawave: Dublin, Ireland, 2017. [Google Scholar]
  27. Decawave. DW1000 Datasheet; Datasheet; Decawave: Dublin, Ireland, 2017. [Google Scholar]
  28. Laadung, T.; Ulp, S.; Alam, M.M.; Le Moullec, Y. Active-Passive Two-Way Ranging Using UWB. In Proceedings of the 2020 14th International Conference on Signal Processing and Communication Systems (ICSPCS), Adelaide, Australia, 14–16 December 2020. [Google Scholar]
  29. Huang, Y.-F.; Chen, G.-Y.; Wang, H.-W. PSO-Optimized Anchor Weighting for NLOS-Resilient UWB Localization in Multipath Indoor Environment. In Proceedings of the International Conference on Cloud and Network Computing, Fuzhou, China, 6–8 June 2025; pp. 200–211. [Google Scholar]
  30. Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the ICNN’95—International Conference on Neural Networks, Perth, Australia, 27 November–1 December 1995; pp. 1942–1948. [Google Scholar]
  31. Eberhart, R.; Kennedy, J. A New Optimizer Using Particle Swarm Theory. In Proceedings of the Sixth International Symposium on Micro Machine and Human Science, Nagoya, Japan, 4–6 October 1995; pp. 39–43. [Google Scholar]
Figure 1. ESP32 UWB module.
Figure 1. ESP32 UWB module.
Mathematics 14 00493 g001
Figure 2. Two-way ranging principle.
Figure 2. Two-way ranging principle.
Mathematics 14 00493 g002
Figure 3. Two-way ranging.
Figure 3. Two-way ranging.
Mathematics 14 00493 g003
Figure 4. Three-dimensional spatial positioning diagram [29].
Figure 4. Three-dimensional spatial positioning diagram [29].
Mathematics 14 00493 g004
Figure 5. Comparison of ranging errors at different distances.
Figure 5. Comparison of ranging errors at different distances.
Mathematics 14 00493 g005
Figure 6. PDF of ranging error.
Figure 6. PDF of ranging error.
Mathematics 14 00493 g006
Figure 7. PDF of LOS and NLOS ranging error.
Figure 7. PDF of LOS and NLOS ranging error.
Mathematics 14 00493 g007
Figure 8. Anchor and tag placement method [29].
Figure 8. Anchor and tag placement method [29].
Mathematics 14 00493 g008
Figure 9. Multi-anchor positioning experimental environment.
Figure 9. Multi-anchor positioning experimental environment.
Mathematics 14 00493 g009
Figure 10. The PDF of the positioning error of T P B 2 with 4A.
Figure 10. The PDF of the positioning error of T P B 2 with 4A.
Mathematics 14 00493 g010
Figure 11. The PDF of the positioning error of T P B 2 with 5A.
Figure 11. The PDF of the positioning error of T P B 2 with 5A.
Mathematics 14 00493 g011
Figure 12. The PDF of the positioning error of T P B 2 with 6A.
Figure 12. The PDF of the positioning error of T P B 2 with 6A.
Mathematics 14 00493 g012
Figure 13. The PDF of the positioning error of T P B 2 with 7A.
Figure 13. The PDF of the positioning error of T P B 2 with 7A.
Mathematics 14 00493 g013
Figure 14. The PDF of the positioning error of T P B 2 with 8A.
Figure 14. The PDF of the positioning error of T P B 2 with 8A.
Mathematics 14 00493 g014
Figure 15. Experimental test points arrangements [29].
Figure 15. Experimental test points arrangements [29].
Mathematics 14 00493 g015
Figure 16. Positioning errors for different ω A ratios [29].
Figure 16. Positioning errors for different ω A ratios [29].
Mathematics 14 00493 g016
Figure 17. Simulation experiment illustration for dynamic environmental changes.
Figure 17. Simulation experiment illustration for dynamic environmental changes.
Mathematics 14 00493 g017
Table 1. Coordinates of eight anchors (unit: m).
Table 1. Coordinates of eight anchors (unit: m).
Anchorxyz
A 1 6.143.861.77
A 2 0.001.321.38
A 3 0.007.221.76
A 4 1.633.582.82
A 5 4.663.552.82
A 6 3.070.001.50
A 7 1.227.831.73
A 8 5.097.830.80
Table 2. Three-dimensional locations of test nodes under multi-anchor configurations.
Table 2. Three-dimensional locations of test nodes under multi-anchor configurations.
Coordinate (Unit: m)
y
Coordinate (Unit: m)
y
TP xzTP xz
T P A 1 3.03.01.3 T P E 3 4.04.01.9
T P A 2 3.03.01.6 T P F 1 5.04.01.3
T P A 3 3.03.01.9 T P F 2 5.04.01.6
T P B 1 4.03.01.3 T P F 3 5.04.01.9
T P B 2 4.03.01.6 T P G 1 3.05.01.3
T P B 3 4.03.01.9 T P G 2 3.05.01.6
T P C 1 5.03.01.3 T P G 3 3.05.01.9
T P C 2 5.03.01.6 T P H 1 4.05.01.3
T P C 3 5.03.01.9 T P H 2 4.05.01.6
T P D 1 3.04.01.3 T P H 3 4.05.01.9
T P D 2 3.04.01.6 T P I 1 5.05.01.3
T P D 3 3.04.01.9 T P I 2 5.05.01.6
T P E 1 4.04.01.3 T P I 3 5.05.01.9
T P E 2 4.04.01.6
Table 3. Multi-anchor experiment results.
Table 3. Multi-anchor experiment results.
Experiment4A5A6A7A8A Experiment4A5A6A7A8A
TP TP
T P A 1 17.28.07.911.710.4 T P E 3 15.719.117.217.515.0
T P A 2 9.16.96.77.911.6 T P F 1 7.99.58.89.111.5
T P A 3 13.69.57.38.917.8 T P F 2 14.111.010.610.011.7
T P B 1 14.18.75.83.77.6 T P F 3 17.26.66.48.912.7
T P B 2 22.711.28.611.715.5 T P G 1 9.810.35.77.312.2
T P B 3 21.67.86.97.28.4 T P G 2 13.110.312.79.010.0
T P C 1 13.113.09.67.333.6 T P G 3 9.110.16.56.711.2
T P C 2 10.04.93.93.118.9 T P H 1 15.821.37.26.36.6
T P C 3 16.37.54.85.416.9 T P H 2 16.79.87.56.55.4
T P D 1 7.05.05.84.74.9 T P H 3 19.519.414.013.111.4
T P D 2 12.312.312.412.18.2 T P I 1 15.48.76.67.48.8
T P D 3 16.311.19.810.316.5 T P I 2 11.814.712.513.711.7
T P E 1 6.27.07.311.519.1 T P I 3 20.58.67.68.216.2
T P E 2 10.411.79.89.27.2AVG13.910.58.58.812.6
Table 4. Experiment design for the impact of NLOS on multi-anchor positioning.
Table 4. Experiment design for the impact of NLOS on multi-anchor positioning.
LOS AnchorNLOS Anchor
E 1 A 1 4 A 5 8
E 2 A 1 3 A 4 8
E 3 A 1 2 A 3 8
E 4 A 1 A 2 8
Table 5. E 1 positioning error   ε i ¯ (unit: cm).
Table 5. E 1 positioning error   ε i ¯ (unit: cm).
Experiment4A5A6A7A8A Experiment4A5A6A7A8A
TP TP
T P A 1 17.223.134.431.228.4 T P E 3 15.730.233.733.5100.6
T P A 2 9.131.741.333.229.1 T P F 1 7.924.829.559.635.1
T P A 3 13.637.047.133.426.0 T P F 2 14.128.629.453.228.6
T P B 1 14.129.341.244.028.5 T P F 3 17.234.133.653.847.8
T P B 2 22.737.948.248.623.0 T P G 1 9.825.925.545.448.4
T P B 3 21.641.553.351.747.2 T P G 2 13.135.128.456.659.1
T P C 1 13.129.741.768.626.3 T P G 3 9.140.227.064.265.0
T P C 2 10.035.447.671.929.5 T P H 1 15.826.228.337.650.3
T P C 3 16.342.556.578.082.5 T P H 2 16.738.828.330.4111.5
T P D 1 7.019.622.930.831.4 T P H 3 19.540.728.730.0124.1
T P D 2 12.322.425.625.625.9 T P I 1 15.438.924.462.680.7
T P D 3 16.321.126.119.318.4 T P I 2 11.841.825.955.9164.9
T P E 1 6.223.828.933.029.9 T P I 3 20.548.328.252.3167.4
T P E 2 10.426.831.133.530.9AVG13.932.434.045.857.1
Table 6. E 2 Positioning error ε i ¯ (unit: cm).
Table 6. E 2 Positioning error ε i ¯ (unit: cm).
Experiment4A5A6A7A8A Experiment4A5A6A7A8A
TP TP
T P A 1 36.445.453.053.951.5 T P E 3 75.147.948.148.338.7
T P A 2 49.653.260.358.555.2 T P F 1 31.433.235.860.338.2
T P A 3 63.263.371.065.159.4 T P F 2 39.637.937.855.131.6
T P B 1 44.140.650.152.838.7 T P F 3 64.842.040.356.148.3
T P B 2 63.350.458.259.435.6 T P G 1 41.744.342.162.466.2
T P B 3 74.054.964.864.530.2 T P G 2 51.854.648.374.978.6
T P C 1 41.138.046.872.128.6 T P G 3 63.965.854.289.792.3
T P C 2 57.544.153.276.726.6 T P H 1 38.538.137.539.759.5
T P C 3 85.450.262.384.155.4 T P H 2 55.252.342.637.769.5
T P D 1 35.140.541.953.353.9 T P H 3 67.458.646.542.2112.5
T P D 2 47.747.047.657.758.0 T P I 1 49.448.836.659.689.2
T P D 3 16.311.19.810.316.5 T P I 2 11.814.712.513.711.7
T P E 1 6.27.07.311.519.1 T P I 3 20.58.67.68.216.2
T P E 2 10.411.79.89.27.2AVG13.910.58.58.812.6
Table 7. E 3   Positioning error   ε i ¯ (unit: cm).
Table 7. E 3   Positioning error   ε i ¯ (unit: cm).
Experiment4A5A6A7A8A Experiment4A5A6A7A8A
TP TP
T P A 1 40.446.854.457.255.6 T P E 3 85.568.553.950.044.1
T P A 2 42.449.759.861.559.2 T P F 1 48.949.540.253.841.4
T P A 3 45.753.668.066.262.1 T P F 2 53.652.341.250.635.5
T P B 1 43.744.349.050.640.2 T P F 3 77.660.641.650.962.7
T P B 2 47.246.554.056.137.8 T P G 1 63.766.556.973.276.8
T P B 3 49.048.157.960.541.5 T P G 2 72.975.762.084.887.7
T P C 1 39.138.842.365.832.9 T P G 3 81.884.966.599.0101.7
T P C 2 40.438.943.168.342.1 T P H 1 65.962.850.237.967.5
T P C 3 49.639.542.073.179.1 T P H 2 81.977.555.639.170.2
T P D 1 49.355.749.758.359.3 T P H 3 93.982.957.544.7107.7
T P D 2 58.862.955.566.566.8 T P I 1 73.669.746.054.390.8
T P D 3 52.365.659.472.571.9 T P I 2 89.178.548.448.596.6
T P E 1 54.553.948.042.947.5 T P I 3 111.588.651.348.9141.8
T P E 2 65.661.350.645.447.2AVG62.160.152.058.565.5
Table 8. E 4 Positioning error ε i ¯ (unit: cm).
Table 8. E 4 Positioning error ε i ¯ (unit: cm).
Experiment4A5A6A7A8A Experiment4A5A6A7A8A
TP TP
T P A 1 43.653.561.364.061.3 T P E 3 82.957.654.352.251.9
T P A 2 53.356.466.968.664.9 T P F 1 47.744.644.362.636.6
T P A 3 78.259.874.873.667.3 T P F 2 52.745.444.157.838.4
T P B 1 51.048.955.957.642.9 T P F 3 76.952.845.256.4131.9
T P B 2 70.550.359.561.740.0 T P G 1 53.158.755.672.777.5
T P B 3 73.951.563.466.058.7 T P G 2 61.562.657.882.688.0
T P C 1 52.642.947.070.636.1 T P G 3 84.166.859.094.999.4
T P C 2 59.342.846.872.771.5 T P H 1 54.152.549.344.762.8
T P C 3 63.842.747.976.4111.6 T P H 2 67.355.450.743.990.3
T P D 1 44.654.455.463.964.1 T P H 3 80.156.050.344.8133.2
T P D 2 47.959.058.970.670.4 T P I 1 53.046.843.963.479.9
T P D 3 63.662.761.175.273.2 T P I 2 65.847.044.054.8138.0
T P E 1 53.051.451.548.646.6 T P I 3 70.346.544.650.7163.8
T P E 2 59.954.553.451.245.5AVG61.752.753.663.075.8
Table 9. The proposed PSO parameter settings [29].
Table 9. The proposed PSO parameter settings [29].
Parameters
c 1 2
c 2 2
r 1 [0, 1]
r 2 [0, 1]
w m a x 0.9
w m i n 0.4
k m a x 80
K1–6
L1–6
Particle number800
Table 10. ω A , L i n k parameters for fitness weight ratio experiment.
Table 10. ω A , L i n k parameters for fitness weight ratio experiment.
Experiment4A5A6A
ω A
ω A , L O S ( 7 : 3 ) 7/307/307/30
ω A , N L O S ( 7 : 3 ) 3/103/203/30
ω A , L O S ( 8 : 2 ) 8/308/308/30
ω A , N L O S ( 8 : 2 ) 2/102/202/30
ω A , L O S ( 9 : 1 ) 9/309/309/30
ω A , N L O S ( 9 : 1 ) 1/101/201/30
ω A , L O S ( 95 : 5 ) 95/30095/30095/300
ω A , N L O S ( 95 : 5 ) 5/1005/2005/300
Table 11. Geometric specification of test locations.
Table 11. Geometric specification of test locations.
Coordinate (Unit: m)
y
Coordinate (Unit: m)
y
TP xzTP xz
T P A 1 3.03.01.3 T P F 1 5.04.01.3
T P A 2 3.03.01.6 T P F 2 5.04.01.6
T P B 1 4.03.01.3 T P G 1 3.05.01.3
T P B 2 4.03.01.6 T P G 2 3.05.01.6
T P C 1 5.03.01.3 T P H 1 4.05.01.3
T P C 2 5.03.01.6 T P H 2 4.05.01.6
T P D 1 3.04.01.3 T P I 1 5.05.01.3
T P D 2 3.04.01.6 T P I 2 5.05.01.6
T P E 1 4.04.01.3
T P E 2 4.04.01.6
Table 12. ω A , L i n k parameters in varying environmental conditions.
Table 12. ω A , L i n k parameters in varying environmental conditions.
4A5A6A
E 1 _ ω A , L O S 1/49/409/40
E 1 _ ω A , N L O S 01/101/20
E 2 _ ω A , L O S 3/103/103/10
E 2 _ ω A , N L O S 1/101/201/30
E 3 _ ω A , L O S 9/209/209/20
E 3 _ ω A , N L O S 1/201/301/40
E 4 _ ω A , L O S 9/109/109/10
E 4 _ ω A , N L O S 1/301/401/50
Table 13. Comparison of errors with and without PSO.
Table 13. Comparison of errors with and without PSO.
Experiment4A P S O 4 A 5A P S O 5 A 6A P S O 6 A
TP
E 1 13.910.932.417.934.016.0
E 2 53.929.248.227.948.227.6
E 3 62.156.260.154.552.050.6
E 4 61.757.952.754.653.652.1
Table 14. Test point coordinates in dynamic simulation experiments.
Table 14. Test point coordinates in dynamic simulation experiments.
Experiment (Unit: m)
y
Experiment (Unit: m)
y
TP xzTP xz
T P 1 3.003.001.30 T P 13 5.005.001.30
T P 2 3.333.001.40 T P 14 4.665.001.40
T P 3 3.663.001.50 T P 15 4.335.001.50
T P 4 4.003.001.60 T P 16 4.005.001.60
T P 5 4.333.001.70 T P 17 3.665.001.70
T P 6 4.663.001.80 T P 18 3.335.001.80
T P 7 5.003.001.90 T P 19 3.005.001.90
T P 8 5.003.331.80 T P 20 3.004.661.80
T P 9 5.003.661.70 T P 21 3.004.331.70
T P 10 5.004.001.60 T P 22 3.004.001.60
T P 11 5.004.331.50 T P 23 3.003.661.50
T P 12 5.004.661.40 T P 24 3.003.331.40
Table 15. Configuration of experimental scenarios.
Table 15. Configuration of experimental scenarios.
LONL
T P 1 T P 6 A 1 5 A 6
T P 7 T P 12 A 1 4 A 5 6
T P 13 T P 18 A 1 3 A 4 6
T P 19 T P 24 A 1 2   A 3 6
Table 16. Positioning errors observed in the dynamic-environment simulation experiments.
Table 16. Positioning errors observed in the dynamic-environment simulation experiments.
Experiment4A6A 6 A P S O Experiment4A6A 6 A P S O
TP TP
T P 1 10.819.81.6 T P 13 36.232.45.7
T P 2 11.720.81.2 T P 14 41.634.87.0
T P 3 12.621.61.4 T P 15 47.138.38.9
T P 4 14.321.61.4 T P 16 50.541.43.6
T P 5 15.822.00.7 T P 17 54.545.214.9
T P 6 16.822.10.6 T P 18 56.949.327.8
T P 7 18.651.85.4 T P 19 78.866.862.8
T P 8 17.543.22.5 T P 20 69.061.862.5
T P 9 17.535.91.2 T P 21 59.457.549.3
T P 10 17.430.12.3 T P 22 52.654.756.5
T P 11 16.425.92.3 T P 23 47.553.042.4
T P 12 15.624.11.2 T P 24 43.452.245.7
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Huang, Y.-F.; Chan, T.-J.; Chen, G.-Y.; Wang, H.-W. An Improved Particle Swarm Optimization for Three-Dimensional Indoor Positioning with Ultra-Wideband Communications for LOS/NLOS Channels. Mathematics 2026, 14, 493. https://doi.org/10.3390/math14030493

AMA Style

Huang Y-F, Chan T-J, Chen G-Y, Wang H-W. An Improved Particle Swarm Optimization for Three-Dimensional Indoor Positioning with Ultra-Wideband Communications for LOS/NLOS Channels. Mathematics. 2026; 14(3):493. https://doi.org/10.3390/math14030493

Chicago/Turabian Style

Huang, Yung-Fa, Tung-Jung Chan, Guan-Yi Chen, and Hsing-Wen Wang. 2026. "An Improved Particle Swarm Optimization for Three-Dimensional Indoor Positioning with Ultra-Wideband Communications for LOS/NLOS Channels" Mathematics 14, no. 3: 493. https://doi.org/10.3390/math14030493

APA Style

Huang, Y.-F., Chan, T.-J., Chen, G.-Y., & Wang, H.-W. (2026). An Improved Particle Swarm Optimization for Three-Dimensional Indoor Positioning with Ultra-Wideband Communications for LOS/NLOS Channels. Mathematics, 14(3), 493. https://doi.org/10.3390/math14030493

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop