Migration to OpenModelica 1.25 and FMUs Generation

This commit is contained in:
2026-05-26 09:37:35 +02:00
parent fdf293ece6
commit fe90b840ed
370 changed files with 968105 additions and 743 deletions

View File

@@ -0,0 +1,76 @@
model AIDA_System "AIDAModel-integrationProSivic_reference.isx"
AIDAModelica.QuadcopterModel quadcopterModel1(rigidBodyKinematicModel1(computeDronePosition1(integrator10(initType = Modelica.Blocks.Types.Init.SteadyState, y_start = -0.29), integrator11(initType = Modelica.Blocks.Types.Init.InitialOutput, y_start = 39), integrator12(initType = Modelica.Blocks.Types.Init.InitialOutput))), rigidBodyDynamicModel1(computeDroneVelocity1(integrator4(initType = Modelica.Blocks.Types.Init.SteadyState)))) annotation(
Placement(visible = true, transformation(origin = {16.4, 7.25}, extent = {{-10.6, -13.25}, {10.6, 13.25}}, rotation = 0)));
AIDAModelica.LowLevelFlightControlSystem lowLevelFlightControlSystem1(controlAltitude1(computeAltitudeConsign1(PID1(k = 30, Ti = 1, Td = 0.1, Nd = 10, initType = Modelica.Blocks.Types.Init.InitialOutput)), pID_2(k = 25, Ti = 0.5, Td = 0.08, initType = Modelica.Blocks.Types.Init.InitialOutput)), attitudeControl1(Test_CstMomentumActiv = false, Test_open_loop = {false, false, false}, controlRollAngle1(xAngularSpeedErrorModel1(Kwphi = 1.5), PID(k = 0.07, Ti = 30, Td = 0.02, Nd = 0.1, initType = Modelica.Blocks.Types.Init.InitialOutput, Add(k1 = 1, k2 = 1, k3 = 1))), controlPitchAngle1(yAngularSpeedErrorModel1(Kwteta = 1.5, RTStepConsign = false), PID1(k = 0.07, Ti = 30, Td = 0.02, Nd = 0.1, initType = Modelica.Blocks.Types.Init.InitialOutput, Add(k1 = 1, k2 = 1, k3 = 1))), controlYawAngle1(zAngularSpeedErrorModel1(Kwyaw = 2), PID2(k = 0.04, Ti = 20, Td = 0.5, Nd = 2.5, initType = Modelica.Blocks.Types.Init.InitialOutput, Add(k1 = 1, k2 = 1, k3 = 1)))), positionControl1(controlSpeed1(PID(k = 0.8, Ti = 1, initType = Modelica.Blocks.Types.Init.InitialOutput), PID2(k = 0.8, Ti = 1, initType = Modelica.Blocks.Types.Init.InitialOutput), PID1(k = 30, Ti = 1, Td = 0.1, initType = Modelica.Blocks.Types.Init.InitialOutput)))) annotation(
Placement(visible = true, transformation(origin = {-2.96, 1.52}, extent = {{-34.04, -5.52}, {-11.04, 17.48}}, rotation = 0)));
AIDAModelica.ControlDroneNavigation Control_Navigation annotation(
Placement(transformation(origin = {-8.1, 6.3}, extent = {{-86.9, -3.3}, {-64.9, 18.7}})));
AIDAModelica.RemoteControl remoteControl1(VS_cmd = -0.5, Pitch_cmd = 0.02, VS_cmd_t = {1000, 1001}, Roll_cmd_t = {1000, 1001}, Pitch_cmd_t = {1000, 1001}, Yaw_cmd_t = {1000, 1001}, Auto_Ctl_t = 0.1) annotation(
Placement(transformation(origin = {-2, 10}, extent = {{-37, 29}, {-12, 49}})));
Requirements.StabilityRequirement stabilityRequirement1(hoverTolerance = 1.5) annotation(
Placement(transformation(origin = {-46, -38}, extent = {{-10, -10}, {10, 10}})));
AIDAModelica.WindProfile windProfile annotation(
Placement(transformation(origin = {16, 44}, extent = {{-10, -10}, {10, 10}})));
equation
connect(remoteControl1.RollCommand, lowLevelFlightControlSystem1.RCAttitudeCommands[1]) annotation(
Line(points = {{-29, 39}, {-29, 29}, {-27, 29}, {-27, 19}}, color = {0, 0, 127}, thickness = 0.0625));
connect(remoteControl1.PitchCommand, lowLevelFlightControlSystem1.RCAttitudeCommands[2]) annotation(
Line(points = {{-24, 39}, {-24, 22}, {-27, 22}, {-27, 19}}, color = {0, 0, 127}, thickness = 0.0625));
connect(lowLevelFlightControlSystem1.RCVerticalSpeedCommand, remoteControl1.VerticalSpeedCommand) annotation(
Line(points = {{-31, 19}, {-31.75, 19}, {-31.75, 39}, {-34, 39}}, color = {0, 0, 127}));
connect(remoteControl1.YawCommand, lowLevelFlightControlSystem1.RCYawCommand) annotation(
Line(points = {{-19, 39}, {-19, 31}, {-18, 31}, {-18, 20}, {-24, 20}, {-24, 18}}, color = {0, 0, 127}));
connect(quadcopterModel1.Attitude[3], stabilityRequirement1.yaw) annotation(
Line(points = {{28, 12}, {44, 12}, {44, -38}, {-34, -38}}, color = {0, 0, 127}));
connect(Control_Navigation.YawConsign, stabilityRequirement1.yawConsign) annotation(
Line(points = {{-44, 14}, {-44, -26}, {-52, -26}}, color = {0, 0, 127}));
connect(quadcopterModel1.Position[1], stabilityRequirement1.posX) annotation(
Line(points = {{28, 8}, {48, 8}, {48, -32}, {-34, -32}}, color = {0, 0, 127}));
connect(quadcopterModel1.Position[2], stabilityRequirement1.posY) annotation(
Line(points = {{28, 8}, {48, 8}, {48, -44}, {-34, -44}}, color = {0, 0, 127}));
connect(lowLevelFlightControlSystem1.ThrottleCommand1, quadcopterModel1.ThrottleCommand1) annotation(
Line(points = {{-14, 14}, {6, 14}}, color = {0, 0, 127}));
connect(lowLevelFlightControlSystem1.ThrottleCommand2, quadcopterModel1.ThrottleCommand2) annotation(
Line(points = {{-14, 10}, {-5.5, 10}, {-5.5, 9}, {6, 9}}, color = {0, 0, 127}));
connect(lowLevelFlightControlSystem1.ThrottleCommand3, quadcopterModel1.ThrottleCommand3) annotation(
Line(points = {{-14, 6}, {-5, 6}, {-5, 5}, {6, 5}}, color = {0, 0, 127}));
connect(lowLevelFlightControlSystem1.ThrottleCommand4, quadcopterModel1.ThrottleCommand4) annotation(
Line(points = {{-14, 0}, {-3.5, 0}, {-3.5, 1}, {6, 1}}, color = {0, 0, 127}));
connect(quadcopterModel1.Accelerations, lowLevelFlightControlSystem1.Accelerations) annotation(
Line(points = {{28, -1}, {30, -1}, {30, -8}, {-18, -8}, {-18, -4}}, color = {0, 0, 127}));
connect(quadcopterModel1.Speed, lowLevelFlightControlSystem1.Speed) annotation(
Line(points = {{28, 3}, {32, 3}, {32, -10}, {-22, -10}, {-22, -4}}, color = {0, 0, 127}));
connect(quadcopterModel1.Position, lowLevelFlightControlSystem1.Position) annotation(
Line(points = {{28, 7}, {34, 7}, {34, -12}, {-26, -12}, {-26, -4}}, color = {0, 0, 127}));
connect(quadcopterModel1.Attitude, lowLevelFlightControlSystem1.Attitude) annotation(
Line(points = {{28, 12}, {36, 12}, {36, -14}, {-29, -14}, {-29, -4}}, color = {0, 0, 127}));
connect(quadcopterModel1.AngularVelocities, lowLevelFlightControlSystem1.AngularSpeed) annotation(
Line(points = {{28, 16}, {42, 16}, {42, -16}, {-33, -16}, {-33, -4}}, color = {0, 0, 127}));
connect(Control_Navigation.YawConsign, lowLevelFlightControlSystem1.YawConsign) annotation(
Line(points = {{-44, 14}, {-45, 14}, {-45, 5}, {-37, 5}}, color = {0, 0, 127}, thickness = 0.0625));
connect(Control_Navigation.DronPositionConsign[:], lowLevelFlightControlSystem1.DronePositionConsign[:]) annotation(
Line(points = {{-49, 14}, {-37, 14}}, color = {0, 0, 127}, thickness = 0.0625));
connect(lowLevelFlightControlSystem1.SelectedControlMode, Control_Navigation.SelectedControlMode) annotation(
Line(points = {{-37, 1}, {-43, 1}, {-43, 6}, {-44, 6}}, color = {255, 0, 255}, thickness = 0.0625));
connect(quadcopterModel1.Attitude[3], Control_Navigation.Yaw) annotation(
Line(points = {{28, 12}, {40, 12}, {40, 5}, {-98, 5}}, color = {0, 0, 127}));
connect(Control_Navigation.DronPositionConsign[1], stabilityRequirement1.DronePositionConsign[1]) annotation(
Line(points = {{-44, 22}, {-44, -3}, {-40, -3}, {-40, -26}}, color = {0, 0, 127}, thickness = 0.5));
connect(Control_Navigation.DronPositionConsign[2], stabilityRequirement1.DronePositionConsign[2]) annotation(
Line(points = {{-44, 22}, {-44, -3}, {-40, -3}, {-40, -26}}, color = {0, 0, 127}, thickness = 0.5));
connect(Control_Navigation.DronPositionConsign[3], stabilityRequirement1.DronePositionConsign[3]) annotation(
Line(points = {{-44, 22}, {-44, -3}, {-40, -3}, {-40, -26}}, color = {0, 0, 127}, thickness = 0.5));
connect(windProfile.Fx, quadcopterModel1.Fx) annotation(
Line(points = {{10, 33}, {10, 31.5}, {8, 31.5}, {8, 22}}, color = {0, 0, 127}));
connect(windProfile.Fy, quadcopterModel1.Fy) annotation(
Line(points = {{23, 33}, {24, 33}, {24, 22}}, color = {0, 0, 127}));
connect(remoteControl1.ControlMode, Control_Navigation.APEngagement) annotation(
Line(points = {{-38, 44}, {-112, 44}, {-112, 22}, {-98, 22}}, color = {255, 0, 255}));
connect(remoteControl1.IndicatorYawConsign, Control_Navigation.IndicatorYawConsign) annotation(
Line(points = {{-38, 50}, {-116, 50}, {-116, 14}, {-98, 14}}, color = {255, 0, 255}));
annotation(
Icon(coordinateSystem(grid = {3, 2})),
experiment(StartTime = 0, StopTime = 240, Tolerance = 1e-06, Interval = 0.002),
__OpenModelica_simulationFlags(jacobian = "coloredNumerical", s = "dassl", lv = "LOG_STATS"),
uses(Modelica(version = "4.0.0")));
end AIDA_System;