---
url: /dyad/stable/stdlib/MultibodyComponents/components/PlanarMechanics.Power.md
description: >-
  Dyad PlanarMechanics.Power docs.  Measures the mechanical power transmitted
  between two rigidly connected frames.
---

# `PlanarMechanics.Power` {#PlanarMechanics.Power}

Measures the mechanical power transmitted between two rigidly connected frames.

Power is computed as the sum of translational power (force · velocity) and rotational power (torque · angular velocity):   power = frame_a.fx \* der(frame_a.x) + frame_a.fy \* der(frame_a.y) + frame_a.tau \* der(frame_a.phi)

This is a sensor component: it constrains frame_a and frame_b to be identical and does not alter the dynamics of the system.

This component extends from [`PartialTwoFrameSensor`](../types/PartialTwoFrameSensor.md)

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.Power()`

## Connectors {#Connectors}

* `frame_a` - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. ([`Frame2D`](/stdlib/Dyad/connectors/Frame2D#Frame2D))

* `frame_b` - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. ([`Frame2D`](/stdlib/Dyad/connectors/Frame2D#Frame2D))

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

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{frame_a.x}\left( t \right) &= \mathtt{frame_b.x}\left( t \right) \\
\mathtt{frame_a.y}\left( t \right) &= \mathtt{frame_b.y}\left( t \right) \\
\mathtt{frame_a.phi}\left( t \right) &= \mathtt{frame_b.phi}\left( t \right) \\
\mathtt{frame_a.fx}\left( t \right) + \mathtt{frame_b.fx}\left( t \right) &= 0 \\
\mathtt{frame_a.fy}\left( t \right) + \mathtt{frame_b.fy}\left( t \right) &= 0 \\
\mathtt{frame_a.tau}\left( t \right) + \mathtt{frame_b.tau}\left( t \right) &= 0 \\
\mathtt{power}\left( t \right) &= \frac{\mathrm{d}\mathtt{frame_a.x}\left( t \right)}{\mathrm{d}t} ~ \mathtt{frame_a.fx}\left( t \right) + \frac{\mathrm{d}\mathtt{frame_a.y}\left( t \right)}{\mathrm{d}t} ~ \mathtt{frame_a.fy}\left( t \right) + \frac{\mathrm{d}\mathtt{frame_a.phi}\left( t \right)}{\mathrm{d}t} ~ \mathtt{frame_a.tau}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Measures the mechanical power transmitted between two rigidly connected frames.

Power is computed as the sum of translational power (force · velocity) and
rotational power (torque · angular velocity):
  power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)

This is a sensor component: it constrains frame_a and frame_b to be identical
and does not alter the dynamics of the system.
"""
component Power
  extends PartialTwoFrameSensor
  "Mechanical power output"
  power = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
relations
  # Rigid connection: identical position and orientation
  frame_a.x = frame_b.x
  frame_a.y = frame_b.y
  frame_a.phi = frame_b.phi
  # Force balance
  frame_a.fx + frame_b.fx = 0
  frame_a.fy + frame_b.fy = 0
  # Torque balance
  frame_a.tau + frame_b.tau = 0
  # Power = force · velocity + torque · angular velocity
  power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [{"label": "power", "x": 500, "y": 680, "rot": 0}]
  }
}
end
```

```dyad
"""
Measures the mechanical power transmitted between two rigidly connected frames.

Power is computed as the sum of translational power (force · velocity) and
rotational power (torque · angular velocity):
  power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)

This is a sensor component: it constrains frame_a and frame_b to be identical
and does not alter the dynamics of the system.
"""
component Power
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Mechanical power output"
  power = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
relations
  # Rigid connection: identical position and orientation
  frame_a.x = frame_b.x
  frame_a.y = frame_b.y
  frame_a.phi = frame_b.phi
  # Force balance
  frame_a.fx + frame_b.fx = 0
  frame_a.fy + frame_b.fy = 0
  # Torque balance
  frame_a.tau + frame_b.tau = 0
  # Power = force · velocity + torque · angular velocity
  power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [{"label": "power", "x": 500, "y": 680, "rot": 0}]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
