eigenvalues = DiscreteStateSpace.Analysis.eigenValues(dss)
Calculate the eigenvalues of a discrete state space system, i.e. the eigenvalues of the system matrix A of a discrete state space system.
The output is a complex vector containing the eigenvalues.
The eigenvalues ev_d of the discrete system are related to the eigenvalues of the corresponding continuous system ev_c by
ev_d = exp(Ts*ev_c).
StateSpace ss=Modelica_LinearSystems2.StateSpace(
A=[-1,1;-1,-1],
B=[1;1],
C=[1,1],
D=[0],
B2=[0;0],
Ts=0.1);
DiscreteStateSpace dss=DiscreteStateSpace(ss, Ts=0.1);
Complex eigenvalues[2];
algorithm
eigenvalues = Modelica_LinearSystems2.DiscreteStateSpace.Analysis.eigenValues(dss);
// eigenvalues = {0.900452 + 0.0904977*j, 0.900452 - 0.0904977*j}
//
encapsulated function eigenValues import Modelica_LinearSystems2; import Modelica_LinearSystems2.DiscreteStateSpace; import Complex; input DiscreteStateSpace dss "Discrete state space system"; output Complex eigvalues[size(dss.A, 1)] = Modelica_LinearSystems2.ComplexMathAdds.eigenValues(dss.A) "Eigenvalues of the system"; end eigenValues;