# More Sensors or Better Algorithm?

Zoltan Horvath, Hanna Horvath

► To cite this version:

Zoltan Horvath, Hanna Horvath. More Sensors or Better Algorithm?. 15th International Conference on Informatics and Semiotics in Organisations (ICISO), May 2014, Shanghai, China. pp.238-245, 10.1007/978-3-642-55355-4_24. hal-01350929

HAL Id: hal-01350929

https://inria.hal.science/hal-01350929

Submitted on 2 Aug 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# More Sensors or Better Algorithm?

Zoltan Horvath¹*, Hanna Horvath²

¹University of Pecs, Ifjusag st. 6., Pecs, 7623, Hungary
hz@gamma.ttk.pte.hu

²Leowey Klara Secondary School, 8-10. Szent Istvan Sqr., Pecs, 7624, Hungary
hhzs1995@yahoo.com

**Abstract.** For the development of a successful indoor navigation system it is essential to know the nature of signals broadcasted by different access points and other signal broadcasting/transmitting equipments, since we can't rely on the help of navigation satellites inside buildings. However we need to use the original signal in each case for accurate positioning, so we have to be able to filter out the interfering signals with the help of different algorithms.

**Keywords:** GPS, L1 regression analysis, Kalman Filter, GLONASS

## 1 Introduction

We examined the precision and inaccuracy of GPS sensors built in different smartphones in a previous research of ours [12]. From the experiment it turned out, that the data provided by the devices are quite inaccurate. The primary cause of this is attributable to the scattered signal, which stems from the device not always seeing the original "clear" signal broadcasted by the navigation satellites. This is why the spread of GLONASS system is of great importance, as smartphones using GLONASS provide more precise data for the users. On the one hand the device uses two independent navigation system here, also GLONASS has ground reference stations where the device gets further clarification. Nevertheless it does not always mean a solution. This is why the usage of different "signal-cleaner" algorithms is necessary, because these algorithms are able to filter out scattered, disturbing signals from the originals. Thereby the measurement becomes much more accurate. Filtering out the scattered signals and those which come from the interference is also essential, because when using indoor navigation, the ratio of scattered signals increases significantly compared to the original.
# 2 Material and Method

## 2.1 Devices

In our research we used the next smart phones and a tablet. These were the following: HTC HD (Windows mobile 6), HTC 8x (Windows mobile 8), Sonny Xperia J (Google Android OS v4.0), iPhone 4 (iOs 4), iPad2 (iOs 6), Nokia Lumia 1520.

By choosing these devices, we can try out most of the used operation systems of our times'. In addition, the HTC 8X device applies GLONASS support in order to allocate our location. This support is available up from the series of iPhone 4S.

## 2.2 GLONASS

Before the research, we required the HTC 8X to be the most precise since this device has GLONASS support besides GPS [7]. This means that the traditional GPS system is expanded with the data of the satellites developed by Russians, therefore it makes it more precise to the users. Presently there are 51 reference stations in Hungary. Pecs is a good location in this network because there are three stations near at hand. These are Siklos (20km from Pecs), Barcs (50km from Pecs) and Kaposvar (50km from Pecs). Structure of GPS signal

All signal components are derived from the output of a highly stable atomic clock. In the operational (Block II/IIA) GPS system each satellite is equipped with two caesium and two rubidium atomic clocks. The clocks generate a pure sine wave at a frequency f0 = 10.23MHz, with a stability of the order of 1 part in 1013 over one day. This is referred to as the fundamental frequency.

Multiplying the fundamental frequency f0 by integer factors yields the two micro-wave L-band carrier waves L1 and L2 respectively (above two figures). The frequency of the two waves is obtained as follows:

$$fL1 = f0 \times 154 = 1575.42\text{MHz} \qquad (1)$$

equivalent wavelength: λ L1 = c / fL1 ≈19cm

$$fL2 = f0 \times 120 = 1227.60\text{MHz} \qquad (2)$$

equivalent wavelength: λ L2 = c / fL2 ≈24cm

These are right-hand circularly polarised radio frequency waves capable of transmission through the atmosphere over great distances, but they contain no information. All satellites broadcast the same frequencies (though the received frequencies are slightly different because of the Doppler shift).

## 2.3 Clear GPS Signal

We performed measurements on planes during flight, when the aircrafts reached the altitude. During the measurements we experienced that certain mobiles were unable to detect GPS signal. The mensuration was necessary, because we couldn't get closer to the satellites broadcasting navigation signals than the aforementioned altitude,
furthermore no artificial object could interfere with the signals. This way we can work with relatively clean signals, free of scattered signals. Since at flight altitude we can't designate a fixed length area, every measurement lasted for exactly 10 minutes. The results can be seen in the following figure.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Clear GPS Signal</figcaption></figure>

## 2.4 L1 regression analysis

We investigate our results first time with L1 regression. Consider the linear regression model (1):

$$Y_i = \beta_0 + \beta_1 x_{li} + \cdots + \beta_p x_{pi} + \varepsilon_i \quad (3)$$

Where $\beta_0, \beta_1, \dots, \beta_p$ are unknown parameters and $\{\varepsilon_i\}$ are unobservable independent, identically distributed random variables each with median 0. For simplicity, we will assume that the $x_{ki}$'s are non-random although the results will typically hold for random $x_{ki}$'s. We will consider the asymptotic behavior of L1-estimators of $\beta = (\beta_0, \dots, \beta_p)$; that is $\hat{\beta}_0 \hat{\beta}_1, \dots, \hat{\beta}_p$ minimize the objective function (2)

$$g_n(\Phi) = \sum_{i=1}^{n} |Y_i - \Phi_0 - \Phi_1 x_{li} - \cdots - \Phi_p x_{pi}| \quad (4)$$
over all $\Phi = (\Phi_0, \dots, \Phi_p)$.

In Petros Hadjicostas (2012) optimization program he seeks to minimize [8] (over all $k \in \{2, \dots, n-2\}$) (3)

$$z_k = \sum_{i=1}^{k} |\theta_i - \gamma_0 - \beta \phi_i| + \sum_{i=k+1}^{n} |\theta_i - \delta_0 - \beta \phi_i \quad (5)$$
Subject to at least one of the following conditions:

1A: $\beta \ge 0$ and $\beta(\phi_{k+1} - \phi_k) \ge \gamma_0 - \delta_0$

1B: $\beta \ge 0$ and $\beta(\phi_n - \phi_1) \le \gamma_0 - \delta_0$

2A: $\beta \le 0$ and $\beta(\phi_{k+1} - \phi_k) \le \gamma_0 - \delta_0$

2B: $\beta \le 0$ and $\beta(\phi_n - \phi_1) \ge \gamma_0 - \delta_0$

This minimization problem can be solved using standard Linear Programming techniques. L1 Linear regression assumes that an intercept term is to be included and
takes two parameters: the independent variables (a matrix whose columns represent the independent variables) and the dependent variable (in a column vector). L-1 regression is less affected by large errors than least squares regression [4]. Reflectanced GPS signal filtering with Kalman filter

## 2.5 Kalman filter

We can filter the reflectanced GPS signal with Kalman filter because we can monitor the GPS. If we know which particular signal our smartphone is using then we know what this satellite frequency is. After this, we can use the Kalman filter where we give the original frequency (this will the right data) and we say that the other results are the errors [9].

It is instructive first to review the analysis step in the standard Kalman filter where the analyzed estimate is determined by a linear combination of the vector of measurements d and the forecasted model state vector $\psi^f$[10]. The linear combination is chosen to minimize the variance in the analyzed estimate $\psi^a$, which is then given by the equation

$$ \psi^a = \psi^f + K(d - H\psi^f) \quad (6) $$

The Kalman gain matrix K is given by

$$ K = P^f H^T (HP^f H^T + W)^{-1} \quad (7) $$

The error covariance of the analyzed model state vector is reduced with respect to the error covariance of the forecasted state as

$$ \begin{aligned} P^a &= \overline{(\psi^a - \psi^t)(\psi^a - \psi^t)^T} \\ &= \overline{[\psi^f - \psi^t + K(d - d^t - H\psi^f + H\psi^f)][\psi^f - \psi^t + K(d - d^t - H\psi^f + H\psi^f)]} \\ &= (1 - KH)(\psi^f - \psi^t)(\psi^f - \psi^t)^T (1 - KH)T K (d - d^t)^T K^T \\ &= (1 - KH)P^f (1 - H^t K^t) + KWK^t \\ &= P^f - KPH^f - P^f H^T K^T + K(HP^f H^t + W)K^T \\ &= (1 - KH)P^f \quad (8) \end{aligned} $$

The analyzed model state is the best linear unbiased estimate [1]. This means that $\psi^a$ is the linear combination of $\psi^f$ and $d$ that minimizes

$$ \text{Tr}P = (\psi - \psi^t)(\psi - \psi^t), \text{ if model errors and observations errors are unbiased and are not correlated [2].} $$

## 3 Results

During our research we examined how much some algorithm can refine the results of the measurements compared to the raw data. In fig. 3 we can see how the result
changes if we clean the data measured at high altitude with the help of the algorithms.

<figure><img src="image_3.png" /><figcaption>Fig. 3. Average distance (Transition altitude) with and without algorithm</figcaption></figure>

Before the purification of the original signals we expected not to have significant
difference, for at flight altitude the devices detects the original signal. It is not
distorted so much by atmospheric phenomena, natural and artificial objects. The
analyzed values confirms this, as we can see it. Perhaps the data measured by iPad 2
is the only exception. As we can see in the graph (fig. 4.), the data collected by these
the devices has only a digression of a couple of centimetres. To sum up, we can say
that if we measure one point in an open area, where the zenith is 92% visible; there is
no significant difference between the two operation systems.

<figure><img src="image_4.png" /><figcaption>Fig. 1. Average distance (Ground altitude) without Kalman filter</figcaption></figure>

