Skip to content

Commit

Permalink
Merge branch 'master' into issue2293_chiller_plant_seq
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed May 13, 2021
2 parents 8360545 + 2756426 commit cb0029d
Show file tree
Hide file tree
Showing 706 changed files with 151,876 additions and 45,786 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ addons:

env:
global:
- ENERGYPLUS_VERSION=EnergyPlus-9.3.0-baff08990c-Linux-x86_64
- ENERGYPLUS_VERSION=EnergyPlus-9.5.0-de239b2e5f-Linux-Ubuntu18.04-x86_64
- MODELICA_JSON_VERSION=6d950c3592fa021aa914ba4ff34a67cbb69962c6
- MODELICA_JSON_HOME=${TRAVIS_BUILD_DIR}/modelica-json

jobs:
- TEST_ARG="make test-cdl-conformance"
- TEST_ARG="make test-energyplus-validations"
- TEST_ARG="make test-bestest"
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-jmodelica PACKAGE=\"Buildings.{Air,Examples}\""
Expand Down Expand Up @@ -100,7 +101,7 @@ env:
before_install:
- sudo apt-get -y install python3.6-minimal # Provides /usr/bin/python3.6m
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [[ "$TEST_ARG" == *test-dymola* ]]; then
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* ]]; then
docker pull "$DOCKER_USERNAME"/travis_ubuntu-1804_dymola:2021-x86_64;
cp Buildings/Resources/Scripts/travis/dymola/dymola $HOME/bin/;
fi;
Expand All @@ -113,12 +114,9 @@ before_install:
cp Buildings/Resources/Scripts/travis/jmodelica/jm_ipython.sh $HOME/bin/jm_ipython.sh;
fi;
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.3.0/${ENERGYPLUS_VERSION}.tar.gz;
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.5.0/${ENERGYPLUS_VERSION}.tar.gz;
tar xzf ${ENERGYPLUS_VERSION}.tar.gz;
rm ${ENERGYPLUS_VERSION}.tar.gz;
mv -v ${ENERGYPLUS_VERSION}/energyplus ${ENERGYPLUS_VERSION}/EnergyPlus;
file ${ENERGYPLUS_VERSION}/EnergyPlus
ls -l ${ENERGYPLUS_VERSION}
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_VERSION}";
fi;
- if [[ "$TEST_ARG" == *test-cdl-conformance* ]]; then
Expand Down
36 changes: 36 additions & 0 deletions Buildings/.copiedFiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ Buildings/BoundaryConditions/SolarIrradiation/package.mo
Buildings/BoundaryConditions/SolarIrradiation/package.order
Buildings/BoundaryConditions/Types.mo
Buildings/BoundaryConditions/UsersGuide.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD100.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD200.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD300.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD400.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD500.mo
Buildings/BoundaryConditions/Validation/BESTEST/WD600.mo
Buildings/BoundaryConditions/Validation/BESTEST/package.mo
Buildings/BoundaryConditions/Validation/BESTEST/package.order
Buildings/BoundaryConditions/Validation/IsotropicAndPerezDiffuseRadiation.mo
Buildings/BoundaryConditions/Validation/UsersGuide.mo
Buildings/BoundaryConditions/Validation/package.mo
Buildings/BoundaryConditions/Validation/package.order
Buildings/BoundaryConditions/WeatherData/BaseClasses/CheckBlackBodySkyTemperature.mo
Buildings/BoundaryConditions/WeatherData/BaseClasses/CheckDewPointTemperature.mo
Buildings/BoundaryConditions/WeatherData/BaseClasses/CheckDryBulbTemperature.mo
Expand Down Expand Up @@ -1265,6 +1277,24 @@ Buildings/Resources/C-Sources/jsonWriterFree.c
Buildings/Resources/C-Sources/jsonWriterFree.h
Buildings/Resources/C-Sources/jsonWriterInit.c
Buildings/Resources/C-Sources/jsonWriterInit.h
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/421810.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/421810.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/700260.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/700260.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/722190.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/722190.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/725650.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/725650.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/855740.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/855740.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/README.md
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WD600.epw
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WD600.mos
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WeatherDriversResultsSubmittal1.json
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WeatherDriversResultsSubmittal2.json
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WeatherDriversTestSpec_1.pdf
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/WeatherDriversTestSpec_2.pdf
Buildings/Resources/Data/BoundaryConditions/Validation/BESTEST/generateResults.py
Buildings/Resources/Data/BoundaryConditions/WeatherData/BaseClasses/Examples/weatherWithLongHeader.mos
Buildings/Resources/Data/BoundaryConditions/WeatherData/Validation/DecemberToJanuary.mos
Buildings/Resources/Data/BoundaryConditions/WeatherData/Validation/TwoYears_DataOnceAMonth_TMY3.mos
Expand Down Expand Up @@ -1464,6 +1494,12 @@ Buildings/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/BaseClass
Buildings/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/Examples/DiffuseIsotropic.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/Examples/DiffusePerez.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/Examples/DirectTiltedSurface.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD100.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD200.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD300.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD400.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD500.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/Validation/BESTEST/WD600.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/WeatherData/BaseClasses/Examples/CheckBlackBodySkyTemperature.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/WeatherData/BaseClasses/Examples/CheckPressure.mos
Buildings/Resources/Scripts/Dymola/BoundaryConditions/WeatherData/BaseClasses/Examples/CheckTemperature.mos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ block Controller
"Type of controller"
annotation(Dialog(group="Economizer freeze protection", enable=use_TMix));

parameter Real kFre(final unit="1/K") = 0.1
parameter Real kFre(final unit="1/K") = 0.05
"Gain for mixed air temperature tracking for freeze protection, used if use_TMix=true"
annotation(Dialog(group="Economizer freeze protection", enable=use_TMix));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ block Modulation
final unit="1") = (uMin + uMax)/2
"Minimum loop signal for the RA damper to be fully open"
annotation (Dialog(tab="Commissioning", group="Controller"));
parameter Real samplePeriod(
final unit="s",
final quantity="Time")= 300
"Sample period of component, used to limit the rate of change of the dampers (to avoid quick opening that can result in frost)";

Buildings.Controls.OBC.CDL.Interfaces.RealInput uTSup(final unit="1")
"Signal for supply air temperature control (T Sup Control Loop Signal in diagram)"
Expand Down Expand Up @@ -102,14 +98,6 @@ protected
annotation (Placement(transformation(extent={{60,-70},{80,-50}})));
Buildings.Controls.OBC.CDL.Continuous.Max max "Overwrite due to freeze protection"
annotation (Placement(transformation(extent={{60,50},{80,70}})));
Buildings.Controls.OBC.CDL.Discrete.FirstOrderHold firOrdHolOutDam(
final samplePeriod=samplePeriod)
"First order hold to avoid too fast opening/closing of damper (which may cause freeze protection to be too slow to compensate)"
annotation (Placement(transformation(extent={{92,-70},{112,-50}})));
Buildings.Controls.OBC.CDL.Discrete.FirstOrderHold firOrdHolRetDam(
final samplePeriod=samplePeriod)
"First order hold to avoid too fast opening/closing of damper (which may cause freeze protection to be too slow to compensate)"
annotation (Placement(transformation(extent={{90,50},{110,70}})));

equation
connect(outDamPos.x2, outDamMaxLimSig.y)
Expand All @@ -130,26 +118,22 @@ equation
connect(retDamPos.f2, uRetDamPosMin)
annotation (Line(points={{-2,62},{-12,62},{-12,50},{-140,50}}, color={0,0,127}));
connect(min.u2, uOutDamPosMax)
annotation (Line(points={{58,-66},{-108,-66},{-108,-50},{-140,-50}},color={0,0,127}));
annotation (Line(points={{58,-66},{-36,-66},{-36,-50},{-140,-50}}, color={0,0,127}));
connect(min.u1, outDamPos.y)
annotation (Line(points={{58,-54},{28,-54},{28,-30},{22,-30}}, color={0,0,127}));
annotation (Line(points={{58,-54},{48,-54},{48,-30},{22,-30}}, color={0,0,127}));
connect(max.u1, retDamPos.y)
annotation (Line(points={{58,66},{30,66},{30,70},{22,70}}, color={0,0,127}));
connect(uRetDamPosMin, max.u2)
annotation (Line(points={{-140,50},{-12,50},{-12,54},{58,54}}, color={0,0,127}));
connect(min.y, firOrdHolOutDam.u)
annotation (Line(points={{82,-60},{90,-60}}, color={0,0,127}));
connect(firOrdHolOutDam.y, yOutDamPos)
annotation (Line(points={{114,-60},{140,-60}}, color={0,0,127}));
connect(uTSup, retDamPos.u)
annotation (Line(points={{-140,0},{-22,0},{-22,70},{-2,70}}, color={0,0,127}));
connect(uTSup, outDamPos.u)
annotation (Line(points={{-140,0},{-22,0},{-22,-30},{-2,-30}}, color={0,0,127}));
connect(max.y, firOrdHolRetDam.u)
annotation (Line(points={{82,60},{88,60}}, color={0,0,127}));
connect(firOrdHolRetDam.y, yRetDamPos)
annotation (Line(points={{112,60},{140,60}}, color={0,0,127}));

