Zacytuj

Introduction

Recently, the Internet of Things (IoT) has become a big role in many applications like transportation, health, industry, shopping, etc. That has led to the emergence of new terms related to IoT such as smart cities, smart homes, smart factories, smart farming, etc. Most of these IoT applications especially industrial applications need to support many IoT devices for large battery time and low cost per device.

In many fields and IoT applications, we need to have accurate knowledge of the physical locations of IoT devices, as those installed in robots, off-roads vehicles and smart bike-sharing for outdoor localizations or as installed in factories or airports, parking garages, and underground locations for indoor localization (Erfanmanesh and Abrizah, 2018).

Most indoor localizations depend on WiFi, Bluetooth, Lights, radio waves, Ultra-Wideband (UWB), Wireless Sensor Networks, digital camera etc. Most indoor localization methods are fingerprint, triangulation, centroid, trilateration, and distance vector hop techniques (Khelifi et al., 2019).

For Mobile IoT outdoor localization nodes, some of IoT solutions use the same localization sensors in all nodes of IoT platform but this method had high power consumption and high cost. The other method use these sensors only in nodes with known positions called Anchor nodes and use these nodes as a reference point for other nodes to reduce cost and power consumption (Suroso et al., 2022).

Most IoT outdoor localization methods depend on GPS systems and some of them depend on Low-Power Wide-Area Networks (LPWANs) integrated with any type of Global Navigation Satellite System (GNSS) like GPS. Nowadays, most IoT applications installed in the LPWAN solutions with the aim of reducing the consumption, enlarging the area coverage and reducing the overall cost (Rizzi et al., 2019). Non-GPS IoT Nodes can be located using GPS IoT Nodes (Anchor IoT Node) to reduce power consumption and cost (Sabale and Mini, 2019).

For mobile IoT solutions (moving IoT nodes), mobile anchor nodes (MANs) which are equipped with GPS units are used to localize unknown IoT nodes and periodically broadcasting their current locations to help nearby unknown nodes with localization (Han et al., 2016). Our research goal is to enhance the mobile IoT anchor node outdoor localization with low cost, low power consumption solutions.

Many researches considered the enhancement of mobile IoT anchor nodes outdoor locations to decease the error or to increase the data rate localization as will be shown in the next related work section. Most of these researches tried to improve the localization accuracy using DGPS or using other sensors like IMU. But what about losing GPS signals for some time especially when IoT anchor nodes are installed in weak GPS signals area, as when vehicles pass through tunnels or in a high building area. A few researches have been conducted to overcome this issue depend on other technologies that do not support GPS, such as in-door localizations. It is reliable for crossing previously known tunnels that contain auxiliary tools such as WiFi points preinstalled in these tunnels. Equipped tunnels have the specific infrastructure to overcome losing GPS signals during crossing it like using GPS repeater or GPS retransmission systems used for long tunnels. But, what about crossing un-equipped tunnels with localization tools? Also, what about the loss GPS signal of IoT devices due to tall buildings or dense forests. Can we estimate the IoT device's location with the help of another device until the GPS signal is received again? This is one of the localization problems and this solution is what we will try to implement in this work.

Another problem with IoT mobile anchor nodes outdoor localization based on GNSS is the low data rate for standard GNSS receivers that range can be from 1 Hz to 20 Hz depending on the manufacturer. In this proposed work, we will try to increase the data rate of location update to be able to track vehicles nearly to 100 Hz. That is another main idea of our proposed method is to improve and enhance location accuracy.

Although Hardware implementations typically provide improvement in the speed of applications over software implementations, most of the previous researches still used GPS receiver and IMU using software implementations like Matlab. A few researches implement their solution on hardware like micro-controller or micro-processor. So in our proposed solution, Hardware implementation using the most popular micro-controller in the market (ATmega 128) was provided. The proposed method will use IoT device that already has a microcontroller to process sensor data and transfer data to the Internet by adding the proposed technique on the same microcontroller of the IoT device.

Another important problem in localizing IoT Anchor nodes is the power consumption of IoT device (Kumar and Arablouei, 2022). While one of our primary goals in the Internet of Things is to use low power consumption, the proposed method will address this issue and has different and new visions as follows:

For IoT outdoor localization nodes, some of IoT solutions use the same localization sensors in all nodes of IoT platform but this method had high power consumption and high cost. The other methods as the proposed method use these sensors only in nodes with known positions called Anchor nodes and use these nodes as a reference point for other nodes to reduce cost and power consumption.

Most other methods use IMU to enhance GPS location, but didn't solve the problem of loss GPS signal of IoT devices due to tall buildings or dense forests. In our proposed method we estimate the IoT Anchor node location with the help of another device (IMU) until the GPS signal is received again.

Most other IoT anchor nodes outdoor localization methods based on GPS is the low data rate from 1 Hz to 20 Hz depending on the manufacturer which may be unsuitable as an IoT Anchor node in IoT solutions. In the proposed work, we increased the data rate of location update to be able to track vehicles nearly to 100 Hz.

Most of the previous researches still used GPS receiver and IMU using software implementations like Matlab, in our proposed solution, Hardware implementation of IoT Anchor node using the most popular micro-controller in the market (ATmega 128) was provided as Hardware implementations typically provide improvement in the speed of applications over software implementations

To develop the proposed method, the following structure of the article as follow:

First mention the related works are introduced in section 2 focused on the different outdoor localization methods especially in IoT domain. IoT Devices and Outdoor Localization Problems are discussed in section 3. The proposed mechanism for IoT anchor outdoor localization is presented in section 4. The proposed method includes analysis of the outdoor localization mechanism using GPS and IMU sensor based on modified Kalman filter then, hardware implementation of IoT Anchor node using AVR ATMega 128 microcontroller. The evaluation and results are discussed in Section 5 using real network logic analyzer and simulation tools like mat lab and python. The conclusions of this research are given in Section 6.

Related work

Many researchers have discussed outdoor localization using different techniques, but most of these researches focuses on determining the location of IoT node using location of anchor nodes. For example, Vikram Kumar & Reza Arablouei introduced localization method for IoT devices using Anchor positions and received signal strength indicator (RSSI) measurements (Kumar and Arablouei, 2022). That method assumed that the location of the IoT anchor node is known and suggested a method for determining the locations of other IoT nodes points in terms of this anchor nodes.

Hongwei Du et al. presented a hybrid scheme for outdoor localization with low power consumption (Du et al., 2018). That scheme depends on using crowdsourced WiFi signal with smart phones builtin sensors and GPS statics. However, one of the disadvantages of this method is that it relies on the necessity of smart phones. Winfred Ingabire et al. proposed outdoor node localization method using LoRaWAN Signal Strength (Ingabire et al., 2021). In that method they used LoRa modules signals instead of using GPS to decrease the power consumption. But, they didn't use Anchor node as a reference known location node, so the accuracy of the location of IoT nodes using these wireless modules (ex., LoRaWAN modules) as a stand-alone outdoor localization solution without GNSS is poor.

So, most mobile IoT anchor node outdoor localization methods depend on using GNSS devices like GPS. Many researches try to overcome the problems of weak GPS signals in the areas like in high building or in forests due to multi-path fading. For example, J. Moreau et al. try to improve GPS localization in unknown semi-obstructed areas (Moreau et al., 2017). Their method depends on correcting pseudo-ranges that have been prolonged after at least one reflection. But that method had good results only for static positions. M. Zhu et al. presented a model to integrate one GPS signal with three IMUs using an unconventional multi-sensor integration strategy (Zhu et al., 2019). This proposed method depends on the directly extended kalman filter to merge many IMU sensors with the data of the GPS receiver. But their solution still needs a more precise fusion algorithm for more enhancement results.

Also, many researches introduced the location enhancement aided different types of Kalman filters techniques. For example, Su-Jin Lee and Han-Sil Kim applied the Kalman filter technique to increase of location measurement accuracy (Lee and Kim, 2019). O. Maklouf et al. presented method to integrate GPS with IMU using Kalman filter (Maklouf et al., 2013). But, they used a Kalman filter only to process GPS measurements independently in a Kalman filter. Then the output is used periodically in INS filter. They didn't mention the type of hardware implantation and what rate of updating location. H. Ryu. et al. introduced an integrated method that includes GPS, INS, Unscented, and Extended Kalman filter to improve GPS position accuracy (Ryu et al., 2016). But they didn't implement an embedded hardware system. They used GPS, EC, and INS mounted on an experimental board. Also, they didn't mention how to integrate GPS with INS to implement EKF or UKF. Moreover, they didn't mention the result data rate of vehicle location using the proposed method.

R. Saini, et al. presented solution to improve low rate of GPS using integration of multi-sensor GPS/IMU for autonomous vehicle based on kalman filter (Saini et al., 2019). But they didn't present solution if GPS signals are lost during pass tunnel or at undergrounds area or between high buildings. J. Gomez-Gil, et al. improved the accuracy of GPS location using Kalman filter without using IMU (Gomez-Gil et al., 2013). They worked on the same standard data rate of GPS which equals 1 Hz. So, they enhanced GPS accuracy but didn't speed the update rate of the GPS location. Li Cong et al. tried to improve the performance of GPS/MEMS-INS system used in the land vehicles based integrated filter method (Cong et al., 2015). Their GPS/MEMS-INS integration method is realized by using Kalman filter.

A. Werries et al. presented a method to improve GPS localization depend on adaptive Kalman filter (Werries and Dolan, 2016). But they didn't implement their solution on an embedded system; they used the data through the filter offline in MATLAB simulation then transition the results to C++ running online on the RPi-2. Also, they tried to improve the quality of GPS localization with the same data rate of GPS.

Another research in (Davari et al., 2016) used a Wavelet-Based De-Noising technique to enhance GPS/INS navigations. They used five wavelet filters to remove the high-frequency noise from signals. They improved the GPS location accuracy but didn't talk about what are the solutions if GPS signals were lost for a period of time. Another research like (Li et al., 2017) proposed an approach location using the integration of GPS/INS/UWB (ultra-wide and width) with two-step filters. But the performance of their solution is best only if the vehicle on the same route and the performance becomes worse if the road environment has changed.

A few types of researches focused on hardware implementation of location enhancement solution on embedded system domain due to limited resources of hardware components. For example, Ferdinando et al. implemented KF for IMU on the ATmega8535 microcontroller (Ferdinando et al., 2012). Their implementation depended on transforming matrix calculation of kalman filter into several ordinary equations to able to implement their solution ATmega8535 microcontroller But they implemented their solution on micro-controller using the same regular GPS update location every 1 second [1 Hz]. In the paper (Romaniuk and Gosiewski, 2014) the authors applied a localization method based on the STM32 microcontroller platform (ARM architecture). That method combined GPS with IMU using the Kalman filter. They were able to increase the updated location from 1 Hz (as a normal GPS update) to 50 Hz (every 20 mille second).

Authors in (Iswanto et al., 2021) proposed IoT early warning mentoring system for Lava Flood and rain fall using Fuzzy tree decision with kalman filter algorithm. That system used lava flood detection and automatic rain gauge sensors but didn't use localization sensors.

As shown from these previous related researches, most of them talk about GPS accuracy improvement using DGPS or IMU. A little number of these researches used hardware implementations to benefit from the hardware-based speed operations. So, we will propose in our work an embedded method to enhance the real-time localization for some types of IoT devices. Also, we will integrate this localization feature into IoT devices while still consuming little power.

IoT devices and outdoor localization problems

This research is going to improve the mobile Anchor nodes outdoor localization for some types of IoT devices like bike-sharing, types of robots, and off-road vehicles. A description of what they are, how they work and their different operation modes will be discussed. Also, an evaluation of what problems of using outdoor localization and how they could be solved will be presented in the next following subsections.

IoT devices & anchor nodes

IoT devices are smart devices with internet access to support communication over the internet. They are able to interact with any other devices just has suitable internet access and grant remote connection to manage, monitor, and control as needed. Moreover, they can be anything that has internet access like smart medical sensors, smart watches, smart farm monitors, smart mobile, smart fitness trackers, smart vehicle trackers, etc (Dian et al., 2020). Market of IoT devices is increasing drastically that around 7 billion devices will be connecting by 2025 (Shafique et al., 2020). Most of these IoT devices have sensors, a microcontroller, a low power source, and an Internet access unit (Hussein et al., 2020). Most of current IoT devices use LPWAN which consume low power to transmits data over a wide area (James et al., 2020). In many applications such as transportation and tracking, we need to add the GPS sensor to the IoT devices such as IoT anchor nodes. But if these IoT devices are put in an area with weak GPS signals or in vehicles or robots, then we need to determine the exact positions of these devices. This is one of the aims of this research. For IoT mobile anchor nodes (MANs) which are equipped with GPS units to help nearby unknown IoT nodes locations. Our research goal is to enhance the mobile IoT anchor node outdoor localization with low cost, low power consumption solutions.

Outdoor localization problems

Most outdoor localization methods have different location error based on localization technique. This location error is un-acceptable in some IoT critical applications which depend on the accurate location of IoT devices. With that kind of error, the measurement cannot be considered reliable (at least for collision avoidance purposes); research was made to know why there were such errors, and how to correct them. These errors were found to be:

Ionosphere and troposphere lengthen the GNSS signal path.

Reflected GPS signals have longer paths than direct satellite-GNSS signals.

Satellites that are very close together and all oriented to the GNSS user from the same angle give a worse solution than those that are spread wider apart.

The best solution to avoid these errors is provided by using a differential GPS (DGPS). It is the most representative augmentation positioning system and its services have been established worldwide. To know the IoT node's position is the main goal, but the knowledge of the velocity and acceleration is also important. Another important issue is the update rate of these locations. These measurements work as an input to determine the trajectory to avoid the obstacle. Therefore, the updating rate must be high enough to accommodate this usage. Finally, one more problem appears: The GPS measurements depend on the quality of the signal, if the signal is not good, or it does not even exist (driving through a forest for example) the measurements will not be at all reliable, even when working with a DGPS.

A more detailed description of each problem will now be provided to understand exactly why it occurred and how it can be solved.

IoT node's velocity

GPS can provide a IoT Node's velocity, but it is calculated by difference of position (distance traveled) in a period of time. Vk1.k=rkrk1Δt {V^{k - 1.k}} = {{{r_k} - {r_{k - 1}}} \over {\Delta t}}

Where v is the velocity, rk is the position at time k, and Δt is the time period.

This assumption is not very good; it only takes into account the case of constant velocity over a period of time. The calculated velocity is always the velocity of the previous time increment, but not at the current velocity, there is a delay.

IoT Node's acceleration

The problem is the same as in the case of the velocity, the acceleration may be calculated by the difference of velocity in a period of time, but assuming the acceleration is constant. ak1.k=Vk1.kVk2.k1Δt=rk2rk1+rk2Δt2 {a^{k - 1.k}} = {{{V_{k - 1.k}} - {V_{k - 2.k - 1}}} \over {\Delta t}} = {{{r_k} - 2{r_{k - 1}} + {r_{k - 2}}} \over {\Delta {t^2}}}

Where a is the acceleration, rk is the position at time k, and vk is the velocity at time k.

Figure 8 in simulation result part represents the “real” and calculated acceleration for the same example polynomial used in the previous section. It can be seen how if the “real” acceleration's slope is closer to zero.

IoT Node's orientation

Just like the velocity, the orientation of this velocity can be calculated by the trigonometric relations of the position, as can be seen in Figure 1. When referred to a global fixed coordinate system, the orientation velocity can be: γk=tan1ykyk1xkyxk1 {\gamma_k} = {\tan^{- 1}}{{{y_k} - {y_{k - 1}}} \over {{x_k} - y{x_{k - 1}}}}

Where γk is the orientation velocity, xk, and yk are the two axis of the vehicle.

Figure 1

IoT Mobile Anchor Node (ex. Vehicle) angles. Where, β = sideslip angle, Ψ = orientation of vehicle, and γ = orientation of velocity.

The updates rate of the GPS that is going to be used is from 1 Hz to 20 Hz, there is a new measurement every 50 ms. It may seem high enough, but remember that when talking about vehicles and trying to avoid accidents, 50 ms may be too small.

Many enhancements in outdoor localization use Inertial Measurement Unit (IMU) to improve the location accuracy. IMU is a device comprising unit that integrates an acceleration sensor and a gyroscope to detect the acceleration and angular velocity of objects. So, it senses the physical motion parameters, including change in position, acceleration and rotation. As seen in Figure 2, to provide these measurements, it internally contains three miniature 3D gyroscopes (rate of turn sensors), accelerometers, and magnetometers. The accelerometers and magnetometers are very accurate since they can correct their errors thanks to the knowledge of a reference value: gravity for the accelerometers and the magnetic north for the magnetometers. By fusing all three measuring devices, a control algorithm can use the accelerometer's and magnetometer's corrections to also correct the gyroscopes errors obtaining drift fewer orientation data. Therefore, many IoT applications used IMU sensor as a part of IoT devices.

Figure 2

IMU sensor fusion.

Proposed outdoor localization method

Due to the non-traditional locations of most IoT devices, it is very important to track these devices, especially if in an outdoor environment. Most of these outdoor Localization approaches depend on GSNN like GPS but most GPS modules have high cost and power consumption. Another method which has low power consumption use wireless sensor nodes such as LoRaWAN which is used in LPWANs. But, this method has little accuracy than the first one (GPS method).

It is very difficult to put a GPS in each IoT device, it will be high cost and high power consumption, and it is difficult to use the second method alone (wireless sensor nodes) because the location's error is large and does not suit for many IoT applications.

Recently, the solution is to use a hybrid mechanism integrating the two outdoor localization methods. It depends on occupying some IoT devices with GPS (Anchor Nodes) and others IoT devices with wireless sensors like LoRaWAN (without GPS-Unknown node). And by using different techniques, we can determine the locations of these IoT nodes (without GPS) referencing Anchor nodes (have GPS). As shown in Figure 3.

Figure 3

Outdoor Localization Mechanism for IoT Nodes.

In this paper, we will focus on determine the mobile anchor node locations with high accuracy to enhance the overall accuracy of all IoT nodes locations.

To achieve this goal; two sensors, a GPS receiver, and an inertial measuring unit (IMU) are integrated using Kalman filter technique in IoT Anchor node. A GPS can provide position coordinates, while an IMU provides the acceleration, turning rates, and orientation angles, but none of the two measuring devices provides velocity directly. Besides, the GPS update rate is too low for the updating rates needed for the path following controller, while the inertial measuring unit's update rate is high enough. So, the integration method will handle these different rates to update the IoT device's location at a high rate near 100 Hz.

A Kalman filter is a rigid tool for sensor fusion. It can estimate certain parameters based on an input related to these parameters. So, it can be used to predict IoT node position and velocity based on acceleration. In this way, the position and IoT node are known at the inertial measuring unit's update rate, and every time a GPS position measurement is made. Then, it is compared with the estimated value to correct the estimation errors.

Furthermore, the location via GPS depends on the signal quality; they are not always as accurate as they should. The Kalman filter also deals with this problem. In addition to the acceleration input; there are two other inputs, the process noise, which indicates how good the estimation is, and the measurement noise, which indicates how good the GPS location is. The process noise is represented by the covariance matrix Q, which depends on the IMU acceleration errors. The measurement noise is represented by the covariance matrix R, which depends on GPS measurement errors. The Kalman gain works as a weight factor based on these two noise inputs to keep the best-estimated parameters. If the measurement noise is really low, the value kept is the GPS measurement, if on the contrary, the signal is very bad, the measurement noise will be very high and the value kept will be closer to the estimation.

There are five basic problems of using GPS only in outdoor localization as mentioned in section 3 which are:

Knowledge of the IoT node's velocity.

Knowledge of the IoT node's acceleration.

Knowledge of IoT node's orientation.

GPS update rate too slow.

GPS measurements depend on the quality of the signal.

The IMU itself, without the help of any fusion, can solve problems 2 and 3. Knowledge of the IoT node's acceleration and orientation; fixing the IMU on the vehicle it can directly measure its acceleration and its orientation, which will be the yaw angle. As for the other three problems a Kalman filter must be implemented. The position and velocity can be estimated using Kalman filter assisted by the acceleration measurements. The position and velocity estimations can be updated every time there is a new acceleration measurement. Comparing the position estimation with a real GPS measurement when it is available, the estimation can be corrected.

The IMU has a much higher update rate than the GPS, 100 Hz compared to the 20 Hz of the GPS, this means that the position update rate can be increased by a factor of 5 times for fast GPS modules to 100 times for other traditional GPS modules.

By estimating the IoT node's position, the other three problems are implicitly being solved. The knowledge of the velocity is not anymore calculated by the difference of position in a period of time, but estimated. The update rate increased by a factor equal to five, not only for the velocity estimation, but also for the IoT node's orientation and acceleration since now they are a direct IMU output, whose update rate is higher. As for the dependence of the GPS signal quality for the GPS measurements, the ability of the proposed method to work as a weight factor assures that the best value (between the estimation and the measurement) is kept; this way if the measurement is very bad due to a bad quality signal, the estimation will be kept. The proposed outdoor localization technique and its flow chart is shown in Figure 4 (a) and (b) which it is introduced in details in the following subsections.

Figure 4

(a): Block diagram of the proposed method. (b): Flowchart of the proposed method.

Proposed outdoor localization analysis

Let's look at the landscape, we're trying to interpret. We'll continue with a simple state having only position (p) and velocity (v). x=[pv] \vec x = \left[{\matrix{p \cr v \cr}} \right]

Assuming position (p) and velocity (v) variables are random and Gaussian distributed for KF algorithm.

At time K: the best estimate x^k {\hat x_k} and its covariance matrix PK. x^k=[PositionVelocity] {\hat x_k} = \left[{\matrix{{Position} \cr {Velocity} \cr}} \right] Pk=[PPPVVPVV] {P_k} = \left[{\matrix{{\sum PP} & {\sum PV} \cr {\sum VP} & {\sum VV} \cr}} \right]

To predict the position and velocity at the next moment in the future, we'll use a basic kinematic formula: Vk=Vk1 {V_k} = {V_{k - 1}}

Let's re-write it in form: x^k=[1Δt01]x^k1=Fkx^k1 {\hat x_k} = \left[{\matrix{{1\Delta t} \cr {0\;1} \cr}} \right]{\hat x_{k - 1}} = {F_k}{\hat x_{k - 1}}

Where FK represents state-transition model and FK=[1Δt01] {F_K} = \left[{\matrix{{1\Delta t} \cr {0\;1} \cr}} \right]

The covariance matrix PK can be: Pk=FkPk1FkT {P_k} = {F_k}{P_{k - 1}}\;F_k^T

The acceleration α can be given from the IMU and we can use it in prediction as in the following equation: Pk=Pk1+ΔtVk1+12aΔt2Vk=Vk1+aΔt \matrix{{{P_k} = {P_{k - 1}} + \Delta t\;{V_{k - 1}} + {1 \over 2}a\;\Delta {t^2}} \hfill \cr {{V_k} = {V_{k - 1}} + a\;\Delta t} \hfill \cr}

In matrix form: x^k=Fkx^k1+[aΔt22Δt]a=Fkx^k1+Bkuk \matrix{{{{\hat x}_k} = {F_k}\;{{\hat x}_{k - 1}} + \left[{\matrix{{{{a\Delta {t^2}} \over 2}} \cr {\Delta t} \cr}} \right]a} \hfill \cr {= {F_k}\;{{\hat x}_{k - 1}} + {B_k}\overrightarrow {{u_k}}} \hfill \cr}

Where BK is the control matrix and uk \overrightarrow {{u_k}} the control vector. Bkuk=[aΔt22Δt]a {B_k}\overrightarrow {{u_k}} = \left[{\matrix{{{{a\;\Delta {t^2}} \over 2}} \cr {\Delta t} \cr}} \right]a

We can expand covariance by adding Qk, giving expression for the prediction step: x^k=Fkx^k1+BkukPk=FkPk1FkT+Qk \matrix{{{{\hat x}_k} = {F_k}\;{{\hat x}_{k - 1}} + {B_k}\overrightarrow {{u_k}}} \hfill \cr {{P_k} = {F_k}{P_{k - 1}}\;F_k^T + {Q_k}} \hfill \cr}

Refining the estimate with measurements, we can find out the distribution of sensor readings: uexpected=Hkx^kexpected=HkPkHkT \matrix{{\overrightarrow {{u_{expected}}} = {H_k}\;{{\hat x}_k}} \hfill \cr {\sum expected = {H_k}{P_k}H_k^T} \hfill \cr}

Combining Gaussians, the mean and variance of the new Gaussian are: μ'=μ0+σ02(μ1μ0)σ02+σ12σ0'2=σ02σ04σ02+σ12 \matrix{{{\mu^{'}} = {\mu_0} + {{\sigma_0^2\left({{\mu_1} - {\mu_0}} \right)} \over {\sigma_0^2 + \sigma_1^2}}} \hfill \cr {\sigma_0^{{'}2} = \sigma_0^2 - {{\sigma_0^4} \over {\sigma_0^2 + \sigma_1^2}}} \hfill \cr}

