Rate limiter

signal.rate_limiter

Follows the input with a fast first order lag of time constant T whose rate of change is clamped to rise per second going up and fall per second going down. Choose T well below the time scale of the input.

Ports

NameDomainDirection
usignalin
ysignalout

Parameters

NameUnitDefaultRangeDescription
rise1/s10 to ∞Largest rate going up
fall1/s10 to ∞Largest rate going down
Ts0.0010 to ∞Time constant of the tracking lag

Equations

der(y) = if (u - y) / T > rise then rise else if (u - y) / T < -fall then -fall else (u - y) / T