Re: [Bayes++] How to specify the Jacobian of a Linrz_uncorrelated_observe_model
Brought to you by:
mistevens
|
From: Michael S. <ma...@mi...> - 2007-01-25 14:27:32
|
On Saturday 13 January 2007 13:36, =E7=B6=AD=E5=9D=87 wrote:
> Hi,
>
> If I'd like to design a class inheriting Linrz_uncorrelated_observe_model
> to describe a pinhole model, how would I assign the values of Hx Jacobian
> matrix? I thought the Jacobian depends on where you linearize the
> observation function which means it is related to the values of the state
> vector when you linearize it. But in the PV sample code I just see things
> like:
> Hx(0,0) =3D 1;
> Hx(0,1) =3D 0.; and these are not time-varying.
> There must be something wrong in my understanding. Would anyone help?
>
You can modify the the observation models values at any time. As you sugges=
t=20
it is very common that the Jacobian is not constant. With a linearized=20
observation model it usually depends on the state vector.
The PV example on requires a simple constant and linear observation model. =
It=20
uses Linrz_uncorrelated_observe_model to show the general form, even though=
=20
it is not necessary in this case.
If your state dependant observation model inherts from=20
Linrz_uncorrelated_observe_model then it is easy to represent the state=20
dependance of the model.
class Obs : public Linrz_uncorrelated_observe_model
{
public:
void state(const Vec& s)
{
s_ =3D s;
// linearised Jacobian
Hx(0,0) =3D some function of the elements of s
etc=20
}
private:
Vec s_; // Current state about which Hx was linearised
};
The member function 'state' is simply called with the state about which you=
=20
wish to linearise before the model is used as the model paramter=20
to 'observe'.
All the best,
Michael
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation and
Bayesian Filtering
http://bayesclasses.sf.net
___________________________________
|