AngleSensor
Measures the absolute rotational angle of a connected spline. This component models an ideal sensor that outputs the absolute angle of a spline. It directly reflects the phi
variable of an associated spline
object, which is assumed to be defined in the extended PartialAbsoluteSensor
or through a connection. The relationship defining the sensor's output is:
There are no dynamics, delays, or inaccuracies modeled in this sensor; it provides a perfect, instantaneous reading of the spline's angle.
This component extends from PartialAbsoluteSensor
Usage
AngleSensor()
Connectors
spline
- (Spline
)phi
- This connector represents a real signal as an output from a component (RealOutput
)
Behavior
Source
dyad
# Measures the absolute rotational angle of a connected spline.
# This component models an ideal sensor that outputs the absolute angle of a spline.
# It directly reflects the `phi` variable of an associated `spline` object, which is
# assumed to be defined in the extended `PartialAbsoluteSensor` or through a
# connection. The relationship defining the sensor's output is:
# ```math
# phi_{sensor} = spline.phi
# ```
# There are no dynamics, delays, or inaccuracies modeled in this sensor;
# it provides a perfect, instantaneous reading of the spline's angle.
component AngleSensor
extends PartialAbsoluteSensor
# Absolute angle of spline as output signal
phi = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
relations
phi = spline.phi
metadata {
"Dyad": {"icons": {"default": "dyad://RotationalComponents/SingleSplineSensor.svg"}}
}
end
Flattened Source
dyad
# Measures the absolute rotational angle of a connected spline.
# This component models an ideal sensor that outputs the absolute angle of a spline.
# It directly reflects the `phi` variable of an associated `spline` object, which is
# assumed to be defined in the extended `PartialAbsoluteSensor` or through a
# connection. The relationship defining the sensor's output is:
# ```math
# phi_{sensor} = spline.phi
# ```
# There are no dynamics, delays, or inaccuracies modeled in this sensor;
# it provides a perfect, instantaneous reading of the spline's angle.
component AngleSensor
# Spline of the shaft from which sensor information shall be measured
spline = Spline() [{"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}]
# Absolute angle of spline as output signal
phi = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
relations
0 = spline.tau
phi = spline.phi
metadata {
"Dyad": {"icons": {"default": "dyad://RotationalComponents/SingleSplineSensor.svg"}}
}
end
Test Cases
This is setup code, that must be run before each test case.
julia
using RotationalComponents
using ModelingToolkit, OrdinaryDiffEqDefault
using Plots
using CSV, DataFrames
snapshotsdir = joinpath(dirname(dirname(pathof(RotationalComponents))), "test", "snapshots")
"/home/actions-runner-10/.julia/packages/RotationalComponents/0VPxm/test/snapshots"
Related
Examples
Experiments
Analyses