diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98f8c7cc93..bd917fe214 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
include:
project: 'EBC/EBC_all/gitlab_ci/templates'
- ref: AixLibCI
+ ref: AixLibCI2024
file: 'modelica-ci-tests/scripts/.gitlab-ci.yml'
diff --git a/AixLib/Controls/HeatPump/BaseClasses/InverterControlledHP.mo b/AixLib/Controls/HeatPump/BaseClasses/InverterControlledHP.mo
deleted file mode 100644
index ef8f180fcb..0000000000
--- a/AixLib/Controls/HeatPump/BaseClasses/InverterControlledHP.mo
+++ /dev/null
@@ -1,43 +0,0 @@
-within AixLib.Controls.HeatPump.BaseClasses;
-model InverterControlledHP "Converter model for an inverter / speed controlled HP modulating between 0 and 1"
- extends PartialTSetToNSet;
- parameter Real hys "Hysteresis of controller";
- Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=hys,
- pre_y_start=false) "Hysteresis controller for set temperature"
- annotation (Placement(transformation(extent={{-58,-6},{-30,22}})));
- Modelica.Blocks.Continuous.LimPID InverterControl(
- final controllerType=Modelica.Blocks.Types.SimpleController.PI,
- final k=k,
- final Ti=Ti,
- final yMax=1,
- final yMin=0)
- "PI-Control for a inverter controlled HP"
- annotation (Placement(transformation(extent={{14,38},{34,58}})));
- parameter Real k=0.1 "Gain of controller"
- annotation (Dialog(group="PI Values"));
- parameter Modelica.Units.SI.Time Ti=30 "Time constant of Integrator block"
- annotation (Dialog(group="PI Values"));
-equation
- connect(TSet, onOffController.reference) annotation (Line(points={{-116,60},{
- -77.5,60},{-77.5,16.4},{-60.8,16.4}},
- color={0,0,127}));
- connect(InverterControl.y, swiNullHP.u1)
- annotation (Line(points={{35,48},{52,48},{52,8},{64,8}}, color={0,0,127}));
- connect(TSet, InverterControl.u_s) annotation (Line(points={{-116,60},{-43.5,
- 60},{-43.5,48},{12,48}}, color={0,0,127}));
- connect(TAct, onOffController.u) annotation (Line(points={{-116,-80},{-70,-80},
- {-70,-0.4},{-60.8,-0.4}},color={0,0,127}));
- connect(TAct, InverterControl.u_m) annotation (Line(points={{-116,-80},{-70,
- -80},{-70,32},{24,32},{24,36}},
- color={0,0,127}));
- connect(onOffController.y, andHeaLim.u1) annotation (Line(points={{-28.6,8},{
- 24,8},{24,0},{36.8,0}}, color={255,0,255}));
- annotation (Documentation(revisions="
- -
- November 26, 2018 by Fabian Wüllhorst:
- First implementation (see issue #577)
-
-
-"));
-end InverterControlledHP;
diff --git a/AixLib/Controls/HeatPump/BaseClasses/OnOffHP.mo b/AixLib/Controls/HeatPump/BaseClasses/OnOffHP.mo
deleted file mode 100644
index 8724a1352a..0000000000
--- a/AixLib/Controls/HeatPump/BaseClasses/OnOffHP.mo
+++ /dev/null
@@ -1,29 +0,0 @@
-within AixLib.Controls.HeatPump.BaseClasses;
-model OnOffHP "Controller gives full speed or stop signal depending on temperature hysteresis"
- extends AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet;
- parameter Real hys "Hysteresis of controller";
- Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=hys, pre_y_start=false) "Hysteresis controller for set temperature"
- annotation (Placement(transformation(extent={{-54,10},{-26,38}})));
- Modelica.Blocks.Sources.Constant conOne(final k=1.0)
- "Constant one for on off heat pump" annotation (Placement(transformation(extent={{38,14},{50,26}})));
-
-equation
- connect(TSet, onOffController.reference) annotation (Line(points={{-116,60},{
- -85.5,60},{-85.5,32.4},{-56.8,32.4}}, color={0,0,127}));
- connect(conOne.y, swiNullHP.u1) annotation (Line(points={{50.6,20},{58,20},{
- 58,8},{64,8}}, color={0,0,127}));
- connect(TAct, onOffController.u) annotation (Line(points={{-116,-80},{-72,-80},
- {-72,15.6},{-56.8,15.6}}, color={0,0,127}));
- connect(onOffController.y, andHeaLim.u1) annotation (Line(points={{-24.6,24},
- {5.7,24},{5.7,0},{36.8,0}}, color={255,0,255}));
- annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
- coordinateSystem(preserveAspectRatio=false)),
- Documentation(revisions="
- -
- November 26, 2018 by Fabian Wüllhorst:
- First implementation (see issue #577)
-
-
-"));
-end OnOffHP;
diff --git a/AixLib/Controls/HeatPump/BaseClasses/PartialHPController.mo b/AixLib/Controls/HeatPump/BaseClasses/PartialHPController.mo
index b7b2114afe..116d9fc376 100644
--- a/AixLib/Controls/HeatPump/BaseClasses/PartialHPController.mo
+++ b/AixLib/Controls/HeatPump/BaseClasses/PartialHPController.mo
@@ -1,7 +1,7 @@
within AixLib.Controls.HeatPump.BaseClasses;
partial model PartialHPController
"Base class of a heat pump controller with bus interface"
- AixLib.Controls.Interfaces.VapourCompressionMachineControlBus heatPumpControlBus
+ AixLib.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus heatPumpControlBus
annotation (Placement(transformation(
extent={{-29.5,-29.5},{29.5,29.5}},
rotation=270,
diff --git a/AixLib/Controls/HeatPump/BaseClasses/PartialTSetToNSet.mo b/AixLib/Controls/HeatPump/BaseClasses/PartialTSetToNSet.mo
index 17265ce842..db9eff7569 100644
--- a/AixLib/Controls/HeatPump/BaseClasses/PartialTSetToNSet.mo
+++ b/AixLib/Controls/HeatPump/BaseClasses/PartialTSetToNSet.mo
@@ -5,18 +5,19 @@ partial model PartialTSetToNSet
"True to choose a bivalent system" annotation(choices(checkBox=true));
// Heating limit temperature
+ parameter Boolean use_heaLim=true "=false to disable moving average heating limit" annotation (Dialog(group="Heating limit temperature"));
parameter Modelica.Units.SI.Temperature T_heaLim=293.15
- "Heating limit temperature. If the filtered outdoor air temperature surpasses this threshold, the device will be shut down"
- annotation (Dialog(group="Heating limit temperature"));
+ "Heating limit temperature. If the filtered outdoor air temperature surpasses this threshold, the device will be shut down" annotation(Dialog(group=
+ "Heating limit temperature", enable=use_heaLim));
parameter Modelica.Units.SI.Time movAveTime=300
- "Time span for building the average of the outdoor air temperature. Used for heating limit temperature"
- annotation (Dialog(group="Heating limit temperature"));
+ "Time span for building the average of the outdoor air temperature. Used for heating limit temperature" annotation (Dialog(group=
+ "Heating limit temperature", enable=use_heaLim));
- AixLib.Utilities.Logical.SmoothSwitch swiNullHP "If HP is off, zero is passed"
- annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ Modelica.Blocks.Logical.Switch swiNullHP "If HP is off, zero is passed"
+ annotation (Placement(transformation(extent={{60,-20},{80,0}})));
Modelica.Blocks.Sources.Constant conZer(final k=0)
"If an error occurs, the compressor speed is set to zero"
- annotation (Placement(transformation(extent={{38,-24},{50,-12}})));
+ annotation (Placement(transformation(extent={{20,-50},{40,-30}})));
Modelica.Blocks.Interfaces.RealInput TSet(
final quantity="ThermodynamicTemperature",
final unit="K",
@@ -24,15 +25,15 @@ partial model PartialTSetToNSet
annotation (Placement(transformation(extent={{-132,44},{-100,76}})));
Modelica.Blocks.Interfaces.RealOutput nOut "Relative speed of compressor. From 0 to 1"
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
- AixLib.Controls.Interfaces.VapourCompressionMachineControlBus sigBusHP
- annotation (Placement(transformation(extent={{-124,-42},{-90,-12}})));
+ AixLib.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus sigBusHP
+ annotation (Placement(transformation(extent={{-124,-46},{-90,-16}})));
Modelica.Blocks.Interfaces.RealOutput ySecHeaGen if use_secHeaGen
"Relative power of second heat generator, from 0 to 1"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
- origin={12,-108})));
- Modelica.Blocks.Interfaces.RealInput TAct(
+ origin={0,-110})));
+ Modelica.Blocks.Interfaces.RealInput TMea(
final quantity="ThermodynamicTemperature",
final unit="K",
final displayUnit="degC") "Actual temperature, control variable"
@@ -40,37 +41,41 @@ partial model PartialTSetToNSet
extent={{16,16},{-16,-16}},
rotation=180,
origin={-116,-80})));
- Utilities.Logical.SmoothSwitch swiNullsecHeaGen if use_secHeaGen
+ AixLib.Utilities.Logical.SmoothSwitch swiNullsecHeaGen if use_secHeaGen
"If second heater is off, zero is passed" annotation (Placement(
transformation(
- extent={{8,-8},{-8,8}},
+ extent={{10,-10},{-10,10}},
rotation=90,
- origin={12,-84})));
- Utilities.Math.MovingAverage movAve(final aveTime=movAveTime)
+ origin={0,-70})));
+ AixLib.Utilities.Math.MovingAverage movAve(final aveTime=movAveTime, final u_start=0)
+ if use_heaLim
"Moving average to account for fluctuations in the outdoor air temperature"
- annotation (Placement(transformation(extent={{-88,-34},{-76,-20}})));
+ annotation (Placement(transformation(extent={{-92,-40},{-72,-20}})));
Modelica.Blocks.Logical.And andHeaLim
"Check if control and heating limit temperature yield true to turn the device on"
- annotation (Placement(transformation(extent={{38,-6},{50,6}})));
+ annotation (Placement(transformation(extent={{20,-20},{40,0}})));
Modelica.Blocks.Logical.LessThreshold lessThreshold(final threshold=
- T_heaLim)
- annotation (Placement(transformation(extent={{-66,-34},{-52,-20}})));
+ T_heaLim) if use_heaLim
+ annotation (Placement(transformation(extent={{-60,-40},{-40,-20}})));
+ Modelica.Blocks.Sources.BooleanConstant booleanConstant(final k=true)
+ if not use_heaLim
+ annotation (Placement(transformation(extent={{-60,-80},{-40,-60}})));
equation
- connect(conZer.y, swiNullHP.u3) annotation (Line(points={{50.6,-18},{58,-18},
- {58,-8},{64,-8}}, color={0,0,127}));
+ connect(conZer.y, swiNullHP.u3) annotation (Line(points={{41,-40},{54,-40},{
+ 54,-18},{58,-18}},color={0,0,127}));
connect(swiNullHP.y, nOut)
- annotation (Line(points={{87,0},{110,0}}, color={0,0,127}));
+ annotation (Line(points={{81,-10},{98,-10},{98,0},{110,0}},
+ color={0,0,127}));
connect(swiNullsecHeaGen.y, ySecHeaGen)
- annotation (Line(points={{12,-92.8},{12,-108}},
- color={0,0,127}));
- connect(conZer.y, swiNullsecHeaGen.u3) annotation (Line(points={{50.6,-18},{
- 70,-18},{70,-74.4},{18.4,-74.4}},
- color={0,0,127}));
+ annotation (Line(points={{-8.88178e-16,-81},{-8.88178e-16,-98},{0,-98},{0,
+ -110}}, color={0,0,127}));
+ connect(conZer.y, swiNullsecHeaGen.u3) annotation (Line(points={{41,-40},{70,
+ -40},{70,-58},{8,-58}}, color={0,0,127}));
connect(sigBusHP.T_oda, movAve.u) annotation (Line(
- points={{-107,-27},{-94,-27},{-94,-27},{-89.2,-27}},
+ points={{-107,-31},{-94,-31},{-94,-30}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
@@ -78,11 +83,14 @@ equation
extent={{-3,-6},{-3,-6}},
horizontalAlignment=TextAlignment.Right));
connect(movAve.y, lessThreshold.u)
- annotation (Line(points={{-75.4,-27},{-67.4,-27}}, color={0,0,127}));
- connect(lessThreshold.y, andHeaLim.u2) annotation (Line(points={{-51.3,-27},{-26,
- -27},{-26,-4.8},{36.8,-4.8}}, color={255,0,255}));
+ annotation (Line(points={{-71,-30},{-62,-30}}, color={0,0,127}));
+ connect(lessThreshold.y, andHeaLim.u2) annotation (Line(points={{-39,-30},{
+ -26,-30},{-26,-18},{18,-18}}, color={255,0,255}));
connect(andHeaLim.y, swiNullHP.u2)
- annotation (Line(points={{50.6,0},{64,0}}, color={255,0,255}));
+ annotation (Line(points={{41,-10},{58,-10}},
+ color={255,0,255}));
+ connect(booleanConstant.y, andHeaLim.u2) annotation (Line(points={{-39,-70},{
+ -26,-70},{-26,-18},{18,-18}}, color={255,0,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
extent={{-100,100},{100,-100}},
diff --git a/AixLib/Controls/HeatPump/BaseClasses/package.order b/AixLib/Controls/HeatPump/BaseClasses/package.order
index 512aff2f8b..2d55484766 100644
--- a/AixLib/Controls/HeatPump/BaseClasses/package.order
+++ b/AixLib/Controls/HeatPump/BaseClasses/package.order
@@ -1,4 +1,2 @@
-InverterControlledHP
-OnOffHP
PartialHPController
PartialTSetToNSet
diff --git a/AixLib/Controls/HeatPump/DefrostControl.mo b/AixLib/Controls/HeatPump/DefrostControl.mo
new file mode 100644
index 0000000000..2153693c1a
--- /dev/null
+++ b/AixLib/Controls/HeatPump/DefrostControl.mo
@@ -0,0 +1,179 @@
+within AixLib.Controls.HeatPump;
+model DefrostControl
+ "Control block to ensure no frost limits heat flow at the evaporator"
+ parameter Real minIceFac "Minimal value above which no defrost is necessary";
+
+ parameter Real deltaIceFac = 0.1 "Bandwitdth for hystereses. If the icing factor is based on the duration of defrost, this value is necessary to avoid state-events.";
+ Modelica.Blocks.Interfaces.BooleanInput hea
+ annotation (Placement(transformation(extent={{-132,-36},{-100,-4}})));
+ Modelica.Blocks.Interfaces.RealInput ySet
+ "Set value relative speed of compressor. Analog from 0 to 1"
+ annotation (Placement(transformation(extent={{-132,4},{-100,36}})));
+ Utilities.Logical.SmoothSwitch swiErr
+ "If an error occurs, the value of the conZero block will be used(0)"
+ annotation (Placement(transformation(extent={{58,2},{78,22}})));
+ Modelica.Blocks.Sources.Constant conOne(final k=1)
+ "If Defrost is enabled, HP runs at full power"
+ annotation (Placement(transformation(extent={{0,-10},{20,10}})));
+ Modelica.Blocks.Interfaces.RealOutput yOut
+ "Relative speed of compressor. From 0 to 1"
+ annotation (Placement(transformation(extent={{100,10},{120,30}})));
+ Modelica.Blocks.Interfaces.BooleanOutput heaOut
+ annotation (Placement(transformation(extent={{100,-30},{120,-10}})));
+ Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus sigBus
+ annotation (Placement(transformation(extent={{-120,-76},{-92,-48}})));
+ Modelica.Blocks.Logical.Hysteresis iceFacGreMinChi(
+ final uLow=minIceFac,
+ final uHigh=minIceFac + deltaIceFac,
+ final pre_y_start=true)
+ "Check if icing factor is greater than a boundary" annotation (Placement(
+ transformation(
+ extent={{-10.5,-10.5},{10.5,10.5}},
+ rotation=0,
+ origin={-49.5,-61.5})));
+ Modelica.Blocks.Logical.LogicalSwitch logicalSwitch
+ "If a chiller is used to defrost, mode will be false"
+ annotation (Placement(transformation(extent={{58,-42},{78,-22}})));
+ Modelica.Blocks.Sources.BooleanConstant conTrueUseChi(final k=false)
+ "Set mode to false to simulate the defrost cycle"
+ annotation (Placement(transformation(extent={{20,-80},{40,-60}})));
+equation
+ connect(conOne.y, swiErr.u3) annotation (Line(points={{21,0},{46,0},{46,4},{
+ 56,4}}, color={0,0,127}));
+ connect(swiErr.y,yOut) annotation (Line(points={{79,12},{96,12},{96,20},{110,
+ 20}}, color={0,0,127}));
+ connect(ySet, swiErr.u1) annotation (Line(points={{-116,20},{56,20}},
+ color={0,0,127}));
+
+ connect(sigBus.iceFacMea, iceFacGreMinChi.u) annotation (Line(
+ points={{-106,-62},{-84.05,-62},{-84.05,-61.5},{-62.1,-61.5}},
+ color={255,204,51},
+ thickness=0.5), Text(
+ string="%first",
+ index=-1,
+ extent={{-6,3},{-6,3}},
+ horizontalAlignment=TextAlignment.Right));
+ connect(iceFacGreMinChi.y, swiErr.u2) annotation (Line(
+ points={{-37.95,-61.5},{8,-61.5},{8,-32},{44,-32},{44,12},{56,12}},
+ color={255,0,255}));
+ connect(logicalSwitch.y, heaOut) annotation (Line(points={{79,-32},{84,-32},{84,
+ -20},{110,-20}}, color={255,0,255}));
+ connect(hea, logicalSwitch.u1) annotation (Line(points={{-116,-20},{-32,-20},{
+ -32,-24},{56,-24}}, color={255,0,255}));
+ connect(iceFacGreMinChi.y, logicalSwitch.u2) annotation (Line(
+ points={{-37.95,-61.5},{8,-61.5},{8,-32},{56,-32}},
+ color={255,0,255}));
+ connect(conTrueUseChi.y, logicalSwitch.u3) annotation (Line(
+ points={{41,-70},{48,-70},{48,-40},{56,-40}},
+ color={255,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
+ -100},{100,80}}), graphics={
+ Rectangle(
+ extent={{-100,100},{100,-100}},
+ lineColor={28,108,200},
+ fillColor={255,255,170},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{-36,34},{-36,-6}},
+ color={28,108,200}),
+ Line(
+ points={{0,20},{0,-20}},
+ color={28,108,200},
+ origin={-36,14},
+ rotation=90),
+ Line(
+ points={{-14,14},{14,-14}},
+ color={28,108,200},
+ origin={-36,14},
+ rotation=90),
+ Line(
+ points={{14,14},{-14,-14}},
+ color={28,108,200},
+ origin={-36,14},
+ rotation=90),
+ Line(
+ points={{8,64},{8,24}},
+ color={28,108,200}),
+ Line(
+ points={{0,20},{0,-20}},
+ color={28,108,200},
+ origin={8,44},
+ rotation=90),
+ Line(
+ points={{-14,14},{14,-14}},
+ color={28,108,200},
+ origin={8,44},
+ rotation=90),
+ Line(
+ points={{14,14},{-14,-14}},
+ color={28,108,200},
+ origin={8,44},
+ rotation=90),
+ Line(
+ points={{-34,-22},{-34,-62}},
+ color={28,108,200}),
+ Line(
+ points={{0,20},{0,-20}},
+ color={28,108,200},
+ origin={-34,-42},
+ rotation=90),
+ Line(
+ points={{-14,14},{14,-14}},
+ color={28,108,200},
+ origin={-34,-42},
+ rotation=90),
+ Line(
+ points={{14,14},{-14,-14}},
+ color={28,108,200},
+ origin={-34,-42},
+ rotation=90),
+ Line(
+ points={{14,6},{14,-34}},
+ color={28,108,200}),
+ Line(
+ points={{0,20},{0,-20}},
+ color={28,108,200},
+ origin={14,-14},
+ rotation=90),
+ Line(
+ points={{-14,14},{14,-14}},
+ color={28,108,200},
+ origin={14,-14},
+ rotation=90),
+ Line(
+ points={{14,14},{-14,-14}},
+ color={28,108,200},
+ origin={14,-14},
+ rotation=90),
+ Text(
+ extent={{-104,100},{106,76}},
+ lineColor={28,108,200},
+ lineThickness=0.5,
+ fillColor={255,255,255},
+ fillPattern=FillPattern.None,
+ textString="%name")}), Diagram(
+ coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
+ 100}})),
+ Documentation(info="
+ Basic model for a defrost control. The icing factor is calculated in
+ the heat pump based on functions or other models.
+
+
+ If a given lower boundary is surpassed, the mode of the heat pump
+ will be set to false(eq. Chilling) and the compressor speed is set to
+ 1 to make the defrost process as fast as possible.
+
+
+ -
+ August 27, 2024 by Fabian Wüllhorst:
+ Adapted to new heat pump approach (see issue #1520)
+
+ -
+ November 26, 2018 by Fabian Wüllhorst:
+ First implementation (see issue #577)
+
+
+"));
+end DefrostControl;
diff --git a/AixLib/Controls/HeatPump/Examples/HeatPumpController.mo b/AixLib/Controls/HeatPump/Examples/HeatPumpController.mo
deleted file mode 100644
index 22ef9f3bbc..0000000000
--- a/AixLib/Controls/HeatPump/Examples/HeatPumpController.mo
+++ /dev/null
@@ -1,148 +0,0 @@
-within AixLib.Controls.HeatPump.Examples;
-model HeatPumpController "Example for usage of heat pump controller"
- extends Modelica.Icons.Example;
-
- HPControllerOnOff hPControllerOnOff(bandwidth=2)
- "Simple on/off controller for a heat pump"
- annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
- Modelica.Blocks.Interaction.Show.RealValue showN
- "Shows the current value of the revolution speed"
- annotation (Placement(transformation(extent={{60,60},{80,80}})));
- Modelica.Blocks.Interaction.Show.BooleanValue showOnOff
- "Shows the current value of the on/off signal"
- annotation (Placement(transformation(extent={{66,40},{86,60}})));
- AixLib.Controls.Interfaces.VapourCompressionMachineControlBus heatPumpControlBus
- "Required to make the signals on the bus accessible" annotation (Placement(
- transformation(
- extent={{-10,-10},{10,10}},
- rotation=270,
- origin={0,0})));
- Modelica.Blocks.Interaction.Show.BooleanValue showMode
- "Shows the current value of the mode signal"
- annotation (Placement(transformation(extent={{66,18},{86,38}})));
- Modelica.Blocks.Sources.RealExpression temperatureMeasurements[4](y={280,290,
- 300,310}) "Represents temperature measurements in heat pump"
- annotation (Placement(transformation(
- extent={{-30,-10},{30,10}},
- rotation=0,
- origin={-70,-76})));
- Modelica.Blocks.Sources.RealExpression massFlowRateMeasurements[2](y={0.5,1})
- "Represents mass flow rate measurements in heat pump"
- annotation (Placement(transformation(
- extent={{-30,-10},{30,10}},
- rotation=0,
- origin={-70,-96})));
- Modelica.Blocks.Sources.Sine T_meas(
- f=1/3600,
- amplitude=6,
- offset=310) "Generates the measured temperature"
- annotation (Placement(transformation(extent={{-100,20},{-80,40}})));
- Modelica.Blocks.Sources.Constant T_set(k=310)
- "Provides the temperature set point"
- annotation (Placement(transformation(extent={{-100,-40},{-80,-20}})));
- Modelica.Blocks.Interaction.Show.RealValue showT_meas
- "Shows the current value of the measured temperature"
- annotation (Placement(transformation(extent={{-60,70},{-20,90}})));
- Modelica.Blocks.Interfaces.RealOutput output_T_meas(
- final quantity="ThermodynamicTemperature",
- final unit="K",
- displayUnit="degC",
- min=0) "Outputs the temperature measurement"
- annotation (Placement(transformation(extent={{85,-75},{115,-45}})));
- Modelica.Blocks.Interfaces.BooleanOutput output_on
- "Outputs the on/off signal"
- annotation (Placement(transformation(extent={{86,-94},{114,-66}})));
-equation
- connect(hPControllerOnOff.heatPumpControlBus, heatPumpControlBus) annotation (
- Line(
- points={{-40.05,0.05},{-20.025,0.05},{-20.025,0},{0,0}},
- color={255,204,51},
- thickness=0.5), Text(
- string="%second",
- index=1,
- extent={{6,3},{6,3}}));
- connect(heatPumpControlBus.nSet, showN.numberPort) annotation (Line(
- points={{0.05,-0.05},{20,-0.05},{20,70},{58.5,70}},
- color={255,204,51},
- thickness=0.5), Text(
- string="%first",
- index=-1,
- extent={{-6,3},{-6,3}}));
- connect(temperatureMeasurements[1].y, heatPumpControlBus.TEvaInMea)
- annotation (Line(points={{-37,-76},{0.05,-76},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(temperatureMeasurements[2].y, heatPumpControlBus.TConInMea)
- annotation (Line(points={{-37,-76},{0.05,-76},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(temperatureMeasurements[3].y, heatPumpControlBus.TEvaOutMea)
- annotation (Line(points={{-37,-76},{0.05,-76},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(temperatureMeasurements[4].y, heatPumpControlBus.TConOutMea)
- annotation (Line(points={{-37,-76},{0.05,-76},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(massFlowRateMeasurements[1].y, heatPumpControlBus.m_flowEvaMea)
- annotation (Line(points={{-37,-96},{20,-96},{20,-0.05},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(massFlowRateMeasurements[2].y, heatPumpControlBus.m_flowConMea)
- annotation (Line(points={{-37,-96},{0,-96},{0,-0.05},{0.05,-0.05}},
- color={0,0,127}), Text(
- index=1,
- extent={{6,3},{6,3}}));
- connect(T_meas.y,showT_meas. numberPort) annotation (Line(points={{-79,30},{
- -66,30},{-66,80},{-63,80}}, color={0,0,127}));
- connect(T_meas.y, output_T_meas) annotation (Line(points={{-79,30},{-74,30},{
- -74,-60},{100,-60}}, color={0,0,127}));
- connect(heatPumpControlBus.modeSet, showMode.activePort) annotation (Line(
- points={{0.05,-0.05},{10,-0.05},{20,-0.05},{20,28},{64.5,28}},
- color={255,204,51},
- thickness=0.5), Text(
- string="%first",
- index=-1,
- extent={{-6,3},{-6,3}}));
- connect(heatPumpControlBus.onOffMea, showOnOff.activePort) annotation (Line(
- points={{0.05,-0.05},{20,-0.05},{20,50},{64.5,50}},
- color={255,204,51},
- thickness=0.5), Text(
- string="%first",
- index=-1,
- extent={{-6,3},{-6,3}}));
- connect(heatPumpControlBus.onOffMea, output_on) annotation (Line(
- points={{0.05,-0.05},{20,-0.05},{20,-80},{100,-80}},
- color={255,204,51},
- thickness=0.5), Text(
- string="%first",
- index=-1,
- extent={{-6,3},{-6,3}}));
- connect(T_meas.y, hPControllerOnOff.TSet) annotation (Line(points={{-79,30},{
- -68,30},{-68,4},{-60,4}}, color={0,0,127}));
- connect(T_set.y, hPControllerOnOff.TMea) annotation (Line(points={{-79,-30},{
- -68,-30},{-68,-4},{-60,-4}}, color={0,0,127}));
- annotation (experiment(StopTime=10000, Interval=10), Documentation(info="
- This example can be used to test that AixLib.Controls.HeatPump.HPControllerOnOff
- supplies all required signals as specified in AixLib.Controls.ControllerInterfaces.HeatPumpControlBus.
- The generated signals are visualized using the Show package. The
- temperature measurement is supplied by a sine block so that the
- reaction of the controller can be tested.
-
-
- The example also shows how to connect two models, typically a model
- of a physical component and a controller, via the bus connector. The
- temperatureMeasurements and the massFlowRateMeasurements are only
- connected for demonstration purposes and are not required by the
- controller.
-
-"));
-end HeatPumpController;
diff --git a/AixLib/Controls/HeatPump/Examples/InverterControlledHeatPump.mo b/AixLib/Controls/HeatPump/Examples/InverterControlledHeatPump.mo
new file mode 100644
index 0000000000..82fcaaec76
--- /dev/null
+++ b/AixLib/Controls/HeatPump/Examples/InverterControlledHeatPump.mo
@@ -0,0 +1,22 @@
+within AixLib.Controls.HeatPump.Examples;
+model InverterControlledHeatPump
+ extends Modelica.Icons.Example;
+ extends PartialHeatPumpController(redeclare InverterControlledHP hPController(
+ bandwidth=2,
+ k=0.05,
+ Ti=100));
+
+annotation(experiment(Tolerance=1e-6, StartTime=0, StopTime=10000),
+ Documentation(info="
+ Example for an inverter controlled heat pump. Play around with the PI
+ settings to see how they influence nSet depending on TSet and TMea.
+
+", revisions="
+ -
+ July 14, 2022 by Fabian Wüllhorst:
+ First implementation (see issue #1128)
+
+
+"));
+end InverterControlledHeatPump;
diff --git a/AixLib/Controls/HeatPump/Examples/PartialHeatPumpController.mo b/AixLib/Controls/HeatPump/Examples/PartialHeatPumpController.mo
new file mode 100644
index 0000000000..ee8355541f
--- /dev/null
+++ b/AixLib/Controls/HeatPump/Examples/PartialHeatPumpController.mo
@@ -0,0 +1,80 @@
+within AixLib.Controls.HeatPump.Examples;
+partial model PartialHeatPumpController
+ "Example for usage of heat pump controller"
+
+ AixLib.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus heatPumpControlBus
+ "Required to make the signals on the bus accessible" annotation (Placement(
+ transformation(
+ extent={{-10,-10},{10,10}},
+ rotation=0,
+ origin={-56,-50})));
+ Modelica.Blocks.Sources.Sine T_meas(
+ f=1/3600,
+ amplitude=6,
+ offset=310) "Generates the measured temperature"
+ annotation (Placement(transformation(extent={{-100,20},{-80,40}})));
+ Modelica.Blocks.Sources.Constant T_set(k=310)
+ "Provides the temperature set point"
+ annotation (Placement(transformation(extent={{-100,-40},{-80,-20}})));
+ Modelica.Blocks.Interfaces.RealOutput TMea(
+ final quantity="ThermodynamicTemperature",
+ final unit="K",
+ displayUnit="degC",
+ min=0) "Outputs the temperature measurement"
+ annotation (Placement(transformation(extent={{101,-75},{131,-45}})));
+ replaceable BaseClasses.PartialTSetToNSet hPController constrainedby
+ BaseClasses.PartialTSetToNSet(
+ final use_secHeaGen=false,
+ use_heaLim=false,
+ T_heaLim=293.15,
+ movAveTime=300) annotation (Placement(transformation(extent={{-20,-20},
+ {20,20}})), __Dymola_choicesAllMatching=true);
+ Modelica.Blocks.Interfaces.RealOutput TSet(
+ final quantity="ThermodynamicTemperature",
+ final unit="K",
+ displayUnit="degC",
+ min=0) "Outputs the temperature measurement"
+ annotation (Placement(transformation(extent={{101,-15},{131,15}})));
+ Modelica.Blocks.Interfaces.RealOutput nSet
+ "Outputs the temperature measurement"
+ annotation (Placement(transformation(extent={{101,45},{131,75}})));
+ Modelica.Blocks.Sources.Constant T_oda(k=273.15)
+ "Provides the temperature set point"
+ annotation (Placement(transformation(extent={{-100,-80},{-80,-60}})));
+equation
+ connect(T_meas.y, TMea) annotation (Line(points={{-79,30},{-70,30},{-70,-60},{
+ 116,-60}}, color={0,0,127}));
+ connect(hPController.TSet, T_set.y) annotation (Line(points={{-23.2,12},{-62,12},
+ {-62,-30},{-79,-30}}, color={0,0,127}));
+ connect(hPController.TMea, T_meas.y) annotation (Line(points={{-23.2,-16},{-70,
+ -16},{-70,30},{-79,30}}, color={0,0,127}));
+ connect(nSet, hPController.nOut) annotation (Line(points={{116,60},{102,60},{102,
+ 58},{76,58},{76,0},{22,0}}, color={0,0,127}));
+ connect(T_oda.y, heatPumpControlBus.TOdaMea) annotation (Line(points={{-79,-70},
+ {-56,-70},{-56,-50}}, color={0,0,127}), Text(
+ string="%second",
+ index=1,
+ extent={{6,3},{6,3}},
+ horizontalAlignment=TextAlignment.Left));
+ connect(heatPumpControlBus, hPController.sigBusHP) annotation (Line(
+ points={{-56,-50},{-36,-50},{-36,-6},{-21.4,-6},{-21.4,-6.2}},
+ color={255,204,51},
+ thickness=0.5), Text(
+ string="%first",
+ index=-1,
+ extent={{-3,-6},{-3,-6}},
+ horizontalAlignment=TextAlignment.Right));
+ connect(T_set.y, TSet) annotation (Line(points={{-79,-30},{86,-30},{86,0},{116,
+ 0}}, color={0,0,127}));
+ annotation (experiment(StopTime=10000, Interval=10), Documentation(info="
+ Partial example model for heat pump controls.
+
+", revisions="
+ -
+ July 14, 2022 by Fabian Wüllhorst:
+ First implementation (see issue #1128)
+
+
+"));
+end PartialHeatPumpController;
diff --git a/AixLib/Controls/HeatPump/Examples/TwoPointControlledHeatPump.mo b/AixLib/Controls/HeatPump/Examples/TwoPointControlledHeatPump.mo
new file mode 100644
index 0000000000..3d2dc00e28
--- /dev/null
+++ b/AixLib/Controls/HeatPump/Examples/TwoPointControlledHeatPump.mo
@@ -0,0 +1,21 @@
+within AixLib.Controls.HeatPump.Examples;
+model TwoPointControlledHeatPump
+ extends Modelica.Icons.Example;
+ extends PartialHeatPumpController(redeclare TwoPointControlledHP hPController(
+ bandwidth=2));
+
+annotation(experiment(Tolerance=1e-6, StartTime=0, StopTime=10000),
+ Documentation(info="
+ Example for an two-point hysteresis controlled heat pump. Play around
+ with the bandwith settings to see how it influence nSet depending on
+ TSet and TMea.
+
+", revisions="
+ -
+ July 14, 2022 by Fabian Wüllhorst:
+ First implementation (see issue #1128)
+
+
+"));
+end TwoPointControlledHeatPump;
diff --git a/AixLib/Controls/HeatPump/Examples/package.order b/AixLib/Controls/HeatPump/Examples/package.order
index 9919abdabb..4fc0a9ec45 100644
--- a/AixLib/Controls/HeatPump/Examples/package.order
+++ b/AixLib/Controls/HeatPump/Examples/package.order
@@ -1 +1,3 @@
-HeatPumpController
+InverterControlledHeatPump
+PartialHeatPumpController
+TwoPointControlledHeatPump
diff --git a/AixLib/Controls/HeatPump/HPControl.mo b/AixLib/Controls/HeatPump/HPControl.mo
index 31fb87e379..46bd24c1ec 100644
--- a/AixLib/Controls/HeatPump/HPControl.mo
+++ b/AixLib/Controls/HeatPump/HPControl.mo
@@ -1,9 +1,10 @@
-within AixLib.Controls.HeatPump;
+within AixLib.Controls.HeatPump;
model HPControl
"Control block which makes sure the desired temperature is supplied by the HP"
//General
replaceable model TSetToNSet =
- AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet constrainedby AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet(
+ AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet constrainedby
+ AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet(
final use_secHeaGen=use_secHeaGen) annotation(choicesAllMatching=true);
parameter Boolean use_secHeaGen=false "True to choose a bivalent system" annotation(choices(checkBox=true));
@@ -15,8 +16,8 @@ model HPControl
choice=false "Function",
radioButtons=true));
replaceable function HeatingCurveFunction =
- SetPoints.Functions.HeatingCurveFunction constrainedby SetPoints.Functions.PartialBaseFct
- annotation (Dialog(group="Heating Curve - Data", enable = not use_tableData),choicesAllMatching=true);
+ SetPoints.Functions.HeatingCurveFunction constrainedby
+ SetPoints.Functions.PartialBaseFct annotation (Dialog(group="Heating Curve - Data", enable = not use_tableData),choicesAllMatching=true);
parameter
AixLib.DataBase.Boiler.DayNightMode.HeatingCurvesDayNightBaseDataDefinition
heatingCurveRecord=
@@ -60,9 +61,9 @@ model HPControl
final zerTim=zerTim)
if use_antLeg
annotation (Placement(transformation(extent={{-26,-14},{14,26}})));
- Interfaces.VapourCompressionMachineControlBus sigBusHP
+ AixLib.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus sigBusHP
annotation (Placement(transformation(extent={{-116,-72},{-88,-44}})));
- Modelica.Blocks.Interfaces.RealOutput nOut
+ Modelica.Blocks.Interfaces.RealOutput yOut "Relative compressor speed"
annotation (Placement(transformation(extent={{100,6},{128,34}})));
Modelica.Blocks.Interfaces.RealInput T_oda "Outdoor air temperature"
annotation (Placement(transformation(extent={{-128,-14},{-100,14}}),
@@ -70,24 +71,27 @@ model HPControl
Modelica.Blocks.Interfaces.RealOutput ySecHeaGen if use_secHeaGen
"Relative power of second heat generator, from 0 to 1"
annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
+ extent={{-17,-17},{17,17}},
rotation=-90,
- origin={-4,-104})));
+ origin={1,-117}), iconTransformation(
+ extent={{-14,-14},{14,14}},
+ rotation=-90,
+ origin={-1.77636e-15,-108})));
Modelica.Blocks.Interfaces.RealOutput y_sou
annotation (Placement(transformation(extent={{14,-14},{-14,14}},
rotation=90,
- origin={-64,-100})));
+ origin={-60,-114})));
Modelica.Blocks.Interfaces.RealOutput y_sin annotation (Placement(transformation(
extent={{14,-14},{-14,14}},
rotation=90,
- origin={56,-100})));
+ origin={60,-114})));
Modelica.Blocks.Sources.Constant constHeating1(final k=1)
"If you want to include chilling, please insert control blocks first"
annotation (Placement(transformation(extent={{10,-10},{-10,10}},
rotation=90,
origin={-12,-72})));
- SetPoints.HeatingCurve heatCurve(
+ AixLib.Controls.SetPoints.HeatingCurve heatCurve(
final TOffset=0,
final use_dynTRoom=false,
final zerTim=zerTim,
@@ -110,7 +114,7 @@ model HPControl
Modelica.Blocks.Sources.BooleanConstant constHeating(final k=true)
"If you want to include chilling, please insert control blocks first"
annotation (Placement(transformation(extent={{82,-26},{94,-14}})));
- Modelica.Blocks.Interfaces.BooleanOutput modeOut
+ Modelica.Blocks.Interfaces.BooleanOutput hea "Heating mode"
annotation (Placement(transformation(extent={{100,-34},{128,-6}})));
Modelica.Blocks.Interfaces.RealInput TSup "Supply temperature" annotation (
Placement(transformation(extent={{-128,46},{-100,74}}),
@@ -118,8 +122,8 @@ model HPControl
equation
- connect(T_oda, sigBusHP.T_oda) annotation (Line(points={{-114,1.77636e-15},{-90,
- 1.77636e-15},{-90,-57.93},{-101.93,-57.93}},
+ connect(T_oda, sigBusHP.T_oda) annotation (Line(points={{-114,1.77636e-15},{
+ -90,1.77636e-15},{-90,-58},{-102,-58}},
color={0,0,127}), Text(
string="%second",
index=1,
@@ -137,11 +141,11 @@ equation
color={0,0,127},
pattern=LinePattern.Dash));
- connect(ConvTSetToNSet.nOut, nOut) annotation (Line(points={{77.6,9},{88.8,9},{88.8,20},
+ connect(ConvTSetToNSet.nOut,yOut) annotation (Line(points={{77.6,9},{88.8,9},{88.8,20},
{114,20}}, color={0,0,127}));
connect(sigBusHP,ConvTSetToNSet. sigBusHP) annotation (Line(
- points={{-102,-58},{24,-58},{24,4.41},{42.88,4.41}},
+ points={{-102,-58},{24,-58},{24,3.73},{42.88,3.73}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
@@ -157,27 +161,27 @@ equation
points={{6.8,46},{26,46},{26,19.2},{41.44,19.2}},
color={0,0,127},
pattern=LinePattern.Dash));
- connect(modeOut, constHeating.y) annotation (Line(points={{114,-20},{94.6,-20}},
- color={255,0,255}));
+ connect(hea, constHeating.y)
+ annotation (Line(points={{114,-20},{94.6,-20}}, color={255,0,255}));
connect(TSup, antiLegionella.TSupAct) annotation (Line(points={{-114,60},{-82,
60},{-82,6},{-30,6}}, color={0,0,127}));
- connect(TSup,ConvTSetToNSet. TAct) annotation (Line(points={{-114,60},{-82,60},{-82,-22},
+ connect(TSup,ConvTSetToNSet.TMea) annotation (Line(points={{-114,60},{-82,60},{-82,-22},
{30,-22},{30,-4.6},{41.44,-4.6}}, color={0,0,127}));
connect(ConvTSetToNSet.ySecHeaGen, ySecHeaGen) annotation (Line(
- points={{61.92,-9.36},{61.92,-14},{46,-14},{46,-44},{22,-44},{22,-90},{-4,
- -90},{-4,-104}},
+ points={{60,-9.7},{60,-12},{36,-12},{36,-88},{1,-88},{1,-117}},
color={0,0,127},
pattern=LinePattern.Dash));
connect(ySecHeaGen, ySecHeaGen)
- annotation (Line(points={{-4,-104},{-4,-104}},
+ annotation (Line(points={{1,-117},{1,-117}},
color={0,0,127}));
connect(constHeating1.y, y_sou)
- annotation (Line(points={{-12,-83},{-12,-84},{-64,-84},{-64,-100}},
+ annotation (Line(points={{-12,-83},{-12,-96},{-60,-96},{-60,-114}},
color={0,0,127}));
- connect(constHeating1.y, y_sin) annotation (Line(points={{-12,-83},{56,-83},{56,
- -100}}, color={0,0,127}));
+ connect(constHeating1.y, y_sin) annotation (Line(points={{-12,-83},{-12,-92},
+ {60,-92},{60,-114}},
+ color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,80}}), graphics={
Rectangle(
@@ -222,7 +226,7 @@ equation
Looking at the HeatPumpSystem,
+ \"modelica://AixLib.Obsolete.Year2024.Systems.HeatPumpSystems.HeatPumpSystem\">HeatPumpSystem,
the task of the control block is also to control the pumps or fans
and second heat generator if necessary.
diff --git a/AixLib/Controls/HeatPump/HPControllerOnOff.mo b/AixLib/Controls/HeatPump/HPControllerOnOff.mo
deleted file mode 100644
index 0abd6a31c4..0000000000
--- a/AixLib/Controls/HeatPump/HPControllerOnOff.mo
+++ /dev/null
@@ -1,64 +0,0 @@
-within AixLib.Controls.HeatPump;
-model HPControllerOnOff
- "Simple on/off controller for heat pump model"
- extends BaseClasses.PartialHPController;
-
- parameter Real bandwidth(start=0.1) "Bandwidth around reference signal";
- parameter Boolean pre_y_start=false "Value of pre(y) at initial time";
-
- Modelica.Blocks.Sources.BooleanConstant mode "Dummy signal for unit mode, true: heat pump, false: chiller"
- annotation (Placement(transformation(extent={{-12,-50},{8,-30}})));
- Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=bandwidth,
- pre_y_start=pre_y_start) "Generates the on/off signal depending on the temperature inputs"
- annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
- Modelica.Blocks.Interfaces.RealInput TMea(
- final quantity="ThermodynamicTemperature",
- final unit="K",
- displayUnit="degC",
- min=0) "Temperature measurement"
- annotation (Placement(transformation(extent={{-115,-55},{-85,-25}})));
- Modelica.Blocks.Interfaces.RealInput TSet(
- final quantity="ThermodynamicTemperature",
- final unit="K",
- displayUnit="degC",
- min=0) "Temperature set point"
- annotation (Placement(transformation(extent={{-115,25},{-85,55}})));
- Modelica.Blocks.Math.BooleanToReal NOnOff(final realTrue=1, final realFalse=0)
- "Convert boolean to real rotational speed of compressor"
- annotation (Placement(transformation(extent={{22,-10},{42,10}})));
-equation
-
- connect(mode.y, heatPumpControlBus.modeSet) annotation (Line(points={{9,-40},
- {60,-40},{60,0.3525},{99.6475,0.3525}}, color={255,0,255}), Text(
- string="%second",
- index=1,
- extent={{6,3},{6,3}},
- horizontalAlignment=TextAlignment.Left));
- connect(onOffController.y, NOnOff.u)
- annotation (Line(points={{11,0},{20,0}}, color={255,0,255}));
- connect(NOnOff.y, heatPumpControlBus.nSet) annotation (Line(points={{43,0},{
- 72,0},{72,0.3525},{99.6475,0.3525}}, color={0,0,127}), Text(
- string="%second",
- index=1,
- extent={{6,3},{6,3}},
- horizontalAlignment=TextAlignment.Left));
- connect(TMea, onOffController.u) annotation (Line(points={{-100,-40},{-40,-40},
- {-40,-6},{-12,-6}}, color={0,0,127}));
- connect(TSet, onOffController.reference) annotation (Line(points={{-100,40},{
- -40,40},{-40,6},{-12,6}}, color={0,0,127}));
- annotation (Documentation(info="
- This model represents a simple controller for a heat pump. It is
- based on the Modelica.Blocks.Logical.OnOffController
- but includes further constant sources so that the AixLib.Controls.Interfaces.HeatPumpControlBus
- can be used.
-
-
- March 31, 2017, by Marc Baranski:
-
-
- First implementation.
-
-"));
-end HPControllerOnOff;
diff --git a/AixLib/Controls/HeatPump/InverterControlledHP.mo b/AixLib/Controls/HeatPump/InverterControlledHP.mo
new file mode 100644
index 0000000000..55bf6d0a29
--- /dev/null
+++ b/AixLib/Controls/HeatPump/InverterControlledHP.mo
@@ -0,0 +1,49 @@
+within AixLib.Controls.HeatPump;
+model InverterControlledHP
+ "Converter model for an inverter / speed controlled HP modulating between 0 and 1"
+ extends BaseClasses.PartialTSetToNSet;
+ parameter Real bandwidth "Bandwith of hysteresis of controller";
+ parameter Real k "Gain of controller"
+ annotation (Dialog(group="PI Values"));
+ parameter Modelica.Units.SI.Time Ti "Time constant of Integrator block"
+ annotation (Dialog(group="PI Values"));
+ parameter Real yMin=0.2 "Minimal relative compressor speed"
+ annotation (Dialog(group="PI Values"));
+
+ Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=bandwidth,
+ pre_y_start=false) "Hysteresis controller for set temperature"
+ annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
+ Modelica.Blocks.Continuous.LimPID InverterControl(
+ final controllerType=Modelica.Blocks.Types.SimpleController.PI,
+ final k=k,
+ final Ti=Ti,
+ final yMax=1,
+ final yMin=yMin)
+ "PI-Control for a inverter controlled HP"
+ annotation (Placement(transformation(extent={{20,40},{40,60}})));
+
+equation
+ connect(TSet, onOffController.reference) annotation (Line(points={{-116,60},{
+ -77.5,60},{-77.5,36},{-62,36}}, color={0,0,127}));
+ connect(InverterControl.y, swiNullHP.u1)
+ annotation (Line(points={{41,50},{52,50},{52,-2},{58,-2}},
+ color={0,0,127}));
+ connect(TSet, InverterControl.u_s) annotation (Line(points={{-116,60},{-43.5,
+ 60},{-43.5,50},{18,50}}, color={0,0,127}));
+ connect(TMea, onOffController.u) annotation (Line(points={{-116,-80},{-70,-80},
+ {-70,24},{-62,24}}, color={0,0,127}));
+ connect(TMea, InverterControl.u_m) annotation (Line(points={{-116,-80},{-70,
+ -80},{-70,16},{30,16},{30,38}},
+ color={0,0,127}));
+ connect(onOffController.y, andHeaLim.u1) annotation (Line(points={{-39,30},{
+ -18,30},{-18,-10},{18,-10}},
+ color={255,0,255}));
+ annotation (Documentation(revisions="
+ -
+ November 26, 2018 by Fabian Wüllhorst:
+ First implementation (see issue #577)
+
+
+"));
+end InverterControlledHP;
diff --git a/AixLib/Controls/HeatPump/TwoPointControlledHP.mo b/AixLib/Controls/HeatPump/TwoPointControlledHP.mo
new file mode 100644
index 0000000000..00d61a2d9a
--- /dev/null
+++ b/AixLib/Controls/HeatPump/TwoPointControlledHP.mo
@@ -0,0 +1,32 @@
+within AixLib.Controls.HeatPump;
+model TwoPointControlledHP
+ "Controller gives full speed or stop signal depending on temperature hysteresis"
+ extends AixLib.Controls.HeatPump.BaseClasses.PartialTSetToNSet;
+ parameter Real bandwidth "Bandwith of hysteresis of controller";
+ Modelica.Blocks.Logical.OnOffController onOffController(final bandwidth=bandwidth,
+ final pre_y_start=false) "Hysteresis controller for set temperature"
+ annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
+ Modelica.Blocks.Sources.Constant conOne(final k=1)
+ "Constant one for on off heat pump" annotation (Placement(transformation(extent={{20,20},
+ {40,40}})));
+
+equation
+ connect(TSet, onOffController.reference) annotation (Line(points={{-116,60},{
+ -85.5,60},{-85.5,36},{-62,36}}, color={0,0,127}));
+ connect(conOne.y, swiNullHP.u1) annotation (Line(points={{41,30},{58,30},{58,
+ -2}}, color={0,0,127}));
+ connect(TMea, onOffController.u) annotation (Line(points={{-116,-80},{-72,-80},
+ {-72,24},{-62,24}}, color={0,0,127}));
+ connect(onOffController.y, andHeaLim.u1) annotation (Line(points={{-39,30},{
+ 5.7,30},{5.7,-10},{18,-10}},color={255,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)),
+ Documentation(revisions="
+ -
+ November 26, 2018 by Fabian Wüllhorst:
+ First implementation (see issue #577)
+
+
+"));
+end TwoPointControlledHP;
diff --git a/AixLib/Controls/HeatPump/package.order b/AixLib/Controls/HeatPump/package.order
index 0b836450f0..8f14c23cfc 100644
--- a/AixLib/Controls/HeatPump/package.order
+++ b/AixLib/Controls/HeatPump/package.order
@@ -1,7 +1,8 @@
AntiLegionella
+DefrostControl
HPControl
-HPControllerOnOff
+InverterControlledHP
+TwoPointControlledHP
ModularHeatPumps
-SafetyControls
Examples
BaseClasses
diff --git a/AixLib/Controls/Interfaces/package.order b/AixLib/Controls/Interfaces/package.order
index 8ef03cdfe1..b0874ca3c9 100644
--- a/AixLib/Controls/Interfaces/package.order
+++ b/AixLib/Controls/Interfaces/package.order
@@ -5,4 +5,3 @@ ModularCompressorControlBus
ModularExpansionValveControlBus
ModularHeatPumpControlBus
ModularSensorControlBus
-VapourCompressionMachineControlBus
diff --git a/AixLib/DataBase/Boiler/General/BoilerTwoPointBaseDataDefinition.mo b/AixLib/DataBase/Boiler/General/BoilerTwoPointBaseDataDefinition.mo
index 2737190e3a..7f33d1c2b3 100644
--- a/AixLib/DataBase/Boiler/General/BoilerTwoPointBaseDataDefinition.mo
+++ b/AixLib/DataBase/Boiler/General/BoilerTwoPointBaseDataDefinition.mo
@@ -8,8 +8,8 @@ record BoilerTwoPointBaseDataDefinition
"Name of boiler";
parameter SI.Volume volume
"Water volume of boiler";
- parameter Real pressureDrop
- "Pressure drop coefficient, delta_p[Pa] = PD*Q_flow[m^3/s]^2";
+ parameter Real a
+ "Pressure drop coefficient, dp_nominal[Pa] = a*V_flow_nominal[m^3/s]^n";
parameter SI.Power Q_nom
"Nominal heat power / thermal load, refering to net (inferior) calorific value";
parameter SI.Power Q_min
diff --git a/AixLib/DataBase/Boiler/General/Boiler_Virtual_1kW.mo b/AixLib/DataBase/Boiler/General/Boiler_Virtual_1kW.mo
index 9f95660d0f..48e7b22326 100644
--- a/AixLib/DataBase/Boiler/General/Boiler_Virtual_1kW.mo
+++ b/AixLib/DataBase/Boiler/General/Boiler_Virtual_1kW.mo
@@ -3,7 +3,7 @@ record Boiler_Virtual_1kW "Boiler virtual 1kW"
extends BoilerTwoPointBaseDataDefinition(
name="VirtualBoiler_1kW",
volume=0.00076,
- pressureDrop=10218000000.0,
+ a=10218000000.0,
Q_nom=1000,
Q_min=100,
eta=[0.3,0.93; 1.0,0.93]);
diff --git a/AixLib/DataBase/Boiler/General/Boiler_Vitocrossal200_311kW.mo b/AixLib/DataBase/Boiler/General/Boiler_Vitocrossal200_311kW.mo
index 9ddcdea1d6..0b21be3364 100644
--- a/AixLib/DataBase/Boiler/General/Boiler_Vitocrossal200_311kW.mo
+++ b/AixLib/DataBase/Boiler/General/Boiler_Vitocrossal200_311kW.mo
@@ -4,7 +4,7 @@ record Boiler_Vitocrossal200_311kW
extends BoilerTwoPointBaseDataDefinition(
name="Vitocrossal200_311kW",
volume=279/1000,
- pressureDrop = 4000/(7.79e-3)^2,
+ a = 4000/(7.79e-3)^2,
Q_nom = 326000,
Q_min = 326000*0.33,
eta = [0.3, (0.973+0.989)/2;
diff --git a/AixLib/DataBase/Boiler/General/Boiler_Vitodens300W_13kW.mo b/AixLib/DataBase/Boiler/General/Boiler_Vitodens300W_13kW.mo
index e8b8171be8..46907155a8 100644
--- a/AixLib/DataBase/Boiler/General/Boiler_Vitodens300W_13kW.mo
+++ b/AixLib/DataBase/Boiler/General/Boiler_Vitodens300W_13kW.mo
@@ -4,7 +4,7 @@ record Boiler_Vitodens300W_13kW
extends BoilerTwoPointBaseDataDefinition(
name="Vitodens300W_13kW",
volume=0.0076,
- pressureDrop=10218000000.0,
+ a=1.3819E+10,
Q_nom=16700,
Q_min=3600,
eta=[0.3,1.061; 1.0,0.954]);
diff --git a/AixLib/DataBase/Boiler/General/Boiler_Vitogas200F_11kW.mo b/AixLib/DataBase/Boiler/General/Boiler_Vitogas200F_11kW.mo
index a425d5cb42..5993010adb 100644
--- a/AixLib/DataBase/Boiler/General/Boiler_Vitogas200F_11kW.mo
+++ b/AixLib/DataBase/Boiler/General/Boiler_Vitogas200F_11kW.mo
@@ -3,7 +3,7 @@ record Boiler_Vitogas200F_11kW "Gas-fired boiler Viessmann Vitogas200-F 11kW"
extends BoilerTwoPointBaseDataDefinition(
name="Vitogas200F_11kW",
volume=0.0076,
- pressureDrop=10218000000.0,
+ a=1.3819E+10,
Q_nom=12100,
Q_min=3630,
eta=[0.3,0.93; 1.0,0.93]);
@@ -26,7 +26,7 @@ record Boiler_Vitogas200F_11kW "Gas-fired boiler Viessmann Vitogas200-F 11kW"
Manufacturer: Viessmann
- Broschure: Vitogas 200-F; 5/2010
+ Broschure: Vitogas 200-F; 4/2014; 541039