blockSignalExtrema
Calculate min and max of a signal
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Information
This block calculates the min and the max of the input signal u
and stores the time at which the last min or max was reached in the
variables t_min and t_max respectively.
Note:
The output is updated after each sample period defined by Ts.
This means that:
- The extrema will be approximate as it only return the extremas at the sampling points.
- The sampling will generate many events which may slow down the simulation.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Time | Ts | Sample time |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | u | Connector of Real input signal | |
| Modelica.Blocks.Interfaces.RealOutput | y_min | Min of input signal | |
| Modelica.Blocks.Interfaces.RealOutput | y_max | Max of input signal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | t_min | Sample time of last found minimum | |
| Real | t_max | Sample time of last found maximum |
Revisions
| Version | Date | Author | Comment |
|---|---|---|---|
| 1.0.0 | 2021-02-25 | dietmarw, tinrabuzin | Initial version |