Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform


Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Kalman Filter Help - Anybody understand Kalman filtering??

There are 20 messages in this thread.

You are currently looking at messages 10 to 20.


Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Rune Allnor - 2006-10-02 02:33:00

steve skrev:
> quadrotor wrote:
>
> > Why is the derivative used and where does that equation come from? I
> > havent been able to find anything on it. There doesnt seem to be a lot of
> > info around on the net and Kalman filtering seems to be something that not
> > many people have an understanding of.
> >
> that's an understatement, most Kalman filter info also tends to be
> circular, they all reference each other for specific details. Or you
> might read something like this "Kalman filtering is a huge field which
> cannot be explained in a brief paper.", you know either a big fat "Dead
> End" sign or 400 references are coming up shortly.

One book that might be worth looking at (get it on loan from a library
before you decide whether to buy!) is

Durbin & Koopmans: "Time series analysis by state space methods"
    Oxford University Press, 2001.

Within a handful of pages the authors explain the concept of the
Kalman filter sufficiently well for me to be able to implement my
own Kalman filter from scratch, and test it against their results.

Unfortunately, the book is intended for economical statistics, which
does have some impact on readability.

Rune

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Trond Danielsen - 2006-10-02 04:07:00



quadrotor wrote:
> [...]
>
> The introductory papers however all use the update equation:
> P=A*P*A'+Q
>
> Why is the derivative used and where does that equation come from? I
> havent been able to find anything on it. There doesnt seem to be a lot of
> info around on the net and Kalman filtering seems to be something that not
> many people have an understanding of.
>

A' is not the derivative of A, it is the inverse of matrix A.  I have
seen many forms of the equation for updating the P matrix. The reason
for this is among others to avoid numerical divergence.

If you are looking for litterature on the topic, I can recommend the
book Introduction to Random signals and Applied Kalman Filtering by
Brown and Hwang (isbn: 0-471-12839-2)

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Trond Danielsen - 2006-10-02 04:15:00

quadrotor wrote:
> Any mode ideas as to why Pdot is used to update and how they actually came
> up with the A matrix??
>

The A matrix is called the state translation matrix, and describes how
x_k relates to x_(k+1) in the absence of a forcing function. It can be
derived from the space-state model of the system by the inverse laplace
transform, but this becomes very difficult for systems with more than
two state variables. The usual way is to compute it numerically. Most
textbooks on the topic will tell you how (see my last post).

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Deefoo - 2006-10-02 04:31:00

"quadrotor" <q...@gmail.com> wrote in message
news:T...@giganews.com...
> Hi,
>
> I've been undertaking a project to create a controller for a quadrotor
> aircraft. Whilst the dynamic modelling and controller design has nearly
> been completed I am having trouble getting the requried feedback signals.
>
> I am trying to implement a Kalman filter to combine the signals of
> accelerometers and gyroscopes to produce an attitude estimate. I have read
> all the introductory literature and have also obtained some code to
achieve
> the desired sensor fusion along a single axis.
>
> The code I have is here: 124.243.132.204\tilt.c
>
> The code uses the derivative of the covariance matrix to do the update:
> Pdot = A*P + P*A' + Q
> The P matrix is then updated using P=P+Pdot*dt
>
> The introductory papers however all use the update equation:
> P=A*P*A'+Q
>
> Why is the derivative used and where does that equation come from? I
> havent been able to find anything on it. There doesnt seem to be a lot of
> info around on the net and Kalman filtering seems to be something that not
> many people have an understanding of.
>
> This is my main question but I am also wondering how the A matrix is
> derived. I can not see how the fusion of the gyro and accelerometer data
> can be achieved with this matrix when fitting it to the form x=Ax+Bu. I
> assume x would be [tilt angle, gyro bias] and u would be the gyro data.
>
> Anybody got any ideas at all?? I am completly lost and confused.
>
>

How about this (rather expensive) book:
Tracking and Kalman Filtering Made Easy by Eli Brookner
http://www.amazon.com/Tracking-Kalman-Filtering-Made-Easy/dp/0471184071/sr=8-1/qid=1159777619/ref=sr_1_1/102-2881457-767
4504?ie=UTF8&s=books
I have a copy (but never read it ;o)

--DF


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Peter Nachtwey - 2006-10-02 05:42:00

Trond Danielsen wrote:
> quadrotor wrote:
> > [...]
> >
> > The introductory papers however all use the update equation:
> > P=A*P*A'+Q
> >
> > Why is the derivative used and where does that equation come from? I
> > havent been able to find anything on it. There doesnt seem to be a lot of
> > info around on the net and Kalman filtering seems to be something that not
> > many people have an understanding of.
> >
>
> A' is not the derivative of A, it is the inverse of matrix A.
I totally missed the A' and didn't understand what quadrotor was asking
because he didn't specifically ask about the A'.   Now I see why he is
confused.  Actually the ' should be a superscript T for transpose.
Math packages such as Matlab and Scilab use A' to indicate transpose
because they are text based.

Peter Nachtwey

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - quadrotor - 2006-10-02 05:52:00

Just a clarification. When I write A' I mean A transposed. A few posters
thought I meant inverse when I put a "'".
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Peter Nachtwey - 2006-10-02 06:19:00

quadrotor wrote:
>
> This is my main question but I am also wondering how the A matrix is
> derived.
>
> Anybody got any ideas at all?? I am completly lost and confused.
Me too now.  I looked at the code and A is defined in the continuous
domain and must be converted to the discrete domain to use.    Ac = [ 0
, -1 ; 0, 0 ]     Ad = expm(Ac*dt)    Ad= [1, -dt; 0 , 1 ]

Now Ad can be used to calculate x(n+1) = Ad*x(n).   I don't see where
the continuous A ( Ac ) is being converted to the discrete A ( ad ) in
your C code.

Peter Nachtwey

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - quadrotor - 2006-10-02 06:58:00

More useful info that maybe somebody can explain.  what is a state function
as apposed to the state vector??  
QUOTED:

* Our state vector is:
 *
 *	X = [ angle, gyro_bias ]
 *
 * It runs the state estimation forward via the state functions:
 *
 *	Xdot = [ angle_dot, gyro_bias_dot ]
 *
 *	angle_dot	= gyro - gyro_bias
 *	gyro_bias_dot	= 0
 *
 * And updates the covariance matrix via the function:
 *
 *	Pdot = A*P + P*A' + Q
 *
 * A is the Jacobian of Xdot with respect to the states:
 *
 *	A = [ d(angle_dot)/d(angle)     d(angle_dot)/d(gyro_bias) ]
 *	    [ d(gyro_bias_dot)/d(angle) d(gyro_bias_dot)/d(gyro_bias) ]
 *
 *	  = [ 0 -1 ]
 *	    [ 0  0 ]
 *
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - Peter K. - 2006-10-02 08:00:00

quadrotor wrote:

> More useful info that maybe somebody can explain.  what is a state function
> as apposed to the state vector??

The state vector is simply a vector of the variables that make up the
state of your system.  The state function (from what you quoted) is the
functional relationship between the state variables.

Ciao,

Peter K.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Kalman Filter Help - Anybody understand Kalman filtering?? - quadrotor - 2006-10-03 05:33:00

Hey again,

After many hours of reserach I have come to the conclusing that the Kalman
filter in the code is a continuous/discrete implementation which utilizes
equation from the continuous and discrete Kalman filter. Can anyone give
me any links or informatin on this type of Kalman filter??

Cheers
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

previous | 1 | 2