Keywords

1 Introduction

Global Positioning System (GPS) is a commonly used instrument for estimation of localization of an object. GPS usage has expanded with the increase of autonomous systems (Wertz, 1992). Various studies have been created for GPS-based localization (Erkec & Hajiyev, 2019; Soken and Hajiyev 2010, 2012).

Global Positioning System satellites provide three-dimensional position, velocity, and time services, and many users benefit from these services using GPS-based positioning systems via devices such as phones, computers, and navigation (Maldonado et al., 1984).

Nonlinear problems become more accurate with the implementation of the Kalman filters, and GPS-based positioning is a nonlinear problem. The signals received by GPS transmitters are noisy data. The purpose of the study is to decrease the errors and obtain more accurate results (Kumar and Rao 2019). GPS data can be processed by various Kalman filter methods and in this study were processed with traditional extended Kalman filter (EKF), linear Kalman filter (LKF), and LKF pre-processed with the Newton-Raphson method. Required data are taken from GPS receivers and processed with the algorithm.

Four GPS satellites were chosen for estimation and coordinates of Şükrü Saraçoğlu stadium assumed as a point. The location of the stadium was determined in Earth-centered inertial (ECI) reference frame. With using determined location, pseudo-ranging models were created due to each GPS satellite. Actual distances were summed with clock bias and random noise, where random is the Gaussian random noise with zero mean and unit variance. With this operation, GPS measurements were simulated. EKF, LKF, and LKF pre-processed with the Newton-Raphson method results have better solutions than measurement estimation and results converged to actual state vectors.

2 Problem Statement

In this study, Şükrü Saraçoğlu stadium GPS location were chosen for estimation. Pseudo-ranging method was used. Four GPS satellites were chosen. Distance between GPS satellites and location were calculated for each iteration. After measurement model were created, traditional EKF, LKF, and NRM pre-processed LKF are applied for correction of estimations:

$$ {D}_{a(i)}=\sqrt{{\left({x}_i-x\right)}^2+{\left({y}_i-y\right)}^2+{\left({z}_i-z\right)}^2} $$
(1)
$$ {D}_{m(i)}=\sqrt{{\left({x}_i-x\right)}^2+{\left({y}_i-y\right)}^2+{\left({z}_i-z\right)}^2}+{b}_i+{v}_i $$
(2)
$$ {L}_i=\sqrt{x_i^2+{y}_i^2+{z}_i^2}\ \mathrm{i}=1,2,3,4 $$
(3)

where xi, yi, zi represents the Descartes coordinates of the i’th GPS satellite; x, y, and z represent the coordinates of the location; vi is white Gaussian noise with zero mean; and b is the clock bias. L1, L2, L3, and L4 are distances between origin and GPS satellite. Da is the actual distance and Dm is measured distance by GPS receiver. After calculating actual distance with Eq. (1), random zero mean Gaussian errors and clock bias were added to actual distances for simulating GPS.

The continuous-time state equation in the considered case is given by

$$ \dot{x}=0,\kern0.5em \dot{y}=0,\kern0.5em \dot{z}=0,\kern0.5em \dot{b}={u}_{\mathrm{s}} $$
(4)

Here us is the white noise with zero mean.

The state Eq. (4) can be written in the discrete-time form as

$$ {\displaystyle \begin{array}{l}x(k)=x\left(k-1\right)\\ {}y(k)=y\left(k-1\right)\\ {}z(k)=z\left(k-1\right)\\ {}b(k)=b\left(k-1\right)+{T}_{\mathrm{s}}{u}_{\mathrm{s}}\end{array}} $$
(5)

Here Ts is the sampling time.

We can rewrite the preceding statements for scalar equations in the state space form, yielding

$$ \left[{\displaystyle \begin{array}{c}x(k)\\ {}y(k)\\ {}z(k)\\ {}b(k)\end{array}}\right]=\left[{\displaystyle \begin{array}{cccc}1& 0& 0& 0\\ {}0& 1& 0& 0\\ {}0& 0& 1& 0\\ {}0& 0& 0& 1\end{array}}\right]\left[{\displaystyle \begin{array}{c}x\left(k-1\right)\\ {}y\left(k-1\right)\\ {}z\left(k-1\right)\\ {}b\left(k-1\right)\end{array}}\right]+\left[{\displaystyle \begin{array}{c}0\\ {}0\\ {}0\\ {}{T}_{\mathrm{s}}{u}_{\mathrm{s}}\end{array}}\right] $$
(6)

