s$(instance)PositionSensor Icon

PositionSensor

Measures the absolute linear position of a mechanical translational flange.

This sensor provides the absolute translational position of its connection point. It inherits from PartialAbsoluteSensor, which defines a mechanical translational flange. The sensor's RealOutput signal, named s, directly reflects the position variable s associated with this flange. The fundamental behavior is captured by the equation:

\[s = flange.s\]

Here, the s on the left side of the equation is the sensor's output signal, and flange.s is the position variable of the connector inherited from PartialAbsoluteSensor.

PartialAbsoluteSensor

Usage

PositionSensor()

Connectors

  • flange - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)
  • s - This connector represents a real signal as an output from a component (RealOutput)

Behavior

\[ \begin{align} 0 &= \mathtt{flange.f}\left( t \right) \\ \mathtt{flange.s}\left( t \right) &= s\left( t \right) \end{align} \]

Source

# Measures the absolute linear position of a mechanical translational flange.
#
# This sensor provides the absolute translational position of its connection point.
# It inherits from `PartialAbsoluteSensor`, which defines a mechanical
# translational `flange`. The sensor's `RealOutput` signal, named `s`, directly
# reflects the position variable `s` associated with this `flange`.
# The fundamental behavior is captured by the equation:
# ```math
# s = flange.s
# ```
# Here, the `s` on the left side of the equation is the sensor's output signal,
# and `flange.s` is the position variable of the connector inherited from
# `PartialAbsoluteSensor`.
component PositionSensor
  extends PartialAbsoluteSensor
  # Output signal representing the measured absolute position
  s = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
relations
  flange.s = s
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/AbsoluteSensor.svg"}}
}
end
Flattened Source
# Measures the absolute linear position of a mechanical translational flange.
#
# This sensor provides the absolute translational position of its connection point.
# It inherits from `PartialAbsoluteSensor`, which defines a mechanical
# translational `flange`. The sensor's `RealOutput` signal, named `s`, directly
# reflects the position variable `s` associated with this `flange`.
# The fundamental behavior is captured by the equation:
# ```math
# s = flange.s
# ```
# Here, the `s` on the left side of the equation is the sensor's output signal,
# and `flange.s` is the position variable of the connector inherited from
# `PartialAbsoluteSensor`.
component PositionSensor
  # Mechanical flange connector through which the variable is sensed.
  flange = Flange() [{"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}]
  # Output signal representing the measured absolute position
  s = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
relations
  0 = flange.f
  flange.s = s
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/AbsoluteSensor.svg"}}
}
end


Test Cases

No test cases defined.