We can simplify by factoring out a little piece and calling it k (Where K is the Kalman filter gain matrix) K=σ02σ02+σ12μ'=μ+K(μ1μ0)σ0'2=σ02kσ02 \matrix{{K = {{\sigma_0^2} \over {\sigma_0^2 + \sigma_1^2}}} \hfill \cr {{\mu^{'}} = \mu + K\left({{\mu_1} - {\mu_0}} \right)} \hfill \cr {\sigma_0^{{'}2} = \sigma_0^2 - k\sigma_0^2} \hfill \cr}

For a matrix version, let's just re-write the previous three equations in matrix form. If Σ is the covariance matrix, and μ \vec \mu its mean value, then: K=0(0+1)1μ'=μ0+K(μ1μ0)'=0K0 \matrix{{K = {\sum_0}{{\left({{\sum_0} + {\sum_1}} \right)}^{- 1}}} \hfill \cr {{\mu^{'}} = {{\vec \mu}_0} + K\left({{{\vec \mu}_1} - {{\vec \mu}_0}} \right)} \hfill \cr {{\sum^{'}} = {\sum_0} - K{\sum_0}} \hfill \cr}

We have two distributions:

The predicted measurement with: (μ00)=(Hkx^k.HkPkHkT) \left({\mu 0\sum 0} \right) = \left({{H_k}{{\hat x}_k}.{H_k}{P_k}H_k^T} \right)

Where HK: Observation model maps true state space to observed space Rk[σpos20.00.0σvel.2] Rk\left[{\matrix{{\sigma_{pos}^2} & {0.0} \cr {0.0} & {\sigma_{vel.}^2} \cr}} \right]

And, the observed measurement with: (μ1.1)=(zk.Rk) \left({\mu 1.\sum 1} \right) = \left({\overrightarrow {{z_k}}.Rk} \right)

Where RK is Covariance of observation

We can plug these distributions into eq. (13) to find the overlap: Hkx^k'=Hkx^k+K(zkHkx^)HkPk'HkT=HkPkHkTKHkPkHkTK=HkPkHkT(HkPkHkT+Rk)1 \matrix{{{H_k}\;\hat x_k^{'} = {H_k}\;{{\hat x}_k} + K\left({\overrightarrow {{z_k}} - {H_k}\;\hat x} \right)} \hfill \cr {{H_k}\;P_k^{'}H_k^T = {H_k}\;{P_k}H_k^T - K\;{H_k}\;{P_k}H_k^T} \hfill \cr {K = {H_k}\;{P_k}H_k^T{{\left({{H_k}\;{P_k}H_k^T + {R_k}} \right)}^{- 1}}} \hfill \cr}

Also, we can knock off an HK the front of every term in eq. (14) and eq. (15), and an HKT off the end of all terms for P'K P'K equation: x^k'=x^k+K(zkHkx^k)Pk'=PkKHkPkK=PkHkT(HkPkHkT+Rk)1 \matrix{{\hat x_k^{'} = {{\hat x}_k} + K\left({\overrightarrow {{z_k}} - {H_k}\;{{\hat x}_k}} \right)} \hfill \cr {P_k^{'} = {P_k} - K{'}{'}\;Hk\;{P_k}} \hfill \cr {K{'}{'} = {P_k}H_k^T{{\left({{H_k}\;{P_k}H_k^T + {R_k}} \right)}^{- 1}}} \hfill \cr}

When losing GPS signals for some time especially when IoT devices installed in weak GPS signals area or when IoT devices pass through tunnels or in a high building area. The previous three equations used for the update step and that's it x^k' \hat x_k^{'} is estimate value, then we can take another round of prediction as many times as we like, and so on until GPS signals received again.

Flow diagram of the proposed method

Figure 5 shows the information flow diagram of the previously proposed procedure which indicates how to integrate the slow rate of GPS output data with high rate IMU data.

Figure 5

Flow diagram of the proposed method.

The pseudo code of the proposed algorithm is outlined in the following steps:

Read IMU signal every 1msec

Read GPS output every 1Sec

Enable timer interrupt

Enable external interrupt for GPS signal

loop:

{

IF GPS signal available (more than 4 satellite available) then:

Get the new location and velocity from GPS signal

Correct IoT device's location

Correct IoT device's velocity

elseif GPS signal does not available and time=10msec then:

Estimate the location using IMU & KF

Estimate the velocity using IMU & KF

Reset time

}

From the previous analysis we can conclude:

The IoT Anchor node's location and velocity can be estimated based on the acceleration measurements.

Once IoT Anchor nodes locations estimated accuracy, we can determine the locations of other IoT nodes (Non-GPS nodes) using known methods which depend on wireless modules such as LoRaWAN.

This IoT node's location and velocity can be updated every time a new acceleration measurement.

IF real GPS signals are available, the proposed method will be comparing the position estimation with a real GPS measurement to correct the estimation IoT node's location.

The IMU has a much higher update rate than the GPS, 100 Hz compared to the 20 Hz of the fast GPS module, this means that the IoT device's location update rate can be increased from 20 Hz (50 m sec) to 100 Hz (10 msec).

The update rate has been increased, not only for the velocity estimation but also for the acceleration and orientation.

If an IoT Anchor node is installed in a fixed location, we can put it in a sleep mode during periods when IoT messages are not being sent or received to save power consumption.

If the GPS measurement is very bad due to a bad quality signal or lost GPS signals, the proposed method gain to work as a weight factor assures that the best-estimated IoT node location value is kept.

Hardware implementation of iot anchor node

In this work, we implemented the proposed localization method on real hardware components to develop the proposed IoT node with localization features as shown in Figure 6. The main components of this device are microcontroller which is already in any IoT device, GPS module, and IMU module. The specifications of Micro-Controller used and peripheral configurations are:

ATmega128 Micro-Controller is used

Hardware Clock Frequency is set to 8M external crystal resonator

UART 0 peripheral configured for GPS

UART 1 peripheral configured for serial transmission

I2C peripheral configured at 400 KHz SCK frequency for IMU (MPU6050)

External interrupt 2 peripheral configured on rising edge mode for IMU (MPU6050).

Figure 6

The proposed hardware Anchor IoT node.

The Hardware life cycle of the proposed unit is divided as follows:

Configuring IMU and GPS as previously mentioned

Calibrating IMU readings for error minimization

Waiting for GPS to stabilize and provide valid readings

Starting the hardware's program flow

Note:

For a problem of high power consumption of the GPS receiver module in IoT device:

The total power consumption of the proposed unit is the assembly of the GPS unit, IMU sensor and ATMega micro-controller. The power consumption of GPS module=79.2 m watt, while the power consumption of IMU sensor =10.56 m watt, and the power consumption of ATMega micro-controller =45 m watt. So, the total power consumption of the proposed IoT anchor unit =134.76 m watt.

If the IoT device is installed in a place with an adequate power source, there is no problem with consumption. Like installed in cars, it can depend on the car battery or near from electrical power source.

But if the IoT device has a limited power source, then the microcontroller can place the GPS in sleep mode and wake it only at certain time intervals or when needs to transmit the GPS position.

Although the computational complexity of the proposed method which using GPS signal integrated with IMU module has high rate update output (every 1 msec), we succeeded to implement our solution using hardware implementation on one of the most popular micro-controller in the market (ATmega 128) and achieved 10msec updating rate.

Simulation and practical Results

The simulation part has done based on Matlab coding as shown in Figures 7 and 8. Also, some simulation results done based on Python coding as shown in Figure 9. The hardware implementation is done based on ATMega 128 microcontroller. Real Vector Network analyzer is used to test the hardware implementation over microcontroller as will be shown in details in the following.

Figure 7

Real velocity versus calculated velocity.

Figure 8

Example of a GPS' calculated acceleration.

Figure 9

Error Metric Computation (Python simulation), where: Green points are GPS observation, Red line is estimated trajectory and Blue line is the true trajectory positions.

First, some simulation results of using GPS only indicate the problems of using GPS alone to determine IoT node velocity as shown in Figure 7. This indicates the difference between the estimation velocity using GPS alone and real velocity measurements. In Figure 7, the real and the calculated velocity can be both seen in the same graphic. As shown, the calculated velocity only considers the case of constant velocity, both graphics are very similar (for example between 5 and 6 seconds). As the “real” velocity's slope increases, the calculated velocity's error becomes higher.

For the IoT device acceleration using GPS only as discussed in equation (2), Figure 8 represents the ”real” and calculated acceleration. It can be seen how if the”real” acceleration's slope is closer to zero.

Figure 9 demonstrates the error metric computation simulation of the proposed methodology in three dimensions. These results indicate that the error between the actual and calculated positions has become very small.

After the hardware implementation using ATmega128 Micro-Controller is done, Figure 10 demonstrates the timing diagram for the program flow events on hardware realized using a real Network Vector Analyzer device at our institute NTI Lab.

Figure 10

Hardware Work Flow realized on Logic Analyzer.

The following data was extracted:

Interrupt latency: 22 microseconds

Interrupt Frequency: 20 Hz

IMU I2C data acquisition time: 500 microseconds

IMU and GPS data computation time: 1.7 milliseconds

Kalman filter computation time: 8 milliseconds

Total frame time: 10.223 milliseconds.

We can summarize the validation processes of our method:

First we implement hardware IoT anchor node with AVR ATMega 128 microcontroller, GPS, IMU sensor, and other component as shown in Figure 6.

After the hardware implementation using AT-mega128 Micro-Controller is done, Figure 10 demonstrates the timing diagram for the program flow events on the realized hardware using a real Network Vector Analyzer device at our institute NTI Lab.

Run the unit and collect the location of the unit via its sensors and firmware in known location, then compare the location results with the known location to validate the performance of the proposed unit.

We validate the high update rate of location the proposed unit (100 Hz)) instead of the standard GPS receiver rates (1 to 20 Hz) using Network Analyzer as shown in Figure 10.

Deploy the proposed unit in vehicle (as an IoT anchor node), track the vehicle in known location area and compare the estimated track with the real track to validate the processing of the proposed unit as shown in Figure 9.

Moving the vehicle with the proposed unit through tunnel as a weak GPS signals area, to validate the proposed system can estimate the location even an area with the weak GPS signals.

These results indicated that the proposed hardware solution can be updated low GPS rate to high update rate using hardware implementation. The microcontroller implementation result of this method shown the IoT Anchor node's location can be known accurately and at a high update rate (100 Hz) instead of the standard (1, 10, and 20 Hz) of GPS receiver module alone.

Comparative study

Many researchers presented solutions to improve outdoor locations using integration of multi-sensor GPS/IMU. But most of them didn't present solution if GPS signals are lost during pass tunnel or at undergrounds area or between high buildings. Many of them tried to improve GPS localization using different techniques, but they didn't implement their solution on an embedded system as illustrated in the following table (Table 1).

Comparison between the proposed method and the relevant work.

2019 (Zhu et al., 2019) 2016 (Werries and Dolan, 2016) 2017 (Li et al., 2017) Proposed Method
GPS with IMU Yes Yes Yes yes
KF of modified KF Yes Yes Yes yes
Hardware implementation No No No yes
Update rate Not mentioned 250 m sec Not mentioned 10 m sec
Update location if GPS signal lost No No No yes
Integrate with IoT device No No No yes
Used Components GPS + 3IMU GPS GPS + IMU + UWB GPS + IMU
Power consumption (without microcontroller) 79.2 + 3*10.56 = 110.88 mW 79.2 mW 79.2 + 10.56 + 5.3 = 95 mW 79.2 + 10.56 = 89.76 mW
For the power consumption

The total power consumption of the proposed unit is the assembly of the GPS unit, IMU sensor and ATMega micro-controller. The power consumption of GPS module=79.2 m watt, while the power consumption of IMU sensor =10.56 m watt, and the power consumption of ATMega micro-controller = 45 m watt. So, the total power consumption of the proposed IoT anchor unit =134.76 m watt (89.76 m watt without micro-controller).

Compared to other works, power consumption depends on location unit components such as GPS sensors and IMU. For example, our proposed unit uses one GPS and one IMU consuming 89.88 mille watt while the paper (Zhu et al., 2019) uses one GPS and 3 IMU so it consumes 110.88 mille watt.

For compatibility of the hardware implementation

The proposed unit has already been implemented at the NTI Design Center, has been successfully tested in practice, and has been installed in several NTI vehicles for testing in a real environment.

Further discussion

The proposed solution is to use a hybrid mechanism integrating the two outdoor localization methods. It depends on occupying some IoT devices with GPS (Anchor Nodes) and others IoT devices with wireless sensors like Lo-RaWAN (without GPS-Unknown node).

Non-GPS IoT Nodes can be located using GPS IoT Nodes (Anchor IoT Node) to reduce power consumption and cost.

The first limitation is power source of IoT anchor node as GPS module and IMU sensors need power source from 3.3 to 5 volt with current 1 ampere, So If these IoT anchor nodes must be installed in devices have sustainable current source.

If the IoT device is installed in a place with an adequate power source, there is no problem with consumption. Like installed in cars, it can depend on the car battery or near from electrical power source.

The battery which can be used as a power source for the proposed IoT anchor node can be like as battery of mobile phone, and it can run units few days more than phone.

But if the IoT device has a limited power source, then the microcontroller can place the GPS in sleep mode and wake it only at certain time intervals or when needs to transmit the GPS position.

In the future work, we will try to solve the sustainable power consumption of IoT anchor nodes using re-new power sources or using other localization methods rather than GPS.

Conclusions

In this paper, we focused on determining the IoT Anchor node locations with high accuracy to enhance the overall accuracy of all IoT nodes locations. To achieve this goal; two sensors, a GPS receiver, and an Inertial Measuring Unit (IMU) are integrated using Kalman filter technique in IoT Anchor node. The proposed integration method handled the different location update rates of GPS and IMU to update the IoT device's location at a high rate near 100 Hz.

This proposed method was implemented on AVR microcontroller (ATMega128) to develop the real-time localization of IoT Anchor nodes. By using this method, GPS provides position while the IMU provides orientation, acceleration, and turning rates. So, by integrating both of them the IoT Anchor node's location estimation is accurate enough. Our method can predict the locations of the IoT Anchor nodes in case of the GPS signals are lost for some time. The microcontroller implementation results of this method shown the location can be known accurately and at a high update rate (100 Hz) instead of the standard GPS receiver rates. This method is suitable for knowing the IoT Anchor nodes location and speed in case of GPS signals are lost. Moreover, this proposed method will help other Non-GPS IoT nodes (ex. LoRaWAN nodes) to determine their locations with high accuracy with the helping of the well-known Anchor IoT node locations.

eISSN:
1178-5608
Język:
Angielski
Częstotliwość wydawania:
Volume Open
Dziedziny czasopisma:
Engineering, Introductions and Overviews, other