RelativeAccelerationSensor
IconRelativeAccelerationSensor
Ideal sensor to measure the acceleration of flange_b
relative to flange_a
This component extends from PartialRelativeSensor
Usage
RelativeAccelerationSensor()
Connectors
flange_a
- (Flange
)flange_b
- (Flange
)a_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 |
v_rel | Relative velocity of flange_b relative to flange_a | m/s |
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} \\ \mathtt{a\_rel}\left( t \right) &= \frac{\mathrm{d} \mathtt{v\_rel}\left( t \right)}{\mathrm{d}t} \\ 0 &= \mathtt{flange\_a.f}\left( t \right) \end{align} \]
Source
# Ideal sensor to measure the acceleration of `flange_b` relative to `flange_a`
component RelativeAccelerationSensor
extends PartialRelativeSensor
# Relative acceleration of `flange_b` relative to `flange_a` as output signal
a_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
# Relative velocity of `flange_b` relative to `flange_a`
variable v_rel::Velocity
relations
s_rel = flange_b.s-flange_a.s
v_rel = der(s_rel)
a_rel = der(v_rel)
0 = flange_a.f
metadata {
"JuliaSim": {"icons": {"default": "jsml://TranslationalComponents/RelativeSensor.svg"}}
}
end
Flattened Source
# Ideal sensor to measure the acceleration of `flange_b` relative to `flange_a` component RelativeAccelerationSensor 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 acceleration of `flange_b` relative to `flange_a` as output signal a_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 # Relative velocity of `flange_b` relative to `flange_a` variable v_rel::Velocity relations 0 = flange_a.f+flange_b.f s_rel = flange_b.s-flange_a.s v_rel = der(s_rel) a_rel = der(v_rel) 0 = flange_a.f metadata { "JuliaSim": {"icons": {"default": "jsml://TranslationalComponents/RelativeSensor.svg"}} } end
Test Cases
Related
- Examples
- Experiments
- Analyses
- Tests