Some time ago I was working with Orbit Determination using BLS and Kalman Filter methods. Now that Unscented Kalman Filter (UKF) is introduced, I wanted to give it another go. I have downloaded a sample satellite data of a Starlink which is shared on Spacetrack. If I am not mistaken its format is in Orbit Ephemeris Message (OEM) containing a series of state vectors for a single object. I will also attach that file into this message. And I am feeding the first 100 data to my system for computational purposes.

I will ask some questions now, so bear with me

So in my Kalman Filter and UKF code everything is same except I use KalmanEstimatorBuilder() in the first one and UnscentedKalmanEstimatorBuilder() in the second one. I would expect the results of Kalman Filter OD and UKF OD to differ from each another substantially, but they come out to be same. I wonder if there is something I am missing here.

In these filters we have some parameters that are critical. These are:

sigmaPos

sigmaVel

baseweight

initP: Initial covariance matrix

initQ: Initial process noise matrix

I think sigmaPos and sigmaVel should be calculated via standart deviation formula given below:

And the diagonal elements of the covariance matrix initP should be square of these sigmaPos and sigmaVel values. However, calculation with this way gives really big numbers and I am just not sure about it.

If above formulation is not how we supposed to calculate some of those parameters, is there a generic way that is accepted in the literature that you know of?

In my UKF code I was using default values in MerweUnscentedTransform. Now I randomly assigned alpha, beta, and kappa in it. Now, Kalman Filter results and UKF results are different. So regarding my first question, the input parameters of MerweUnscentedTransform were the only things that create this difference between Kalman Filter and UKF?

I know these are a lot and very specific, but no rush! I can also provide the full code or the code snippeds to further support the topic.

Thank you in advance for the valuable discussions.

Thatâ€™s right. My dream is to have a single Builder class common to all Kalman filters. The user could choose the type based on a KalmanFilterType enumerate. Unfortunately, thatâ€™s not implemented yet and user shall use the Builder corresponding to the Kalman he/she wants to use.

UKF is maily used for problems with big uncertainties (e.g. high eccentric orbits, undetermined maneuver, stochastic parameters, etc.). I think that Starlink orbits contain in OEM files are smooth and donâ€™t contain particular uncertainty. Therefore, it is normal that UKF and EKF give same results. In other words, you will see differences in case of estimation problems with big uncertainties.

sigma parameters represent the uncertainty of your data. For instance, if you use position data with 10 meters of uncertainty, you can set sigmaPos equals to 10. However, I donâ€™t know the uncertainty of position/velocity in Starlink OEM filesâ€¦

Default values come from litterature and correspond to â€śoptimalâ€ť values for flight dynamics problems. Because your problem doesnâ€™t contain strong non-linearities, you can keep using default values.
For more information, you can look at the two papers available in the following post: Unscented filter with non-zero process noise - #13 by bcazabonne

Accuracy of ephemeris files strongly depend on the orbit type and the provider. Having default values is difficult for this type of data.
For instance, you can look at the following paper which present the accuracy of CPF files (CPF is also a format of satellite ephemeris).
Therefore, I recommend you to look at spacetrack website to see if this information is available somewhere for Starlink OEM.

I am also trying to develop a UKF. I have a working algorithm in MATLAB, so I was planning on importing the PV data from JAVA inoto MATLAB and then importing it back into JAVA. However, you just informed me to the fact UKF exists in Orekit. Would you mind explaining how exactly you are setting it up? I am using an SGP4 and import the TLEs from celestrack. Feel free to message me directly. I would appreciate the help!!

Hello @bcazabonne, thanks having time to answer my questions. In this example Iâ€™ve used Starlink data from the Spacetrack. However in the long term, I plan to take my own optical observations and use those data. Then maybe I can get your opinion in this regard:

In the case where I provide my own dataset, how can I possibly know the uncertainty in the position and velocity? I mean I could have a rough guess on it, but it would probably give me results with reduced accuracy, no?

For this specific Starlink example, covariance matrix is already provided. So using diagonal elements of this matrix, we can find sigmaPos and sigmaVel at every step of the iteration. Determining this parameters for another satellite might be difficult as you said. But, do you know how to find the initial process noise matrix (initQ) or its calculation is also not straight forward?

Your 2 questions address 2 difficult subjects of the orbit determination for which there is no perfect answers with perfect values since they depend on the measurement provider and the prediction model

Because in the long term you plan to use optical measurements, the uncertainty will be related to your optical measurements. It is difficult to know the uncertainty because it is related to the sensor. Good sensors have a small sigma value and bad sensors have a big one. I know that calibration campaign using ephemeris based orbit detemination of GNSS satellites can be used to calibrate the sigma value of optical sensors. Unfortunately, Iâ€™m not an expert of that method. The best is to ask the sensor costumer or main users about the uncertainty of the measurements it provides.

At the end I think the estimated orbit will be close between a rough guess and a perfect guess of the sigma. The main difference will be on the estimated covariance matrix.

initQ is the dark side of the Kalman Filter initQ represents the expected error of your prediction model. Therefore, it depends on the prediction model you will use. With an accurate prediction model, you shall set small values.
It is really difficult to intialize this matrix. Personally, Iâ€™m a bit scared of this matrix because it has a significant impact on the estimated solution and we donâ€™t know what to put inside.
To give you an example, there is an Orekit tutorial for which we perform accurate orbit determination of Lageos 2 satellite with an initQ of [1.e-9, 1.e-9, 1.e-9, 1.e-12, 1.e-12, 1.e-12]