[R] Kalman Filter in Control situation.

Paul Gilbert pgilbert at bank-banque-canada.ca
Fri Dec 22 20:31:37 CET 2006


Todd Remund wrote:
> I am looking for a Kalman filter that can handle a control input.  I thought 
> that l.SS was suitable however, I can't get it to work, and wonder if I am 
> not using the right function.  What I want is a Kalman filter that accepts 
> exogenous inputs where the input is found using the algebraic Ricatti 
> equation solution to a penalty function.  If K is the gain matrix then the 
> exogenous input would be u_t = -Kx_n,  where x_n is the Kalman filter state 
> estimate.  These inputs would be entered as such x_t = Ax_t-1 + Bu_t-1 + 
> Ge_t.  

The control input u for l.SS in dse must be specified as (multivariate) 
series (i.e. all periods) in the call to l.SS. So the input does not 
really permit a control (feedback) rule like you seem to have in mind, 
unless you are thinking of the steady state solution to the Ricatti 
equation. However, it does look like this might be specified in the gain 
matrix as part of the state feedback, rather than as an input. (BTW, 
your situation is one where the widely used term "exogenous" is clearly 
incorrect, thus my preference for calling this "input".)

Another (inefficient) possibility would be to iterate to a solution.

>Is l.SS in the dse1 package the correct parametrization of the Kalman 
> filter?

I think it is correct, following some of the classic references. 
However, as Mark Leeds pointed out, there are different conventions. (I 
think, actually, more than two even without considering the input 
series.) The dse specification is a bit special regarding the input, in 
that the input is shifted so that time t can feed through to the state 
and affect the output in the same period t. This is important in some 
economics application, especially at annual frequencies. Others solve 
this problem by having inputs bypass the state and feed directly through 
to the output, in which case the state no longer summarizes the dynamics 
of the process, and is not a state vector in the classic sense.

Paul Gilbert

> 
> Thank you very much,
> Todd Remund
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
====================================================================================

La version française suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential inform...{{dropped}}



More information about the R-help mailing list