1 Introduction

Position location information supports law enforcement, emergency services and a variety of Location Based Services (LBS). Position Location is often obtained through multilateration processes involving known location reference points, [1, 2]. However, in reconfigurable networks such as in ad-hoc and sensor networks, multilateration cannot be directly applied due to the absence of direct connectivity to fixed or mobile references, [2, 3]. Also the use of GPS is not an option due to the possible scenarios of deployment of the nodes of the network, with higher costs, service availability and accuracy needed. An alternative option is to rely on collaborative techniques that have been proposed to estimate the position location, see [4].

In a reconfigurable network, devices relay information to nearby neighboring nodes, so that messages propagate from node to node until a reference node or Access Point (AP) connected to the rest of the network is reached. The sets of neighboring link connections can help to infer the location of the node in the network. Routes from APs to the Node Of Interest (NOI) are dynamically obtained bearing in mind the prevailing network conditions. With this information, together with distance estimates, the network supplies the structure for location information acquisition. The deployment of APs can be of advantage for some algorithms because the APs can form geometric figures that surround the NOI and estimation errors could be minimized. In some cases, it is recommended that APs be deployed in external rings to the area of interest, see [5]. This deployment of APs is possible for very large areas where the network is operating, but for small networks or for networks that might not have a definition of a border surrounding it, the deployment of APs is not necessarily feasible.

Early location schemes involved the direction and distance traveled from a known land reference. Thus, locations were obtained from the vector addition of successive steps. However, vessels journey departed from the intended paths due to tidal and wind drifts; consequently routes had to be periodically redefined. This dead reckoning process has been naturally evoked for application in multihop ad-hoc and sensor networks, [2], where gateways placed at known locations become reference sites. Performance of dead reckoning approach has been reported, [6], where distance estimates can be inferred from intensity or delay measurements, while angular estimates can be obtained using antenna arrays. When angular information is unavailable, single distance observation is not sufficient to determine location, and it needs to be supplemented by distances to or from other reference points, [7].

Optimal and maximum likelihood location estimation demand joint statistical characterization of the propagation environment as well as the node distribution, which in the case of multi-hop reconfigurable networks becomes cumbersome, and alternative heuristic approaches may be adequate since they can adapt to network conditions.

In the following sections, a simple Vertex-Projection Algorithm (VPA) for location estimation based on a pyramidal structure is presented. The formulation does not require angular observations, and range measurements undergo a correction process in order to counteract noise in the measurements. A full planar scenario is discussed together with the goodness of the estimator and its dependence on the network features such as deployment of APs (fixed and random, completely random) range or coverage radius, and noise. Simulation results show that the proposed technique provides adequate proximity information in noisy reconfigurable environments with different node densities, and reachability radii, as well as for single and multi hop scenarios with iid and non-iid noise random variables.

In Sect. 2, the fundamental reconfigurable network scenario is presented together with the model based on a vertex projection. The mathematical model shows the system of equations that can use more than three APs as reference nodes. Section 3 presents the Maximum Likelihood (ML) position location model and shows that the VPA and the ML algorithm for a single-hop scenario with iid noise random variables are exactly the same, hence they provide the same results for this scenario. In Sect. 4, we present numerical results for the single-hop and multihop scenarios comparing VPA to ML and TOA algorithms. Also, a correcting factor is presented where the pyramidal projection algorithm improves localization performance and comes closer to that of the maximum likelihood estimator. Finally, Sect. 5 presents the conclusions of this work.

2 Vertex Projection Algorithm (VPA) for Localization

We consider a rectangular network area where nodes are uniformly distributed. Coverage radius is set at different values and a topology is established to generate the network. In general, routes are constructed underlying a minimal distance criterion or node separation. It is also assumed that at an AP, an arriving packet contains the identification of the sequence of nodes traversed. At least three APs (reference or anchor nodes) are placed at convenient places and become geographical references with known coordinates, while providing connectivity to other networks or systems and even extending coverage (this assumption is relaxed in Sect. 4 by considering randomly placed APs). It is also assumed that information is exchanged through the nodes of the reconfigurable network and that topology is organized so that a routing algorithm can take place. All the nodes interact through the algorithm and take some part in the determination of the final positions of the nodes.

Without loss of generality, we can consider a network area defined by 3 APs, \(\mathbf{A}_0\), \(\mathbf{B}_0\), and \(\mathbf{C}_0\), with known location coordinates \((x_A,y_A)\), \((x_B,y_B)\), \((x_C,y_C)\), respectively, see Fig. 1. Let \(\mathbf{Z}\) be the NOI whose position with coordinates (xy) will be estimated. Define \(d(\mathbf{A}_0, \mathbf{Z})\) as the true separation distance (Euclidean distance) between nodes \(\mathbf{A}_0\) and \(\mathbf{Z}\) in the network. If actual distances between node \(\mathbf{Z}\) and the APs were available, the location (xy) could be determined by trilateration. However, due to coverage and transmission power limitations of individual nodes, this process cannot be directly used since connection of node \(\mathbf{Z}\) to each AP, for instance \(\mathbf{A}_0\), is achieved through a route consisting of \(n_A\) hops (\(n_A +1\) nodes) with node set \(R_{AZ}=\{\mathbf{A}_0,\mathbf{A}_1, \mathbf{A}_2, \ldots , \mathbf{A}_{n_A-1},\mathbf{Z}\}\). This route is formed by the concatenation of multiple hops of length \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\) where \(\mathbf{A}_{j}\), is the j-th intermediate node in the path from \(\mathbf{A}_0\) to \(\mathbf{Z}\), \(j=1,2,\ldots , n_A-1\). Intermediate node locations are generally unknown to neighboring nodes, nevertheless, distances \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\) between adjacent nodes may be estimated using, for instance; Time Of Arrival (TOA) measurements, [2, 7].

In the following, we introduce the analysis for reference node \(\mathbf{A_0}\), but it can be extended similarly for reference nodes \(\mathbf{B}_0\) and \(\mathbf{C}_0\). It is assumed that distance of each hop in the route is estimated and that it is not error-free. In fact, the measuring error of the j-th hop \((\mathbf{A}_{j-1}, \mathbf{A}_{j})\) can be considered to be an independent and identically distributed (iid) exponential random variable \(\eta _{Aj}\) for all j, with parameter \(\lambda _A\). Thus, we can define the distance in the presence of measuring noise between nodes \((\mathbf{A}_{j-1}, \mathbf{A}_{j})\) as \(D(\mathbf{A}_{j-1}, \mathbf{A}_{j})=d(\mathbf{A}_{j-1}, \mathbf{A}_{j})+\eta _{Aj}\), for \(j=1, 2,3,\ldots ,n_A-1\). Considering the path from \(\mathbf{A}_0\) to \(\mathbf{Z}\), the first rough distance estimate, \(\delta _A\), is obtained by adding hop lengths, i.e.,

$$\begin{aligned} \delta _A=\sum \limits _{j=1}^{n_A-1} D(\mathbf{A}_{j-1}, \mathbf{A}_{j}) +D(\mathbf{A}_{n_A-1}, \mathbf{Z}), \end{aligned}$$
(1)

where \(D(\mathbf{A}_{n_A-1}, \mathbf{Z})=d(\mathbf{A}_{n_A-1}, \mathbf{Z})+\eta _{A n_A}\). Note that even if the terms \(\eta _{Aj}\) are not considered, i.e., a noise-free scenario, according to the triangle inequality, we will have \(d(\mathbf{A}_0, \mathbf{Z}) \le \delta _A\). So \(\delta _A\) is an overestimate of the true distance \(d(\mathbf{A}_0, \mathbf{Z})\). Equality \(d(\mathbf{A}_0, \mathbf{Z}) = \delta _A\) will occur when all nodes in the path are collinear on the straight line passing through \(\mathbf{A}_0\) and Z, and provided that measurements \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\) are noiseless, i.e., \(\eta _{Aj}=0, ~ \forall ~j\). In a full planar scenario, three access points are required and the node to be located Z will have associated over-estimates \(\delta _A\), \(\delta _B\), and \(\delta _C\) corresponding to distances to APs \(\mathbf{A}_0\), \(\mathbf{B}_0\), and \(\mathbf{C}_0\), respectively. Maintaining low hardware and operational complexity, the location (xy) may be heuristically associated as the vertex P \(=(x^*, y^*, h)\) of a pyramid with edges \(\delta _A\), \(\delta _B\), and \(\delta _C\) and a triangular base with corners at APs \(\mathbf{A}_0\), \(\mathbf{B}_0\), and \(\mathbf{C}_0\), as illustrated in Fig. 1. From (1), the distance to the NOI is given by

$$\begin{aligned} \delta _A=\sum \limits _{j=1}^{n_A-1} d(\mathbf{A}_{j-1}, \mathbf{A}_{j}) +d(\mathbf{A}_{n_A-1}, \mathbf{Z}) + \eta _A, \end{aligned}$$
(2)

where \(\eta _A\) is the random variable that results from the measuring error accumulation of all the hops in the route, i.e.,

$$\begin{aligned} \eta _A=\sum \limits _{k=1}^{n_A} \eta _{Ak}, \end{aligned}$$
(3)

In the case of multihop scenarios, accumulated errors, \(\eta _A\), tend to follow a gamma or \(n_A\)-erlang distribution. Now, considering the pyramid in Fig. 1 with edges \(\delta _A\), \(\delta _B\), and \(\delta _C\), and a triangular base, the tip of the pyramid will be the vertex P which can be orthogonally projected to the triangular base as point \(\mathbf{P}^*=\left( x^*, y^*\right)\), and it may be adopted as the position location estimate of NOI Z. Coordinates \(\left( x^*, y^*\right)\) can be readily obtained by an algebraic procedure with the Pythagorean Theorem which gives

$$\begin{aligned} \delta _A^2= {\left( x^*-x_A\right) }^2+{\left( y^*-y_A\right) }^2+h^2, \end{aligned}$$
(4)
$$\begin{aligned} \delta _B^2= {\left( x^*-x_B\right) }^2+{\left( y^*-y_B\right) }^2+h^2, \end{aligned}$$
(5)
$$\begin{aligned} \delta _C^2= {\left( x^*-x_C\right) }^2+{\left( y^*-y_C\right) }^2+h^2. \end{aligned}$$
(6)

In order to obtain the coordinates of the NOI, \(\left( x^*, y^*\right)\), we only need two equations, but it is better to combine the three equations in a similar way as shown in [2, 8]. Thus, subtract Eq. (4) from (5) to obtain

$$\begin{aligned} \delta _B^2-\delta _A^2&= \left( x_B^2-x_A^2\right) +\left( y_B^2-y_A^2\right) \nonumber \\ ~&-2x^*\left( x_B-x_A\right) -2y^*\left( y_B-y_A\right) . \end{aligned}$$
(7)

Similarly, obtain expression for \(\delta _C^2-\delta _A^2\) as

$$\begin{aligned} \delta _C^2-\delta _A^2&= \left( x_C^2-x_A^2\right) +\left( y_C^2-y_A^2\right) \nonumber \\ ~&-2x^*\left( x_C-x_A\right) -2y^*\left( y_C-y_A\right) . \end{aligned}$$
(8)

Now, define the following expressions

$$\begin{aligned} x_{BA}= \left( x_B-x_A\right) , \quad y_{BA}=\left( y_B-y_A\right) , \end{aligned}$$
(9)
$$\begin{aligned} x_{CA}= \left( x_C-x_A\right) , \quad y_{CA}=\left( y_C-y_A\right) , \end{aligned}$$
(10)
$$\begin{aligned} w_{BA}= \left( x_B^2-x_A^2\right) +\left( y_B^2-y_A^2\right) , \end{aligned}$$
(11)
$$\begin{aligned} w_{CA}= \left( x_C^2-x_A^2\right) +\left( y_C^2-y_A^2\right) , \end{aligned}$$
(12)

then by substituting Eqs. (9)–(12) in (7) and (8), and rearranging terms, we get from (7)

$$\begin{aligned} 2x_{BA}x^*+2y_{BA}y^*=w_{BA}-(\delta _B^2-\delta _A^2). \end{aligned}$$
(13)

Similarly from (8) we get

$$\begin{aligned} 2x_{CA}x^*+2y_{CA}y^*=w_{CA} -(\delta _C^2-\delta _A^2), \end{aligned}$$
(14)

which leads to the matrix equation, see [8],

$$\begin{aligned} \left[ \begin{array}{cc} x_{BA} &{} y_{BA} \\ x_{CA} &{} y_{CA} \end{array} \right] \left[ \begin{array}{c} x^* \\ y^* \end{array} \right] = \frac{1}{2} \left[ \begin{array}{c} w_{BA} -(\delta _B^2-\delta _A^2) \\ w_{CA} -(\delta _C^2-\delta _A^2) \end{array} \right] . \end{aligned}$$
(15)

We can rewrite Eq. (15) as

$$\begin{aligned} \mathbf{H}{} \mathbf{x}=\mathbf{b}, \end{aligned}$$
(16)

where

$$\begin{aligned} \mathbf{H}&= \left[ \begin{array}{cc} x_{BA} &{} y_{BA} \\ x_{CA} &{} y_{CA} \end{array} \right] , \quad \mathbf{x}= \left[ \begin{array}{c} x^* \\ y^* \end{array} \right] , \nonumber \\ \mathbf{b}&= \frac{1}{2} \left[ \begin{array}{c} w_{BA} -(\delta _B^2-\delta _A^2) \\ w_{CA} -(\delta _C^2-\delta _A^2) \end{array} \right] . \end{aligned}$$
(17)
Fig. 1
figure 1

Vertex projection scheme in a planar scenario with three APs

The solution of the coordinate vector \(\mathbf{x}\) is obtained from (16) by

$$\begin{aligned} \mathbf{x}=\mathbf{H}^{-1}{} \mathbf{b}. \end{aligned}$$
(18)

Note that Eqs. (15) and (16) can include more access points, e.g., AP \(\mathbf{D}_0\) with an expression for \(\delta _D^2-\delta _A^2\) similar to (7). This makes \(\mathbf{H}\) a tall matrix, then the solution in (18) would not work directly, and it has to be modified by pre-multiplying both sides of (16) by \(\mathbf{H}^T\) to produce an invertible matrix, then solution in (18) is changed to get

$$\begin{aligned} \mathbf{x}={\left( \mathbf{H}^{T}{} \mathbf{H}\right) }^{-1}{} \mathbf{H}^{T}{} \mathbf{b}, \end{aligned}$$
(19)

which corresponds to the Least-Squares (LS) solution, see [8]. The number of rows of matrix \(\mathbf{H}\) is the number of references taken in the multilateration localization algorithm. Note that for any given access point i, overestimates \(\delta _i\) depend on the measuring error, the node density, the reachability radius of the nodes and the routing algorithm as they impact the number of hops of connecting paths, [9].

In the following section, we introduce a different location algorithm based on maximum likelihood, to be compared later with VPA. We also show that ML and VPA are practically the same for the case of a homogeneous scenario where a single-hop joins APs and NOI and when noise random variables are iid.

3 ML Multihop Technique

In this section, we continue using the same notation and assumptions as those already introduced in previous sections. The scenario is as that shown in Fig. 1, which is described by Eqs. (2) and (3) for reference node \(\mathbf{A}_0\). From this, we can see that in the three AP scenario, the distance estimate to NOI \(\mathbf{Z}\) is given by

$$\begin{aligned} \delta _A= d(\mathbf{A}_0,\mathbf{Z})+\eta _A, \end{aligned}$$
(20)
$$\begin{aligned} \delta _B= d(\mathbf{B}_0,\mathbf{Z})+\eta _B, \end{aligned}$$
(21)
$$\begin{aligned} \delta _C= d(\mathbf{C}_0,\mathbf{Z})+\eta _C, \end{aligned}$$
(22)

where \(\eta _A\), \(\eta _B\) and \(\eta _C\) are as previously defined in (3), see [10], with parameters \((n_A,\lambda _A)\), \((n_B,\lambda _B)\) and \((n_C,\lambda _C)\), respectively. From Eq. (20) we can see that the cumulative distribution function (cdf) of \(\delta _A\) is given by

$$\begin{aligned} F_{\delta _A}(u)&= Pr\left( \delta _A \le u\right) \nonumber \\ &= Pr \left( d(\mathbf{A}_0,\mathbf{Z})+\eta _A \le u \right) \nonumber \\ &= Pr \left( \eta _A \le u -d(\mathbf{A}_0,\mathbf{Z}) \right) \nonumber \\ &= F_{\eta _A}(u-d(\mathbf{A}_0,\mathbf{Z})), \end{aligned}$$
(23)

which is \(n_A\)-erlang distributed. Thus, the probability density function (pdf) of the distance estimate \(\delta _A\) for \(u \ge d(\mathbf{A}_0,\mathbf{Z})\) will be given by

$$\begin{aligned} f_{\delta _A}(u)&= f_{\eta _A}(u-d(\mathbf{A}_0,\mathbf{Z})) \nonumber \\ &= \frac{\lambda _A^{n_A} {\left[ u-d(\mathbf{A}_0,\mathbf{Z})\right] }^{n_A -1} e^{-\lambda _A (u-d(\mathbf{A}_0,\mathbf{Z}))}}{\left( n_A -1\right) !}. \end{aligned}$$
(24)

Similarly for \(\delta _B\) and \(\delta _C\) we get

$$\begin{aligned} f_{\delta _B}(u)&= f_{\eta _B}(u-d(\mathbf{B}_0,\mathbf{Z})) \nonumber \\ &= \frac{\lambda _B^{n_B} {\left[ u-d(\mathbf{B}_0,\mathbf{Z})\right] }^{n_B -1} e^{-\lambda _B (u-d(\mathbf{B}_0,\mathbf{Z}))}}{\left( n_B -1\right) !}. \end{aligned}$$
(25)
$$\begin{aligned} f_{\delta _C}(u)&= f_{\eta _C}(u-d(\mathbf{C}_0,\mathbf{Z})) \nonumber \\ &= \frac{\lambda _C^{n_C} {\left[ u-d(\mathbf{C}_0,\mathbf{Z})\right] }^{n_C -1} e^{-\lambda _C (u-d(\mathbf{C}_0,\mathbf{Z}))}}{\left( n_C -1\right) !}. \end{aligned}$$
(26)

With the pdfs given in (24)–(26), we can formulate the likelihood function for \(n_A\), \(n_B\) and \(n_C\)-hop routes, by assuming independence as follows

$$f_L\left( \delta _A, \delta _B, \delta _C\right) = \prod _{k \in \{ \mathbf{A}_0, \mathbf{B}_0, \mathbf{C}_0\}}\,\left\{ \frac{\lambda _k^{n_k} {\left[ \delta _k-d(k,\mathbf{Z})\right] }^{n_k -1}}{\left( n_k -1\right) !} \cdot e^{-\lambda _k \left[ \delta _k-d(k,\mathbf{Z})\right] } \right\} .$$
(27)

Now, maximize the likelihood function, (27) with respect to \(\delta _A\), \(\delta _B\) and \(\delta _C\), by taking the derivative and applying some algebra. First, define the following

$$\begin{aligned} M_A&= \frac{\lambda _A^{n_A}\lambda _B^{n_B}\lambda _C^{n_C}e^{\lambda _A d(\mathbf{A}_0,\mathbf{Z})}}{\left( n_A-1\right) !\left( n_B-1\right) !\left( n_C-1\right) !} \nonumber \\ ~&\cdot {\left[ \delta _B -d(\mathbf{B}_0,\mathbf{Z})\right] }^{n_B-1}{\left[ \delta _C -d(\mathbf{C}_0,\mathbf{Z})\right] }^{n_C-1} \nonumber \\ ~&\cdot e^{-\lambda _B [\lambda _B- d(\mathbf{B}_0,\mathbf{Z})]}e^{-\lambda _C [\lambda _C- d(\mathbf{C}_0,\mathbf{Z})]}, \end{aligned}$$
(28)

then get the derivative and make it equal to zero, i.e., with respect to \(\delta _A\) we get

$$\begin{aligned} \frac{d f_L\left( \delta _A, \delta _B, \delta _C\right) }{d \delta _A}&= M_A\left\{ {\left[ \delta _A -d(\mathbf{A}_0,\mathbf{Z})\right] }^{n_A-1} (-\lambda _A e^{\lambda _A \delta _A})\right. \nonumber \\ ~&+ \left. e^{\lambda _A \delta _A} (n_A-1){\left[ \delta _A -d(\mathbf{A}_0,\mathbf{Z})\right] }^{n_A-2} \right\} \nonumber \\ &= 0. \end{aligned}$$
(29)

Similarly for the derivative with respect to \(\delta _B\) and \(\delta _C\). Now, from Eq. (29) and those corresponding to the derivatives with respect to \(\delta _B\) and \(\delta _C\), we get

$$\begin{aligned} \delta _A&= \frac{n_A -1}{\lambda _A} + d(\mathbf{A}_0,\mathbf{Z}), \end{aligned}$$
(30)
$$\begin{aligned} \delta _B= \frac{n_B -1}{\lambda _B} + d(\mathbf{B}_0,\mathbf{Z}), \end{aligned}$$
(31)
$$\begin{aligned} \delta _C&= \frac{n_C -1}{\lambda _C} + d(\mathbf{C}_0,\mathbf{Z}). \end{aligned}$$
(32)

Equations (30)–(32) confirm that the best ML estimator is the expectation. From Eqs. (30)–(32), together with true distances \(d(\mathbf{A}_0,\mathbf{Z})\), \(d(\mathbf{B}_0,\mathbf{Z})\), and \(d(\mathbf{C}_0,\mathbf{Z})\) expressed in terms of the individual hop distances, we get

$$\begin{aligned} \delta _{A} = &\, d({\mathbf{A}}_{{n_{A} - 1}} ,{\mathbf{Z}}) + \sum\limits_{{k = 1}}^{{n_{A} - 1}} d ({\mathbf{A}}_{{k - 1}} ,{\mathbf{A}}_{k} ) \\ & + \frac{{n_{A} - 1}}{{\lambda _{A} }}, \\ \end{aligned}$$
(33)
$$\begin{aligned} \delta _{B} = &\, d({\mathbf{B}}_{{n_{B} - 1}} ,{\mathbf{Z}}) + \sum\limits_{{k = 1}}^{{n_{B} - 1}} d ({\mathbf{B}}_{{k - 1}} ,{\mathbf{B}}_{k} ) \\ & + \frac{{n_{B} - 1}}{{\lambda _{B} }}, \\ \end{aligned}$$
(34)
$$\begin{aligned} \delta _{C} = &\, d({\mathbf{C}}_{{n_{C} - 1}} ,{\mathbf{Z}}) + \sum\limits_{{k = 1}}^{{n_{C} - 1}} d ({\mathbf{C}}_{{k - 1}} ,{\mathbf{C}}_{k} ) \\ & + \frac{{n_{C} - 1}}{{\lambda _{C} }}, \\ \end{aligned}$$
(35)

and solving for the first term in each of the Eqs. (33)–(35), we obtain

$$\begin{aligned} d(\mathbf{A}_{n_A-1}, \mathbf{Z})&= \delta _A-\sum \limits _{k=1}^{n_A-1} d(\mathbf{A}_{k-1}, \mathbf{A}_{k}) \nonumber \\ ~&- \frac{n_A -1}{\lambda _A}=T_A. \end{aligned}$$
(36)
$$\begin{aligned} d(\mathbf{B}_{n_B-1}, \mathbf{Z})&= \delta _B-\sum \limits _{k=1}^{n_B-1} d(\mathbf{B}_{k-1}, \mathbf{B}_{k}) \nonumber \\ ~&- \frac{n_B -1}{\lambda _B} =T_B. \end{aligned}$$
(37)
$$\begin{aligned} d(\mathbf{C}_{n_C-1}, \mathbf{Z})&= \delta _C-\sum \limits _{k=1}^{n_C-1} d(\mathbf{C}_{k-1}, \mathbf{C}_{k}) \nonumber \\ ~&- \frac{n_C -1}{\lambda _C} =T_C. \end{aligned}$$
(38)

Now from (36)–(38), we consider the following expressions

$$\begin{aligned}&d(\mathbf{A}_{n_A-1}, \mathbf{Z})^2=T_A^2, \end{aligned}$$
(39)
$$\begin{aligned}&d(\mathbf{B}_{n_B-1}, \mathbf{Z})^2=T_B^2, \end{aligned}$$
(40)
$$\begin{aligned}&d(\mathbf{C}_{n_C-1}, \mathbf{Z})^2=T_C^2, \end{aligned}$$
(41)

together with the Euclidean distances to get

$$\begin{aligned}&d(\mathbf{A}_{n_A-1}, \mathbf{Z})^2={(x_{\mathbf{A}_{n_A-1}}-x)}^2+{(y_{\mathbf{A}_{n_A-1}}-y)}^2, \end{aligned}$$
(42)
$$\begin{aligned}&d(\mathbf{B}_{n_B-1}, \mathbf{Z})^2={(x_{\mathbf{B}_{n_B-1}}-x)}^2+{(y_{\mathbf{B}_{n_B-1}}-y)}^2, \end{aligned}$$
(43)
$$\begin{aligned}&d(\mathbf{C}_{n_C-1}, \mathbf{Z})^2={(x_{\mathbf{C}_{n_C-1}}-x)}^2+{(y_{\mathbf{C}_{n_C-1}}-y)}^2. \end{aligned}$$
(44)

Then, applying some algebra to the squared binomials in expressions (42)–(44), and by substituting the result in (39)–(41), we get

$$\begin{aligned} T_A^2&= x_{\mathbf{A}_{n_A-1}}^2+x^2-2x_{\mathbf{A}_{n_A-1}} x \nonumber \\ ~& + y_{\mathbf{A}_{n_A-1}}^2 + y^2-2y_{\mathbf{A}_{n_A-1}} y, \end{aligned}$$
(45)
$$\begin{aligned} T_B^2&= x_{\mathbf{B}_{n_B-1}}^2+x^2-2x_{\mathbf{B}_{n_B-1}} x \nonumber \\&+ y_{\mathbf{B}_{n_B-1}}^2 + y^2-2y_{\mathbf{B}_{n_B-1}} y, \end{aligned}$$
(46)
$$\begin{aligned} T_C^2&= x_{\mathbf{C}_{n_C-1}}^2+x^2-2x_{\mathbf{C}_{n_C-1}} x \nonumber \\&+ y_{\mathbf{C}_{n_C-1}}^2 + y^2-2y_{\mathbf{C}_{n_C-1}} y. \end{aligned}$$
(47)

Now, define the following expressions

$$\begin{aligned} w_{B_{n_B-1}A_{n_A-1}}&= \left( x_{B_{n_B-1}}^2-x_{A_{n_A-1}}^2\right) \nonumber \\&+ \left( y_{B_{n_B-1}}^2-y_{A_{n_A-1}}^2\right) , \end{aligned}$$
(48)
$$\begin{aligned} w_{C_{n_C-1}A_{n_A-1}}&= \left( x_{C_{n_C-1}}^2-x_{A_{n_A-1}}^2\right) \nonumber \\&+ \left( y_{C_{n_C-1}}^2-y_{A_{n_A-1}}^2\right) , \end{aligned}$$
(49)

then, from (45)–(47) we can get \(T_B^2-T_A^2\), and \(T_C^2-T_A^2\), which together can be written in matrix form as

$$\begin{aligned} \tilde{\mathbf{H}}{} \mathbf{x}=\tilde{\mathbf{b}}, \end{aligned}$$
(50)

where we have vector \(\mathbf{x}^T=[x^*~ y^*]\) and matrices

