PowerSensor
IconPowerSensor
Ideal sensor to measure the power between two splines
This component extends from PartialRelativeSensor
Usage
PowerSensor()
Connectors
spline_a
- (Spline
)spline_b
- (Spline
)power
- This connector represents a real signal as an output from a component (RealOutput
)
Behavior
\[ \begin{align} 0 &= \mathtt{spline\_b.tau}\left( t \right) + \mathtt{spline\_a.tau}\left( t \right) \\ \mathtt{spline\_a.phi}\left( t \right) &= \mathtt{spline\_b.phi}\left( t \right) \\ \mathtt{power}\left( t \right) &= \mathtt{spline\_a.tau}\left( t \right) \frac{\mathrm{d} \mathtt{spline\_a.phi}\left( t \right)}{\mathrm{d}t} \end{align} \]
Source
# Ideal sensor to measure the power between two splines
component PowerSensor
extends PartialRelativeSensor
# Power in spline `spline_a` as output signal
power = RealOutput() [{
"JuliaSim": {
"placement": {"icon": {"x1": 100, "y1": 950, "x2": 200, "y2": 1050, "rot": 90}}
}
}]
relations
spline_a.phi = spline_b.phi
power = spline_a.tau*der(spline_a.phi)
metadata {
"JuliaSim": {"icons": {"default": "jsml://RotationalComponents/Sensor-Power-Torque.svg"}}
}
end
Flattened Source
# Ideal sensor to measure the power between two splines component PowerSensor # Left spline of shaft spline_a = Spline() [{ "JuliaSim": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}} }] # Right spline of shaft spline_b = Spline() [{ "JuliaSim": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}} }] # Power in spline `spline_a` as output signal power = RealOutput() [{ "JuliaSim": { "placement": {"icon": {"x1": 100, "y1": 950, "x2": 200, "y2": 1050, "rot": 90}} } }] relations 0 = spline_a.tau+spline_b.tau spline_a.phi = spline_b.phi power = spline_a.tau*der(spline_a.phi) metadata { "JuliaSim": {"icons": {"default": "jsml://RotationalComponents/Sensor-Power-Torque.svg"}} } end
Test Cases
Related
- Examples
- Experiments
- Analyses