Discrete

DiscreteIntegrator Block

Discrete-time integrator (accumulator). Supports forward Euler, backward Euler, and trapezoidal methods.

Open DiscreteIntegrator in BlockWerk →

# DiscreteIntegrator Block

Description

Discrete-time integrator that accumulates the input signal over time. Equivalent to a running sum scaled by the sample time.

Mathematical Model

Forward Euler:  y[n] = y[n-1] + T · u[n-1]
Backward Euler: y[n] = y[n-1] + T · u[n]
Trapezoidal:    y[n] = y[n-1] + T · (u[n] + u[n-1]) / 2

where y[n] is the current output, u[n] the current input, and T the sample time.

Parameters

method

Integration method:

initialCondition

Starting value of the accumulator.

sampleTime

Discrete sample period (seconds).

Remarks

See Also