File: faurre.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (27 lines) | stat: -rw-r--r-- 682 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function [P,R,T]=faurre(n,H,F,G,R0)
//[P,R,T]=faurre(n,H,F,G,R0)
//macro which computes iteratively the minimal solution of the algebraic
//Riccati equation and gives the matrices Rt and Tt of the filter model.
//   n     : number of iterations.
//   H,F,G : estimated triple from the covariance sequence of y.
//   R0    : E(yk*yk')
//   P    : solution of the Riccati equation after n iterations.
//   R,T  : gain matrix of the filter.
//!
//author: G. Le Vey  Date: 16 Febr. 1989
// Copyright INRIA

//initialization
Pn=G*inv(R0)*G'
//recursion
for k=1:n, 
  A=(G-F*Pn*H');
  Pn=F*Pn*F'+A/(R0-H*Pn*H')*A',
end;
P=Pn
//gain matrices of the filter.
R=R0-H*P*H';
T=(G-F*P*H')/R;