BlockWerk Documentation
∫

Integrator

Continuous

The Integrator block computes the time integral (accumulated sum) of an input signal. It is the inverse operation to the Derivative block and is essential for accumulating signals, computing areas, and implementing the I-term in PID controllers.

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

Continuous:y(t)=y0+∫0tu(τ)dτDiscrete:y[n]=y[n−1]+Δt2(u[n]+u[n−1])\begin{aligned} &\text{Continuous:} && y(t) = y_0 + \int_0^t u(\tau) d\tau \\ &\text{Discrete:} && y[n] = y[n-1] + \frac{\Delta t}{2}(u[n] + u[n-1]) \end{aligned}

Inputs & Outputs

Direction ID Label Type Status
→ In in Input number Required
→ In reset Reset number Optional
← Out out Output number Output

Parameters

Parameters Label Type Default Description
initialCondition Initial Condition number 0 Starting value for the integrator
lowerLimit Lower Limit number -1000000000000000 Minimum output value (saturation)
upperLimit Upper Limit number 1000000000000000 Maximum output value (saturation)

Usage Examples

Constant Integration (1 second)

Constant input (value=2) integrated over 1 second produces linearly increasing output (0 to 2).

Velocity from Acceleration

Accelerometer signal (constant 5 m/s²) integrated to produce velocity (0 to 5 m/s over 1 sec).

Remarks & Best Practices

  • Inverse of Derivative: Complementary operation (Integrator + Derivative ≈ identity with delay)
  • Trapezoidal Rule: More accurate than Euler for smooth signals
  • I-term in PID: Essential for eliminating steady-state error
  • Saturation: Prevents integrator windup when output hits limits. Once saturated, the accumulated value is clamped; it can still decrease (or increase) when the input reverses.
  • Initial Condition: Set non-zero to start accumulation from different point

Related Components

  • Derivative: Inverse operation (time differentiation)
  • PIDController: Uses Integrator for I-term
  • Gain: Scale the integrated signal
  • Sum: Combine with other signals