RelativeAccelerationSensor
IconRelativeAccelerationSensor
Ideal sensor measuring the relative acceleration between two translational flanges.
This sensor determines the acceleration of flange_b
with respect to flange_a
(where s_a
and s_b
in the equations below refer to flange_a.s
and flange_b.s
respectively). It operates by first calculating the relative displacement, $s_{rel} = s_b - s_a$. This relative displacement is then differentiated with respect to time to obtain the relative velocity, $v_{rel} = \frac{d(s_{rel})}{dt}$. Finally, the relative velocity is differentiated with respect to time to yield the relative acceleration, $a_{rel} = \frac{d(v_{rel})}{dt}$. The sensor is ideal, meaning it does not exert any force on the connected components; specifically, the force at flange_a
is defined as zero, ensuring no mechanical load is introduced by the sensor.
Usage
RelativeAccelerationSensor()
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
)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 measuring the relative acceleration between two translational flanges.
#
# This sensor determines the acceleration of `flange_b` with respect to `flange_a`
# (where `s_a` and `s_b` in the equations below refer to `flange_a.s` and `flange_b.s`
# respectively). It operates by first calculating the relative displacement,
# $s_{rel} = s_b - s_a$. This relative displacement is then differentiated with
# respect to time to obtain the relative velocity, $v_{rel} = \frac{d(s_{rel})}{dt}$.
# Finally, the relative velocity is differentiated with respect to time to yield the
# relative acceleration, $a_{rel} = \frac{d(v_{rel})}{dt}$. The sensor is ideal,
# meaning it does not exert any force on the connected components; specifically, the force at
# `flange_a` is defined as zero, ensuring no mechanical load is introduced by the sensor.
component RelativeAccelerationSensor
extends PartialRelativeSensor
# Relative acceleration of `flange_b` relative to `flange_a` as output signal
a_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
# 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 {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end
Flattened Source
# Ideal sensor measuring the relative acceleration between two translational flanges.
#
# This sensor determines the acceleration of `flange_b` with respect to `flange_a`
# (where `s_a` and `s_b` in the equations below refer to `flange_a.s` and `flange_b.s`
# respectively). It operates by first calculating the relative displacement,
# $s_{rel} = s_b - s_a$. This relative displacement is then differentiated with
# respect to time to obtain the relative velocity, $v_{rel} = \frac{d(s_{rel})}{dt}$.
# Finally, the relative velocity is differentiated with respect to time to yield the
# relative acceleration, $a_{rel} = \frac{d(v_{rel})}{dt}$. The sensor is ideal,
# meaning it does not exert any force on the connected components; specifically, the force at
# `flange_a` is defined as zero, ensuring no mechanical load is introduced by the sensor.
component RelativeAccelerationSensor
# 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 acceleration of `flange_b` relative to `flange_a` as output signal
a_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
# 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 {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end
Test Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests