Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# Mean (Variable Frequency)

Compute mean value of signal

## Library

Control and Measurements/Measurements

## Description

The Mean (Variable Frequency) block computes the mean value of the signal connected to the second input of the block. The mean value is computed over a running average window of one cycle of the frequency of the signal:

This block uses a running average window. Therefore, one cycle of simulation must complete before the block outputs the computed mean value. For the first cycle of simulation, the output is held constant to the specified initial value.

## Dialog Box and Parameters

Initial frequency (Hz)

Specify the frequency of the first cycle of simulation.

Minimum frequency (Hz)

The minimum frequency value determines the buffer size of the Variable Time Delay block used inside the block to compute the mean value.

Initial input (DC component)

Specify the initial value of the input during the first cycle of simulation.

Sample time

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

## Inputs and Outputs

Freq

The frequency of the signal.

In

Connects to the signal to be analyzed.

X

The mean value of the signal.

## Characteristics

 Sample Time Specified in the Sample Time parameterContinuous if Sample Time = 0 Scalar Expansion Yes, of the parameters Dimensionalized Yes

## Example

The power_MeanVariableFrequencypower_MeanVariableFrequency model compares the Mean block to the Mean (Variable Frequency) block for three identical input signals. It shows that, even if the frequency of the input signals varies during the simulation, the Mean (Variable Frequency) block outputs correct values.

The model sample time is parameterized by the Ts variable with a default value of 50e-6 s. Set Ts to 0 in the command window to simulate the model in continuous mode.