DSPRelated.com
Forums

can anyone help design a state space model applying into Extended Kalman Filter

Started by Terry January 21, 2008
x1(t) = x2(t)+x3(t)*exp(-x4(t)*x1(t-1)^2)*x1(t-1)+x5(t)*exp
(-x6(t)*x1(t-1)^2)*x1(t-2) + randn*v1;

x2(t) = x2(t-1) + randn*v2;
x3(t) = x3(t-1) + randn*v3;
x4(t) = x4(t-1) + randn*v4;
x5(t) = x5(t-1) + randn*v5;
x6(t) = x6(t-1) + randn*v6;

x2 x3 x4 x5 x6 follows a random walk.

I tried many ways but alway wrong. Can anyone help design a
state space model applied by Extended kalman filter? Many
many thanks
On Mon, 21 Jan 2008 07:41:31 -0800, Terry wrote:

> x1(t) = x2(t)+x3(t)*exp(-x4(t)*x1(t-1)^2)*x1(t-1)+x5(t)*exp > (-x6(t)*x1(t-1)^2)*x1(t-2) + randn*v1; > > x2(t) = x2(t-1) + randn*v2; > x3(t) = x3(t-1) + randn*v3; > x4(t) = x4(t-1) + randn*v4; > x5(t) = x5(t-1) + randn*v5; > x6(t) = x6(t-1) + randn*v6; > > x2 x3 x4 x5 x6 follows a random walk. > > I tried many ways but alway wrong. Can anyone help design a state space > model applied by Extended kalman filter? Many many thanks
This question is too general to get you much help. Have you read texts on Kalman filtering, or are you trying to do this off of web sites? What texts? What sites? If you're trying to do this off of web sites, I suggest you get your hands on a copy of Dan Simon's book ("Optimal State Estimation", I think is the name). _Study_ it for understanding, don't just try to pick out recipes. I can see already that you're getting one thing wrong: While your problem statement kinda looks like it's in state space, you have x1 depending on not one, but two past values -- you should have x1(t-1) as a separate state so that the first equation of the set will only depend on immediate past values of your state variables. Good luck. Come back here when you can ask more specifically directed questions. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
On 21 Jan, 16:46, Tim Wescott <t...@seemywebsite.com> wrote:
> Tim Wescott
thanks a lot Tim, I write this state space according to the paper "Demonstration of Adaptive Extended Kalman Filter for. Low Earth Orbit Formation Estimation Using CDGPS" http://acl.mit.edu/papers/Busse_ION02.pdf so I write state space model as y(t) = a1(t)+a2(t)*exp(- a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(-a5(t)*y(t-1)^2)*y(t-2)+randn*v1; y(t) = a1(t)+a2(t)*exp(-a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(- a5(t)*y(t-1)^2)*y(t-2)+randn*v1; a1(t) = a1(t-1) + randn*v2; a2(t) = a2(t-1) + randn*v3; a3(t) = a3(t-1) + randn*v4; a4(t) = a4(t-1) + randn*v5; a5(t) = a5(t-1) + randn*v6; a1 a2 a3 a4 a5 follows a random walk. and I applied the state space model into Extended Kalman filter, the model works. According to that paper, the model should be fine however the model performance seems not very well. Is it possible that could you give me any suggestions? many many thanks
On Mon, 21 Jan 2008 11:26:50 -0800, Terry wrote:

> On 21 Jan, 16:46, Tim Wescott <t...@seemywebsite.com> wrote: >> Tim Wescott > > thanks a lot Tim, > > I write this state space according to the paper "Demonstration of > Adaptive Extended Kalman Filter for. Low Earth Orbit Formation > Estimation Using CDGPS" http://acl.mit.edu/papers/Busse_ION02.pdf > > so I write state space model as y(t) = a1(t)+a2(t)*exp(- > a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(-a5(t)*y(t-1)^2)*y(t-2)+randn*v1; > > y(t) = a1(t)+a2(t)*exp(-a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(- > a5(t)*y(t-1)^2)*y(t-2)+randn*v1; > > a1(t) = a1(t-1) + randn*v2; > a2(t) = a2(t-1) + randn*v3; > a3(t) = a3(t-1) + randn*v4; > a4(t) = a4(t-1) + randn*v5; > a5(t) = a5(t-1) + randn*v6; > > a1 a2 a3 a4 a5 follows a random walk. > > and I applied the state space model into Extended Kalman filter, the > model works. According to that paper, the model should be fine however > the model performance seems not very well. Is it possible that could you > give me any suggestions? > > many many thanks
I did already: study up on Kalman filters, using a good book (like the one I recommended), then come back with specific questions. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
sorry sir

there is a example of adaptive kalman filter applied to time-varying
AR model

http://www.cs.ubc.ca/~emtiyaz/papers/TBME-00664-2005.R2-preprint.pdf

AR model is represented as Y(t) = a_1*Y(t-1) + ... + a_p*Y(t-p); so in
that paper, the state space model is given as

 X(t+1) = AX(t) + V(t);  Y(t) = H(t)X(t) + W(t);

X(t) = [a_1, a_2, ... , a_p]';       H(t) = [Y(t-1), Y(t-2), ... , Y(t-
p)];

so if that paper were wrong?






sorry the model is
y(t) = a1(t)+a2(t)*exp(-a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(-
a5(t)*y(t-1)^2)*y(t-2);


a1(t) = a1(t-1) + v1;
a2(t) = a2(t-1) + v2;
a3(t) = a3(t-1) + v3;
a4(t) = a4(t-1) + v4;
a5(t) = a5(t-1) + v5;
thanks a lot, Tim. I found the problem where it is. :-)
Terry <terryzz24@gmail.com> writes:

> sorry sir > > there is a example of adaptive kalman filter applied to time-varying > AR model > > http://www.cs.ubc.ca/~emtiyaz/papers/TBME-00664-2005.R2-preprint.pdf > > AR model is represented as Y(t) = a_1*Y(t-1) + ... + a_p*Y(t-p); so in > that paper, the state space model is given as > > X(t+1) = AX(t) + V(t); Y(t) = H(t)X(t) + W(t); > > X(t) = [a_1, a_2, ... , a_p]'; H(t) = [Y(t-1), Y(t-2), ... , Y(t- > p)]; > > so if that paper were wrong?
Quit spouting other people's formulae (badly) and think about what you want. I say "badly" because Y(t) = a_1*Y(t-1) + ... + a_p*Y(t-p); doesn't make a whole lot of sense, and is certainly not the same as: X(t+1) = AX(t) + V(t); Y(t) = H(t)X(t) + W(t); Your problem:
> y(t) = a1(t)+a2(t)*exp(-a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(-a5(t)*y(t-1)^2)*y(t-2)+randn*v1; > > a1(t) = a1(t-1) + randn*v2; > a2(t) = a2(t-1) + randn*v3; > a3(t) = a3(t-1) + randn*v4; > a4(t) = a4(t-1) + randn*v5; > a5(t) = a5(t-1) + randn*v6;
Seems poorly defined for the following reasons: * It's not clear that there is process noise and measurement noise. The way it's written, there is only process noise (the v1, ..., v6). If there was a measurement noise, I would expect it to be written as u1, ... , un. * It's not clear what a good choice of state is. As Tim said, a1 -> a5 is part of the state, but it also looks like you need y(t-1) and y(t-2). As Tim said, more reading is required... in books. Ciao, Peter "Books are an information technology" K. -- "And he sees the vision splendid of the sunlit plains extended And at night the wondrous glory of the everlasting stars."
the measurement equation is:
y(t) = a1(t)+a2(t)*exp(-a3(t)*y(t-1)^2)*y(t-1)+a4(t)*exp(-
a5(t)*y(t-1)^2)*y(t-2);

and the state equations are
a1(t) = a1(t-1) + v1;
a2(t) = a2(t-1) + v2;
a3(t) = a3(t-1) + v3;
a4(t) = a4(t-1) + v4;
a5(t) = a5(t-1) + v5;

there is no measurement noise.
I don't need y(t-1) or y(t-2) to be a part of state, both of them are
observerable