MatrixGain MatrixGain Icon

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

2-element Vector{Symbolics.Equation}:
 (y(t))[1] ~ K*(u(t))[1]
 (y(t))[2] ~ K*(u(t))[2]

Source

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
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