This means that the systems dynamics matrix is unit:

$$ \phi \left(k,k-1\right)={I}_{4\times 4} $$
(7)

The system noise vector is

$$ W(k)={\left[0\kern0.5em 0\kern0.5em 0\kern0.5em {T}_{\mathrm{s}}{u}_{\mathrm{s}}\right]}^{\mathrm{T}} $$
(8)

The state space model can be written in matrix form as

$$ X(k)=\phi \left(k,k-1\right)X\left(k-1\right)+W(k) $$
(9)
$$ X(k)={\left[x(k)\kern0.5em y(k)\kern0.5em z(k)\kern0.5em b(k)\right]}^{\mathrm{T}} $$
(10)

Equation (10) represents the state vector of the model.

3 Linear Kalman Filter-Based GPS Localization

The linear Kalman filter (LKF) is a filter that estimates X parameters for the vector of linear regression model. LKF estimation for stationary user previously studied by Hajiyev [5]. State vectors were given in Eq. (10), and due to these state vectors, linear Kalman filter equations can be shown as following equations.

Estimation equation:

$$ \hat{X}(k)=\hat{X}\left(k/k-1\right)+K(k)\hat{Z}(k) $$
(11)

Extrapolation equation:

$$ \hat{X}\left(k/k-1\right)=\hat{X}\ \left(k-1/k-1\right) $$
(12)

Innovation sequence:

$$ \hat{Z}\left(k/k-1\right)=Y(k)-H(k)\hat{X}\left(k/k-1\right) $$
(13)

Here the measurement Y(k),

$$ Y(k)=\left[{\displaystyle \begin{array}{c}\frac{1}{2}\left({L}_1^2-{L}_2^2+{D}_2^2-{D}_1^2\right)\\ {}\frac{1}{2}\left({L}_1^2-{L}_3^2+{D}_3^2-{D}_1^2\right)\ \\ {}\frac{1}{2}\left({L}_1^2-{L}_4^2+{D}_4^2-{D}_1^2\ \right)\end{array}}\right] $$
(14)

Kalman gain coefficient matrix:

$$ K(k)=P\left(k/k-1\right)H{(k)}^{\mathrm{T}}{\left[H(k)P\left(k/k-1\right)H{(k)}^{\mathrm{T}}+R(k)\right]}^{-1} $$
(15)

Predicted correlation matrix of estimation error:

$$ P\left(k/k-1\right)=P\left(k-1/k-1\right) $$
(16)

Correlation matrix of estimation error:

$$ P\left(k/k\right)=\left[I-K(k)H(k)\right]P\left(k-1/k-1\right) $$
(17)

Measurement matrix (H):

$$ H(k)=\left[{\displaystyle \begin{array}{cccc}{x}_1-{x}_2& {y}_1-{y}_2& {z}_1-{z}_2& {D}_2-{D}_1\\ {}{x}_1-{x}_3& {y}_1-{y}_3& {z}_1-{z}_3& {D}_3-{D}_1\\ {}{x}_1-{x}_4& {y}_1-{y}_4& {z}_1-{z}_4& {D}_4-{D}_1\end{array}}\right] $$
(18)

Measurement error covariance matrix (R):

$$ R=\left[{\displaystyle \begin{array}{lll}{\left({D}_1-b\right)}^2{\sigma}^2+{\left({D}_2-b\right)}^2{\sigma}^2+{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4\\ {}{\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+{\left({D}_3-b\right)}^2{\sigma}^2+{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4\\ {}{\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+\frac{1}{2}{\sigma}^4& {\left({D}_1-b\right)}^2{\sigma}^2+{\left({D}_4-b\right)}^2{\sigma}^2+{\sigma}^4\end{array}}\right] $$
(19)

Here σ is the standard deviation of the distance measurement, and b is the clock bias of the GPS receiver.

4 Extended Kalman Filter-Based GPS Localization

Extended Kalman filter (EKF) is an approach for nonlinear systems. EKF linearizes the system and estimates the state vectors. State vectors of the model were given in Eq. (10).

Estimation equation:

$$ \hat{X}(k)=\hat{X}\left(k-1\right)+K(k)\hat{Z}\left(k/k-1\right) $$
(20)

Extrapolation equation:

$$ \hat{X}\left(k/k-1\right)=\hat{X}\left(k-1/k-1\right) $$
(21)

Innovation sequence:

$$ \hat{Z}\left(k/k-1\right)=D(k)-\overline{D}(k) $$
(22)
$$ D(k)={\left[{D}_1(k)\kern0.5em {D}_2(k)\kern0.5em {D}_3(k)\kern0.5em {D}_4(k)\right]}^{\mathrm{T}},\kern0.5em \overline{D}(k)=\left[{\displaystyle \begin{array}{cccc}{\overline{D}}_1(k)& {\overline{D}}_2(k)& {\overline{D}}_3(k)& {\overline{D}}_4(k)\end{array}}\right] $$
(23)
$$ {\overline{D}}_i=\sqrt{{\displaystyle \begin{array}{c}{\left({x}_i(k)-\hat{x}\left(k-1\right)\right)}^2+{\left({y}_i(k)-\hat{y}\left(k-1\right)\right)}^2\\ {}+{\left({z}_i(k)-\hat{z}\left(k-1\right)\right)}^2\end{array}}}+\hat{b}\left(k-1\right) $$
(24)
$$ {D}_i=\sqrt{{\left({x}_i-x\Big)\right)}^2+{\left({y}_i-y\right)}^2+{\left({z}_i-z\right)}^2}+b+{w}_i\kern1em i=\overline{1,4} $$

Here xi, yi, ve, and zi represent the position states of the ith navigation satellite, and x, y, ve, and z represent the position states of the user; b is the clock bias of the GPS receiver and wi random measurement noise.

Kalman gain coefficient matrix:

$$ K(k)=P\left(k/k-1\right)H{(k)}^{\mathrm{T}}{\left[H(k)P\left(k/k-1\right)\ H{(k)}^{\mathrm{T}}+R(k)\right]}^{-1} $$
(25)

Predicted correlation matrix of estimation error:

$$ P\left(k/k-1\right)=\phi \left(k,k-1\right)P\left(k/k-1\right)\phi {\left(k,k-1\right)}^{\mathrm{T}}+Q\left(k-1\right) $$
(26)

Predicted correlation matrix of estimation error:

$$ P\left(k/k\right)=P\left(k-1/k-1\right)-K(k)H(k)\kern0.5em P\left(k-1/k-1\right) $$
(27)

Measurement matrix:

$$ H(k)=\left[{\displaystyle \begin{array}{cccc}\frac{\partial {D}_1}{\partial_x}& \frac{\partial {D}_1}{\partial_y}& \frac{\partial {D}_1}{\partial_z}& \frac{\partial {D}_1}{\partial_b}\\ {}\frac{\partial {D}_2}{\partial_x}& \frac{\partial {D}_2}{\partial_y}& \frac{\partial {D}_2}{\partial_z}& \frac{\partial {D}_2}{\partial_b}\\ {}\frac{\partial {D}_3}{\partial_x}& \frac{\partial {D}_3}{\partial_y}& \frac{\partial {D}_3}{\partial_z}& \frac{\partial {D}_3}{\partial_b}\\ {}\frac{\partial {D}_4}{\partial_x}& \frac{\partial {D}_4}{\partial_y}& \frac{\partial {D}_4}{\partial_z}& \frac{\partial {D}_4}{\partial_b}\end{array}}\right] $$
(28)

Measurement error covariance matrix (R):

$$ R(k)={\sigma}^2{I}_{4\times 4},\sigma =10\ \mathrm{m} $$
(29)

5 Pre-processed LKF with Newton-Raphson Method

Newton-Raphson method is the nonlinear system approach. For each iteration, multiple matrix operations are performed for estimation. The Newton–Raphson method requires a new set of matrix calculations and constructs a different estimation in each iterative step (Cheung & Lee, 2017).

$$ F\left({p}_k\right)=\left[{\displaystyle \begin{array}{c}{f}_1\left(x,y,z,b\right)\\ {}{f}_2\left(x,y,z,b\right)\\ {}{f}_3\left(x,y,z,b\right)\\ {}{f}_4\left(x,y,z,b\right)\end{array}}\right] $$
(30)

where x, y, and z are position vectors and b is the clock bias. Each distance is proper for different sphere equation and sphere equations given in Eq. (30).

$$ {\displaystyle \begin{array}{l}{f}_1\left(x,y,z,b\right)={\left({x}_1-x\right)}^2+{\left({y}_1-y\right)}^2+{\left({z}_1-z\right)}^2-{\left({D}_1-b\right)}^2\\ {}{f}_2\left(x,y,z,b\right)={\left({x}_2-x\right)}^2+{\left({y}_2-y\right)}^2+{\left({z}_2-z\right)}^2-{\left({D}_2-b\right)}^2\\ {}{f}_3\left(x,y,z,b\right)={\left({x}_3-x\right)}^2+{\left({y}_3-y\right)}^2+{\left({z}_3-z\right)}^2-{\left({D}_3-b\right)}^2\\ {}{f}_4\left(x,y,z,b\right)={\left({x}_4-x\right)}^2+{\left({y}_4-y\right)}^2+{\left({z}_4-z\right)}^2-{\left({D}_4-b\right)}^2\end{array}} $$
(31)

The Jacobian matrix is

$$ J\left({p}_k\right)=\left[{\displaystyle \begin{array}{cccc}\frac{\partial }{\partial x}{f}_1\left(x,y,z,b\right)& \frac{\partial }{\partial y}{f}_1\left(x,y,z,b\right)& \frac{\partial }{\partial z}{f}_1\left(x,y,z,b\right)& \frac{\partial }{\partial b}{f}_1\left(x,y,z,b\right)\\ {}\frac{\partial }{\partial x}{f}_2\left(x,y,z,b\right)& \frac{\partial }{\partial y}{f}_2\left(x,y,z,b\right)& \frac{\partial }{\partial z}{f}_2\left(x,y,z,b\right)& \frac{\partial }{\partial b}{f}_2\left(x,y,z,b\right)\\ {}\frac{\partial }{\partial x}{f}_3\left(x,y,z,b\right)& \frac{\partial }{\partial y}{f}_3\left(x,y,z,b\right)& \frac{\partial }{\partial z}{f}_3\left(x,y,z,b\right)& \frac{\partial }{\partial b}{f}_3\left(x,y,z,b\right)\\ {}\frac{\partial }{\partial x}{f}_4\left(x,y,z,b\right)& \frac{\partial }{\partial y}{f}_4\left(x,y,z,b\right)& \frac{\partial }{\partial z}{f}_4\left(x,y,z,b\right)& \frac{\partial }{\partial b}{f}_4\left(x,y,z,b\right)\end{array}}\right] $$
(32)

After mathematical transformations, J obtained for this problem as

$$ J=\left[{\displaystyle \begin{array}{cccc}2\left({x}_1-x\right)& 2\left({y}_1-y\right)& 2\left({z}_1-z\right)& 2\left(\mathrm{b}-{D}_1\right)\\ {}2\left({x}_2-x\right)& 2\left({y}_2-y\right)& 2\left({z}_2-z\right)& 2\left(\mathrm{b}-{D}_2\right)\\ {}2\left({x}_3-x\right)& 2\left({y}_3-y\right)& 2\left({z}_3-z\right)& 2\left(\mathrm{b}-{D}_3\right)\\ {}2\left({x}_4-x\right)& 2\left({y}_4-y\right)& 2\left({z}_4-z\right)& 2\left(\mathrm{b}-{D}_4\right)\end{array}}\right] $$
(33)

where xi, yi ve, and zi \( \Big(i=\overline{1,4} \)) represent the position of navigation satellites; x, y, and z represent the positions of the stationary user; b is the clock bias of the GPS receiver; and Di \( \Big(i=\overline{1,4} \)) is the distance between navigation satellite and stationary user.

ΔP and new state vectors estimated by Newton-Raphson method are given in Eq. (34). NRM estimation for each iteration continues while the absolute value ΔP is greater than error tolerance of the system. When the error tolerance becomes greater than ΔP, NRM estimation of ith iteration ends and starts estimating i + 1th iteration state vectors.

$$ \Delta P=-F.{J}^{-1} $$
$$ {P}_{k+1}={P}_k+\Delta P $$
(34)

Equation (33) represents the estimation of NRM state vectors. After estimation of NRM, LKF estimation starts.

Estimation equation:

$$ \hat{X}(k)=\hat{X}\left(k/k-1\right)+K(k)\hat{Z}(k) $$
(35)

Extrapolation equation:

$$ \hat{X}\left(k/k-1\right)=\hat{X}\left(k-1/k-1\right) $$
(36)

Innovation sequence:

$$ \hat{Z}\left(k/k-1\right)=Y(k)-\hat{X}\left(k/k-1\right) $$
(37)

where Y(k)

$$ Y(k)={\left[{x}_{\mathrm{NRM}}\kern0.5em {y}_{\mathrm{NRM}}\kern0.5em {z}_{\mathrm{NRM}}\kern0.5em {b}_{\mathrm{NRM}}\right]}^{\mathrm{T}} $$
(38)

Kalman gain coefficient matrix:

$$ K(k)=P\left(k/k-1\right)\ H{(k)}^{\mathrm{T}}{\left[H(k)P\left(k/k-1\right)\ H{(k)}^{\mathrm{T}}+R(k)\right]}^{-1} $$
(39)

Predicted correlation matrix of estimation error:

$$ P\left(k/k-1\right)=\phi \left(k,k-1\right)P\left(k/k-1\right)\phi \left(k,k-1\right)T+Q\left(k-1\right) $$
(40)

Estimated correlation matrix of estimation error:

$$ \left(\mathrm{k}/\mathrm{k}\right)=\left[-\left(\mathrm{k}\right)\mathrm{H}\left(\mathrm{k}\right)\right]P\left(\mathrm{k}/\mathrm{k}-1\right) $$
(41)

Measurement matrix (H):

$$ H(k)={I}_{4\times 4} $$
(42)

Measurement error covariance matrix (R):

$$ R(k)=\left[{\displaystyle \begin{array}{cccc}{\beta}_{\mathrm{x}}& 0& 0& 0\\ {}0& {\beta}_{\mathrm{y}}& 0& 0\\ {}0& 0& {\beta}_{\mathrm{z}}& 0\\ {}0& 0& 0& {\beta}_{\mathrm{b}}\end{array}}\right] $$
(43)

where βx, βy, βz, and βb are variance of the NRM estimation errors.

6 Simulation Results and Discussion

In this study stationary user localization is estimated by using GPS simulation, LKF, traditional EKF, and pre-processed LKF with the Newton-Raphson method. GPS measurement results converged to actual state vectors with the implementation of filter estimations. Estimated results compared to other estimations.

The results of stationary user localization using the Kalman filter for three different approaches are shown in Figs. 1, 2, and 3. The first part of figures gives position estimation results and the actual values in a comparing way. The second part of the figures shows the error of estimation process. The last part indicates the variance of the estimation error. Linear Kalman filter estimation for X axis is presented in Fig. 2.

Fig. 1
3 line graphs depict X of m versus seconds for L K F, actual, error, and variance. The value of L K F and error fluctuates, the actual is constant at 4.2155, and variance initially decreases and then increases to end at 100.

LKF X axis estimation

Fig. 2
3 line graphs depict X of m versus seconds for E K F, actual, error, and variance. The values of the curve E K F, and error initially increase and then flat at 100, the curve actual flat at 100, and the curve variance initially increase and then decrease to end at 100. The values are approximated.

EKF X axis estimation

Fig. 3
3 line graphs depict position, error, and variance versus seconds for N R M, L K F, and actual. The values of the curves N R M, and L K F fluctuate, and the curve actual is constant at 100.

NRM pre-processed LKF X axis estimation

Extended Kalman filter estimation for X axis is presented in Fig. 2.

Pre-processed linear Kalman filter with Newton-Raphson method estimation for X axis presented in Fig. 3.

As can be seen from the graphs shown in Figs. 1, 2, and 3, all three investigated approaches give rather good results for estimating the position of a stationary user.

According to Table 1, the best estimation results were obtained LKF. Traditional EKF is the second best estimation when compared to other methods.

Table 1 Root mean square errors for 500 seconds

7 Conclusion

Three different Kalman filter approaches are used in this study for stationary user localization: traditional extended Kalman filter, linear Kalman filter, and NRM pre-processed linear Kalman filter. The Şükrü Saraçoğlu stadium’s location (Istanbul, Turkey) was estimated and compared via various types of Kalman filters. The obtained results show that LKF is the best estimation for 500 s stationary user localization. Through this research, users can determine the best position estimation approach for their own problem.