.Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace.Design.UKF_SR

Information

Syntax

(x_est, y_est, CfP, K) = DiscreteStateSpace.Design.UKF_SR(x_pre, u_pre, y, CfP_pre, QCf, CfR, alpha, beta, kappa, Ts)

Description

Function UKF_SR computes one recursion of the Square Root Unscented Kalman filter (SR-UKF). SR-UKF follow the same principle as UKF but using Cholesky factors (square roots) of the positive definite matrices. This means less computational effort and higher reliablitiy.

Unscented Kalman filters are similar to Extended Kalman filters but using statistical linearization where extended Kalman filter apply the user-provided derivation of the system equation. Instead of explicit derivation linear regression between spcifically chosen sample points (sigma points). See [1] for more information.

See also UKF, where the standard method (without Cholesky factorization) to calculate UKF is applied.

References

 [1]
http://en.wikipedia.org/wiki/Kalman_filter#Unscented_Kalman_filter.
 

Interface

function UKF_SR
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace;
  input Modelica_LinearSystems2.DiscreteStateSpace.Internal.fBase fSigma;
  input Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase hSigma;
  input Real xpre[:] "State at instant k-1";
  input Real upre[:] "Input at instant k-1";
  input Real y[:] "Output at instant k";
  input Real CfPpre[size(xpre, 1), size(xpre, 1)] "Error covariance matrix at instant k-1";
  input Real CfQ[size(xpre, 1), size(xpre, 1)] = identity(size(xpre, 1)) "Left Cholesky factor of the weighted covariance matrix of the associated process noise (F*Q*F')";
  input Real CfR[size(y, 1), size(y, 1)] = identity(size(y, 1)) "Left Cholesky factor of the covariance matrix of the measurement noise";
  input Real alpha = 0.1 "Spread of sigma points";
  input Real beta = 2 "Characteristic of the distribution of x";
  input Real kappa = 0 "Kurtosis scaling of sigma point distribution";
  input Modelica.Units.SI.Time Ts "Sample time";
  output Real x_est[size(xpre, 1)] "Estimated state vector";
  output Real y_est[size(y, 1)] "Estimated output";
  output Real CfP[size(CfPpre, 1), size(CfPpre, 1)] "Left Cholesky factor of the error covariance matrix";
  output Real K[size(xpre, 1), size(y, 1)] "Kalman filter gain matrix";
end UKF_SR;

Revisions

Date Author Comment
2010-06-11 Marcus Baur, DLR-RM Realization

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos