---
url: /dyad/stable/stdlib/RotationalComponents/components/Sensors.TorqueSensor.md
description: >-
  Dyad Sensors.TorqueSensor docs.  Ideal sensor measuring the torque transmitted
  between two rotational splines.
---

# `Sensors.TorqueSensor` {#Sensors.TorqueSensor}

Ideal sensor measuring the torque transmitted between two rotational splines.

This ideal sensor measures the torque exchanged between two coaxial rotational splines, `spline_a` and `spline_b` It enforces that the splines are rigidly connected, meaning there is no relative angular displacement between them. The relationship is described by the equation:

$$\text{spline\\\_a}.\phi = \text{spline\\\_b}.\phi$$

The sensor provides an output signal, `tau`, which represents the torque transmitted through the splines. This output is set equal to the torque acting on `spline_a` (denoted $\tau_a$):

$$\tau = \text{spline\\\_a}.\tau$$

where $\tau\*a$ is the torque variable of the `spline*a` connector. This is an ideal component as it introduces no mechanical losses, inertia, or backlash.

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

## Usage {#Usage}

`RotationalComponents.Sensors.TorqueSensor()`

## Connectors {#Connectors}

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

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

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

## Behavior {#Behavior}

$$ \begin{align}
0 &= \mathtt{spline_a.tau}\left( t \right) + \mathtt{spline_b.tau}\left( t \right) \\
\mathtt{spline_a.phi}\left( t \right) &= \mathtt{spline_b.phi}\left( t \right) \\
\mathtt{spline_a.tau}\left( t \right) &= \mathtt{tau}\left( t \right)
\end{align}
$$

## Source {#Source}

````dyad
"""
Ideal sensor measuring the torque transmitted between two rotational splines.

This ideal sensor measures the torque exchanged between two coaxial rotational splines,
`spline_a` and `spline_b` It enforces that the splines are rigidly connected,
meaning there is no relative angular displacement between them. The relationship
is described by the equation:
```math
\text{spline\\_a}.\\phi = \text{spline\\_b}.\\phi
```
The sensor provides an output signal, `tau`, which represents the torque transmitted
through the splines.
This output is set equal to the torque acting on `spline_a` (denoted \$\tau_a\$):
```math
\tau = \text{spline\\_a}.\tau
```
where \$\tau_a\$ is the torque variable of the `spline_a` connector. This is an
ideal component as it introduces no mechanical losses, inertia, or backlash.
"""
component TorqueSensor
  extends RotationalComponents.Interfaces.PartialRelativeSensor
  "Output signal representing the measured torque transmitted between the splines."
  tau = RealOutput() {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 950, "x2": 200, "y2": 1050, "rot": 90}}
    }
  }
relations
  spline_a.phi = spline_b.phi
  spline_a.tau = tau
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/Sensor-Power-Torque.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
````

````dyad
"""
Ideal sensor measuring the torque transmitted between two rotational splines.

This ideal sensor measures the torque exchanged between two coaxial rotational splines,
`spline_a` and `spline_b` It enforces that the splines are rigidly connected,
meaning there is no relative angular displacement between them. The relationship
is described by the equation:
```math
\text{spline\\_a}.\\phi = \text{spline\\_b}.\\phi
```
The sensor provides an output signal, `tau`, which represents the torque transmitted
through the splines.
This output is set equal to the torque acting on `spline_a` (denoted \$\tau_a\$):
```math
\tau = \text{spline\\_a}.\tau
```
where \$\tau_a\$ is the torque variable of the `spline_a` connector. This is an
ideal component as it introduces no mechanical losses, inertia, or backlash.
"""
component TorqueSensor
  "Left spline connector for the sensor."
  spline_a = Spline() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Right spline connector for the sensor."
  spline_b = Spline() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Output signal representing the measured torque transmitted between the splines."
  tau = RealOutput() {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 950, "x2": 200, "y2": 1050, "rot": 90}}
    }
  }
relations
  0 = spline_a.tau + spline_b.tau
  spline_a.phi = spline_b.phi
  spline_a.tau = tau
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/Sensor-Power-Torque.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
