diff --git a/examples/DC-Motor2023.ssp b/examples/DC-Motor2023.ssp index 4960066..5da859e 100644 Binary files a/examples/DC-Motor2023.ssp and b/examples/DC-Motor2023.ssp differ diff --git a/examples/DC-Motor2023/DC-motor-mechanic.ssd b/examples/DC-Motor2023/DC-motor-mechanic.ssd index 4dc1413..30d7fd8 100644 --- a/examples/DC-Motor2023/DC-motor-mechanic.ssd +++ b/examples/DC-Motor2023/DC-motor-mechanic.ssd @@ -44,11 +44,8 @@ - - - - + diff --git a/examples/DC-Motor2023/Design-Specification-DC-Motor-Model.ssd b/examples/DC-Motor2023/Design-Specification-DC-Motor-Model.ssd index 1daba00..6566e17 100644 --- a/examples/DC-Motor2023/Design-Specification-DC-Motor-Model.ssd +++ b/examples/DC-Motor2023/Design-Specification-DC-Motor-Model.ssd @@ -244,10 +244,7 @@ - - - - + diff --git a/examples/DC-Motor2023/SystemStructure.ssd b/examples/DC-Motor2023/SystemStructure.ssd index 3c80fe9..5bddf0f 100644 --- a/examples/DC-Motor2023/SystemStructure.ssd +++ b/examples/DC-Motor2023/SystemStructure.ssd @@ -424,7 +424,7 @@ - + @@ -432,9 +432,6 @@ - - - @@ -470,14 +467,11 @@ - + - - - @@ -514,7 +508,7 @@ - + diff --git a/examples/DC-Motor2023/models/README.md b/examples/DC-Motor2023/models/README.md new file mode 100644 index 0000000..9590b90 --- /dev/null +++ b/examples/DC-Motor2023/models/README.md @@ -0,0 +1,3 @@ +### Models + +These are the Modelica source models used to generate the FMUs of this example. diff --git a/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos b/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos new file mode 100644 index 0000000..a7c92cc --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos @@ -0,0 +1,34 @@ +// Script to export FMUs from library. +// Script generated by Dymola. + +OutputCPUtime = false; +Advanced.Translation.EnableCodeExport=true; +Advanced.FMI.CrossExport=true; + +translateModelFMU( + "sse_edrive.stimuli", + false, + "stimuli_model", + "2", + "all", + true, + 0, + fill("", 0)); +translateModelFMU( + "sse_edrive.emachine", + false, + "emachine_model", + "2", + "all", + true, + 0, + fill("", 0)); +translateModelFMU( + "sse_edrive.mass_damper", + false, + "edrive_mass", + "2", + "all", + true, + 0, + fill("", 0)); diff --git a/examples/DC-Motor2023/models/sse_edrive/emachine.mo b/examples/DC-Motor2023/models/sse_edrive/emachine.mo new file mode 100644 index 0000000..25f4fec --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/emachine.mo @@ -0,0 +1,110 @@ +within sse_edrive; +model emachine "DC-Motor for a mild hybrid application" + Modelica.Electrical.Analog.Basic.Ground ground + annotation (Placement(transformation(extent={{-20,-60},{0,-40}}))); + Modelica.Electrical.Analog.Basic.Resistor resistor( + R=1, + T_ref=300.15, + alpha=0, + T=300.15) annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=180, + origin={-10,60}))); + Modelica.Electrical.Analog.Basic.Inductor inductor(L=0.001, i(start=0)) annotation (Placement( + transformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={40,40}))); + Modelica.Electrical.Analog.Basic.RotationalEMF emf(k=0.01) annotation (Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=180, + origin={40,0}))); + Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=270, + origin={-60,0}))); + Modelica.Blocks.Interfaces.RealOutput I(unit="A") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-110,-60}))); + Modelica.Mechanics.Rotational.Components.AngleToTorqueAdaptor angleToTorqueAdaptor(use_a=false) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={60,0}))); + Modelica.Blocks.Interfaces.RealInput w(unit="rad/s") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=180, + origin={120,-20}))); + Modelica.Blocks.Interfaces.RealInput phi(unit="rad") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=180, + origin={120,-60}))); + Modelica.Blocks.Interfaces.RealOutput M(unit="N.m") annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=180, + origin={110,60}))); + Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-60,40}))); + Modelica.Blocks.Interfaces.RealInput U(unit="V") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-120,60}))); +equation + connect(currentSensor.i, I) + annotation (Line(points={{-71,0},{-88,0},{-88,-60},{-110,-60}}, color={0,0,127})); + connect(angleToTorqueAdaptor.flange, emf.flange) + annotation (Line(points={{58,0},{50,0}}, color={0,0,0})); + connect(angleToTorqueAdaptor.w, w) + annotation (Line(points={{63,-5},{83,-5},{83,-20},{120,-20}}, color={0,0,127})); + connect(angleToTorqueAdaptor.tau, M) + annotation (Line(points={{63,8},{76,8},{76,60},{110,60}}, color={0,0,127})); + connect(phi, angleToTorqueAdaptor.phi) + annotation (Line(points={{120,-60},{76,-60},{76,-8},{63,-8}}, color={0,0,127})); + connect(resistor.n, inductor.p) annotation (Line(points={{0,60},{40,60},{40,50}}, color={0,0,255})); + connect(emf.p, inductor.n) annotation (Line(points={{40,10},{40,30}}, color={0,0,255})); + connect(emf.n, ground.p) annotation (Line(points={{40,-10},{40,-40},{-10,-40}}, color={0,0,255})); + connect(ground.p, currentSensor.p) + annotation (Line(points={{-10,-40},{-60,-40},{-60,-10}},color={0,0,255})); + connect(signalVoltage.v, U) + annotation (Line(points={{-72,40},{-90,40},{-90,60},{-120,60}}, color={0,0,127})); + connect(signalVoltage.p, resistor.p) + annotation (Line(points={{-60,50},{-60,60},{-20,60}}, color={0,0,255})); + connect(signalVoltage.n, currentSensor.n) + annotation (Line(points={{-60,30},{-60,10}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false)), + __Dymola_UserMetaData(MetaData(category="DC-Motor-el Meta-Data (DC-Motor-el.srmd)", value={{ + "Type: de.setlevel.srmd.model-meta-data=",""},{"model.type","physical principle"},{ + "physical-principle.family","ex: Electrical"},{"physical-principle.name","ex: motor"},{ + "physical-principle.technology","ex: DC"},{"physical-principle.technology.variant", + "ex: el-magn"},{"model.manufacturer","GlueParticle"},{"model.family"," DC-Motor"},{ + "model.name","DC-Motor-el"},{"model.version","GPsim2.03"},{"model.releasedate", + "2022-02-01"},{"model.releasestatus","In Development"},{"model.guid", + "For FMU-based models, this should be the GUID of the FMU, e.g. 7ae4-210f-dead-beef-0422"}, + {"model.purpose","Pre-development of systems with DC-motors"},{ + "model.modelling-approach", + "basic physical equations of the electrical part of a DC motor is causal modeled"},{ + "model.preconditions","-none-"},{"model.validity-range","basic physical equations"},{ + "model.specification","link to specification document"},{"model.verification.status", + "false"},{"model.verification.report",""},{"model.validation.concept",""},{ + "model.validation.status","false"},{"model.validation.platform", + "Dymola V112 and PMSF FMIBench 1.9.9.4 on Windows 10 1809"},{"model.validation.report", + ""},{"model.limitations","This delivery is a pre-release and the model is intended to be used for pre-development + The model is not validated; thus it is not intended to be used for validation or verification of any actuator. + + This delivery is not developed according to process defined in ISO 26262 (Standard for Functional Safety). + "},{"model.implementation.format","FMI 2.0"},{"model.implementation.preconditions", + "Model needs Windows 10 1809 or newer or Linux"},{ + "model.implementation.performance-characteristics", + "Potentially real-time capable, simple differential equation 1 order"},{ + "model.integration.requirements", + "link to requirements and considerations for operating the model"},{ + "Type: de.setlevel.srmd.ISO-11010-X=",""},{"part", + "The part of the ISO-11010 relevant for model, for example 1 if ISO-11010-1"},{"plant", + "The relevant nomencalture convention for the plant part of the model if applicable, for example a Model of the Brake physical system: BRM2.2"}, + {"controller", + "The relevant nomencalture convention for the controller part of the model if applicable, for example a Model of the Brake controller system: BRC2.1"}}))); +end emachine; diff --git a/examples/DC-Motor2023/models/sse_edrive/mass.mo b/examples/DC-Motor2023/models/sse_edrive/mass.mo new file mode 100644 index 0000000..812a2b4 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/mass.mo @@ -0,0 +1,59 @@ +within sse_edrive; +model mass "Rotational mass (load)" + Modelica.Mechanics.Rotational.Components.TorqueToAngleAdaptor torqueToAngleAdaptor(use_a=false) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-50,0}))); + Modelica.Mechanics.Rotational.Components.TorqueToAngleAdaptor torqueToAngleAdaptor1(use_a=false) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={50,0}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia( + J=0.002, + phi(start=0), + w(start=0), + a(start=0)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + Modelica.Blocks.Interfaces.RealInput M_A(unit="N.m") + annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); + Modelica.Blocks.Interfaces.RealOutput wA(unit="rad/s") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-110,-20}))); + Modelica.Blocks.Interfaces.RealOutput phiA(unit="rad") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-110,-60}))); + Modelica.Blocks.Interfaces.RealInput M_B(unit="N.m") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=180, + origin={120,-60}))); + Modelica.Blocks.Interfaces.RealOutput wB(unit="rad/s") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={110,20}))); + Modelica.Blocks.Interfaces.RealOutput phiB(unit="rad") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={110,60}))); +equation + connect(inertia.flange_a, torqueToAngleAdaptor.flange) + annotation (Line(points={{-10,0},{-48,0}}, color={0,0,0})); + connect(inertia.flange_b, torqueToAngleAdaptor1.flange) + annotation (Line(points={{10,0},{48,0}}, color={0,0,0})); + connect(torqueToAngleAdaptor.tau, M_A) + annotation (Line(points={{-53,8},{-80,8},{-80,60},{-120,60}}, color={0,0,127})); + connect(torqueToAngleAdaptor.w, wA) + annotation (Line(points={{-53,-5},{-80.5,-5},{-80.5,-20},{-110,-20}}, color={0,0,127})); + connect(torqueToAngleAdaptor.phi, phiA) + annotation (Line(points={{-53,-8},{-70,-8},{-70,-60},{-110,-60}}, color={0,0,127})); + connect(torqueToAngleAdaptor1.phi, phiB) + annotation (Line(points={{53,8},{70,8},{70,60},{110,60}}, color={0,0,127})); + connect(torqueToAngleAdaptor1.w, wB) + annotation (Line(points={{53,5},{80,5},{80,20},{110,20}}, color={0,0,127})); + connect(torqueToAngleAdaptor1.tau, M_B) + annotation (Line(points={{53,-8},{80,-8},{80,-60},{120,-60}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false))); +end mass; diff --git a/examples/DC-Motor2023/models/sse_edrive/mass_damper.mo b/examples/DC-Motor2023/models/sse_edrive/mass_damper.mo new file mode 100644 index 0000000..e10f403 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/mass_damper.mo @@ -0,0 +1,16 @@ +within sse_edrive; +model mass_damper "Rotational mass with damper" + extends mass; + Modelica.Mechanics.Rotational.Components.Damper damper(d=0.001) + annotation (Placement(transformation(extent={{-10,-50},{10,-30}}))); + Modelica.Mechanics.Rotational.Components.Fixed fixed + annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); +equation + connect(fixed.flange, damper.flange_b) annotation (Line(points={{30,-40},{10,-40}}, color={0,0,0})); + connect(inertia.flange_a, torqueToAngleAdaptor.flange) + annotation (Line(points={{-10,0},{-48,0}}, color={0,0,0})); + connect(inertia.flange_a, damper.flange_a) + annotation (Line(points={{-10,0},{-30,0},{-30,-40},{-10,-40}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false))); +end mass_damper; diff --git a/examples/DC-Motor2023/models/sse_edrive/package.mo b/examples/DC-Motor2023/models/sse_edrive/package.mo new file mode 100644 index 0000000..adb6789 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/package.mo @@ -0,0 +1,9 @@ +within ; +package sse_edrive "ProSTEP Smart System Engineering DCMmotor example" + + annotation ( + uses(Modelica(version="4.0.0")), + version="1.2.0", + conversion(noneFromVersion=""), + versionDate="2024-02-16"); +end sse_edrive; diff --git a/examples/DC-Motor2023/models/sse_edrive/package.order b/examples/DC-Motor2023/models/sse_edrive/package.order new file mode 100644 index 0000000..3b982c8 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/package.order @@ -0,0 +1,7 @@ +emachine +mass +mass_damper +spring_mass +stimuli +test_spring_mass +test diff --git a/examples/DC-Motor2023/models/sse_edrive/spring_mass.mo b/examples/DC-Motor2023/models/sse_edrive/spring_mass.mo new file mode 100644 index 0000000..bf77e78 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/spring_mass.mo @@ -0,0 +1,71 @@ +within sse_edrive; +model spring_mass "Rotational mass with damper and spring in series" + Modelica.Mechanics.Rotational.Components.TorqueToAngleAdaptor torqueToAngleAdaptor1(use_a=false) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={60,0}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia(J=1) + annotation (Placement(transformation(extent={{20,-10},{40,10}}))); + Modelica.Blocks.Interfaces.RealInput M_B(unit="N.m") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=180, + origin={120,-60}))); + Modelica.Blocks.Interfaces.RealOutput wB(unit="rad/s") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={110,20}))); + Modelica.Blocks.Interfaces.RealOutput phiB(unit="rad") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={110,60}))); + Modelica.Mechanics.Rotational.Components.AngleToTorqueAdaptor angleToTorqueAdaptor(use_a=false) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-50,0}))); + Modelica.Blocks.Interfaces.RealInput wA(unit="rad/s") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-120,20}))); + Modelica.Blocks.Interfaces.RealInput phiA(unit="rad") annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-120,60}))); + Modelica.Blocks.Interfaces.RealOutput M_A(unit="N.m") annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={-110,-60}))); + Modelica.Mechanics.Rotational.Components.SpringDamper springDamper( + c=1, + d=1, + phi_rel0=0) annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); + Modelica.Mechanics.Rotational.Components.Damper damper(d=1) + annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); + Modelica.Mechanics.Rotational.Components.Fixed fixed + annotation (Placement(transformation(extent={{50,-50},{70,-30}}))); +equation + connect(inertia.flange_b, torqueToAngleAdaptor1.flange) + annotation (Line(points={{40,0},{58,0}}, color={0,0,0})); + connect(torqueToAngleAdaptor1.phi, phiB) + annotation (Line(points={{63,8},{70,8},{70,60},{110,60}}, color={0,0,127})); + connect(torqueToAngleAdaptor1.w, wB) + annotation (Line(points={{63,5},{79.5,5},{79.5,20},{110,20}}, color={0,0,127})); + connect(torqueToAngleAdaptor1.tau, M_B) + annotation (Line(points={{63,-8},{78,-8},{78,-60},{120,-60}}, color={0,0,127})); + connect(angleToTorqueAdaptor.tau, M_A) + annotation (Line(points={{-53,-8},{-80,-8},{-80,-60},{-110,-60}}, color={0,0,127})); + connect(phiA, angleToTorqueAdaptor.phi) + annotation (Line(points={{-120,60},{-60,60},{-60,8},{-53,8}}, color={0,0,127})); + connect(angleToTorqueAdaptor.w, wA) + annotation (Line(points={{-53,5},{-80,5},{-80,20},{-120,20}}, color={0,0,127})); + connect(inertia.flange_a, springDamper.flange_b) + annotation (Line(points={{20,0},{0,0}}, color={0,0,0})); + connect(springDamper.flange_a, angleToTorqueAdaptor.flange) + annotation (Line(points={{-20,0},{-48,0}}, color={0,0,0})); + connect(damper.flange_a, inertia.flange_a) + annotation (Line(points={{20,-40},{12,-40},{12,0},{20,0}}, color={0,0,0})); + connect(fixed.flange, damper.flange_b) annotation (Line(points={{60,-40},{40,-40}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false))); +end spring_mass; diff --git a/examples/DC-Motor2023/models/sse_edrive/stimuli.mo b/examples/DC-Motor2023/models/sse_edrive/stimuli.mo new file mode 100644 index 0000000..c6f998a --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/stimuli.mo @@ -0,0 +1,17 @@ +within sse_edrive; +model stimuli "Stimulus of e-drive example" + Modelica.Blocks.Sources.Step Voltage_step( + startTime=0, + height=12, + y(unit="V")) annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); + Modelica.Blocks.Sources.Constant MLoad(k=0.05, y(unit="N.m")) + annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); + Modelica.Blocks.Interfaces.RealOutput M_load(unit="N.m") + annotation (Placement(transformation(rotation=0, extent={{100,-70},{120,-50}}))); + Modelica.Blocks.Interfaces.RealOutput U(unit="V") + annotation (Placement(transformation(rotation=0, extent={{100,50},{120,70}}))); +equation + connect(Voltage_step.y, U) + annotation (Line(points={{-39,40},{32,40},{32,60},{110,60}}, color={0,0,127})); + connect(MLoad.y, M_load) annotation (Line(points={{-39,-60},{110,-60}}, color={0,0,127})); +end stimuli; diff --git a/examples/DC-Motor2023/models/sse_edrive/test.mo b/examples/DC-Motor2023/models/sse_edrive/test.mo new file mode 100644 index 0000000..e0ebeb0 --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/test.mo @@ -0,0 +1,78 @@ +within sse_edrive; +model test "Test model for DC-Motor e-machine with load" + emachine my_emachine(emf(k=0.03), resistor(R=0.1)) + annotation (Placement(transformation(extent={{-30,-20},{10,20}}))); + mass_damper my_mass annotation (Placement(transformation(extent={{40,-20},{80,20}}))); + sse_edrive.stimuli stimuli(MLoad(k=1.0), Voltage_step(height=48.0)) + annotation (Placement(transformation(rotation=0, extent={{-100,-20},{-60,20}}))); +equation + connect(my_emachine.M, my_mass.M_A) annotation (Line(points={{12,12},{36,12}}, color={0,0,127})); + connect(my_mass.wA, my_emachine.w) annotation (Line(points={{38,-4},{14,-4}}, color={0,0,127})); + connect(my_mass.phiA, my_emachine.phi) + annotation (Line(points={{38,-12},{14,-12}}, color={0,0,127})); + connect(stimuli.M_load, my_mass.M_B) annotation (Line(points={{-58,-12},{-50,-12},{-50,-40},{94,-40}, + {94,-12},{84,-12}}, color={0,0,127})); + connect(stimuli.U, my_emachine.U) annotation (Line(points={{-58,12},{-34,12}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false)), + __Dymola_Commands(executeCall( + description="Plot significant signals in the model", + ensureSimulated=true, + autoRun=true) = {createPlot( + id=1, + position={15,15,1135,582}, + y={"stimuli.U"}, + range={0.0,1.0,40.0,55.0}, + grid=true, + subPlot=101, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"V"}),createPlot( + id=1, + position={15,15,1135,582}, + y={"my_emachine.I"}, + range={0.0,1.0,-200.0,600.0}, + grid=true, + subPlot=203, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"A"}),createPlot( + id=1, + position={15,15,1135,582}, + y={"my_mass.phiB"}, + range={0.0,1.0,-500.0,1500.0}, + grid=true, + subPlot=103, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"rad"}),createPlot( + id=1, + position={15,15,1135,582}, + y={"my_mass.M_A"}, + range={0.0,1.0,-15.0,5.0}, + grid=true, + subPlot=202, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"N.m"}),createPlot( + id=1, + position={15,15,1135,582}, + y={"my_mass.wB"}, + range={0.0,1.0,-500.0,2000.0}, + grid=true, + subPlot=102, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"rad/s"}),createPlot( + id=1, + position={15,15,1135,582}, + y={"stimuli.M_load"}, + range={0.0,1.0,-1.2000000000000002,-0.8000000000000002}, + grid=true, + subPlot=201, + colors={{28,108,200}}, + timeUnit="s", + displayUnits={"N.m"})} "Plot KPI", file(description="Export FMUs for SSP") = + "Export FMUs.mos" "Export FMUs"), + experiment(StopTime=1, __Dymola_Algorithm="Dassl")); +end test; diff --git a/examples/DC-Motor2023/models/sse_edrive/test_spring_mass.mo b/examples/DC-Motor2023/models/sse_edrive/test_spring_mass.mo new file mode 100644 index 0000000..b1c38ad --- /dev/null +++ b/examples/DC-Motor2023/models/sse_edrive/test_spring_mass.mo @@ -0,0 +1,26 @@ +within sse_edrive; +model test_spring_mass "Test model for two masses and spring" + emachine my_emachine annotation (Placement(transformation(extent={{-80,-60},{-40,-20}}))); + mass mass1 annotation (Placement(transformation(extent={{-20,-60},{20,-20}}))); + spring_mass spring_mass1 annotation (Placement(transformation(extent={{40,-60},{78,-20}}))); + Modelica.Blocks.Sources.Step step(height=100) + annotation (Placement(transformation(extent={{-58,40},{-38,60}}))); + Modelica.Blocks.Sources.Constant const + annotation (Placement(transformation(extent={{20,40},{40,60}}))); +equation + connect(my_emachine.M, mass1.M_A) annotation (Line(points={{-38,-28},{-24,-28}}, color={0,0,127})); + connect(mass1.wA, my_emachine.w) annotation (Line(points={{-22,-44},{-36,-44}}, color={0,0,127})); + connect(mass1.phiA, my_emachine.phi) + annotation (Line(points={{-22,-52},{-36,-52}}, color={0,0,127})); + connect(spring_mass1.M_A, mass1.M_B) + annotation (Line(points={{38.1,-52},{24,-52}}, color={0,0,127})); + connect(spring_mass1.wA, mass1.wB) annotation (Line(points={{36.2,-36},{22,-36}}, color={0,0,127})); + connect(spring_mass1.phiA, mass1.phiB) + annotation (Line(points={{36.2,-28},{22,-28}}, color={0,0,127})); + connect(const.y, spring_mass1.M_B) + annotation (Line(points={{41,50},{90,50},{90,-52},{81.8,-52}}, color={0,0,127})); + connect(step.y, my_emachine.U) annotation (Line(points={{-37,50},{-20,50},{-20,10},{-90,10},{-90,-28}, + {-84,-28}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( + preserveAspectRatio=false))); +end test_spring_mass; diff --git a/examples/DC-Motor2023/resources/edrive_mass.fmu b/examples/DC-Motor2023/resources/edrive_mass.fmu index 03efb07..d469086 100644 Binary files a/examples/DC-Motor2023/resources/edrive_mass.fmu and b/examples/DC-Motor2023/resources/edrive_mass.fmu differ diff --git a/examples/DC-Motor2023/resources/emachine_model.fmu b/examples/DC-Motor2023/resources/emachine_model.fmu index c447023..39d9fb5 100644 Binary files a/examples/DC-Motor2023/resources/emachine_model.fmu and b/examples/DC-Motor2023/resources/emachine_model.fmu differ diff --git a/examples/DC-Motor2023/resources/stimuli_model.fmu b/examples/DC-Motor2023/resources/stimuli_model.fmu index 178ddb9..12ccfdd 100644 Binary files a/examples/DC-Motor2023/resources/stimuli_model.fmu and b/examples/DC-Motor2023/resources/stimuli_model.fmu differ