Buildings.Obsolete.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
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.And3 And3 Validation model for the And3 block
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.OnOffController OnOffController Validation model for the OnOffController block
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Or3 Or3 Validation model for the Or3 block
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Timer Timer Validation model for the Timer block
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid TriggeredTrapezoid Validation model for the TriggeredTrapezoid block
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.ZeroCrossing ZeroCrossing Validation model for the zero crossing block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.And3 Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.And3

Validation model for the And3 block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.And3

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.And3.

Modelica definition

model And3 "Validation model for the And3 block" Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( width=0.5, period=1.5) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( width=0.5, period=5) "Block that outputs cyclic on and off"; Buildings.Obsolete.Controls.OBC.CDL.Logical.And3 and1 "Logical and of three inputs"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( width=0.5, period=3) "Block that outputs cyclic on and off"; equation connect(booPul1.y,and1.u1); connect(booPul2.y,and1.u2); connect(booPul3.y,and1.u3); end And3;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.OnOffController Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.OnOffController

Validation model for the OnOffController block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.OnOffController

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.OnOffController.

Modelica definition

model OnOffController "Validation model for the OnOffController block" Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp1( duration=5, offset=0, height=31.415926) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sin sin1 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant cons2( k=0.7) "Constant as source term"; Buildings.Obsolete.Controls.OBC.CDL.Logical.OnOffController onOffController( bandwidth=0.1) "Delay a rising edge of the input, but do not delay a falling edge."; equation connect(ramp1.y,sin1.u); connect(sin1.y,onOffController.u); connect(cons2.y,onOffController.reference); end OnOffController;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Or3 Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Or3

Validation model for the Or3 block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Or3

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.Or3.

Modelica definition

model Or3 "Validation model for the Or3 block" Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( width=0.5, period=1.5) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( width=0.5, period=3) "Block that outputs cyclic on and off"; Buildings.Obsolete.Controls.OBC.CDL.Logical.Or3 or1 "Output true if at least one input is true"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( width=0.5, period=5) "Block that outputs cyclic on and off"; equation connect(booPul3.y,or1.u3); connect(booPul2.y,or1.u2); connect(booPul1.y,or1.u1); end Or3;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Timer Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Timer

Validation model for the Timer block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Timer

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer.

Modelica definition

model Timer "Validation model for the Timer block" Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer resetTimer(accumulate=false) "Timer will reset"; Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer accuTimer "Reset timer based on boolean input"; Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer accuTimer1 "Reset timer based on boolean input"; Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer accuTimer2 "Reset timer based on boolean input"; Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer accuTimer3 "Reset timer based on boolean input"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( final width=0.1, final period=4) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(final t=1.5) "Output true when input is greater than threshold"; Buildings.Controls.OBC.CDL.Logical.Pre pre "Returns the value of the input signal from the last event iteration"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( final width=0.5, final period=2) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( final width=0.5, final period=2, final shift=0.5) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=false) "Block that outputs cyclic on and off"; equation connect(booPul.y, resetTimer.u); connect(booPul.y, accuTimer.u); connect(booPul1.y, accuTimer.reset); connect(booPul.y,accuTimer3. u); connect(accuTimer3.y, greThr.u); connect(greThr.y, pre.u); connect(pre.y,accuTimer3. reset); connect(booPul.y, accuTimer1.u); connect(booPul.y, accuTimer1.reset); connect(booPul.y, accuTimer2.reset); connect(booPul2.y, accuTimer2.u); connect(con.y, resetTimer.reset); end Timer;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid

Validation model for the TriggeredTrapezoid block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.TriggeredTrapezoid.

Modelica definition

model TriggeredTrapezoid "Validation model for the TriggeredTrapezoid block" Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( width=0.5, period=2) "Block that outputs cyclic on and off"; Buildings.Obsolete.Controls.OBC.CDL.Logical.TriggeredTrapezoid triggeredTrapezoid1( amplitude=5, rising=0.3, offset=1.5) "Triggered trapezoid generator"; equation connect(booPul.y,triggeredTrapezoid1.u); end TriggeredTrapezoid;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.ZeroCrossing Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.ZeroCrossing

Validation model for the zero crossing block

Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.ZeroCrossing

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Logical.ZeroCrossing.

Modelica definition

model ZeroCrossing "Validation model for the zero crossing block" Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp1( duration=5, offset=0, height=31.415926) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sin sin1 "Block that outputs the sine of the input"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( width=0.15, period=5) "Block that outputs cyclic on and off"; Buildings.Obsolete.Controls.OBC.CDL.Logical.ZeroCrossing zeroCrossing "Zero crossing block"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp2( duration=5, offset=0, height=31.415926) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler triggeredSampler "Triggered sampler"; equation connect(booPul1.y,zeroCrossing.enable); connect(ramp1.y,sin1.u); connect(sin1.y,zeroCrossing.u); connect(ramp2.y,triggeredSampler.u); connect(zeroCrossing.y,triggeredSampler.trigger); end ZeroCrossing;