MultiSensor
IconMultiSensor
Ideal sensor that measures the absolute velocity, the force transmitted from flange_a
to flange_b
and the power flowing from flange_a
to flange_b
.
This component extends from PartialRelativeSensor
Usage
MultiSensor()
Connectors
flange_a
- (Flange
)flange_b
- (Flange
)power
- This connector represents a real signal as an output from a component (RealOutput
)f
- This connector represents a real signal as an output from a component (RealOutput
)v
- 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) \\ 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) &= v\left( t \right) f\left( t \right) \end{align} \]
Source
# Ideal sensor that measures the absolute velocity, the force transmitted from
# `flange_a` to `flange_b` and the power flowing from `flange_a` to `flange_b`.
component MultiSensor
extends PartialRelativeSensor
# Power flowing from `flange_a` to `flange_b` as output signal
power = RealOutput() [{
"JuliaSim": {
"placement": {"icon": {"x1": 175, "y1": 950, "x2": 275, "y2": 1050, "rot": 90}}
}
}]
# Force transmitted from `flange_a` to `flange_b` as output signal
f = RealOutput() [{
"JuliaSim": {
"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
}
}]
# Absolute velocity as output signal
v = RealOutput() [{
"JuliaSim": {
"placement": {"icon": {"x1": 725, "y1": 950, "x2": 825, "y2": 1050, "rot": 90}}
}
}]
relations
flange_a.s = flange_b.s
f = flange_a.f
v = der(flange_a.s)
power = f*v
end
Flattened Source
# Ideal sensor that measures the absolute velocity, the force transmitted from # `flange_a` to `flange_b` and the power flowing from `flange_a` to `flange_b`. component MultiSensor flange_a = Flange() [{ "JuliaSim": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}} }] flange_b = Flange() [{ "JuliaSim": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}} }] # Power flowing from `flange_a` to `flange_b` as output signal power = RealOutput() [{ "JuliaSim": { "placement": {"icon": {"x1": 175, "y1": 950, "x2": 275, "y2": 1050, "rot": 90}} } }] # Force transmitted from `flange_a` to `flange_b` as output signal f = RealOutput() [{ "JuliaSim": { "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}} } }] # Absolute velocity as output signal v = RealOutput() [{ "JuliaSim": { "placement": {"icon": {"x1": 725, "y1": 950, "x2": 825, "y2": 1050, "rot": 90}} } }] 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 {} end
Test Cases
Related
- Examples
- Experiments
- Analyses