functioneigenVectors
Calculate the right eigenvectors of the state space system corresponding to a transfer function and write them columnwise in a matrix. Optionally, the eigenvalues are computed
Information
Syntax
(eigenvectors, eigenvalues) = TransferFunction.Analysis.eigenVectors(tf, onlyEigenvectors)
Description
Calculate the eigenvectors and optionally (onlyEigenvectors=false) the eigenvalues of the corresponding state space system of a transfer function. The output eigenvectors is a matrix with the same dimension as matrix ss.A. Just like in Modelica.Math.Matrices.eigenValues, if the i-th eigenvalue has an imaginary part, then eigenvectors[:,i] is the real and eigenvectors[:,i+1] is the imaginary part of the eigenvector of the i-th eigenvalue.
The eigenvalues are returned as a complex vector eigenvalues.
Example
TransferFunction s = Modelica_LinearSystems2.TransferFunction.s();
Modelica_LinearSystems2.TransferFunction tf=(2*s+2)/(s^2+2*s+2);
Real eigenvectors[2,2];
Complex eigenvalues[2];
algorithm
(eigenvectors, eigenvalues) = Modelica_LinearSystems2.TransferFunction.Analysis.eigenVectors(tf, true);
// eigenvectors = [(-0.4082), (-0.4082);
0.8165, 0]
// eigenvalues = {-1 + 1*j, -1 - 1*j}
|-0.4082 -i0.4082 | | -0.4082 + i0.4082 |
i.e. v1 = | |, v2 = | |
| 0.8165 | | 0.8165 |
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TransferFunction | tf | Transfer function of a system | |
| Boolean | onlyEigenvectors | true |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,:] | eigvec | Eigen values of the system | |
| Complex[:] | eigval | Eigen values of the system |