RelativeSpeedSensor
IconRelativeSpeedSensor
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
:
\[s_{rel} = flange_b.s - flange_a.s\]
The relative velocity, v_rel
, is then calculated as the time derivative of this relative displacement:
\[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:
\[flange_a.f = 0\]
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
Name | Description | Units |
---|---|---|
s_rel | Relative position of flange_b relative to flange_a | m |
Behavior
\[ \begin{align} 0 &= \mathtt{flange\_b.f}\left( t \right) + \mathtt{flange\_a.f}\left( t \right) \\ \mathtt{s\_rel}\left( t \right) &= \mathtt{flange\_b.s}\left( t \right) - \mathtt{flange\_a.s}\left( t \right) \\ \mathtt{v\_rel}\left( t \right) &= \frac{\mathrm{d} \mathtt{s\_rel}\left( t \right)}{\mathrm{d}t} \\ 0 &= \mathtt{flange\_a.f}\left( t \right) \end{align} \]
Source
# 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
# 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.
Related
- Examples
- Experiments
- Analyses
- Tests