Sensors.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, while flange_b serves to complete the mechanical path with identical motion. The measured power
math
where flange_a.f at flange_a and der(flange_a.s) of flange_a.
This component extends from TranslationalComponents.Interfaces.PartialRelativeSensor
Usage
TranslationalComponents.Sensors.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
using TranslationalComponents #hide
using ModelingToolkit #hide
@named sys = TranslationalComponents.Sensors.PowerSensor() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>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 TranslationalComponents.Interfaces.PartialRelativeSensor
"Output signal representing the measured power, calculated as power in flange `flange_a`."
power = RealOutput(units = "W") {
"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"}}
}
endFlattened 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(units = "W") {
"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"}}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses