---
url: /dyad/stable/stdlib/RotationalComponents/components/Sources.AccelerationSource.md
description: >-
  Dyad Sources.AccelerationSource docs.  Defines the forced angular movement of
  a spline based on an input acceleration signal.
---

# `Sources.AccelerationSource` {#Sources.AccelerationSource}

Defines the forced angular movement of a spline based on an input acceleration signal.

This component models a rotational element where the angular acceleration of a spline, relative to its support, is directly driven by an external input signal, `a_ref`. It calculates the relative angle `phi` between the spline and its support. The relative angular velocity `w` and angular acceleration `a` are then determined as the time derivatives of `phi`:

$$w = \frac{d\phi}{dt}$$

$$a = \frac{dw}{dt} = \frac{d^2\phi}{dt^2}$$

The primary function of this component is to ensure that the calculated relative angular acceleration `a` of the spline equates to the provided input signal `a_ref`:

$$a = a\_{ref}$$

This makes the component act as a source of prescribed acceleration for the spline's motion relative to its support.

This component extends from [`RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport`](../types/Interfaces.PartialElementaryOneSplineAndSupport.md)

## Usage {#Usage}

`RotationalComponents.Sources.AccelerationSource()`

## Connectors {#Connectors}

* `spline` - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. ([`Spline`](/stdlib/Dyad/connectors/Spline#Spline))

* `support` - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. ([`Spline`](/stdlib/Dyad/connectors/Spline#Spline))

* `a_ref` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

## Variables {#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 {#Behavior}

$$ \begin{align}
\mathtt{support.phi}\left( t \right) &= \mathtt{phi_support}\left( t \right) \\
\mathtt{support.tau}\left( t \right) &=  - \mathtt{spline.tau}\left( t \right) \\
\mathtt{phi}\left( t \right) &=  - \mathtt{phi_support}\left( t \right) + \mathtt{spline.phi}\left( t \right) \\
w\left( t \right) &= \frac{\mathrm{d}\mathtt{phi}\left( t \right)}{\mathrm{d}t} \\
a\left( t \right) &= \frac{\mathrm{d}w\left( t \right)}{\mathrm{d}t} \\
a\left( t \right) &= \mathtt{a_ref}\left( t \right)
\end{align}
$$

## Source {#Source}

````dyad
"""
Defines the forced angular movement of a spline based on an input acceleration signal.

This component models a rotational element where the angular acceleration of a spline, relative to its support, is directly driven by an external input signal, `a_ref`.
It calculates the relative angle `phi` between the spline and its support. The relative angular velocity `w` and angular acceleration `a` are then determined as the time derivatives of `phi`:
```math
w = \frac{d\\phi}{dt}
```
```math
a = \frac{dw}{dt} = \frac{d^2\\phi}{dt^2}
```
The primary function of this component is to ensure that the calculated relative angular acceleration `a` of the spline equates to the provided input signal `a_ref`:
```math
a = a_{ref}
```
This makes the component act as a source of prescribed acceleration for the spline's motion relative to its support.
"""
component AccelerationSource
  extends RotationalComponents.Interfaces.PartialElementaryOneSplineAndSupport
  "Absolute angular acceleration of spline with respect to support as input signal"
  a_ref = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "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
  w = der(phi)
  a = der(w)
  a = a_ref
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/Pos-Speed-Acc-Move.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
````

````dyad
"""
Defines the forced angular movement of a spline based on an input acceleration signal.

This component models a rotational element where the angular acceleration of a spline, relative to its support, is directly driven by an external input signal, `a_ref`.
It calculates the relative angle `phi` between the spline and its support. The relative angular velocity `w` and angular acceleration `a` are then determined as the time derivatives of `phi`:
```math
w = \frac{d\\phi}{dt}
```
```math
a = \frac{dw}{dt} = \frac{d^2\\phi}{dt^2}
```
The primary function of this component is to ensure that the calculated relative angular acceleration `a` of the spline equates to the provided input signal `a_ref`:
```math
a = a_{ref}
```
This makes the component act as a source of prescribed acceleration for the spline's motion relative to its support.
"""
component AccelerationSource
  "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
  "Absolute angular acceleration of spline with respect to support as input signal"
  a_ref = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "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
  w = der(phi)
  a = der(w)
  a = a_ref
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/Pos-Speed-Acc-Move.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`AllComponents`](Sources.AccelerationSource.md)
