---
url: /dyad/stable/stdlib/MultibodyComponents/components/PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource.md
description: >-
  Dyad PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource docs. 
  Applies an a-priori unknown torque to the spline and reports it as an output.
  The torque magnitude carries no equation of its own: it is det...
---

# `PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource` {#PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource}

Applies an a-priori unknown torque to the spline and reports it as an output. The torque magnitude carries no equation of its own: it is determined by the constraints of the surrounding model. This is the actuation side of an inverse model whose motion is prescribed elsewhere, e.g. a robot whose tool position is prescribed by a forceless PrescribedPosition while the joints are driven by UnknownTorqueSource components: the reported torques then solve the inverse dynamics of the prescribed motion.

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

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource()`

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

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

## Variables {#Variables}

|          Name |                             Description | Units |
| -------------:| ---------------------------------------:| -----:|
| `phi_support` |    Absolute angle of the support spline |   rad |
|         `phi` | Angle of spline with respect to support |     – |

## 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) \\
\mathtt{spline.tau}\left( t \right) &=  - \mathtt{tau}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"Applies an a-priori unknown torque to the spline and reports it as an output. The torque magnitude carries no equation of its own: it is determined by the constraints of the surrounding model. This is the actuation side of an inverse model whose motion is prescribed elsewhere, e.g. a robot whose tool position is prescribed by a forceless PrescribedPosition while the joints are driven by UnknownTorqueSource components: the reported torques then solve the inverse dynamics of the prescribed motion."
component UnknownTorqueSource
  extends RotationalComponents.Interfaces.PartialTorque
  "Torque required to realize the motion prescribed elsewhere in the model"
  tau = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}
      },
      "tags": []
    }
  }
relations
  spline.tau = -tau
metadata {"Dyad": {"icons": {"default": "dyad://MultibodyComponents/Torque.svg"}}}
end
```

```dyad
"Applies an a-priori unknown torque to the spline and reports it as an output. The torque magnitude carries no equation of its own: it is determined by the constraints of the surrounding model. This is the actuation side of an inverse model whose motion is prescribed elsewhere, e.g. a robot whose tool position is prescribed by a forceless PrescribedPosition while the joints are driven by UnknownTorqueSource components: the reported torques then solve the inverse dynamics of the prescribed motion."
component UnknownTorqueSource
  "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
  "Angle of spline with respect to support"
  variable phi::Real
  "Torque required to realize the motion prescribed elsewhere in the model"
  tau = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}
      },
      "tags": []
    }
  }
relations
  support.phi = phi_support
  support.tau = -spline.tau
  phi = spline.phi - phi_support
  spline.tau = -tau
metadata {"Dyad": {"icons": {"default": "dyad://MultibodyComponents/Torque.svg"}}}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
