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:
The relative velocity, v_rel, is then calculated as the time derivative of this relative displacement:
The sensor is ideal, meaning it does not exert any force on the connected flanges, which is enforced by the equation:
This component extends from PartialRelativeSensor
Usage ​
TranslationalComponents.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 ​
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})}
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"}}
}
endFlattened 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})}
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"}}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses
Tests