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 block computes the moving average based on a moving time window. The moving average for continuous-time is equal to
where:
u(t) is the input signal.
T0 is equal to .
f is the fundamental frequency of the signal.
t0 is the initial time for integration in a time window.
The moving average for discrete-time is equal to:
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 block initializes the output with the initial condition in the time interval
[0, T0]
.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2018b