functionUKF
Unscented Kalman filter design function
Extends from Modelica.Icons.Function (Icon for functions).
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.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| 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)] | Ppre | Error covariance matrix at instant k-1 | |
| Real[size(xpre, 1),size(xpre, 1)] | Q | identity(size(xpre, 1)) | Weighted covariance matrix of the associated process noise (F*Q*F') |
| Real[size(y, 1),size(y, 1)] | R | identity(size(y, 1)) | 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(Ppre, 1),size(Ppre, 1)] | P | Error covariance matrix | |
| Real[size(xpre, 1),size(y, 1)] | K | Kalman filter gain matrix |
Contents
| Name | Description |
|---|---|
Revisions
| Date | Author | Comment |
|---|---|---|
| 2010-06-11 | Marcus Baur, DLR-RM | Realization |