Buildings.Controls.OBC.CDL.Logical.Validation
Collection of models that validate the logical blocks of the CDL
Information
This package contains models that validate the blocks in Buildings.Controls.OBC.CDL.Logical.
The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.
Package Content
Name | Description |
---|---|
And | Validation model for the And block |
Change | Validation model for the Change block. |
Edge | Validation model for the Edge block |
FallingEdge | Validation model for the falling edge block |
Latch | Validation model for the Latch block |
MultiAnd | Model to validate the application of MultiAnd block |
MultiOr | Model to validate the application of MultiOr block |
Nand | Validation model for the Nand block |
Nor | Validation model for the Nor block |
Not | Validation model for the Not block |
OnOffController | Validation model for the OnOffController block |
Or | Validation model for the Or block |
Or3 | Validation model for the Or3 block |
Proof | Validation model for the Proof block |
Switch | Validation model for the Switch block |
Timer | Validation model for the Timer block |
TimerAccumulating | Validation model for the timer that accumulates the time |
TimerAccumulatingNegativeStartTime | Validation model for the timer that accumulates the time, with a negative start time |
TimerNegativeStartTime | Validation model for the Timer block with a negative start time |
Toggle | Validation model for the Toggle block |
TriggeredTrapezoid | Validation model for the TriggeredTrapezoid block |
TrueDelay | Validation model for the TrueDelay block |
TrueFalseHold | Validation model for the TrueFalseHold block |
TrueHoldWithReset | Validation model for the TrueHoldWithReset block |
VariablePulse | Validation model for producing boolean pulse output |
VariablePulseMinHold | Validation model for producing boolean pulse output |
Xor | Validation model for the Xor block |
ZeroCrossing | Validation model for the zero crossing block |
Buildings.Controls.OBC.CDL.Logical.Validation.And
Validation model for the And block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.And.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Change
Validation model for the Change block.
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Change.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Edge
Validation model for the Edge block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Edge.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.FallingEdge
Validation model for the falling edge block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.FallingEdge.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Latch
Validation model for the Latch block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Latch. Following tests are implemented:
-
When the clear input is
false
, the initial output should equal to the initial latch input. -
When the clear input is
true
, the initial output should befalse
, regardless of the value of the latch input. -
At the same moment, when both the clear input and the latch input rise from
false
totrue
, the output should becomefalse
if it wastrue
, or remainfalse
if it wasfalse
. -
At the same moment, when the clear input falls from
true
tofalse
and the latch input rises fromfalse
totrue
, the output should rise fromfalse
totrue
.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.MultiAnd
Model to validate the application of MultiAnd block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.MultiAnd.
The input signals are configured as follows:
- input u1 has a period of 1 s and a width of 0.5 s.
- input u2 has a period of 2 s and a width of 0.5 s.
- input u3 has a period of 3 s and a width of 0.5 s.
- input u4 has a period of 4 s and a width of 0.5 s.
- input u5 has a period of 5 s and a width of 0.5 s.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.MultiOr
Model to validate the application of MultiOr block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.MultiOr.
The input signals are configured as follows:
- input u1 has a period of 1 s and a width of 0.5 s.
- input u2 has a period of 2 s and a width of 0.5 s.
- input u3 has a period of 3 s and a width of 0.5 s.
- input u4 has a period of 4 s and a width of 0.5 s.
- input u5 has a period of 5 s and a width of 0.5 s.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Nand
Validation model for the Nand block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Nand.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Nor
Validation model for the Nor block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Nor.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Not
Validation model for the Not block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Not.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.OnOffController
Validation model for the OnOffController block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.OnOffController.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Or
Validation model for the Or block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Or.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Or3
Validation model for the Or3 block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Or3.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Proof
Validation model for the Proof block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Proof. The following tests are implemented:
-
The instance
pro
tests the case in which both boolean inputs change simultaneously, and hence both outputs will befalse
. -
The instances
pro2
andpro3
use a different value forfeedbackDelay
. They test the case in which both the inputs change fromtrue
tofalse
. However, after the inputu_m
changes, the inputu_s
remainstrue
for a time that is longer thanfeedbackDelay
. The outputyLocFal
will betrue
. -
The instances
pro1
andpro4
use a different value forfeedbackDelay
. They test the case in which both the inputs change fromtrue
tofalse
. However, after the inputu_s
changes, the inputu_m
remainstrue
for a time that is longer thanfeedbackDelay
. The outputyLocTru
will betrue
. -
The instance
pro5
tests the case in which the measured inputu_m
does not stabilize during the debounce time, and hence both outputs will betrue
.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Switch
Validation model for the Switch block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Switch.
The input u2
is the switch input: If u2 = true
,
then output y = u1
;
else output y = u3
.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Timer
Validation model for the Timer block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Timer.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TimerAccumulating
Validation model for the timer that accumulates the time
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TimerAccumulating.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TimerAccumulatingNegativeStartTime
Validation model for the timer that accumulates the time, with a negative start time
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TimerAccumulating.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TimerNegativeStartTime
Validation model for the Timer block with a negative start time
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Timer.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Toggle
Validation model for the Toggle block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Toggle. Following tests are implemented:
-
When the clear input is
false
, the initial output should equal to the initial toggle input. -
When the clear input is
true
, the initial output should befalse
, regardless of the value of the toggle input. -
At the same moment, when both the clear input and the toggle input rise from
false
totrue
, the output should becomefalse
if it wastrue
, or remainfalse
if it wasfalse
. -
At the same moment, when the clear input falls from
true
tofalse
and the toggle input rises fromfalse
totrue
, the output should rise fromfalse
totrue
.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid
Validation model for the TriggeredTrapezoid block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TriggeredTrapezoid.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TrueDelay
Validation model for the TrueDelay block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TrueDelay.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TrueFalseHold
Validation model for the TrueFalseHold block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TrueFalseHold.
The validation uses different instances to validate different hold trueHoldDurations, different lengths of the input pulse, and different initial values for the input signal.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.TrueHoldWithReset
Validation model for the TrueHoldWithReset block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset.
The validation uses different instances to validate different hold durations, different lengths of the input pulse, and different initial values for the input signal.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.VariablePulse
Validation model for producing boolean pulse output
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.VariablePulse.
-
The instance
fal
has the constant0
input. It gives constantfalse
output. -
The instance
tru
has the constant1
input. It gives constanttrue
output. -
The instance
conTru
has the constant0.75
input. It gives the pulse output, with the width (75%). -
The instance
truFal
has the input changing from0.65
to0
. It outputs a pulse (with the width of 65%) and then changes to constantfalse
. -
The instance
falTru
has the input changing from0
to0.65
and then back to0
. It firstly outputs the constantfalse
, then a pulse (with the width of 65%) and finally back tofalse
. -
The instance
falTru1
has the input changing from0.3
to0.8
and then back to0.3
. It firstly outputs a pulse with the width of 30%, then a pulse with the width of 80%, and finally a pulse with the width of 30% again. When the input changes, it gives a new pulse immediately. -
The instance
conChaWid
has a ramp input. It gives constanttrue
output when the input is ramping up.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.VariablePulseMinHold
Validation model for producing boolean pulse output
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.VariablePulse.
It tests the case that the input value changes at the moment when the output is still in previous status in less than the minimum holding time. In the case, the output holds the previous status for the minimum holding time and then change to the new status.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.Xor
Validation model for the Xor block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.Xor.
Modelica definition
Buildings.Controls.OBC.CDL.Logical.Validation.ZeroCrossing
Validation model for the zero crossing block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Logical.ZeroCrossing.