.Modelica_LinearSystems2.DiscreteStateSpace.initialResponse

Information

Syntax

    (y) = DiscreteStateSpace.initialResponse(dss, x0, samples)
            or
(y, xc) = DiscreteStateSpace.initialResponse(dss, x0, samples)

Description

Function DiscreteStateSpace.initialResponse calculates the initial response to Default of initial state x0 of a discrete state space system. Input sample is the number of samples. Sample time is the sample time of the discrete state space system.

Example

  import dss=Modelica_LinearSystems2.DiscreteStateSpace;
  import Modelica_LinearSystems2.StateSpace;
  StateSpace ss=Modelica_LinearSystems2.StateSpace(
    A=[-1],
    B=[1],
    C=[2],
    D=[0]);
  Real Ts=0.1;
  dss=dss(ss,Ts);
  Real x0[1]={1};

  Real y[:,:]=dss.initialResponse(dss,x0,50);

//  y=[2, 1.8095, 1.6372,..., 0.01812, 0.01639, 0.01483]

Interface

encapsulated function initialResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.DiscreteStateSpace;
  input DiscreteStateSpace dss "Linear system in discrete state space form";
  input Real x0[size(dss.A, 1)] = zeros(size(dss.A, 1)) "Initial system state";
  input Integer samples "Number of samples";
  output Real y[samples, size(dss.C, 1)] "System response (dimension: (input samples) x (number of outputs))";
  output Real x_continuous[samples, size(dss.A, 1)] "State trajectories (dimension: (input samples) x (number of states)";
end initialResponse;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

Generated at 2024-12-26T19:25:54Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos