Buildings.Controls.Discrete
Package with models for discrete time controls
Information
This package contains component models for discrete time controls. For additional models, see also Modelica.Blocks.Discrete.Extends from Modelica.Icons.Package (Icon for standard packages).
Package Content
Name | Description |
---|---|
BooleanDelay | Zero order hold for boolean variable |
Examples | Collection of models that illustrate model use and test models |
Buildings.Controls.Discrete.BooleanDelay
Zero order hold for boolean variable
Information
Block that delays the boolean input signal by one sampling interval. For example, if u denotes the input, y denotes the output, and ti and ti+1 denote subsequent sampling instants, then the model outputs
y(ti+1) = u(ti).
Extends from Modelica.Blocks.Interfaces.BooleanSISO (Single Input Single Output control block with signals of type Boolean), Modelica.Blocks.Interfaces.DiscreteBlock (Base class of discrete control blocks).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | samplePeriod | Sample period of component [s] | |
Time | startTime | 0 | First sample time instant [s] |
Initialization | |||
Boolean | firstTrigger_start | false | Start value for rising edge signals first sample instant |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u | Connector of Boolean input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
block BooleanDelay "Zero order hold for boolean variable"
extends Modelica.Blocks.Interfaces.BooleanSISO;
extends Modelica.Blocks.Interfaces.DiscreteBlock(
firstTrigger(fixed=true,
start=firstTrigger_start));
parameter Boolean firstTrigger_start=false
"Start value for rising edge signals first sample instant";
protected
Boolean ySample;
algorithm
when {sampleTrigger, initial()} then
y := ySample;
ySample := u;
end when;
end BooleanDelay;