RelativePositionSensor IconRelativePositionSensor
Measures the ideal relative translational position between two mechanical flanges.
This component calculates the translational position of flange_b with respect to flange_a. It provides this relative position as an output signal s_rel. The sensor is considered ideal because it does not exert any forces on the flanges it connects to, meaning it does not influence the dynamics of the mechanical system. This is enforced by the equation flange_a.f = 0. The primary relationship is:
\[s_{rel} = flange_b.s - flange_a.s\]
where s_{rel} is the relative position, flange_b.s is the absolute position of flange_b, and flange_a.s is the absolute position of flange_a.
This component extends from PartialRelativeSensor
Usage
TranslationalComponents.RelativePositionSensor()
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)s_rel- This connector represents a real signal as an output from a component (RealOutput)
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) \\ 0 &= \mathtt{flange\_a.f}\left( t \right) \end{align} \]
Source
"""
Measures the ideal relative translational position between two mechanical flanges.
This component calculates the translational position of `flange_b` with respect to `flange_a`.
It provides this relative position as an output signal `s_rel`. The sensor is considered
ideal because it does not exert any forces on the flanges it connects to, meaning it
does not influence the dynamics of the mechanical system. This is enforced by the
equation `flange_a.f = 0`. The primary relationship is:math s{rel} = flangeb.s - flange_a.s
where `s_{rel}` is the relative position, `flange_b.s` is the absolute position of `flange_b`,
and `flange_a.s` is the absolute position of `flange_a`.
"""</span>
<span class="hljs-keyword">component</span> RelativePositionSensor
<span class="hljs-keyword">extends</span> <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/TranslationalComponents/types/PartialRelativeSensor.html">PartialRelativeSensor</a></span>
<span class="hljs-comment">"Relative position of `flange_b` relative to `flange_a` as output signal"</span>
<span class="hljs-symbol">s_rel</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/Dyad/connectors/RealOutput.html">RealOutput</a></span>() {
"Dyad": {
"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
}
}
<span class="hljs-keyword">relations</span>
s_rel = flange_b.s - flange_a.s
0 = flange_a.f
<span class="hljs-keyword">metadata</span> {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
<span class="hljs-keyword">end</span></code></pre>
Flattened Source
"""
Measures the ideal relative translational position between two mechanical flanges.
This component calculates the translational position of `flange_b` with respect to `flange_a`.
It provides this relative position as an output signal `s_rel`. The sensor is considered
ideal because it does not exert any forces on the flanges it connects to, meaning it
does not influence the dynamics of the mechanical system. This is enforced by the
equation `flange_a.f = 0`. The primary relationship is:math s{rel} = flangeb.s - flange_a.s
where `s_{rel}` is the relative position, `flange_b.s` is the absolute position of `flange_b`,
and `flange_a.s` is the absolute position of `flange_a`.
"""</span>
<span class="hljs-keyword">component</span> RelativePositionSensor
<span class="hljs-comment">"Negative connection flange of the sensor, often considered the reference point."</span>
<span class="hljs-symbol">flange_a</span> = <span>Flange</span>() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
<span class="hljs-comment">"Positive connection flange of the sensor, where the measurement is taken relative to flange_a."</span>
<span class="hljs-symbol">flange_b</span> = <span>Flange</span>() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
<span class="hljs-comment">"Relative position of `flange_b` relative to `flange_a` as output signal"</span>
<span class="hljs-symbol">s_rel</span> = <span>RealOutput</span>() {
"Dyad": {
"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
}
}
<span class="hljs-keyword">relations</span>
0 = flange_a.f + flange_b.f
s_rel = flange_b.s - flange_a.s
0 = flange_a.f
<span class="hljs-keyword">metadata</span> {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
<span class="hljs-keyword">end</span></code></pre>
Test Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests