blockLimitSlewRate
Limit the increase or decrease rate of input
Information
The block limits the rate of change of the input by a ramp.
This block computes a threshold for the rate of change of the output y as
thr = (u-y)/Td, where Td > 0 is parameter.
The output y is computed as follows:
-
If
thr < fallingSlewRate, thendy/dt = fallingSlewRate, -
if
thr > raisingSlewRate, thendy/dt = raisingSlewRate, -
otherwise,
dy/dt = thr.
Implementation
For the block to work with arbitrary inputs and in order to produce a differentiable output,
the input is numerically differentiated with derivative time constant Td.
Smaller time constant Td means nearer ideal derivative.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | raisingSlewRate | Speed with which to increase the output | |
| Real | fallingSlewRate | -raisingSlewRate | Speed with which to decrease the output |
| Real | Td | raisingSlewRate*10 | Derivative time constant |
| Boolean | enable | true | Set to false to disable rate limiter |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u | Input signal to be rate of change limited | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y | Rate of change limited output signal |
Revisions
-
January 27, 2022, by Jianjun Hu:
Renamed the block name from SlewRateLimiter to LimitSlewRate.
This is for Buildings, issue 2865. -
November 12, 2020, by Michael Wetter:
Reformulated to remove dependency toModelica.Units.SI.
This is for Buildings, issue 2243. -
April 21, 2020, by Michael Wetter:
Removed final attribute on unit because if the input quantity is power, then the rate limit is units of power per units of time. -
March 2, 2020, by Michael Wetter:
Changed icon to display dynamically the output value. -
March 29, 2017, by Jianjun Hu:
First implementation, based on the implementation of the Modelica Standard Library.