Panjete / radarStateEstimator

State Estimation using Kalman Filters, EKF and solving the Data Association problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

State Estimator

How to run the Simulations

"top.py" enlists the variety of simulations possible.

In the project directory, simply call top.py with the relevant keyword of that simulation, enlisted in the file itself.

For example, to simulate, estimate and plot a 3D trajectory, call python top.py simulate_kf.

Plots

A collection of simulations and Annotated Graphs can be accessed from this link .

State Estimation using Kalman Filters

Models Noisy Airplane Observation Data, predicting it's trajectory and maintaining a belief state of it's positional and velocity co-ordinates in 3 dimensions.

This image shows the estimated and actual trajectories (left), and the quality of estimation can be really apprectiated when viewed in contrast to the (very) noisy observations (right) I actually recieved from the sensor.

Screenshot 2023-09-26 at 4 11 35 PM Screenshot 2023-09-26 at 4 11 51 PM

I experiment with variational noise parameters, with an analysis of the effect of positional update, velocity update, and sensor noise.

The sensor variations depict the following actual and estimated trajectories.

Screenshot 2023-09-26 at 3 59 43 PM

The motion models and observation models are implemented, and the simulation is made robust enough to propagate belief even when some sensor drops off it's observations.

The image below demostrates periods of sensor faults, where linear-sh stretches are introduced by the estimator to propagate belief into next timestamps without any measurements.

Screenshot 2023-09-26 at 4 14 30 PM

Further, if the sensor of any 1 direction drops of, we become uncertain in that direction, but the other two are still updated accurately. This is evident from the trajectory plots (left) and the uncertainity ellipses (right, projected into XY plane) where the X-sensor develops a fault at around the 1/3rd timestamp of the simulation. The left image shows how the the estimated trajectory is fairly accurate in it’s y and z coordinates. However, it evolves the last measured update in X, which diverges with time since these is a velocity update happening in X as well.

Screenshot 2023-09-26 at 4 23 28 PM Screenshot 2023-09-26 at 4 21 37 PM

Data Association

When observing multi-object data, the sensors may not often be able to associate the observation with the object that produces it, in which case techniques are required to map the observations to the apt object.

This is a complicated problem, especially when the trajectories of two or more airplanes are close enough. I propagate the belief, maintain a confidence internval, try out some permutations, and agree on the assignment that makes minimizes the "distance" for all trajectory-observation pairs.

I implement the Mahalanobis distance, for measuring how associated an observation (a point) is to a trajectory (a probability distribution).

My algorithm for association is based on a greedy-permutation approach, and as observed in the plot of estimated and actual trajectories of 4 airplanes below, is able to map them correctly.

Screenshot 2023-09-26 at 4 06 34 PM

Incorporating Landmarks

Non-Linear Distance Measurement was obtained via 5 landmarks, and I incorporated these to make a better estimate of the state. This was done using Extended Kalman Filters, where a linearisation at the mean yields an approximate gaussian that is propagated.

Simulation shows how the extra information provided by the landmark makes the estimate accurate, and how quickly the estimated diverge when the airplane leaves the landmark range

Screenshot 2023-09-28 at 7 09 14 PM

Experimenting with noise shows it's effect on estimation accuracy in the range of a Landmark

Screenshot 2023-09-28 at 7 09 30 PM

An alternate setting for the analysis of estimation via EKF was constructed, and the airplane was made to pass through 4 of such landmarks on it's way. These landmarks were arranged such that it was easier to visualise the effect of the localisation on the trajectory. The helical path was generated by providinf constant radial acceleration, via velocity increments.

Screenshot 2024-03-01 at 2 19 04 PM

About

State Estimation using Kalman Filters, EKF and solving the Data Association problem


Languages

Language:Python 100.0%