Wednesday, February 1, 2017

How to model the noise in Kalman Filter?



Background:


I am a newbie in DSP. I am implementing a simple Kalman Filter that estimates the heading direction of a robot. The robot is equipped with a compass and a gyroscope.


My Understanding:


I am thinking about representing my state as a 2D vector $(x, \dot{x})$, where $x$ is the current heading direction and $\dot{x}$ is the rotation rate reported by the gyroscope.


Questions:



  1. If my understanding is correct, there will be no control term, $u$ in my filter. Is it true? What if I take the state as a 1D vector $(x)$? Then does my $\dot{x}$becomes the control term $u$? Will these two methods yield different results?

  2. As we know, the main noise source comes from the compass when the compass is in a distorted magnetic field. Here, I suppose the Gaussian noise is less significant. But the magnetic distortion is totally unpredictable. How do we model it in the Kalman Filter?

  3. In Kalman Filter, is the assumption that "all the noises are white" necessary? Say, if my noise distribution is actually a Laplacian distribution, can I still use a Kalman Filter? Or I have to switch to another filter, like Extended Kalman Filter?




Answer





  1. You are most likely not having a control vector $u$. Maybe you can somehow model it into the filter, but it is not required in your case and uncommon. Furthermore $\overset{.}{x}$ is not your gyro input but it is the Kalman filtered rotation rate calculated after using all your measurements.




  2. Usually, the main effects on a magnetometer are hard iron and soft iron effects. There is a lot of articles out there that describe the cause and how to mitigate those. I would probably do this in a preprocessing step and leave it out of the Kalman filter entirely. Furthermore, if you have some means to detect if you are in a strongly distorted field (e.g. because the absolute strength is going up), you can increase the measurement noise you report to the Kalman filter for those measurements. This will indicate to the filter to not trust the values coming from the magnetometer anymore. So if you know the total strength of the earth's magnetic field and you suddenly measure a much stronger field, you could use this technique. This is also commonly done with accelerometers to put less trust on values measured when the vehicle is actually accelerating and hence, the measurement is not pointing "down". See here for an example




  3. Your noise has to be white and it has to be Gaussian or near Gaussian. You can only have correlation between the different measurements of one time step but not between multiple time steps. If you search around in the academic world, there are many papers presenting adapted Kalman filters for other noise types that work more or less well (see here for example, haven't tested this, though). EKF and UKF approaches don't help here, either. You use those, when you have a nonlinear system model. As already said, if your noise is very non-white and non-gaussian that you get big estimation errors, then a particle filter is an option.





No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...