Mean

Calculate mean over period 1/f

    Mean

Library

Blocks/Math

Description

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

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_u

u

u

Structure

mo_u/fixed

fixed

Cell of scalars

true
false

mo_u/start

start

Cell of scalars

mo_y

y

y

Structure

mo_y/fixed

fixed

Cell of scalars

true
false

mo_y/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Real input signal

input

1

y

implicit

Connector of Real output signal

output

1