CDL.Logical.Sources.Validation

Collection of models that validate the logical sources blocks of the CDL

Information

This package contains models that validate the blocks in CDL.Logical.Sources.

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
CDL.Logical.Sources.Validation.Constant Constant Validate the Constant block
CDL.Logical.Sources.Validation.Pulse Pulse Validation model for the Boolean Pulse block
CDL.Logical.Sources.Validation.PulseNegativeStartTime PulseNegativeStartTime Validation model for the Boolean Pulse block with negative start time
CDL.Logical.Sources.Validation.PulsePositiveStartTime PulsePositiveStartTime Validation model for the Boolean Pulse block with positive, non-zero start time
CDL.Logical.Sources.Validation.SampleTrigger SampleTrigger Validation model for the SampleTrigger block
CDL.Logical.Sources.Validation.SampleTriggerNegativeStartTime SampleTriggerNegativeStartTime Validation model for the SampleTrigger block with a negative start time
CDL.Logical.Sources.Validation.SampleTriggerPositiveStartTime SampleTriggerPositiveStartTime Validation model for the SampleTrigger block with a positive start time
CDL.Logical.Sources.Validation.TimeTable TimeTable Validation model for TimeTable block
CDL.Logical.Sources.Validation.TimeTableNegativeStartTime TimeTableNegativeStartTime Validation model for TimeTable block with negative start time

CDL.Logical.Sources.Validation.Constant CDL.Logical.Sources.Validation.Constant

Validate the Constant block

CDL.Logical.Sources.Validation.Constant

Information

Validation test for the block CDL.Logical.Sources.Constant.

Modelica definition

model Constant "Validate the Constant block" CDL.Logical.Sources.Constant con( k=true) "Block output boolean constant value"; end Constant;

CDL.Logical.Sources.Validation.Pulse CDL.Logical.Sources.Validation.Pulse

Validation model for the Boolean Pulse block

CDL.Logical.Sources.Validation.Pulse

Information

Validation test for the block CDL.Logical.Sources.Pulse.

This validates the blocks with a start time of 0. All blocks with the same letter after the underscore are configured to produce the same output.

Modelica definition

model Pulse "Validation model for the Boolean Pulse block" CDL.Logical.Sources.Pulse booPul_a1( width=0.2, period=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b1( width=0.2, period=2, shift=0.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c1( width=0.2, period=2, shift=0.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a2( width=0.2, period=2, shift=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b2( width=0.2, period=2, shift=2.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c2( width=0.2, period=2, shift=2.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a3( width=0.2, period=2, shift=4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b3( width=0.2, period=2, shift=4.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c3( width=0.2, period=2, shift=4.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a4( width=0.2, period=2, shift=-2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b4( width=0.2, period=2, shift=-1.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c4( width=0.2, period=2, shift=-1.4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a5( width=0.2, period=2, shift=-4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b5( width=0.2, period=2, shift=-3.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c5( width=0.2, period=2, shift=-3.4) "Boolean pulse signal"; end Pulse;

CDL.Logical.Sources.Validation.PulseNegativeStartTime CDL.Logical.Sources.Validation.PulseNegativeStartTime

Validation model for the Boolean Pulse block with negative start time

CDL.Logical.Sources.Validation.PulseNegativeStartTime

Information

Validation test for the block CDL.Logical.Sources.Pulse.

This validates the blocks with a start time of -10 seconds. All blocks with the same letter after the underscore are configured to produce the same output.

Modelica definition

model PulseNegativeStartTime "Validation model for the Boolean Pulse block with negative start time" CDL.Logical.Sources.Pulse booPul_a1( width=0.2, period=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b1( width=0.2, period=2, shift=0.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c1( width=0.2, period=2, shift=0.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a2( width=0.2, period=2, shift=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b2( width=0.2, period=2, shift=2.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c2( width=0.2, period=2, shift=2.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a3( width=0.2, period=2, shift=4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b3( width=0.2, period=2, shift=4.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c3( width=0.2, period=2, shift=4.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a4( width=0.2, period=2, shift=-2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b4( width=0.2, period=2, shift=-1.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c4( width=0.2, period=2, shift=-1.4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a5( width=0.2, period=2, shift=-4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b5( width=0.2, period=2, shift=-3.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c5( width=0.2, period=2, shift=-3.4) "Boolean pulse signal"; end PulseNegativeStartTime;

CDL.Logical.Sources.Validation.PulsePositiveStartTime CDL.Logical.Sources.Validation.PulsePositiveStartTime

Validation model for the Boolean Pulse block with positive, non-zero start time

CDL.Logical.Sources.Validation.PulsePositiveStartTime

Information

Validation test for the block CDL.Logical.Sources.Pulse.

This validates the blocks with a start time of 9 seconds. All blocks with the same letter after the underscore are configured to produce the same output.

Modelica definition

model PulsePositiveStartTime "Validation model for the Boolean Pulse block with positive, non-zero start time" CDL.Logical.Sources.Pulse booPul_a1( width=0.2, period=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b1( width=0.2, period=2, shift=0.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c1( width=0.2, period=2, shift=0.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a2( width=0.2, period=2, shift=2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b2( width=0.2, period=2, shift=2.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c2( width=0.2, period=2, shift=2.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a3( width=0.2, period=2, shift=4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b3( width=0.2, period=2, shift=4.1) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c3( width=0.2, period=2, shift=4.6) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a4( width=0.2, period=2, shift=-2) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b4( width=0.2, period=2, shift=-1.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c4( width=0.2, period=2, shift=-1.4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_a5( width=0.2, period=2, shift=-4) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_b5( width=0.2, period=2, shift=-3.9) "Boolean pulse signal"; CDL.Logical.Sources.Pulse booPul_c5( width=0.2, period=2, shift=-3.4) "Boolean pulse signal"; end PulsePositiveStartTime;

CDL.Logical.Sources.Validation.SampleTrigger CDL.Logical.Sources.Validation.SampleTrigger

Validation model for the SampleTrigger block

CDL.Logical.Sources.Validation.SampleTrigger

Information

Validation test for the block CDL.Logical.Sources.SampleTrigger. The instances samTri and samTri1 use a different value for the parameter shift.

Modelica definition

model SampleTrigger "Validation model for the SampleTrigger block" CDL.Logical.Sources.SampleTrigger samTri( period=0.5) "Block that generates sample trigger signal"; CDL.Continuous.Sources.Ramp ramp( duration=5, offset=0, height=20) "Block that generates ramp signal"; CDL.Discrete.TriggeredSampler triggeredSampler "Triggered sampler"; CDL.Logical.Sources.SampleTrigger samTri1( period=0.5, shift=1.3) "Block that generates sample trigger signal"; CDL.Discrete.TriggeredSampler triggeredSampler1 "Triggered sampler"; equation connect(ramp.y,triggeredSampler.u); connect(samTri.y,triggeredSampler.trigger); connect(samTri1.y,triggeredSampler1.trigger); connect(triggeredSampler1.u,ramp.y); end SampleTrigger;

CDL.Logical.Sources.Validation.SampleTriggerNegativeStartTime CDL.Logical.Sources.Validation.SampleTriggerNegativeStartTime

Validation model for the SampleTrigger block with a negative start time

CDL.Logical.Sources.Validation.SampleTriggerNegativeStartTime

Information

Validation test for the block CDL.Logical.Sources.SampleTrigger with negative start time. The instances samTri and samTri1 use a different value for the parameter shift.

Modelica definition

model SampleTriggerNegativeStartTime "Validation model for the SampleTrigger block with a negative start time" CDL.Logical.Sources.SampleTrigger samTri( period=0.5) "Block that generates sample trigger signal"; CDL.Continuous.Sources.Ramp ramp( duration=5, offset=0, height=20, startTime=-2) "Block that generates ramp signal"; CDL.Discrete.TriggeredSampler triggeredSampler "Triggered sampler"; CDL.Logical.Sources.SampleTrigger samTri1( period=0.5, shift=3.2) "Block that generates sample trigger signal"; CDL.Discrete.TriggeredSampler triggeredSampler1 "Triggered sampler"; equation connect(ramp.y,triggeredSampler.u); connect(samTri.y,triggeredSampler.trigger); connect(samTri1.y,triggeredSampler1.trigger); connect(triggeredSampler1.u,ramp.y); end SampleTriggerNegativeStartTime;

CDL.Logical.Sources.Validation.SampleTriggerPositiveStartTime CDL.Logical.Sources.Validation.SampleTriggerPositiveStartTime

Validation model for the SampleTrigger block with a positive start time

CDL.Logical.Sources.Validation.SampleTriggerPositiveStartTime

Information

Validation test for the block CDL.Logical.Sources.SampleTrigger with positive start time. The instances samTri and samTri1 use a different value for the parameter shift.

Modelica definition

model SampleTriggerPositiveStartTime "Validation model for the SampleTrigger block with a positive start time" CDL.Logical.Sources.SampleTrigger samTri( period=0.5) "Block that generates sample trigger signal"; CDL.Continuous.Sources.Ramp ramp( duration=5, offset=0, height=20, startTime=1) "Block that generates ramp signal"; CDL.Discrete.TriggeredSampler triggeredSampler "Triggered sampler"; CDL.Logical.Sources.SampleTrigger samTri1( period=0.5, shift=0.3) "Block that generates sample trigger signal"; CDL.Discrete.TriggeredSampler triggeredSampler1( y_start=-2) "Triggered sampler"; equation connect(ramp.y,triggeredSampler.u); connect(samTri.y,triggeredSampler.trigger); connect(samTri1.y,triggeredSampler1.trigger); connect(triggeredSampler1.u,ramp.y); end SampleTriggerPositiveStartTime;

CDL.Logical.Sources.Validation.TimeTable CDL.Logical.Sources.Validation.TimeTable

Validation model for TimeTable block

CDL.Logical.Sources.Validation.TimeTable

Information

Validation test for the block CDL.Logical.Sources.TimeTable.

Modelica definition

model TimeTable "Validation model for TimeTable block" CDL.Logical.Sources.TimeTable booTimTab( table=[ 0,1,0; 1.3,1,1; 2.9,0,0; 4,1,0], period=5) "Time table with boolean output"; CDL.Logical.Sources.TimeTable booTimTabOneRow( table=[ 0,1,0], period=1) "Time table with boolean output for a single table row"; CDL.Logical.Sources.TimeTable booTimTabTwi( table=[ 0,1,0; 1.3,1,1; 2.9,0,0; 4,1,0], period=10, timeScale=2) "Time table with boolean output, periodic repetition, and doubled time"; end TimeTable;

CDL.Logical.Sources.Validation.TimeTableNegativeStartTime CDL.Logical.Sources.Validation.TimeTableNegativeStartTime

Validation model for TimeTable block with negative start time

CDL.Logical.Sources.Validation.TimeTableNegativeStartTime

Information

This model validates the block CDL.Logical.Sources.TimeTable. The model is identical to CDL.Logical.Sources.Validation.TimeTable except that the start time is negative.

Modelica definition

model TimeTableNegativeStartTime "Validation model for TimeTable block with negative start time" CDL.Logical.Sources.TimeTable booTimTab( table=[ 0,1,0; 1.3,1,1; 2.9,0,0; 4,1,0], period=5) "Time table with boolean output"; CDL.Logical.Sources.TimeTable booTimTabOneRow( table=[ 0,1,0], period=1) "Time table with boolean output for a single table row"; CDL.Logical.Sources.TimeTable booTimTabTwi( table=[ 0,1,0; 1.3,1,1; 2.9,0,0; 4,1,0], period=10, timeScale=2) "Time table with boolean output, periodic repetition, and doubled time"; end TimeTableNegativeStartTime;