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,78 @@
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.InitPID.InitialOutput)), pID_2(k = 25, Ti = 0.5, Td = 0.08, initType = Modelica.Blocks.Types.InitPID.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.InitPID.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.InitPID.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.InitPID.InitialOutput, Add(k1 = 1, k2 = 1, k3 = 1)))), positionControl1(controlSpeed1(PID(k = 0.8, Ti = 1, initType = Modelica.Blocks.Types.InitPID.InitialOutput), PID2(k = 0.8, Ti = 1, initType = Modelica.Blocks.Types.InitPID.InitialOutput), PID1(k = 30, Ti = 1, Td = 0.1, initType = Modelica.Blocks.Types.InitPID.InitialOutput)))) annotation(
Placement(visible = true, transformation(origin = {-2.96, 1.52}, extent = {{-34.04, -5.52}, {-11.04, 17.48}}, rotation = 0)));
AIDAModelica.ControlDroneNavigation controlDroneNavigation1 annotation(
Placement(visible = true, transformation(origin = {15.9, 0.3}, extent = {{-86.9, -3.3}, {-64.9, 18.7}}, rotation = 0)));
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(visible = true, transformation(extent = {{-37, 29}, {-12, 49}}, rotation = 0)));
AIDAModelica.WindProfile windProfile1 annotation(
Placement(visible = true, transformation(origin = {16, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Requirements.StabilityRequirement stabilityRequirement1 annotation(
Placement(visible = true, transformation(origin = {-44, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(windProfile1.Fy, quadcopterModel1.Fy) annotation(
Line(points = {{21, 29}, {22, 29}, {22, 22}}, color = {0, 0, 127}));
connect(windProfile1.Fx, quadcopterModel1.Fx) annotation(
Line(points = {{11, 29}, {11, 26.5}, {12, 26.5}, {12, 22}}, color = {0, 0, 127}));
connect(remoteControl1.RollCommand, lowLevelFlightControlSystem1.RCAttitudeCommands[1]) annotation(
Line(points = {{-27, 29}, {-27, 19}}, color = {0, 0, 127}, thickness = 0.0625));
connect(remoteControl1.PitchCommand, lowLevelFlightControlSystem1.RCAttitudeCommands[2]) annotation(
Line(points = {{-22, 29}, {-22, 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, 29}, {-32, 29}}, color = {0, 0, 127}));
connect(remoteControl1.YawCommand, lowLevelFlightControlSystem1.RCYawCommand) annotation(
Line(points = {{-17, 29}, {-18, 29}, {-18, 20}, {-24, 20}, {-24, 18}}, color = {0, 0, 127}));
connect(remoteControl1.ControlMode, controlDroneNavigation1.APEngagement) annotation(
Line(points = {{-37, 34}, {-76, 34}, {-76, 14}, {-71, 14}}, color = {255, 0, 255}, thickness = 0.015625));
connect(remoteControl1.IndicatorYawConsign, controlDroneNavigation1.IndicatorYawConsign) annotation(
Line(points = {{-37, 39}, {-78, 39}, {-78, 8}, {-71, 8}}, color = {255, 0, 255}));
connect(quadcopterModel1.Attitude[3], stabilityRequirement1.yaw) annotation(
Line(points = {{28, 12}, {44, 12}, {44, -31}, {-34, -31}}, color = {0, 0, 127}));
connect(controlDroneNavigation1.YawConsign, stabilityRequirement1.yawConsign) annotation(
Line(points = {{-50, 8}, {-48, 8}, {-48, -22}}, color = {0, 0, 127}));
connect(quadcopterModel1.Position[1], stabilityRequirement1.posX) annotation(
Line(points = {{28, 8}, {48, 8}, {48, -26}, {-34, -26}}, color = {0, 0, 127}));
connect(quadcopterModel1.Position[2], stabilityRequirement1.posY) annotation(
Line(points = {{28, 8}, {48, 8}, {48, -38}, {-34, -38}}, color = {0, 0, 127}));
connect(controlDroneNavigation1.DronPositionConsign[1], stabilityRequirement1.DronePositionConsign[1]) annotation(
Line(points = {{-50, 14}, {-44, 14}, {-44, -22}}, color = {0, 0, 127}));
connect(controlDroneNavigation1.DronPositionConsign[2], stabilityRequirement1.DronePositionConsign[2]) annotation(
Line(points = {{-50, 14}, {-44, 14}, {-44, -22}}, color = {0, 0, 127}));
connect(controlDroneNavigation1.DronPositionConsign[3], stabilityRequirement1.DronePositionConsign[3]) annotation(
Line(points = {{-50, 14}, {-44, 14}, {-44, -22}}, color = {0, 0, 127}));
connect(controlDroneNavigation1.Yaw, quadcopterModel1.Attitude[3]) annotation(
Line(points = {{-71, 3}, {-75, 3}, {-75, -18}, {39, -18}, {39, 12}, {28, 12}}, color = {0, 0, 127}));
connect(quadcopterModel1.Speed[:], lowLevelFlightControlSystem1.Speed[:]) annotation(
Line);
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(controlDroneNavigation1.YawConsign, lowLevelFlightControlSystem1.YawConsign) annotation(
Line(points = {{-49, 8}, {-45, 8}, {-45, 5}, {-37, 5}}, color = {0, 0, 127}, thickness = 0.0625));
connect(controlDroneNavigation1.DronPositionConsign[:], lowLevelFlightControlSystem1.DronePositionConsign[:]) annotation(
Line(points = {{-49, 14}, {-37, 14}}, color = {0, 0, 127}, thickness = 0.0625));
connect(lowLevelFlightControlSystem1.SelectedControlMode, controlDroneNavigation1.SelectedControlMode) annotation(
Line(points = {{-37, 1}, {-43, 1}, {-43, 3}, {-49, 3}}, color = {255, 0, 255}, thickness = 0.0625));
annotation(
Icon(coordinateSystem(grid = {3, 2})),
experiment(StartTime = 0, StopTime = 30, Tolerance = 1e-06, Interval = 0.002),
__OpenModelica_simulationFlags(jacobian = "coloredNumerical", s = "dassl", lv = "LOG_STATS"),
uses(Modelica(version = "3.2.2")));
end AIDA_System;