Sum
MathThe Sum block adds multiple input signals together, producing their algebraic sum as output. This is one of the most fundamental mathematical operations in control systems and signal processing. The block accepts any number of input connections and sums all received values into a single output signal.
The Sum block is essential for combining multiple signals in your simulation. Common applications include creating summation points in control systems (combining reference and feedback signals), adding bias or offset values to main signals, calculating aggregate values from multiple sensors, and building complex mathematical expressions from basic operations.
Mathematical Model
The Sum block implements the summation operation:
Where:
y(t)is the output signal at time tu₁(t), u₂(t), ..., uₙ(t)are the input signals at time tnis the number of connected inputs
When no inputs are connected, the output is 0.0.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
+ | number | Required |
| ← Out | out |
Sum | number | Output |
Usage Examples
Basic Signal Summation
Combine two signals into a single output:
Signal A → Sum → Output
Signal B → Sum
Output = Signal A + Signal B
Bias Addition
Add a bias value to a main signal:
Main Signal → Sum → Output
Bias Value → SumRemarks & Best Practices
- Multiple Inputs: Accepts any number of input connections via a single input port.
- Order Independence: Input order doesn't affect the result (commutative operation).
- Execution Speed: Highly optimized WASM implementation for real-time summing of dozens of signals.
- Floating Point: Uses 64-bit precision for high-resolution mathematical operations.
Related Components
- Gain: Multiply a signal by a constant factor before summing
- Constant: Provide fixed values for summation
- NumericDisplay: View the sum result in real-time