blockVerifyDifferenceThreePeriods

Assert when condition is violated

Extends from IBPSA.Utilities.Diagnostics.BaseClasses.PartialInputCheck (Assert when condition is violated).

Information

Block that outputs satisfied = false if abs(u1-u2) > threShold within the prescribed time intervals, or satisfied = true otherwise.

Implementation

The test uses a hysteresis of plus/minus 1% in order to avoid chattering if abs(u1-u2) is near threShold.

Parameters

TypeNameDefaultDescription
Modelica.SIunits.TimestartTime (from PartialInputCheck)0Start time for activating the assert
RealthreShold (from PartialInputCheck)1E-2Threshold for equality comparison
Stringmessage (from PartialInputCheck)"Inputs differ by more than threShold"
Modelica.SIunits.TimeendTime0Start time for deactivating the assert (period one)
Modelica.SIunits.TimestartTime20Start time for activating the assert (period two)
Modelica.SIunits.TimeendTime20Start time for deactivating the assert (period two)
Modelica.SIunits.TimestartTime30Start time for activating the assert (period three)
Modelica.SIunits.TimeendTime30Start time for deactivating the assert (period three)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputu1 (from PartialInputCheck)Value to check
Modelica.Blocks.Interfaces.RealInputu2 (from PartialInputCheck)Value to check
Modelica.Blocks.Interfaces.BooleanOutputsatisfied
Modelica.Blocks.Interfaces.RealOutputdiffDifference u1-u2

Revisions

  • September 7, 2018, by Michael Wetter:
    Rewrote inequality to turn a state into a time event for Dymola 2019FD01.
  • December 16, 2016, by Michael Wetter:
    Reformulated model for https://github.com/ibpsa/modelica-ibpsa/issues/623.
  • October 10, 2013, by Michael Wetter:
    Reformulated model to allow scheduling of time events as opposed to state events, and removed noEvent operator which is not needed as these are only time events.
  • June 29, 2016, by Moritz Lauster:
    First implementation.