Optimization: principles and algorithms, by Michel Bierlaire
kalmanFilter.m
Go to the documentation of this file.
1 %> \file
2 %> Algorithms 14.2 and 14.3: Kalman filter update. Implementation of algorithms 14.2 and 14.3 of \cite Bier15-book
3 %>
4 %> @note Tested with \ref runKalman.m
5 %>
6 %> @author Michel Bierlaire
7 %> @date Fri May 9 16:06:12 2014
8 %> @ingroup Algorithms
9 %> @ingroup chap14
10 
11 %> Applies one update of the Kalman filter algorithm.
12 %> @param x the current estimate of the parameters
13 %> @param H the current filter matrix
14 %> @param A the data matrix for the next block
15 %> @param b the RHS for the next block
16 %> @param lambda the discount factor
17 %> @return [x,H]
18 %> @return x: the updated value of the parameters.
19 %> @return H: the updated value of the filter matrix.
20 function [x,H] = kalmanFilter(x,H,A,b,lambda=1.0)
21  H = lambda * H + A'*A ;
22  d = H \ (A' * (b - A*x)) ;
23  x = x + d ;
24 endfunction
function kalmanFilter(in x, in H, in A, in b, in lambda)
Applies one update of the Kalman filter algorithm.
Copyright 2015-2016 Michel Bierlaire