Skip to content
LIBRARY
PrescribedAcceleration.md

PrescribedAcceleration

Prescribed acceleration of frame_b via input connectors.

The absolute acceleration of frame_b is driven by the three real inputs a_x, a_y, a_z, resolved in the world frame. Velocity and position are obtained by integrating the acceleration inputs, starting from v_start and r_start respectively.

When fixed_orientation is true, the orientation is locked to the identity (world frame). When false, no orientation constraint is imposed and no torque is applied — orientation must be determined by connected components.

Usage

MultibodyComponents.PrescribedAcceleration(render=true, r_start=[0, 0, 0], v_start=[0, 0, 0])

Parameters:

NameDescriptionUnitsDefault value
fixed_orientationtrue
statePriority1
renderRender the component in animationstrue
r_startInitial position vector from world frame to frame_b, resolved in world framem[0, 0, 0]
v_startInitial absolute velocity of frame_b, resolved in world framem/s[0, 0, 0]

Connectors

  • frame_b - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

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

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

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

Variables

NameDescriptionUnits
rPosition vector from world frame to frame_b, resolved in world framem
vAbsolute velocity of frame_b, resolved in world framem/s
aAbsolute acceleration of frame_b, resolved in world framem/s2

Behavior

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

Source

dyad
"""
Prescribed acceleration of `frame_b` via input connectors.

The absolute acceleration of `frame_b` is driven by the three real inputs `a_x`, `a_y`, `a_z`,
resolved in the world frame. Velocity and position are obtained by integrating the
acceleration inputs, starting from `v_start` and `r_start` respectively.

When `fixed_orientation` is true, the orientation is locked to the identity
(world frame). When false, no orientation constraint is imposed and no
torque is applied — orientation must be determined by connected components.
"""
component PrescribedAcceleration
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  a_x = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 100, "x2": 50, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  a_y = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  a_z = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 780, "x2": 50, "y2": 880, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter fixed_orientation::Boolean = true
  structural parameter statePriority::Integer = 1
  "Render the component in animations"
  parameter render::Boolean = true
  "Initial position vector from world frame to frame_b, resolved in world frame"
  parameter r_start::Position[3] = [0, 0, 0]
  "Initial absolute velocity of frame_b, resolved in world frame"
  parameter v_start::Velocity[3] = [0, 0, 0]
  "Position vector from world frame to frame_b, resolved in world frame"
  variable r::Position(statePriority = statePriority, initial = r_start)[3]
  "Absolute velocity of frame_b, resolved in world frame"
  variable v::Velocity(statePriority = statePriority, initial = v_start)[3]
  "Absolute acceleration of frame_b, resolved in world frame"
  variable a::Acceleration[3]
relations
  a = [a_x, a_y, a_z]
  frame_b.r_0 = r
  der(r) = v
  der(v) = a
  if fixed_orientation
    frame_b.R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
  else
    frame_b.tau = [0, 0, 0]
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/PrescribedAcceleration.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Prescribed acceleration of `frame_b` via input connectors.

The absolute acceleration of `frame_b` is driven by the three real inputs `a_x`, `a_y`, `a_z`,
resolved in the world frame. Velocity and position are obtained by integrating the
acceleration inputs, starting from `v_start` and `r_start` respectively.

When `fixed_orientation` is true, the orientation is locked to the identity
(world frame). When false, no orientation constraint is imposed and no
torque is applied — orientation must be determined by connected components.
"""
component PrescribedAcceleration
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  a_x = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 100, "x2": 50, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  a_y = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  a_z = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 780, "x2": 50, "y2": 880, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter fixed_orientation::Boolean = true
  structural parameter statePriority::Integer = 1
  "Render the component in animations"
  parameter render::Boolean = true
  "Initial position vector from world frame to frame_b, resolved in world frame"
  parameter r_start::Position[3] = [0, 0, 0]
  "Initial absolute velocity of frame_b, resolved in world frame"
  parameter v_start::Velocity[3] = [0, 0, 0]
  "Position vector from world frame to frame_b, resolved in world frame"
  variable r::Position(statePriority = statePriority, initial = r_start)[3]
  "Absolute velocity of frame_b, resolved in world frame"
  variable v::Velocity(statePriority = statePriority, initial = v_start)[3]
  "Absolute acceleration of frame_b, resolved in world frame"
  variable a::Acceleration[3]
relations
  a = [a_x, a_y, a_z]
  frame_b.r_0 = r
  der(r) = v
  der(v) = a
  if fixed_orientation
    frame_b.R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
  else
    frame_b.tau = [0, 0, 0]
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/PrescribedAcceleration.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.