Min/Max
MathEvaluates and outputs the minimum or maximum scalar value across all connected input signals. Supports multiple simultaneous input connections on a single port, making it indispensable for auctioneering override control, multi-sensor safety limits, peak envelope detection, dynamic constraint handling, and selective arbitration between conflicting control commands.
Mathematical Model
For an arbitrary set of active input signals , the output is determined by the configured operation mode:
In the boundary case where only a single signal is wired to the port (), the block operates as a transparent unity passthrough:
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
Input | number | Required |
| ← Out | out |
Output | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
operation |
Operation | select | min |
Usage Examples
Example 1: Auctioneering Low-Select Override Protection
In turbomachinery and boiler control, both a speed governor and an over-temperature limiter calculate permissible fuel actuator positions. Connecting both controller outputs to a MinMax block configured with operation = "min" forms an auctioneering low-select circuit. Under normal operation, the speed governor dictates fuel flow; if cylinder temperatures exceed safe limits, the temperature limiter output drops lower and seamlessly overrides control to prevent thermal damage.
Example 2: Peak Envelope Follower with Leaky Discharge
In acoustic vibration telemetry and power grid ripple monitoring, tracking instantaneous amplitude envelopes requires latching signal peaks. Passing a full-wave rectified sensor signal and a slowly decaying leaky integrator state into a MinMax block set to operation = "max" ensures that rapid positive spikes immediately update the output, while the trailing edge decays smoothly at the integrator's rate.
Remarks & Best Practices
- Multi-Wire Input Binding: The input terminal supports multiple incoming connections simultaneously (
multiple: true), eliminating the need to cascade separate two-input blocks for large signal sets. - Auctioneering Control Architecture: Extensively used in industrial safety instrumentation (API 670, IEC 61511) to implement low-select and high-select auctioneering between redundant sensors or competing controllers.
- High-Performance Rust Execution: Implemented in the WASM engine as a single-pass linear comparison with time complexity and zero memory allocations during simulation ticks.
- Dynamic Clamping Synergy: Cascading a
MinMax(max with lower threshold) and aMinMax(min with upper threshold) allows creating dynamic, signal-dependent saturation boundaries driven by external signals.
Related Components
- Saturation: Clips a signal between fixed parameter bounds.
- Switch: Multiplexes between candidate signals using a threshold or logic condition.
- Relay: Produces discontinuous two-state output with configurable hysteresis.
- DeadZone: Suppresses signals within an insensitivity interval around zero.