modelOnOff

Controlls if the Safety constraints for on-time, off-time, and cycle rate

Extends from BaseClasses.PartialSafety (Safety control with I/O).

Information

Checks if the ySet value is legal by checking if the device can either be turned on or off, depending on which state it was in.

The output yOut equals ySet, if the device

  • is on and ySet is greater than ySet_small
  • or is off and ySet is 0
  • or is on and should turn off, and exceeds the minimal on-time (if active)
  • or is off and should turn on, and does neither exceed the maximal cycle rate (if active) nor violates the minimal off-time (if active).

If the device is on and should turn off, but does not exceed the minimal on-time (if active), yOut equals min(ySet, ySetMin).

If the device is off and should turn on, but exceeds the maximal cycle rate (if active) or violates the minimal off-time (if active), yOut equals 0.

Parameters

TypeNameDefaultDescription
Booleanuse_minOnTimetrue=false to ignore minimum on-time constraint
Modelica.Units.SI.TimeminOnTimeMinimum on-time
Booleanuse_minOffTimetrue=false to ignore minimum off time constraint
Modelica.Units.SI.TimeminOffTimeMinimum off time
Booleanuse_maxCycRattrue=false to ignore maximal cycle rate constraint
IntegermaxCycRatMaximum cycle rate
BooleanonOffMea_starttrueStart value for the on-off signal of the device, true for on
RealySet_smallThreshold for relative speed for the device to be considered on
RealySetRedySet_smallReduced relative compressor speed to allow longer on-time

Connectors

TypeNameDefaultDescription
Buildings.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBussigBus (from PartialSafety)Bus-connector for the heat pump
Modelica.Blocks.Interfaces.RealInputySetInput for relative compressor speed from 0 to 1
Modelica.Blocks.Interfaces.RealOutputyOutOutput for relative compressor speed from 0 to 1

Components

TypeNameDefaultDescription
Modelica.Blocks.Logical.HysteresisySetOn=true if device is set on
Modelica.Blocks.Routing.BooleanPassThroughisAblToTurOff=true if the device is allowed to turn off, else false
Modelica.Blocks.Logical.PrepreOnOffOn off signal of previous time step
Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.CycleRateBoundarycycRatBouCheck cycle rate violations
Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.OnPastThresholdlocTimCtrCheck if device should be locked
Modelica.Blocks.Logical.NotnotIsOn=true if device is off
Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.OnPastThresholdrunTimCtrCheck if device needs to run
Modelica.Blocks.Logical.AndandIsAblToTurOn=false to lock the device off
Modelica.Blocks.Sources.BooleanConstantbooConstCycRatConstant value for disabled option
Modelica.Blocks.Sources.BooleanConstantbooConstLocTimConstant value for disabled option
Modelica.Blocks.Sources.BooleanConstantbooConstRunTimConstant value for disabled option
Modelica.Blocks.Logical.NotnotSetOnDevice is not set to turn on
Modelica.Blocks.Logical.AndandTurOffCheck if device is on and is set to be turned off
Modelica.Blocks.Logical.AndandTurOnCheck if device is off and is set to be turned on
Modelica.Blocks.Logical.AndandStaOn=true if the device is on and wants to stay on
Modelica.Blocks.Logical.AndandStaOff=true if the device is off and wants to stay off
BaseClasses.OnOffFuzzyLogiconOffFuzLogFuzzy logic to device for output

Revisions

  • October 2, 2022 by Fabian Wuellhorst:
    Adjusted based on the discussion in this issue #1576)
  • November 26, 2018 by Fabian Wuellhorst:
    First implementation (see issue AixLib #577)