# Development of a Kalman Filter in the Gauss-Helmert Model for Reliability Analysis in Orientation Determination with Smartphone Sensors

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Orientation Determination

#### 2.1. Existing Approach

_{y,k}and g

_{z,k}are included as control quantities summed in the vector

**u**

_{k}. By doing this, the predicted yaw should immediately follow the user’s turn. The noise components of the state parameters are c

_{k−1,ϕ}, c

_{k−1,θ}, c

_{k−1,ψ}and Δt is the time interval between two consecutive Kalman updates:

_{ψ,i}[29,31]. The null hypothesis H

_{0}of this statistical test says that the vector

**d**

_{ψ}containing the filter innovations d

_{ψ,i}from the last n epochs is equal to the zero vector (5), whereas the alternate hypothesis H

_{A}states that

**d**

_{ψ}is significantly different to the zero vector (6). If the test value exceeds the corresponding quantile of the chi-square distribution (7), (4) will be used to predict the yaw angle.

**D**

_{ψ}is the variance-covariance matrix (VCM) of the innovation vector

**d**

_{ψ}and only contains variances on the diagonal belonging to the corresponding d

_{ψ,i}. This is a simplification, as auto-covariances may be present. The use of random-walk (3) results in smoother trajectories in sections when the user walks straight. By neglecting the observations from gyroscope in the random-walk model, the influence of systematic sensor deviations (gyro-drift) on the filter result is minimized:

**T**

_{k,k}

_{−1}is the state transition matrix,

**U**

_{k,k}

_{−1}the control matrix and

**C**

_{k,k}

_{−1}is the noise matrix, each referred to epoch k. These system matrices are Jacobi matrices and in general contain the derivatives of the system equations with respect to the corresponding observation group [27,28,29]. Equations (9)–(11) show the system matrices for the approach presented in this section where

**E**is the identity matrix.

**A**

_{m,k}of the Kalman filter equals the identity matrix. They are calculated outside of the Kalman filter ((12)–(14)) by using observed accelerations a

_{x,k}, a

_{y,k}, a

_{z,k}and magnetic flux densities m

_{x,k}, m

_{y,k}, m

_{z,k}[33]. The accelerations are filtered in a separate Kalman filter to remove high-frequency components due to the movement of the user [2]:

_{m}will be increased if the magnitude of the measured magnetic field $\Vert {\mathit{m}}_{k}\Vert $ is not stable (15), leading to an adaptive standard deviation σ

_{m,k}for each Kalman filter epoch. As the geomagnetic field should be constant related to the dimensions of a building, it will be assumed that magnetic perturbations are present if the measured magnitude changes:

**H**

_{k}is a Jacobi matrix containing the derivatives of (12)–(14) with respect to the accelerometer and magnetometer measurements.

#### 2.2. Problem Description

_{k}~ 0°). The reference trajectory is calculated from the measurements of the TS16 total station (Leica Geosystems, Heerbrugg, Switzerland) which is tracking the user by the help of a 360°-mini-prism on a helmet (Figure 2 right).

_{i}play a key role. According to [29,37,38], all quantities with stochastic information can be treated as observations.

**u**and the noise variables

**c**. The observations of the measurement equation are summed in the vector ${\mathit{l}}_{m}$, where m labels quantities of the measurement equation. With (17)–(20) the partial redundancy can be calculated for the previously mentioned observations according to [29]:

_{i}is the number of observations in each observation group and

**D**

_{k}is the VCM of the filter innovation [27,28,29].

**e**

_{j}is the unity vector to select the corresponding r

_{i}respectively diagonal element. In the above formulation of the Kalman filter, the r

_{i}can only be calculated for the directly observed angles in the measurement equation but not for the original observations from accelerometer and magnetometer due to the structure of (12)–(14).

#### 2.3. Kalman Filter in the Gauss-Helmert Model

_{i}need to be derived for this case. In [30] the GHM is also used to estimate variance components for the system noise. Though, there is still the assumption of using the GMM in the measurement equation and the results cannot be used in this article.

**w**, the bracketed expression in the second term equals the stochastic additions $\Delta \widehat{\mathit{x}}$ to the approximate parameters ${\mathit{x}}_{0}$ and the bracketed expression in the third term equals the residuals $\mathbf{v}$. Formula (23) is only valid for the first iteration of least-squares estimation, because linearization of the functional model necessitates an iterative approach. In the subsequent iterations, the functional model is always linearized at the previously estimated observations and parameters [40]. Formulas (24)–(27) show, how the searched quantities with corresponding VCM are calculated in the GHM in the context of least-squares [41]:

