-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssembly-Process-Model.mo
More file actions
86 lines (86 loc) · 6.75 KB
/
Assembly-Process-Model.mo
File metadata and controls
86 lines (86 loc) · 6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
model PinAssemblyProcess
Modelica.Blocks.Tables.CombiTable1Ds Table1(table = {{1, 0, 0, 0, 0}, {2, -25, -25, 100, 0}, {3, 25, 25, 0, -100}, {4, 18, -12, 30, 10}, {5, -15, 20, 30, 60}}, smoothness = Modelica.Blocks.Types.Smoothness.ConstantSegments, extrapolation = Modelica.Blocks.Types.Extrapolation.NoExtrapolation) annotation(
Placement(transformation(origin = {-58, 4}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Sources.Constant Para_no(k = 1) annotation(
Placement(transformation(origin = {-88, 4}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Routing.DeMultiplex4 deMultiplex4 annotation(
Placement(transformation(origin = {-28, 4}, extent = {{-10, -10}, {10, 10}})));
mopsolver_fmu_me_FMU ToleranceFMU annotation(
Placement(transformation(origin = {19, -3}, extent = {{-19, -19}, {19, 19}})));
Modelica.Blocks.Interaction.Show.RealValue Force_N(significantDigits = 3) annotation(
Placement(transformation(origin = {66, 22}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Interaction.Show.RealValue FR_mm annotation(
Placement(transformation(origin = {66, -6}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Nonlinear.Limiter limiter(uMax = 100000, uMin = 0) annotation(
Placement(transformation(origin = {96, 10}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Math.Gain dir(k = -1) annotation(
Placement(transformation(origin = {124, 10}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Math.Gain m2mm(k = -1000) annotation(
Placement(transformation(origin = {-26, -24}, extent = {{-10, -10}, {10, 10}})));
Modelica.Mechanics.Translational.Sources.Force AssemblyForce annotation(
Placement(transformation(origin = {92, 50}, extent = {{10, -10}, {-10, 10}})));
Modelica.Mechanics.Translational.Sensors.PositionSensor positionSensor annotation(
Placement(transformation(origin = {18, 30}, extent = {{10, -10}, {-10, 10}})));
Modelica.Mechanics.Translational.Components.MassWithStopAndFriction Pin(smax(displayUnit = "mm") = 0.0045, smin = 0, L = 0, m = 0.01, F_prop = 0, F_Coulomb = 0, F_Stribeck = 0, fexp = 0) annotation(
Placement(transformation(origin = {56, 50}, extent = {{-10, -10}, {10, 10}})));
Modelica.Mechanics.Translational.Components.IdealGearR2T idealGearR2T(ratio = 62831.853) annotation(
Placement(transformation(origin = {14, 50}, extent = {{-10, -10}, {10, 10}})));
Modelica.Electrical.Machines.BasicMachines.DCMachines.DC_PermanentMagnet DC_motor(TaOperational = 293.15, VaNominal = 5, IaNominal(displayUnit = "mA") = 0.1, wNominal = 3000*2*Modelica.Constants.pi/60, TaNominal = 293.15, Ra(displayUnit = "mOhm") = 0.05, TaRef = 293.15, Jr = 2.5e-07, alpha20a = 0, La(displayUnit = "mH") = 0.0015) annotation(
Placement(transformation(origin = {-28, 50}, extent = {{-10, -10}, {10, 10}})));
Modelica.Electrical.Analog.Basic.Ground ground annotation(
Placement(transformation(origin = {-72, 48}, extent = {{-10, -10}, {10, 10}})));
Modelica.Electrical.Analog.Basic.Resistor resistor(R = 10) annotation(
Placement(transformation(origin = {-32, 78}, extent = {{10, -10}, {-10, 10}})));
Modelica.Electrical.Analog.Sources.ConstantVoltage SupplyVoltage(V = 5) annotation(
Placement(transformation(origin = {-60, 78}, extent = {{10, -10}, {-10, 10}})));
equation
connect(Para_no.y, Table1.u) annotation(
Line(points = {{-77, 4}, {-70, 4}}, color = {0, 0, 127}));
connect(Table1.y, deMultiplex4.u) annotation(
Line(points = {{-47, 4}, {-40, 4}}, color = {0, 0, 127}, thickness = 0.5));
connect(deMultiplex4.y1[1], ToleranceFMU.T11_P5) annotation(
Line(points = {{-17, 13}, {-9, 13}, {-9, 10}, {-2, 10}}, color = {0, 0, 127}));
connect(deMultiplex4.y2[1], ToleranceFMU.T12_P6) annotation(
Line(points = {{-17, 7}, {-9, 7}, {-9, 6}, {-2, 6}}, color = {0, 0, 127}));
connect(deMultiplex4.y3[1], ToleranceFMU.T21_P7) annotation(
Line(points = {{-17, 1}, {-2, 1}}, color = {0, 0, 127}));
connect(deMultiplex4.y4[1], ToleranceFMU.T22_P8) annotation(
Line(points = {{-17, -5}, {-6, -5}, {-6, -4}, {-2, -4}}, color = {0, 0, 127}));
connect(ToleranceFMU.F_out_P9, limiter.u) annotation(
Line(points = {{40, 10}, {84, 10}}, color = {0, 0, 127}));
connect(ToleranceFMU.F_out_P9, Force_N.numberPort) annotation(
Line(points = {{40, 10}, {50.5, 10}, {50.5, 22}, {54.5, 22}}, color = {0, 0, 127}));
connect(ToleranceFMU.KC_out_P10, FR_mm.numberPort) annotation(
Line(points = {{40, 6}, {50.5, 6}, {50.5, -6}, {54.5, -6}}, color = {0, 0, 127}));
connect(limiter.y, dir.u) annotation(
Line(points = {{107, 10}, {112, 10}}, color = {0, 0, 127}));
connect(m2mm.y, ToleranceFMU.x_in_P11) annotation(
Line(points = {{-15, -24}, {-12, -24}, {-12, -8}, {-2, -8}}, color = {0, 0, 127}));
connect(dir.y, AssemblyForce.f) annotation(
Line(points = {{135, 10}, {135, 50}, {104, 50}}, color = {0, 0, 127}));
connect(positionSensor.s, m2mm.u) annotation(
Line(points = {{7, 30}, {-123.5, 30}, {-123.5, -24}, {-38, -24}}, color = {0, 0, 127}));
connect(positionSensor.flange, Pin.flange_a) annotation(
Line(points = {{28, 30}, {38, 30}, {38, 50}, {46, 50}}, color = {0, 127, 0}));
connect(Pin.flange_b, AssemblyForce.flange) annotation(
Line(points = {{66, 50}, {82, 50}}, color = {0, 127, 0}));
connect(idealGearR2T.flangeT, Pin.flange_a) annotation(
Line(points = {{24, 50}, {46, 50}}, color = {0, 127, 0}));
connect(DC_motor.flange, idealGearR2T.flangeR) annotation(
Line(points = {{-18, 50}, {4, 50}}));
connect(SupplyVoltage.p, resistor.n) annotation(
Line(points = {{-50, 78}, {-42, 78}}, color = {0, 0, 255}));
connect(resistor.p, DC_motor.pin_ap) annotation(
Line(points = {{-22, 78}, {-22, 60}}, color = {0, 0, 255}));
connect(SupplyVoltage.n, DC_motor.pin_an) annotation(
Line(points = {{-70, 78}, {-75, 78}, {-75, 64}, {-34, 64}, {-34, 60}}, color = {0, 0, 255}));
connect(ground.p, DC_motor.pin_an) annotation(
Line(points = {{-72, 58}, {-72, 64}, {-34, 64}, {-34, 60}}, color = {0, 0, 255}));
annotation(
uses(Modelica(version = "4.0.0")),
Diagram(graphics = {Text(origin = {-88, -15}, extent = {{8, -7}, {-8, 7}}, textString = "chosse predefined
parameter set", textStyle = {TextStyle.Bold}), Text(origin = {65, 30}, extent = {{-9, 2}, {9, -2}}, textString = "Force in N", textStyle = {TextStyle.Bold}), Text(origin = {67, 2}, extent = {{-9, 2}, {9, -2}}, textString = "FR in mm", textStyle = {TextStyle.Bold})}),
experiment(StartTime = 0, StopTime = 1.5, Tolerance = 1e-06, Interval = 0.003),
__OpenModelica_commandLineOptions = "--matchingAlgorithm=PFPlusExt --indexReductionMethod=dynamicStateSelection --allowNonStandardModelica=reinitInAlgorithms -d=initialization,NLSanalyticJacobian",
__OpenModelica_simulationFlags(lv = "LOG_STDOUT,LOG_ASSERT,LOG_STATS", s = "dassl", variableFilter = ".*"));
end PinAssemblyProcess;