Skip to content

Commit

Permalink
Update actuator model (#4000)
Browse files Browse the repository at this point in the history
* Changed actuator model to use slew rate limiter instead of 2nd order filter.

For #3965
  • Loading branch information
mwetter authored Sep 18, 2024
1 parent 86f1cb1 commit 55203c6
Show file tree
Hide file tree
Showing 331 changed files with 4,345 additions and 3,045 deletions.
4 changes: 4 additions & 0 deletions Buildings/.copiedFiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,7 @@ Buildings/Resources/Images/Fluid/Actuators/Valves/Examples/TwoWayValveTable_kv.p
Buildings/Resources/Images/Fluid/Actuators/threeWayValvePressureDropSeries.png
Buildings/Resources/Images/Fluid/Actuators/valvePressureDropSeries.png
Buildings/Resources/Images/Fluid/Actuators/valveResponse.png
Buildings/Resources/Images/Fluid/Actuators/valveResponse.svg
Buildings/Resources/Images/Fluid/Actuators/valveSchematic.png
Buildings/Resources/Images/Fluid/FMI/ExportContainers/Validation/RoomConvectiveHVACConvective.pdf
Buildings/Resources/Images/Fluid/FMI/ExportContainers/Validation/RoomConvectiveHVACConvective.png
Expand Down Expand Up @@ -2355,8 +2356,11 @@ Buildings/Resources/Images/Fluid/Movers/BaseClasses/Validation/NegativePressureO
Buildings/Resources/Images/Fluid/Movers/BaseClasses/Validation/NegativePressureOrFlow.svg
Buildings/Resources/Images/Fluid/Movers/Data/stratoscurve.png
Buildings/Resources/Images/Fluid/Movers/Examples/Supply.png
Buildings/Resources/Images/Fluid/Movers/Preconfigured/PumpCharacteristic.png
Buildings/Resources/Images/Fluid/Movers/Preconfigured/PumpCharacteristic.svg
Buildings/Resources/Images/Fluid/Movers/UsersGuide/2013-IBPSA-Wetter.pdf
Buildings/Resources/Images/Fluid/Movers/UsersGuide/fanSpeedFiltered.png
Buildings/Resources/Images/Fluid/Movers/UsersGuide/fanSpeedFiltered.svg
Buildings/Resources/Images/Fluid/Movers/UsersGuide/pumpCurve.png
Buildings/Resources/Images/Fluid/Movers/Validation/PumpValidationHead.png
Buildings/Resources/Images/Fluid/Movers/Validation/PumpValidationPower.png
Expand Down
18 changes: 7 additions & 11 deletions Buildings/Air/Systems/SingleZone/VAV/ChillerDXHeatingEconomizer.mo
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ model ChillerDXHeatingEconomizer
final m_flow_nominal=mAir_flow_nominal,
final nominalValuesDefineDefaultPressureCurve=true,
final dp_nominal=875,
final per(
final etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided,
final etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided),
final per(final etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided,
final etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided),
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
final allowFlowReversal=false,
final use_inputFilter=false,
redeclare package Medium = MediumA)
"Supply fan"
final use_riseTime=false,
redeclare package Medium = MediumA) "Supply fan"
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
Buildings.Fluid.FixedResistances.PressureDrop totalRes(
final m_flow_nominal=mAir_flow_nominal,
Expand Down Expand Up @@ -182,7 +180,7 @@ model ChillerDXHeatingEconomizer
extent={{10,-10},{-10,10}},
origin={138,-174})));
Buildings.Fluid.Movers.FlowControlled_m_flow pumChiWat(
final use_inputFilter=false,
final use_riseTime=false,
final allowFlowReversal=false,
redeclare package Medium = MediumW,
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
Expand All @@ -195,9 +193,7 @@ model ChillerDXHeatingEconomizer
final dp_nominal=12000,
final inputType=Buildings.Fluid.Types.InputType.Continuous,
final nominalValuesDefineDefaultPressureCurve=true)
"Pump for chilled water loop"
annotation (
Placement(transformation(
"Pump for chilled water loop" annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={120,-90})));
Expand Down Expand Up @@ -664,4 +660,4 @@ First implementation.
</li>
</ul>
</html>"));
end ChillerDXHeatingEconomizer;
end ChillerDXHeatingEconomizer;
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ model ElectricChillerParallel "Multiple identical electric chillers"
redeclare final Buildings.Fluid.Chillers.ElectricEIR chi[num](
final per=per));

replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic per[num]
"Performance data"
annotation (choicesAllMatching = true,
Placement(transformation(extent={{42,74},{62,94}})));
replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic per[
numAct] "Performance data" annotation (choicesAllMatching=true, Placement(
transformation(extent={{42,74},{62,94}})));
annotation ( Documentation(info="<html>
<p>
This model implements a chiller parallel with <code>num</code> identical chillers. For the chiller model please see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ model ElectricChillerParallel "Model that test electric chiller parallel"
per2 "Chiller performance data"
annotation (Placement(transformation(extent={{32,50},{52,70}})));
Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel chiPar(
num=2,
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
m1_flow_nominal=mEva_flow_nominal,
Expand Down Expand Up @@ -104,10 +103,10 @@ equation
annotation (Line(points={{-20,-50},{-16,-50},{-16,-26},{-10,-26}},
color={0,127,255}));
connect(greaterThreshold.y, chiPar.on[1])
annotation (Line(points={{-19,60},{-16,60},{-16,-17},{-12,-17}},
annotation (Line(points={{-19,60},{-16,60},{-16,-16},{-12,-16}},
color={255,0,255}));
connect(greaterThreshold.y, chiPar.on[2])
annotation (Line(points={{-19,60},{-16,60},{-16,-15},{-12,-15}},
annotation (Line(points={{-19,60},{-16,60},{-16,-16},{-12,-16}},
color={255,0,255}));
connect(TSet.y, chiPar.TSet)
annotation (Line(points={{-59,30},{-28,30},{-28,-20},{-12,-20}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ model PumpParallel "Example that tests the model pump parallels"
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
threshold=thr1,
tau=1,
use_inputFilter=false)
"Pumps with speed controlled"
use_riseTime=false) "Pumps with speed controlled"
annotation (Placement(transformation(extent={{-18,30},{2,50}})));

Buildings.Fluid.FixedResistances.PressureDrop dp2(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ partial model PartialChillerWSE
numVal=4,
final deltaM=deltaM1);
extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.SignalFilterParameters(
final numFil=1,
final numAct=1,
final yValve_start={yValWSE_start});
extends Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters(
final activate_ThrWayVal=use_controller);
Expand All @@ -32,7 +32,7 @@ partial model PartialChillerWSE
annotation(Dialog(group="Two-way valve"));
parameter Real[numChi] yValChi_start=fill(0,numChi)
"Initial value of output from on/off valves in chillers"
annotation(Dialog(tab="Dynamics", group="Filtered opening",enable=use_inputFilter));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",enable=use_strokeTime));

//WSE
parameter Modelica.Units.SI.Efficiency eta(
Expand All @@ -45,10 +45,11 @@ partial model PartialChillerWSE
annotation(Dialog(group="Two-way valve"));
parameter Real yValWSE_start=0
"Initial value of output from on/off valve in WSE"
annotation(Dialog(tab="Dynamics", group="Filtered opening",enable=use_inputFilter));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",enable=use_strokeTime));
parameter Real yThrWayValWSE_start=0
"Initial value of output from three-way bypass valve in WSE"
annotation(Dialog(tab="Dynamics", group="Filtered opening",enable=use_controller and use_inputFilter));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",
enable=use_controller and use_strokeTime));

// Dynamics
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
Expand Down Expand Up @@ -157,8 +158,8 @@ partial model PartialChillerWSE
final num=numChi,
final per=perChi,
final homotopyInitialization=homotopyInitialization,
final use_inputFilter=use_inputFilter,
final riseTimeValve=riseTimeValve,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final initValve=initValve,
final m1_flow_nominal=m1_flow_chi_nominal,
final m2_flow_nominal=m2_flow_chi_nominal,
Expand All @@ -183,7 +184,8 @@ partial model PartialChillerWSE
final yValve_start=yValChi_start)
"Chillers with identical nominal parameters but different performance curves"
annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
Buildings.Applications.DataCenters.ChillerCooled.Equipment.WatersideEconomizer wse(
Buildings.Applications.DataCenters.ChillerCooled.Equipment.WatersideEconomizer
wse(
redeclare final replaceable package Medium1 = Medium1,
redeclare final replaceable package Medium2 = Medium2,
final CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
Expand All @@ -203,8 +205,8 @@ partial model PartialChillerWSE
final deltaM2=deltaM2,
final homotopyInitialization=homotopyInitialization,
final l=lValWSE,
final use_inputFilter=use_inputFilter,
final riseTimeValve=riseTimeValve,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final initValve=initValve,
final energyDynamics=energyDynamics,
final p_start=p2_start,
Expand Down Expand Up @@ -243,8 +245,7 @@ partial model PartialChillerWSE
final show_T=show_T,
final portFlowDirection_1=portFlowDirection_1,
final portFlowDirection_2=portFlowDirection_2,
final portFlowDirection_3=portFlowDirection_3)
"Waterside economizer"
final portFlowDirection_3=portFlowDirection_3) "Waterside economizer"
annotation (Placement(transformation(extent={{40,20},{60,40}})));
Buildings.Fluid.Sensors.TemperatureTwoPort senTem(
redeclare final replaceable package Medium = Medium2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ partial model PartialCoolingCoilHumidifyingHeating "Partial AHU model "
"Valve leakage, l=Kv(y=0)/Kv(y=1)"
annotation(Dialog(group="Valve"));

parameter Boolean use_inputFilterValve=false
"= true, if opening is filtered with a 2nd order CriticalDamping filter for the water-side valve"
parameter Boolean use_strokeTime=false
"Set to true to continuously open and close valve on the water-side"
annotation(Dialog(tab="Dynamics", group="Valve"));
parameter Modelica.Units.SI.Time riseTimeValve=120
"Rise time of the filter for the water-side valve (time to reach 99.6 % of an opening step)"
parameter Modelica.Units.SI.Time strokeTime=120
"Time needed to open or close valve"
annotation (Dialog(
tab="Dynamics",
group="Valve",
enable=use_inputFilterValve));
enable=use_strokeTime));
parameter Modelica.Blocks.Types.Init initValve=Modelica.Blocks.Types.Init.InitialOutput
"Type of initialization (no init/steady state/initial state/initial output)"
annotation(Dialog(tab="Dynamics", group="Valve",enable=use_inputFilterValve));
annotation(Dialog(tab="Dynamics", group="Valve",enable=use_strokeTime));
parameter Real yValve_start=1 "Initial value of output"
annotation(Dialog(tab="Dynamics", group="Valve",enable=use_inputFilterValve));
annotation(Dialog(tab="Dynamics", group="Valve",enable=use_strokeTime));
// fan parameters
parameter Buildings.Fluid.Types.InputType inputType = Buildings.Fluid.Types.InputType.Continuous
"Control input type"
Expand All @@ -62,20 +62,20 @@ partial model PartialCoolingCoilHumidifyingHeating "Partial AHU model "
parameter Modelica.Units.SI.Time tauFan=1
"Time constant at nominal flow (if energyDynamics <> SteadyState)"
annotation (Dialog(tab="Dynamics", group="Fan"));
parameter Boolean use_inputFilterFan=true
"= true, if speed is filtered with a 2nd order CriticalDamping filter"
parameter Boolean use_riseTime=true
"Set to true to continuously change motor speed"
annotation(Dialog(tab="Dynamics", group="Fan"));
parameter Modelica.Units.SI.Time riseTimeFan=30
"Rise time of the filter (time to reach 99.6 % of the speed)" annotation (
parameter Modelica.Units.SI.Time riseTime=30
"Time needed to change motor speed between zero and full speed" annotation (
Dialog(
tab="Dynamics",
group="Fan",
enable=use_inputFilterFan));
enable=use_riseTime));
parameter Modelica.Blocks.Types.Init initFan=Modelica.Blocks.Types.Init.InitialOutput
"Type of initialization (no init/steady state/initial state/initial output)"
annotation(Dialog(tab="Dynamics", group="Fan",enable=use_inputFilterFan));
annotation(Dialog(tab="Dynamics", group="Fan",enable=use_riseTime));
parameter Real yFan_start(min=0, max=1, unit="1")=0 "Initial value of speed"
annotation(Dialog(tab="Dynamics", group="Fan",enable=use_inputFilterFan));
annotation(Dialog(tab="Dynamics", group="Fan",enable=use_riseTime));
replaceable parameter Buildings.Fluid.Movers.Data.Generic perFan "Performance data for the fan"
annotation (Placement(transformation(extent={{-80,80},{-60,100}})));

Expand Down Expand Up @@ -127,24 +127,23 @@ if not inputType == Buildings.Fluid.Types.InputType.Stages
annotation (Placement(transformation(extent={{60,-64},{80,-44}})));
replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine fan
constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine(
redeclare final package Medium = Medium2,
final per=perFan,
final allowFlowReversal=allowFlowReversal2,
final show_T=show_T,
final energyDynamics=energyDynamics,
final inputType=inputType,
final tau=tauFan,
final addPowerToMedium=addPowerToMedium,
final use_inputFilter=use_inputFilterFan,
final riseTime=riseTimeFan,
final init=initFan,
final p_start=p_start,
final T_start=T_start,
final X_start=X_start,
final C_start=C_start,
final C_nominal=C_nominal,
final m_flow_small=m2_flow_small)
"Fan"
redeclare final package Medium = Medium2,
final per=perFan,
final allowFlowReversal=allowFlowReversal2,
final show_T=show_T,
final energyDynamics=energyDynamics,
final inputType=inputType,
final tau=tauFan,
final addPowerToMedium=addPowerToMedium,
final use_riseTime=use_riseTime,
final riseTime=riseTime,
final init=initFan,
final p_start=p_start,
final T_start=T_start,
final X_start=X_start,
final C_start=C_start,
final C_nominal=C_nominal,
final m_flow_small=m2_flow_small) "Fan"
annotation (Placement(transformation(extent={{-50,-70},{-70,-50}})));
replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValveKv watVal
constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValveKv(
Expand All @@ -157,8 +156,8 @@ if not inputType == Buildings.Fluid.Types.InputType.Stages
final homotopyInitialization=homotopyInitialization,
final linearized=linearizeFlowResistance1,
final rhoStd=rhoStd,
final use_inputFilter=use_inputFilterValve,
final riseTime=riseTimeValve,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final init=initValve,
final y_start=yValve_start,
final dpValve_nominal=dpValve_nominal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,25 @@ partial model PartialHeatExchanger "Partial model for heat exchangers "
start=0.8) "constant effectiveness";

// Filter opening
parameter Boolean use_inputFilter=true
"= true, if opening is filtered with a 2nd order CriticalDamping filter"
annotation(Dialog(tab="Dynamics", group="Filtered opening",enable=activate_ThrWayVal));
parameter Modelica.Units.SI.Time riseTime=30
"Rise time of the filter (time to reach 99.6 % of an opening step)"
parameter Boolean use_strokeTime=true
"Set to true to continuously open and close valve"
annotation(Dialog(tab="Dynamics", group=
"Time needed to open or close valve",
enable=activate_ThrWayVal));
parameter Modelica.Units.SI.Time strokeTime=30
"Time needed to open or close valve"
annotation (Dialog(
tab="Dynamics",
group="Filtered opening",
enable=(activate_ThrWayVal and use_inputFilter)));
group="Time needed to open or close valve",
enable=(activate_ThrWayVal and use_strokeTime)));
parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput
"Type of initialization (no init/steady state/initial state/initial output)"
annotation(Dialog(tab="Dynamics", group="Filtered opening",
enable=(activate_ThrWayVal and use_inputFilter)));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",
enable=(activate_ThrWayVal and use_strokeTime)));
parameter Real yThrWayVal_start=1
"Initial value of output from the filter in the bypass valve"
annotation(Dialog(tab="Dynamics", group="Filtered opening",
enable=(activate_ThrWayVal and use_inputFilter)));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",
enable=(activate_ThrWayVal and use_strokeTime)));
parameter Modelica.Units.SI.PressureDifference dpValve_nominal(
displayUnit="Pa",
min=0,
Expand Down Expand Up @@ -67,8 +69,8 @@ partial model PartialHeatExchanger "Partial model for heat exchangers "
final linearized={linearizeFlowResistance2,linearizeFlowResistance2},
final rhoStd=rhoStd,
final homotopyInitialization=homotopyInitialization,
final use_inputFilter=use_inputFilter,
final riseTime=riseTime,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final init=init,
final R=R,
final delta0=delta0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ model PartialIntegratedPrimary

parameter Real yVal5_start(min=0,max=1) = 0
"Initial value of output:0-closed, 1-fully opened"
annotation(Dialog(tab="Dynamics", group="Filtered opening",
enable=use_inputFilter));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",
enable=use_strokeTime));
parameter Real yVal6_start(min=0,max=1) = 1-yVal5_start
"Initial value of output:0-closed, 1-fully opened"
annotation(Dialog(tab="Dynamics", group="Filtered opening",
enable=use_inputFilter));
annotation(Dialog(tab="Dynamics", group="Time needed to open or close valve",
enable=use_strokeTime));

Modelica.Blocks.Interfaces.RealInput yVal6(
final unit = "1",
Expand Down Expand Up @@ -56,15 +56,14 @@ model PartialIntegratedPrimary
final homotopyInitialization=homotopyInitialization,
final linearized=linearizeFlowResistance2,
final deltaM=deltaM2,
final use_inputFilter=use_inputFilter,
final riseTime=riseTimeValve,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final init=initValve,
final dpFixed_nominal=0,
final dpValve_nominal=dpValve_nominal[5],
final l=lVal5,
final rhoStd=rhoStd[5],
final y_start=yVal5_start)
"Bypass valve: closed when fully mechanic cooling is activated;
final y_start=yVal5_start) "Bypass valve: closed when fully mechanic cooling is activated;
open when fully mechanic cooling is activated"
annotation (Placement(transformation(extent={{60,-30},{40,-10}})));
Buildings.Fluid.Actuators.Valves.TwoWayLinear val6(
Expand All @@ -77,15 +76,14 @@ model PartialIntegratedPrimary
final homotopyInitialization=homotopyInitialization,
final linearized=linearizeFlowResistance2,
final deltaM=deltaM2,
final use_inputFilter=use_inputFilter,
final riseTime=riseTimeValve,
final use_strokeTime=use_strokeTime,
final strokeTime=strokeTime,
final init=initValve,
final dpFixed_nominal=0,
final dpValve_nominal=dpValve_nominal[6],
final l=lVal6,
final rhoStd=rhoStd[6],
final y_start=yVal6_start)
"Bypass valve: closed when free cooling mode is deactivated;
final y_start=yVal6_start) "Bypass valve: closed when free cooling mode is deactivated;
open when free cooling is activated"
annotation (Placement(transformation(extent={{-30,-30},{-50,-10}})));

Expand Down
Loading

0 comments on commit 55203c6

Please sign in to comment.