CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

package

Estimation.StrapdownINS.UKF

Manifold unscented Kalman filter for aided strapdown navigation

Use

Estimator implements the shared sampled strapdown interface. It carries the same nominal position, velocity, quaternion and IMU biases as the ESKF, with 31 sigma points in a 15-dimensional tangent. The quaternion is not treated as four independent Euclidean error coordinates.

Use the same sensor captures, covariance, terrain assumptions and initial uncertainty when comparing filters. More sigma points do not by themselves establish better consistency or robustness. Inspect prediction/correction acceptance and runtime cost along with RMS error.

The nominal vector has 16 entries; its local covariance has 15 by 15 entries. Do not interchange those layouts. Shared frames and timing are documented in PartialEstimator.

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
constantTangentLengthInteger= 15
constantSigmaCountInteger= 312*n + 1 state sigma points
constantSigmaScaleReal= 3.872983346207417sqrt(TangentLength), for alpha=1, beta=2, kappa=0
constantSigmaWeightReal= 0.033333333333333331/(2*TangentLength) for every noncentral sigma point
constantCentralCovarianceWeightReal= 2.0w0 covariance weight for alpha=1, beta=2, kappa=0

Members

NameKindDescription
TangentVectortype
Covariancetype
NominalVectortype
StaterecordNominal strapdown state and local 15-state covariance
lowerCholeskyfunctionFixed-size lower Cholesky factor with an affirmative success result
sigmaTangentsfunctionGenerate 2*n+1 symmetric sigma points in the local tangent
stateVectorfunctionFlatten a public UKF state into its nominal numeric representation
injectVectorfunctionRight-inject a local tangent into a flattened nominal state
localErrorVectorfunctionBody-local tangent carrying one flattened nominal state to another
predictNominalVectorfunctionPropagate a flattened nominal state through the strapdown mechanization
predictPreintegratedNominalVectorfunctionApply a shared IMU preintegral to one UKF sigma-state bias hypothesis
localErrorfunctionBody-local tangent carrying reference to target
outerProductfunctionFixed-size tangent outer product
initializefunction
predictfunctionUnscented propagation through the strapdown nominal mechanization
predictPreintegratedfunctionUnscented propagation through one closed-form IMU preintegration packet
correctUnscentedfunctionUnscented measurement correction in local navigation coordinates
correctGpsfunctionUnscented joint GPS position/velocity correction
correctMagnetometerfunctionUnscented yaw-only correction from raw magnetic field
correctBarometerfunctionUnscented vertical-position correction from bias-compensated pressure altitude
correctOpticalFlowfunctionUnscented body-velocity correction from co-timed flow and range
correctMocapfunctionUnscented motion-capture pose correction
stepfunctionExecute one sampled UKF prediction/correction tick
EstimatorblockSampled manifold UKF implementing the common strapdown estimator boundary

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

package UKF
  "Manifold unscented Kalman filter for aided strapdown navigation"
  constant Integer TangentLength = 15;
  constant Integer SigmaCount = 31 "2*n + 1 state sigma points";
  constant Real SigmaScale = 3.872983346207417
    "sqrt(TangentLength), for alpha=1, beta=2, kappa=0";
  constant Real SigmaWeight = 0.03333333333333333
    "1/(2*TangentLength) for every noncentral sigma point";
  constant Real CentralCovarianceWeight = 2.0
    "w0 covariance weight for alpha=1, beta=2, kappa=0";

  type TangentVector = Real[15]
    "{position, velocity, attitude, gyro bias, accelerometer bias}";
  type Covariance = Real[15, 15];
  type NominalVector = Real[16]
    "{position(3),velocity(3),quaternion(4),gyro bias(3),accel bias(3)}";
  annotation(Documentation(info = "<html>
    <h4>Use</h4>
<p><a href=\"modelica://Estimation.StrapdownINS.UKF.Estimator\">Estimator</a>
implements the shared sampled strapdown interface. It carries the same nominal
position, velocity, quaternion and IMU biases as the ESKF, with 31 sigma points
in a 15-dimensional tangent. The quaternion is not treated as four independent
Euclidean error coordinates.</p>
<p>Use the same sensor captures, covariance, terrain assumptions and initial
uncertainty when comparing filters. More sigma points do not by themselves
establish better consistency or robustness. Inspect prediction/correction
acceptance and runtime cost along with RMS error.</p>
<p>The nominal vector has 16 entries; its local covariance has 15 by 15 entries.
Do not interchange those layouts. Shared frames and timing are documented in
<a href=\"modelica://Estimation.StrapdownINS.PartialEstimator\">PartialEstimator</a>.</p>
    </html>"));
end UKF;