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:
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.
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
using TranslationalComponents #hide
using ModelingToolkit #hide
@named sys = PositionSensor() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>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"}}
}
endFlattened 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"}}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses
Tests