Sensors.RelativeSpeedSensor
Deprecated alias for RelativeVelocitySensor.
RelativeSpeedSensor has been renamed to RelativeVelocitySensor to align the Translational library naming with the Dyad mechanical libraries. This alias is retained so existing models keep working; use TranslationalComponents.Sensors.RelativeVelocitySensor in new models.
This component extends from TranslationalComponents.Sensors.RelativeVelocitySensor
Usage
TranslationalComponents.Sensors.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
using TranslationalComponents #hide
using ModelingToolkit #hide
@named sys = TranslationalComponents.Sensors.RelativeSpeedSensor() #hide
let eqs = full_equations(sys); Base.length(eqs) > 25 ? nothing : eqs end #hide<< @example-block not executed in draft mode >>Source
"""
Deprecated alias for `RelativeVelocitySensor`.
`RelativeSpeedSensor` has been renamed to `RelativeVelocitySensor` to align the Translational
library naming with the Dyad mechanical libraries. This alias is retained so existing models
keep working; use `TranslationalComponents.Sensors.RelativeVelocitySensor` in new models.
"""
component RelativeSpeedSensor
extends TranslationalComponents.Sensors.RelativeVelocitySensor
relations
metadata {
"Dyad": {
"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"},
"deprecated": {
"message": "`RelativeSpeedSensor` has been renamed to `RelativeVelocitySensor`. Use `TranslationalComponents.Sensors.RelativeVelocitySensor` instead.",
"hotfix": {
"action": "replace",
"value": "TranslationalComponents.Sensors.RelativeVelocitySensor"
}
}
}
}
endFlattened Source
"""
Deprecated alias for `RelativeVelocitySensor`.
`RelativeSpeedSensor` has been renamed to `RelativeVelocitySensor` to align the Translational
library naming with the Dyad mechanical libraries. This alias is retained so existing models
keep working; use `TranslationalComponents.Sensors.RelativeVelocitySensor` in new models.
"""
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(units = "m/s") {
"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"},
"deprecated": {
"message": "`RelativeSpeedSensor` has been renamed to `RelativeVelocitySensor`. Use `TranslationalComponents.Sensors.RelativeVelocitySensor` instead.",
"hotfix": {
"action": "replace",
"value": "TranslationalComponents.Sensors.RelativeVelocitySensor"
}
}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses