---
url: /dyad/stable/stdlib/TranslationalComponents/components/Sensors.MultiSensor.md
description: >-
  Dyad Sensors.MultiSensor docs.  Ideal sensor measuring absolute velocity,
  transmitted force, and power flow between two mechanical flanges.
---

# `Sensors.MultiSensor` {#Sensors.MultiSensor}

Ideal sensor measuring absolute velocity, transmitted force, and power flow between two mechanical flanges.

This sensor measures key physical quantities between its two mechanical connection ports, `flange_a` and `flange_b`. It assumes an ideal connection where the positions of the flanges are identical (`flange_a.s = flange_b.s`). The component outputs:

* The absolute velocity `v` of `flange_a`, calculated as $v = \frac{d(flange_a.s)}{dt}$.

* The force `f` transmitted from `flange_a` to `flange_b`, taken as $f = flange_a.f$.

* The power `power` flowing from `flange_a` to `flange_b`, calculated as $power = f \cdot v$.

These quantities are made available as real output signals for monitoring or control purposes.

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

## Usage {#Usage}

`TranslationalComponents.Sensors.MultiSensor()`

## Connectors {#Connectors}

* `flange_a` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

* `flange_b` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

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

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

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

## Behavior {#Behavior}

$$ \begin{align}
0 &= \mathtt{flange_a.f}\left( t \right) + \mathtt{flange_b.f}\left( t \right) \\
\mathtt{flange_a.s}\left( t \right) &= \mathtt{flange_b.s}\left( t \right) \\
f\left( t \right) &= \mathtt{flange_a.f}\left( t \right) \\
v\left( t \right) &= \frac{\mathrm{d}\mathtt{flange_a.s}\left( t \right)}{\mathrm{d}t} \\
\mathtt{power}\left( t \right) &= f\left( t \right) ~ v\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Ideal sensor measuring absolute velocity, transmitted force, and power flow between two mechanical flanges.

This sensor measures key physical quantities between its two mechanical connection
ports, `flange_a` and `flange_b`. It assumes an ideal connection where the positions
of the flanges are identical (`flange_a.s = flange_b.s`). The component outputs:
- The absolute velocity `v` of `flange_a`, calculated as $v = \frac{d(flange\_a.s)}{dt}$.
- The force `f` transmitted from `flange_a` to `flange_b`, taken as $f = flange\_a.f$.
- The power `power` flowing from `flange_a` to `flange_b`, calculated as $power = f \cdot v$.
These quantities are made available as real output signals for monitoring or control purposes.
"""
component MultiSensor
  extends TranslationalComponents.Interfaces.PartialRelativeSensor
  "Power flowing from `flange_a` to `flange_b` as output signal"
  power = RealOutput(units = "W") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 150, "y1": 1000, "x2": 250, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 150, "y1": 1000, "x2": 250, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
  "Force transmitted from `flange_a` to `flange_b` as output signal"
  f = RealOutput(units = "N") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
  "Absolute velocity of `flange_a` as output signal"
  v = RealOutput(units = "m/s") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 750, "y1": 1000, "x2": 850, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 750, "y1": 1000, "x2": 850, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
relations
  flange_a.s = flange_b.s
  f = flange_a.f
  v = der(flange_a.s)
  power = f * v
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/MultiSensor.svg"},
    "labels": [
      {"label": "$(instance)", "layer": "icon", "x": 500, "y": 1202, "rot": 0},
      {"label": "W", "x": 250, "y": 864, "rot": 0},
      {"label": "N", "x": 500, "y": 864, "rot": 0},
      {"label": "m/s", "x": 750, "y": 864, "rot": 0}
    ]
  }
}
end
```

```dyad
"""
Ideal sensor measuring absolute velocity, transmitted force, and power flow between two mechanical flanges.

This sensor measures key physical quantities between its two mechanical connection
ports, `flange_a` and `flange_b`. It assumes an ideal connection where the positions
of the flanges are identical (`flange_a.s = flange_b.s`). The component outputs:
- The absolute velocity `v` of `flange_a`, calculated as $v = \frac{d(flange\_a.s)}{dt}$.
- The force `f` transmitted from `flange_a` to `flange_b`, taken as $f = flange\_a.f$.
- The power `power` flowing from `flange_a` to `flange_b`, calculated as $power = f \cdot v$.
These quantities are made available as real output signals for monitoring or control purposes.
"""
component MultiSensor
  "Negative connection flange of the sensor, often considered the reference point."
  flange_a = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Positive connection flange of the sensor, where the measurement is taken relative to flange_a."
  flange_b = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Power flowing from `flange_a` to `flange_b` as output signal"
  power = RealOutput(units = "W") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 150, "y1": 1000, "x2": 250, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 150, "y1": 1000, "x2": 250, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
  "Force transmitted from `flange_a` to `flange_b` as output signal"
  f = RealOutput(units = "N") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
  "Absolute velocity of `flange_a` as output signal"
  v = RealOutput(units = "m/s") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 750, "y1": 1000, "x2": 850, "y2": 1100, "rot": 90},
        "diagram": {"iconName": "default", "x1": 750, "y1": 1000, "x2": 850, "y2": 1100, "rot": 90}
      },
      "tags": []
    }
  }
relations
  0 = flange_a.f + flange_b.f
  flange_a.s = flange_b.s
  f = flange_a.f
  v = der(flange_a.s)
  power = f * v
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/MultiSensor.svg"},
    "labels": [
      {"label": "$(instance)", "layer": "icon", "x": 500, "y": 1202, "rot": 0},
      {"label": "W", "x": 250, "y": 864, "rot": 0},
      {"label": "N", "x": 500, "y": 864, "rot": 0},
      {"label": "m/s", "x": 750, "y": 864, "rot": 0}
    ]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
