Global RTK Positioning in Graphical State Space
biography
YiHong Gegraduated from School of Computer Science, Harbin Institute of Technology, Harbin, China, with a Bachelor’s degree in 2019. Since 2019, he worked for Graph Optimization Inc. as a software engineer. His scientific interests include software development for graph optimization in railway surveys and pipeline inspections.
SuDan Yangraduated from School of Geodesy and Geomatics, Wuhan University, Wuhan, China, with a bachelor’s degree in navigation engineering in 2021. Since 2021, she worked for Graph Optimization Inc. as a navigation engineer. She devotes herself to the research and development of factor graph optimization navigation algorithm and invariant factor graph optimization framework.
ShaoLin Lü*received a PHD degree in navigation from Beijing Institute of Technology, Beijing, China, in 2009. From 2009 to 2011, he was with Tsinghua University as a postdoctor. From 2011 to 2018, he was a senior engineer at the NORINCO group. Since 2019, he is the founder of Graph Optimization Inc..
Cong Ligraduated from Department of Precision Instrument, Tsinghua University, Beijing, China, with a Bachelor’s degree in 2020. Since 2021, he worked for Graph Optimization Inc. as an FPGA engineer. His scientific interests include FPGA implementation of factor graphs and mechanical structure design.
Abstract
This paper proposes a new method for RTK post-processing. Different from the traditional forward-backward Kalman filter, in our method, the whole system equation is built on a graphical state space model and solved by factor graph optimization. The position solution provided by the forward Kalman filter is used as the linearization points of the graphical state space model. Constant variables, such as double-difference ambiguity, will exist as constants in the graphical state space model, not as time-series variables. It is shown by experiment results that factor graph optimization with a graphical state space model is more effective than Kalman filter with a traditional discrete-time state space model for RTK post-processing problem.
1 INTRODUCTION
Global Navigation Satellite System (GNSS) [1]-[4] has been widely used in important fields such as surveys, self-driving cars and mobile phones to provide accurate positions. While the single-point positioning technique provides position with meter-level accuracy, Real-Time Kinematic (RTK) positioning technology with centimeter-level accuracy is usually used in important scenarios. For some applications, the post-processing RTK algorithm is always a hot issue.
In the field of GNSS, state estimation is always an important technique that determines the accuracy of navigation results. As a classical state estimation algorithm, since the emergence of GNSS, Kalman filter [5]-[8] became popular in this field. In the post-processing RTK field, Kalman filter is still dominant [3]-[4], notwithstanding Unscented Kalman filter [9] and Particle filter [10] has come forth.
Recently, with the improvement of computing power, Factor Graph Optimization (FGO) [11]-[12] derived from probabilistic graphical models [13]-[14] has been applied successfully in the field of SLAM (Simultaneous Localization and Mapping), robot control, driverless vehicles and UAV (Unmanned Aerial Vehicle) navigation. There are many examples of Kalman filters that could be replaced by FGO with success [12]-[20]. For this reason, in recent years FGO has become a hit subject and cut-edge technology. Open-source solvers incessantly emerged [12], [19]-[22]. There are two kinds of graphical models: Bayesian network and Markov field [14], and both of them could be transformed into factor graphs. FGO could solve both single-connected graphs and multi-connected graphs, while Kalman filter can only solve a single-connected one. Due to this, unlike Kalman filter, which can only solve the time-series model, factor graph optimization can adopt constant variables in the state space model, which is called the Graphical State Space Model (GSSM) [23]-[24]. In Graphical State Space (GSS), for a multi-connected factor graph, the system state at the th epoch can be related to the system state of any epoch. The message passing of the factor graph is bidirectional. Thus, FGO is a natural tool for global data-processing.
Kalman filter is essentially a local solver for optimal estimation problems. Generally, if Kalman filter or other forms of optimal estimation algorithm is used, the system will be modeled as a continuous-time system, then it will be discretized as a time-series model which is called Traditional Discrete-Time State Space Model (TDTSSM) here. This model possesses the Hidden Markov Model property [14], which means that the system state at the kth moment is only related to the previous system state at the (k-1)th moment. This property renders the message passing of Kalman filter merely unidirectional. Therefore, if Kalman filter is used to solve the global data-processing problems [3], such as RTK Positioning and GNSS/INS integrated navigation, Forward-Backward Kalman Filter (FBKF) will be utilized. The data-processing procedure consists of the steps as follows:
(1) Build a continuous-time system model.
(2) Discretize the continuous-time system model into a TDTSSM.
(3) From the start point of the data, Forward Kalman filter will be used to process the data to the end point of the data in chronological order. This step is illustrated in Fig. 1.
(4) From the end point of the data, Backward Kalman filter will be used to process the data to the start point of the data in reverse chronological order.
This is the standard procedure in global RTK positioning adopted by RTKLIB and other RTK open-source packages [3]-[4]. Sometimes, the solution gotten by step and step can be weightedly summed to get a weighted solution.

The purpose of this paper is to provide a new solution for global RTK processing which adopts a GSSM solved by FGO. This method has been used in post-processing integrated navigation [23]. Furthermore, we have utilized this method in other post-processing scenarios, such as railway surveys, pipeline inspections, etc. It has been verified by field test data sampled from a 12km pipeline that GSSM solved by FGO assisted with 2 constrained points can achieve the same accuracy as TDTSSM solved by FBKF assisted with 12 constrained points.
Technically, FGO possesses the ability to optimize both multi-connected graphs and single-connected graphs. It means that FGO could not only optimize TDTSSM which is a single-connected graph, but also optimize a multi-connected graph which describes the evolution of the system state. On the scale of the solvable problems, FGO is a much more powerful optimizer than Kalman filter.
FGO can solve the global data-processing problems in the following steps:
(1) Build a continuous-time system model.
(2) Discretize the continuous-time system model into a TDTSSM.
(3) From the start point of the data, Forward Kalman filter will be used to process the data to the end point of the data in the chronological order. At the same time, store the results of Kalman filter as the linearization points for GSSM.
(4) Discretize the continuous-time system model into a GSSM. Build and store the factors which may contain priori factors, measurement model factors and system prediction model, etc. This step is illustrated in Fig. 2.
(5) Use the powerful FGO solver to solve GSSM (a large equation) to get the global optimal solution.

For global RTK processing, this method can be used to improve the floating-solution when a fixed-solution can not be gotten. The fix of double-difference ambiguity is an important factor that determines the accuracy of RTK results. However, when the vehicle is in high dynamics or signal blocking is serious, there will be some problems, such as satellite signal out of lock, inefficient observations, multipath effect and cycle slips, etc. Those problems may result in that the double-difference ambiguity could not be fixed. This will be the cause of the decrease in accuracy. By using GSSM solved by FGO, these problems could be alleviated. The fixed solution results of Forward Kalman filter, which consists of position in every epoch and all double-difference ambiguity, are used as linearization points of graph optimization. If at some time, only the float solution is gotten, it will still be used as a linearization point. Different from the TDTSSM solved by Kalman filter, if a double-difference ambiguity exists in a multi-epoch window, it will propagate as a constant variable, not as a time-series form. The treatment for constant variables is the difference that may improve the accuracy for nonlinear systems [24]. The clou of the new solution is simple. First, we utilize TDTSSM solved by Forward Kalman filter to get the initialization for GSSM. Secondly, FGO is used to solve GSSM to get a global optimal RTK solution.
This paper is organized as follows. The traditional framework for RTK post-processing, which utilizes TDTSSM solved by FBKF is briefly introduced in section II. In section III, GSSM is briefly introduced and RTK post-processing solution by GSSM is presented. In section IV, it is illustrated by experimental results with an open-source implementation that GSSM solved by FGO outperforms TDTSSM solved by FBKF. This paper is concluded with future works in section V.
2 Traditional Framework For RTK post-processing
The model in this section is completely the same as the model in RTKLIB, which is very familiar to the community. If you are not familiar with it, check the document of RTKLIB for details [3]-[4]. Here it is listed for comparison with GSSM.
2.1 System Model
Traditionally, Kalman’s discretization framework is adopted in the model of RTK processing. It is assumed that per epoch there is a discrete-time state vector that contains all the variables. The state model of RTK consists of three parts: position coordinate vector, velocity vector, and the phase bias of carrier wave in different frequencies. The frequencies of satellite data comprise , and . The state vector can be described as follow:
(1) |
where is single-difference carrier phase biases at frequency.
From the viewpoint of a programmer, the dimension of Kalman filter state must be unchanged in the propagation of Kalman filter. In RTKLIB and other open-source packages, the state vector is allocated as a fixed-dimension array no matter how many satellites are visible. This is one of the limitations of Kalman filter.
In RTK positioning, the kinematics model is usually simple and it goes as follows
(2) |
Where is the process noise.
The observation variables from the base station and the rover station are used to calculate the double-difference variables. It goes as follows
(3) |
where is double-difference phase-range and carrier, is double-difference pseudo-range. is the th satellite and superscript means the order number of the pair of satellites. Subscript represents rover and base station.
(4) |
where represents double-difference pseudo-range of the st satellite and the th satellite between the base and rover station. is the wavelength of frequency. As mentioned above, there are triple frequencies, L1, L2 and L5, in the library. Therefore, the observation vector can be written as
(5) |
The measurement model can be written as
(6) |
After linearization, it goes as follows
(7) | |||
(8) | |||
(9) |
where is the measurement noise. is a single-difference coefficient matrix. is the unit LOS (line‐of‐sight) vector from the receiver to the th satellite. In fact, both GSSM and TDTSSM are transformed from the same continuous-time system model described by Equations . The difference lies in the forms of the discrete-time state space model. In GSSM, not all the variables exist in a time-series form.
2.2 Forward-Backward Kalman filter
Generally, Kalman filter is a small-scale framework for the local solution. It can only do the belief propagation in a unique direction. To recursively update the system state, Kalman filter must marginalize out the previous state per update. This makes some information loss from the global viewpoint due to the Hidden Markov Model property. Before Kalman filter is used, the system (1)-(9) should be discretized into a TDTSSM as follows
(10) | |||
(11) |
The classical Kalman filter can be used to estimate the system described by Equations .
Initialize the estimation
(12) | |||
(13) |
Update the prior mean and covariance
(14) | |||
(15) |
Calculate Kalman gain
(16) |
Update the posteriori mean and covariance
(17) | |||
(18) |
In the post-processing RTK procedure, the data will be processed with TDTSSM solved by Kalman filter in chronological order. Then, the floating solution will be gotten. Fixed carrier-phase ambiguities will be calculated to improve the accuracy. However, the vehicle dynamics or external environment may result in a double-difference ambiguity that could not be fixed. This will be the reason for the decrease in accuracy. To relieve the unfixed problem, Backward Kalman filter is used. The data will be processed in reverse chronological order with TDTSSM solved by Kalman filter after the forward process. Since Kalman filter can not organize the whole procedure as a large equation, the Forward-Backward method has become a half satisfactory expedient before FGO emerged.
3 Global RTK post-processing in Graphical State Space
Generally, TDTSSM follows an implicit assumption: all the state variables are discretized in the same frequency as time-series forms. In [23]-[24], it was demonstrated that for some systems this premise may not be followed via GSSM solved by FGO to get better accuracy than TDTSSM solved by Kalman filter. It should be pointed out that the discretization step from Equations to Equations is not mathematically rigorous or unique. This step is merely a rule of thumb. There is no doubt that this presupposition is very important for discrete-time Kalman filter and other nonlinear filters. It should be noted that this assumption is usually ignored and supposed to be right by the community. If you check all the articles or books on optimal estimation, modern control and robots, etc., it will be found that this hypothesis is ubiquitous and before [24] everyone followed it without prior consultation.
The clou of GSSM is to change this step and formulate a different discrete-time state space model.
For the system described by Equations , there is a different discretization method from that described by Equations . Consider the system state not as a whole, while the constant variables should be discretized as constants, not as time-series forms. Rewrite the model as follows
(19) | |||
(20) |
Where is the dynamic state vector and is the constant state vector.
For the global RTK positioning problem
(21) | |||
(22) |
where is the state which should be discretized as a time-series form. is the constant part that should be discretized as constants, not as time-series forms. This model is used after the Forward Kalman filter. Due to this, it is not necessary to include the velocity vector in the state vector.
When GSSM is built, the whole factor graph consists of the following factors:
(1) Priori Factor for the fixed-solution position. After the procedure of Forward Kalman filter, the high accuracy of the fixed-solution position can be used in the factor graph.
(2) Double-difference measurement factor. If a double-difference ambiguity exists in multi-epochs, it can be used to improve the low accuracy of floating-solution.
The whole factor graph is demonstrated in Fig. 4. The transformation from the model in Fig. 3 to that in Fig. 4 is the key point of GSSM.

