Main Content

Mean

(To be removed) Compute mean value of signal

The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.

  • Mean block

Libraries:
Simscape / Electrical / Specialized Power Systems / Sensors and Measurements

Description

The Mean block computes the mean value of the input signal. The mean value is computed over a running average window of one cycle of the specified fundamental frequency:

Mean(f(t))=1T(tT)tf(t)dtf(t):input signal, T = 1/fundamental frequency

As this block uses a running average window, one cycle of simulation must complete before the output gives the correct value. For the first cycle of simulation, the output is held constant to the specified initial input value.

Characteristics

Sample Time Specified in the Sample Time parameter
Continuous if Sample Time = 0
Scalar ExpansionYes, of the parameters
DimensionalizedYes

Ports

Input

expand all

The input signal for which the block computes the mean value, specified as a Simulink signal.

Output

expand all

The mean value of the input signal, returned as a Simulink signal.

Parameters

expand all

Specify the fundamental frequency, in hertz. This value determines the period (1/F) of the running average window.

Specify the input value for the first cycle of simulation.

Specify the sample time of the block, in seconds. Set to 0 to implement a continuous block.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a