.Modelica_LinearSystems2.DiscreteTransferFunction.Analysis.impulseResponse

Information

Syntax

(y, t, x) = DiscreteTransferFunction.Analysis.impulseResponse(dtf, tSpan, x0)

Description

First, the discrete transfer function representation is transformed into discrete state space representation which is given to DiscreteStateSpace.Analysis.timeResponse and the impulse response of the discrete state space system is calculated. The type of the time response is defined by the input responseType, i.e. in this case

Impulse "Impulse response",

The outputs y and x of the discrete state space systrem are calculated for each time step t=k*dt.

Example

  DiscreteTransferFunction z = Modelica_LinearSystems2.DiscreteTransferFunction.z();
  Modelica_LinearSystems2.DiscreteTransferFunction dtf=(0.0023753*z^2 + 0.00475059*z + 0.0023753)/(z^2 - 1.89549*z + 0.904988);

  Real tSpan= 0.4;
  Real x0[1]={0,0};

  Real y[5,1,1];
  Real t[5];
  Real x[5,1,1]

algorithm
  dtf.Ts:=0.1;
  (y,t,x):=Modelica_LinearSystems2.DiscreteTransferFunction.Analysis.impulseResponse(dtf,tSpan,response,x0);
//  y[:,1,1] = {0.00237529691211404, 0.00925293808994548, 0.0177645046847056, 0.0252985874729831, 0.0318764762911345}
//         t = {0, 0.1, 0.2, 0.3, 0.4}
//  x[:,1,1] = {0.0, 0.0, 1.0, 1.89548693586698, 2.68788260052697}

Interface

encapsulated function impulseResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.DiscreteTransferFunction;
  import Modelica_LinearSystems2.DiscreteStateSpace;
  extends Modelica_LinearSystems2.Internal.timeResponseMask_tf_discrete;
end impulseResponse;

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