What is the state number of a Kalman filter

Started by fl February 25, 2013
Hi,
I read an article on Kalman filter implementation. It said: "For a 4-state Kalman
filter, all the Kalman filter equations can be expressed as 30 scalar
equations....."

I know a Kalman filter has (1) Process equation:

x(n+1)=A*x(n)+w(n)

(2) Measurement equation:

s(n)=B*x(n)+v(n)

My question again here is: Where does "4-state" come from the above equations?

Thanks,
On Monday, February 25, 2013 12:05:24 PM UTC-5, fl wrote:
> Hi, > > I read an article on Kalman filter implementation. It said: "For a 4-state Kalman
filter, all the Kalman filter equations can be expressed as 30 scalar equations....."
> > > > I know a Kalman filter has (1) Process equation: > > > > x(n+1)=A*x(n)+w(n) > > > > (2) Measurement equation: > > > > s(n)=B*x(n)+v(n) > > > > My question again here is: Where does "4-state" come from the above equations? > > > > Thanks,
I think it is the column dimension number of matrix A. That is, the state number is the row number of x(n). I need your expert confirmation on my guess. Thanks,
On Mon, 25 Feb 2013 09:05:24 -0800, fl wrote:

> Hi, > I read an article on Kalman filter implementation. It said: "For a > 4-state Kalman filter, all the Kalman filter equations can be expressed > as 30 scalar equations....." > > I know a Kalman filter has (1) Process equation: > > x(n+1)=A*x(n)+w(n) > > (2) Measurement equation: > > s(n)=B*x(n)+v(n) > > My question again here is: Where does "4-state" come from the above > equations?
When life is simple it's just the size of x, the state vector. Complications can abound with nonlinear systems that force some of the elements of x to be algebraically dependent on one another, but don't worry about that at this point. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On 2/25/13 12:12 PM, fl wrote:
> On Monday, February 25, 2013 12:05:24 PM UTC-5, fl wrote: >> >> I read an article on Kalman filter implementation. It said: "For a 4-state Kalman
filter, all the Kalman filter equations can be expressed as 30 scalar equations....."
>> >> I know a Kalman filter has (1) Process equation: >> >> x[n+1] = A*x[n] + w[n] >> >> (2) Measurement equation: >> >> s[n] = B*x[n] + v[n]
these are, or can be, matrix equations. you know that. this is a "state variable filter" representation and is so general that these other topologies for filters (you know, Direct Form 1 or 2, the Transposed Direct Forms, Lattice, Normalized Ladder, Gold-Rader, etc.) can all be expressed using a common notation. so there are an infinite number of these state-variable filters that all have the same transfer function from input to output. but the transfer function from input to state is different for the different forms.
>> My question again here is: Where does "4-state" come from the above equations? > > I think it is the column dimension number of matrix A. That is, the state number
is the row number of x[n]. I need your expert confirmation on my guess. Thanks, i think you answered your own question. in a 4-state Kalman (or any other filter), the number of states is the length of the x[n] column vector. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Monday, February 25, 2013 12:57:22 PM UTC-5, robert bristow-johnson wrote:
> On 2/25/13 12:12 PM, fl wrote: > > > On Monday, February 25, 2013 12:05:24 PM UTC-5, fl wrote: > > >> > > >> I read an article on Kalman filter implementation. It said: "For a 4-state
Kalman filter, all the Kalman filter equations can be expressed as 30 scalar equations....."
> > >> > > >> I know a Kalman filter has (1) Process equation: > > >> > > >> x[n+1] = A*x[n] + w[n] > > >> > > >> (2) Measurement equation: > > >> > > >> s[n] = B*x[n] + v[n] > > > > these are, or can be, matrix equations. you know that. > > > > this is a "state variable filter" representation and is so general that > > these other topologies for filters (you know, Direct Form 1 or 2, the > > Transposed Direct Forms, Lattice, Normalized Ladder, Gold-Rader, etc.) > > can all be expressed using a common notation. so there are an infinite > > number of these state-variable filters that all have the same transfer > > function from input to output. but the transfer function from input to > > state is different for the different forms. > > > > >> My question again here is: Where does "4-state" come from the above equations? > > > > > > I think it is the column dimension number of matrix A. That is, the state number
is the row number of x[n]. I need your expert confirmation on my guess. Thanks,
> > > > i think you answered your own question. in a 4-state Kalman (or any > > other filter), the number of states is the length of the x[n] column vector. > > > > -- > > > > r b-j rbj@audioimagination.com > > > > "Imagination is more important than knowledge."
A curious question is here. I see a small Kalman filter has two states. Is there a Kalman filter has only one state? Is it possible? If not, what is the contradiction? Thanks
On 2/25/13 1:26 PM, fl wrote:
> > A curious question is here. I see a small Kalman filter has two states. Is there a
Kalman filter has only one state? Is it possible? If not, what is the contradiction?
>
well, i'm the wrong person to ask. i haven't messed around with Kalman filters since i was a grad student more than 3 decades ago. i know something (or used to) about state-variable representation of filters. i know something about probability, random variables, and random processes. i know something about detection and estimation of some signal buried in noise. i know what the Kalman filter aims to do (estimate the states that define a signal, rather than estimate the signal). but i forgot how it does it. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 25 Feb 2013 10:26:28 -0800, fl wrote:

<< other stuff snipped >> 

> A curious question is here. I see a small Kalman filter has two states. > Is there a Kalman filter has only one state? Is it possible? If not, > what is the contradiction?
There is no contradiction, it's just that the answer for a linear system will be pretty boring. You can have a one-state Kalman. If you assume measurement noise but no process noise (i.e., if you're making a noisy measurement of a constant) then the state estimate is just the average of all the measurements made to date. If you assume measurement noise and process noise, then the filter starts out very much like a cumulative average, but in steady state it ends up being a low pass filter, with a cutoff frequency determined by the ratio between the two noises. Keep in mind while you're doing your Kalman filter work is that a Kalman filter _by itself_ is just a time-varying linear filter that's probably expressed in a state-space form. What actually makes it a _Kalman_ filter isn't the filter structure -- it's the method that you used to _design_ the filter. And, of course, remember that "Kalman" does not mean "magic", so a Kalman filter isn't a magic filter -- it does have its limitations and drawbacks. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com