$$\begin{aligned} \tilde{\mathbf{H}}&= \left[ \begin{array}{cc} x_{\mathbf{B}_{n_B-1}}- x_{\mathbf{A}_{n_A-1}} &{} y_{\mathbf{B}_{n_B-1}}- y_{\mathbf{A}_{n_A-1}} \\ x_{\mathbf{C}_{n_C-1}}- x_{\mathbf{A}_{n_A-1}} &{} y_{\mathbf{C}_{n_C-1}}- y_{\mathbf{A}_{n_A-1}} \\ \end{array} \right] , \nonumber \\ \tilde{\mathbf{b}}&= \frac{1}{2} \left[ \begin{array}{c} w_{\mathbf{B}_{n_B-1}{} \mathbf{A}_{n_A-1}} -(T_B^2-T_A^2) \\ w_{\mathbf{C}_{n_C-1}{} \mathbf{A}_{n_A-1}} -(T_C^2-T_A^2) \end{array} \right] . \end{aligned}$$
(51)

We can also solve for coordinate vector \(\mathbf{x}\), when more than three APs are considered, to get an expression for the case when \(\tilde{\mathbf{H}}\) is a tall matrix as

$$\begin{aligned} \mathbf{x}={\left( \tilde{\mathbf{H}}^{T}\tilde{\mathbf{H}}\right) }^{-1}\tilde{\mathbf{H}}^{T}\tilde{\mathbf{b}}. \end{aligned}$$
(52)

To solve Eq. (52), one needs to get matrices \(\tilde{\mathbf{H}}\) and \(\tilde{\mathbf{b}}\) from Eq. (51). It can be seen that both matrices have terms that depend on the last hop of the routes from the APs to node \(\mathbf{Z}\), and that also have terms that depend on \(T_A^2\), \(T_B^2\), and \(T_C^2\) which are obtained by calculating Eqs. (36)–(38).

We have just introduced the equations for the ML localization method in the multihop scenario where the number of hops from each reference node to the NOI is not necessarily the same, and also the noise experienced along each of the routes from the reference nodes to the NOI are independent but not identically distributed because they have different parameters for the corresponding exponential random variables.

As a particular case, consider that \(n_A=n_B=n_C=1\), then we have from Eqs. (36)–(38) that \(T_A=\delta _A\), \(T_B=\delta _B\), and \(T_C=\delta _C\), and matrices in (51) become those of Eq. (17). In other words, the ML technique just introduced, in the case of a one-hop scenario, is the same as the pyramidal vertex projection (VP) technique introduced in Sect. 2. As a matter of fact, the ML method just introduced, is a generalization of the VP method proposed. The same set of equations for the one-hop scenario is obtained if we consider that noise random variables are iid exponential with \(\lambda _A=\lambda _B=\lambda _C\) or if \(\lambda _A\ne \lambda _B\ne \lambda _C.\)

In the following sections, we show how the VPA technique performs and compare it to the ML and TOA algorithms. We show how to improve the VPA technique when in scenarios of high noise levels affect performance.

4 Numerical Results

The obtainable error for the vertex projection algorithm has been worked out through extensive simulations. At first, homogeneous scenarios are assumed, considering that nodes are randomly distributed and a triangular area is defined by three fixed access points. Placement of APs usually obeys to practical considerations. However, for illustration, it is assumed that APs are evenly placed in a circumference of radius \(R_{\max }\) that defines the networking area. The node reachability in the reconfigurable environment is limited by the available transmitting power and sensitivity constraints that set a reachability radius \(R_0\). Beyond this radius, we consider that each node is not able to connect to any other node, i.e., no link can be established, therefore results are reported in terms of a normalized coverage radius given by \(R_0{/}R_{\max }\). The number of hops in a path is random, and paths are determined (for a given reachability radius) by choosing the node within the coverage area that is closest to the final destination or node of interest \(\mathbf{Z}\). The error obtained \(\varepsilon _0\) is also normalized to the coverage radius (this is \(\varepsilon _0 = \varepsilon{/}R_{\max }\), where \(\varepsilon\) is the Euclidean distance between the estimated location and the true location of node \(\mathbf{Z}\)). The reported results involved some \(10^4\) random realizations of location estimates for each simulation scenario. Also, the simulation was relaxed with respect to the placement of APs and its number. APs are located randomly and compared to the homogeneous scenario just explained. Also, the number of APs was increased from 3 up to 7 in the simulations. In all the scenarios simulated, the NOI was chosen randomly in the area.

4.1 Single-Hop Scenarios

Figure 2 shows two examples of network realizations. The figure on the left hand side shows the network in homogeneous scenario with fixed APs. It can be appreciated that the APs (black squares) surround the NOI. On the other hand, the right hand side figure shows the network when the APs are placed randomly thus having situations where the NOI is not necessarily within an area surrounded by the APs. Considering the one-hop scenario, and using VPA as explained in previous sections, and TOA as an alternative localization technique using the algorithm in [8], we can see in Fig. 3 the performance in terms of rms error of both algorithms, VPA and ML, which is practically the same.

Fig. 2
figure 2

Examples of network realizations for the one-hop scenario

Fig. 3
figure 3

Performance of VPA and TOA techniques for a one-hop scenario

Now, Fig. 4 shows the performance of rms error as a function of the proportion of noise. In both graphs in the figure, the fixed (indicated in the figure by the subindex f and with dotted lines) and the random (indicated in the figure by the subindex r) placement of APs are shown. The plot on the left hand side of Fig. 4 corresponds to the case when noise random variables are for each AP are exponential but not identically distributed, the plot on the right hand side corresponds to the scenario when all the APs have iid exponential random variables of noise. From the figure, it can be seen that the placement of APs randomly helps to decrease rms error because on average, the fixed placement is rigid and it does not guarantee that the NOI will be enclosed in a triangle. Also, in the figure we can see that the VPA performs better than ML and TOA with the random placement of APs for practically all the values of noise, and it has similar performance for high noise values for the scenario with fixed APs, being better for low noise values (below 0.15).

Fig. 4
figure 4

Performance of VPA, ML and TOA techniques for a one-hop scenario, fixed and random placement of APs

The next result is from a simulation where the number of APs are increased from 3 up to 7. Figure 5 shows a surface of the normalized rms location error for VPA as a function of the proportion of noise (same values used in previous results) and the number of APs used to perform localization. It can be seen that varying the number of APs does not improve location error for VPA for each value of the proportion of noise, so we can conclude that the use of 3 APs is sufficient to achieve the minimum rms error.

Fig. 5
figure 5

Performance of VPA for a one-hop scenario, varying the number of APs

4.2 Correcting Factor

In some scenarios, VPA does not present as good a performance as that of the ML estimator, especially for high measurement noise scenarios. When high noise levels are present, distance overestimations will affect the terms \(\delta _A^2\), \(\delta _B^2\), and \(\delta _C^2\), in (15), thus increasing the estimation of position coordinates of NOI \(\mathbf{Z}\) . Nevertheless, the vertex projection approach improves by the use of a correcting factor, which leads to adequate performance when error distance correction is conducted as we introduce in the following paragraphs. In order to introduce the correcting factor, consider the scenario as that described by Eq. (1) where every node estimates the distance to the adjacent node in the next hop of the route that is formed between the AP and the node of interest \(\mathbf{Z}\). Assume that the true distance between adjacent nodes is given by \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\), where \(\mathbf{A}_{j}\), is the j-th intermediate node in the path from A to Z. Also, assume that the distance evidence obtained through measurements of this hop in the path is denoted as \(\delta _{j-1,j}\) for the same adjacent nodes. Note that range measurement errors \(\eta _{Aj}\), \(j=2,3,\ldots , n_A-1\) as those considered in Eqs. (1), (20), (21) and (22), can be modelled as a factor of the actual distance \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\), i.e.,

$$\begin{aligned} \eta _{Aj}=\gamma _j d(\mathbf{A}_{j-1}, \mathbf{A}_{j}), \end{aligned}$$
(53)

where \(\gamma _j\) is a random factor, \(E(\eta _{Aj})=\gamma d(\mathbf{A}_{j-1}, \mathbf{A}_{j}) < \infty\) with \(\gamma = E[\gamma _j]\), in other words, the mean measurement error is a proportion of the true distance between adjacent nodes in the path. Now, the distance evidence in each node in the route is the available noisy measurement which is given by \(\delta _{j-1,j}=d(\mathbf{A}_{j-1}, \mathbf{A}_{j})+\eta _{Aj}\) which together with Eq. (53) gives a distance estimate of

$$\begin{aligned} d(\mathbf{A}_{j-1}, \mathbf{A}_{j})=\frac{\delta _{j-1,j}}{1+\gamma _j}. \end{aligned}$$
(54)

Now, since the random factor \(\gamma _j\) is unknown, we propose to estimate \(d(\mathbf{A}_{j-1}, \mathbf{A}_{j})\) as

$$\begin{aligned} d^*(\mathbf{A}_{j-1}, \mathbf{A}_{j})=\frac{\delta _{j-1,j}}{1+\alpha }, \end{aligned}$$
(55)

where \(\alpha\) is chosen to minimize the mean squared error, which leads to

$$\begin{aligned} E\left\{ \left[ d(\mathbf{A}_{j-1}, \mathbf{A}_{j})-d^*(\mathbf{A}_{j-1}, \mathbf{A}_{j})\right] ^2\right\} =\delta _{j-1,j}^2 E\left\{ \left[ \frac{1}{1+\gamma _j}-\frac{1}{1+\alpha }\right] ^2\right\} . \end{aligned}$$
(56)

Taking derivative with respect to \(\alpha\), and making it equal to zero, we obtain the following

$$\begin{aligned} \frac{d}{d \alpha }\left\{ \delta _{j-1,j}^2 E\left[ \left( \frac{1}{1+\gamma _j}-\frac{1}{1+\alpha }\right) ^2\right] \right\}&= \left\{ \delta _{j-1,j}^2 E\left[ \frac{d}{d \alpha }\left( \frac{1}{1+\gamma _j}-\frac{1}{1+\alpha }\right) ^2\right] \right\} \nonumber \\ &= \left\{ \delta _{j-1,j}^2 E\left[ 2\left( \frac{1}{1+\gamma _j}-\frac{1}{1+\alpha }\right) \frac{1}{(1+\alpha )^2}\right] \right\} \nonumber \\ &= 0, \end{aligned}$$
(57)

which can be used to obtain the value of the parameter \(\alpha\) as follows

$$\begin{aligned} E\left\{ \frac{1}{1+\gamma _j}-\frac{1}{1+\alpha }\right\} &= E\left\{ \frac{1}{1+\gamma _j}\right\} -\frac{1}{1+\alpha } \nonumber \\ &= E\left\{ \left( 1+\gamma _j\right) ^{-1}\right\} -\frac{1}{1+\alpha } \nonumber \\ &= 0. \end{aligned}$$
(58)

From Eq. (58), the value of \(\alpha\) can be expressed as

$$\begin{aligned} \alpha =E\left\{ \left( 1+\gamma _j\right) ^{-1}\right\} ^{-1}-1. \end{aligned}$$
(59)

In all scenarios presented, the random variables of noise \(\eta _A\), \(\eta _B\), and \(\eta _C\) are exponentially distributed with parameters \(\lambda _A\), \(\lambda _B\) and \(\lambda _C\), respectively. Then, from Eq. (53), we can see that \(\gamma _j\) is also exponentially distributed with parameter \(\gamma ^{-1} =\lambda _Ad(\mathbf{A}_{j-1}, \mathbf{A}_{j})\). Thus, we have that the expectation needed in Eq. (59) can be obtained as follows

