⟋

Rate Limiter

Discontinuous
Run the live example Free · no sign-up · runs in your browser

Restricts the first time derivative (slew rate) of an incoming signal within strict upper and lower gradient bounds. The output follows the input signal directly whenever the rate of change is within allowable bounds, but ramps linearly at the configured limit whenever the input changes too rapidly. Essential for modeling physical actuator speed limits (such as valve stroke speeds, flight control surface actuators, and robotic joint motors) and preventing mechanical shock or electrical inrush current.

Mathematical Model

In continuous time, the instantaneous rate of change of output y(t)y(t) is constrained by:

Rfall≤dy(t)dt≤RriseR_{\text{fall}} \le \frac{dy(t)}{dt} \le R_{\text{rise}}

In discrete numerical simulation with timestep Δt=t−tprev\Delta t = t - t_{\text{prev}}, the rate of change is evaluated from the prospective signal delta:

r[k]=u[k]−y[k−1]Δtr[k] = \frac{u[k] - y[k-1]}{\Delta t}

The clamped slew rate rlim[k]r_{\text{lim}}[k] is then applied to compute the updated output:

y[k]=y[k−1]+Δt⋅{Rrise,if r[k]>RriseRfall,if r[k]<Rfallr[k],if Rfall≤r[k]≤Rrisey[k] = y[k-1] + \Delta t \cdot \begin{cases} R_{\text{rise}}, & \text{if } r[k] > R_{\text{rise}} \\ R_{\text{fall}}, & \text{if } r[k] < R_{\text{fall}} \\ r[k], & \text{if } R_{\text{fall}} \le r[k] \le R_{\text{rise}} \end{cases}

where RriseR_{\text{rise}} is risingRate and RfallR_{\text{fall}} is fallingRate.

Inputs & Outputs

Direction ID Label Type Status
→ In in Input number Required
← Out out Output number Output

Parameters

Parameters Label Type Default Description
risingRate Rising Slew Rate (units/s) number 1
fallingRate Falling Slew Rate (units/s) number -1

Usage Examples

Example 1: Aerospace Flight Control Surface Deflection Limits

In aircraft fly-by-wire flight control systems, hydraulic rudder and aileron servos have fixed displacement velocity ceilings imposed by hydraulic pump flow capacities (e.g. 60°/s). When an aggressive pilot stick input or autopilot maneuver requests a 30° step deflection, inserting a RateLimiter block with risingRate = 60 deg/s and fallingRate = -60 deg/s forces the surface to slew smoothly over 0.5 seconds, modeling true aerodynamic control authority.

Example 2: Inverter Soft-Start and Inrush Current Mitigation

In high-power industrial motor drives and solar battery inverters, applying a step voltage change to a large capacitor bank creates severe charging current spikes (i=C⋅dv/dti = C \cdot dv/dt). Inserting a RateLimiter block with risingRate = 50 V/s in series with the 400V setpoint produces a controlled 8-second linear ramp, maintaining charging currents well below breaker trip thresholds.

Remarks & Best Practices

  • Live Slew Response Preview: The property editor plots a comparative step response illustrating the target step against the slew-rate limited output ramps, reporting calculated rise and fall times.
  • Asymmetric Slew Modeling: By specifying distinct numerical magnitudes for risingRate and fallingRate, engineers can model asymmetric mechanisms, such as spring-return safety valves that slam shut rapidly (Rfall=−200R_{\text{fall}} = -200 mm/s) but open slowly against hydraulic pressure (Rrise=+10R_{\text{rise}} = +10 mm/s).
  • Amplitude vs. Rate Limiting: RateLimiter restricts signal velocity (dy/dtdy/dt), while Saturation restricts signal amplitude (y(t)y(t)). Real-world actuator models typically cascade both blocks to capture full physical constraints.
  • Initial Step Response: On the first simulation timestep, the block initializes to the starting input value, avoiding an unintended slew ramp from zero unless a step input is explicitly applied at t=0t = 0.
  • Timestep Resolution: To ensure accurate linear ramp reproduction, the simulation step size Δt\Delta t should be chosen such that the total transition time contains at least 10–20 solver steps (Δt≤Δu/(10⋅R)\Delta t \le \Delta u / (10 \cdot R)).

Frequently Asked Questions (FAQ)

Q: Why does actuator slew-rate limiting cause integrator windup and limit cycles?

When an actuator hits its physical slew rate limit (∣u˙∣≤R|\dot{u}| \le R), its output lags behind the demanded control signal, introducing a nonlinear phase lag exceeding 90∘90^\circ. If an upstream integrator continues integrating the resulting tracking error, severe overshoot or persistent limit-cycle oscillations occur. Mitigate this by disabling integration during rate saturation or feeding back the difference (udemanded−uactual)(u_{demanded} - u_{actual}) into an anti-windup loop.

Related Components

  • Saturation: Limits absolute upper and lower signal amplitude excursions.
  • Integrator: Computes time integral of rates or accelerations with optional state resets.
  • Smooth: First-order exponential smoothing filter for attenuating high-frequency noise.
  • LeadLag: First-order dynamic phase lead and lag compensator.