TriggeredIntegrator block

Requirements.SignalAnalysis.TriggeredIntegrator  ยท source

Icon of TriggeredIntegrator

Output is the integral over the input, as long as the Boolean input active is true (for a rising edge of active the integrator state is reset to 0)

Syntax

integral_u = TriggeredIntegrator(u=..., active=...).y;

Description

Real output y is the integral over the input u, that is y = integral(u*dt) whenever the Boolean input active = true. Output y is initialized to zero. When active has a rising edge, output y is re-initialized to zero.

Example

This block is demonstrated with the following example:

results in

simulation result

Components and variables

NameTypeDescription
uModelica.Blocks.Interfaces.RealInputInput signal
yModelica.Blocks.Interfaces.RealOutputOutput signal = if active then integral over input
activeModelica.Blocks.Interfaces.BooleanInputBoolean input defining when integral shall be computed)