Abstract
Wireless sensor network (WSN) is an emerging technology that can detect, collect, and transmit information in a specific unknown area in an unknown environment. It is currently playing an increasingly important role in the fields of national defense, medical and health, and daily life. WSN node location information is extremely important in many WSN applications. The data information collected by WSN is developed based on known node location information. The node location is one of the important issues in WSNs. Location information is very important for wireless sensors. A WSN without sensor node location information is meaningless because almost all WSN applications need to know node location information, such as animal populations, tracking research, early warning of building fires, management of goods in warehouses, and traffic monitoring systems. Several research works are underway to expand the 2D positioning algorithm in WSN to 3D regardless of the deployment structure of sensor nodes. This paper proposes an improved Savarese algorithm to the problem of singularity in WSN node localization. The proposed algorithm is a modified version of the conventional Savarese algorithm, and it solves the singularity problem and improved the positioning accuracy. Simulation results show that the proposed algorithm effectively improved system performance, and the accuracy is improved over 2.83% and 2.96% than the existing algorithms. The proposed scheme is effective for indoor environments while it can be deployed outdoor for small-scale.
1. Introduction
With the development of the Internet, wireless sensor network (WSN) localization technology has been widely used in environmental monitoring, target tracking, underwater monitoring, and other fields where node localization is one of the key applications of WSN [1]. In the history of the development of WSN, application-oriented precise design can well meet user needs, while distributed deployment and operation can better adapt to the sensor monitoring environment. These two points are rapid development and wide application. Recently, the promising Internet of things (IoT) and cyber-physical systems (CPS) have flourished as the key supporting technology for sensing the physical world [2]. WNSs are used in environmental monitoring and forecasting, forest fire prevention, geology disaster monitoring, early warning, urban transportation, space exploration, medical health monitoring, and other aspects have important application prospects. Node location technology is one of the hotspots of WSN research [3]. WSN is a network system built by wireless communication to sense and collect information in the target area and transmit it to the monitoring center. In environmental monitoring, it is necessary to know the location of the event source, such as the location of the pollution source and forest fire location of occurrence [4].
Positioning technology is one of the key supporting technologies for WSNs. Accurate node location information is required in many applications such as WSN information collection and transmission, target tracking, information management, and geographic location-based routing. In general, node data without location information is meaningless. In practical application environments, nodes are usually randomly deployed to complex 3D environments (such as mountain surfaces, seabed, or air). Especially in the mountain surface environment, the terrain may cause problems such as low connectivity between nodes and blocked communication. Therefore, how to achieve high-precision and low-energy-consumption node localization in an irregular and complex 3D environment has become the focus of research [5].
Data collection without location information is meaningless. Therefore, the location of nodes is an important basis for wireless sensor network applications. The application scenarios of the system mainly include hospitals and homes. In the hospital scenario, the medical wireless sensor system (MWSN) is divided into two levels, a hospital-level information platform and ward monitoring system (if necessary, an intermediate level can be added as needed) [5]. In the ward monitoring system, the medical equipment node collects human physiological parameters, and after preprocessing the collected parameters, the data is transmitted to the ward monitoring system base station directly or indirectly through ZigBee communication. Multiple such networks communicate through a wireless local area network (WLAN) to form a monitoring network covering the entire hospital [6]. The hospital-level information platform further analyzes the data and forwards it to the doctor for processing, provides timely information feedback to the patient, and records the diagnosis and treatment status [7]. In the home scenario, a dedicated personal medical terminal collects patient physiological information and gives feedback. Combined with a medical cloud platform based on 4G and 5G technology, it can also be expanded to a larger range of remote medical monitoring systems, sharing information with other monitoring centers [8]. WSNs have different characteristics from general networks in many ways. In general networks, transmission speed and large-capacity data transmission are important, and it is built based on infrastructures such as routers and base stations so that the administrator can set information necessary for routing. On the other hand, the sensor node of WSN is operated by a battery, so saving power is very important.
In practical applications, node localization is mostly based on a three-dimensional (3D) environment such as a complex mountain ring environment. Therefore, the study of localization technology in complex mountain environments is of great significance. It has become more and more important to use certain mechanisms or algorithms to realize node positioning [9]. In many cases, small-capacity sensor data is transmitted by multihop. Also, depending on the service, there may be cases in which a person directly installs sensor nodes in an appropriate location, such as healthcare, and an airplane sprays sensor nodes on the ground, such as a surveillance and reconnaissance sensor network [10]. When many sensor nodes are randomly distributed, the WSN is organized into a hierarchical network, and clustering is used to effectively manage the sensor nodes. Since it is impossible to manage the network by entering location information into each node, it is impossible to determine the appropriate location for the WSN [11].
In order to improve the performance of node localization of WSN, this paper proposes a positioning algorithm that does not have a singular point problem when positioning based on 3D WSN. The key contributions of the proposed study are as follows: (i)The modified Savarese approach presented in SALAM’s local positioning phase was used to acquire a 3D location(ii)The suggested technique eliminates the singularity problem and improves positioning accuracy by modifying the usual Savarese algorithm
The remaining of this paper is organized as follows. In Section 2, the related research is described. Section 3 provides the assumptions and related definitions. In Section 4, the simulation results are provided while Section 5 concludes the paper.
2. Related Work
Wireless sensor network (WSN) is an emerging technology that can detect, collect, and transmit information in a specific unknown area in an unknown environment. At present, it plays an increasingly important role in the fields of national defense, health care, and daily life. WSN node location information is extremely important in many WSN applications. The data information collected by WSN is based on the known node location information [12].
Reference [13] proposes a nonranging positioning algorithm for the problem that the 3D DV-HOP WSN positioning algorithm has a large positioning error in the actual terrain. The experiments show that the algorithm reduces the positioning error. Reference [14] proposed a 3D localization algorithm with low communication loss and simple design, aiming at the problem of unknown initial position of sensor nodes in WSN. The final simulation results show that this algorithm has small node localization error. Reference [15] proposes a three-dimensional localization algorithm for agricultural WSN, aiming at the problem of convergence speed in the later stage of evolution of the standard particle swarm optimization algorithm, and it is easy to fall into the local minimum point. Simulation results show that the stability and positioning accuracy of this method are better than those of standard particle swarm optimization. In [16], a 3D localization algorithm 3D-LE-LPCCA was created to solve the problems of low accuracy and poor stability of the current WSN 3D space localization algorithm. The final simulation results show that the algorithm has good positioning accuracy and stability. Reference [17] proposed a weighted least square distance estimation method based on mobile beacons. The simulation results show that the method improves the positioning accuracy. Reference [18] uses neural network to locate unknown nodes. Experiments show that RBF neural network has better localization accuracy, and MLP neural network has the best computing and storage resources. Reference [19] proposed a new target tracking dual-distributed sensor localization system, and the results showed that the localization accuracy was improved to a certain extent. Reference [20] uses a 3D localization algorithm based on coplanarity units to achieve localization accuracy. References [14, 21] use dissimilarity matrix to represent the distance of each node to other nodes, and the final simulation results prove the effectiveness of the algorithm. Reference [22] implements localization by introducing a 3D Voronoi diagram to divide the 3D location space and construct an order of virtual beacon nodes. Simulation experiments show that it can improve the positioning accuracy of complex three-dimensional space nodes and reduce the cost of measurement and calculation. Reference [23] reduced the computational complexity by modeling the nonlinearity between received signal strength (RSS) and distance using a fuzzy logic system (FLS) and optimized it through hybrid particle swarm optimization (HPSO), and biogeography-based optimization (BBO) is further optimized to minimize errors. In [24], in order to improve the location accuracy of unknown nodes, a distributed node location algorithm for wireless sensor networks based on CKF is proposed. Simulation results show that the algorithm has excellent localization performance. However, it requires large number of computations and energy
To improve the positioning accuracy of the nodes, related personnel have made some improvements based on the classic positioning algorithms studied by the predecessors. The authors in [25] proposed a DV-HOP positioning algorithm MPSO-DV-HOP optimized based on the multiparticle swarm (MPSO) algorithm. The algorithm needs to set the threshold of the number of hops before the experiment, and the particle swarm is the theory; the same node is located through several nodes, but this does not make full use of anchor nodes, and the algorithm efficiency is not high. The authors in [26] proposed a WSN three-dimensional positioning algorithm based on the center of gravity of the anchor ball intersection. The three-dimensional positioning algorithm is reduced to a two-dimensional plane to achieve positioning, which reduces the amount of calculation, but the algorithm uses the initial ball radius increase method to update the perception radius of anchor nodes and require a larger proportion of anchor nodes, so it cannot be widely used. The authors in [27] proposed a three-dimensional space node positioning algorithm APIT-3D, which expands the APIT algorithm in the two-dimensional plane to three dimensions, but the anchor node in the algorithm does not follow the positioning algorithm while proceeding. The authors in [28] propose a bounding cube algorithm based on the trilateration method to realize node positioning based on the bounding box algorithm in [29], which requires a higher number of anchor nodes around unknown nodes and fewer anchor nodes. It is difficult to achieve positioning at a time. In a 3D WSN, if the nodes used for positioning are on the same plane, a singularity problem occurs that cannot determine a unique solution. In a typical cluster topology, the positioning algorithm SALAM (a scalable anchor-free localization algorithm) [30] using distance measurements between nodes is difficult to apply directly to 3D as it assumes the arrangement of sensor nodes in 2D.
Therefore, this paper proposes a positioning algorithm that does not have a singular point problem when positioning based on 3D WSN. The proposed algorithm effectively improved the localization performance by considering various important criteria, and the numerical results proved its effectiveness.
3. Positioning Using SALAM Algorithm
After the sensor nodes are placed in the target area, the SALAM clustering phase begins during the booting and initialization process of the sensor network, which consists of overlapping multihop clusters, and each cluster head has a distance measure between all nodes in the cluster. When finished, the local positioning is performed. In Figure 1, a node that has already been located is called a beacon, and is defined, and a node to be located is defined as . is the distance measurement from to , and is the distance measurement between and . For the local coordinate system, the ABC (assumption-based coordinates) algorithm is used. This method starts with the assumption that is located at (0,0,0). Assume that is located at (,0,0). Here, is the distance measurements between and . Assuming that is above 2 and is positive, and is 0, the location of is determined using and . Once the local coordinate system is determined, the initial positions of the nodes are gradually obtained using the cosine law. The position calculation candidate node with the largest number of anchors uses two anchors that are close to the local coordinate system and an anchor that is optimally arranged with them. In Figure 1, we can see the process of estimating the location of the node . can be obtained by (1), and are the size components of the position coordinates and of , and the position is obtained as equations (2)–(5). is a unit vector in the direction from baseline to .

