Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kalman Filter vs Exponential Filter

I was wondering, what are the advantages and disadvantages of Kalman Filter and Exponential Filter? I have a multi-sensor fusion problem and I'm trying to decide which method to choose.

I think, Kalman filter is more computationally complicated but it has a more detailed model of the system so it is more accurate(?) in multi-sensor fusion.

Whereas the Exponential filter is a simple equation but it is limited by the choice of alpha (Higher alpha => less "memory" of the filter and thus lesser smoothing, but more weightage on measurements whereas lower alpha has higher degree of smoothing but sudden changes are not reflected properly.

The Exponential filter is more useful in noise cancellation, when there is jitter etc. whereas the Kalman filter is useful for the actual multi-sensor fusion. Is this correct?

Also, how useful is the Genetic Algorithm for sensor fusion? I am trying to combine a magnetic compass and gyroscope for estimating true orientation.

like image 900
Imelza Avatar asked Dec 06 '10 05:12

Imelza


1 Answers

"what are the advantages and disadvantages of Kalman Filter and Exponential Filter? I think, Kalman filter is more computationally complicated but it has a more detailed model of the system so it is more accurate(?) in multi-sensor fusion."

That's basically it, in general the better your model the system is, the better your filter will be, regardless of whether you're using a Kalman filter.

"The Exponential filter is more useful in noise cancellation, when there is jitter etc. whereas the Kalman filter is useful for the actual multi-sensor fusion. Is this correct?"

I would disagree with this statement. The Kalman filter is being smart about the noise cancellation. It's a lot smarter than a low pass filter can be because it takes full advantage of all the information stored in the covariance matrix. If the performance measure you're looking at is "How closely does the filtered value match the true value?" I think the best a simple low pass filter can hope to do is match it's performance, and that is only in the simplest case of a random walk . As soon as you have an interesting state-transition matrix I think the low pass filter has no chance, because it can't see how velocity uncertainty leaks into position uncertainty, for example.

"I am trying to combine a magnetic compass and gyroscope for estimating true orientation."

This is exactly the sort of thing a Kalman filter is designed for.

But if you're worried about the complexity of implementing a kalman filter, start by implementing the low pass filter version:

1) Start with a simple simulation

    predictedAngle = oldAngle+rotationRate*dt

2) Update the simulation state based on your measurements

    rotationRate  = alpha1*rotationRate  +(1-alpha1)*gyro.rotationRate
    filteredAngle = alpha2*predictedAngle+(1-alpha2)*compass.angle

That is basically the framework for the kalman (simplest) filter for this system. All that's missing is to:

  • Write everything in matrix format
  • Add "process noise" during the simulation step
  • Add a step to Calculate the "optimal kalman gains" instead of using fixed values for the alpha's
  • Add a step to update the filter's covariance.

"Also, how useful is the Genetic Algorithm for sensor fusion?"

I don't see where they would fit in. Can you elaborate?

like image 193
mdaoust Avatar answered Sep 30 '22 15:09

mdaoust