Buildings.Controls.OBC.CDL.Logical.Sources

Package with blocks that generate source signals

Information

Package with blocks that generate signals.

Package Content

Name Description
Buildings.Controls.OBC.CDL.Logical.Sources.Constant Constant Output constant signal of type Boolean
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse Pulse Generate pulse signal of type Boolean
Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger SampleTrigger Generate sample trigger signal
Buildings.Controls.OBC.CDL.Logical.Sources.Validation Validation Collection of models that validate the logical sources blocks of the CDL

Buildings.Controls.OBC.CDL.Logical.Sources.Constant Buildings.Controls.OBC.CDL.Logical.Sources.Constant

Output constant signal of type Boolean

Buildings.Controls.OBC.CDL.Logical.Sources.Constant

Information

Block that outputs a constant signal y = k, where k is a Boolean-valued parameter.

Constant.png

Parameters

TypeNameDefaultDescription
Booleank Constant output value

Connectors

TypeNameDescription
output BooleanOutputyConnector of Boolean output signal

Modelica definition

block Constant "Output constant signal of type Boolean" parameter Boolean k "Constant output value"; Interfaces.BooleanOutput y "Connector of Boolean output signal"; equation y = k; end Constant;

Buildings.Controls.OBC.CDL.Logical.Sources.Pulse Buildings.Controls.OBC.CDL.Logical.Sources.Pulse

Generate pulse signal of type Boolean

Buildings.Controls.OBC.CDL.Logical.Sources.Pulse

Information

The Boolean output y is a pulse signal:

BooleanPulse.png

Parameters

TypeNameDefaultDescription
Realwidth0.5Width of pulse in fraction of period [1]
Timeperiodperiod( final min=Constant...Time for one period [s]
TimestartTime0Time instant of first pulse [s]

Connectors

TypeNameDescription
output BooleanOutputyConnector of Boolean output signal

Modelica definition

block Pulse "Generate pulse signal of type Boolean" parameter Real width( final min=Constants.small, final max=1, final unit = "1") = 0.5 "Width of pulse in fraction of period"; parameter Modelica.SIunits.Time period( final min=Constants.small) "Time for one period"; parameter Modelica.SIunits.Time startTime=0 "Time instant of first pulse"; Interfaces.BooleanOutput y "Connector of Boolean output signal"; protected parameter Modelica.SIunits.Time Twidth=period*width "Width of one pulse"; discrete Modelica.SIunits.Time pulseStart "Start time of pulse"; initial equation pulseStart = startTime; equation when sample(startTime, period) then pulseStart = time; end when; y = time >= pulseStart and time < pulseStart + Twidth; end Pulse;

Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger

Generate sample trigger signal

Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger

Information

The Boolean output y is a trigger signal where the output y is only true at sample times (defined by parameter period) and is otherwise false.

SampleTrigger.png

Parameters

TypeNameDefaultDescription
Timeperiodperiod( final min=Constant...Sample period [s]
TimestartTime0Time instant of first sample trigger [s]

Connectors

TypeNameDescription
output BooleanOutputyConnector of Boolean output signal

Modelica definition

block SampleTrigger "Generate sample trigger signal" parameter Modelica.SIunits.Time period( final min=Constants.small) "Sample period"; parameter Modelica.SIunits.Time startTime=0 "Time instant of first sample trigger"; Interfaces.BooleanOutput y "Connector of Boolean output signal"; equation y = sample(startTime, period); end SampleTrigger;