**B**is the observation matrix, ${\Sigma}_{\Delta \widehat{x}\Delta \widehat{x}}$ is the VCM of the estimated additions, ${\Sigma}_{ll}$ the VCM of the observations and ${\Sigma}_{\mathit{vv}}$ is the VCM of the residuals. It is important that

**A**and

**B**are column-regular matrices. Otherwise the inverse matrices cannot be calculated. To avoid singular matrices, the functional relations have to be chosen, such that there will be no linearly dependent columns in these matrices.

**F**, control-input matrix

**L**and noise-input matrix

**G**are assumed to be time-invariant. Solving such differential equations in the state space—also shown in [27,28,29]—unambiguously defines the state parameters at time k and gives the approximate formulation (29):

**u**

_{k}and

**c**

_{k}which is already shown in (29) respectively (30). This set of equations will be—analogue to [29]—formulated in the GHM, such that it contains the residuals belonging to ${\widehat{\mathit{x}}}_{k-1}$,

**u**

_{k}and

**c**

_{k}(31). The derivation of (31) can be found in the Appendix A:

**w**

^{*}

_{s,k}are the misclosures, arising because of the overdetermined system equation respectively condition equations.

**A**

^{*}_{s,k}is the design matrix and

**T**

^{*}_{k.k}

_{−1},

**U**

^{*}_{k,k}

_{−1}and

**C**

^{*}_{k,k}

_{−1}are the observation matrices which belong to the condition equations of the system equation:

**A**and

**B**into (24):

**M**,

**N**,

**O**and

**P**are arbitrary matrices and not related to the derivations made in this section:

**M**in the Woodbury formula (35), results will show two equivalent representations (36) and (37) of the VCM of the estimated parameters. It has to be mentioned, that this VCM corresponds to ${\widehat{\mathit{x}}}_{k}$ and not to $\Delta {\widehat{\mathit{x}}}_{k}$. The reason is that ${\mathit{x}}_{0}$ equals ${\overline{\mathit{x}}}_{k}$, which is stochastic and its stochastic information is implicitly integrated by adding its calculation to the functional model ((31) and (33)). Whereas in least-squares ${\mathit{x}}_{0}$ is non-stochastic and therefore ${\Sigma}_{\widehat{x}\widehat{x}}$ equals ${\Sigma}_{\Delta \widehat{x}\Delta \widehat{x}}$.

**D**

_{m,k}and the gain matrix

**K**

_{m,k}—belonging to the measurement equation—can be found ((39) and (41)). In the same manner, the VCM of the filter innovation

**D**

_{s,k}of and the gain matrix

**K**

_{s,k}belonging to the system equation are derived ((38) and (40)):

_{i}is the factor which specifies how an observation deviation $\nabla {l}_{i}$ influences the corresponding residual ${\mathit{v}}_{i}$ (44). Hence, high r

_{i}are desirable to detect systematic deviations [29]:

**R**, containing the r

_{i}on its diagonal.

**R**is an idempotent matrix, whose trace equals the overall redundancy of the estimation problem [34]. Formula (26) only contains the misclosures

**w**, which can be linearized by

**Bl**according to [34]. If $\nabla \mathit{l}$ is taken into account, results show the disturbed model (45):

**R**equals the overall redundancy can be found in Appendix B.

## 3. Results

**a**, magnetometer

**m**, estimated parameters of the previous epoch

**x**, system noise

**c**and gyroscope

**g**—on the estimated orientation will be assessed by means of the r

_{i}. Figure 3 shows a representative section of the calculated group redundancies for two different specifications of the sensor- and system noise standard deviations.

**x**,

**c**,

**g**) of the system equation in comparison to the ones of the measurement equation (

**a**,

**m**). This means that the estimated orientation mainly relies on the system equation. The reason for the high weight of the system equation is that the resulting trajectory should be smoothed [32]. The problem is that if the model assumptions made in the system equation do not capture the reality, the resulting deviations have high influence on the estimated orientation. There are mainly two possibilities to intervene in the partial redundancy respectively the inner reliability, which will be covered in the next two sections.

#### 3.1. Adaption of the Stochastic Model

_{i}of the gyroscope and the system noise are now clearly higher. The r

_{i}of the magnetometer get close to the ones of the gyroscope if it is used when the user is turning, which yields in good mutual controllability.

_{i}of the individual observations are analyzed. Figure 4 shows, that the r

_{i}of the accelerometer are continuously higher than 0.2, which means that controllability is sufficient. Calculating the thresholds from which deviations can be—statistically justified—detected (according to [29]), gives ~1.4 m/s

^{2}for the y-component of the accelerometer and ~2 m/s

^{2}for the x- and z-component. The user’s motion causes systematic deviations which exceeds these thresholds. Hence, accelerometer observations which should not be used for calculating pitch and roll can be detected.

_{i}of the magnetometer show a remarkable, alternating behavior. In the trajectory parts where the user walks straight, the r

_{i}of m

_{y}are close to zero. Whereas in parts where the user turns, controllability of m

_{x}and m

_{z}is bad. If there are systematic deviations in these observations, they cannot be detected and have a high influence on the estimated orientation angles. The r

_{i}of x

_{ϕ}and x

_{θ}are again continuously higher than 0.2 and therefore sufficiently controlled. The same findings hold for c

_{ϕ}and c

_{θ}, whereas c

_{ψ}is totally uncontrolled. Generally the r

_{i}of the previously estimated parameters and the system noise behave in a similar manner. g

_{y}is also uncontrolled as its r

_{i}is very close to zero. The r

_{i}of g

_{z}are again higher than 0.2. The behavior of the r

_{i}of the previously estimated yaw angle is interesting, as they go up to 0.25 if the gyroscope measurements are used in the system equation. If the gyroscope is not used in the following epochs the r

_{i}decrease.

_{i}, the influence of the change of the standard deviation σ

_{i}of one observation on the partial redundancy of the other observations is analyzed. This analysis should support an aimed change of the standard deviations to improve the r

_{i}. Table 3 shows how the r

_{i}change, if the standard deviation of one observation is multiplied with the factor 10 (left sign in Table 3) respectively 0.1 (right sign in Table 3). The standard deviation of all the observations was varied, except for the ones of the previously estimated parameters, as they are a direct result of the Kalman filter.

_{i}of one observation on the corresponding r

_{i}. If σ

_{i}is increased, the weight of the observation will be less in state estimation. Hence the corresponding r

_{i}should also be increased. A reduction of σ

_{i}should cause a smaller r

_{i}on the contrary. This is the case for most of the observations, except for g

_{y}. The reason therefore is that its r

_{i}are already close to zero and a reduction of σ

_{i}has no effect.

_{i}of one observation influences also the partial redundancy of other observations. A raise of one σ

_{i}should cause a reduction of partial redundancy of other observations, as they get more weight in the state estimation. A reduction of one σ

_{i}should raise the partial redundancy of other observations on the contrary. Though, the change of σ

_{i}of c

_{ϕ}and c

_{θ}, show another behavior. By increasing as well as decreasing σ

_{c-ϕ}and σ

_{c-θ}, the r

_{x-ϕ}and r

_{x-θ}are reduced. A raise of σ

_{i}of g

_{z}respectively of c

_{ψ}causes also a raise of the r

_{i}of the previously estimated yaw angle.

_{y}is only related to x

_{ϕ}and c

_{ϕ}, whereas a

_{x}and a

_{z}are related to x

_{θ}and c

_{θ}. The change of σ

_{i}of one of the magnetometer measurements influences the r

_{i}of x

_{ψ}, g

_{z}and the other two magnetometer components. m

_{y}stands out, as a reduction of σ

_{i}positively influences the r

_{i}of c

_{ϕ}and c

_{θ}and the r

_{i}of a

_{z}. Hence, a reduction of σ

_{i}of m

_{y}would have the most positive influence on the r

_{i}. As the controllability of this observation is bad, a further reduction is not advisable.

_{y}as well as c

_{ψ}are not controlled by any of the other observations (i.e., changing the standard deviation of any other observation does not influence r

_{g-y}and r

_{c-ψ}). The only way left in the stochastic model is to increase the standard deviation of such observations. In this case it is very likely, that the raised standard deviations cover the systematic deviations which actually should be detected.

#### 3.2. Adaption of the Functional Model

_{i}of other observations. Through the example of the r

_{i}of the gyroscope, the functional influences should be analyzed. (47) and (48) show the formulas to calculate the r

_{i}of the gyroscope:

_{33}

*****corresponds to the third diagonal element of the inverse of

**D**. The difference of (47) and (48) is the trigonometric function of the roll angle ϕ (σ

^{2}

_{g-y}and σ

^{2}

_{g-z}are assumed to be equal). As the roll angle is close to zero in the considered trajectory, also r

_{g-y}will be close to zero even when changing σ

_{i}of other observations (which influences d

_{33}

*****). Hence, the smartphone orientation during the trajectory measurements has a huge impact on the calculated r

_{i}—not only the ones from gyroscope, but also the ones from accelerometer and magnetometer ((12)–(14)). This seems reasonable if a closer look is taken on the quantities used to determine the smartphone orientation. The accelerometer should sense the gravity vector and the magnetometer the Earth magnetic field, which are both a vector quantity. The more sensor components sense these quantities, the better the mutual controllability should be. This should be the same for the gyroscope, which should sense the rotation of the user around the z-axis of the reference respectively navigation coordinate frame.

**R**given in (49):

_{i}of the previously estimated parameters, the system noise as well as the x-components of the sensors are not affected by the rotated data, when comparing the results with Figure 4. The y- and z-components of the sensors are more balanced now, leading to a better mutual controllability. Especially the mean level of the r

_{i}of the gyroscope y-component are now approximately 0.1, which is clearly higher compared to Figure 4.

_{tr}is the number of used trajectories—N

_{tr}roll angles, N

_{tr}pitch angles and one yaw angle have to be estimated. If there is a turn detected in the actual trajectory, gyroscope measurements from multiple smartphones have to be processed. Hence, every additional trajectory contributes with a formula of type (4) to the system equation, which leads to N

_{tr}−1 condition Equations (32) in the system equation. The measurement equation consists of N

_{tr}triples of (12)–(14).

_{i}. Nevertheless, the height of the r

_{i}can be compared. The r

_{i}of the previously estimated roll and pitch angel has not changed. It can be seen, that the r

_{i}of the accelerometer, the system noise components and the previously estimated yaw angle are raised by using additional observations, which is especially important for the system noise of the yaw angle. The controllability of this quantity is now slightly improved. The components of the magnetometer and the gyroscope, which already had quite high r

_{i}are now also raised, whereas an effect on the low r

_{i}during turns is not visible.

_{i}of the previously estimated roll and pitch angles, as they are clearly reduced now. The reason could be that the overall redundancy has not changed from the scenario in Figure 6 to the scenario in Figure 7 but more parameters have to be estimated. The remaining r

_{i}have not changed. Especially r

_{g-y}is still close to zero, despite using an additional trajectory where the smartphone’s orientation is different. The functional relation of the four gyroscope measurements—resulting from using the actual and the simulated trajectory (i.e., the two formulas of type (4))—doesn’t lead to an improved mutual controllability. The same holds for the r

_{i}of the magnetometer measurements which are close to zero.

## 4. Discussion

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## Appendix A

**T**

_{k,k}

_{−1},

**U**

_{k,k}

_{−1}and

**C**

_{k,k}

_{−1}in one matrix and ${\mathit{v}}_{\widehat{x},k-1,k}$, ${\mathit{v}}_{u,k}$ and ${\mathit{v}}_{c,k}$ in one vector:

## Appendix B

**R**:

**B**Σ

_{ll}

**B**

^{T}and its inverse.

**B**contains the derivatives of the condition equations with respect to the observations. Therefore, its dimension is b × n, where n equals the number of observations and b equals the number of condition equations. Hence, the identity matrix has dimension b × b and its trace corresponds to the number of condition equations:

**A**contains the derivatives of the condition equations with respect to the parameters, the identity matrix has dimension u × u, where u equals the number of parameters. Thus, the trace of

**R**equals the number condition equations minus the number of parameters, which is the overall redundancy in the GHM [34].

## Appendix C

**U**

_{k,k}

_{−1}contains the derivatives of (1), (2) and (4) with respect to the gyroscope measurements.

**A**

_{m,k}contains the derivatives of (12)–(14) with respect to the parameters respectively the Euler angles and therefore equals the negative identity matrix The variances of the three gyroscope axes are assumed to be equal. Inserting these quantities into (12) gives:

**e**

_{j}gives:

## References

- Titterton, D.; Weston, J. Strapdown Inertial Navigation Technology, 2nd ed.; Institution of Engineering and Technology: Stevenage, UK, 2004; ISBN 978-0-86341-358-2. [Google Scholar]
- Särkkä, S.; Tolvanen, V.; Kannala, J.; Rahtu, E. Adaptive Kalman filtering and smoothing for gravitation tracking in mobile systems. In Proceedings of the 2015 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Banff, AB, Canada, 13–16 October 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
- Groves, P.D. Principles of GNSS, Inertial and Multisensor Integrated Navigation Systems, 2nd ed.; Artech House: London, UK, 2013; ISBN 179-1-60807-005-3. [Google Scholar]
- Kang, W.; Nam, S.; Han, Y.; Lee, S. Improved heading estimation for smartphone-based indoor positioning systems. In Proceedings of the 2012 IEEE 23rd International Symposium on Personal Indoor and Mobile Radio Communications (PIMRC), Sidney, NSW, Australia, 9–12 September 2012; IEEE: Piscataway, NJ, USA, 2012. [Google Scholar]
- Crassidis, J.L.; Markley, F.L.; Cheng, Y. Survey of nonlinear attitude estimation methods. J. Guid. Control Dyn.
**2007**, 30, 12–28. [Google Scholar] [CrossRef] - Sabatini, A.M. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng.
**2006**, 53, 1346–1356. [Google Scholar] [CrossRef] [PubMed] - Tian, Z.; Zhang, Y.; Zhou, M.; Liu, Y. Pedestrian dead reckoning for MARG navigation using a smartphone. EURASIP J. Adv. Signal Process.
**2014**, 2014. [Google Scholar] [CrossRef] - Renaudin, V.; Combettes, C. Magnetic, Acceleration Fields and Gyroscope Quaternion (MAGYQ)-Based Attitude Estimation with Smartphone Sensors for Indoor Pedestrian Navigation. Sensors
**2014**, 14, 22864–22890. [Google Scholar] [CrossRef] [PubMed] - Zhu, X.; Li, Q.; Chen, G. APT: Accurate outdoor pedestrian tracking with smartphones. In Proceedings of the INFOCOM 2013, Turin, Italy, 14–19 April 2013; IEEE: Piscataway, NJ, USA, 2013. [Google Scholar]
- Borenstein, J.; Ojeda, L.; Kwanmuang, S. Heuristic reduction of gyro drift in IMU-based personnel tracking systems. J. Navig.
**2009**, 62, 41–58. [Google Scholar] [CrossRef] - Jiménez, A.R.; Seco, F.; Prieto, J.C.; Guevara, J. Indoor pedestrian navigation using an INS/EKF framework for yaw drift reduction and a foot-mounted IMU. In Proceedings of the 7th Workshop on Positioning Navigation and Communication (WPNC), Dresden, Germany, 11–12 March 2010; IEEE: Piscataway, NJ, USA, 2010. [Google Scholar]
- Blankenbach, J.; Sternberg, H.; Tilch, S. Indoor-Positionierung. In Handbuch der Geodäsie; Freeden, W., Rummel, R., Eds.; Springer: Berlin, Germany, 2015; pp. 1–36. ISBN 978-3-662-46900-2. [Google Scholar]
- Sternberg, H.; Willemsen, T. Ein topologischer Ansatz zur Innenraumnavigation mit MEMS in Smartphones basierend auf dem Routing-Graph. In Internationale Geodätische Woche Obergurgl 2017; Hanke, K., Weinbold, T., Eds.; Wichmann: Berlin, Germany, 2017; pp. 51–60. [Google Scholar]
- Bahl, P.; Padmanabhan, V. RADAR: An In-building RF-based User Location and Tracking System. In Proceedings of the INFOCOM 2000 19th Annual Joint Conference of the IEEE Computer and Communications Societies, Tel Aviv, Israel, 26–30 March 2000; IEEE: Piscataway, NJ, USA, 2000. [Google Scholar]
- Honkavirta, V.; Perälä, T.; Ali-Löytty, S.; Piche, R. A Comparative Survey of WLAN Location Fingerprinting Methods. In Proceedings of the 6th Workshop on Positioning, Navigation and Communication (WPNC), Hannover, Germany, 19 March 2009; IEEE: Piscataway, NJ, USA, 2009. [Google Scholar]
- Schmid, J.; Gädeke, T.; Curtis, D.; Ledlie, J. Improving sparse organic WiFi localization with inertial sensors. In Proceedings of the 9th Workshop on Positioning Navigation and Communication (WPNC), Dresden, Germany, 15–16 March 2012; IEEE: Piscataway, NJ, USA, 2012. [Google Scholar]
- Zhu, J.; Sen, S.; Mohapatra, P.; Kim, K.H. Navigating in Signal Space: A Crowd-Sourced Sensing Map Construction for Navigation. In Proceedings of the 11th International Conference on Mobile Ad Hoc and Sensor Systems, Philadelphia, PA, USA, 28–30 October 2014; IEEE: Piscataway, NJ, USA, 2014. [Google Scholar]
- Wang, Y.; Wong, A.K.S.; Cheng, R.S.K. Adaptive room-level localization system with crowd-sourced WiFi data. In Proceedings of the 2015 SAI Intelligent Systems Conference (IntelliSys), London, UK, 10–11 November 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
- Abadi, M.J.; Luceri, L.; Hassan, M.; Chou, C.T.; Nicoli, M. A Collaborative Approach to Heading Estimation for Smartphone-based PDR Indoor Localisation. In Proceedings of the 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Busan, Korea, 27–30 October 2014; IEEE: Piscataway, NJ, USA, 2014. [Google Scholar]
- Dong, B.; Burgess, T. Adaptive Kalman Filter for Indoor Navigation. In Proceedings of the 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Madrid, Spain, 4–7 October 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Guan, T.; Fang, L.; Dong, W.; Qiao, C. Robust Indoor Localization with Smartphones through Statistical Filtering. In Proceedings of the 2017 International Conference on Computing, Networking and Communications (ICNC), Santa Clara, CA, USA, 26–29 January 2017; IEEE: Piscataway, NJ, USA, 2017. [Google Scholar]
- Retscher, G.; Tatschl, T. Indoor positioning using Wi-Fi lateration—Comparison of two common range conversion models with two novel differential approaches. In Proceedings of the 2016 Fourth International Conference on Ubiquitous Positioning, Indoor Navigation and Location Based Services (UPINLBS), Shanghai, China, 2–4 November 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Kaemarungsi, K. Design of Indoor Positioning Systems Based on Location Fingerprinting Technique. Ph.D. Thesis, School of Information Science, University of Pittsburgh, Pittsburgh, PA, USA, 2005. [Google Scholar]
- Gikas, V.; Dimitratos, A.; Perakis, H.; Retscher, G.; Ettlinger, A. Full-scale testing and performance evaluation of an active RFID system for positioning and personal mobility. In Proceedings of the 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Madrid, Spain, 4–7 October 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Hellmers, H.; Eichhorn, A.; Norrdine, A.; Blankenbach, J. IMU/magnetometer based 3D indoor positioning for wheeled platforms in NLoS scenarios. In Proceedings of the 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Madrid, Spain, 4–7 October 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Niedermayr, S. Positionsbestimmung durch Kombination geometrie- und merkmalsbasierter Verfahren unter Einbeziehung der Qualität. Ph.D. Thesis, Fakultät für Mathematik und Geoinformation, TU Wien, Vienna, Austria, 2015. [Google Scholar]
- Gelb, A. Applied Optimal Estimation; MIT Press: Cambridge, MA, USA, 1974; ISBN 978-0-262-20027-1. [Google Scholar]
- Simon, D. Optimal State Estimation: Kalman, H infinity, and Nonlinear Approaches; John Wiley & Sons: Hoboken, NJ, USA, 2006; ISBN 978-0-471-70858-2. [Google Scholar]
- Heunecke, O.; Kuhlmann, H.; Welsch, W.; Eichhorn, A.; Neuner, H. Auswertung Geodätischer Überwachungsmessungen, 2nd ed.; Wichmann: Berlin, Germany, 2013; ISBN 978-3-87907-467-9. [Google Scholar]
- Petersen, A.; Koch, R. Statistical Analysis of Kalman Filters by Conversion to Gauss-Helmert Models with Applications to Process Noise Estimation. In Proceedings of the 20th International Conference on Pattern Recognition, Istanbul, Turkey, 23–26 August 2010; IEEE: Piscataway, NJ, USA, 2010. [Google Scholar]
- Wang, J.G. Filtermethoden zur Fehlertoleranten Kinematischen Positionsbestimmung. Ph.D. Thesis, Universität der Bundeswehr München, Neubiberg, Germany, 1997. [Google Scholar]
- Ettlinger, A.; Neuner, H.; Burgess, T. Smartphone Sensor-Based Orientation Determination for Indoor-Navigation. In Progress in Location-Based Services 2016, 1st ed.; Gartner, G., Huang, H., Eds.; Springer: Berlin, Germany, 2017; pp. 49–68. ISBN 978-3-319-47288-1. [Google Scholar]
- Ozyagcilar, T. Implementing a Tilt-Compensated eCompass Using Accelerometer and Magnetometer Sensors; AN 2012, 4248; Freescale Semiconductor: Austin, TX, USA, 2015. [Google Scholar]
- Niemeier, W. Ausgleichungsrechnung: Statistische Auswertemethoden, 2nd ed.; Walter de Gruyter: Berlin, Germany, 2008; ISBN 978-3-11-019055-7. [Google Scholar]
- Wieser, A.; Petovello, M.G.; Lachapelle, G. Failure scenarios to be considered with kinematic high precision relative GNSS positioning. In Proceedings of the 17th International Technical Meeting of the Satellite Division of The Institute of Navigation (ION GNSS), Long Beach, CA, USA, 21–24 September 2004; ION: Manassas, VA, USA, 2004. [Google Scholar]
- Yang, L.; Li, B.; Shen, Y.; Rizos, C. Extension of Internal Reliability Analysis regarding Seperability Analysis. J. Surv. Eng.
**2017**, 143, 1–10. [Google Scholar] [CrossRef] - Wang, J.G. Reliability analysis in Kalman filtering. J. Glob. Position. Syst.
**2009**, 8, 101–111. [Google Scholar] [CrossRef] - Wang, J.G. Test Statistics in Kalman Filtering. J. Glob. Position. Syst.
**2008**, 7, 81–90. [Google Scholar] [CrossRef] - Koch, K.R. Outlier detection for the nonlinear Gauss Helmert model with variance components by the expectation maximization algorithm. J. Appl. Geod.
**2014**, 8, 185–194. [Google Scholar] [CrossRef] - Koch, K.R. Robust estimations for the nonlinear Gauss Helmert model by the expectation maximization algorithm. J. Geod.
**2014**, 88, 263–271. [Google Scholar] [CrossRef] - Jäger, R.; Müller, T.; Saler, H.; Schwäble, R. Klassische und Robuste Ausgleichungsverfahren; Wichmann: Berlin, Germany, 2005; ISBN 3-87907-370-8. [Google Scholar]
- Voigt, C.; Adamy, J. Formelsammlung der Matrizenrechnung, 1st ed.; Oldenbourg Wissenschaftsverlag GmbH: München, Germany, 2007; ISBN 978-3-486-58350-2. [Google Scholar]
- Kuusniemi, H.; Wieser, A.; Lachapelle, G.; Takala, J. User-level reliability monitoring in urban personal satellite-navigation. IEEE Trans. Aerosp. Electron. Syst.
**2007**, 43, 1305–1318. [Google Scholar] [CrossRef]

**Figure 1.**PDR Trajectory. Ground truth in magenta, estimated steps in blue with 95% confidence ellipses.

**Figure 2.**Used sensors and measurement setup: Samsung Galaxy S7 (Samsung, Seoul, Korea), smartphone running indoo.rs Mobile Toolkit

^{TM}to collect sensor observations (

**left**). Helmet with 360°-mini-prism (

**middle**) and Leica TS16 tracking the user (

**right**).

**Figure 3.**Redundancies of the observation groups used in the Kalman filter. (

**Left**) Calculation with the original standard deviations; (

**Right**) Calculation with adapted standard deviations.

**Figure 4.**Partial redundancy of the accelerometer, magnetometer, previously estimated parameter, system noise and gyroscope (

**top**to

**bottom**).

**Figure 6.**Partial redundancy of the actual trajectory when using two times the same trajectory data.

**Figure 7.**Partial redundancy of the actual trajectory when using additional data from one simulated, rotated trajectory.

**Figure 8.**Different results for the yaw angle compared to ground truth from total station. In estimation variant 1 the original standard deviations from Table 2 are used. Variant 2 uses the adapted standard deviations. Variant 3 uses one simulated additional trajectory (equal to the one of Figure 7).

Gauss-Markov | Gauss-Helmert (Simplification) | Gauss-Helmert | |
---|---|---|---|

$\mathit{d}$ | ${\mathit{l}}_{m}-{\mathit{f}}_{m}\left(\overline{\mathit{x}}\right)$ | $-{\mathit{w}}_{m}=-{\mathit{f}}_{m}\left({\mathit{l}}_{m},\overline{\mathit{x}}\right)$ | $\left[\begin{array}{c}-{\mathit{w}}_{s}\\ -{\mathit{w}}_{m}\end{array}\right]=\left[\begin{array}{c}-{\mathit{f}}_{s}\left({\mathit{l}}_{s},\overline{\mathit{x}}\right)\\ -{\mathit{f}}_{m}\left({\mathit{l}}_{m},\overline{\mathit{x}}\right)\end{array}\right]$ |

$\mathit{D}$ | ${\mathit{A}}_{m}{\sum}_{\overline{x}\overline{x}}{\mathit{A}}_{m}^{T}$ | ${\mathit{B}}_{m}{\sum}_{ll,m}{\mathit{B}}_{m}^{T}+{\mathit{A}}_{m}{\sum}_{\overline{x}\overline{x}}{\mathit{A}}_{m}^{T}$ | $\left[\begin{array}{cc}{\mathit{D}}_{s}& \mathbf{0}\\ \mathbf{0}& {\mathit{D}}_{m}\end{array}\right]=$ $=\left[\begin{array}{cc}{\mathit{B}}_{s}{\sum}_{ll,s}{\mathit{B}}_{s}^{T}+{\mathit{A}}_{s}{\sum}_{\widehat{x}\widehat{x},m}{\mathit{A}}_{s}^{T}& \mathbf{0}\\ \mathbf{0}& {\mathit{B}}_{m}{\sum}_{ll,m}{\mathit{B}}_{m}^{T}+{\mathit{A}}_{m}{\sum}_{\widehat{x}\widehat{x},s}{\mathit{A}}_{m}^{T}\end{array}\right]$ |

$\mathit{K}$ | ${\sum}_{\overline{x}\overline{x}}{\mathit{A}}_{m}^{T}{\mathit{D}}^{-1}$ | $\left[\begin{array}{cc}{\mathit{K}}_{s}& {\mathit{K}}_{m}\end{array}\right]=\left[\begin{array}{cc}{\sum}_{\widehat{x}\widehat{x},m}{\mathit{A}}_{s}^{T}{\mathit{D}}_{s}^{-1}& {\sum}_{\widehat{x}\widehat{x},s}{\mathit{A}}_{m}^{T}{\mathit{D}}_{m}^{-1}\end{array}\right]$ | |

${\sum}_{\widehat{x}\widehat{x}}$ | $\left(\mathit{E}-\mathit{K}{\mathit{A}}_{m}\right){\sum}_{\overline{x}\overline{x}}$ | $\left(\mathit{E}-{\mathit{K}}_{m}{\mathit{A}}_{m}\right){\sum}_{\widehat{x}\widehat{x},s}=\left(\mathit{E}-{\mathit{K}}_{s}{\mathit{A}}_{s}\right){\sum}_{\widehat{x}\widehat{x},m}$ | |

$\widehat{\mathit{x}}$ | $\overline{\mathit{x}}+\mathit{K}\mathit{d}$ |

Standard Deviations | Gyroscope | System Noise | Accelerometer | Magnetometer |
---|---|---|---|---|

Original | 30°/s | 10°/s | 1 m/s^{2} | 5 μT |

Adapted | 60°/s | 20°/s | 0.5 m/s^{2} | 2.5 μT |

**Table 3.**Influence of the change of the standard deviation of one observation on the partial redundancy of the other observations. “+” indicates a raise and “−” a reduction of the partial redundancy. At the left sign, the standard deviation was increased by the factor 10 and at the right sign it was decreased by the factor 0.1. Grey shaded cells show the change in the corresponding observation and green means that the observations are functionally related.

σ_{g-y} | σ_{g-z} | σ_{c-ϕ} | σ_{c-θ} | σ_{c-ψ} | σ_{a-x} | σ_{a-y} | σ_{a-z} | σ_{m-x} | σ_{m-y} | σ_{m-z} | |
---|---|---|---|---|---|---|---|---|---|---|---|

r_{x-ϕ} | −|− | −|+ | |||||||||

r_{x-θ} | −|− | −|+ | −|+ | ||||||||

r_{x-ψ} | +|− | +| | −|+ | −|+ | −|+ | ||||||

r_{g-y} | +| | ||||||||||

r_{g-z} | +|− | −|+ | −|+ | −|+ | |||||||

r_{c-ϕ} | +|− | −|+ | |+ | ||||||||

r_{c-θ} | +|− | −|+ | −|+ | |+ | |||||||

r_{c-ψ} | +|− | ||||||||||

r_{a-x} | −|+ | +|− | −|+ | ||||||||

r_{a-y} | −|+ | +|− | |||||||||

r_{a-z} | −|+ | −|+ | +|− | |+ | |||||||

r_{m-x} | −|+ | +|− | −|+ | −|+ | |||||||

r_{m-y} | −|+ | −|+ | +|− | −|+ | |||||||

r_{m-z} | −|+ | −|+ | −|+ | +|− |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ettlinger, A.; Neuner, H.; Burgess, T.
Development of a Kalman Filter in the Gauss-Helmert Model for Reliability Analysis in Orientation Determination with Smartphone Sensors. *Sensors* **2018**, *18*, 414.
https://doi.org/10.3390/s18020414

**AMA Style**

Ettlinger A, Neuner H, Burgess T.
Development of a Kalman Filter in the Gauss-Helmert Model for Reliability Analysis in Orientation Determination with Smartphone Sensors. *Sensors*. 2018; 18(2):414.
https://doi.org/10.3390/s18020414

**Chicago/Turabian Style**

Ettlinger, Andreas, Hans Neuner, and Thomas Burgess.
2018. "Development of a Kalman Filter in the Gauss-Helmert Model for Reliability Analysis in Orientation Determination with Smartphone Sensors" *Sensors* 18, no. 2: 414.
https://doi.org/10.3390/s18020414