When we started our research we were in an opinion that the most homogeneous data
will be collected by the device which applies GLONASS support as well. As it can be
seen in Fig. 4, the WP8 device was the one which made this result. From the second
place, we did not experience big difference. That is to say, there is no significant dif-
ference between the results achieved by the devices which only use GPS. On the other
hand, the HTC 8X (WP8) is the absolute number one with big difference. As we can see, there are two results for the iPad: results from Sports Tracker as well as Outdoor Navigation. The difference is evident and interesting as a single device produced two different results during the same time interval. It is extremely important to point out that the measurement circumstances were exactly the same! Will similar devices using different applications bring similar results or will the same problem not be there in such a case. And most importantly: can this problem be solved using different algorithms? We will examine this in the frame of another project.

What is then if we can filter the satellite signal at the measurement? Because the smart phones can use small mobile apps where this application can recording all signal. After we can analysed this results and we can separate the signal and the reflec-tance signal, we can see the results between the original data and the filtered data on the next figures (fig. 5.).

<figure><img src="image_5.png" /><figcaption>Fig. 5. Modify distance with Kalman Filter, Glonass and without Glonass</figcaption></figure>

We can see in these figures that the different is huge. In the first situation, where we used the GPS+Glonass than was the deviation 22.36 and the average distance 352.19m until then when we used the filter the deviation was 1.47 and the average distance was 371.65 meter. If our smartphone use just the basic GPS system then the deviation is 14.35 and the average distance was 378 meter. As shown in fig. 6, we can see how the values of average distance change if we clean the original raw data with the algorithms. In this case we can provide comparatively accurate (few meters difference) data also with smartphones with not so good sensors.
<figure><img src="image_6.png" /><figcaption>Fig. 6. Average distances with and without algorithm</figcaption></figure>

## 4 Conclusion

In our measurements, we have proved that the sensor itself does not provide enough accurate information in terms of navigation. To access the precise information we need different algorithms. Thus, a full-whipped cheaper smart can be achieved in a more accurate geolokalizációt. The indoor navigation also it will be the most important thing is that the original signal can be filtered out of the scattered signals. Since most of the signals (according to preliminary measurements) seem close to 74% of the scattered or reflected signal. This greatly reduces the accurate position determination. At indoor navigation is not enough to precision some thirty feet. After filtration of the signal device with GPS with the smooth result of the device and result in GLONASS + GPS, the average was 8.68% of the difference. We can see in fig 7.

<figure><img src="image_7.png" /><figcaption>Fig. 7. Differences between the original signals and the filtered signals</figcaption></figure>
The measurements are all available today, operating systems performed. As a reference, and the higher layers of the airspace (flight altitude) measurements were performed in order to eliminate inaccuracies caused by stray signals.

# 5 Acknowledge

Supported by the SROP-4.2.2.C-11/1/KONV-2012-0005 grant.

# 6 Reference

1. Burgers, Gerrit, Peter Jan van Leeuwen, Geir Evensen: Analysis Scheme in the Ensemble Kalman Filter. *Mon. Wea. Rev.*, 126, 1719–1724, (1998)

2. Cheng, D. and P. Hadjicostas. Right-invariant metrics applied to rank correlation coefficients," submitted for publication, 2012

3. Ferenc Brachmann: About performance requirements set against consumer-grade geolocation technologies, submitted for publication, 2013

4. Fisher, N. I.: Statistical analysis of circular data. Cambridge University Press, New York, NY., vol 23, 1995

5. Gartner: https://www.gartner.com/newsroom/id/2573415

6. GLONASS masked area: http://www.gnssnet.hu/ASfigures.php?station=SIKL&button=%E1br%E1k

7. GLONASS: http://www.novatel.com/assets/Documents/Papers/GLONASSOverview.pdf

8. Petros Hadjicostas: Using L1-Regression to Estimate a Monotone Two-Piece Linear Relationship Between Two Angular Variables, The operations research society of New Zealand, 46th Annual Conference, pp. 139-147., 10-11., December, (2012)

9. Shu-Chih Yang, Eugenia Kalnay, Brian Hunt: Handling Nonlinearity in an Ensemble Kalman Filter: Experiments with the Three-Variable Lorenz Model. Monthly Weather Review 140:8, 2628-2646, (2012)

10. Youngsun Jung, Ming Xue, Mingjing Tong: Ensemble Kalman Filter Analyses of the 29–30 May 2004 Oklahoma Tornado Thunderstorm Using One- and Two-Moment Bulk Microphysics Schemes, with Verification against Polarimetric Radar Data. Monthly Weather Review 140:5, 1457-1475, (2012)

11. Zoltan Horvath, Ferenc Brachmann: In smartphones and tablets integrated GPS accuracy, SZAMOKT-2013, (2013), Submitted publication

12. Zoltan Horvath, Hanna Horvath: The Measurement Preciseness of the GPS Built in Smartphones and Tablets, International Journal of Electronics & Communication Technology (IJECT), VOL. 5 ISSUE SPL-I, ISSN (online): 2230-7109, (2014)