Mean

Calculate mean over period 1/f

    Mean

Library

Modelica/Blocks/Math

Description

This block calculates the mean of the input signal u over the given period 1/f:

1 T- ∫ u(t) dtT 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 guaranteedto 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 isexplicitly set to 0.0, if the mean value results in a negative value.

Parameters

Mean_0

NameLabelDescriptionData TypeValid Values

mo_f

f

Base frequency

Scalar

mo_x0

x0

Start value of integrator state

Scalar

mo_t0

t0

Start time of simulation

Scalar

Mean_1

NameLabelDescriptionData TypeValid Values

mo_yGreaterOrEqualZero

yGreaterOrEqualZero

=true, if output y is guaranteed to be >= 0 for the exact solution

Scalar

true
false

Mean_2

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

'x'

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Real input signal

input

1

y

implicit

Connector of Real output signal

output

1