Skip to content
LIBRARY
Examples.MatrixGain.md

Examples.MatrixGain ​

Usage ​

DiscreteComponents.Examples.MatrixGain(K=[[1.0, 0.0], [0.0, 1.0]])

Parameters: ​

NameDescriptionUnitsDefault value
ny–2
nu–2
K–[1.0 0.0; 0.0 1.0]

Connectors ​

  • y - This connector represents a real signal as an output from a component (RealOutput)

  • u - This connector represents a real signal as an input to a component (RealInput)

Behavior ​

Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"

Source ​

dyad
component MatrixGain
  y = [Dyad.RealOutput() for i in 1:ny] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  u = [Dyad.RealInput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter ny::Integer = 2
  structural parameter nu::Integer = 2
  parameter K::Real[ny, nu] = [[1.0, 0.0], [0.0, 1.0]]
relations
  y = K * u
end
Flattened Source
dyad
component MatrixGain
  y = [Dyad.RealOutput() for i in 1:ny] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  u = [Dyad.RealInput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter ny::Integer = 2
  structural parameter nu::Integer = 2
  parameter K::Real[ny, nu] = [[1.0, 0.0], [0.0, 1.0]]
relations
  y = K * u
metadata {}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses