Subtraction
MathThe Subtraction block performs algebraic subtraction of two input signals: output = plus - minus. This provides an explicit and intuitive alternative to using the Sum block with a negative Gain factor. Essential for generating error signals in feedback control systems.
Mathematical Model
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in1 |
+ | number | Required |
| → In | in2 |
- | number | Required |
| ← Out | out |
Output | number | Output |
Usage Examples
Reference signal (5) minus measured signal (3) produces error (2).
Remarks & Best Practices
- Two explicit inputs: plus (minuend) and minus (subtrahend)
- Zero computational overhead
- Essential in feedback control: error = setpoint - measured
- More intuitive than Sum block with negative Gain
- Commonly used in PID controller error computation
Related Components
- Sum: Signal addition with configurable inputs
- Gain: Signal scaling (use for negative Gain)
- Saturation: Output limiting for error bounds