.Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace.Design.UKF

Information

Syntax

(x_est, y_est, P, K) = DiscreteStateSpace.Design.UKF(x_pre, u_pre, y, P_pre, Q, R, alpha, beta, kappa, Ts)

Description

Function UKF computes one recursion of the Unscented Kalman filter. 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_SR, where the square root method to deal with positive definite matrices is applied to solve the mathematically identical problem.

References

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

Interface

function UKF
  extends Modelica.Icons.Function;
  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 Ppre[size(xpre, 1), size(xpre, 1)] "Error covariance matrix at instant k-1";
  input Real Q[size(xpre, 1), size(xpre, 1)] = identity(size(xpre, 1)) "Weighted covariance matrix of the associated process noise (F*Q*F')";
  input Real R[size(y, 1), size(y, 1)] = identity(size(y, 1)) "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 P[size(Ppre, 1), size(Ppre, 1)] "Error covariance matrix";
  output Real K[size(xpre, 1), size(y, 1)] "Kalman filter gain matrix";
end UKF;

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