SecondOrder model

Requirements.Examples.Elementary.LinearAnalysis.SecondOrder  · source

Icon of SecondOrder

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

NameTypeDescription
fileName parameterStringA = [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 parameterStringthe URI resolved (folded at translation)
A[…] parameterRealthe 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

NameTypeDescription
realPartRequirements.LinearAnalysis.EigenvalueCheckevery real part below -0.1 1/s: satisfied, margin (0.4 - 0.1) / 0.1 = 3
dampingRequirements.LinearAnalysis.EigenvalueCheckevery mode damped to at least 0.5: violated, margin (0.2 - 0.5) / 0.1 = -3
frequencyRequirements.LinearAnalysis.EigenvalueCheckevery mode above 0.1 Hz at most 1 Hz: satisfied, margin (1 - 0.3183) / 0.1 = 6.817
outsideBandRequirements.LinearAnalysis.EigenvalueCheckno mode above 10 Hz: Undefined (untested), margin 0
timeConstantRequirements.LinearAnalysis.EigenvalueCheckthe slowest mode within 3 s: satisfied (2.5 s), margin 0.5 / 0.5 = 1
regionRequirements.LinearAnalysis.EigenvaluesWithinRegionthe half-plane Re < -0.1 as a polygon: satisfied, margin 0.3 / 0.1 = 3