blockMean
Calculate mean over period 1/f
Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).
Information
This block calculates the mean of the input signal u over the given period 1/f:
1 T - ∫ u(t) dt T 0
Note: The output is updated after each period defined by 1/f.
If parameter yGreaterOrEqualZero in the Advanced tab is true (default = false), then the modeller provides the information that the mean of the input signal is guaranteed to be ≥ 0 for the exact solution. However, due to inaccuracies in the numerical integration scheme, the output might be slightly negative. If this parameter is set to true, then the output is explicitly set to 0.0, if the mean value results in a negative value.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Frequency | f | Base frequency | |
| Real | x0 | 0 | Start value of integrator state |
| Real | y0 | 0 | Start value of output |
| Advanced | |||
| Boolean | yGreaterOrEqualZero | false | = true, if output y is guaranteed to be >= 0 for the exact solution |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal |