modelWetCoilCounterFlowPIControlAutoTuningFailure

Model that demonstrates the use of a heat exchanger with condensation and with autotuning PI feedback control (intentionally designed to fail)

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.HeatExchangers.Examples.BaseClasses.PartialWetCoilCounterFlow (Partial model that demonstrates use of a heat exchanger with condensation and with feedback control).

Information

This example is identical to Buildings.Fluid.HeatExchangers.Examples.WetCoilCounterFlowPIControlAutoTuning except that the configuration is intentionally designed to cause a failure, used to test error-handling mechanisms.

The autotuning is triggered twice.
  • The first one occurs at 100 seconds and it completes successfully, with the tuned PI parameters taking effect at 157 seconds.
  • The second one occurs at 2100 seconds. However, the tuning process yields negative control gains, thus the autotuning fails and a warning is issued. The PI gains remain unchanged from the previous tuning.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TemperatureT_a1_nominal (from PartialWetCoilCounterFlow)5 + 273.15
Modelica.Units.SI.TemperatureT_b1_nominal (from PartialWetCoilCounterFlow)10 + 273.15
Modelica.Units.SI.TemperatureT_a2_nominal (from PartialWetCoilCounterFlow)30 + 273.15
Modelica.Units.SI.TemperatureT_b2_nominal (from PartialWetCoilCounterFlow)15 + 273.15
Modelica.Units.SI.MassFlowRatem1_flow_nominal (from PartialWetCoilCounterFlow)0.1Nominal mass flow rate medium 1
Modelica.Units.SI.MassFlowRatem2_flow_nominal (from PartialWetCoilCounterFlow)0.2*m1_flow_nominal*4200/1000*(T_a1_nominal - T_b1_nominal)/(T_b2_nominal - T_a2_nominal)Nominal mass flow rate medium 2

Components

TypeNameDefaultDescription
Buildings.Fluid.Sources.Boundary_pTsin_2 (from PartialWetCoilCounterFlow)
Buildings.Fluid.Sources.Boundary_pTsou_2 (from PartialWetCoilCounterFlow)
Buildings.Fluid.Sources.Boundary_pTsin_1 (from PartialWetCoilCounterFlow)
Buildings.Fluid.Sources.Boundary_pTsou_1 (from PartialWetCoilCounterFlow)
Buildings.Fluid.FixedResistances.PressureDropres_2 (from PartialWetCoilCounterFlow)
Buildings.Fluid.FixedResistances.PressureDropres_1 (from PartialWetCoilCounterFlow)
Buildings.Fluid.Sensors.TemperatureTwoPorttemSen (from PartialWetCoilCounterFlow)
Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentageval (from PartialWetCoilCounterFlow)Control valve
Modelica.Blocks.Sources.TimeTableTSet (from PartialWetCoilCounterFlow)Setpoint temperature
Buildings.Fluid.HeatExchangers.WetCoilCounterFlowhex (from PartialWetCoilCounterFlow)
Modelica.Blocks.Sources.Constantconst (from PartialWetCoilCounterFlow)
Buildings.Utilities.Psychrometrics.X_pTphix_pTphi (from PartialWetCoilCounterFlow)
Modelica.Blocks.Sources.Constantconst1 (from PartialWetCoilCounterFlow)
Modelica.Blocks.Sources.RampTWat (from PartialWetCoilCounterFlow)Water temperature, raised to high value at t=3000 s
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.FirstOrderAMIGOconController
Buildings.Controls.OBC.CDL.Logical.Sources.ConstantresSigReset signal
Buildings.Controls.OBC.CDL.Logical.Sources.PulseautTunSigSignal for enabling the autotuning

Revisions

  • October 21, 2025, by Sen Huang:
    First implementation.