Skip to content
LIBRARY
LQRGain.md

LQRGain

Static multivariable (MIMO) gain block implementing y_out = K * u_in.

Maps ny scalar inputs to nu scalar outputs via a constant matrix K. Used as the static state-feedback law inside LQRControlledRotorCraft. The block is sign-agnostic; for negative feedback (u = -L*x) pass -L as K at instantiation.

Usage

MultibodyComponents.LQRGain(K=zeros(nu, ny))

Parameters:

NameDescriptionUnitsDefault value
nyNumber of inputs (measured signals)13
nuNumber of outputs (control channels)4
KFeedback gain matrix (nu × ny); rows index outputs, columns index inputszeros(nu, ny)

Connectors

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

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

Behavior

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

Source

dyad
"""
Static multivariable (MIMO) gain block implementing `y_out = K * u_in`.

Maps `ny` scalar inputs to `nu` scalar outputs via a constant matrix `K`. Used
as the static state-feedback law inside `LQRControlledRotorCraft`. The block is
sign-agnostic; for negative feedback (`u = -L*x`) pass `-L` as `K` at
instantiation.
"""
component LQRGain
  "Input signal vector (size ny, one connector per measured signal)"
  u_in = [RealInput() for i in 1:ny] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Output signal vector (size nu, one connector per control channel)"
  y_out = [RealOutput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Number of inputs (measured signals)"
  structural parameter ny::Integer = 13
  "Number of outputs (control channels)"
  structural parameter nu::Integer = 4
  "Feedback gain matrix (nu × ny); rows index outputs, columns index inputs"
  parameter K::Real[nu, ny] = zeros(nu, ny)
relations
  y_out = K * u_in
end
Flattened Source
dyad
"""
Static multivariable (MIMO) gain block implementing `y_out = K * u_in`.

Maps `ny` scalar inputs to `nu` scalar outputs via a constant matrix `K`. Used
as the static state-feedback law inside `LQRControlledRotorCraft`. The block is
sign-agnostic; for negative feedback (`u = -L*x`) pass `-L` as `K` at
instantiation.
"""
component LQRGain
  "Input signal vector (size ny, one connector per measured signal)"
  u_in = [RealInput() for i in 1:ny] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Output signal vector (size nu, one connector per control channel)"
  y_out = [RealOutput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Number of inputs (measured signals)"
  structural parameter ny::Integer = 13
  "Number of outputs (control channels)"
  structural parameter nu::Integer = 4
  "Feedback gain matrix (nu × ny); rows index outputs, columns index inputs"
  parameter K::Real[nu, ny] = zeros(nu, ny)
relations
  y_out = K * u_in
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses