Moving Average (Variable Frequency)
Libraries:
Simscape /
Electrical /
Control /
General Control
Description
The Moving Average (Variable Frequency) block computes the moving average value of an input signal of variable frequency. 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 and Limitations
The output is initialized with an initial condition in the time interval
[0, T0]
.If you use this block for discrete-time operations and set the Sample time (-1 for inherited) parameter to
-1
, the maximum variable integer delay is set to 4096 samples. To compute the maximum variable integer delay as a function of minimum frequency and sample time, set the Sample time (-1 for inherited) parameter to a positive value.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2020a