AVG – Moving average filter

Block SymbolLicensing group: STANDARD
PIC

Function Description
The AVG block computes a moving average from the last n samples according to the formula

yk = 1 n(uk + uk1 + + ukn+1).

There is a limitation n < N, where N depends on the implementation.

If the last n samples are not yet known, the average is computed from the samples available.

Input

u

Input signal to be filtered

double

Output

y

Filtered output signal

double

Parameter

n

Number of samples to compute the average from   1  10000000 10

long

nmax

Limit for parameter n (used for internal memory allocation)   10  10000000 100

long

2019 © REX Controls s.r.o., www.rexygen.com