From 29a16bbc796007d564cd334e6dfcc9b92920064c Mon Sep 17 00:00:00 2001 From: AHaumer Date: Tue, 21 Apr 2026 17:11:40 +0200 Subject: [PATCH 1/8] implemented 2 examples for reducing size of reference results. --- .../comparisonSignals.txt | 36 --- .../comparisonSignals.txt | 23 -- ModelicaTest/Electrical/PowerConverters.mo | 254 ------------------ .../ThyristorBridge2mPulse.mo | 98 +++++++ .../ExampleTemplates/package.mo | 3 + .../ExampleTemplates/package.order | 1 + .../ThyristorBridge2mPulse_DC_Drive.mo | 18 ++ ...yristorBridge2mPulse_RLV_Characteristic.mo | 16 ++ .../ACDC/RectifierBridge2mPulse/package.mo | 4 + .../ACDC/RectifierBridge2mPulse/package.order | 2 + .../PowerConverters/Examples/ACDC/package.mo | 4 + .../Examples/ACDC/package.order | 1 + .../PowerConverters/Examples/package.mo | 4 + .../PowerConverters/Examples/package.order | 1 + .../HalfControlledBridge2mPulse.mo | 118 ++++++++ .../ThyristorBridge2mPulse_R.mo | 33 +++ .../Electrical/PowerConverters/package.mo | 5 + .../Electrical/PowerConverters/package.order | 4 + .../comparisonSignals.txt | 39 +++ .../comparisonSignals.txt | 26 ++ 20 files changed, 377 insertions(+), 313 deletions(-) delete mode 100644 ModelicaTest/Electrical/PowerConverters.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/ExampleTemplates/ThyristorBridge2mPulse.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/HalfControlledBridge2mPulse.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/ThyristorBridge2mPulse_R.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/package.order create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt index 54d4a5d58b..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt @@ -1,39 +1,3 @@ time -dcpm.inertiaRotor.phi -dcpm.inertiaRotor.w -inductor.i -lMains.inductor[2].i -lMains.inductor[3].i -meanCurrent.x -meanVoltage.x -pulse2.twomPulse.filter[1].firstOrder.y -pulse2.twomPulse.filter[1].transferFunction[1].x_scaled[1] -pulse2.twomPulse.filter[1].transferFunction[2].x_scaled[1] -pulse2.twomPulse.filter[2].firstOrder.y -pulse2.twomPulse.filter[2].transferFunction[1].x_scaled[1] -pulse2.twomPulse.filter[2].transferFunction[2].x_scaled[1] -pulse2.twomPulse.filter[3].firstOrder.y -pulse2.twomPulse.filter[3].transferFunction[1].x_scaled[1] -pulse2.twomPulse.filter[3].transferFunction[2].x_scaled[1] -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2.twomPulse.timerNegative[1].entryTime -pulse2.twomPulse.timerNegative[2].entryTime -pulse2.twomPulse.timerNegative[3].entryTime -pulse2.twomPulse.timerPositive[1].entryTime -pulse2.twomPulse.timerPositive[2].entryTime -pulse2.twomPulse.timerPositive[3].entryTime -rectifier.pre_n[1].u -rectifier.pre_n[2].u -rectifier.pre_n[3].u -rectifier.pre_p[1].u -rectifier.pre_p[2].u -rectifier.pre_p[3].u -rectifier.thyristor_n.idealThyristor[1].off -rectifier.thyristor_n.idealThyristor[2].off -rectifier.thyristor_n.idealThyristor[3].off -rectifier.thyristor_p.idealThyristor[1].off -rectifier.thyristor_p.idealThyristor[2].off -rectifier.thyristor_p.idealThyristor[3].off -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt index 2053507105..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt @@ -1,26 +1,3 @@ time -inductor.i -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2m.twomPulse.timerNegative[1].entryTime -pulse2m.twomPulse.timerNegative[2].entryTime -pulse2m.twomPulse.timerNegative[3].entryTime -pulse2m.twomPulse.timerPositive[1].entryTime -pulse2m.twomPulse.timerPositive[2].entryTime -pulse2m.twomPulse.timerPositive[3].entryTime -rectifier.pre_n[1].u -rectifier.pre_n[2].u -rectifier.pre_n[3].u -rectifier.pre_p[1].u -rectifier.pre_p[2].u -rectifier.pre_p[3].u -rectifier.thyristor_n.idealThyristor[1].off -rectifier.thyristor_n.idealThyristor[2].off -rectifier.thyristor_n.idealThyristor[3].off -rectifier.thyristor_p.idealThyristor[1].off -rectifier.thyristor_p.idealThyristor[2].off -rectifier.thyristor_p.idealThyristor[3].off -rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Electrical/PowerConverters.mo b/ModelicaTest/Electrical/PowerConverters.mo deleted file mode 100644 index 3f22e6a521..0000000000 --- a/ModelicaTest/Electrical/PowerConverters.mo +++ /dev/null @@ -1,254 +0,0 @@ -within ModelicaTest.Electrical; -package PowerConverters - extends Modelica.Icons.ExamplesPackage; - model HalfControlledBridge2mPulse - "2*m pulse half controlled rectifier bridge with resistive load" - import Modelica_Electrical_PowerConverters = - Modelica.Electrical.PowerConverters; - extends Modelica.Icons.Example; - import Modelica.Constants.pi; - parameter Integer m(final min=3) = 3 "Number of phases" annotation(Evaluate=true); - parameter SI.Voltage Vrms=110 "RMS supply voltage"; - parameter SI.Frequency f=50 "Frequency"; - parameter SI.Angle constantFiringAngle=30*pi/180 - "Firing angle"; - parameter SI.Resistance R=20 "Load resistance"; - - Modelica.Electrical.Polyphase.Sources.SineVoltage sineVoltage( - final m=m, - V=fill(sqrt(2)*Vrms, m), - phase=- - Modelica.Electrical.Polyphase.Functions.symmetricOrientation(m), - f=fill(f, m)) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={-80,-30}))); - Modelica_Electrical_PowerConverters.ACDC.HalfControlledBridge2mPulse - rectifier(final m=m, offStart_p=fill(true, m)) - annotation (Placement(transformation(extent={{-40,24},{-20,44}}))); - Modelica.Electrical.Analog.Sensors.VoltageSensor voltagesensor - annotation (Placement(transformation( - origin={50,10}, - extent={{10,-10},{-10,10}}, - rotation=90))); - Modelica.Blocks.Math.Mean meanVoltage(f=2*m*f) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - origin={80,40}))); - Modelica.Blocks.Math.RootMeanSquare rootMeanSquareVoltage(f=2*m*f) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - origin={80,10}))); - Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=180, - origin={0,-40}))); - Modelica.Blocks.Math.Mean meanCurrent(f=2*m*f) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - origin={80,-60}))); - Modelica_Electrical_PowerConverters.ACDC.Control.VoltageBridge2mPulse - pulse2m( - m=m, - f=f, - useFilter=false, - constantFiringAngle=constantFiringAngle) annotation (Placement( - transformation( - extent={{10,10},{-10,-10}}, - rotation=180, - origin={-30,0}))); - Modelica.Electrical.Polyphase.Basic.MultiStarResistance - multiStarResistance(final m=m) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={-80,-60}))); - Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement( - transformation(extent={{-90,-100},{-70,-80}}))); - Modelica.Electrical.Analog.Basic.Resistor resistor(R=R) annotation ( - Placement(transformation( - origin={30,30}, - extent={{10,-10},{-10,10}}, - rotation=90))); - Modelica.Electrical.Polyphase.Basic.Resistor resistor1(m=m, R=fill(1, m)) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=-90, - origin={-80,-4}))); - equation - connect(meanCurrent.u, currentSensor.i) annotation (Line( - points={{68,-60},{0,-60},{0,-50}}, color={0,0,127})); - connect(voltagesensor.v, meanVoltage.u) annotation (Line( - points={{60,10},{64,10},{64,40},{68,40}}, color={0,0,127})); - connect(voltagesensor.v, rootMeanSquareVoltage.u) annotation (Line( - points={{60,10},{68,10}}, color={0,0,127})); - connect(rectifier.dc_n, currentSensor.n) annotation (Line( - points={{-20,28},{-10,28},{-10,-40}}, color={0,0,255})); - connect(rectifier.dc_p, voltagesensor.p) annotation (Line( - points={{-20,40},{50,40},{50,20}}, color={0,0,255})); - connect(currentSensor.p, voltagesensor.n) annotation (Line( - points={{10,-40},{50,-40},{50,0}}, color={0,0,255})); - connect(pulse2m.fire_p, rectifier.fire_p) annotation (Line( - points={{-36,11},{-36,22}}, color={255,0,255})); - connect(sineVoltage.plug_n, multiStarResistance.plug) annotation ( - Line( - points={{-80,-40},{-80,-50}}, color={0,0,255})); - connect(multiStarResistance.pin, ground.p) annotation (Line( - points={{-80,-70},{-80,-80}}, color={0,0,255})); - connect(resistor.n, currentSensor.p) annotation (Line( - points={{30,20},{30,-40},{10,-40}}, color={0,0,255})); - connect(resistor.p, rectifier.dc_p) annotation (Line( - points={{30,40},{-20,40}}, color={0,0,255})); - connect(sineVoltage.plug_p, resistor1.plug_n) annotation (Line(points={{-80, - -20},{-80,-20},{-80,-14}}, color={0,0,255})); - connect(resistor1.plug_p, rectifier.ac) annotation (Line(points={{-80,6},{ - -80,6},{-80,32},{-80,34},{-40,34}}, color={0,0,255})); - connect(pulse2m.ac, rectifier.ac) annotation (Line(points={{-40,0},{-60,0}, - {-60,16},{-80,16},{-80,34},{-40,34}}, color={0,0,255})); - annotation ( - experiment( - StopTime=0.1, - Tolerance=1e-06, - Interval=0.0002), - Documentation(info=" -

This example shows a half controlled 2*m pulse bridge rectifier with resistive load, where m is the number of phases. In case of resistive load the half controlled bridge shows the same output voltage as the -full controlled bridge.

- -

Plot current currentSensor.i, average current meanCurrent.y, voltage voltageSensor.v and average voltage meanVoltage.v.

- -")); - end HalfControlledBridge2mPulse; - - model ThyristorBridge2mPulse_R - "2*m pulse thyristor rectifier bridge with resistive load" - extends - ModelicaTest.Electrical.PowerConverters.ExampleTemplates.ThyristorBridge2mPulse( - pulse2m(constantFiringAngle=constantFiringAngle)); - extends Modelica.Icons.Example; - import Modelica.Constants.pi; - parameter SI.Angle constantFiringAngle=30*pi/180 - "Firing angle"; - parameter SI.Resistance R=20 "Load resistance"; - Modelica.Electrical.Analog.Basic.Resistor resistor(R=R) annotation ( - Placement(transformation( - origin={30,30}, - extent={{10,-10},{-10,10}}, - rotation=90))); - equation - connect(resistor.n, currentSensor.p) - annotation (Line(points={{30,20},{30,-40},{10,-40}}, color={0,0,255})); - connect(resistor.p, rectifier.dc_p) annotation (Line(points={{30,40},{-10, - 40},{-10,40},{-20,40}}, color={0,0,255})); - annotation ( - experiment( - StopTime=0.1, - Tolerance=1e-06, - Interval=0.0002), - Documentation(info=" -

This example shows a full controlled 2*m pulse bridge rectifier with resistive load, where m is the number of phases. In case of resistive load the full controlled bridge shows the same output voltage as the -half controlled bridge.

- -

Plot current currentSensor.i, average current meanCurrent.y, voltage voltageSensor.v and average voltage meanVoltage.v.

-")); - end ThyristorBridge2mPulse_R; - - package ExampleTemplates - partial model ThyristorBridge2mPulse - "Template of 2*m pulse bridge thyristor rectifier" - extends Modelica.Electrical.PowerConverters.Icons.ExampleTemplate; - import Modelica.Constants.pi; - parameter Integer m(final min=3) = 3 "Number of phases" annotation(Evaluate=true); - parameter SI.Voltage Vrms=110 "RMS supply voltage"; - parameter SI.Frequency f=50 "Frequency"; - - Modelica.Electrical.Polyphase.Sources.SineVoltage sineVoltage( - final m=m, - V=fill(sqrt(2)*Vrms, m), - phase=- - Modelica.Electrical.Polyphase.Functions.symmetricOrientation(m), - f=fill(f, m)) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={-80,-30}))); - Modelica.Electrical.PowerConverters.ACDC.ThyristorBridge2mPulse - rectifier(final m=m) - annotation (Placement(transformation(extent={{-40,24},{-20,44}}))); - Modelica.Electrical.Analog.Sensors.VoltageSensor voltagesensor - annotation (Placement(transformation( - origin={50,10}, - extent={{10,-10},{-10,10}}, - rotation=90))); - Modelica.Blocks.Math.Mean meanVoltage(f=2*m*f) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - origin={80,40}))); - Modelica.Blocks.Math.RootMeanSquare rootMeanSquareVoltage(f=2*m*f) - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - origin={80,10}))); - Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor - annotation (Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=180, - origin={0,-40}))); - Modelica.Blocks.Math.Mean meanCurrent(f=2*m*f) annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - origin={80,-60}))); - Modelica.Electrical.PowerConverters.ACDC.Control.VoltageBridge2mPulse - pulse2m( - m=m, - f=f, - useFilter=false) annotation (Placement(transformation( - extent={{10,10},{-10,-10}}, - rotation=180, - origin={-30,0}))); - Modelica.Electrical.Polyphase.Basic.MultiStarResistance - multiStarResistance(final m=m) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=270, - origin={-80,-60}))); - Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement( - transformation(extent={{-90,-100},{-70,-80}}))); - Modelica.Electrical.Polyphase.Basic.Resistor innerResistor(m=m, R=fill(1, - m)) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=-90, - origin={-80,-4}))); - equation - connect(meanCurrent.u, currentSensor.i) annotation (Line( - points={{68,-60},{0,-60},{0,-50}}, color={0,0,127})); - connect(voltagesensor.v, meanVoltage.u) annotation (Line( - points={{60,10},{64,10},{64,40},{68,40}}, color={0,0,127})); - connect(voltagesensor.v, rootMeanSquareVoltage.u) annotation (Line( - points={{60,10},{68,10}}, color={0,0,127})); - connect(rectifier.dc_n, currentSensor.n) annotation (Line( - points={{-20,28},{-10,28},{-10,-40}}, color={0,0,255})); - connect(rectifier.dc_p, voltagesensor.p) annotation (Line( - points={{-20,40},{50,40},{50,20}}, color={0,0,255})); - connect(currentSensor.p, voltagesensor.n) annotation (Line( - points={{10,-40},{50,-40},{50,0}}, color={0,0,255})); - connect(pulse2m.fire_p, rectifier.fire_p) annotation (Line( - points={{-36,11},{-36,22}}, color={255,0,255})); - connect(pulse2m.fire_n, rectifier.fire_n) annotation (Line( - points={{-24,11},{-24,22}}, color={255,0,255})); - connect(sineVoltage.plug_n, multiStarResistance.plug) annotation ( - Line( - points={{-80,-40},{-80,-50}}, color={0,0,255})); - connect(multiStarResistance.pin, ground.p) annotation (Line( - points={{-80,-70},{-80,-80}}, color={0,0,255})); - connect(pulse2m.ac, rectifier.ac) annotation (Line(points={{-40,0},{-60,0}, - {-60,20},{-80,20},{-80,34},{-40,34}}, color={0,0,255})); - connect(sineVoltage.plug_p, innerResistor.plug_n) annotation (Line(points= - {{-80,-20},{-80,-20},{-80,-14}}, color={0,0,255})); - connect(innerResistor.plug_p, rectifier.ac) - annotation (Line(points={{-80,6},{-80,34},{-40,34}}, color={0,0,255})); - annotation ( - Documentation(info=" -

Template of - -2*m pulse bridge rectifiers, where m is the number of phases; load is not yet included.

-")); - end ThyristorBridge2mPulse; - end ExampleTemplates; -end PowerConverters; diff --git a/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/ThyristorBridge2mPulse.mo b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/ThyristorBridge2mPulse.mo new file mode 100644 index 0000000000..cc3e733345 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/ThyristorBridge2mPulse.mo @@ -0,0 +1,98 @@ +within ModelicaTest.Electrical.PowerConverters.ExampleTemplates; +partial model ThyristorBridge2mPulse + "Template of 2*m pulse bridge thyristor rectifier" + extends Modelica.Electrical.PowerConverters.Icons.ExampleTemplate; + import Modelica.Constants.pi; + parameter Integer m(final min=3) = 3 "Number of phases" annotation(Evaluate=true); + parameter SI.Voltage Vrms=110 "RMS supply voltage"; + parameter SI.Frequency f=50 "Frequency"; + + Modelica.Electrical.Polyphase.Sources.SineVoltage sineVoltage( + final m=m, + V=fill(sqrt(2)*Vrms, m), + phase=- + Modelica.Electrical.Polyphase.Functions.symmetricOrientation(m), + f=fill(f, m)) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-30}))); + Modelica.Electrical.PowerConverters.ACDC.ThyristorBridge2mPulse + rectifier(final m=m) + annotation (Placement(transformation(extent={{-40,24},{-20,44}}))); + Modelica.Electrical.Analog.Sensors.VoltageSensor voltagesensor + annotation (Placement(transformation( + origin={50,10}, + extent={{10,-10},{-10,10}}, + rotation=90))); + Modelica.Blocks.Math.Mean meanVoltage(f=2*m*f) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + origin={80,40}))); + Modelica.Blocks.Math.RootMeanSquare rootMeanSquareVoltage(f=2*m*f) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + origin={80,10}))); + Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=180, + origin={0,-40}))); + Modelica.Blocks.Math.Mean meanCurrent(f=2*m*f) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + origin={80,-60}))); + Modelica.Electrical.PowerConverters.ACDC.Control.VoltageBridge2mPulse + pulse2m( + m=m, + f=f, + useFilter=false) annotation (Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=180, + origin={-30,0}))); + Modelica.Electrical.Polyphase.Basic.MultiStarResistance + multiStarResistance(final m=m) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-60}))); + Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement( + transformation(extent={{-90,-100},{-70,-80}}))); + Modelica.Electrical.Polyphase.Basic.Resistor innerResistor(m=m, R=fill(1, + m)) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={-80,-4}))); +equation + connect(meanCurrent.u, currentSensor.i) annotation (Line( + points={{68,-60},{0,-60},{0,-50}}, color={0,0,127})); + connect(voltagesensor.v, meanVoltage.u) annotation (Line( + points={{60,10},{64,10},{64,40},{68,40}}, color={0,0,127})); + connect(voltagesensor.v, rootMeanSquareVoltage.u) annotation (Line( + points={{60,10},{68,10}}, color={0,0,127})); + connect(rectifier.dc_n, currentSensor.n) annotation (Line( + points={{-20,28},{-10,28},{-10,-40}}, color={0,0,255})); + connect(rectifier.dc_p, voltagesensor.p) annotation (Line( + points={{-20,40},{50,40},{50,20}}, color={0,0,255})); + connect(currentSensor.p, voltagesensor.n) annotation (Line( + points={{10,-40},{50,-40},{50,0}}, color={0,0,255})); + connect(pulse2m.fire_p, rectifier.fire_p) annotation (Line( + points={{-36,11},{-36,22}}, color={255,0,255})); + connect(pulse2m.fire_n, rectifier.fire_n) annotation (Line( + points={{-24,11},{-24,22}}, color={255,0,255})); + connect(sineVoltage.plug_n, multiStarResistance.plug) annotation ( + Line( + points={{-80,-40},{-80,-50}}, color={0,0,255})); + connect(multiStarResistance.pin, ground.p) annotation (Line( + points={{-80,-70},{-80,-80}}, color={0,0,255})); + connect(pulse2m.ac, rectifier.ac) annotation (Line(points={{-40,0},{-60,0}, + {-60,20},{-80,20},{-80,34},{-40,34}}, color={0,0,255})); + connect(sineVoltage.plug_p, innerResistor.plug_n) annotation (Line(points= + {{-80,-20},{-80,-20},{-80,-14}}, color={0,0,255})); + connect(innerResistor.plug_p, rectifier.ac) + annotation (Line(points={{-80,6},{-80,34},{-40,34}}, color={0,0,255})); + annotation ( + Documentation(info=" +

Template of + +2*m pulse bridge rectifiers, where m is the number of phases; load is not yet included.

+")); +end ThyristorBridge2mPulse; diff --git a/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.mo b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.mo new file mode 100644 index 0000000000..bb7debd925 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.mo @@ -0,0 +1,3 @@ +within ModelicaTest.Electrical.PowerConverters; +package ExampleTemplates +end ExampleTemplates; diff --git a/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.order b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.order new file mode 100644 index 0000000000..d1d2d9aecb --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/ExampleTemplates/package.order @@ -0,0 +1 @@ +ThyristorBridge2mPulse diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo new file mode 100644 index 0000000000..5ff6d1ab94 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo @@ -0,0 +1,18 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse; +model ThyristorBridge2mPulse_DC_Drive + "2*m pulse thyristor bridge feeding a DC drive" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse.ThyristorBridge2mPulse_DC_Drive; + annotation ( + experiment( + StopTime=15, + Interval=0.0002, + Tolerance=1e-006, + __MAPLib_ComparisonWindow={2.45, 2.55}), + Documentation(info=" +

+In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. +

+ +

Plot current currentSensor.i, average current meanCurrent.y, voltage voltageSensor.v and average voltage meanVoltage.v.

+")); +end ThyristorBridge2mPulse_DC_Drive; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo new file mode 100644 index 0000000000..7771e940d8 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo @@ -0,0 +1,16 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse; +model ThyristorBridge2mPulse_RLV_Characteristic + "Characteristic of 2*m pulse thyristor rectifier bridge with R-L load and voltage" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse.ThyristorBridge2mPulse_RLV_Characteristic; + annotation ( + experiment( + StopTime=10, + Interval=0.0002, + Tolerance=1e-06, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" +

This example shows a full controlled 2*m pulse bridge rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

+ +

Plot average voltage meanVoltage.v versus firingAngle pulse2m.firingAngle to see control characteristic of this type of rectifier with R-L load including active voltage.

+")); +end ThyristorBridge2mPulse_RLV_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.mo new file mode 100644 index 0000000000..47fa74f0aa --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package RectifierBridge2mPulse + extends Modelica.Icons.ExamplesPackage; +end RectifierBridge2mPulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.order new file mode 100644 index 0000000000..e1ff6ac0a1 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/package.order @@ -0,0 +1,2 @@ +ThyristorBridge2mPulse_RLV_Characteristic +ThyristorBridge2mPulse_DC_Drive diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.mo new file mode 100644 index 0000000000..0353b5f080 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples; +package ACDC + extends Modelica.Icons.ExamplesPackage; +end ACDC; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order new file mode 100644 index 0000000000..60b56eb3b9 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order @@ -0,0 +1 @@ +RectifierBridge2mPulse diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/package.mo new file mode 100644 index 0000000000..dfd21a0d6c --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters; +package Examples + extends Modelica.Icons.ExamplesPackage; +end Examples; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/package.order new file mode 100644 index 0000000000..2d8460fe5d --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/package.order @@ -0,0 +1 @@ +ACDC diff --git a/ModelicaTest/Electrical/PowerConverters/HalfControlledBridge2mPulse.mo b/ModelicaTest/Electrical/PowerConverters/HalfControlledBridge2mPulse.mo new file mode 100644 index 0000000000..b0ef464f2d --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/HalfControlledBridge2mPulse.mo @@ -0,0 +1,118 @@ +within ModelicaTest.Electrical.PowerConverters; +model HalfControlledBridge2mPulse + "2*m pulse half controlled rectifier bridge with resistive load" + import Modelica_Electrical_PowerConverters = + Modelica.Electrical.PowerConverters; + extends Modelica.Icons.Example; + import Modelica.Constants.pi; + parameter Integer m(final min=3) = 3 "Number of phases" annotation(Evaluate=true); + parameter SI.Voltage Vrms=110 "RMS supply voltage"; + parameter SI.Frequency f=50 "Frequency"; + parameter SI.Angle constantFiringAngle=30*pi/180 + "Firing angle"; + parameter SI.Resistance R=20 "Load resistance"; + + Modelica.Electrical.Polyphase.Sources.SineVoltage sineVoltage( + final m=m, + V=fill(sqrt(2)*Vrms, m), + phase=- + Modelica.Electrical.Polyphase.Functions.symmetricOrientation(m), + f=fill(f, m)) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-30}))); + Modelica_Electrical_PowerConverters.ACDC.HalfControlledBridge2mPulse + rectifier(final m=m, offStart_p=fill(true, m)) + annotation (Placement(transformation(extent={{-40,24},{-20,44}}))); + Modelica.Electrical.Analog.Sensors.VoltageSensor voltagesensor + annotation (Placement(transformation( + origin={50,10}, + extent={{10,-10},{-10,10}}, + rotation=90))); + Modelica.Blocks.Math.Mean meanVoltage(f=2*m*f) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + origin={80,40}))); + Modelica.Blocks.Math.RootMeanSquare rootMeanSquareVoltage(f=2*m*f) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + origin={80,10}))); + Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor + annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=180, + origin={0,-40}))); + Modelica.Blocks.Math.Mean meanCurrent(f=2*m*f) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + origin={80,-60}))); + Modelica_Electrical_PowerConverters.ACDC.Control.VoltageBridge2mPulse + pulse2m( + m=m, + f=f, + useFilter=false, + constantFiringAngle=constantFiringAngle) annotation (Placement( + transformation( + extent={{10,10},{-10,-10}}, + rotation=180, + origin={-30,0}))); + Modelica.Electrical.Polyphase.Basic.MultiStarResistance + multiStarResistance(final m=m) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-60}))); + Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement( + transformation(extent={{-90,-100},{-70,-80}}))); + Modelica.Electrical.Analog.Basic.Resistor resistor(R=R) annotation ( + Placement(transformation( + origin={30,30}, + extent={{10,-10},{-10,10}}, + rotation=90))); + Modelica.Electrical.Polyphase.Basic.Resistor resistor1(m=m, R=fill(1, m)) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={-80,-4}))); +equation + connect(meanCurrent.u, currentSensor.i) annotation (Line( + points={{68,-60},{0,-60},{0,-50}}, color={0,0,127})); + connect(voltagesensor.v, meanVoltage.u) annotation (Line( + points={{60,10},{64,10},{64,40},{68,40}}, color={0,0,127})); + connect(voltagesensor.v, rootMeanSquareVoltage.u) annotation (Line( + points={{60,10},{68,10}}, color={0,0,127})); + connect(rectifier.dc_n, currentSensor.n) annotation (Line( + points={{-20,28},{-10,28},{-10,-40}}, color={0,0,255})); + connect(rectifier.dc_p, voltagesensor.p) annotation (Line( + points={{-20,40},{50,40},{50,20}}, color={0,0,255})); + connect(currentSensor.p, voltagesensor.n) annotation (Line( + points={{10,-40},{50,-40},{50,0}}, color={0,0,255})); + connect(pulse2m.fire_p, rectifier.fire_p) annotation (Line( + points={{-36,11},{-36,22}}, color={255,0,255})); + connect(sineVoltage.plug_n, multiStarResistance.plug) annotation ( + Line( + points={{-80,-40},{-80,-50}}, color={0,0,255})); + connect(multiStarResistance.pin, ground.p) annotation (Line( + points={{-80,-70},{-80,-80}}, color={0,0,255})); + connect(resistor.n, currentSensor.p) annotation (Line( + points={{30,20},{30,-40},{10,-40}}, color={0,0,255})); + connect(resistor.p, rectifier.dc_p) annotation (Line( + points={{30,40},{-20,40}}, color={0,0,255})); + connect(sineVoltage.plug_p, resistor1.plug_n) annotation (Line(points={{-80, + -20},{-80,-20},{-80,-14}}, color={0,0,255})); + connect(resistor1.plug_p, rectifier.ac) annotation (Line(points={{-80,6},{ + -80,6},{-80,32},{-80,34},{-40,34}}, color={0,0,255})); + connect(pulse2m.ac, rectifier.ac) annotation (Line(points={{-40,0},{-60,0}, + {-60,16},{-80,16},{-80,34},{-40,34}}, color={0,0,255})); + annotation ( + experiment( + StopTime=0.1, + Tolerance=1e-06, + Interval=0.0002), + Documentation(info=" +

This example shows a half controlled 2*m pulse bridge rectifier with resistive load, where m is the number of phases. In case of resistive load the half controlled bridge shows the same output voltage as the +full controlled bridge.

+ +

Plot current currentSensor.i, average current meanCurrent.y, voltage voltageSensor.v and average voltage meanVoltage.v.

+ +")); +end HalfControlledBridge2mPulse; diff --git a/ModelicaTest/Electrical/PowerConverters/ThyristorBridge2mPulse_R.mo b/ModelicaTest/Electrical/PowerConverters/ThyristorBridge2mPulse_R.mo new file mode 100644 index 0000000000..273dcd11cd --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/ThyristorBridge2mPulse_R.mo @@ -0,0 +1,33 @@ +within ModelicaTest.Electrical.PowerConverters; +model ThyristorBridge2mPulse_R + "2*m pulse thyristor rectifier bridge with resistive load" + extends + ModelicaTest.Electrical.PowerConverters.ExampleTemplates.ThyristorBridge2mPulse( + pulse2m(constantFiringAngle=constantFiringAngle)); + extends Modelica.Icons.Example; + import Modelica.Constants.pi; + parameter SI.Angle constantFiringAngle=30*pi/180 + "Firing angle"; + parameter SI.Resistance R=20 "Load resistance"; + Modelica.Electrical.Analog.Basic.Resistor resistor(R=R) annotation ( + Placement(transformation( + origin={30,30}, + extent={{10,-10},{-10,10}}, + rotation=90))); +equation + connect(resistor.n, currentSensor.p) + annotation (Line(points={{30,20},{30,-40},{10,-40}}, color={0,0,255})); + connect(resistor.p, rectifier.dc_p) annotation (Line(points={{30,40},{-10, + 40},{-10,40},{-20,40}}, color={0,0,255})); + annotation ( + experiment( + StopTime=0.1, + Tolerance=1e-06, + Interval=0.0002), + Documentation(info=" +

This example shows a full controlled 2*m pulse bridge rectifier with resistive load, where m is the number of phases. In case of resistive load the full controlled bridge shows the same output voltage as the +half controlled bridge.

+ +

Plot current currentSensor.i, average current meanCurrent.y, voltage voltageSensor.v and average voltage meanVoltage.v.

+")); +end ThyristorBridge2mPulse_R; diff --git a/ModelicaTest/Electrical/PowerConverters/package.mo b/ModelicaTest/Electrical/PowerConverters/package.mo new file mode 100644 index 0000000000..cc6c738303 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/package.mo @@ -0,0 +1,5 @@ +within ModelicaTest.Electrical; +package PowerConverters + extends Modelica.Icons.ExamplesPackage; + +end PowerConverters; diff --git a/ModelicaTest/Electrical/PowerConverters/package.order b/ModelicaTest/Electrical/PowerConverters/package.order new file mode 100644 index 0000000000..bfd436f58a --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/package.order @@ -0,0 +1,4 @@ +Examples +HalfControlledBridge2mPulse +ThyristorBridge2mPulse_R +ExampleTemplates diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt new file mode 100644 index 0000000000..54d4a5d58b --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive/comparisonSignals.txt @@ -0,0 +1,39 @@ +time +dcpm.inertiaRotor.phi +dcpm.inertiaRotor.w +inductor.i +lMains.inductor[2].i +lMains.inductor[3].i +meanCurrent.x +meanVoltage.x +pulse2.twomPulse.filter[1].firstOrder.y +pulse2.twomPulse.filter[1].transferFunction[1].x_scaled[1] +pulse2.twomPulse.filter[1].transferFunction[2].x_scaled[1] +pulse2.twomPulse.filter[2].firstOrder.y +pulse2.twomPulse.filter[2].transferFunction[1].x_scaled[1] +pulse2.twomPulse.filter[2].transferFunction[2].x_scaled[1] +pulse2.twomPulse.filter[3].firstOrder.y +pulse2.twomPulse.filter[3].transferFunction[1].x_scaled[1] +pulse2.twomPulse.filter[3].transferFunction[2].x_scaled[1] +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2.twomPulse.timerNegative[1].entryTime +pulse2.twomPulse.timerNegative[2].entryTime +pulse2.twomPulse.timerNegative[3].entryTime +pulse2.twomPulse.timerPositive[1].entryTime +pulse2.twomPulse.timerPositive[2].entryTime +pulse2.twomPulse.timerPositive[3].entryTime +rectifier.pre_n[1].u +rectifier.pre_n[2].u +rectifier.pre_n[3].u +rectifier.pre_p[1].u +rectifier.pre_p[2].u +rectifier.pre_p[3].u +rectifier.thyristor_n.idealThyristor[1].off +rectifier.thyristor_n.idealThyristor[2].off +rectifier.thyristor_n.idealThyristor[3].off +rectifier.thyristor_p.idealThyristor[1].off +rectifier.thyristor_p.idealThyristor[2].off +rectifier.thyristor_p.idealThyristor[3].off +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..2053507105 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic/comparisonSignals.txt @@ -0,0 +1,26 @@ +time +inductor.i +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2m.twomPulse.timerNegative[1].entryTime +pulse2m.twomPulse.timerNegative[2].entryTime +pulse2m.twomPulse.timerNegative[3].entryTime +pulse2m.twomPulse.timerPositive[1].entryTime +pulse2m.twomPulse.timerPositive[2].entryTime +pulse2m.twomPulse.timerPositive[3].entryTime +rectifier.pre_n[1].u +rectifier.pre_n[2].u +rectifier.pre_n[3].u +rectifier.pre_p[1].u +rectifier.pre_p[2].u +rectifier.pre_p[3].u +rectifier.thyristor_n.idealThyristor[1].off +rectifier.thyristor_n.idealThyristor[2].off +rectifier.thyristor_n.idealThyristor[3].off +rectifier.thyristor_p.idealThyristor[1].off +rectifier.thyristor_p.idealThyristor[2].off +rectifier.thyristor_p.idealThyristor[3].off +rootMeanSquareVoltage.mean.y From e99fa8f69903917eaf9835536c76dc18d257efe0 Mon Sep 17 00:00:00 2001 From: Anton Haumer Date: Tue, 21 Apr 2026 17:45:48 +0200 Subject: [PATCH 2/8] Update ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo Co-authored-by: Malte Lenz --- .../ThyristorBridge2mPulse_DC_Drive.mo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo index 5ff6d1ab94..38728e6a27 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo @@ -6,8 +6,12 @@ model ThyristorBridge2mPulse_DC_Drive experiment( StopTime=15, Interval=0.0002, - Tolerance=1e-006, - __MAPLib_ComparisonWindow={2.45, 2.55}), + Tolerance=1e-006 + ), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={2.45, 2.55} + ), Documentation(info="

In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. From e22171f54d53815a6f0f7bfc8b09893867198f40 Mon Sep 17 00:00:00 2001 From: AHaumer Date: Tue, 21 Apr 2026 18:17:58 +0200 Subject: [PATCH 3/8] Moved "__MAPLib_ComparisonWindow" to "TestCase" annotation --- .../ThyristorBridge2mPulse_DC_Drive.mo | 6 ++---- .../ThyristorBridge2mPulse_RLV_Characteristic.mo | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo index 38728e6a27..59070d248f 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo @@ -6,12 +6,10 @@ model ThyristorBridge2mPulse_DC_Drive experiment( StopTime=15, Interval=0.0002, - Tolerance=1e-006 - ), + Tolerance=1e-006), TestCase( shouldPass = true, - __MAPLib_ComparisonWindow={2.45, 2.55} - ), + __MAPLib_ComparisonWindow={2.45, 2.55}), Documentation(info="

In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo index 7771e940d8..78dd43e78a 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo @@ -6,7 +6,9 @@ model ThyristorBridge2mPulse_RLV_Characteristic experiment( StopTime=10, Interval=0.0002, - Tolerance=1e-06, + Tolerance=1e-06), + TestCase( + shouldPass = true, __MAPLib_ComparisonWindow={4.95, 5.05}), Documentation(info="

This example shows a full controlled 2*m pulse bridge rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

From 5f21b827b88f22de2bdb210de40ddf8e8c501341 Mon Sep 17 00:00:00 2001 From: AHaumer Date: Tue, 21 Apr 2026 20:33:42 +0200 Subject: [PATCH 4/8] added DCDC/HBridge/HBridge_DC_Drive --- .../HBridge_DC_Drive/comparisonSignals.txt | 7 --- .../Examples/DCDC/HBridge/HBridge_DC_Drive.mo | 52 +++++++++++++++++++ .../Examples/DCDC/HBridge/package.mo | 4 ++ .../Examples/DCDC/HBridge/package.order | 1 + .../PowerConverters/Examples/DCDC/package.mo | 4 ++ .../Examples/DCDC/package.order | 1 + .../PowerConverters/Examples/package.order | 1 + .../HBridge_DC_Drive/comparisonSignals.txt | 10 ++++ 8 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.order create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt index 988b6ccff0..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt @@ -1,10 +1,3 @@ time -dcpm.inertiaRotor.phi -dcpm.inertiaRotor.w -inductor.i meanCurrent.y meanVoltage.y -hbridge.vDC1 -hbridge.iDC1 -hbridge.vDC2 -hbridge.iDC2 diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo new file mode 100644 index 0000000000..d03b4e049c --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo @@ -0,0 +1,52 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.DCDC.HBridge; +model HBridge_DC_Drive "H bridge DC/DC converter with DC drive" + extends Modelica.Electrical.PowerConverters.Examples.DCDC.HBridge.HBridge_DC_Drive; + annotation ( + experiment( + StopTime=24, + Interval=0.0002, + Tolerance=1e-06), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.00, 4.10}), + Documentation(info=" +

This example of an H bridge with DC drive demonstrates the operation of the DC machine in four quadrants. +The DC output voltage is equal to 2 * (dutyCycle - 0.5) times the input voltage.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
start time (s)machine speedmachine torquemode
0 zero zero
3 positive zero
6 positive positive motor
9.5 positive negative generator
12.5 negative negative motor
15.5 negative positive generator
19 negative zero
22 zero zero
+ +

+Plot machine current dcpm.ia, averaged current meanCurrent.y, machine speed dcpm.wMechanical, averaged machine speed dcpm.va and torque dcpm.tauElectrical.

+")); +end HBridge_DC_Drive; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.mo new file mode 100644 index 0000000000..270baed2e9 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.DCDC; +package HBridge + extends Modelica.Icons.ExamplesPackage; +end HBridge; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.order new file mode 100644 index 0000000000..04509ed53b --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/package.order @@ -0,0 +1 @@ +HBridge_DC_Drive diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.mo new file mode 100644 index 0000000000..bd10f0b936 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples; +package DCDC + extends Modelica.Icons.ExamplesPackage; +end DCDC; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.order new file mode 100644 index 0000000000..b9aeace387 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/package.order @@ -0,0 +1 @@ +HBridge diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/package.order index 2d8460fe5d..6b4cbda32c 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/package.order +++ b/ModelicaTest/Electrical/PowerConverters/Examples/package.order @@ -1 +1,2 @@ ACDC +DCDC diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt new file mode 100644 index 0000000000..988b6ccff0 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive/comparisonSignals.txt @@ -0,0 +1,10 @@ +time +dcpm.inertiaRotor.phi +dcpm.inertiaRotor.w +inductor.i +meanCurrent.y +meanVoltage.y +hbridge.vDC1 +hbridge.iDC1 +hbridge.vDC2 +hbridge.iDC2 From 9fee3d6024af30d3db6d5c66fd64a7f6bfe27948 Mon Sep 17 00:00:00 2001 From: AHaumer Date: Wed, 22 Apr 2026 17:49:43 +0200 Subject: [PATCH 5/8] added all ACAC-Examples to the test --- .../PowerConverters/Examples/ACAC/Dimmer_R.mo | 2 +- .../Examples/ACAC/Dimmer_RL.mo | 2 +- .../Examples/ACAC/SoftStarter.mo | 2 +- .../ACAC/Dimmer_R/comparisonSignals.txt | 9 ----- .../ACAC/Dimmer_RL/comparisonSignals.txt | 9 ----- .../ACAC/SoftStarter/comparisonSignals.txt | 28 +--------------- .../PowerConverters/Examples/ACAC/Dimmer_R.mo | 24 ++++++++++++++ .../Examples/ACAC/Dimmer_RL.mo | 26 +++++++++++++++ .../Examples/ACAC/SoftStarter.mo | 33 +++++++++++++++++++ .../PowerConverters/Examples/ACAC/package.mo | 4 +++ .../Examples/ACAC/package.order | 3 ++ .../PowerConverters/Examples/package.order | 1 + .../ACAC/Dimmer_R/comparisonSignals.txt | 12 +++++++ .../ACAC/Dimmer_RL/comparisonSignals.txt | 12 +++++++ .../ACAC/SoftStarter/comparisonSignals.txt | 29 ++++++++++++++++ 15 files changed, 148 insertions(+), 48 deletions(-) create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.order create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt diff --git a/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo b/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo index e7a96937dd..eed576b310 100644 --- a/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo +++ b/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo @@ -14,7 +14,7 @@ equation annotation (Line(points={{50,20},{50,40},{30,40}}, color={0,0,255})); annotation (experiment( StopTime=8, - Interval=0.0001, + Interval=0.0002, Tolerance=1e-06), Documentation(info="

diff --git a/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo b/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo index 2cdc0da507..5d61cfb21f 100644 --- a/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo +++ b/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo @@ -22,7 +22,7 @@ equation annotation (Line(points={{50,0},{50,20}}, color={0,0,255})); annotation (experiment( StopTime=8, - Interval=0.0001, + Interval=0.0002, Tolerance=1e-06), Documentation(info="

diff --git a/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo b/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo index aa2f6c7b22..471a8bc69b 100644 --- a/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo +++ b/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo @@ -194,7 +194,7 @@ equation annotation (Line(points={{-11,-60},{-18,-60}}, color={255,0,255})); annotation (experiment( StopTime=10, - Interval=0.0001, + Interval=0.0002, Tolerance=1e-06), Documentation(info="

This model demonstrates a soft start of an induction machine: Voltage ramp is started at 0.1 s and should ramp up to nominal voltage within 4s, diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt index 12f254543d..c578babb33 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt @@ -1,12 +1,3 @@ time -voltageSensor.v -multiSensor.i -multiSensor.v -multiSensor.power -meanPower.y vRMS.y -vH01.y_rms -vH01.y_arg iRMS.y -iH01.y_rms -iH01.y_arg diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt index 12f254543d..c578babb33 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt @@ -1,12 +1,3 @@ time -voltageSensor.v -multiSensor.i -multiSensor.v -multiSensor.power -meanPower.y vRMS.y -vH01.y_rms -vH01.y_arg iRMS.y -iH01.y_rms -iH01.y_arg diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt index 13718d19c9..588d2245ec 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt @@ -1,29 +1,3 @@ time -currentQuasiRMSSensor.i[1] -currentQuasiRMSSensor.i[2] -currentQuasiRMSSensor.i[3] -voltageSensor.v[1] -voltageSensor.v[2] -voltageSensor.v[3] -multiSensor.i[1] -multiSensor.i[2] -multiSensor.i[3] -multiSensor.v[1] -multiSensor.v[2] -multiSensor.v[3] -multiSensor.power[1] -multiSensor.power[2] -multiSensor.power[3] -multiSensor.powerTotal -rootMeanSquare.y -rootMeanSquare.mean.x -harmonic.mean1.x -harmonic.mean2.x -// imc.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re -// imc.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im -// imc.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re -// imc.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im -// imc.stator.zeroInductor.i0 -loadInertia.phi +harmonic.y_rms loadInertia.w -softStartControl.vRef diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo new file mode 100644 index 0000000000..c9e6fd47bd --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo @@ -0,0 +1,24 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; +model Dimmer_R "Dimmer with resistive load" + extends Modelica.Electrical.PowerConverters.Examples.ACAC.Dimmer_R; + annotation (experiment( + StopTime=8, + Interval=0.0002, + Tolerance=1e-06), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={2.90, 3.00}), + Documentation(info=" +

+This model demonstrates the behaviour of a dimmer with phase-angle control with resistive load. +

+

+The reference voltage is prescribed by a trapezoid between zero and full voltage. +The voltageToAngle block +calculates the necessary phase angle, which is processed by +the Signal2mPulse adaptor, +applying the firing signals to the +triac. +

+")); +end Dimmer_R; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo new file mode 100644 index 0000000000..bf8e196ada --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo @@ -0,0 +1,26 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; +model Dimmer_RL "Dimmer with resistive-inductive load" + extends Modelica.Electrical.PowerConverters.Examples.ACAC.Dimmer_RL; + annotation (experiment( + StopTime=8, + Interval=0.0002, + Tolerance=1e-06), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={2.90, 3.00}), + Documentation(info=" +

+This model demonstrates the behaviour of a dimmer with phase-angle control with resistive-inductive load. +Note that due to the inductance the current is not zero at the points in time where zero-crossing of the voltage occurs, +and the triac stays conducting until the current becomes zero. +

+

+The reference voltage is prescribed by a trapezoid between zero and full voltage. +The voltageToAngle block +calculates the necessary phase angle, which is processed by +the Signal2mPulse adaptor, +applying the firing signals to the +triac. +

+")); +end Dimmer_RL; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo new file mode 100644 index 0000000000..81af8075aa --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo @@ -0,0 +1,33 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; +model SoftStarter "Soft start of an induction machine" + extends Modelica.Electrical.PowerConverters.Examples.ACAC.SoftStarter; + annotation (experiment( + StopTime=10, + Interval=0.0002, + Tolerance=1e-06), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={2.50, 2.60}), + Documentation(info=" +

This model demonstrates a soft start of an induction machine: +Voltage ramp is started at 0.1 s and should ramp up to nominal voltage within 4s, +but current is limited to 2.5 times nominal current. +At 5.5 s a voltage ramp down within 3 s is required. +

+

Reference voltage is controlled by the +softStartControl block, +reference voltage is converted to firing angle by the +voltageToAngle block. +Firing angle is processed by the +Signal2mPulse adaptor +to firing signals which are applied to the +triac. +

+

+Compare starting with firing angle by +starting direct on line, +star-delta starting, and +starting via a transformer. +

+")); +end SoftStarter; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.mo new file mode 100644 index 0000000000..1ad4424d4b --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples; +package ACAC "AC to AC converter examples" + extends Modelica.Icons.ExamplesPackage; +end ACAC; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.order new file mode 100644 index 0000000000..6c30ad59b2 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/package.order @@ -0,0 +1,3 @@ +Dimmer_R +Dimmer_RL +SoftStarter diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/package.order index 6b4cbda32c..328278359d 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/package.order +++ b/ModelicaTest/Electrical/PowerConverters/Examples/package.order @@ -1,2 +1,3 @@ ACDC DCDC +ACAC diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt new file mode 100644 index 0000000000..12f254543d --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R/comparisonSignals.txt @@ -0,0 +1,12 @@ +time +voltageSensor.v +multiSensor.i +multiSensor.v +multiSensor.power +meanPower.y +vRMS.y +vH01.y_rms +vH01.y_arg +iRMS.y +iH01.y_rms +iH01.y_arg diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt new file mode 100644 index 0000000000..12f254543d --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL/comparisonSignals.txt @@ -0,0 +1,12 @@ +time +voltageSensor.v +multiSensor.i +multiSensor.v +multiSensor.power +meanPower.y +vRMS.y +vH01.y_rms +vH01.y_arg +iRMS.y +iH01.y_rms +iH01.y_arg diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt new file mode 100644 index 0000000000..13718d19c9 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter/comparisonSignals.txt @@ -0,0 +1,29 @@ +time +currentQuasiRMSSensor.i[1] +currentQuasiRMSSensor.i[2] +currentQuasiRMSSensor.i[3] +voltageSensor.v[1] +voltageSensor.v[2] +voltageSensor.v[3] +multiSensor.i[1] +multiSensor.i[2] +multiSensor.i[3] +multiSensor.v[1] +multiSensor.v[2] +multiSensor.v[3] +multiSensor.power[1] +multiSensor.power[2] +multiSensor.power[3] +multiSensor.powerTotal +rootMeanSquare.y +rootMeanSquare.mean.x +harmonic.mean1.x +harmonic.mean2.x +// imc.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re +// imc.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im +// imc.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re +// imc.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im +// imc.stator.zeroInductor.i0 +loadInertia.phi +loadInertia.w +softStartControl.vRef From 55afaa92d122217de61da5894266e7e5bdb5bc45 Mon Sep 17 00:00:00 2001 From: AHaumer Date: Wed, 22 Apr 2026 22:26:00 +0200 Subject: [PATCH 6/8] added the remaining 4 PowerConverter-examples > 10 MB --- .../comparisonSignals.txt | 7 ------- .../comparisonSignals.txt | 17 --------------- .../comparisonSignals.txt | 11 ---------- .../comparisonSignals.txt | 9 -------- .../comparisonSignals.txt | 17 --------------- .../comparisonSignals.txt | 14 ------------- .../Thyristor1Pulse_R_Characteristic.mo | 17 +++++++++++++++ .../Examples/ACDC/Rectifier1Pulse/package.mo | 4 ++++ .../ACDC/Rectifier1Pulse/package.order | 1 + .../ThyristorBridge2Pulse_DC_Drive.mo | 21 +++++++++++++++++++ ...hyristorBridge2Pulse_RLV_Characteristic.mo | 19 +++++++++++++++++ .../ACDC/RectifierBridge2Pulse/package.mo | 5 +++++ .../ACDC/RectifierBridge2Pulse/package.order | 2 ++ ...istorCenterTap2Pulse_RLV_Characteristic.mo | 18 ++++++++++++++++ .../ACDC/RectifierCenterTap2Pulse/package.mo | 4 ++++ .../RectifierCenterTap2Pulse/package.order | 1 + ...storCenterTap2mPulse_RLV_Characteristic.mo | 18 ++++++++++++++++ .../ACDC/RectifierCenterTap2mPulse/package.mo | 4 ++++ .../RectifierCenterTap2mPulse/package.order | 1 + ...istorCenterTapmPulse_RLV_Characteristic.mo | 18 ++++++++++++++++ .../ACDC/RectifierCenterTapmPulse/package.mo | 4 ++++ .../RectifierCenterTapmPulse/package.order | 1 + .../Examples/ACDC/package.order | 5 +++++ .../comparisonSignals.txt | 10 +++++++++ .../comparisonSignals.txt | 20 ++++++++++++++++++ .../comparisonSignals.txt | 14 +++++++++++++ .../comparisonSignals.txt | 12 +++++++++++ .../comparisonSignals.txt | 20 ++++++++++++++++++ .../comparisonSignals.txt | 17 +++++++++++++++ 29 files changed, 236 insertions(+), 75 deletions(-) create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.order create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.mo create mode 100644 ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.order create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt create mode 100644 ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt index 2f1ee01b34..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt @@ -1,10 +1,3 @@ time -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x -idealthyristor.off meanCurrent.y meanVoltage.y -pulse2.twoPulse.timerNegative[1].entryTime -pulse2.twoPulse.timerPositive[1].entryTime -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt index ceec488536..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt @@ -1,20 +1,3 @@ time -dcpm.inertiaRotor.phi -dcpm.inertiaRotor.w -inductor.i -lMains.i -meanCurrent.x -meanVoltage.x -pulse2.twoPulse.filter[1].firstOrder.y -pulse2.twoPulse.filter[1].transferFunction[1].x_scaled[1] -pulse2.twoPulse.filter[1].transferFunction[2].x_scaled[1] -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2.twoPulse.timerNegative[1].entryTime -pulse2.twoPulse.timerPositive[1].entryTime -rectifier.thyristor_n1.off -rectifier.thyristor_n2.off -rectifier.thyristor_p1.off -rectifier.thyristor_p2.off -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt index 9344940d39..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt @@ -1,14 +1,3 @@ time -inductor.i -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2.twoPulse.timerNegative[1].entryTime -pulse2.twoPulse.timerPositive[1].entryTime -rectifier.thyristor_n1.off -rectifier.thyristor_n2.off -rectifier.thyristor_p1.off -rectifier.thyristor_p2.off -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt index b6d2f7db9f..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt @@ -1,12 +1,3 @@ time -inductor.i -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2.twoPulse.timerNegative[1].entryTime -pulse2.twoPulse.timerPositive[1].entryTime -rectifier.thyristor_n.off -rectifier.thyristor_p.off -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt index cb69bf2ec0..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt @@ -1,20 +1,3 @@ time -inductor.i -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulse2m.twomPulse.timerNegative[1].entryTime -pulse2m.twomPulse.timerNegative[2].entryTime -pulse2m.twomPulse.timerNegative[3].entryTime -pulse2m.twomPulse.timerPositive[1].entryTime -pulse2m.twomPulse.timerPositive[2].entryTime -pulse2m.twomPulse.timerPositive[3].entryTime -rectifier.thyristor_n.idealThyristor[1].off -rectifier.thyristor_n.idealThyristor[2].off -rectifier.thyristor_n.idealThyristor[3].off -rectifier.thyristor_p.idealThyristor[1].off -rectifier.thyristor_p.idealThyristor[2].off -rectifier.thyristor_p.idealThyristor[3].off -rootMeanSquareVoltage.mean.y diff --git a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt index d8b2a856e5..1681b817ca 100644 --- a/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt +++ b/Modelica/Resources/Reference/Modelica/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt @@ -1,17 +1,3 @@ time -inductor.i -meanCurrent.x -meanVoltage.x -rootMeanSquareVoltage.mean.x meanCurrent.y meanVoltage.y -pulsem.twomPulse.timerNegative[1].entryTime -pulsem.twomPulse.timerNegative[2].entryTime -pulsem.twomPulse.timerNegative[3].entryTime -pulsem.twomPulse.timerPositive[1].entryTime -pulsem.twomPulse.timerPositive[2].entryTime -pulsem.twomPulse.timerPositive[3].entryTime -rectifier.thyristor.idealThyristor[1].off -rectifier.thyristor.idealThyristor[2].off -rectifier.thyristor.idealThyristor[3].off -rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo new file mode 100644 index 0000000000..183d283c10 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo @@ -0,0 +1,17 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.Rectifier1Pulse; +model Thyristor1Pulse_R_Characteristic + "Control characteristic of one pulse rectifier with resistive load" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.Rectifier1Pulse.Thyristor1Pulse_R_Characteristic; + annotation ( + experiment( + StopTime=10, + Tolerance=1e-06, + Interval=0.0002), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" +

This example demonstrates the operational behavior of a single-phase controlled rectifier with variable firing angle and resistive load. The average load voltage can be controlled by means of the firing angle.

+


Plot average voltage meanVoltage.v versus firingAngle pulse2.firingAngle to see control characteristic of this type of rectifier with resistive load.

+")); +end Thyristor1Pulse_R_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.mo new file mode 100644 index 0000000000..3c5b80e06f --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package Rectifier1Pulse + extends Modelica.Icons.ExamplesPackage; +end Rectifier1Pulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.order new file mode 100644 index 0000000000..85a28fe244 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/package.order @@ -0,0 +1 @@ +Thyristor1Pulse_R_Characteristic diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo new file mode 100644 index 0000000000..12ac82d060 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo @@ -0,0 +1,21 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse; +model ThyristorBridge2Pulse_DC_Drive + "Two pulse Graetz thyristor bridge feeding a DC drive" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse.ThyristorBridge2Pulse_DC_Drive; + annotation ( + experiment( + StopTime=15, + Interval=0.0002, + Tolerance=1e-006), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={2.45, 2.55}), + Documentation(info=" +

+In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. +

+ +

+Plot torque tau, current currentSensor.i and average current meanCurrent.y. Also plot speed w, voltage voltageSensor.v and the average voltage meanVoltage.y.

+")); +end ThyristorBridge2Pulse_DC_Drive; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo new file mode 100644 index 0000000000..8da64acd69 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo @@ -0,0 +1,19 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse; +model ThyristorBridge2Pulse_RLV_Characteristic + "Characteristic of two pulse Graetz thyristor bridge rectifier with R-L load and voltage" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse.ThyristorBridge2Pulse_RLV_Characteristic; + annotation ( + experiment( + StopTime=10, + Interval=0.0002, + Tolerance=1e-06), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" + +

This examples shows a two pulse full controlled bridge example with R-L load including DC voltage source. The additional DC voltage source in this example enables negative average load voltages.

+ +

Plot average voltage meanVoltage.v versus firingAngle pulse2.firingAngle to see control characteristic of this type of rectifier with R-L load including active voltage.

+")); +end ThyristorBridge2Pulse_RLV_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.mo new file mode 100644 index 0000000000..ba18c2e654 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.mo @@ -0,0 +1,5 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package RectifierBridge2Pulse + extends Modelica.Icons.ExamplesPackage; + +end RectifierBridge2Pulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.order new file mode 100644 index 0000000000..27cd3ad16d --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/package.order @@ -0,0 +1,2 @@ +ThyristorBridge2Pulse_RLV_Characteristic +ThyristorBridge2Pulse_DC_Drive diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo new file mode 100644 index 0000000000..f6f653669f --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo @@ -0,0 +1,18 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2Pulse; +model ThyristorCenterTap2Pulse_RLV_Characteristic + "Characteristic of two pulse thyristor rectifier with center tap and R-L load and voltage" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2Pulse.ThyristorCenterTap2Pulse_RLV_Characteristic; + annotation ( + experiment( + StopTime=10, + Tolerance=1e-06, + Interval=0.0002), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" +

This example shows a controlled center tap two pulse rectifier with R-L load including DC voltage source. The additional DC voltage source in this example enables negative average load voltages.

+ +

Plot average voltage meanVoltage.v versus firingAngle pulse2.firingAngle to see control characteristic of this type of rectifier with R-L load including active voltage.

+")); +end ThyristorCenterTap2Pulse_RLV_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.mo new file mode 100644 index 0000000000..7137487065 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package RectifierCenterTap2Pulse + extends Modelica.Icons.ExamplesPackage; +end RectifierCenterTap2Pulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.order new file mode 100644 index 0000000000..4847adfe95 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/package.order @@ -0,0 +1 @@ +ThyristorCenterTap2Pulse_RLV_Characteristic diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo new file mode 100644 index 0000000000..74847249c1 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo @@ -0,0 +1,18 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2mPulse; +model ThyristorCenterTap2mPulse_RLV_Characteristic + "Characteristic of 2*m pulse center tap thyristor rectifier with R-L load and voltage" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2mPulse.ThyristorCenterTap2mPulse_RLV_Characteristic; + annotation ( + experiment( + StopTime=10, + Tolerance=1e-06, + Interval=0.0002), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" +

This example shows a controlled 2*m pulse center tap rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

+ +

Plot average voltage meanVoltage.v versus firingAngle pulsem.firingAngle to see control characteristic of this type of rectifier with R-L load including active voltage.

+")); +end ThyristorCenterTap2mPulse_RLV_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.mo new file mode 100644 index 0000000000..89c265b7ff --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package RectifierCenterTap2mPulse + extends Modelica.Icons.ExamplesPackage; +end RectifierCenterTap2mPulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.order new file mode 100644 index 0000000000..1f6b475fe3 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/package.order @@ -0,0 +1 @@ +ThyristorCenterTap2mPulse_RLV_Characteristic diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo new file mode 100644 index 0000000000..b4ca3013fc --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo @@ -0,0 +1,18 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTapmPulse; +model ThyristorCenterTapmPulse_RLV_Characteristic + "Characteristic of 2*m pulse thyristor rectifier with center tap and R-L load and voltage" + extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTapmPulse.ThyristorCenterTapmPulse_RLV_Characteristic; + annotation ( + experiment( + StopTime=10, + Tolerance=1e-06, + Interval=0.0002), + TestCase( + shouldPass = true, + __MAPLib_ComparisonWindow={4.95, 5.05}), + Documentation(info=" +

This example shows a controlled m pulse center tap rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

+ +

Plot average voltage meanVoltage.v versus firingAngle pulsem.firingAngle to see control characteristic of this type of rectifier with R-L load including active voltage.

+")); +end ThyristorCenterTapmPulse_RLV_Characteristic; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.mo new file mode 100644 index 0000000000..432af632df --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.mo @@ -0,0 +1,4 @@ +within ModelicaTest.Electrical.PowerConverters.Examples.ACDC; +package RectifierCenterTapmPulse + extends Modelica.Icons.ExamplesPackage; +end RectifierCenterTapmPulse; diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.order new file mode 100644 index 0000000000..7fae958093 --- /dev/null +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/package.order @@ -0,0 +1 @@ +ThyristorCenterTapmPulse_RLV_Characteristic diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order index 60b56eb3b9..45372ad24c 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/package.order @@ -1 +1,6 @@ +Rectifier1Pulse +RectifierBridge2Pulse +RectifierCenterTap2Pulse +RectifierCenterTapmPulse RectifierBridge2mPulse +RectifierCenterTap2mPulse diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..2f1ee01b34 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic/comparisonSignals.txt @@ -0,0 +1,10 @@ +time +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +idealthyristor.off +meanCurrent.y +meanVoltage.y +pulse2.twoPulse.timerNegative[1].entryTime +pulse2.twoPulse.timerPositive[1].entryTime +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt new file mode 100644 index 0000000000..ceec488536 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive/comparisonSignals.txt @@ -0,0 +1,20 @@ +time +dcpm.inertiaRotor.phi +dcpm.inertiaRotor.w +inductor.i +lMains.i +meanCurrent.x +meanVoltage.x +pulse2.twoPulse.filter[1].firstOrder.y +pulse2.twoPulse.filter[1].transferFunction[1].x_scaled[1] +pulse2.twoPulse.filter[1].transferFunction[2].x_scaled[1] +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2.twoPulse.timerNegative[1].entryTime +pulse2.twoPulse.timerPositive[1].entryTime +rectifier.thyristor_n1.off +rectifier.thyristor_n2.off +rectifier.thyristor_p1.off +rectifier.thyristor_p2.off +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..9344940d39 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic/comparisonSignals.txt @@ -0,0 +1,14 @@ +time +inductor.i +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2.twoPulse.timerNegative[1].entryTime +pulse2.twoPulse.timerPositive[1].entryTime +rectifier.thyristor_n1.off +rectifier.thyristor_n2.off +rectifier.thyristor_p1.off +rectifier.thyristor_p2.off +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..b6d2f7db9f --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic/comparisonSignals.txt @@ -0,0 +1,12 @@ +time +inductor.i +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2.twoPulse.timerNegative[1].entryTime +pulse2.twoPulse.timerPositive[1].entryTime +rectifier.thyristor_n.off +rectifier.thyristor_p.off +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..cb69bf2ec0 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic/comparisonSignals.txt @@ -0,0 +1,20 @@ +time +inductor.i +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulse2m.twomPulse.timerNegative[1].entryTime +pulse2m.twomPulse.timerNegative[2].entryTime +pulse2m.twomPulse.timerNegative[3].entryTime +pulse2m.twomPulse.timerPositive[1].entryTime +pulse2m.twomPulse.timerPositive[2].entryTime +pulse2m.twomPulse.timerPositive[3].entryTime +rectifier.thyristor_n.idealThyristor[1].off +rectifier.thyristor_n.idealThyristor[2].off +rectifier.thyristor_n.idealThyristor[3].off +rectifier.thyristor_p.idealThyristor[1].off +rectifier.thyristor_p.idealThyristor[2].off +rectifier.thyristor_p.idealThyristor[3].off +rootMeanSquareVoltage.mean.y diff --git a/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt new file mode 100644 index 0000000000..d8b2a856e5 --- /dev/null +++ b/ModelicaTest/Resources/Reference/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic/comparisonSignals.txt @@ -0,0 +1,17 @@ +time +inductor.i +meanCurrent.x +meanVoltage.x +rootMeanSquareVoltage.mean.x +meanCurrent.y +meanVoltage.y +pulsem.twomPulse.timerNegative[1].entryTime +pulsem.twomPulse.timerNegative[2].entryTime +pulsem.twomPulse.timerNegative[3].entryTime +pulsem.twomPulse.timerPositive[1].entryTime +pulsem.twomPulse.timerPositive[2].entryTime +pulsem.twomPulse.timerPositive[3].entryTime +rectifier.thyristor.idealThyristor[1].off +rectifier.thyristor.idealThyristor[2].off +rectifier.thyristor.idealThyristor[3].off +rootMeanSquareVoltage.mean.y From 4930f49d7e69fb54d414d2ef8e963f45bead2623 Mon Sep 17 00:00:00 2001 From: AHaumer Date: Sat, 25 Apr 2026 17:01:19 +0200 Subject: [PATCH 7/8] shortened Stop Time to __MAPLib_ComparisonWindow.end for all examples in ModelicaTest/Electrical/PowerConverters/Examples/ --- .../Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo | 2 +- .../Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo | 2 +- .../Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo | 2 +- .../ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo | 2 +- .../RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo | 2 +- .../ThyristorBridge2Pulse_RLV_Characteristic.mo | 2 +- .../RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo | 2 +- .../ThyristorBridge2mPulse_RLV_Characteristic.mo | 2 +- .../ThyristorCenterTap2Pulse_RLV_Characteristic.mo | 2 +- .../ThyristorCenterTap2mPulse_RLV_Characteristic.mo | 2 +- .../ThyristorCenterTapmPulse_RLV_Characteristic.mo | 2 +- .../PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo index c9e6fd47bd..82c9bc8d95 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo @@ -2,7 +2,7 @@ within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; model Dimmer_R "Dimmer with resistive load" extends Modelica.Electrical.PowerConverters.Examples.ACAC.Dimmer_R; annotation (experiment( - StopTime=8, + StopTime=3.00, Interval=0.0002, Tolerance=1e-06), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo index bf8e196ada..758fe392fb 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo @@ -2,7 +2,7 @@ within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; model Dimmer_RL "Dimmer with resistive-inductive load" extends Modelica.Electrical.PowerConverters.Examples.ACAC.Dimmer_RL; annotation (experiment( - StopTime=8, + StopTime=3.00, Interval=0.0002, Tolerance=1e-06), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo index 81af8075aa..4c2b214077 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo @@ -2,7 +2,7 @@ within ModelicaTest.Electrical.PowerConverters.Examples.ACAC; model SoftStarter "Soft start of an induction machine" extends Modelica.Electrical.PowerConverters.Examples.ACAC.SoftStarter; annotation (experiment( - StopTime=10, + StopTime=2.60, Interval=0.0002, Tolerance=1e-06), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo index 183d283c10..bd0c9bbe10 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo @@ -4,7 +4,7 @@ model Thyristor1Pulse_R_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.Rectifier1Pulse.Thyristor1Pulse_R_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Tolerance=1e-06, Interval=0.0002), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo index 12ac82d060..fbaec55051 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo @@ -4,7 +4,7 @@ model ThyristorBridge2Pulse_DC_Drive extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse.ThyristorBridge2Pulse_DC_Drive; annotation ( experiment( - StopTime=15, + StopTime=2.55, Interval=0.0002, Tolerance=1e-006), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo index 8da64acd69..43ebc46e74 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo @@ -4,7 +4,7 @@ model ThyristorBridge2Pulse_RLV_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2Pulse.ThyristorBridge2Pulse_RLV_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Interval=0.0002, Tolerance=1e-06), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo index 59070d248f..c132870902 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo @@ -4,7 +4,7 @@ model ThyristorBridge2mPulse_DC_Drive extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse.ThyristorBridge2mPulse_DC_Drive; annotation ( experiment( - StopTime=15, + StopTime=2.55, Interval=0.0002, Tolerance=1e-006), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo index 78dd43e78a..a4f3c7d062 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo @@ -4,7 +4,7 @@ model ThyristorBridge2mPulse_RLV_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierBridge2mPulse.ThyristorBridge2mPulse_RLV_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Interval=0.0002, Tolerance=1e-06), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo index f6f653669f..5d2f8abb27 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo @@ -4,7 +4,7 @@ model ThyristorCenterTap2Pulse_RLV_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2Pulse.ThyristorCenterTap2Pulse_RLV_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Tolerance=1e-06, Interval=0.0002), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo index 74847249c1..836f938781 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo @@ -4,7 +4,7 @@ model ThyristorCenterTap2mPulse_RLV_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTap2mPulse.ThyristorCenterTap2mPulse_RLV_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Tolerance=1e-06, Interval=0.0002), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo index b4ca3013fc..8c5249a73c 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo @@ -4,7 +4,7 @@ model ThyristorCenterTapmPulse_RLV_Characteristic extends Modelica.Electrical.PowerConverters.Examples.ACDC.RectifierCenterTapmPulse.ThyristorCenterTapmPulse_RLV_Characteristic; annotation ( experiment( - StopTime=10, + StopTime=5.05, Tolerance=1e-06, Interval=0.0002), TestCase( diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo index d03b4e049c..d64c8e91cd 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo @@ -3,7 +3,7 @@ model HBridge_DC_Drive "H bridge DC/DC converter with DC drive" extends Modelica.Electrical.PowerConverters.Examples.DCDC.HBridge.HBridge_DC_Drive; annotation ( experiment( - StopTime=24, + StopTime=4.10, Interval=0.0002, Tolerance=1e-06), TestCase( From bd0d258e3aafdcdafdb43253f57b7a3c4ffdcabb Mon Sep 17 00:00:00 2001 From: AHaumer Date: Tue, 28 Apr 2026 15:12:09 +0200 Subject: [PATCH 8/8] latest version of Comparison-annotation --- .../Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo | 5 ++--- .../Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo | 5 ++--- .../Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo | 5 ++--- .../ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo | 5 ++--- .../RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo | 5 ++--- .../ThyristorBridge2Pulse_RLV_Characteristic.mo | 5 ++--- .../ThyristorBridge2mPulse_DC_Drive.mo | 5 ++--- .../ThyristorBridge2mPulse_RLV_Characteristic.mo | 5 ++--- .../ThyristorCenterTap2Pulse_RLV_Characteristic.mo | 5 ++--- .../ThyristorCenterTap2mPulse_RLV_Characteristic.mo | 5 ++--- .../ThyristorCenterTapmPulse_RLV_Characteristic.mo | 5 ++--- .../Examples/DCDC/HBridge/HBridge_DC_Drive.mo | 5 ++--- 12 files changed, 24 insertions(+), 36 deletions(-) diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo index 82c9bc8d95..5ffa6d629b 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_R.mo @@ -5,9 +5,8 @@ model Dimmer_R "Dimmer with resistive load" StopTime=3.00, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={2.90, 3.00}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(2.90, 3.00)}))), Documentation(info="

This model demonstrates the behaviour of a dimmer with phase-angle control with resistive load. diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo index 758fe392fb..cc7ff984b1 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/Dimmer_RL.mo @@ -5,9 +5,8 @@ model Dimmer_RL "Dimmer with resistive-inductive load" StopTime=3.00, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={2.90, 3.00}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(2.90, 3.00)}))), Documentation(info="

This model demonstrates the behaviour of a dimmer with phase-angle control with resistive-inductive load. diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo index 4c2b214077..2be4ed401b 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo @@ -5,9 +5,8 @@ model SoftStarter "Soft start of an induction machine" StopTime=2.60, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={2.50, 2.60}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(2.50, 2.60)}))), Documentation(info="

This model demonstrates a soft start of an induction machine: Voltage ramp is started at 0.1 s and should ramp up to nominal voltage within 4s, diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo index bd0c9bbe10..f901dffd0b 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/Rectifier1Pulse/Thyristor1Pulse_R_Characteristic.mo @@ -7,9 +7,8 @@ model Thyristor1Pulse_R_Characteristic StopTime=5.05, Tolerance=1e-06, Interval=0.0002), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This example demonstrates the operational behavior of a single-phase controlled rectifier with variable firing angle and resistive load. The average load voltage can be controlled by means of the firing angle.


Plot average voltage meanVoltage.v versus firingAngle pulse2.firingAngle to see control characteristic of this type of rectifier with resistive load.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo index fbaec55051..98024e1a1f 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_DC_Drive.mo @@ -7,9 +7,8 @@ model ThyristorBridge2Pulse_DC_Drive StopTime=2.55, Interval=0.0002, Tolerance=1e-006), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={2.45, 2.55}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(2.45, 2.55)}))), Documentation(info="

In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo index 43ebc46e74..d767346c5e 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2Pulse/ThyristorBridge2Pulse_RLV_Characteristic.mo @@ -7,9 +7,8 @@ model ThyristorBridge2Pulse_RLV_Characteristic StopTime=5.05, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This examples shows a two pulse full controlled bridge example with R-L load including DC voltage source. The additional DC voltage source in this example enables negative average load voltages.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo index c132870902..3fdf311b82 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_DC_Drive.mo @@ -7,9 +7,8 @@ model ThyristorBridge2mPulse_DC_Drive StopTime=2.55, Interval=0.0002, Tolerance=1e-006), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={2.45, 2.55}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(2.45, 2.55)}))), Documentation(info="

In this example a PM excited DC machine is started with nominal torque at nominal speed. After 5 seconds, load torque is reduced to zero over a period of additional 10 seconds. At 15 seconds, the machine is operating at no load. diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo index a4f3c7d062..8cb24e45de 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierBridge2mPulse/ThyristorBridge2mPulse_RLV_Characteristic.mo @@ -7,9 +7,8 @@ model ThyristorBridge2mPulse_RLV_Characteristic StopTime=5.05, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This example shows a full controlled 2*m pulse bridge rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo index 5d2f8abb27..67cf3e37a4 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2Pulse/ThyristorCenterTap2Pulse_RLV_Characteristic.mo @@ -7,9 +7,8 @@ model ThyristorCenterTap2Pulse_RLV_Characteristic StopTime=5.05, Tolerance=1e-06, Interval=0.0002), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This example shows a controlled center tap two pulse rectifier with R-L load including DC voltage source. The additional DC voltage source in this example enables negative average load voltages.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo index 836f938781..fc24c5d161 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTap2mPulse/ThyristorCenterTap2mPulse_RLV_Characteristic.mo @@ -7,9 +7,8 @@ model ThyristorCenterTap2mPulse_RLV_Characteristic StopTime=5.05, Tolerance=1e-06, Interval=0.0002), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This example shows a controlled 2*m pulse center tap rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo index 8c5249a73c..6e731f18ea 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/ACDC/RectifierCenterTapmPulse/ThyristorCenterTapmPulse_RLV_Characteristic.mo @@ -7,9 +7,8 @@ model ThyristorCenterTapmPulse_RLV_Characteristic StopTime=5.05, Tolerance=1e-06, Interval=0.0002), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.95, 5.05}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.95, 5.05)}))), Documentation(info="

This example shows a controlled m pulse center tap rectifier with R-L load including DC voltage source, where m is the number of phases. The additional DC voltage source in this example enables negative average load voltages.

diff --git a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo index d64c8e91cd..1205ba2099 100644 --- a/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo +++ b/ModelicaTest/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_DC_Drive.mo @@ -6,9 +6,8 @@ model HBridge_DC_Drive "H bridge DC/DC converter with DC drive" StopTime=4.10, Interval=0.0002, Tolerance=1e-06), - TestCase( - shouldPass = true, - __MAPLib_ComparisonWindow={4.00, 4.10}), + TestCase(shouldPass = true, + __ModelicaAssociation(Comparison(TimeWindows={TimeSlot(4.00, 4.10)}))), Documentation(info="

This example of an H bridge with DC drive demonstrates the operation of the DC machine in four quadrants. The DC output voltage is equal to 2 * (dutyCycle - 0.5) times the input voltage.