Integrator
ContinuousComputes the continuous-time integral (accumulation) of an incoming signal over time. Represents the canonical operator in the Laplace domain and serves as the primary continuous dynamic memory state in physical modeling (integrating acceleration into velocity, velocity into position, volumetric flow into tank storage, and net electrical current into capacitor voltage). Supports synchronous state resetting via a dedicated reset terminal and parameter-based saturation clamping with anti-windup.
Mathematical Model
In continuous time, the integrator evaluates the running definite integral of the input signal:
In discrete numerical simulation using the Trapezoidal (Heun) integration rule over timestep :
When saturation limits are specified, the integrated state is clamped:
Driving the bottom reset port with a positive value () synchronously reloads the initial condition:
In the frequency domain (), the transfer function represents an ideal single-pole accumulator with magnitude slope and phase lag:
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
Example 1: Double-Integrator Kinematic Motion Chain
In mechanical robotics and vehicle dynamics, Newton's second law determines body acceleration . Wiring acceleration into a first Integrator block computes linear velocity . Connecting into a second cascading Integrator computes spatial position , providing authentic physical telemetry for trajectory tracking and obstacle avoidance.
Example 2: Hydrostatic Liquid Storage Tank with Overflow Limit
In chemical process engineering, liquid height in an atmospheric tank evolves according to net mass flow: . Routing net flow through a Gain block () into an Integrator with lowerLimit = 0.0 m (empty tank bottom) and upperLimit = 4.5 m (overflow weir) accurately reproduces fluid filling dynamics, preventing unphysical negative levels or unbounded liquid accumulation.
Remarks & Best Practices
- Continuous State Variable: Represents a fundamental continuous state variable governed by the simulation engine's active ODE solver (RK4, adaptive RK45, or stiff TR-BDF2).
- Synchronous Reset Terminal: Applying a positive pulse () to the bottom
resetterminal resets the state register toinitialConditionwithin the current simulation step. - Built-in Anti-Windup Clamping: When the output reaches
lowerLimitorupperLimit, numerical accumulation halts immediately in that direction, enabling instant recovery when input polarity reverses. - Phase Shift Characteristics: Imparts a constant phase lag across all frequencies, requiring lead compensation or derivative action to maintain adequate phase margins in closed-loop systems.
Frequently Asked Questions (FAQ)
Q: Which ODE integration solver should I select in BlockWerk (Euler vs RK4 vs TR-BDF2)?
For smooth non-stiff systems, explicit Runge-Kutta 4 (RK4) or adaptive Dormand-Prince (RK45) provides high accuracy () at low computational cost. For stiff systems containing very fast transients mixed with slow dynamics (e.g. electrical circuits, hydraulic valves, small time constants), use TR-BDF2 (implicit trapezoidal backward differentiation) to prevent numerical divergence.
Related Components
- Derivative: Inverse mathematical operation ().
- DiscreteIntegrator: Discrete-time accumulator supporting Forward Euler, Backward Euler, and Tustin transforms.
- PIDController: Full three-term controller with integrated I-action and tracking anti-windup.
- StateSpace: Continuous linear multi-state system represented in matrix form ().