blockVariablePulse

Generate boolean pulse with the width specified by input

Information

Block that outputs a boolean pulse.

The output of this block is a pulse with a constant period and a width as obtained from the input 0 ≤ u ≤ 1, which is the width relative to the period.

The block produces the following ouputs:

  • If u = 0, the output y remains false.
  • If 0 < u < 1, the output y will be a boolean pulse with the period specified by the parameter period and the width set to u*period.
  • If u = 1, the output y remains true.

When the input u changes by more than deltaU and the output has been holding constant for more than minimum holding time minTruFalHol, the output will change to a new pulse with width equal to u*period.

VariablePulse.png

Parameters

TypeNameDefaultDescription
RealperiodTime for one pulse period
RealdeltaU0.01Increment of u that triggers recomputation of output
RealminTruFalHol0.01*periodMinimum time to hold true or false

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputuRatio of the period that the output should be true
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputyBoolean pulse when the input is greater than zero

Contents

NameDescription
CycleprotectedGenerate boolean pulse with the width specified by the input

Revisions

  • August 11, 2022, by Jianjun Hu:
    First implementation.