SMA
Discrete Simple Moving Average Filter
Library
GDFLIB
Description
Computes an average from N old samples according to the following equation:
The Block also computes and shows a cutoff frequency (attenuation -3dB) and phase for the cutoff frequency.
Parameters and dialog box
The SMA block dialog box appears as follows:
Number of samples. specifies how many old samples are used to calculate the average and sampling period Ts specifies how often is the calculation done. Cutoff frequency is calculated according to . The calculation accuracy increases with number of samples. Sufficient accuracy is achieved for more than 10 samples. For the Phase calculation a filter is designed first and then a frequency response at cutoff freq. is calculated.
Inputs and outputs
Inputs:
in - input signal
Outputs:
out - output filtered signal
See also
IIR, FIR, Low-pass,