Integrator

Purpose

Integrate input signal with respect to time

Library

Control / Continuous

Description

../../_images/integrator.svg

The Integrator block outputs the integral of its input signal at the current time step. The integrator state may saturate at an upper and lower limit, or it can be wrapped between two limits. It can be reset to its initial value by an external trigger signal. The initial value may be provided either via a parameter or via an input signal.

Interaction with the Solver

Simulation with the Continuous State-Space Method

When simulated with the continuous method, the input signal is simply passed on to the solver for integration.

Simulation with the Discrete State-Space Method

When simulated with the discrete method, the input signal is integrated within PLECS using the Forward Euler method.

Parameters

External reset

The behavior of the external reset input. The values rising, falling and either cause a reset of the integrator on the rising, falling or both edges of the reset signal. A rising edge is detected when the signal changes from \(0\) to a positive value, a falling edge is detected when the signal changes from a positive value to \(0\). If the value level is chosen, the output signal keeps the initial value while the reset input is not \(0\).

Initial condition source

Specifies whether the initial condition is provided via the Initial condition parameter (internal) or via an input signal (external).

Initial condition

The initial condition of the integrator. The value may be a scalar or a vector corresponding to the implicit width of the component. This parameter is shown only if the Initial condition source parameter is set to internal.

Show state port

Specifies whether to show an additional state output port. The state port is updated at a slightly different point in the block execution order (i.e. before the reset and initial condition inputs are evaluated) and may therefore be used to calculate an input signal for the external reset input or the initial condition input.

Enable wrapping

When set to on, the integrator state is wrapped between the Upper wrapping limit and Lower wrapping limit parameters. The default is off. Note that wrapping is mutually exclusive with saturation.

Upper saturation limit

An upper limit for the integrator state. If the value is inf, the state is unlimited. This parameter is visible only if Enable wrapping is set to off.

Lower saturation limit

A lower limit for the integrator state. If the value is -inf, the state is unlimited. This parameter is visible only if Enable wrapping is set to off.

Upper wrapping limit

The upper wrapping limit for the integrator state. When the state exceeds the upper limit, it is wrapped to the lower limit. This parameter is visible only if Enable wrapping is set to on.

Lower wrapping limit

The lower wrapping limit for the integrator state. When the state exceeds the lower limit, it is wrapped to the upper limit. This parameter is visible only if Enable wrapping is set to on.

Probe Signals

State

The internal state of the integrator.

Note

Both the external reset input and the initial condition input have direct feedthrough on the output signal. Therefore, feeding back the output signal to create the reset signal or an initial value will create an algebraic loop. This can be avoided by using the state port instead.