Sources.SpeedSource
Forced movement of a spline according to a reference angular velocity signal.
The input signal w_ref defines the reference angular velocity in [rad/s]. 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 speed is treated exactly. This is only possible if the input signal is defined by an analytical function which can be differentiated at least once.
Filtered (default): The reference speed is filtered and the first derivative of the filtered curve is used to compute the reference acceleration of the spline. For filtering, a first order filter is used:
math a = (w_{ref} - w) \\cdot w_{crit}wherew_crit = 2π f_critis the critical angular frequency. The critical frequencyf_critshould be selected higher than the essential low frequencies in the input signal.
This component extends from RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport
Usage
RotationalComponents.Sources.SpeedSource()
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)w_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.SpeedSource() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source
"""
Forced movement of a spline according to a reference angular velocity signal.
The input signal `w_ref` defines the reference angular velocity in [rad/s]. 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 speed is treated exactly. This is only possible if
the input signal is defined by an analytical function which can be differentiated at
least once.
2. **Filtered** (default): The reference speed is filtered and the first derivative of the
filtered curve is used to compute the reference acceleration of the spline. For filtering,
a first order filter is used:
```math
a = (w_{ref} - w) \\cdot w_{crit}where w_crit = 2π f_crit is the critical angular frequency. The critical frequency f_crit should be selected higher than the essential low frequencies in the input signal. """ component SpeedSource extends RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport "Reference angular velocity of spline with respect to support as input signal" w_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() "Rotation angle of spline with respect to support" variable phi::Angle(statePriority = 10) "Angular velocity of spline with respect to support" variable w::AngularVelocity(statePriority = 10) "Angular acceleration of spline with respect to support" variable a::AngularAcceleration relations phi = spline.phi - phi_support w = der(phi) switch ref_type case Exact w = w_ref a = 0 case Filtered initial w = w_ref a = der(w) a = (w_ref - w) * 2 * π * getproperty(ref_type, Symbol("f_crit")) 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 angular velocity signal.
The input signal `w_ref` defines the reference angular velocity in [rad/s]. 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 speed is treated exactly. This is only possible if
the input signal is defined by an analytical function which can be differentiated at
least once.
2. **Filtered** (default): The reference speed is filtered and the first derivative of the
filtered curve is used to compute the reference acceleration of the spline. For filtering,
a first order filter is used:
```math
a = (w_{ref} - w) \\cdot w_{crit}where w_crit = 2π f_crit is the critical angular frequency. The critical frequency f_crit should be selected higher than the essential low frequencies in the input signal. """ component SpeedSource "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 angular velocity of spline with respect to support as input signal" w_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() "Rotation angle of spline with respect to support" variable phi::Angle(statePriority = 10) "Angular velocity of spline with respect to support" variable w::AngularVelocity(statePriority = 10) "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 w = der(phi) switch ref_type case Exact w = w_ref a = 0 case Filtered initial w = w_ref a = der(w) a = (w_ref - w) * 2 * π * getproperty(ref_type, Symbol("f_crit")) 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.SpeedSource.md)
- [`Speed`](Sources.SpeedSource.md)
- [`Torque2`](Sources.SpeedSource.md)