.Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace.Internal.kfStepState

Information

One step, i.e.estimation of the state vector using a kalman filter iteration for discrete systems

Interface

function kfStepState
  extends Modelica.Icons.Function;
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace;
  input DiscreteStateSpace dss;
  input Real P[size(dss.A, 1), size(dss.A, 1)] "State covariance matrix of the previous instant";
  input Real Q[size(dss.B, 2), size(dss.B, 2)] "Input or process noise covariance matrix of the previous instant";
  input Real R[size(dss.C, 1), size(dss.C, 1)] "Output or measurement noise covariance matrix of the previous instant";
  input Real x[size(dss.A, 1)] "Estimated state vector of previous instant";
  input Real u[size(dss.B, 2)] "input vector";
  input Real y[size(dss.C, 1)] "Measured output vector";
  output Real x_new[size(dss.A, 1)];
  output Real K[size(dss.A, 1), size(dss.C, 1)] "Kalman filter gain matrix";
  output Real P_new[size(dss.A, 1), size(dss.A, 1)] "Updated state covariance matrix";
end kfStepState;

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