---
url: /dyad/stable/stdlib/RotationalComponents/components/Sensors.AccelerationSensor.md
description: >-
  Dyad Sensors.AccelerationSensor docs.  Measures the absolute angular
  acceleration of a rotational spline.
---

# `Sensors.AccelerationSensor` {#Sensors.AccelerationSensor}

Measures the absolute angular acceleration of a rotational spline.

This sensor determines the absolute angular acceleration of its `spline` connector, leveraging properties inherited from `PartialAbsoluteSensor`, such as the spline's angle (`spline.phi`). The absolute angular velocity (`w`) is first calculated as the time derivative of this angle:

$$w = \frac{d\text{spline}.\phi}{dt}$$

Then, the absolute angular acceleration (`a`) is computed as the time derivative of the angular velocity:

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

This resulting acceleration is provided as the output `a`.

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

## Usage {#Usage}

`RotationalComponents.Sensors.AccelerationSensor()`

## 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))

* `a` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

## Variables {#Variables}

| Name |                         Description | Units |
| ----:| -----------------------------------:| -----:|
|  `w` | Absolute angular velocity of flange | rad/s |

## Behavior {#Behavior}

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

## Source {#Source}

````dyad
"""
Measures the absolute angular acceleration of a rotational spline.

This sensor determines the absolute angular acceleration of its `spline` connector, leveraging properties inherited from `PartialAbsoluteSensor`, such as the spline's angle (`spline.phi`).
The absolute angular velocity (`w`) is first calculated as the time derivative of this angle:
```math
w = \frac{d\text{spline}.\\phi}{dt}
```
Then, the absolute angular acceleration (`a`) is computed as the time derivative of the angular velocity:
```math
a = \frac{dw}{dt} = \frac{d^2\text{spline}.\\phi}{dt^2}
```
This resulting acceleration is provided as the output `a`.
"""
component AccelerationSensor
  extends RotationalComponents.Interfaces.PartialAbsoluteSensor
  "Absolute angular acceleration of flange as output signal"
  a = RealOutput() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Absolute angular velocity of flange"
  variable w::AngularVelocity
relations
  w = der(spline.phi)
  a = der(w)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/SingleSplineSensor.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1008, "rot": 0}]
  }
}
end
````

````dyad
"""
Measures the absolute angular acceleration of a rotational spline.

This sensor determines the absolute angular acceleration of its `spline` connector, leveraging properties inherited from `PartialAbsoluteSensor`, such as the spline's angle (`spline.phi`).
The absolute angular velocity (`w`) is first calculated as the time derivative of this angle:
```math
w = \frac{d\text{spline}.\\phi}{dt}
```
Then, the absolute angular acceleration (`a`) is computed as the time derivative of the angular velocity:
```math
a = \frac{dw}{dt} = \frac{d^2\text{spline}.\\phi}{dt^2}
```
This resulting acceleration is provided as the output `a`.
"""
component AccelerationSensor
  "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 angular acceleration of flange as output signal"
  a = RealOutput() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Absolute angular velocity of flange"
  variable w::AngularVelocity
relations
  0 = spline.tau
  w = der(spline.phi)
  a = der(w)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/SingleSplineSensor.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1008, "rot": 0}]
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
