RelativeAngleSensorRelativeAngleSensor Icon

RelativeAngleSensor

Ideal sensor to measure the relative angle between two splines.

This component computes the difference between the angle of spline_b (denoted $\phib$) and the angle of `splinea(denoted \$\\phi_a\$). This difference is provided as the output signalphirel. It models an ideal sensor, ensuring it does not influence the dynamics of the connected mechanical system. This is achieved by enforcing that the torque exerted onsplinea` (denoted $\tau_a$) is zero. The governing equations are:

\[\\phi_{rel} = \\phi_b - \\phi_a\]

\[\tau_a = 0\]

This component extends from PartialRelativeSensor

Usage

RotationalComponents.RelativeAngleSensor()

Connectors

  • spline_a - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)
  • spline_b - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)
  • phi_rel - This connector represents a real signal as an output from a component (RealOutput)

Behavior

\[ \begin{align} 0 &= \mathtt{spline\_b.tau}\left( t \right) + \mathtt{spline\_a.tau}\left( t \right) \\ \mathtt{phi\_rel}\left( t \right) &= \mathtt{spline\_b.phi}\left( t \right) - \mathtt{spline\_a.phi}\left( t \right) \\ 0 &= \mathtt{spline\_a.tau}\left( t \right) \end{align} \]

Source

"""
Ideal sensor to measure the relative angle between two splines.

This component computes the difference between the angle of `spline_b` (denoted \$\\phi_b\$)
and the angle of `spline_a` (denoted \$\\phi_a\$). This difference is provided as the output
signal `phi_rel`. It models an ideal sensor, ensuring it does not influence the
dynamics of the connected mechanical system. This is achieved by enforcing that the
torque exerted on `spline_a` (denoted \$\tau_a\$) is zero.
The governing equations are:

math \phi{rel} = \phib - \phi_a

math \tau_a = 0

"""</span>
<span class="hljs-keyword">component</span> RelativeAngleSensor
&nbsp;&nbsp;<span class="hljs-keyword">extends</span> <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/RotationalComponents/types/PartialRelativeSensor.html">PartialRelativeSensor</a></span>
&nbsp;&nbsp;<span class="hljs-comment">"Relative angle between two splines as output signal"</span>
&nbsp;&nbsp;<span class="hljs-symbol">phi_rel</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/Dyad/connectors/RealOutput.html">RealOutput</a></span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
<span class="hljs-keyword">relations</span>
&nbsp;&nbsp;phi_rel = spline_b.phi - spline_a.phi
&nbsp;&nbsp;0 = spline_a.tau
<span class="hljs-keyword">metadata</span> {
&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;"icons": {"default": "dyad://RotationalComponents/RelSensor-Angle-Vel-Acc.svg"}
&nbsp;&nbsp;}
}
<span class="hljs-keyword">end</span></code></pre>
Flattened Source
"""
Ideal sensor to measure the relative angle between two splines.

This component computes the difference between the angle of `spline_b` (denoted \$\\phi_b\$)
and the angle of `spline_a` (denoted \$\\phi_a\$). This difference is provided as the output
signal `phi_rel`. It models an ideal sensor, ensuring it does not influence the
dynamics of the connected mechanical system. This is achieved by enforcing that the
torque exerted on `spline_a` (denoted \$\tau_a\$) is zero.
The governing equations are:

math \phi{rel} = \phib - \phi_a

math \tau_a = 0

"""</span>
<span class="hljs-keyword">component</span> RelativeAngleSensor
&nbsp;&nbsp;<span class="hljs-comment">"Left spline connector for the sensor."</span>
&nbsp;&nbsp;<span class="hljs-symbol">spline_a</span> = <span>Spline</span>() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
&nbsp;&nbsp;<span class="hljs-comment">"Right spline connector for the sensor."</span>
&nbsp;&nbsp;<span class="hljs-symbol">spline_b</span> = <span>Spline</span>() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
&nbsp;&nbsp;<span class="hljs-comment">"Relative angle between two splines as output signal"</span>
&nbsp;&nbsp;<span class="hljs-symbol">phi_rel</span> = <span>RealOutput</span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
<span class="hljs-keyword">relations</span>
&nbsp;&nbsp;0 = spline_a.tau + spline_b.tau
&nbsp;&nbsp;phi_rel = spline_b.phi - spline_a.phi
&nbsp;&nbsp;0 = spline_a.tau
<span class="hljs-keyword">metadata</span> {
&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;"icons": {"default": "dyad://RotationalComponents/RelSensor-Angle-Vel-Acc.svg"}
&nbsp;&nbsp;}
}
<span class="hljs-keyword">end</span></code></pre>


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses