Plant ​
Second-order linear system for testing control designs.
A linear dynamic system with second-order behavior that exhibits damped oscillations in response to inputs.
The system is described by the state-space representation:
where states x1 and x2 represent position and velocity in a mechanical system analogy.
This component extends from SISO
Usage ​
BlockComponents.Plant()
Connectors ​
u- This connector represents a real signal as an input to a component (RealInput)y- This connector represents a real signal as an output from a component (RealOutput)
Variables ​
| Name | Description | Units |
|---|---|---|
x1 | First state variable (position in mechanical analogy) | – |
x2 | Second state variable (velocity in mechanical analogy) | – |
Behavior ​
Source ​
"""
Second-order linear system for testing control designs.
A linear dynamic system with second-order behavior that exhibits damped oscillations in response to inputs.
The system is described by the state-space representation:math \begin{align} \dot{x}_1 &= x_2 MarkdownAST.LineBreak()
\dot{x}_2 &= -x_1 - 0.5x_2 + u MarkdownAST.LineBreak()
y &= 0.5x_1 + x_2 \end
where states `x1` and `x2` represent position and velocity in a mechanical system analogy.
"""
component Plant
extends SISO
"First state variable (position in mechanical analogy)"
variable x1::Real
"Second state variable (velocity in mechanical analogy)"
variable x2::Real
relations
der(x1) = x2
der(x2) = -x1 - 0.5 * x2 + u
y = 0.5 * x1 + x2
metadata {
"Dyad": {
"icons": {"default": "dyad://BlockComponents/SecondOrder.svg"},
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}]
}
}
endFlattened Source
"""
Second-order linear system for testing control designs.
A linear dynamic system with second-order behavior that exhibits damped oscillations in response to inputs.
The system is described by the state-space representation:math \begin{align} \dot{x}_1 &= x_2 MarkdownAST.LineBreak()
\dot{x}_2 &= -x_1 - 0.5x_2 + u MarkdownAST.LineBreak()
y &= 0.5x_1 + x_2 \end
where states `x1` and `x2` represent position and velocity in a mechanical system analogy.
"""
component Plant
"Input signal port"
u = RealInput() {
"Dyad": {
"placement": {
"icon": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0},
"diagram": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
}
}
}
"Output signal port"
y = RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0},
"diagram": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
}
}
}
"First state variable (position in mechanical analogy)"
variable x1::Real
"Second state variable (velocity in mechanical analogy)"
variable x2::Real
relations
der(x1) = x2
der(x2) = -x1 - 0.5 * x2 + u
y = 0.5 * x1 + x2
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://BlockComponents/SecondOrder.svg"}
}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses
Tests