This example shows how to calculate the dc-gain of a state space system.
function analysisDcGain extends Modelica.Icons.Function; import Modelica.Math.Matrices; import Modelica_LinearSystems2.StateSpace; import Modelica.Utilities.Streams.print; input StateSpace ssi = StateSpace(A = [1, 0, 0, 0, 0, 0; 1, 4, 0, 2, 0, -1; 0, 2, 3, 0, 78, 6; 1, 1, 2, 2, 3, 3; 10, 13, 34, 0, 0, 1; 3, 0, 0, 2, 0, 0], B = [0, 0; 0, 0; 0, 0; 0, 0; 1, 0; 0, 0], C = [1, 0, 1, 0, 1, 0; 0, 1, 0, 1, 0, 1; 0, 1, 0, 1, 0, 1], D = [0, 0; 0, 0; 0, 0]); output Boolean ok; end analysisDcGain;