Skip to content
Plant.md

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:

x˙1=x2x˙2=−x1−0.5x2+uy=0.5x1+x2

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 ​

NameDescriptionUnits
x1First state variable (position in mechanical analogy)–
x2Second state variable (velocity in mechanical analogy)–

Behavior ​

dx1(t)dt=x2(t)dx2(t)dt=u(t)−x1(t)−0.5x2(t)y(t)=0.5x1(t)+x2(t)

Source ​

dyad
"""
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}]
  }
}
end
Flattened Source
dyad
"""
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"}
  }
}
end


Test Cases ​

No test cases defined.