power$(instance)PowerSensor Icon

PowerSensor

Ideal sensor measuring the translational power flowing through a point.

This component measures the instantaneous mechanical translational power. It is intended to measure power calculated at flange_a. The sensor is ideal: it does not dissipate energy or introduce any mechanical impedance beyond its defining equations. A key characteristic is the constraint $flange_a.s = flange_b.s$, which means both flanges share the same position and, consequently, the same velocity. The sensor thus measures the power flowing through the connection point flange_a, while flange_b serves to complete the mechanical path with identical motion. The measured power $P$ is defined as:

\[P = F \cdot v\]

math

where $F$ corresponds to the force flange_a.f at flange_a and $v$ corresponds to the velocity der(flange_a.s) of flange_a.

PartialRelativeSensor

Usage

PowerSensor()

Connectors

  • flange_a - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)
  • flange_b - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)
  • power - This connector represents a real signal as an output from a component (RealOutput)

Behavior

\[ \begin{align} 0 &= \mathtt{flange\_b.f}\left( t \right) + \mathtt{flange\_a.f}\left( t \right) \\ \mathtt{flange\_a.s}\left( t \right) &= \mathtt{flange\_b.s}\left( t \right) \\ \mathtt{power}\left( t \right) &= \frac{\mathrm{d} \mathtt{flange\_a.s}\left( t \right)}{\mathrm{d}t} \mathtt{flange\_a.f}\left( t \right) \end{align} \]

Source

# Ideal sensor measuring the translational power flowing through a point.
#
# This component measures the instantaneous mechanical translational power.
# It is intended to measure power calculated at `flange_a`.
# The sensor is ideal: it does not dissipate energy or introduce any mechanical impedance beyond its defining equations.
# A key characteristic is the constraint $flange_a.s = flange_b.s$, which means
# both flanges share the same position and, consequently, the same velocity.
# The sensor thus measures the power flowing through the connection point `flange_a`,
# while `flange_b` serves to complete the mechanical path with identical motion.
# The measured power $P$ is defined as:
#
# ```math
# P = F \cdot v
# ```math
#
# where $F$ corresponds to the force `flange_a.f` at `flange_a` and $v$ corresponds
# to the velocity `der(flange_a.s)` of `flange_a`.
component PowerSensor
  extends PartialRelativeSensor
  # Output signal representing the measured power, calculated as power in flange `flange_a`.
  power = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
relations
  flange_a.s = flange_b.s
  power = flange_a.f*der(flange_a.s)
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end
Flattened Source
# Ideal sensor measuring the translational power flowing through a point.
#
# This component measures the instantaneous mechanical translational power.
# It is intended to measure power calculated at `flange_a`.
# The sensor is ideal: it does not dissipate energy or introduce any mechanical impedance beyond its defining equations.
# A key characteristic is the constraint $flange_a.s = flange_b.s$, which means
# both flanges share the same position and, consequently, the same velocity.
# The sensor thus measures the power flowing through the connection point `flange_a`,
# while `flange_b` serves to complete the mechanical path with identical motion.
# The measured power $P$ is defined as:
#
# ```math
# P = F \cdot v
# ```math
#
# where $F$ corresponds to the force `flange_a.f` at `flange_a` and $v$ corresponds
# to the velocity `der(flange_a.s)` of `flange_a`.
component PowerSensor
  # 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}}}}]
  # Output signal representing the measured power, calculated as power in flange `flange_a`.
  power = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
relations
  0 = flange_a.f+flange_b.f
  flange_a.s = flange_b.s
  power = flange_a.f*der(flange_a.s)
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RelativeSensor.svg"}}
}
end


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses