Integrator Block
Integrates input signal over time using Trapezoidal rule for numerical accuracy
Open Integrator in BlockWerk →Description
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.
Mathematical Model
Continuous: y(t) = y₀ + ∫₀ᵗ u(τ) dτ
Discrete: y[n] = y[n-1] + (Δt/2) × (u[n] + u[n-1]) (Trapezoidal rule)
Parameters
initialCondition
Starting value of the accumulator at t=0.
- Type: number
- Default: 0
- Tooltip: Starting value for the integrator
lowerLimit
Minimum output value (saturation).
- Type: number
- Range: -1e9 to 1e9
- Default: -100000
- Tooltip: Minimum output value (saturation)
upperLimit
Maximum output value (saturation).
- Type: number
- Range: -1e9 to 1e9
- Default: 100000
- Tooltip: Maximum output value (saturation)
reset (optional)
Reset trigger input. Set > 0 to reset output to initial condition.
- Type: number
- Required: false
- Tooltip: Set > 0 to reset output to initial condition
Reset Behavior
The integrator has an optional reset input port:
- When
reset > 0, the output is forced to theinitialConditionvalue - Integration is skipped during the reset step
- After reset,
previous_inputis set to the current input value to prevent a large trapezoidal step on the next integration step - On the first step after reset is released, integration resumes cleanly from the initial condition
- Multiple consecutive resets hold the output at
initialCondition
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
- 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
See Also
- Derivative: Inverse operation (time differentiation)
- PIDController: Uses Integrator for I-term
- Gain: Scale the integrated signal
- Sum: Combine with other signals