.Modelica_LinearSystems2.StateSpace.Analysis.dcGain

Information

Syntax

          K = dcGain(ss);
(K, finite) = dcGain(ss);

Description

This function computes the steady state gain K of a state space system. K is defined in the following way:

The linear state space system

der(x) = A*x + B*u
     y = C*x + D*u

is solved for y under steady state conditions, i.e.,

   der(x) = 0

resulting in

    y = ( D + C*inv(A)*B )*u
      = K*u

Interpretations of matrix K:

If A is singular (e.g. due to a zero eigenvalue), then a unique inverse of A does not exist. If there are non-unique solutions of the equation "A*X=B", the one with the smallest norm in X is used to compute K. If no solution of this equation exists, K cannot be computed. In this case, output argument finite = false and all elements of K are set to Modelica.Constants.inf (when K could be computed, finite = true).

Interface

encapsulated function dcGain
  import Modelica;
  import Modelica_LinearSystems2.StateSpace;
  input StateSpace ss "Linear system in state space form";
  output Real K[size(ss.C, 1), size(ss.B, 2)] "DC gain matrix K (= G(s=0) = D - C*inv(A)*B)";
  output Boolean finite "True, if K is finite, otherwise K is infinite (K=fill(Modelica.Constants.inf,..) returned)";
end dcGain;

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