Compute mean value of signal
Simscape / Electrical / Specialized Power Systems / Sensors and Measurements
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:
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.
|Sample Time|| Specified in the Sample Time
Continuous if Sample Time = 0
|Scalar Expansion||Yes, of the parameters|
Port_1— Input signal
The input signal for which the block computes the mean value, specified as a Simulink signal.
X— Mean value of input signal
The mean value of the input signal, returned as a Simulink signal.
Fundamental frequency (Hz)— Fundamental frequency
60(default) | positive scalar
Specify the fundamental frequency, in hertz. This value determines the period (1/F) of the running average window.
Initial input (DC component)— Input value for first simulation cycle
0(default) | scalar
Specify the input value for the first cycle of simulation.
Sample time— Sample time of block
0(default) | nonnegative scalar
Specify the sample time of the block, in seconds. Set to
0 to implement a continuous block.
uses the Mean block to determine the mean value of a DC signal containing
a 12th harmonic ripple.
The model sample time is parameterized by the Ts variable set to a default value of
50e-6 s. Set Ts to
0 in the command window to
simulate the model in continuous mode.