Help with understanding kalman filter

  • Context: Graduate 
  • Thread starter Thread starter rp181
  • Start date Start date
  • Tags Tags
    Filter Kalman filter
Click For Summary

Discussion Overview

The discussion revolves around the implementation of a Kalman filter for sensor data fusion in a helicopter UAV project, specifically integrating data from 3-axis accelerometers, gyros, and magnetometers to determine roll, pitch, and yaw. Participants explore the theoretical and mathematical foundations of Kalman filters, as well as practical implementation challenges.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in understanding the mathematical concepts necessary for implementing a Kalman filter and seeks clarification on terms such as state vector, measure vector, and the significance of subscripts and dot notation.
  • Another participant suggests that a solid understanding of calculus, real analysis, probability theory, signal processing, and control theory is essential for grasping Kalman filters.
  • Some participants agree that the complexity of Kalman filters may be overwhelming for someone without a calculus background, suggesting that simpler projects might be more appropriate.
  • Clarifications are provided regarding the meaning of the subscript 'k' as referring to discrete time steps and the dot notation as indicating differentiation.
  • One participant mentions that the filter models a continuous time system but is implemented in a discrete manner for coding purposes.
  • There is a discussion about the potential use of Directional Cosine Matrices as an alternative approach while the participant puts the Kalman filter on hold.
  • Another participant reflects on the challenges of finding effective tutorials and the need for substantial study to understand Kalman filters.

Areas of Agreement / Disagreement

Participants generally agree that a strong mathematical foundation is necessary to understand Kalman filters, and there is a consensus that the topic may be too advanced for someone without calculus knowledge. However, there is no consensus on the specific prerequisites or the best approach to learning about Kalman filters.

Contextual Notes

Some participants note that tutorials may not adequately cover the complexities of Kalman filters, and there are references to the need for a deeper understanding of various mathematical concepts before attempting implementation.

Who May Find This Useful

This discussion may be useful for individuals interested in sensor data fusion, UAV control systems, and those seeking to understand the mathematical foundations of Kalman filters and their applications.

rp181
Messages
2
Reaction score
0
I am trying to implement a kalman for use in sensor data fusion, for 3 axis accelerometers, 3 axis gyros, and 3 axis magnetometers for a helicopter UAV project.
The roll, pitch, and yaw need to be known. Gyros do a great job of doing this, but the problem is that they drift of the zero value. Accelerometers are used to correct the roll and pitch values as they don't drift, and a magnetometer corrects yaw based on the magnetic north reference point.
Kalman filters are the most effective way to combine these. There are simpler ways such as a PID loop, but helicopters are very complex, and I do not want to take a chance.
My math is not nearly good enough to go and code a kalman filter, but I found kfilter:
http://kalman.sourceforge.net/doc/example.html
I have some questions in using this.
1) What is the difference between the state vector and measure vector? Is measure what the sensor data shows and state the current position?
2) What does the subscript 'k' represent?
3)what does 'x' with the two dots over it mean? What about the single dot?
4) In the link I posted, in this equation:
form_15.png

where does the part before the parenthesis come from? Why are there two for x and two for y?

Any advice on how to use this in this application/ broken down steps is welcome.
 
Mathematics news on Phys.org
rp181 said:
I am trying to implement a kalman for use in sensor data fusion, for 3 axis accelerometers, 3 axis gyros, and 3 axis magnetometers for a helicopter UAV project.
The roll, pitch, and yaw need to be known. Gyros do a great job of doing this, but the problem is that they drift of the zero value. Accelerometers are used to correct the roll and pitch values as they don't drift, and a magnetometer corrects yaw based on the magnetic north reference point.
Kalman filters are the most effective way to combine these. There are simpler ways such as a PID loop, but helicopters are very complex, and I do not want to take a chance.
My math is not nearly good enough to go and code a kalman filter, but I found kfilter:
http://kalman.sourceforge.net/doc/example.html
I have some questions in using this.
1) What is the difference between the state vector and measure vector? Is measure what the sensor data shows and state the current position?
2) What does the subscript 'k' represent?
3)what does 'x' with the two dots over it mean? What about the single dot?
4) In the link I posted, in this equation:
form_15.png

where does the part before the parenthesis come from? Why are there two for x and two for y?

Any advice on how to use this in this application/ broken down steps is welcome.

Welcome to the PF.

It looks like there are a number of fundamental math subjects that you would have to learn before attempting this project. Is there a simpler project that you could do, that is more in line with your math abilities at the moment?

I'm not that familiar with Kalman filters, but it looks to be for discrete time systems (the "k" values are the sample numbers, I would think), and the dot notation refers to differentiation in Calculus. Have you had Calculus yet? How about digital filters? Those would seem to be prerequisite courses for tackling this UAV control project...
 
Hey,
Thanks for the reply.
The filter is models a continuous time model, but yes, it is discrete to enable coding for it.

Calculus next year. I was hoping the libraries would eliminate some of the math clearly out of my understanding.

Right now, I am going to take a look at Directional Cosine Matrices, I am able to understand the math for that, so I am going to put a hold on the kalman filter.

BTW, if you are interested, project progress is here:
http://rp181.fortscribe.com
 
Last edited by a moderator:
To be brutally honest, a Kalman filter is well beyond what someone who has yet to take calculus. You need to know calculus plus real analysis, probability theory, signal processing, and control theory to understand how Kalman filters work. You need to learn to walk before you learn to run.
 
I certainly agree with DH - that Kalman filters are far too complex for someone who has not taken a calculus course. Out of interest though - what's the real analysis needed for Kalman filters ?
 
i agree. without a special course,you cannot get a basic understanding of Kalman Filtering and assumptions. tutorials do not always work.
 
rp181 said:
I have some questions in using this.
1) What is the difference between the state vector and measure vector? Is measure what the sensor data shows and state the current position?
Yes
2) What does the subscript 'k' represent?
The material treats the process as having discrete steps. 'k' refers to the k th step.
3)what does 'x' with the two dots over it mean?
The acceleration in the x coordinate
What about the single dot?
The velocity in the x coordinate
4) In the link I posted, in this equation:
where does the part before the parenthesis come from? Why are there two for x and two for y?
I think the 'T' is the elapsed time between two consecutive steps. The expressions in the matrix look like truncated Taylor expansions that give the coordinates of the k th step in terms of data for the previous step. A Taylor expansion (in this case) would be a power series in the variable 'T' so it it weren't truncated, it would have all the integer powers of T in it.

Any advice on how to use this in this application/ broken down steps is welcome.

The other posters are correct about that fact that it would take considerable study to understand the Kalman filter. I've looked at the so-called simple tutorials about it on the web and never had the patience to slog my way through them, so I can't recommend any. However, you seem to have an unreasonable amount of ambition. Don't give up yet.
 

Similar threads

Replies
2
Views
2K
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
9
Views
7K
  • · Replies 24 ·
Replies
24
Views
8K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K