# Modified Least Squares Algorithm for Three-Dimensional Target Location Based on Wireless Communication Base Stations

Authors: Zhaohui Zhang; Jing Li; Qian Liu
Journal: Complexity
 (2020)

---

## Abstract

The observed values of time of arrival (TOA) for the radio signals between the target and the wireless communication base stations are mainly affected by signal non-line-of-sight (NLOS) propagation in target location. TOA with NLOS makes a lot of signal noises and propagation delays, that is, location errors. For the first time, this paper focuses on the problem of modifying theZ-axis location coordinates in three-dimensional (3D) target location. A novel algorithm is proposed by establishing the modified least squares 3D location model for the accurate target location. Meanwhile, an optimal base station selection strategy is proposed by using the spectral clustering algorithm, which is based on the spatial distribution of the base stations. Compared with the existing algorithms, the proposed algorithm in this paper has better performance on the accurate target 3D location in real scenes, which has a high value of practical application. The simulations illustrate that the location error of the proposed algorithm is smaller than those of other existing algorithms based on the same simulation data and conditions.


---

## Body

## 1. Introduction

3D location of the target is an important technology along with the rapid development of wireless communication technology in the era of big data [1], which is developed in the study of accurate 3D location of the target under NLOS recently. 3D location technology has been widely applied to many fields such as Google Maps, GPS, and other guided systems. For example, the doctor can use location technology to track the ultrasound to investigate the effects of geographical location of the target different positions on the location of the internal jugular vein [2]. The above location systems are stipulated in the analysis of geographical location of the target based on wireless communication base stations. The main method of this technology is that the geographical location of the target is treated as the research goal in the network, and then some mathematical indexes such as line of sight (LOS), NLOS, TOA, time difference of arrival (TDOA), and angle of arrival (AOA) are used for target location based on wireless communication base stations. Finally, the network gets the 3D coordinates of the target by calculating the actual distances and the estimated distances between the wireless communication base stations and the target. In the past decades, lots of researchers had been devoted to 3D location technology and many interesting results were obtained.The difficulties of target location lie in how to get accurate 3D location of the target in unstable and unreliable external network environment and how to improve the robustness of locating. There are many reasons for 3D localization errors of the target [1–8].


### 1.1. Received Signal Interference Ratio by the Base Station

The signal strength reflects the specific source and approximate location of the target. The received signal interference ratio generally needs to be considered because it is interfered by the information from other channels.


### 1.2. Multipath Propagation

In the multipath propagation of signals, the same signal received by the base station may have time and space delay, which reduces the accuracy of the 3D location. Therefore, how to avoid the delays in the multipath propagation of signals and achieve effective recovery of the multipath transmitted signals is one of the key technologies to the accurate target location.


### 1.3. NLOS Propagation

NLOS propagation leads to signal deviation, time, and space delay, which affects the real-time transmission of signals. Due to the complexity of the physical medium of the intermediate obstacles, it is difficult for base stations to analyze the received signals.


### 1.4. Number of Base Stations

The number of base stations is a relatively important factor which will lead to localization error. How to select the optimal number of base stations is a research hotspot, because the optimal number of base stations can ensure accurate location of the target and reduce the cost of hardware.


### 1.5. Location of Base Station

The location of base station is also an important factor which affects the localization accuracy of the target. The reasonable setting of base station location can reduce the localization errors caused by NLOS.


### 1.6. Design of Location Algorithm

The unreasonable localization algorithm is easy to cause the localization errors. The designed location algorithm cannot achieve accurate location of the target due to the change of external environment in the process of the actual location. Therefore, it is very important to establish a dynamic system for localization algorithm, so that we can effectively achieve intelligent location of the target.Motivated by the aforementioned observation, we explore theZ-axis accuracy 3D location problem and propose a modified least squares algorithm of target 3D location in this paper. Main contributions are summarized as follows.(i)
This work for the first time introduces a method to correct theZ-axis location coordinate value of 3D location. Compared with the existing works, our 3D location model has better performance in location accuracy.(ii)
An innovative approach is established to the modified least squares of target 3D location model for theZ-axis coordinate and the minimum wireless communication base station selection algorithm.The rest of this paper is organized as follows. Section2 introduces the related work. Section 3 gives the main algorithm of 3D location. In Section 4, we have a discussion on the base station selection strategy to get the minimum number of wireless communication base stations for 3D location. In Section 5, the experimental results are presented and discussed. Finally, the paper is concluded in Section 6.


## 1.1. Received Signal Interference Ratio by the Base Station

The signal strength reflects the specific source and approximate location of the target. The received signal interference ratio generally needs to be considered because it is interfered by the information from other channels.


## 1.2. Multipath Propagation

In the multipath propagation of signals, the same signal received by the base station may have time and space delay, which reduces the accuracy of the 3D location. Therefore, how to avoid the delays in the multipath propagation of signals and achieve effective recovery of the multipath transmitted signals is one of the key technologies to the accurate target location.


