Moving Average
Moving average-value computation
Libraries:
Simscape /
Electrical /
Control /
General Control
Description
The Moving Average block computes the moving average value of the input signal. Use this block to filter higher frequency signal components and to smooth noisy signals.
Equations
The moving average is computed based on a moving time window. The moving average for continuous-time is calculated as
where:
u(t) is the input signal,
f is the fundamental frequency of the signal.
The moving average for discrete-time is calculated as:
Note
If you use this block for continuous-time operations and set the
Sample time (-1 for inherited) parameter to
0
, you should also specify the value of the
Buffer size parameter to ensure it covers the
moving time window.
Assumptions
The output is initialized with the initial condition in the time interval
[0, T0]
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2018b