Here, is the unit vector in the direction perpendicular to . For node , there are two position candidates, and :
As shown in Figure 1, is the calculated distance using the estimated positions of and ; is the calculated distance using the estimated positions of and , and if , then is selected. This means that the calculated distances of and coincide with the measured value . Refer to the cosine position result [31–35].
After the local positioning phase is over, the global positioning is performed, and the cluster head nodes cooperate to obtain an overall map of the network. During the local positioning phase, the orientation of each cluster coordinate system is different. For positioning in two dimensions, the -axis and -axis directions must be the same, and in the three-dimensional case, the -axis directions must be the same. The global coordinate system uses rotation, transformation, and reflection of the local coordinate system matrix, and at least three boundary nodes belonging to both clusters must exist.
4. Positioning without Singularity Problem
The distance from the node to be located, to the beacon, , which is the node that has already been located, is expressed as follows:
Among them, is the distance between the node and the -th beacon, and is the AWGN measurement noise with zero mean and variance .
To get , square both sides and subtract to get equation (7). Here is the last beacon. Equation (7) can be expressed in a simple form using vectors as follows. Equation (9) deals with beacons and is expressed in a simple form as in equation (10). The user location can be obtained by applying the least square (LS) method to equation (10).
In equation (6), the measurement error is proportional to distance due to noise. This means that the existing Savarese method has not been performed, but if this information is used as a weight, more accurate positioning is possible. For the two measurements and , the error is an independent AWGN with a mean of zero and a variance of .
The covariance of equation (8) is calculated as follows.
Since , it is reasonable to assume that . Now equation (11) becomes
Knowing and using the weighted least square (WLS) method, the position and covariance are obtained as in equations (13) and (14). Now assuming AWGN, the WLS becomes MLE (maximum likelihood estimation).
The arrangement of beacons is divided into a general arrangement and an arrangement with the same width, height, and height. In the latter case, the singularity problem still occurs when the position is calculated using equation (13), the existing Savarese method. To solve the singularity problem in the 3D wireless sensor network, the modified Savarese method is applied to the placement decision step and the algorithm application step.
4.1. Deployment Decision Step
The difference between the width, height, and height of the beacons is compared with a predetermined threshold to determine whether it is a singular matrix. The threshold is set to a value greater than 0, which takes into account the positional error due to the measurement error component. Equations (15)–(17) define the difference between the width, height, and height of the node arrangement.
After determining the operation mode using Algorithm 1 by comparing the difference with the preset threshold, in the next step, the modified Savarese method is applied according to the operation mode. The threshold is determined taking into account measurements and placement.
|
4.2. Algorithm Application Stage
In the case of general arrangement, the Savarese method is applied to obtain the node positions , , and at the same time. As shown in Figure 2(a), nodes 1 to 9 are evenly arranged, and the location is gradually calculated based on the local coordinate systems 1, 2, 4, and 5. In the scenario, nodes 2, 3, 6, and 7 are arranged usually horizontally (). When all beacons are installed on the same side, the first column of matrix becomes , and the inverse matrix cannot be obtained. Even if all beacons are installed on different streets if the horizontal difference is not large , it becomes an ill-conditioned matrix. In the case of WSN, this is a possible deployment.

(a)

(b)

(c)
To solve this singularity and ill-conditioned problem, we provide an alternative positioning method that uses equation (18) instead of equation (7). Equation (19) can be obtained by a similar method used in equation (10), where is the location of the node and is a measurement vector with as the -th element. is an matrix in which the -th column has .
By applying the LS method to equation (19), is obtained without the problem of singularity. Estimation of horizontal is obtained using equation (20) with a fixed . A more accurate height can be obtained by averaging the estimates from all beacons.
The position covariance is .
There are two candidate solutions for in equation (20), like in equation (21) and in equation (22).
where is from 1 to . The average of equation (21) is defined as , and the average of equation (22) is defined as . Beacons whose location has already been obtained but are not included in the communication range and thus cannot be measured. In Figure 2(a), the average of 1, 4, 5, and 8 is defined as . Among and , a candidate whose value is far from is selected as the final position. That is if it is greater than , select ; otherwise, select .
As shown in Figure 2(b), if the beacons have the same length, equation (23) is used.
Here, is the location of the node, is an measurement vector with the -th element having , and is an matrix with in the -th column. From equation (23), first, find of the node, and in the position calculation that is not used directly, 1, 2, 5, and 6 in Figure 2(b) are used to determine the sign of equation (24). The position covariance is .
As shown in Figure 2(c), when the beacons have the same height, use equation (25).
where is the location of the node, is a measurement vector in which the -th element has , and is a matrix in which the -th column has . First, find the of the node from equation (25), and determine the sign of equation (26) using beacons that are not directly used for position calculation and 1, 2, 3, and 4 in Figure 2(c). The position covariance is .
5. Simulation Results
This section provides the results of the numerical simulations of the proposed SALAM algorithm. The simulation results of the Savarese method are presented. The result of arranging 27 nodes at 10 m intervals in a testbed with a width of 20 m in height is shown in Figure 3(a). At this time, it is assumed that the measurement error is 0.02 m, and the maximum measurement distance is 18 m. The reason why the maximum measurement distance is set to 18 m (average connection diagram 14) is to ensure that the same horizontal, vertical, and height cases occur from the ninth node including the local coordinate system. If the maximum measuring distance is more than 20 m, the singularity problem does not occur. For convenience, the nodes (, , , ) composed of bold colors in the lower part of Figure 3 are assumed to be the local coordinate system. From this, the positions to the last node are obtained sequentially. In the above assumption, the result of positioning in a 3D uniform arrangement of nodes is shown in Figure 3(b). The color bar on the right shows the color according to the error size. The larger the error is, the whiter it is, and the smaller it is the blacker part. The unit of error size is in cm. Figure 3(c) shows the location result using the existing Savarese method. After the ninth node, a singularity problem occurred, and the location could not be properly determined. The proposed modified Savarese method has better performance than the cosine law.

(a)

(b)

(c)

When gradually finding the location within the cluster, the result of the location error at each point of the node is shown in Figure 4. The cluster size on the -axis refers to the order of node calculation when gradually finding the location and the -axis in Figure 2(b). It is the average of the results of 100 attempts at each point similar to the result of the position error. The first four had a location error of 0, assuming that the location was known as a local coordinate system node, and was less than 20 cm overall.
In Figure 5, the position error according to the measurement error was attempted 100 times and averaged. From this result, it is possible to predict the location accuracy according to the measurement error. For example, if the design target is a position error of 1 m or less, the measurement error should be less than 70 cm.

Figures 6 and 7 are compared with RMSE and average positioning time of the proposed and reference [25] algorithms under node density and number of neighbor nodes. As can be seen from Figure 6, the RMSE of both algorithms decreases with increasing node density. However, the proposed algorithm gives better RMSE than reference [25] algorithm which makes it superior in dense deployment scenarios in WSN. From Figure 7, we can see that the average positioning time of the proposed algorithm is lower than that of reference [25] which indicates that the proposed algorithm is computationally efficient and requires less memory and overhead.


Table 1 compares the actual and estimated locations of nodes for the proposed and reference [25] algorithms in 3D localization scenario.
6. Conclusion
In this paper, a new algorithm is proposed for 3D localization in WSN. The 3D position was obtained by applying the modified Savarese method proposed in the local positioning step of SALAM. In particular, the problem of singularity that occurs when nodes have the same width, height, or height is solved. For positioning based on wireless sensor networks, the modified Savarese method can be applied as a positioning algorithm. The numerical simulation verifies the effectiveness of the proposed algorithm which improved the positioning accuracy. Future work will be to consider other important aspects of the localization and evaluate it.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.