model RelSpeedSensor "Ideal sensor to measure the relative angular velocity between two flanges"
extends Rotational.Interfaces.PartialRelativeSensor;
SI.Angle phi_rel "Relative angle between two flanges (flange_b.phi - flange_a.phi)";
Modelica.Blocks.Interfaces.RealOutput w_rel(unit = "rad/s") "Relative angular velocity between two flanges (= der(flange_b.phi) - der(flange_a.phi)) as output signal"
annotation (Placement(transformation(
origin = {0, -110},
extent = {
{10, -10},
{-10, 10}},
rotation = 90)));
equation
0 = flange_a.tau;
phi_rel = flange_b.phi - flange_a.phi;
w_rel = der(phi_rel);
annotation (
Documentation(info = "<html>\n<p>\nMeasures the <strong>relative angular velocity w_rel</strong> between two flanges\nin an ideal way and provides the result as output signal <strong>w_rel</strong>\n(to be further processed with blocks of the Modelica.Blocks library).\n</p>\n</html>"),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{20, -118},
{160, -88}},
textString = "w_rel"),
Line(
points = {
{0, -100},
{0, -70}},
color = {0, 0, 127})}));
end RelSpeedSensor;