![[Uncaptioned image]](https://cdn.awesomepapers.org/papers/b7495677-4cf8-431b-9713-a3393184c8cb/arrow.png)

GSSM can be described by a block equation as follows
(23) |
Via FGO, the solution of Equation (23) can be gotten
(24) |
It should be pointed out that this equation can not be directly solved by Kalman filter. The constants must be discretized as time-series forms if Kalman filter is used to solve Equation . The dimension of this equation is unknown before it is formulated for the concrete problem. The variable set solved by Kalman filter can be described as follows
(25) |
Kalman filter can only give the solution of one variable in the above set per update in chronological order. Meanwhile, GSSM solved by FGO can provide the solution of the following variable set as a whole per update
(26) |
Obviously, the solution of the above variable set can not be provided by Kalman filter before is transformed into a time-series form from a constant variable. In Fig.5, the differences between the two methods are illustrated by a flowing chart.

It should be known that there is an implicit discretization step for the constant variables when TDTSSM is used, this step was not considered before FGO emerged because all nonlinear filters do not possess the ability to solve the equation provided by GSSM. What GSSM does is construct an equation that can not be solved by Kalman filter. For some kinds of systems, this renders FGO have the odds to outperform Kalman filter.
4 Experimental Results
Field test data is used to compare GSSM solved by FGO with TDTSSM solved by FBKF. Data and the open-source implementation can be found at GITHUB111https://github.com/shaolinbit/RTKinGSS. It can be concluded that the accuracy of floating solution can be improved by the new method. In RTK positioning, the accuracy of floating-solution in height is notoriously unsatisfactory. In Fig. 6, there is no big difference shown between the two candidate methods in the horizontal direction. In Fig. 7, it can be seen that the difference lies in the vertical direction when different methods are utilized.


From Fig. 8 to Fig. 10, it can be verified in a challenging urban canyon when the RTK solution is not fixed, the height solution given by FBKF is unstable. At the same time, the floating solutions given by GSSM are relatively smoother.






5 Summary
A new method was proposed for RTK post-processing in this paper. The whole system equation is built on the graphical state space model and solved by factor graph optimization, while traditionally forward-backward Kalman filter is used to solve the equations formulated by the traditional discrete-time state space model. Constant variables, such as the double-difference ambiguity, will exist as constants in the graphical state space model, not as time-series variables. It was shown by experimental results that the proposed method can effectively alleviate the effects of GNSS outlier measurements, deriving improved accuracy of floating-solution. Real-time experiment results and theory analysis will be explored in future works.
Acknowledgment
The idea of the Graphical State Space Model for RTK was proposed by Shaolin Lü and he wrote Section III. The algorithm was firstly implemented by Sudan Yan.
References
- [1] E. Kaplan and C. Hegarty, Understanding GPS: principles and applications, Artech House, 2005.
- [2] P. J. G. Teunissen, “The least-squares ambiguity decorrelation adjustment: a method for fast GPS integer ambiguity estimation,” Journal of Geodesy, Vol. 70, No. 10, pp. 65–-82, 1995.
- [3] T. Takasu and A. Yasuda, “Development of the low-cost RTK-GPS receiver with an open source program package RTKLIB,” International symposium on GPS/GNS, pp. 4-–6, 2009.
- [4] F. Zhou, D. Dong, W. Li, X. Jiang, J. Wickert and H. Schuh, “GAMP: An open-source software of multi-GNSS precise point positioning using undifferenced and uncombined observations,” GPS solutions, Vol. 22, No. 2: 33, 2018.
- [5] R. E. Kalman, “A new approach to linear filtering and predition problem,” ASME Journal of Basic Engineering, Vol. 82, pp. 35–45, 1960.
- [6] R. E. Kalman, “Discovery and invention: the Newtonian revolution in systems technology,” Journal of Guidance, Control and Dynamics, Vol. 26, No. 6, pp. 833–837, 2003.
- [7] D. Simon, Optimal State Estimation: Kalman, H-infinity, and Nonlinear Approaches, John Wiley Sons, 2006.
- [8] P. Zarchan and H. Musoff, Fundamentals of Kalman Filtering: A Practical Approach, AIAA, 2009.
- [9] S. J. Julier and J. K. Uhlmann, “A New Extension of the Kalman Filter to Nonlinear Systems,” Sensor Fusion and Target Recognition VI, pp. 182–193, 1997.
- [10] N. Gordon, D. Salmond AND A. F. M. Smith, “Novel approach to nonlinear/non-Gaussian Bayesian state estimation,” IEE proceedings-F, Vol. 140, No. 2, pp. 107-–113, 1993.
- [11] F. R. Kschischang, B. J. Frey, and H. A. Loeliger, “Factor graphs and the sum-product algorithm,” IEEE Transactions on information theory, Vol. 47, No. 2, pp. 498–-519, Feb. 2001.
- [12] F. Dellaert and M. Kaess, “ Factor graph for robotic perception,” Foundation and Trend in Robotics, Vol. 6, No. 1–2, pp. 1–139, 2017.
- [13] J. Pearl, Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference, Morgan Kaufmann, 1988.
- [14] D. Koller and N. Friedman, Probabilistic Graphical Models: Principles and Techniques, Mit Press, 2009.
- [15] S. Suzuki, “Time-Relative RTK-GNSS: GNSS loop closure in pose graph optimization,” IEEE Robotics and Automation Letters, Vol. 5, No. 3, pp. 4735–4742, 2020.
- [16] Y. Zhao, “Applying time-differenced carrier phase in nondifferential GPS/IMU tightly coupled navigation systems to improve the positioning performance,” IEEE Transactions on Vehicular Technology, Vol. 66, No. 2, pp. 992–1003, 2017.
- [17] W. Li, X. Cui, and M. Lu, “A robust graph optimization realization of tightly coupled GNSS/INS integrated navigation system for urban vehicles,” Tsinghua Science and Technology, Vol. 23, No. 6, pp. 724–-732, 2018.
- [18] R. M. Watson and J. N. Gross, “Robust navigation in GNSS degraded environment using graph optimization,” Proceedings of the 30th international technical meeting of the satellite division of the institute of navigation (ION GNSS+ 2017), Vol. 5, pp. 2906–-2918, 2017.
- [19] S. Agarwal, K. Mierle and others, “Ceres Solver,” http://ceres-solver.org.
- [20] R. Kümmerle, G. Grisetti, H. Strasdat, K. Konolige and W. Burgard, “ g2o: A General Framework for Graph Optimization,” IEEE Conference on Robotics and Automation, pp. 3607–3613, 2011.
- [21] J. Dong and Z. Lv, “miniSAM: A Flexible Factor Graph Non-linear Least Squares Optimization Framework,” arxiv.org/abs/1909.00903, 2019.
- [22] S. Lü, “http://github.com/shaolinbit/minisam_lib”
- [23] S. Yan, Y. Ge, S. Lü and C. Li, “ Post-processing integrated navigation algorithm in graphical state space,” Beijing, 2022 China Satellite Navigation Conference, 2022.
- [24] S. Lü, “Graphical state space model,” 2021 IEEE International Conference on Unmanned Systems, arxiv.org/abs/2107.01602, 2021, pp. 637–643, 2021.