<abstract>
<p>Traditional back propagation neural networks (BPNNs) for ultrawideband (UWB) indoor localization can effectively improve localization accuracy, although there is high likelihood of becoming trapped in nearby minima. To solve this problem, the random weights and thresholds of the BPNN are optimized using the Harris Hawks optimization algorithm (HHO) to obtain the optimal global solution to enhance the UWB indoor positioning accuracy and NLOS resistance. The results show that the predicted trajectory of the HHO and BPNN hybrid algorithm (HHO-BP) matches the actual position in the two-dimensional localization scenario with four base stations; the optimized average positioning error is effectively reduced in both indoor LOS and NLOS environments. In the LOS environment, the total mean error of the traditional BPNN algorithm is 6.52 cm, which is 26.99% better than the UWB measurement error; in the NLOS environment, the total mean error of the conventional BPNN is 14.82 cm, which is 50.08% better than the UWB measurement error. The HHO–BP algorithm is further optimized on this basis, and the total mean error in the LOS environment is 4.50 cm, which is 22.57% better than the conventional BPNN algorithm; in the NLOS environment, the total mean error is 9.56 cm, which is 17.54% better than the conventional BPNN algorithm. The experimental findings suggest that the approach has greater calibration accuracy and stability than BPNN, making it a viable choice for scenarios requiring high positional precision.</p>
</abstract>