Sources.Position
Forced movement of a spline according to a reference angle signal.
The input signal phi_ref defines the reference angle in [rad]. The spline is forced to move relative to the support connector according to this reference motion. The parameter ref_type selects between two modes:
Exact: The reference angle is treated exactly. This is only possible if the input signal is defined by an analytical function which can be differentiated at least twice.
Filtered (default): The reference angle is filtered and the second derivative of the filtered curve is used to compute the reference acceleration of the spline. For filtering, a second order Bessel filter is used. The critical frequency
f_critin [Hz] should be selected higher than the essential low frequencies in the signal.math \\frac{bf}{w_{crit}^2} \\frac{d^2\\phi}{dt^2} + \\frac{af}{w_{crit}} \\frac{d\\phi}{dt} + \\phi = \\phi_{ref}
This component extends from RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport
Usage
RotationalComponents.Sources.Position(a_f=1.3617, b_f=0.6180)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
ref_type | Type of reference signal handling | – | RotationalC....Filtered() |
Connectors
spline- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)support- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)phi_ref- This connector represents a real signal as an input to a component (RealInput)
Variables
| Name | Description | Units |
|---|---|---|
phi_support | Absolute angle of the support spline | rad |
phi | Rotation angle of spline with respect to support | rad |
w | Angular velocity of spline with respect to support | rad/s |
a | Angular acceleration of spline with respect to support | rad/s2 |
Behavior
using RotationalComponents #hide
using ModelingToolkit #hide
@named sys = RotationalComponents.Sources.Position() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source
"""
Forced movement of a spline according to a reference angle signal.
The input signal `phi_ref` defines the reference angle in [rad]. The spline is forced to move
relative to the support connector according to this reference motion. The parameter `ref_type`
selects between two modes:
1. **Exact**: The reference angle is treated exactly. This is only possible if
the input signal is defined by an analytical function which can be differentiated at
least twice.
2. **Filtered** (default): The reference angle is filtered and the second derivative of the
filtered curve is used to compute the reference acceleration of the spline. For filtering,
a second order Bessel filter is used. The critical frequency `f_crit` in [Hz] should be
selected higher than the essential low frequencies in the signal.
```math
\\frac{bf}{w_{crit}^2} \\frac{d^2\\phi}{dt^2} + \\frac{af}{w_{crit}} \\frac{d\\phi}{dt} + \\phi = \\phi_{ref}""" component Position extends RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport "Reference angle of spline with respect to support as input signal" phi_ref = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}} "Type of reference signal handling" structural parameter ref_type::RotationalComponents.Sources.ReferenceType = RotationalComponents.Sources.ReferenceType.Filtered() "s-coefficient of the second order Bessel filter" final parameter a_f::Real = 1.3617 "s²-coefficient of the second order Bessel filter" final parameter b_f::Real = 0.6180 "Rotation angle of spline with respect to support" variable phi::Angle "Angular velocity of spline with respect to support" variable w::AngularVelocity "Angular acceleration of spline with respect to support" variable a::AngularAcceleration relations phi = spline.phi - phi_support switch ref_type case Exact phi = phi_ref w = 0 a = 0 case Filtered initial phi = phi_ref w = der(phi) a = der(w) a = ((phi_ref - phi) * 2 * π * getproperty(ref_type, Symbol("f_crit")) - a_f * w) * (2 * π * getproperty(ref_type, Symbol("f_crit")) / b_f) end metadata { "Dyad": {"icons": {"default": "dyad://RotationalComponents/Pos-Speed-Acc-Move.svg"}} } end
<details>
<summary>Flattened Source</summary>
```dyad
"""
Forced movement of a spline according to a reference angle signal.
The input signal `phi_ref` defines the reference angle in [rad]. The spline is forced to move
relative to the support connector according to this reference motion. The parameter `ref_type`
selects between two modes:
1. **Exact**: The reference angle is treated exactly. This is only possible if
the input signal is defined by an analytical function which can be differentiated at
least twice.
2. **Filtered** (default): The reference angle is filtered and the second derivative of the
filtered curve is used to compute the reference acceleration of the spline. For filtering,
a second order Bessel filter is used. The critical frequency `f_crit` in [Hz] should be
selected higher than the essential low frequencies in the signal.
```math
\\frac{bf}{w_{crit}^2} \\frac{d^2\\phi}{dt^2} + \\frac{af}{w_{crit}} \\frac{d\\phi}{dt} + \\phi = \\phi_{ref}""" component Position "Primary rotational shaft spline connector" spline = Spline() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}} "Support spline connector" support = Spline() { "Dyad": { "placement": {"icon": {"iconName": "support", "x1": 450, "y1": 950, "x2": 550, "y2": 1050}} } } "Absolute angle of the support spline" variable phi_support::Angle "Reference angle of spline with respect to support as input signal" phi_ref = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}} "Type of reference signal handling" structural parameter ref_type::RotationalComponents.Sources.ReferenceType = RotationalComponents.Sources.ReferenceType.Filtered() "s-coefficient of the second order Bessel filter" final parameter a_f::Real = 1.3617 "s²-coefficient of the second order Bessel filter" final parameter b_f::Real = 0.6180 "Rotation angle of spline with respect to support" variable phi::Angle "Angular velocity of spline with respect to support" variable w::AngularVelocity "Angular acceleration of spline with respect to support" variable a::AngularAcceleration relations support.phi = phi_support support.tau = -spline.tau phi = spline.phi - phi_support switch ref_type case Exact phi = phi_ref w = 0 a = 0 case Filtered initial phi = phi_ref w = der(phi) a = der(w) a = ((phi_ref - phi) * 2 * π * getproperty(ref_type, Symbol("f_crit")) - a_f * w) * (2 * π * getproperty(ref_type, Symbol("f_crit")) / b_f) end metadata { "Dyad": {"icons": {"default": "dyad://RotationalComponents/Pos-Speed-Acc-Move.svg"}} } end
</details>
<br></br>
## Test Cases {#Test-Cases}
No test cases defined.
## Related {#Related}
- Examples
- Experiments
- Analyses
- Tests
- [`AllComponents`](Sources.Position.md)
- [`Fixed`](Sources.Position.md)
- [`Inertia`](Sources.Position.md)
- [`Position`](Sources.Position.md)
- [`Position`](Sources.Position.md)
- [`Sine`](Sources.Position.md)