|
|
|
|
within AIDAModelica;
|
|
|
|
|
|
|
|
|
|
model MotorControl "Motor Control Model"
|
|
|
|
|
// CP: 65001
|
|
|
|
|
// SimulationX Version: 3.8.2.45319
|
|
|
|
|
Modelica.Blocks.Interfaces.RealInput MotorKRate(quantity = "Mechanics.Rotation.RotVelocity", displayUnit = "rpm") "Desired angular velocity of k-th motor" annotation(
|
|
|
|
|
Placement(transformation(extent = {{-65, -40}, {-25, 0}}), iconTransformation(origin = {-100, 0}, extent = {{-20, -20}, {20, 20}})));
|
|
|
|
|
Modelica.Blocks.Interfaces.RealOutput ThrottleCommandK(quantity = "Basics.Unitless", displayUnit = "-") "K-th command output" annotation(
|
|
|
|
|
Placement(transformation(extent = {{60, -30}, {80, -10}}), iconTransformation(extent = {{90, -10}, {110, 10}})));
|
|
|
|
|
ControlMotor controlMotor1 annotation(
|
|
|
|
|
Placement(transformation(extent = {{10, -30}, {30, -10}})));
|
|
|
|
|
equation
|
|
|
|
|
connect(controlMotor1.ComdKD, ThrottleCommandK) annotation(
|
|
|
|
|
Line(points = {{30, -20}, {35, -20}, {65, -20}, {70, -20}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
connect(controlMotor1.DAngVel, MotorKRate) annotation(
|
|
|
|
|
Line(points = {{10, -20}, {5, -20}, {-40, -20}, {-45, -20}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
annotation(
|
|
|
|
|
MotorKRate(flags = 2),
|
|
|
|
|
ThrottleCommandK(flags = 2),
|
|
|
|
|
Icon(coordinateSystem(extent = {{-100, -50}, {100, 50}}, initialScale = 0.1), graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 50}, {103.3, -50}}), Text(origin = {-3, 0}, extent = {{-31, 8}, {31, -8}}, textString = "%name")}),
|
|
|
|
|
experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001"));
|
|
|
|
|
end MotorControl;
|