RelativeSpeedSensor
IconRelativeSpeedSensor
Ideal sensor to measure the velocity of flange_b
relative to flange_a
This component extends from PartialRelativeSensor
Usage
RelativeSpeedSensor()
Connectors
flange_a
- (Flange
)flange_b
- (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 to measure the velocity of `flange_b` relative to `flange_a`
component RelativeSpeedSensor
extends PartialRelativeSensor
# Relative velocity of `flange_b` relative to `flange_a` as output signal
v_rel = RealOutput() [{
"JuliaSim": {
"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 {
"JuliaSim": {"icons": {"default": "jsml://TranslationalComponents/RelativeSensor.svg"}}
}
end
Flattened Source
# Ideal sensor to measure the velocity of `flange_b` relative to `flange_a` component RelativeSpeedSensor flange_a = Flange() [{ "JuliaSim": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}} }] flange_b = Flange() [{ "JuliaSim": {"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() [{ "JuliaSim": { "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 { "JuliaSim": {"icons": {"default": "jsml://TranslationalComponents/RelativeSensor.svg"}} } end
Test Cases
Related
- Examples
- Experiments
- Analyses
- Tests