Keywords

1 Introduction

Nowadays, Low-Power Area Networks (LPWANs) are popularly chosen to deploy the Internet of Things (IoT) applications. Such networks provide abilities of long-range transmission and saving energy consumption while most IoT devices are powered by batteries. In recent years, there are various technologies proposed for LPWANs such as LoRa technology from Semtech, ultra-narrow band (UNB) technology from Sigfox, and random phase multi-access (RPMA) technology from Ingenu [1]. Most LPWANs have developed to provide a large coverage area in the urban environment, which is one of the aims in the process of developing Smart Sustainable Cities.

Successful experience of using LPWAN networks allows us to think about the subsequent development of this technology, which provides for the transition from a star topology to mesh networks. A mesh or multi-hop communication can be supported in the LPWANs with the end nodes can become the relay nodes to transmit the data from remote nodes to the gateway [2]. With such a transition, a procedure should be provided for determining the nodes’ coordinates in the wireless mesh network located at significant distances from each other.

In most cases, solving the problems of determining the coordinates of nodes is based on the geographic approach. When processing the received signals, physical quantities are extracted that depends on the location of the radiating antenna, based on which this location can be determined by geometric methods. Thus, we can specify the goniometric, rangefinder, difference-rangefinder methods, and their combinations. This paper discusses the most common rangefinder methods in wireless networks.

Moreover, the rangefinder method is based on calculating the distance between the emitting and receiving antennas according to the signal strength or signal propagation time. In this paper, we consider mesh LPWAN networks with the gateways located on street lighting poles at a level above a person, but below the average level of roofs, and other nodes located lower than the average level of roofs.

2 Distance Determination Methods

2.1 RSSI-Based Method

When determining the distance between nodes based on the level of the RSSI (Received Signal Strength Indicator) signal received in the city, it should be taken into account that the radio signal propagation is carried out in conditions of dense urban development. This invariably leads to the effect of multipath propagation, which manifests itself in the fact that an additive mixture of the useful signal and its many copies arising as a result of diffraction, scattering, and reflections of the radio signal from objects irradiated by the transmitting antenna and having different delay times proportional to the path length.

Moreover, the channel parameters are a function of time, since scattering and reflecting the radio wave can move in space, introducing a Doppler shift into the reflected radio waves. In this case, receiving an accurate signal propagation model is not possible, and generalized path loss models are applied [3]:

$$\begin{aligned} PL(d,f)=10\alpha lg(d_{m,n})+\beta +10\gamma lg(f)+N(0,\sigma ), dB \end{aligned}$$
(1a)
$$\begin{aligned} \hat{d}_{m,n}=10^{\frac{PL(d_{m,n},f)-(\beta +10\gamma lg(f)+N(0,\sigma ))}{10\alpha }}, m \end{aligned}$$
(1b)

where \(d_{m,n}\) – Euclidean distance between nodes m and n, m; \(\hat{d}_{m,n}\) – estimated Euclidean distance \(d_{m,n}\), m; f - carrier frequency, GHz; \(\alpha =2,12\) – coefficient of increasing path loss with the distance; \(\beta =29,2\) – coefficient associated with the path loss offset value; \(\gamma =2,11\) – coefficient of increasing path loss with frequency; \(N(0,\sigma )\) – Gaussian random variable with zero mean and standard deviation \(\sigma =5,16\). Coefficient values \(\alpha , \beta , \gamma \) and standard deviation \(\sigma \) are chosen for the urban zone of multi-story or low-rise buildings under the conditions of signal propagation in the line of sight.

Figure 1 shows the dependence of the radio signal attenuation on the distance according to the formula (1a) with \(N(0,\sigma )\) and value PL(df) obtained as a result of distance measurements corresponding to the pico-urban dense zone and microcells [3].

Fig. 1.
figure 1

The dependence of the radio signal attenuation on the distance

For each distance, the graph shows 11 values of the path loss obtained by averaging 15 measurement results. The results of the calculation of distances according to the path losses (1b) are presented in Fig. 2.

Fig. 2.
figure 2

Calculated distances according to path loss values

Obviously, the presence of a random variable \(N(0,\sigma )\) leads to an error in calculating the Euclidean distance between the transmitting and receiving stations: \(\hat{d}_{m,n} = d_{m,n} + \triangle d_{m,n}\). According to the expression (1b), the results of the distance difference obtained from the Euclidean metric and from the data received during the experiment are presented in Table 1.

Table 1. Distance measurement errors using RSSI-based method

According to graphs and Table 1, it can be seen that although the model (1a) fully complies with the experimental data; when determining the distances between nodes based on the path loss, calculation errors turn out to be very significant, which implies the use of the RSSI-based method in conjunction with other methods based on the signal propagation time.

2.2 TOA-Based Method

In the method based on the time of arrival (TOA) signal, the distance is measured according to the radio signal propagation time from a transmitter to a receiver and the condition that the radio waves propagate in a homogeneous medium with a constant speed of v m/s:

$$\begin{aligned} \hat{d}_{m,n} = v(t_n - t_m) = v\hat{t}_{mn} \end{aligned}$$
(2)

where \(v=299792458\) m/s – electromagnetic wave propagation speed, \(t_n\)—receiving time, \(t_m\)—sending time (indicated in the message), \(\hat{t}_{mn} = t_{mn} + \triangle t_{mn}\) – estimated propagation time between nodes.

As the disadvantage of this method, it is required to synchronize internal clocks of nodes, which is not possible for mesh networks. Systematic and random changes in the parameters of quartz clock resonators such as aging of the resonator or environmental conditions will lead to a deviation of time scans. For instance, according to the LoRa specification [4], if the time error is \(\pm 10\,ppm\), then for 128 s the deviation of the clock will be 1.3 ms. And, since the difference between the clocks of the nodes m and n is \(\triangle t_{mn}=0.1\,\upmu \mathrm{s}\), the distance measurement error \(\triangle d_{m,n}\) is already 30 m, it becomes obvious that errors are unacceptable with using the TOA-based method.

2.3 TDOA-Based Method

In the case of determining the distance between nodes using the TDOA (Time Difference Of Arrival) that is based on measuring the difference in the arrival time of the radio signal, it should be considered that the effectiveness of this method directly depends on the bandwidth allocated for transmission. According to the report ITU-R SM.2211-1, it is indicated that for signals with a frequency bandwidth of 30 kHz, the root-mean-square error of determining the location of terminal devices was about 100 m [5]. Thus, referring to the parameters of modern LPWAN networks, it can be argued that this method can provide acceptable location accuracy in networks using the frequency band recommended for standard LoRaWAN networks - 125 kHz, but for networks with a bandwidth 100 Hz determining the location of the signal source is not possible.

2.4 SDS-TWR-Based Method

According to the SDS-TWR-based (symmetric double-sided two-way ranging) method, each of nodes that are not synchronized with each other measures the signal travel time in the forward and reverse directions, as well as the response message generation time \(t_{r\;m}\), \(t_{r \;n}\), significantly longer than the signal travel time, i.e. the measurement is carried out in two cycles with a duration \(t_{c\;m}\) and \(t_{c\;n}\). Estimation of the travel time of the radio signal between the nodes m and n will be:

$$\begin{aligned} \begin{aligned} \hat{t}_{mn}=\frac{(\hat{t}_{c \;n} - \hat{t}_{r \;n}) + (\hat{t}_{c \;m} - \hat{t}_{r \;m})}{4} \\ = \frac{ (t_{c \;n} - t_{r \;n})(1+\delta _n) + (t_{c \;m} - t_{r \;m})(1+\delta _m)}{4} \\ \approx t_{mn} + \frac{(t_{r\;n} - t_{r\;m})(\delta _m - \delta _n) }{4} \end{aligned} \end{aligned}$$
(3)

where \(\hat{t}_{c \;m}\), \(\hat{t}_{c \;n}\) – estimated cycle time of nodes \(t_{c \;m}\) and \(t_{c \;n}\); \(\hat{t}_{r \;m}\), \(\hat{t}_{r \;m}\) – estimated response time of nodes \(t_{r \;m}\) and \(t_{r \;n}\); \(\delta _m, \delta _n\) – the deviation of the time of nodes m and n.

As can be seen from the expression (3), the method allows SDS-TWR to compensate for the shift of the time scales and the deviation of the time, which significantly increases the accuracy of determining the distance between the nodes.

Table 2 below shows the distance measurement results between two nodes, the time clock of which is described as: \(t\cdot (1 + 20\,ppm)\) for node 1 and \(t\cdot (1- 20\,ppm)\) for node 2, verifying the truth of these statements.

After receiving data about distances between nodes, the calculation of their coordinates can be implemented in two stages:

  • at the first stage, using the available data from the network nodes, a three-dimensional network model is restored,

  • and at the second stage, spatial transformations of the obtained model are carried out using the anchor points, which are the nodes located on the street lighting poles, and whose coordinates are known.

Mesh networks deployed for the implementation of Smart Sustainable City projects imply a sufficiently large number of nodes and a high density, which makes it possible to distinguish network fragments with a fully connected topology. Therefore, initially, the question of restoring three-dimensional models of given fragments of the network as a basis for the subsequent construction of a three-dimensional network model as a whole can be considered.

Table 2. Distance measurement using SDS-TWR-based method

3 Three-Dimensional Model of a Mesh Network Fragment

Assume a fragment of a wireless mesh network consisting of N nodes with a fully connected topology, regarded as some set \(S:={s}\), power \(N:\left| S \right| = N\). Each node of a given network fragment has a designation \(s_n\), where \(n=1,2...N\) – node number.

The fully connected topology allows us to estimate the distances between all nodes of the fragment of \(\hat{d}_{mn}\), based on which the square matrix of distances \(\hat{\mathbf {D}}\) can be compiled. The matrix \(\hat{\mathbf {D}}\) is symmetric and has the dimension N. This matrix is a feature space of the network fragment, where a separate matrix column represents a cathedral is a set of features of a wireless node with a number corresponding to the column number of the matrix \(\hat{\mathbf {D}}\).

The solution to the problem of reconstructing a three-dimensional model of the network fragment S based on the matrix of squares of distances \(\hat{\mathbf {D}}\) can be found by the method of metric multidimensional scaling [6] designed to reduce the dimension of a set of attributes (in this case, to 3).

Since the matrix \(\hat{\mathbf {D}}\) is symmetric, it can be expanded as \(\hat{\mathbf {X}}\cdot \hat{\mathbf {X}}^T\), where the rows of \(\hat{\mathbf {X}}\) can be considered as the coordinates of the nodes. Since the matrix \(\hat{\mathbf {D}}\) can be represented through spectral decomposition, then:

$$\begin{aligned} \hat{\mathbf {D}} = \mathbf{U} \cdot \varvec{\Lambda }_D \cdot \mathbf{U} ^T = \hat{\mathbf {X}}\cdot \hat{\mathbf {X}}^T \end{aligned}$$
(4)

where \(\mathbf {U}\) – orthogonal matrix; \(\varvec{\Lambda }_D\) – diagonal eigenvalue matrix of \(\hat{\mathbf {D}}\).

It should be noted that since \(tr\hat{\mathbf {D}}=0\), there will be at least one negative element in the matrix of eigenvalues of \(\varvec{\Lambda }_D\). Since \(\hat{\mathbf {X}} = \mathbf {U}\cdot \varvec{\Lambda }_{D}^{1/2}\), negative eigenvalues give the complex matrix \(\dot{{\varvec{\Lambda }}}_{D}^{1/2}\), therefore, the coordinate values will also not be real. The solution to this problem is possible by double centering the matrix \(\hat{\mathbf {D}}\) by alternately centering the matrix in columns and rows:

$$\begin{aligned} \mathbf {J}\cdot \hat{\mathbf {D}}\cdot \mathbf {J} = \left( \mathbf {E} - \frac{1}{N}\mathbf {I}^T \cdot \mathbf {I} \right) \cdot \hat{\mathbf {D}} \cdot \left( \mathbf {E} - \frac{1}{N}\mathbf {I}^T \cdot \mathbf {I} \right) = \mathbf {Z} \end{aligned}$$
(5)

where \(\mathbf {E}\) - identity matrix of dimension N; \(\mathbf {I} = (1,1...1)\) - N-dimensional row vector.

Since the double-centered matrix \(\mathbf {Z}\) is also symmetric, it can be represented as a spectral decomposition:

$$\begin{aligned} \mathbf {Z} = \mathbf {U}\cdot \varvec{\Lambda }_Z \cdot \mathbf {U}^T \end{aligned}$$
(6)

where \(\varvec{\Lambda }_Z = diag(\lambda _1 \, \lambda _2 \,...\, \lambda _N)\) - diagonal eigenvalue matrix \(\mathbf {Z}\), \(\lambda _1 \ge \lambda _2 \ge ... \ge \lambda _N \ge 0\); \(\mathbf {U}=(\mathbf {u}_1 \, \mathbf {u}_2 \, ... \, \mathbf {u}_N)\) - \(N\times N\) - column eigenvector matrix \(\mathbf {u}_n\).

The choice of three maximum eigenvalues and the corresponding column vectors allows you to form a matrix of coordinates of nodes in three-dimensional space.

$$\begin{aligned} \hat{\mathbf {X}} = (\mathbf {u}_1 \quad \mathbf {u}_2 \quad \mathbf {u}_3) \cdot \begin{bmatrix} \sqrt{\lambda _1} &{} 0 &{} 0 \\ 0 &{} \sqrt{\lambda _2} &{} 0 \\ 0 &{} 0 &{} \sqrt{\lambda _3} \end{bmatrix} = \mathbf {U}_3 \varvec{\Lambda }_3^{1/2} \end{aligned}$$
(7)
Fig. 3.
figure 3

Location of nodes in three-dimensional space

4 Spatial Transformations

The construction of the three-dimensional model of the mesh network fragment gives the coordinates of each nodes \(s_n \in S\): \(\left( x_n^* \quad y_n^* \quad z_n^* \right) \) with the center of mass subnet at the origin. Figure 3 shows the nodes in the fragment of a wireless mesh network. Representation of the network fragment in the form of a graph allows us to see that reconstructed from the data on distances obtained by the SDS-TWR method, the three-dimensional model of the network fragment corresponds to the initial one, but is located in a different coordinate system. We denote the coordinate system of the network fragment as CS1, and the coordinate system of the network fragment obtained from the calculated results as CS2.

Thus, to find the nodes’s coordinates, it is necessary to shift and rotate around a certain axis of the nodes of the network fragment, which can be described by the matrix of spatial transformations:

$$\begin{aligned} \mathbf {x}_n = \left( x_n^* \quad y_n^* \quad z_n^* \quad h\right) = \left( x_n \quad y_n \quad z_n \quad 1 \right) \cdot \mathbf {T} \end{aligned}$$
(8)

where h – homogeneous coordinate factor; \(\mathbf {T}\) – spatial transformation block matrix [7, 8]:

$$\begin{aligned} \mathbf {T} = \left( \frac{3\times 3 \mid 3 \times 1}{1\times 3 \mid 1\times 1} \right) = \left( \frac{\mathbf {R} \mid \mathbf {P}}{\mathbf {S} \mid \mathbf {M}} \right) \end{aligned}$$
(9)

where \(\mathbf {M}\) – scaling matrix; \(\mathbf {P}\) – vector of perspective transformation; \(\mathbf {R}\) – resulting matrix of arbitrary rotation in three-dimensional space; \(\mathbf {S}\)—shift row-vector.

Arbitrary sequential spatial transformations are described by the resulting matrix:

$$\begin{aligned} \mathbf {T} = \prod _{k=1}^K \mathbf {T}_k \end{aligned}$$
(10)

The matrix of spatial transformations describing a shift in three-dimensional space has the form: \(\mathbf {S} = \left( \triangle x \quad \triangle y \quad \triangle z \right) \), where \(\triangle x, \triangle y, \triangle z\) are the displacement values along the coordinate axes OxOyOz.

An arbitrary rotation matrix can be received as a result of a non-commutative product of the rotation matrices \(\mathbf {R}_x, \mathbf {R}_y, \mathbf {R}_z\) around the principal axes by the angles \(\alpha _x, \alpha _y, \alpha _z\):

$$\begin{aligned}&\mathbf {R}_x = \left( \begin{array}{ccc} 1 &{} 0 &{} 0 \\ 0 &{} cos(\alpha _x) &{} sin(\alpha _x) \\ 0 &{} -sin(\alpha _x) &{} cos(\alpha _x) \end{array}\right) , \mathbf {R}_y = \left( \begin{array}{ccc} cos(\alpha _y) &{} 0 &{} sin(\alpha _y) \\ 0 &{} 1 &{} 0 \\ -sin(\alpha _y) &{} 0 &{} cos(\alpha _y) \end{array}\right) , \\&\qquad \qquad \qquad \quad \mathbf {R}_x = \left( \begin{array}{ccc} 1 &{} 0 &{} 0 \\ 0 &{} cos(\alpha _x) &{} sin(\alpha _x) \\ 0 &{} -sin(\alpha _x) &{} cos(\alpha _x) \end{array}\right) \end{aligned}$$

The vector \(\mathbf {P}\) and the matrix \(\mathbf {M}\) are taken: \(P=\left( 0 \quad 0 \quad 0\right) ^T\), \(\mathbf {M}=(1)\).

It can be seen that the implementation of these transformations is possible if the network has nodes with known coordinates – \(N_kc \). For three-dimensional space, the number of such nodes should be \(N_kc \ge 3\), the nodes should not lie on one straight line, which is possible if such nodes are placed on the street lighting poles. Thus, the procedure for finding nodes’ coordinates can be described as:

  1. 1.

    introduce the third coordinate system CS3;

  2. 2.

    move coordinate system CS1 so that one of the nodes with known coordinates \( Y_{kc1}\) is at the origin of coordinates CS3;

  3. 3.

    perform the required turns so that the second node with the known coordinates \(Y_{kc2}\) is located on one of the main axes;

  4. 4.

    move the coordinate system CS2 so that the node corresponding to the node \(Y_{kc1}\) is at the origin of coordinates CS3;

  5. 5.

    perform the required turns so that the coordinates of the nodes of the calculated network fragment corresponding to the nodes with known coordinates \(Y_{kc2}\), \(Y_{kc3}\), coincided with the coordinates \(Y_{kc2}\), \(Y_{kc3}\) in CS3;

  6. 6.

    perform the inverse transformations described in this section.

The result of these transformations over a network fragment obtained as a result of calculations (Fig. 3b) is shown in Fig. 4. Here, the nodes of the network whose coordinates are to be determined are marked in red, and the nodes obtained as a result of the calculations are blue.

Fig. 4.
figure 4

The location of the nodes of the network fragment in space: (red - the source location, blue - calculated location) (Color figure online)

5 Simulation Evaluation

Assuming that a network fragment is composed of 100 nodes in 3-dimensional space with coordinates (x, y, z) generated randomly in (0, 1000 m), (0, 1000 m), and (0, 100 m), respectively. In this fragment, all nodes can receive signals from each other, therefore it is possible to determine distances between each pair of nodes. The actual distances between nodes are denoted by the matrix D.

Adding the noise values to the actual distances represents the errors when determining distances between nodes. A noise coefficient k is used in (11) to represent the noise. Noise values N are added to the distance matrix as follows:

$$\begin{aligned} \begin{aligned} \mathbf{N} = k \times rand_{100\times 100} \\ \mathbf{N} = \mathbf{N} + \mathbf{N} ^T \,and \,diag(\mathbf{N} ) = 0 \\ \mathbf{D} _{noise} = \mathbf{D} + \mathbf{N} \end{aligned} \end{aligned}$$
(11)

First of all, we use a goodness-of-fit statistic based on the differences between the actual distances and the distances between the found coordinates after spatial transformations. A stress value was presented by Krusal in his paper about multidimensional scaling [9]. The distances are compared according to the stress value calculated by (12). According to Krusal’s experience, the stress values (Table 3) are used as a recommendation to evaluate the difference of distances between actual and found coordinates. Therefore, it is necessary to use the additional methods for comparing the results. With each simulation run, the different noise values are generated. The received stress values obtained from the simulation results are presented in Fig. 5.

$$\begin{aligned} stress = \sqrt{\frac{\sum \left( d_{m,n} - \hat{d}_{m,n} \right) ^2}{\sum d_{m,n}^2}} \end{aligned}$$
(12)
Table 3. Evaluation of stress values
Fig. 5.
figure 5

Stress value

As shown in Fig. 5, with the stress values are in the perfect interval with the noise coefficient \(k = \{ 1, 2 \}\). That means that they found coordinates might be close to the actual coordinates. The distance differences of each node are shown in Fig. 6, where with \(k = \{ 1, 2 \}\) distances between the actual and calculated nodes are small (Fig. 6a). However, with \(k=3\) (Fig. 6b) these distances are bigger, though the stress value is in the good interval in this case. In our purpose, the stress values may be considered in the other intervals. Thus, it is necessary to consider the differences between X and \(\hat{X}\), Y, and \(\hat{Y}\), Z, and \(\hat{Z}\). As shown in Fig. 7 with \(k=\{1,3\}\), the differences are much related to Z values while there are small differences in X and Y. The calculated coordinates of (XY) are close to the actual values. Thus, the latitudes and longitudes of nodes were found with the errors less than the altitudes.

Fig. 6.
figure 6

Distance differences, m

Fig. 7.
figure 7

Differences \(\triangle X, \triangle Y, \triangle Z\), m

6 Conclusion

Thus, based on the results of the computational experiment, we can draw the following conclusions:

  1. 1.

    The metric multidimensional scaling (MDS) method allows to restore a three-dimensional model of a wireless mesh network with a high degree of accuracy.

  2. 2.

    The efficiency of the MDS method is ensured in the case of constructing a matrix of differences between objects (distance between nodes) by the method of symmetric bilateral bidirectional measurement of distance SDS-TWR. The considered methods RSSI, TDOA, TOA and others introduce a significant error and limit the dimension of the space to 2, or cannot be used in radio systems with a narrow frequency band.

  3. 3.

    For the final calculation of the coordinates of nodes in space, there must be at least 3 nodes with previously known coordinates located on more than one line.