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
ySetis greater thanySet_small -
or is off and
ySetis 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
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | use_minOnTime | true | =false to ignore minimum on-time constraint |
| Modelica.Units.SI.Time | minOnTime | Minimum on-time | |
| Boolean | use_minOffTime | true | =false to ignore minimum off time constraint |
| Modelica.Units.SI.Time | minOffTime | Minimum off time | |
| Boolean | use_maxCycRat | true | =false to ignore maximal cycle rate constraint |
| Integer | maxCycRat | Maximum cycle rate | |
| Boolean | onOffMea_start | true | Start value for the on-off signal of the device, true for on |
| Real | ySet_small | Threshold for relative speed for the device to be considered on | |
| Real | ySetRed | ySet_small | Reduced relative compressor speed to allow longer on-time |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.HeatPumps.ModularReversible.BaseClasses.RefrigerantMachineControlBus | sigBus (from PartialSafety) | Bus-connector for the heat pump | |
| Modelica.Blocks.Interfaces.RealInput | ySet | Input for relative compressor speed from 0 to 1 | |
| Modelica.Blocks.Interfaces.RealOutput | yOut | Output for relative compressor speed from 0 to 1 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Logical.Hysteresis | ySetOn | =true if device is set on | |
| Modelica.Blocks.Routing.BooleanPassThrough | isAblToTurOff | =true if the device is allowed to turn off, else false | |
| Modelica.Blocks.Logical.Pre | preOnOff | On off signal of previous time step | |
| Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.CycleRateBoundary | cycRatBou | Check cycle rate violations | |
| Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.OnPastThreshold | locTimCtr | Check if device should be locked | |
| Modelica.Blocks.Logical.Not | notIsOn | =true if device is off | |
| Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.BaseClasses.OnPastThreshold | runTimCtr | Check if device needs to run | |
| Modelica.Blocks.Logical.And | andIsAblToTurOn | =false to lock the device off | |
| Modelica.Blocks.Sources.BooleanConstant | booConstCycRat | Constant value for disabled option | |
| Modelica.Blocks.Sources.BooleanConstant | booConstLocTim | Constant value for disabled option | |
| Modelica.Blocks.Sources.BooleanConstant | booConstRunTim | Constant value for disabled option | |
| Modelica.Blocks.Logical.Not | notSetOn | Device is not set to turn on | |
| Modelica.Blocks.Logical.And | andTurOff | Check if device is on and is set to be turned off | |
| Modelica.Blocks.Logical.And | andTurOn | Check if device is off and is set to be turned on | |
| Modelica.Blocks.Logical.And | andStaOn | =true if the device is on and wants to stay on | |
| Modelica.Blocks.Logical.And | andStaOff | =true if the device is off and wants to stay off | |
| BaseClasses.OnOffFuzzyLogic | onOffFuzLog | Fuzzy 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)