Integrator model

Requirements.Examples.Elementary.SignalAnalysis.Integrator  ยท source

Icon of Integrator

Example for Integrator (output is the integral over the input, as long as input active is true)

Extends Modelica.Icons.Example

Using signal analysis block Integrator as

results in

simulation result

The input u of TriggeredIntegrator is a sine of 0.3 Hz around an offset of 2, the Boolean input active is a pulse of period 2 s that starts at 1 s. The output is the integral of the sine while active is true; at every rising edge of active the integrator state is reset to zero, so the output shows the integral over each active phase separately.

Components and variables

NameTypeDescription
sineModelica.Blocks.Sources.SineSine at 0.3 Hz with offset 2: the integrated signal
pulseModelica.Blocks.Sources.BooleanPulseActivation signal: pulse with period 2 s, starting at 1 s
integrator1Requirements.SignalAnalysis.TriggeredIntegratorIntegral of the sine while pulse is true, reset at every rising edge of pulse