The operator update_kalmanupdate_kalmanUpdateKalmanupdate_kalmanUpdateKalmanUpdateKalman reads the update file
FileNameFileNameFileNameFileNameFileNamefileName of a Kalman filter. Kalman filters return an
estimate of the current state (or even the prediction of a future state)
of a discrete, stochastically disturbed, linear system.
A Kalman filtering is based on a mathematical model of the system
to be examined which at any point in time has the following
characteristics:
Model parameter:
transition matrix A, control matrix G including the controller
output u and the measurement matrix C
Model stochastic:
system-error covariance matrix Q, system-error - measurement-error
covariance matrix L and measurement-error covariance matrix R
Measurement vector:
y
History of the system:
extrapolation vector and extrapolation-error covariance
matrix
Many systems do not need entries “from outside” and therefore G
and u can be dropped. Further, system errors and measurement
errors are normally not correlated (L is dropped). Some of the
characteristics mentioned above may change dynamically (from one iteration
to the next). The operator update_kalmanupdate_kalmanUpdateKalmanupdate_kalmanUpdateKalmanUpdateKalman serves to modify
parts of the system according to an update file (ASCII) with the following
structure (see also read_kalmanread_kalmanReadKalmanread_kalmanReadKalmanReadKalman):
Dimension row
+ content row
+ matrix A
+ matrix C
+ matrix Q
+ matrix G + vector u
+ matrix L
+ matrix R
and describes the further content of the file. Instead of
'*', '+' (= parameter is available) respectively
'-' (= parameter is missing) has to be set. In contrast to
description files for read_kalmanread_kalmanReadKalmanread_kalmanReadKalmanReadKalman, the system
description needs not be complete in this case. Only those parts
of the system which are changed must be indicated. The indication
of estimated values is unnecessary, as these values must stem
from the latest filtering according to the structure of the filter.
(r x s) matrices will be stored in row-major
order in the following form:
(the spaces/line feed characters can be chosen at will),
vectors will be stored correspondingly in the following form:
These parameters include the dimensions of the state vector, measurement
vector and controller vector and therefore are vectors
[n,m,p], whereby n indicates the
number of the state variables, m the number of the measurement
values and p the number of the controller members.
n and m are invariant for a given system,
i.e. they must not differ from corresponding input
values of the update file.
For a system without without influence “from outside” 'p = 0'"p = 0""p = 0""p = 0""p = 0""p = 0".
These parameters include the lined up matrices (vectors)
A, C, Q, G, u and if necessary
L which have been stored in row-major order.
ModelInModelInModelInModelInModelInmodelIn / ModelOutModelOutModelOutModelOutModelOutmodelOut therefore are vectors of the
length n*n + n*m + n*n + n*p + p [+ n*m].
The last summand is dropped if system errors and measurement errors
are not correlated, i.e. no value has been set for L.
If the update file is readable and correct, the operator
update_kalmanupdate_kalmanUpdateKalmanupdate_kalmanUpdateKalmanUpdateKalman returns the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.