## 1.3. NLOS Propagation

NLOS propagation leads to signal deviation, time, and space delay, which affects the real-time transmission of signals. Due to the complexity of the physical medium of the intermediate obstacles, it is difficult for base stations to analyze the received signals.


## 1.4. Number of Base Stations

The number of base stations is a relatively important factor which will lead to localization error. How to select the optimal number of base stations is a research hotspot, because the optimal number of base stations can ensure accurate location of the target and reduce the cost of hardware.


## 1.5. Location of Base Station

The location of base station is also an important factor which affects the localization accuracy of the target. The reasonable setting of base station location can reduce the localization errors caused by NLOS.


## 1.6. Design of Location Algorithm

The unreasonable localization algorithm is easy to cause the localization errors. The designed location algorithm cannot achieve accurate location of the target due to the change of external environment in the process of the actual location. Therefore, it is very important to establish a dynamic system for localization algorithm, so that we can effectively achieve intelligent location of the target.Motivated by the aforementioned observation, we explore theZ-axis accuracy 3D location problem and propose a modified least squares algorithm of target 3D location in this paper. Main contributions are summarized as follows.(i)
This work for the first time introduces a method to correct theZ-axis location coordinate value of 3D location. Compared with the existing works, our 3D location model has better performance in location accuracy.(ii)
An innovative approach is established to the modified least squares of target 3D location model for theZ-axis coordinate and the minimum wireless communication base station selection algorithm.The rest of this paper is organized as follows. Section2 introduces the related work. Section 3 gives the main algorithm of 3D location. In Section 4, we have a discussion on the base station selection strategy to get the minimum number of wireless communication base stations for 3D location. In Section 5, the experimental results are presented and discussed. Finally, the paper is concluded in Section 6.


## 2. Related Work

According to classical target location algorithms, the existing target location works can be classified into locating based on ultra-wideband radios [2, 3] and wireless signal communications [4, 5] in the present stages. The wireless communication 3D location technology achieves great progress and has been used in many application fields. Chen et al. [6] have proposed a new 3D target localization method that uses iterative maximum weighted likelihood estimation and takes into account the spatial distribution of pseudotargets. The wireless location also has a big application in Internet of Things (IoT) [9–12]. Localization algorithms are also widely used in some practical target tracking applications. Jondhale et al. [13] have proposed a range-free generalized regression neural network localization algorithm as an alternative to the traditional range-based trilateration technique for a large-scale wheat farmland. They also present the modified Optimal Fitted Parametric Exponential Decay Model- (OFPEDM-) based signal path loss model to deal with the issue of environmental dynamicity. The result demonstrates superior localization performance (localization accuracy of the order of few centimeters over traditional trilateration irrespective of nonlinear system dynamics, path loss model, and environmental dynamicity. Oded et al. [14] have proposed the location estimation of a target node in a multipath environment based on one-way transmission of OFDM signals from unsynchronized base stations. Direct 3D location estimation in dense multipath [15, 16] has a high location accuracy. Pablo and Dehghan [17] have proposed the tree topology and radial distance constraint models, which can be applied to complex wireless and wired network communications, warehouse facility location, electrical power systems, water supply networks, and transportation networks, just to name a few.TOA/TDOA’s localization in IEEE 802.11 is increasingly sophisticated [18]. Jondhale et al. [19] have proposed a modified Kalman filtering framework based real-time target tracking against environmental dynamicity in wireless sensor networks. The results confirm that the proposed algorithms achieve better tracking accuracy and real-time performance, irrespective of environmental dynamicity, compared with the traditional RSSI (Received Signal Strength Indication) based algorithm. Jondhale et al. [20] use generalized regression neural networks to achieve Kalman filtering framework based real-time target tracking in wireless sensor networks. The proposed algorithms demonstrate superior tracking performance (tracking accuracy in the scale of few centimeters) irrespective of nonlinear system dynamics as well as environmental dynamicity. Jondhale et al. [21] proposed an application of generalized regression neural network as an alternative to these traditional techniques to obtain first location estimates of moving person using a hybrid network of PSOC BLE nodes and smart phone, which are further refined using Kalman filtering framework.Mixed model based on mathematics plays a significant role in indoor and outdoor 3D location [22–24]. Brena et al. [25] have summarized the indoor location technologies and mentioned a lot of 3D techniques. However, as far as we know, the location technology for Z-axis coordinate information has not been addressed at the present stage. At least the accuracy has to be improved. Three-side measurement location [7, 8] is one of the most basic target location methods, and it can achieve accurate localization in complex environments. To overcome the disjunction between received signal strength and distance estimates, Raguraman et al. [26] have proposed the algorithms that include preprocessing factors for manipulating received signal strength to follow a sphere-based deployment region for deployment of particles. Kumar et al. [27] considered the edge weights between each target node and neighboring anchor nodes to compute the location of the target node, which can overcome the nonlinearity between received signal strength and distance.TheZ-axis coordinate of the target plays a significant role in 3D location, which exists in wireless communication location system widely. On one hand, Z-axis coordinate can cause a big impact on target accurate location, especially in some complex external environments, such as city, ocean, and sky. Z-axis information is easy to be ignored, because the Z-axis coordinate differs from those of X-axis and Y-axis by two levels of magnitudes, which results in the imbalance of data value. On the other hand, the intermediary of the signal transmission is complex in the practical application scenes. For example, TOA, AOA, LOS, TDOA, and NLOS are affected by many factors. To establish the 3D location model based on wireless communication base stations, other influencing factors such as multipath propagation and different mobile electronic devices also should be considered comprehensively [16, 24, 25]. At the same time, the fusion of various measurement data can improve the noise resistance and location accuracy effectively. Due to the movement of target terminal equipment, the observed distance error model can be improved into a dynamic error correction model. The difficulty of the Z-axis location coordinates (TOA caused by NLOS in this paper) has caused great confusion among researchers. Therefore, this is an interesting and challenging problem for us to study and research.


## 3. Modified 3D Location Algorithm

### 3.1. Analysis of Modified Observation Distance

In this section, the detailed design ideas of our model will be discussed. By analyzing the functional relationship between the observation distance calculated by TOA and the actual distance with the estimated coordinates between the base station and target, the observation distance modification algorithm model can be established. Since the scenes of the obtained measurement data are different in the specific implementation steps of the algorithm, the parameters of the modified model need to be improved. Therefore, theZ-axis coordinate data should be weighted; that is because the optimal parameters can be obtained by solving the optimization equation. To determine the weight value, the heuristic search algorithm is used to obtain the optimal parameter values.The TOA value between the targeti and the base station j is noted as tij; the velocity of light is c=3×108m/s. The real coordinate of the target i is xi,yi,zi, and the coordinate of the base station j is xj,yj,zj. The observed distance is Sij and the real distance calculated by coordinates is Sij′. The computational formula is shown as follows:(1)Sij=c∗tij,Sij′=xi−xj2+yi−yj2+zi−zj2.We use the regression analysis to analyze the observed distance and the real distance and construct a linear relationship of them. Therefore, the relationship between the observation distances, which are calculated by TOA from the target to the base stations, and the real distances can be established as follows:(2)Sij∧=kSij,where k is the modified correction factor.


### 3.2. Modified Least Squares Algorithm

The principle of the three-side measurement location method is to calculate the distances between multiple base stations and the target, so as to determine the location coordinate of the target. It is shown in Figure1 that, for a two-dimensional (2D) location system, the coordinates of an undetermined target can be determined by using three or more communication base stations. Similar to the three-side measurement method, in a 3D location system, the coordinates of an undetermined target to be determined by the distances need at least 4 base station nodes. The location diagram is shown in Figure 2.Figure 1
Schematic diagram of three-side measurement location.Figure 2
Schematic diagram of 3D measurement location.In practical applications, the least squares algorithm is adopted to process the data firstly in order to reduce the influence of measurement error. The main method of least squares algorithm is to minimize the mean square error of the established function with the real value.


#### 3.2.1. The Original Least Squares Algorithm

The 3D coordinates of the base stations are represented asBi=xi,yi,zi,i=1,2,…,N, and the coordinate of the observed target is M=x,y,z. Then the least square estimation of the 3D coordinates of the target is(3)x^,y^,z^=argminx,y,z1N∑i=1Ndi−xi−x2+yi−y2+zi−z2,i=1,2,⋯,N,where di=cti,c=3∗108m/s,ti is the TOA value between target M and communication base station Bi,i=1,2,⋯,N, and i represents the ID number of base stations.


#### 3.2.2. Modified Observation Distance

We can get the modified distance between the target and wireless communication base stationdi∗ based on formula (2), which is shown as follows:(4)di∗=kdi.


#### 3.2.3. Amplification of Z-Axis Coordinate

Expand the distance term in formula (3) as follows:(5)xi−x2+yi−y2+zi−z2=xi2+yi2+z2+x2+y2−2xix−2yiy+zi2−2ziz.The above term containingzi is easy to be ignored because zi is much smaller compared with xi,yi. It easily leads to the loss of the Z-axis coordinate information of the base station, resulting in a big error of the Z-axis coordinate of the target. Therefore, in order to increase the influence of Z-axis, the Z-axis coordinate value should be amplified.Set weight valuesW1 and W2W1>W2>1 and weight zi−z2 as(6)W1zi2−2W2ziz+W1z2.


#### 3.2.4. Modified Least Squares Algorithm

The modified least square estimation of the 3D coordinates is obtained by modifying the original least squares algorithm as follows:(7)x^,y^,z^=argminx,y,z1N∑i=1Nkdi−xi−x2+yi−y2+W1zi2−2W2ziz+W1z2,i=1,2,⋯,N.We can solve the above equation and obtain(8)M∧=A′TA′−1A′TB′,where(9)A′=2x1−xNy1−yNW2z1−zNx2−xNy2−yNW2z2−zN⋮⋮⋮xN−1−xNyN−1−yNW2zN−1−zN,B′=x12−xN2+y12−yN2+W1z12−zN2+k2dN2−d12x22−xN2+y22−yN2+W1z22−zN2+k2dN2−d22⋮xN−12−xN2+yN−12−yN2+W1zN−12−zN2+k2dN2−dN−12.


#### 3.2.5. The Algorithm of Determining the Error Coefficientk and Z-Axis Magnification Weights W1 and W2

It is impossible to judge the time delay under NLOS because each set of data corresponds to different actual scenes. The errors under NLOS are different, as well as measurement errors and out-of-sync clocks. Therefore, it is required that the proposed algorithms can be tailored to different target location scenes.The method of determining the error function coefficientk and Z-axis coordinate magnification weights W1 and W2 is shown as Algorithm 1. Firstly, we initialize the weights W1 and W2 and fix them, change the error function coefficient k, and calculate the errors between the target and base stations. Secondly, we calculate all target square errors and obtain the mean square error by using iterative algorithm. The coefficient k under the minimum mean square error is the optimal coefficient. Finally, we fix the optimal coefficient k and change the weights W1 and W2 by a certain step size. Therefore, the optimal weights W1 and W2 are obtained if the error is less than the set threshold.Algorithm 1: Modified least squares algorithm for the 3D target location.
Input: Modified least squares algorithm for the 3D target locationInitialization: Initialize k, W1, W2Fix the weightsW1, W2, and optimize the coefficient k:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update the error coefficient k by a certain step size, and modify the observation distancesstep 2 Calculate the target coordinates by using the modified observationsend while Obtain the optimal error coefficient kFix the coefficientk, and optimize the weights W1, W2:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update W1, W2 by a certain step sizestep 2 Get the target coordinates after using the weighted least squares methodend while Obtain the optimal weightsW1, W2Calculate the target coordinates by the final optimized error coefficientk and weights W1,W2Output: The 3D coordinates x∗,y∗,z∗ of the target


### 3.3. The Flow Chart of the Proposed Algorithm

The flow chart of the proposed algorithm is shown in Figure3. The beginning of realizing the 3D target location is to read the base station location information and the target TOA data firstly. Then modify the model according to modified least squares algorithm for the 3D target location, which is shown as Algorithm 1. The proposed algorithm is mainly to modify the Z-axis coordinates and eventually use the minimum mean square error to determine the weight parameters of the algorithm.Figure 3
The flow chart of the modified least squares algorithm.


## 3.1. Analysis of Modified Observation Distance

In this section, the detailed design ideas of our model will be discussed. By analyzing the functional relationship between the observation distance calculated by TOA and the actual distance with the estimated coordinates between the base station and target, the observation distance modification algorithm model can be established. Since the scenes of the obtained measurement data are different in the specific implementation steps of the algorithm, the parameters of the modified model need to be improved. Therefore, theZ-axis coordinate data should be weighted; that is because the optimal parameters can be obtained by solving the optimization equation. To determine the weight value, the heuristic search algorithm is used to obtain the optimal parameter values.The TOA value between the targeti and the base station j is noted as tij; the velocity of light is c=3×108m/s. The real coordinate of the target i is xi,yi,zi, and the coordinate of the base station j is xj,yj,zj. The observed distance is Sij and the real distance calculated by coordinates is Sij′. The computational formula is shown as follows:(1)Sij=c∗tij,Sij′=xi−xj2+yi−yj2+zi−zj2.We use the regression analysis to analyze the observed distance and the real distance and construct a linear relationship of them. Therefore, the relationship between the observation distances, which are calculated by TOA from the target to the base stations, and the real distances can be established as follows:(2)Sij∧=kSij,where k is the modified correction factor.


## 3.2. Modified Least Squares Algorithm

The principle of the three-side measurement location method is to calculate the distances between multiple base stations and the target, so as to determine the location coordinate of the target. It is shown in Figure1 that, for a two-dimensional (2D) location system, the coordinates of an undetermined target can be determined by using three or more communication base stations. Similar to the three-side measurement method, in a 3D location system, the coordinates of an undetermined target to be determined by the distances need at least 4 base station nodes. The location diagram is shown in Figure 2.Figure 1
Schematic diagram of three-side measurement location.Figure 2
Schematic diagram of 3D measurement location.In practical applications, the least squares algorithm is adopted to process the data firstly in order to reduce the influence of measurement error. The main method of least squares algorithm is to minimize the mean square error of the established function with the real value.


### 3.2.1. The Original Least Squares Algorithm

The 3D coordinates of the base stations are represented asBi=xi,yi,zi,i=1,2,…,N, and the coordinate of the observed target is M=x,y,z. Then the least square estimation of the 3D coordinates of the target is(3)x^,y^,z^=argminx,y,z1N∑i=1Ndi−xi−x2+yi−y2+zi−z2,i=1,2,⋯,N,where di=cti,c=3∗108m/s,ti is the TOA value between target M and communication base station Bi,i=1,2,⋯,N, and i represents the ID number of base stations.


### 3.2.2. Modified Observation Distance

We can get the modified distance between the target and wireless communication base stationdi∗ based on formula (2), which is shown as follows:(4)di∗=kdi.


### 3.2.3. Amplification of Z-Axis Coordinate

Expand the distance term in formula (3) as follows:(5)xi−x2+yi−y2+zi−z2=xi2+yi2+z2+x2+y2−2xix−2yiy+zi2−2ziz.The above term containingzi is easy to be ignored because zi is much smaller compared with xi,yi. It easily leads to the loss of the Z-axis coordinate information of the base station, resulting in a big error of the Z-axis coordinate of the target. Therefore, in order to increase the influence of Z-axis, the Z-axis coordinate value should be amplified.Set weight valuesW1 and W2W1>W2>1 and weight zi−z2 as(6)W1zi2−2W2ziz+W1z2.


### 3.2.4. Modified Least Squares Algorithm

The modified least square estimation of the 3D coordinates is obtained by modifying the original least squares algorithm as follows:(7)x^,y^,z^=argminx,y,z1N∑i=1Nkdi−xi−x2+yi−y2+W1zi2−2W2ziz+W1z2,i=1,2,⋯,N.We can solve the above equation and obtain(8)M∧=A′TA′−1A′TB′,where(9)A′=2x1−xNy1−yNW2z1−zNx2−xNy2−yNW2z2−zN⋮⋮⋮xN−1−xNyN−1−yNW2zN−1−zN,B′=x12−xN2+y12−yN2+W1z12−zN2+k2dN2−d12x22−xN2+y22−yN2+W1z22−zN2+k2dN2−d22⋮xN−12−xN2+yN−12−yN2+W1zN−12−zN2+k2dN2−dN−12.


### 3.2.5. The Algorithm of Determining the Error Coefficientk and Z-Axis Magnification Weights W1 and W2

It is impossible to judge the time delay under NLOS because each set of data corresponds to different actual scenes. The errors under NLOS are different, as well as measurement errors and out-of-sync clocks. Therefore, it is required that the proposed algorithms can be tailored to different target location scenes.The method of determining the error function coefficientk and Z-axis coordinate magnification weights W1 and W2 is shown as Algorithm 1. Firstly, we initialize the weights W1 and W2 and fix them, change the error function coefficient k, and calculate the errors between the target and base stations. Secondly, we calculate all target square errors and obtain the mean square error by using iterative algorithm. The coefficient k under the minimum mean square error is the optimal coefficient. Finally, we fix the optimal coefficient k and change the weights W1 and W2 by a certain step size. Therefore, the optimal weights W1 and W2 are obtained if the error is less than the set threshold.Algorithm 1: Modified least squares algorithm for the 3D target location.
Input: Modified least squares algorithm for the 3D target locationInitialization: Initialize k, W1, W2Fix the weightsW1, W2, and optimize the coefficient k:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update the error coefficient k by a certain step size, and modify the observation distancesstep 2 Calculate the target coordinates by using the modified observationsend while Obtain the optimal error coefficient kFix the coefficientk, and optimize the weights W1, W2:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update W1, W2 by a certain step sizestep 2 Get the target coordinates after using the weighted least squares methodend while Obtain the optimal weightsW1, W2Calculate the target coordinates by the final optimized error coefficientk and weights W1,W2Output: The 3D coordinates x∗,y∗,z∗ of the target


## 3.2.1. The Original Least Squares Algorithm

The 3D coordinates of the base stations are represented asBi=xi,yi,zi,i=1,2,…,N, and the coordinate of the observed target is M=x,y,z. Then the least square estimation of the 3D coordinates of the target is(3)x^,y^,z^=argminx,y,z1N∑i=1Ndi−xi−x2+yi−y2+zi−z2,i=1,2,⋯,N,where di=cti,c=3∗108m/s,ti is the TOA value between target M and communication base station Bi,i=1,2,⋯,N, and i represents the ID number of base stations.


## 3.2.2. Modified Observation Distance

We can get the modified distance between the target and wireless communication base stationdi∗ based on formula (2), which is shown as follows:(4)di∗=kdi.


## 3.2.3. Amplification of Z-Axis Coordinate

Expand the distance term in formula (3) as follows:(5)xi−x2+yi−y2+zi−z2=xi2+yi2+z2+x2+y2−2xix−2yiy+zi2−2ziz.The above term containingzi is easy to be ignored because zi is much smaller compared with xi,yi. It easily leads to the loss of the Z-axis coordinate information of the base station, resulting in a big error of the Z-axis coordinate of the target. Therefore, in order to increase the influence of Z-axis, the Z-axis coordinate value should be amplified.Set weight valuesW1 and W2W1>W2>1 and weight zi−z2 as(6)W1zi2−2W2ziz+W1z2.


## 3.2.4. Modified Least Squares Algorithm

The modified least square estimation of the 3D coordinates is obtained by modifying the original least squares algorithm as follows:(7)x^,y^,z^=argminx,y,z1N∑i=1Nkdi−xi−x2+yi−y2+W1zi2−2W2ziz+W1z2,i=1,2,⋯,N.We can solve the above equation and obtain(8)M∧=A′TA′−1A′TB′,where(9)A′=2x1−xNy1−yNW2z1−zNx2−xNy2−yNW2z2−zN⋮⋮⋮xN−1−xNyN−1−yNW2zN−1−zN,B′=x12−xN2+y12−yN2+W1z12−zN2+k2dN2−d12x22−xN2+y22−yN2+W1z22−zN2+k2dN2−d22⋮xN−12−xN2+yN−12−yN2+W1zN−12−zN2+k2dN2−dN−12.


## 3.2.5. The Algorithm of Determining the Error Coefficientk and Z-Axis Magnification Weights W1 and W2

It is impossible to judge the time delay under NLOS because each set of data corresponds to different actual scenes. The errors under NLOS are different, as well as measurement errors and out-of-sync clocks. Therefore, it is required that the proposed algorithms can be tailored to different target location scenes.The method of determining the error function coefficientk and Z-axis coordinate magnification weights W1 and W2 is shown as Algorithm 1. Firstly, we initialize the weights W1 and W2 and fix them, change the error function coefficient k, and calculate the errors between the target and base stations. Secondly, we calculate all target square errors and obtain the mean square error by using iterative algorithm. The coefficient k under the minimum mean square error is the optimal coefficient. Finally, we fix the optimal coefficient k and change the weights W1 and W2 by a certain step size. Therefore, the optimal weights W1 and W2 are obtained if the error is less than the set threshold.Algorithm 1: Modified least squares algorithm for the 3D target location.
Input: Modified least squares algorithm for the 3D target locationInitialization: Initialize k, W1, W2Fix the weightsW1, W2, and optimize the coefficient k:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update the error coefficient k by a certain step size, and modify the observation distancesstep 2 Calculate the target coordinates by using the modified observationsend while Obtain the optimal error coefficient kFix the coefficientk, and optimize the weights W1, W2:while Calculate the real distances between the target and the base stations. Both of the real distances and the mean square error of the corrected observation distances are less than the set thresholdstep 1 Update W1, W2 by a certain step sizestep 2 Get the target coordinates after using the weighted least squares methodend while Obtain the optimal weightsW1, W2Calculate the target coordinates by the final optimized error coefficientk and weights W1,W2Output: The 3D coordinates x∗,y∗,z∗ of the target


## 3.3. The Flow Chart of the Proposed Algorithm

The flow chart of the proposed algorithm is shown in Figure3. The beginning of realizing the 3D target location is to read the base station location information and the target TOA data firstly. Then modify the model according to modified least squares algorithm for the 3D target location, which is shown as Algorithm 1. The proposed algorithm is mainly to modify the Z-axis coordinates and eventually use the minimum mean square error to determine the weight parameters of the algorithm.Figure 3
The flow chart of the modified least squares algorithm.


## 4. Analysis of Minimum Base Station Location Selection Strategy

The base stations in the network have strong spatial similarity when they are close to each other. It means that these base stations are in all probability under the same influence conditions in the real scenes, and their contributions to the target location are redundant. Considering the above problems, adjacent base stations are assigned to one same cluster firstly. Therefore, we can select the optimal base station in each cluster, which can provide as much information as possible for target location. Subsequently, this model reduces the computational complexity and the load balance of the base stations.The base stations with different types are often located far apart from each other, and this will lead to big errors, which are caused by signals refraction and reflection during the signal transmission from the target to the base stations in the real scenes.


### 4.1. Spectral Clustering of the Spatial Locations of Base Stations

For the sparsity of space, the base stations are clustered into different clusters firstly based on spatial location. The spatial location distributions of the base stations are comprehensively considered in this paper. Therefore, a few representative base stations are selected from each cluster after spectral clustering of the spatial base stations.Assume that the spatial coordinates of the base stations are known. Therefore, we can determine the useful base stations around the target. The TOA values have data redundancy when the distances among the base station nodes are close. The spatial location spectrum clustering of base station nodes can be carried out firstly.


### 4.2. The Selection Strategy of the Minimum Number of Location Base Stations

Firstly, the coordinate data of the base stations are clustered by method of spectral clustering and the number of clusters is represented asm. The corresponding m is the optimal number of base station classification when the change slope of mean square error tends to be stable. Then we find the optimal base stations in each cluster. The selection of the optimal base stations is actually to search for the closest base station node to the target in each cluster.The specific operation is introduced as follows. Firstly, we find the base stations that are closest to the target in each cluster as the initial optimal base stations according to the TOA. The TOA of these base stations are used to calculate the 3D coordinates of the target after obtainingm initial optimal base stations. Calculate the errors by all base stations between the observation distances and real distances after the coordinates of the target are obtained. If the selected base stations do not have the minimum error, reset the base stations with the minimum error as the ideal base stations. Fix the ideal base stations and then recalculate the target coordinates until the errors of the selected base stations are the smallest. Then, the optimal base station is obtained in the current cluster. Repeat the above steps to select the optimal base station in each cluster by using the iterative optimization algorithm until the final optimal base station is selected in each cluster.The 3D coordinates of all targets obtained from these optimal base stations need to be measured accurately. The error is shown as follows.(10)errori=xi−xi′2+yi−yi′2+zi−zi′2,MSE=∑i=1nerrori−error2n,where xi,yi,zi and xi′,yi′,zi′ represent the calculated coordinate and the reference coordinate of the target i, respectively; errori is the error between calculated coordinate and reference coordinate of the target i; error is the mean error for all targets; n is the number of errors.Increase the cluster number and repeat the above steps to find the optimal base stations under different cluster number and calculate the mean square error of the targets’ coordinates. The minimum numberm of base stations is needed to achieve accurate location when the change slope of the mean square error tends to be stable.The flow chart of the minimum base station location selection strategy is shown in Figure4.Figure 4
The minimum base station selection strategy.


## 4.1. Spectral Clustering of the Spatial Locations of Base Stations

For the sparsity of space, the base stations are clustered into different clusters firstly based on spatial location. The spatial location distributions of the base stations are comprehensively considered in this paper. Therefore, a few representative base stations are selected from each cluster after spectral clustering of the spatial base stations.Assume that the spatial coordinates of the base stations are known. Therefore, we can determine the useful base stations around the target. The TOA values have data redundancy when the distances among the base station nodes are close. The spatial location spectrum clustering of base station nodes can be carried out firstly.


## 4.2. The Selection Strategy of the Minimum Number of Location Base Stations

Firstly, the coordinate data of the base stations are clustered by method of spectral clustering and the number of clusters is represented asm. The corresponding m is the optimal number of base station classification when the change slope of mean square error tends to be stable. Then we find the optimal base stations in each cluster. The selection of the optimal base stations is actually to search for the closest base station node to the target in each cluster.The specific operation is introduced as follows. Firstly, we find the base stations that are closest to the target in each cluster as the initial optimal base stations according to the TOA. The TOA of these base stations are used to calculate the 3D coordinates of the target after obtainingm initial optimal base stations. Calculate the errors by all base stations between the observation distances and real distances after the coordinates of the target are obtained. If the selected base stations do not have the minimum error, reset the base stations with the minimum error as the ideal base stations. Fix the ideal base stations and then recalculate the target coordinates until the errors of the selected base stations are the smallest. Then, the optimal base station is obtained in the current cluster. Repeat the above steps to select the optimal base station in each cluster by using the iterative optimization algorithm until the final optimal base station is selected in each cluster.The 3D coordinates of all targets obtained from these optimal base stations need to be measured accurately. The error is shown as follows.(10)errori=xi−xi′2+yi−yi′2+zi−zi′2,MSE=∑i=1nerrori−error2n,where xi,yi,zi and xi′,yi′,zi′ represent the calculated coordinate and the reference coordinate of the target i, respectively; errori is the error between calculated coordinate and reference coordinate of the target i; error is the mean error for all targets; n is the number of errors.Increase the cluster number and repeat the above steps to find the optimal base stations under different cluster number and calculate the mean square error of the targets’ coordinates. The minimum numberm of base stations is needed to achieve accurate location when the change slope of the mean square error tends to be stable.The flow chart of the minimum base station location selection strategy is shown in Figure4.Figure 4
The minimum base station selection strategy.


## 5. Experimental Work and Discussion

In this section, we conduct a series of experiments with our work. The simulation parameters are shown in Table1.Table 1
Simulation parameters.
Optimal values of error coefficientλ0.0005Optimal parameters with respect toZ-axisW1,W21λ1k1δ0.1T(threshold)0.2Two sets of TOA measurements test data and 3D coordinates from the target to the base station, which are given in LOS or NLOS propagation environment, are shown as Test data 1 and Test data 2 (all the test data come from the China postgraduate mathematical contest in modeling). To verify the effectiveness of the proposed algorithm, we do the 3D location target experiment under Test data 1 and Test data 2. The experimental environment is Windows 7 64-bit system, MATLAB 2012a software, i7-4720HQ CPU, and 8 Gb memory.Tables2 and 3 show the target 3D location results between the estimated coordinates and the actual coordinates of our model under Test data 1 and Test data 2. According to the fact that the change slope of mean square error tends to be stable, we find the minimum number m of location base stations is 7. It can be seen from Tables 2 and 3 that the estimated coordinates calculated by our model are consistent with the real coordinates. Figures 5 and 6 show the 3D location MATLAB simulation results under 2 sets of Test data, respectively. It can be seen from Tables 2 and 3 and Figures 5 and 6 that the X-axis and Y-axis coordinates of most targets estimated by our model correspond to their real coordinates. This is because our model optimizes the coefficients and weights to eliminate the influence of observation data errors on the Z-axis in different scenes. The simulation results show that the mean square error of the X-axis and Y-axis is 0.3 m, and the error of the Z-axis is 0.5 m. These results reflect that the proposed modified least squares algorithm has a very high location accuracy in 3D target location.Table 2
Target 3D location results for Test data 1.
Estimated coordinateActual coordinateLocalization errorX-AxisY-AxisZ-AxisX-AxisY-AxisZ-Axis−21.274.721.75−21.194.481.480.37−81.0558.341.66−81.1458.241.380.31−95.58−214.562.02−96.13−215.221.021.32−295.03−19.882.29−296.06−20.151.591.2786.02−110.581.986.29−111.061.660.60−31.23244.31.86−31.26244.681.30.68−285.74−38.411.66−286.47−38.751.730.81318.41−169.452.07319.3−170.111.031.52−37.4272.961.84−37.4273.591.730.64254.966.622.03255.3466.631.210.93104.39203.191.95104.46203.541.950.36−120.2792.221.69−120.3992.321.720.16114.4198.182.05114.52198.681.330.88−314.63−69.952.41−315.97−70.51.361.79−257.345.671.79−257.845.431.320.73−18.19−30.692.1−18.52−30.781.570.63−312.9117.151.69−313.7916.871.630.93272.22267.811.75274.89268.51.342.79−301.54−281.562.42−302.82−282.681.232.08−319.3310.051.63−320.1510.091.810.84Table 3
Target 3D location results for Test data 2.
Estimated coordinateActual coordinateLocalization errorX-AxisY-AxisZ-AxisX-AxisY-AxisZ-Axis−258.83−341.151.59−259.2−341.861.120.93304.29−276.421.57304.83−276.831.480.68332.56−222.82−0.48332.86−223.331.712.27165.8−235.280.41165.98−235.581.30.96−292.88230.631.96−293.23230.91.240.84−103.3811.181.47−103.5511.091.150.37−32.38−260.630.91−32.56−260.881.40.58−248.95153.490.4−249.33153.471.861.51−200.08278.880.78−200.53279.141.761.11198.11263.271.25198.23263.551.010.39357.42−12.921.39357.88−12.891.510.48−26.3342.140.71−26.49342.761.821.29311.2374.111.47311.5874.051.410.36−302.16−77.251.76−302.56−77.341.850.42244.2835.011.61244.6934.991.720.42−51.68−212.61.1−51.79−212.881.840.80−369.568.820.12−370.2568.841.021.17−147.79−81.431.5−148.05−81.661.260.42−354.16−57.141.97−354.64−57.111.540.65−337.22−306.790.95−337.78−307.481.891.29Figure 5
3D location results under Test data 1.Figure 6
3D location results under Test data 2.Figure7 shows the mean square error of locations of different algorithms in same experiment and test data. Table 4 gives the mean localization error rate of Z-axis of different algorithms. It can be seen from Figure 7 that the mean location errors of this paper are the smallest. This is because the algorithm proposed in this paper modifies the errors of Z-axis and the measured distance, respectively, which is shown in Table 4. Therefore, the noise effect of measured distance is smaller than those of [7, 8] and the location of Z-axis can reach the accuracy level of X-axis and Y-axis. At the same time, the parameters are modified repeatedly by the minimum mean error in the parameter selection stage of the proposed algorithm, so that the overall distance error is smaller and the location accuracy is higher.Figure 7
Mean square error of locations of different algorithms.Table 4
The mean localization error rate ofZ-axis of different algorithms.
Our model (%)Reference [7] (%)Reference [8] (%)Test data 123.7527.2625.37Test data 218.2322.1220.82


## 6. Conclusion

This paper extended the 3D target location technology based on wireless communication networks. Considering that the TOA of radio signals is mainly affected by NLOS and other factors, our algorithm can achieve the accurate 3D locating results of the target. The main innovation of this paper is the establishment of the modified least squares algorithm for target 3D location, especially for theZ-axis location coordinates.For the reason of technical difficulty, we just consider the case of NLOS influence on the communication signals in this paper. However, the target location environment is complex in real application scenes, and the wireless signal propagation from the target to the base stations will be affected by many factors. To improve the signals noise resistance and achieve target location accuracy, future works shall include the fusion of various measurement data, effective combination of other location techniques, and the error model of observed TOA value.



---

*Source: 5879415-2020-09-02.xml*