Buildings.Controls.OBC.CDL.Discrete
Package with discrete blocks
Information
This package contains discrete control blocks with fixed sample period. Every component of this package is structured in the following way:
- A component has continuous Real input and output signals.
- The input signals are sampled by the given sample period
defined via parameter
samplePeriod
. The first sample instant is defined by the parameterstartTime
. - The output signals are computed from the sampled input signals.
Package Content
Name | Description |
---|---|
FirstOrderHold | First order hold of a sampled-data system |
Sampler | Ideal sampler of a continuous signal |
TriggeredMax | Output the maximum, absolute value of a continuous signal at trigger instants |
TriggeredMovingMean | Triggered discrete moving mean of an input signal |
TriggeredSampler | Triggered sampling of continuous signals |
UnitDelay | Output the input signal with a unit delay |
ZeroOrderHold | Output the input signal with a zero order hold |
Examples | Collection of models that illustrate model use and test models |
Buildings.Controls.OBC.CDL.Discrete.FirstOrderHold
First order hold of a sampled-data system
Information
Block that outputs the extrapolation through the values of the last two sampled input signals.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | samplePeriod | Sample period of component [s] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Continuous input signal |
output RealOutput | y | Continuous output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.Sampler
Ideal sampler of a continuous signal
Information
Block that outputs the input signal, sampled at a sampling rate defined
via parameter samplePeriod
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | samplePeriod | Sample period of component [s] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Continuous input signal |
output RealOutput | y | Continuous output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.TriggeredMax
Output the maximum, absolute value of a continuous signal at trigger instants
Information
Block that outputs the input signal whenever the trigger input
signal is rising (i.e., trigger changes to
true
). The maximum, absolute value of the input signal
at the sampling point is provided as the output signal.
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector with a Real input signal |
input BooleanInput | trigger | Connector for trigger |
output RealOutput | y | Connector with a Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.TriggeredMovingMean
Triggered discrete moving mean of an input signal
Information
Block that outputs the triggered moving mean value of an input signal.
At the start of the simulation, and whenever the trigger signal is rising
(i.e., the trigger changes to true
), the block samples
the input, computes the moving mean value over the past n
samples,
and produces this value at its output y
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | n | Number of samples over which the input is averaged |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Continuous input signal |
input BooleanInput | trigger | Boolean signal that triggers the block |
output RealOutput | y | Discrete averaged signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler
Triggered sampling of continuous signals
Information
Samples the continuous input signal whenever the trigger input
signal is rising (i.e., trigger changes from false
to
true
) and provides the sampled input signal as output.
Before the first sampling, the output signal is equal to
the initial value defined via parameter y_start
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | y_start | 0 | Initial value of output signal |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector with a Real input signal |
input BooleanInput | trigger | Signal that triggers the sampler |
output RealOutput | y | Connector with a Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.UnitDelay
Output the input signal with a unit delay
Information
Block that outputs the input signal with a unit delay:
1 y = --- * u z
that is, the output signal y
is the
input signal u
of the
previous sample instant. Before the second sample instant,
the output y
is identical to parameter y_start
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | samplePeriod | Sample period of component [s] | |
Real | y_start | 0 | Initial value of output signal |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Continuous input signal |
output RealOutput | y | Continuous output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Discrete.ZeroOrderHold
Output the input signal with a zero order hold
Information
Block that outputs the sampled input signal at sample time instants. The output signal is held at the value of the last sample instant during the sample points. At initial time, the block feeds the input directly to the output.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | samplePeriod | Sample period of component [s] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Continuous input signal |
output RealOutput | y | Continuous output signal |