$$\begin{aligned} E\left\{ \left( 1+\gamma _j\right) ^{-1}\right\} &= \int _0^{\infty } \frac{1}{1+x}\left( \frac{1}{\gamma }\right) e^{-~\frac{1}{\gamma }x}~dx \nonumber \\ &= \int _{1/\gamma }^{\infty } \frac{1}{y \gamma }\left( \frac{1}{\gamma }\right) e^{-~\frac{1}{\gamma }(y \gamma -1)}~\gamma ~dy \nonumber \\ &= \frac{1}{\gamma }e^{\frac{1}{\gamma }}\int _{1/\gamma }^{\infty } \frac{1}{y}e^{-~y}~dy \nonumber \\ &= \frac{1}{\gamma }e^{\frac{1}{\gamma }} \mathbf{E}_1\left( \frac{1}{\gamma }\right) , \end{aligned}$$
(60)

which includes the exponential integral function defined as \(\mathbf{E}_1(x)=-\mathbf{E}_1(-x)=\int _{x}^{\infty }\frac{e^{-~t}}{t}dt\).

Figure 6 shows a simulation for which the ML estimator has better performance than the VPA technique. This occurs in scenarios with high noise levels with different random variables for each AP. The figure also shows the use of the correcting factor to improve performance of VPA. It can be seen in the figure that the proposed error correcting factor helps the vertex projection algorithm to achieve performance close to that of the ML estimator. It can also be seen that the correcting factor produces robustness with respect to increasing measurement errors since at some point improves the estimation given by the ML estimator. The development just introduced applies when noise is an exponential random variable which is the case for a one-hop scenario. When the noise is erlang distributed, i.e., when a multihop scenario is present, the approximation is given in the multihop scenario.

Fig. 6
figure 6

Performance of VPA, and ML with fixed APs and correcting factor

4.3 Multihop Scenario

In this subsection, we follow the simulation scenarios as those for the single-hop network, and show the results for the location of the NOI in multi-hop networks. Since we have shown that the performance of TOA is close to that of VPA, we will only show results for the algorithms derived in this paper, i.e., VPA and ML.

Figure 7 shows a realization of a network with multihop routes to the NOI. The network has seven APs placed randomly in the area of the network.

Fig. 7
figure 7

Performance of VPA, and ML with fixed APs and correcting factor

Figure 8 shows the performance of VPA, TOA and ML for the fixed and random placement of APs as noise levels are increased. Noise is different not only for each AP, but for each link in each of the paths joining AP and NOI. It can be observed that VPA has good performance compared to those other algorithms, but in this case the use of the correcting factor is more necessary as you can see that for large noise values, ML improves performance.

Fig. 8
figure 8

Performance of VPA, and ML with fixed APs and correcting factor

As in the single-hop scenario, we show in Fig. 9 the variation of APs in a network. As it can be seen, performance is not improved significantly when the number of APs is increased from 3 to 7 for a fixed value of noise, thus, it is sufficient to carry out localization with three APs for VPA technique.

Fig. 9
figure 9

Performance of VPA, and ML with fixed APs and correcting factor

4.4 Multihop Correcting Factor

Assuming that \(d^*\) is a noisy observation of the true distance d of the form \(d^*=d+\eta =(1+\gamma )d\), where \(E[\eta ]=\gamma d < \infty\), for an available measurement \(d^*\), we propose to estimate d as \(d=d^*/(1+\alpha )\), where \(\alpha\) is chosen to minimize the mean squared error \(E\left[ {(d-d^*)}^2\right]\). This formulation leads to

$$\begin{aligned} \alpha ={E\left\{ {(1+\gamma )}^{-1} \right\} }^{-1}-1. \end{aligned}$$
(61)

For the case of \(\gamma\) being gamma distributed with parameters \(\lambda\) and r, i.e., the number of random variables in the sum in Eq. (3) is r, we get

$$\begin{aligned} E\left\{ {(1+\gamma )}^{-1} \right\} =\frac{\lambda ^r}{\Gamma \left( r \right) } \int _0^{\infty } \frac{1}{1+\eta } \eta ^{r-1} e^{-\lambda \eta } d\eta , \end{aligned}$$
(62)

which can be numerically approximated, see [11, 12], as

$$\begin{aligned} \int _0^{\infty } \frac{ \eta ^{r-1} e^{-\lambda \eta }}{1+\eta } d\eta &= {\left( -1\right) }^{r-2} e^{\lambda } \mathbf{E}_1 (-\lambda ) \nonumber \\ ~&+\sum _{k=1}^{r-1} (k-1)! {\left( -1\right) }^{r-1-k} \lambda ^{-k}. \end{aligned}$$
(63)

where \(\mathbf{E}_i (-x)=-\int _{x}^{\infty } \left( e^{-t}/t\right) dt\).

5 Conclusions

A simple geometrical node-positioning algorithm, based on a pyramidal structure to carry out a vertex projection has been presented. The scenario for two access points and the generalization to a multiple access point scenario was presented. This algorithm makes use of mean values and does not require statistical knowledge of the range measurement errors nor angle of arrival observations. Performance of the algorithm in several ad-hoc scenarios has been simulated assuming a shortest distance routing algorithm. Impact of node densities and range measurement error is reported. Improvement through correcting factor is also presented. Simulation results have shown that the proposed algorithm yields good proximity estimates for increasing reachability radius and node density. Scenarios increasing the number of APs have been presented and it was seen that three APs are sufficient for localization using VPA.