Sources.Speed
Forced movement of a flange according to a reference speed.
The input signal v_ref defines the reference speed in [m/s]. The flange 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 flange. For filtering, a first order filter is used:
math a = (v_{ref} - v) \\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 TranslationalComponents.Interfaces.PartialElementaryOneFlangeAndSupport2
Usage
TranslationalComponents.Sources.Speed()
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
ref_type | Type of reference signal handling | – | Translation....Filtered() |
Connectors
flange- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)support- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)v_ref- This connector represents a real signal as an input to a component (RealInput)
Variables
| Name | Description | Units |
|---|---|---|
s | Distance between flange and support (= flange.s - support.s) | m |
v | Velocity of flange with respect to support | m/s |
a | Acceleration of flange with respect to support | m/s2 |
Behavior
using TranslationalComponents #hide
using ModelingToolkit #hide
@named sys = TranslationalComponents.Sources.Speed() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source
"""
Forced movement of a flange according to a reference speed.
The input signal `v_ref` defines the reference speed in [m/s]. The flange 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 flange. For filtering,
a first order filter is used:
```math
a = (v_{ref} - v) \\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 Speed extends TranslationalComponents.Interfaces.PartialElementaryOneFlangeAndSupport2(s(statePriority = 50) = missing initial 0.0) "Reference speed of flange as input signal" v_ref = RealInput(units = "m/s") {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}} "Type of reference signal handling" structural parameter ref_type::TranslationalComponents.Sources.ReferenceType = TranslationalComponents.Sources.ReferenceType.Filtered() "Velocity of flange with respect to support" variable v::Velocity(statePriority = 50) "Acceleration of flange with respect to support" variable a::Acceleration relations v = der(s) switch ref_type case Exact v = v_ref a = 0 case Filtered initial v = v_ref a = der(v) a = (v_ref - v) * 2 * π * getproperty(ref_type, Symbol("f_crit")) end metadata {"Dyad": {"icons": {"default": "dyad://TranslationalComponents/Speed.svg"}}} end
<details>
<summary>Flattened Source</summary>
```dyad
"""
Forced movement of a flange according to a reference speed.
The input signal `v_ref` defines the reference speed in [m/s]. The flange 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 flange. For filtering,
a first order filter is used:
```math
a = (v_{ref} - v) \\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 Speed "Flange of component" flange = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}} "Support/housing of component" support = Flange() {"Dyad": {"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050}}}} "Distance between flange and support (= flange.s - support.s)" variable s::Length "Reference speed of flange as input signal" v_ref = RealInput(units = "m/s") {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}} "Type of reference signal handling" structural parameter ref_type::TranslationalComponents.Sources.ReferenceType = TranslationalComponents.Sources.ReferenceType.Filtered() "Velocity of flange with respect to support" variable v::Velocity(statePriority = 50) "Acceleration of flange with respect to support" variable a::Acceleration relations s = flange.s - support.s support.f = -flange.f v = der(s) switch ref_type case Exact v = v_ref a = 0 case Filtered initial v = v_ref a = der(v) a = (v_ref - v) * 2 * π * getproperty(ref_type, Symbol("f_crit")) end metadata {"Dyad": {"icons": {"default": "dyad://TranslationalComponents/Speed.svg"}}} end
</details>
<br></br>
## Test Cases {#Test-Cases}
No test cases defined.
## Related {#Related}
- Examples
- Experiments
- Analyses
- Tests
- [`AllComponents`](Sources.Speed.md)
- [`Fixed`](Sources.Speed.md)
- [`Mass`](Sources.Speed.md)
- [`Sine`](Sources.Speed.md)
- [`Speed`](Sources.Speed.md)
- [`Speed`](Sources.Speed.md)