Skip to content
LIBRARY
PlanarMechanics.AbsoluteVelocity.md

PlanarMechanics.AbsoluteVelocity

Measures absolute velocity and angular velocity of the origin of a frame connector.

Composes BasicAbsolutePosition (world) + differentiation + TransformAbsoluteVector to resolve the result in any supported frame. This is a sensor component: it reads kinematic quantities without exerting forces.

Usage

MultibodyComponents.PlanarMechanics.AbsoluteVelocity()

Parameters:

NameDescriptionUnitsDefault value
resolve_in_frameMultibodyComponents.ResolveInFrame.FrameA()

Connectors

  • frame_a - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

  • frame_resolve - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

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

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

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

Variables

NameDescriptionUnits
pxm
pym
pphirad

Behavior

[px(t)=pos.x(t)py(t)=pos.y(t)pphi(t)=pos.phi(t)transform.xin(t)=dpx(t)dttransform.yin(t)=dpy(t)dttransform.phiin(t)=dpphi(t)dtvx(t)=transform.xout(t)vy(t)=transform.yout(t)w(t)=transform.phiout(t)connect(framea,pos+framea)connect(framea,transform+framea)pos.framea.fx(t)=0pos.framea.fy(t)=0pos.framea.tau(t)=0arrayliteral([3],pos.x(t),pos.y(t),pos.phi(t))=pos.r(t)pos.r(t)=arrayliteral([3],pos.framea.x(t),pos.framea.y(t),pos.framea.phi(t))transform.framea.fx(t)=0transform.framea.fy(t)=0transform.framea.tau(t)=0transform.R1(t)=[100001000010]transform.rtemp(t)=transform.R1(t)arrayliteral([4],transform.xin(t),transform.yin(t),transform.phiin(t),1)transform.rotationmatrix(t)=arrayliteral([33],cos(transform.framea.phi(t)),sin(transform.framea.phi(t)),0,sin(transform.framea.phi(t)),cos(transform.framea.phi(t)),0,0,0,1)transform.r(t)=transform.rotationmatrix(t)transform.rtemp(t)arrayliteral([3],transform.xout(t),transform.yout(t),transform.phiout(t))=transform.r(t)]

Source

dyad
"""
Measures absolute velocity and angular velocity of the origin of a frame connector.

Composes BasicAbsolutePosition (world) + differentiation + TransformAbsoluteVector
to resolve the result in any supported frame. This is a sensor component: it reads
kinematic quantities without exerting forces.
"""
component AbsoluteVelocity
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame2D() if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  "x velocity"
  v_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 970, "y1": 140, "x2": 1070, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  "y velocity"
  v_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "angular velocity"
  w = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 740, "x2": 1060, "y2": 840, "rot": 0}
      },
      "tags": []
    }
  }
  pos = BasicAbsolutePosition(resolve_in_frame = MultibodyComponents.ResolveInFrame.World())
  transform = TransformAbsoluteVector(frame_in = MultibodyComponents.ResolveInFrame.World(), frame_out = resolve_in_frame) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 630, "x2": 550, "y2": 730, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::MultibodyComponents.ResolveInFrame = MultibodyComponents.ResolveInFrame.FrameA()
  variable px::Length
  variable py::Length
  variable pphi::Angle
relations
  connect(frame_a, pos.frame_a)
  connect(frame_a, transform.frame_a)
  if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve()
    connect(frame_resolve, transform.frame_resolve)
  end
  px = pos.x
  py = pos.y
  pphi = pos.phi
  transform.x_in = der(px)
  transform.y_in = der(py)
  transform.phi_in = der(pphi)
  v_x = transform.x_out
  v_y = transform.y_out
  w = transform.phi_out
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/AbsoluteVelocity.svg"}}
}
end
Flattened Source
dyad
"""
Measures absolute velocity and angular velocity of the origin of a frame connector.

Composes BasicAbsolutePosition (world) + differentiation + TransformAbsoluteVector
to resolve the result in any supported frame. This is a sensor component: it reads
kinematic quantities without exerting forces.
"""
component AbsoluteVelocity
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame2D() if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  "x velocity"
  v_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 970, "y1": 140, "x2": 1070, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  "y velocity"
  v_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "angular velocity"
  w = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 740, "x2": 1060, "y2": 840, "rot": 0}
      },
      "tags": []
    }
  }
  pos = BasicAbsolutePosition(resolve_in_frame = MultibodyComponents.ResolveInFrame.World())
  transform = TransformAbsoluteVector(frame_in = MultibodyComponents.ResolveInFrame.World(), frame_out = resolve_in_frame) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 630, "x2": 550, "y2": 730, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::MultibodyComponents.ResolveInFrame = MultibodyComponents.ResolveInFrame.FrameA()
  variable px::Length
  variable py::Length
  variable pphi::Angle
relations
  connect(frame_a, pos.frame_a)
  connect(frame_a, transform.frame_a)
  if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve()
    connect(frame_resolve, transform.frame_resolve)
  end
  px = pos.x
  py = pos.y
  pphi = pos.phi
  transform.x_in = der(px)
  transform.y_in = der(py)
  transform.phi_in = der(pphi)
  v_x = transform.x_out
  v_y = transform.y_out
  w = transform.phi_out
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/AbsoluteVelocity.svg"}}
}
end


Test Cases

No test cases defined.