connect(yOutDamPos, min.y)
annotation (Line(points={{140,-60},{82,-60}}, color={0,0,127}));
connect(max.y, yRetDamPos)
annotation (Line(points={{82,60},{120,60}}, color={0,0,127}));
annotation (
defaultComponentName="mod",
Icon(graphics={
Expand Down Expand Up @@ -230,16 +214,6 @@ positions. Return and outdoor damper are not interlocked. When the economizer is
the damper positions are set to the minimum outdoor air damper position limits.
</p>
<p>
The time rate of change of the damper signals is limited by a first order hold,
using the sample time <code>samplePeriod</code>.
This prevents a quick opening of the outdoor air damper, for example when the
outdoor airflow setpoint has a step change.
Slowing down the opening of the outdoor air damper allows the freeze protection
to compensate with its dynamics that is faster than the opening of the outdoor air damper.
To avoid that all dampers are closed, the return air damper has the same
time rate of change limitation.
</p>
<p>
The control charts below show the input-output structure and an economizer damper
modulation sequence assuming a well configured controller. Control diagram:
</p>
Expand All @@ -258,6 +232,13 @@ src=\"modelica://Buildings/Resources/Images/Controls/OBC/ASHRAE/G36_PR1/AHUs/Mul
</html>", revisions="<html>
<ul>
<li>
April 24, 2021, by Michael Wetter:<br/>
Removed limit on time rate of change on damper signal.
The dampers model has already a delay which should make them sufficiently slow.
Adding this delay in the controller makes it harder to tune the controls.
This change also removed the parameter <code>samplePeriod</code>.
</li>
<li>
October 13, 2017, by Michael Wetter:<br/>
Corrected implementation for when dampers are
such positioned that they prevent the mixed air temperature from being
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ model CoolingCoil "Controller for cooling coil valve"
annotation (Placement(transformation(extent={{100,-10},{120,10}}),
iconTransformation(extent={{100,-20},{140,20}})));

Buildings.Controls.OBC.CDL.Continuous.PIDWithReset cooCoiPI(
final reverseActing=false,
final controllerType=controllerTypeCooCoi,
final k=kCooCoi,
final Ti=TiCooCoi,
final Td=TdCooCoi) "Cooling coil control signal"
annotation (Placement(transformation(extent={{-10,70},{10,90}})));

protected
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
"Logical block to check if zone is in cooling state"
Expand All @@ -47,13 +55,6 @@ protected
final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.ZoneStates.cooling)
"Cooling state value"
annotation (Placement(transformation(extent={{-80,-30},{-60,-10}})));
Buildings.Controls.OBC.CDL.Continuous.PIDWithReset cooCoiPI(
final reverseActing=false,
final controllerType=controllerTypeCooCoi,
final k=kCooCoi,
final Ti=TiCooCoi,
final Td=TdCooCoi) "Cooling coil control signal"
annotation (Placement(transformation(extent={{-10,70},{10,90}})));
Buildings.Controls.OBC.CDL.Logical.Switch switch "Switch to assign cooling coil control signal"
annotation (Placement(transformation(extent={{72,-10},{92,10}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant const(k=0) "Cooling off mode"
Expand Down Expand Up @@ -106,6 +107,13 @@ Otherwise, the control signal for the coil is set to <code>0</code>.
</html>",revisions="<html>
<ul>
<li>
May 1, 2021, by Michael Wetter:<br/>
Changed model to have the PI controller public rather than protected.
PI controllers should be public, allowing their variables to be inspected.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2477\">#2477</a>.
</li>
<li>
March 13, 2020, by Jianjun Hu:<br/>
Moved interfaces instances to be right after parameter section.
</li>
Expand Down
Loading

0 comments on commit cb0029d

Please sign in to comment.