Skip to content
RelativeSpeedSensor.md

RelativeSpeedSensor

Ideal sensor measuring the relative translational velocity between two mechanical flanges.

This component computes the relative translational velocity between two mechanical flanges, flange_a and flange_b. It first determines the relative displacement, s_rel, by subtracting the absolute position of flange_a from the absolute position of flange_b:

srel=flangeb.sflangea.s

The relative velocity, v_rel, is then calculated as the time derivative of this relative displacement:

vrel=d(srel)dt

The sensor is ideal, meaning it does not exert any force on the connected flanges, which is enforced by the equation:

flangea.f=0

PartialRelativeSensor

Usage

RelativeSpeedSensor()

Connectors

  • flange_a - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

  • flange_b - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

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

Variables

NameDescriptionUnits
s_relRelative position of flange_b relative to flange_am

Behavior

0=flange_b.f(t)+flange_a.f(t)s_rel(t)=flange_b.s(t)flange_a.s(t)v_rel(t)=ds_rel(t)dt0=flange_a.f(t)

Source

dyad
# Ideal sensor measuring the relative translational velocity between two mechanical flanges.
#
# This component computes the relative translational velocity between two mechanical flanges, `flange_a` and `flange_b`.
# It first determines the relative displacement, `s_rel`, by subtracting the absolute position of `flange_a` from the absolute position of `flange_b`:
#
# ```math
# s_{rel} = flange_b.s - flange_a.s
# ```
#
# The relative velocity, `v_rel`, is then calculated as the time derivative of this relative displacement:
#
# ```math
# v_{rel} = \frac{d(s_{rel})}{dt}
# ```
#
# The sensor is ideal, meaning it does not exert any force on the connected flanges, which is enforced by the equation:
#
# ```math
# flange_a.f = 0
# ```
component RelativeSpeedSensor
  extends PartialRelativeSensor
  # Relative velocity of `flange_b` relative to `flange_a` as output signal
  v_rel = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
  # Relative position of `flange_b` relative to `flange_a`
  variable s_rel::Distance
relations
  s_rel = flange_b.s - flange_a.s
  v_rel = der(s_rel)
  0 = flange_a.f
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end
Flattened Source
dyad
# Ideal sensor measuring the relative translational velocity between two mechanical flanges.
#
# This component computes the relative translational velocity between two mechanical flanges, `flange_a` and `flange_b`.
# It first determines the relative displacement, `s_rel`, by subtracting the absolute position of `flange_a` from the absolute position of `flange_b`:
#
# ```math
# s_{rel} = flange_b.s - flange_a.s
# ```
#
# The relative velocity, `v_rel`, is then calculated as the time derivative of this relative displacement:
#
# ```math
# v_{rel} = \frac{d(s_{rel})}{dt}
# ```
#
# The sensor is ideal, meaning it does not exert any force on the connected flanges, which is enforced by the equation:
#
# ```math
# flange_a.f = 0
# ```
component RelativeSpeedSensor
  # Negative connection flange of the sensor, often considered the reference point.
  flange_a = Flange() [{"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}]
  # Positive connection flange of the sensor, where the measurement is taken relative to flange_a.
  flange_b = Flange() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
  # Relative velocity of `flange_b` relative to `flange_a` as output signal
  v_rel = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
  # Relative position of `flange_b` relative to `flange_a`
  variable s_rel::Distance
relations
  0 = flange_a.f + flange_b.f
  s_rel = flange_b.s - flange_a.s
  v_rel = der(s_rel)
  0 = flange_a.f
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end


Test Cases

No test cases defined.

Layout Switch

Adjust the layout style of VitePress to adapt to different reading needs and screens.

Expand all
The sidebar and content area occupy the entire width of the screen.
Expand sidebar with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Expand all with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Original width
The original layout width of VitePress

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.

Spotlight

Highlight the line where the mouse is currently hovering in the content to optimize for users who may have reading and focusing difficulties.

ONOn
Turn on Spotlight.
OFFOff
Turn off Spotlight.