functionUKF_SR
Design function for Unscented Kalman filter withcomputation for square root method
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.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_LinearSystems2.DiscreteStateSpace.Internal.fBase | fSigma | ||
| Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase | hSigma | ||
| Real[:] | xpre | State at instant k-1 | |
| Real[:] | upre | Input at instant k-1 | |
| Real[:] | y | Output at instant k | |
| Real[size(xpre, 1),size(xpre, 1)] | CfPpre | Error covariance matrix at instant k-1 | |
| Real[size(xpre, 1),size(xpre, 1)] | CfQ | identity(size(xpre, 1)) | Left Cholesky factor of the weighted covariance matrix of the associated process noise (F*Q*F') |
| Real[size(y, 1),size(y, 1)] | CfR | identity(size(y, 1)) | Left Cholesky factor of the covariance matrix of the measurement noise |
| Real | alpha | 0.1 | Spread of sigma points |
| Real | beta | 2 | Characteristic of the distribution of x |
| Real | kappa | 0 | Kurtosis scaling of sigma point distribution |
| Modelica.Units.SI.Time | Ts | Sample time |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(xpre, 1)] | x_est | Estimated state vector | |
| Real[size(y, 1)] | y_est | Estimated output | |
| Real[size(CfPpre, 1),size(CfPpre, 1)] | CfP | Left Cholesky factor of the error covariance matrix | |
| Real[size(xpre, 1),size(y, 1)] | K | Kalman filter gain matrix |
Revisions
| Date | Author | Comment |
|---|---|---|
| 2010-06-11 | Marcus Baur, DLR-RM | Realization |