File: faurre.sci

package info (click to toggle)
scilab 5.3.3-10
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 330,656 kB
file content (32 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA - 1989 - G. Le Vey
// 
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution.  The terms
// are also available at    
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt

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.
//!

//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;
endfunction