SecondOrder model
Requirements.Examples.Elementary.LinearAnalysis.SecondOrder
· source
The state matrix of a second-order system (w0 = 2 rad/s, D = 0.2) read from a MATLAB v4 file: every predicate against its closed form
Extends Modelica.Icons.Example
The eigenvalue blocks of LinearAnalysis on a state
matrix read from a shipped MATLAB v4 file (Resources/Data/SecondOrderLinearization.mat, a matrix named A in MATLAB v4 format,
the layout LinearAnalysis describes): the second-order system with
w0 = 2 rad/s and D = 0.2, whose mode is -0.4 ± 1.9596j --
damping 0.2, 0.3183 Hz, a 2.5 s time constant. Every block's Property and margin is
asserted against the closed form, including the Undefined of an empty band. To check a plant of your own, linearize it in your
Modelica tool, write its A matrix to such a file, and point readStateMatrix at it.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Parameters
| Name | Type | Description |
|---|---|---|
fileName parameter | String | A = [0, 1; -4, -0.8] (w0 = 2, D = 0.2): eigenvalues -0.4 +- 1.9596j, damping 0.2, 0.3183 Hz, time constant 2.5 s |
filePath parameter | String | the URI resolved (folded at translation) |
A[…] parameter | Real | the state matrix from the file, read at initialization (an impure read cannot be evaluated when the model is translated: some tools refuse it at flattening) |
Components and variables
| Name | Type | Description |
|---|---|---|
realPart | Requirements.LinearAnalysis.EigenvalueCheck | every real part below -0.1 1/s: satisfied, margin (0.4 - 0.1) / 0.1 = 3 |
damping | Requirements.LinearAnalysis.EigenvalueCheck | every mode damped to at least 0.5: violated, margin (0.2 - 0.5) / 0.1 = -3 |
frequency | Requirements.LinearAnalysis.EigenvalueCheck | every mode above 0.1 Hz at most 1 Hz: satisfied, margin (1 - 0.3183) / 0.1 = 6.817 |
outsideBand | Requirements.LinearAnalysis.EigenvalueCheck | no mode above 10 Hz: Undefined (untested), margin 0 |
timeConstant | Requirements.LinearAnalysis.EigenvalueCheck | the slowest mode within 3 s: satisfied (2.5 s), margin 0.5 / 0.5 = 1 |
region | Requirements.LinearAnalysis.EigenvaluesWithinRegion | the half-plane Re < -0.1 as a polygon: satisfied, margin 0.3 / 0.1 = 3 |