.Modelica_LinearSystems2.Examples.StateSpace.designKalmanFilter

Information

This example demonstrates the computatrion of a Kalman filter by calling function StateSpace.Design.kalmanFilter.

Interface

function designKalmanFilter
  extends Modelica.Icons.Function;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.TransferFunction;
  input StateSpace ss = StateSpace(TransferFunction(n = {1}, d = {1, 2, 3, 4}));
  input Real Q[:, :] = identity(size(ss.A, 1));
  input Real R[:, :] = identity(size(ss.C, 1));
  output Real L[:, :];
  output StateSpace kss(redeclare Real A[size(ss.A, 1), size(ss.A, 1)], redeclare Real B[size(ss.B, 1), size(ss.B, 2) + size(ss.C, 1)], redeclare Real C[size(ss.A, 1), size(ss.A, 2)], redeclare Real D[size(ss.A, 1), size(ss.B, 2) + size(ss.C, 1)]);
end designKalmanFilter;

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