The Internet of Things (IoT) is envisioned as a network of various wireless sensor nodes communicating with each other to offer state-of-the-art solutions to real-time problems. These networks of wireless sensors monitor the physical environment and report the collected data to the base station, allowing for smarter decisions. Localization in wireless sensor networks is to localize a sensor node in a two-dimensional plane. However, in some application areas, such as various surveillances, underwater monitoring systems, and various environmental monitoring applications, wireless sensors are deployed in a three-dimensional plane. Recently, localization-based applications have emerged as one of the most promising services related to IoT. In this paper, we propose a novel distributed range-free algorithm for node localization in wireless sensor networks. The proposed three-dimensional hop localization algorithm is based on the distance error correction factor. In this algorithm, the error decreases with the localization process. The distance correction factor is used at various stages of the localization process, which ultimately mitigates the error. We simulated the proposed algorithm using MATLAB and verified the accuracy of the algorithm. The simulation results are compared with some of the well-known existing algorithms in the literature. The results show that the proposed three-dimensional error-correction-based algorithm performs better than existing algorithms.

Sensor nodes are a central part of Internet of Things (IoT) systems, enabling the IoT and the Industrial IoT (IIoT) by collecting, analyzing, storing, transmitting, and utilizing the data based on the application. Sensors are becoming more versatile, and they are used more and more in many IoT applications, including Industry 4.0, consumer wearables, healthcare services, and remote monitoring systems. A Wireless Sensor Network (WSN) is used in the design of the IoT for sensing the environment, collecting the data, and sending the data to the base station and to the locations used for analysis. In WSNs, sensor nodes operate together to sense the surroundings to attain a common goal. However, if a Base Station (BS) receives data from a particular event, but does not recognize where the event has happened, the BS cannot take the best action for the event. Because automation and intelligence have become prominent components of today’s technology-driven society, there is increasing demand for localization in various applications, including smart cities, smart healthcare, habitat monitoring, and military applications, among others [

Localization means the ability to discover where an event occurs. The security of the localization information is crucial for some applications, like missile target identification, disaster management, and monitoring of the elderly, among others [

In WSNs, the nodes that know their position in the network are called anchor nodes, and those that do not know their location are known as unknown nodes [

Consequently, we sought to find a range-free localization approach with greater accuracy in the 3D environment. While there has been a lot of research on the 2D environment, the 3D environment is actually where most of the real-world applications work. Working in the 3D environment is challenging, as it requires more complicated computations. In the last decade, much work has been done on hop-based algorithms, but there are still many issues related to accuracy and complexity. In this work, we propose an approach to enhance the accuracy of traditional hop-based algorithms for 3D environments. The proposed Three-Dimensional Distance-Error-Correction-based hop (3D-DECHop) localization algorithm is based on the distance error correction factor. The main contributions of the paper are as follows.

It proposes a distributed and range-free 3D localization algorithm based on the error correction factor for the hop-based localization system. The proposed algorithm mitigates error and increases accuracy.

The proposed approach is compared to the basic hop-based approach through empirical analysis to demonstrate its effectiveness.

An extensive assessment of the proposed approach and comparisons with other established algorithms of a similar nature are presented.

In this section we discuss some of the 3D localization algorithms reported in the literature. Localization for the 3D environment has been studied less than that for the 2D environment. One of the major challenges of the 3D localization algorithm is accuracy. There are several 3D localization algorithms that are well studied, such as Approximation Point in Triangle (APIT), centroid, amorphous, Multi Dimensional Scaling (MDS), grid scan, and Distance Vector hop (DV-Hop). Researchers have focused mainly on DV-Hop-based approaches because they are simpler and require less hardware. In general, a modified 3D DV-Hop approach depends on the error correction factor.

Chen et al. [

Yang et al. [

Another approach based on the multidimensional scaling technique for 3D node localization in a WSN is proposed by Stojkoska [

Chen et al. [

Some variations of the algorithms discussed above are presented with more analysis and in an improved form in [

In general, all hop-based algorithms are based on the Distance Vector (DV) approach. They include three basic steps: hop count calculation, average hop size calculation, and estimation of coordinates. First of all, the distances between the nodes are calculated using the hop count. Then hop size values are calculated for the estimation of coordinates, using any available method. During the distance calculation, there are opportunities for error accumulation, which can reduce localization accuracy. The algorithm is more prone to error when the environment is real, i.e., when the environment is 3D. In this section, we describe the proposed new 3D distance-error-correction-based hop (3D-DECHop) localization algorithm. It is based on our previous work, where we developed a distance error correction approach for 2D hop-based localization [

The proposed 3D-DECHop algorithm has the following steps:

Hop count calculation

Modified average hop size calculation based on distance error correction

Estimation of the coordinates

(_{a}, _{a}, _{a}): Coordinates of the anchor node

(_{u}, _{u}, _{u}): Coordinates of the unknown node

_{a}: Average hop distance of a particular anchor from other anchor nodes

_{a}: The error in distance between actual coordinates using hop-based distance

_{a}: An average of _{a}

_{u,a:} The distance between the unknown and the anchor node

In the proposed 3D-DECHop algorithm, the hop count calculation is done as in 3D DV-Hop and PSO-based 3D DV-Hop algorithms. All anchor nodes in the network broadcast the packets that contain the details of the coordinates, initially set as

Anchor nodes use the following equation,

After obtaining the average hop distance, anchors broadcast the _{a}. Once anchors receive and update their tables with the _{a}, they calculate the average of

Subsequently, the error regarding each anchor is identified as _{a} and then calculated with

Now each anchor broadcasts the error.

Again, we need to estimate the average error of each anchor with other anchors through

Now every anchor broadcasts the average error in the network. A node calculates the total error, considering all anchor nodes using

Finally, each unknown node finds the distance between the anchor node and other nodes through

Similarly, to reduce the distance error in 3D-DECHop, a product of the combined error with the hop count is subtracted from the updated distance, as per

After getting the distance, the multilateration method is used to find the coordinates, as shown in

Here, ^{T} is the value of the transpose of matrix

This section deals with the mathematical error analysis of the 3D-DECHop approach in comparison to traditional 3D DV-Hop by considering the scenario as shown in

Step 1:

Step 2: Let us assume that U is an unknown node. The traditional DV-Hop always finds the average hop distance of the closest anchor node. In the scenario from

However, the actual distance between

Step 3: To reduce the distance error, we use the average of the average hop distance corresponding to every anchor of the 3D-DECHop algorithm, as in

Every anchor then calculates the distance error, as per

Thus,

Thus,

Thus,

Similarly, the distance error of

Now, to calculate the total distance error, we use

Step 4: Calculating the distance between the unknown and the anchor node using

Thus,

The actual distance between

In this section, the behavior of the proposed 3D-DECHop in algorithm is analyzed using MATLAB [

Localization in 3D space shows how the algorithm would perform in actual space.

For the comparison of the proposed 3D-DECHop algorithm with existing algorithms, some common metrics are calculated as described below.

Here, _{u}, _{u} are the unknown node’s estimated coordinates and _{ac}, _{ac} are actual node’s coordinates. Other metrics, like RPE and LER, are computed in the same fashion as ALE.

Here,

Here, _{u}, _{u} are the unknown node’s estimated coordinates, and _{ac}, _{ac} are the unknown node’s actual coordinates.

The analysis of the 3D-DECHop algorithm is executed through simulations in MATLAB 2013 [

The 3D-DECHop algorithm is different from the basic centroid and novel centroid approaches proposed in [

Similarly, the impact of varying range on the given algorithms is shown in

The proposed algorithm is compared with the basic DV-Hop and 3D-OSSDL [

As shown in

Also, when the range of the node is increased from 30 m to 70 m while keeping the total number of nodes at 250 with a 10% anchor ratio, error is eventually reduced, as shown in

The 3D-DECHop algorithm is compared to the bounding cube and DBDV-Hop [

When the number of anchor nodes is changed from 6 to 20 with other parameters kept the same, positioning error decreases slightly at 10 anchor nodes, and then increases at 16 anchor nodes. But for the 3D-DECHop algorithm, the error variations are smaller than for the alternative algorithms; hence it is more stable and accurate. For 12 anchor nodes, the error is 0. 24 m for the proposed algorithm, as compared to 0.41 m and 0.49 m for DBDV-Hop and bounding cube, respectively. Similarly, changing the range affects the positioning error when the anchor node ratios are 14% and 16% with a total of 100 nodes, as shown in

Accuracy is one of the main factors for the assessment of various localization algorithms. It depends on the number of anchor nodes deployed. In this experiment, a total 200 nodes are implemented in the same space as in the previous comparisons. Each of these nodes has a fixed range of 30 m. To assess the performance, a LMSE value is calculated for situations where the number of anchor nodes varies from 10 to 60 nodes.

Sensor node deployment is chosen based on the application and the environment. The number of nodes affects the accuracy of the localization algorithms. Here, the number of sensor nodes has been increased from 100 to 400 for the space measuring 100 m × 100 m × 100 m. Each node has a range of 30 m, and the number of anchor nodes is fixed at 40. To assess the performance, a LMSE value is calculated for every number for nodes between 100 and 400.

The range value of the node is also one of the main factors for evaluating the accuracy of the given algorithm. Here the number of sensor nodes is fixed at 100 in the space measuring 100 m × 100 m × 100 m. The range value is allowed to vary from 22 m to 40 m for measuring the accuracy of the algorithm, while the number of anchor nodes is fixed at 30. Afterward, the LMSE value is calculated for range values from 22 m to 40 m.

The proposed algorithm is compared with 3DV-Hop, 3DV-Distance, and 3D-IDCP [

The proposed algorithm is contrasted with traditional DV-Hop, ADV-Hop, and ACSDV-Hop [

Similarly, when the node range is increased from 15 to 50 with 200 nodes and a 25% anchor node ratio, as shown in

The 3D-DECHop algorithm is compared with MDV-Hop, PDV-Hop, and PMDV-Hop [

It is clear that for all the algorithms there is a smooth decline in the error above the anchor node ratio of 20%. For the 3D-DECHop, the error reduction is greater than for the others. Also, when the range is varied from 20 m to 60 m with 200 nodes and a 15% anchor ratio, the error decreases for all the algorithms up to a range of 40 m, and then increases again as nodes communicate with each other. But in the case of the 3D-DECHop algorithm, the decline in error continues even after the range of 40 m.

Localization plays an important role in the IoT and in real-world applications of wireless sensor networks. In this work we propose a new hop-based algorithm suitable for the 3D environment, called 3D-DECHop. This algorithm is distributed and based on our previous work with the 2D environment. The accuracy of the algorithm is evaluated based on the minimum error generated during localization process. The correction factor is introduced and utilized during the various stages of the localization process, ultimately reducing the error to a large extent. In the proposed 3D-DECHop algorithm, the hop size is customized so that less error occurs. The algorithm incurs average error, unlike the separate node error in traditional DV-Hop algorithms, eventually leading to more accurate calculations. Simulation results show that the 3D-DECHop algorithm outperforms other existing algorithms, yielding lower error levels with various specifications, such as the number of nodes, the number of anchor nodes, and the range. The 3D-DECHop algorithm performs at its best when the anchor ratio is one fifth of the total number of nodes and the range is 40 m. In the future, we hope to prove the accuracy of the proposed algorithm both through an analytical approach and through experiments. Optimization can also make more preciseness in the localization error. Moreover, localization is a practical problem and it will add more essence when the experiments are conducted in the real environment. It will increase the credibility of the proposed work and we will try to execute the same in the near future.