result = StateSpace.Analysis.numeratorDegree(ss)
Function Analysis.numeratorDegree calculates the degree of the numerator polynomial of the corresponding transfer function. The state space system is converted to the transfer function G(s)=N(s)/D(s) with the polynomial N(s) as numerator.
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace( A=[-1], B=[1], C=[1], D=[1]); Real nDegree; algorithm nDegree := StateSpace.Analysis.numeratorDegree(Modelica_LinearSystems2.StateSpace(ss); // nDegree = 1
StateSpace.Conversion.toTransferFunction, StateSpace.Analysis.denominatorDegree
encapsulated function numeratorDegree import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.TransferFunction; input StateSpace ss "State space system"; output Integer result "Degree of numerator polynomial"; end numeratorDegree;