I have a relatively simple Modelica model, and I would like to calculate its transfer functions. The problem is that the transfer function calculation with Mathematica yields zero, which is unexpected.
The problem emerged in a complex model, and here I only show a minimal example. The model comprises an angular spring attached to a massless rod, with a mass at the other end. The system is hanging and is actuated at the ground level. The actuation is an angular acceleration and serves as an input port. The spring constant and the rotational inertia of the mass are such that the resonant frequency is close to 1 Hz.
I have tested the model in time domain, and it seems to be doing something sensible. However, the calculation of the transfer function using Mathematica yields exactly zero. Somehow, this problem reminds me this post, but they don't seem to be related in an obvious way.
The Modelica model and the Mathematica notebook are shown below.
Given the simplicity of the model, I have the impression I'm missing something that may be obvious for the trained eye.
Any help would be highly appreciated.
Cheers,
Fabián
model AngularSpring
inner Modelica.Mechanics.MultiBody.World world(label2 = "z", n = {0, 0, -1}) annotation(Placement(visible = true, transformation(origin = {-93.004, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange = true, phi.start = 0, phi.fixed = true, w.fixed = true, stateSelect = StateSelect.never) annotation(Placement(visible = true, transformation(origin = {25, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.Rotational.Components.Spring spring1(c = (2 * Modelica.Constants.pi) ^ 2) annotation(Placement(visible = true, transformation(origin = {25, 45}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedTranslation1(r = {0, 0, -0.25}) annotation(Placement(visible = true, transformation(origin = {62.15, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedTranslation2(r = {0, 0, -0.5}) annotation(Placement(visible = true, transformation(origin = {-25, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Joints.Revolute revolute2(useAxisFlange = true, stateSelect = StateSelect.never) annotation(Placement(visible = true, transformation(origin = {-57.339, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.Rotational.Sources.Position position1(f_crit = 10000, exact = true) if false annotation(Placement(visible = true, transformation(origin = {-75, 67.223}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Sine sine1(f = 10, amplitude = 17e-3) if false annotation(Placement(visible = true, transformation(origin = {-120, 67.339}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Interfaces.RealInput u annotation(Placement(visible = true, transformation(origin = {-127.5, 12.5}, extent = {{-12.5, -12.5}, {12.5, 12.5}}, rotation = 0), iconTransformation(origin = {-78.502, 83.333}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Sensors.AbsoluteAngles absoluteAngles1 annotation(Placement(visible = true, transformation(origin = {102.339, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Interfaces.RealOutput y annotation(Placement(visible = true, transformation(origin = {132.721, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {88.481, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Parts.Body body1(m = 1, I_33 = 1, I_11 = 1, I_22 = 1) annotation(Placement(visible = true, transformation(origin = {125, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.Rotational.Sources.Accelerate accelerate1 annotation(Placement(visible = true, transformation(origin = {-85, 11.642}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(spring1.flange_a, revolute1.support) annotation(Line(visible = true, origin = {14.6, 34}, points = {{0.4, 11}, {-4.6, 11}, {-4.6, -4}, {4.4, -4}, {4.4, -14}}));
connect(spring1.flange_b, revolute1.axis) annotation(Line(visible = true, origin = {35.835, -7.5}, points = {{-0.835, 52.5}, {4.39, 52.5}, {4.39, 27.5}, {-10.835, 27.5}}));
connect(revolute1.frame_b, fixedTranslation1.frame_a) annotation(Line(visible = true, origin = {41.788, -10}, points = {{-6.788, 20}, {-1.788, 20}, {-1.788, -20}, {10.362, -20}}, color = {95, 95, 95}));
connect(fixedTranslation2.frame_b, revolute1.frame_a) annotation(Line(visible = true, origin = {-5, -10}, points = {{-10, -20}, {-5, -20}, {-5, 20}, {20, 20}}, color = {95, 95, 95}));
connect(revolute2.frame_b, fixedTranslation2.frame_a) annotation(Line(visible = true, origin = {-41.169, -30}, points = {{-6.169, 0}, {6.169, 0}}, color = {95, 95, 95}));
connect(revolute2.frame_a, world.frame_b) annotation(Line(visible = true, origin = {-75.172, -30}, points = {{7.833, 0}, {-7.833, 0}}, color = {95, 95, 95}));
connect(position1.flange, revolute2.axis) annotation(Line(visible = true, origin = {-59.893, 38.149}, points = {{-5.107, 29.074}, {2.554, 29.074}, {2.554, -58.149}}));
connect(sine1.y, position1.phi_ref) annotation(Line(visible = true, origin = {-101, 67.281}, points = {{-8, 0.058}, {-3, 0.058}, {-3, -0.058}, {14, -0.058}}, color = {0, 0, 127}));
connect(absoluteAngles1.angles[3], y) annotation(Line(visible = true, origin = {123.03, 0}, points = {{-9.691, 0}, {9.691, 0}}, color = {0, 0, 127}));
connect(fixedTranslation1.frame_b, body1.frame_a) annotation(Line(visible = true, origin = {93.575, -30}, points = {{-21.425, 0}, {21.425, 0}}, color = {95, 95, 95}));
connect(absoluteAngles1.frame_a, fixedTranslation1.frame_b) annotation(Line(visible = true, origin = {84.792, -15}, points = {{7.547, 15}, {2.547, 15}, {2.547, -15}, {-12.642, -15}}, color = {95, 95, 95}));
connect(u, accelerate1.a_ref) annotation(Line(visible = true, origin = {-117.333, 11.928}, points = {{-10.167, 0.572}, {-10.167, -0.286}, {20.333, -0.286}}, color = {0, 0, 127}));
connect(accelerate1.flange, revolute2.axis) annotation(Line(visible = true, origin = {-63.226, 1.095}, points = {{-11.774, 10.547}, {5.887, 10.547}, {5.887, -21.095}}));
annotation(experiment(StopTime = 10.0), Diagram(coordinateSystem(extent = {{-150, -90}, {150, 90}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})), Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10}), graphics = {Rectangle(visible = true, lineColor = {0, 114, 195}, fillColor = {255, 255, 255}, extent = {{-100, -100}, {100, 100}}, radius = 25), Text(visible = true, textColor = {64, 64, 64}, extent = {{-150, 110}, {150, 150}}, textString = "%name")}));
end AngularSpring;