Saturation
DiscontinuousClamps the input signal within specified lower and upper boundaries. While the input signal remains inside the linear band , the output passes through unchanged (). When the input exceeds the upper limit, the output is clamped to upperLimit; when the input drops below the lower limit, the output is clamped to lowerLimit. Essential for modeling real-world actuator saturation, power supply voltage rails, physical stroke limits on valves, and preventing integrator windup in feedback controllers.
Video tutorial
Mathematical Model
The continuous piecewise saturation characteristic is defined as:
where denotes lowerLimit and denotes upperLimit (with ).
This can equivalently be expressed using nested min-max operators:
The function is strictly continuous () across both transition boundaries:
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
Input | number | Required |
| ← Out | out |
Output | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
lowerLimit |
Lower Limit | number | -1 |
Minimum allowed value |
upperLimit |
Upper Limit | number | 1 |
Maximum allowed value |
Usage Examples
Example 1: H-Bridge Motor Voltage Rail Saturation
In closed-loop DC servomotor control, high controller gains during rapid setpoint steps may demand theoretical control outputs exceeding physical electrical limits (e.g. demanding 75V from a 24V DC bus). Placing a Saturation block with lowerLimit = -24.0 and upperLimit = 24.0 directly upstream of the motor electrical model accurately enforces power supply rails, preventing fictitious acceleration in simulation.
Example 2: Industrial Valve Stroke Clamping (0% to 100%)
In chemical reactor fluid flow control, pneumatic valves cannot be less than 0% open (fully seated) or greater than 100% open (maximum bore). Configuring a Saturation block with asymmetric limits lowerLimit = 0.0 and upperLimit = 1.0 ensures the control command reflects true valve authority, preventing downstream piping flow models from receiving negative or oversized flow requests.
Remarks & Best Practices
- Live Transfer Characteristic Preview: The property editor renders a live plot of the static piecewise transfer curve , highlighting the linear passband and clamping plateaus as limits are adjusted.
- Piecewise Continuity: The output signal is continuous () at the boundary points, minimizing numerical chatter in adaptive variable-step solvers such as RK45 or TR-BDF2.
- Asymmetric Limit Support:
lowerLimitandupperLimitcan be set independently to model asymmetric physical limits, such as unidirectional hydraulic rams or single-supply operational amplifiers. - Anti-Windup Protection: Cascading a Saturation block with a controller enables calculation of the saturation error (), which can be fed back to halt or discharge integrator states before overshoot occurs.
- Zero Computational Overhead: Evaluated via single-cycle branchless floating-point comparison operations in the Rust WASM engine.
Frequently Asked Questions (FAQ)
Q: How does actuator saturation trigger limit cycles in closed-loop systems?
Under describing function analysis, saturation acts as an amplitude-dependent gain reduction with zero phase shift for sinusoidal inputs. If the linear open-loop Nyquist trajectory intersects along the negative real axis, the feedback loop settles into a sustained, stable nonlinear oscillation known as a limit cycle.
Related Components
- DeadZone: Suppresses signals within an insensitivity interval around zero while remaining linear outside.
- RateLimiter: Restricts the maximum time derivative (slew rate) rather than signal amplitude.
- Relay: Produces discontinuous two-state switching outputs with hysteresis.
- MinMax: Computes dynamic upper or lower envelopes from multiple time-varying signals.