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 (F64)

Output

y

Filtered output signal

Double (F64)

Parameter

n

Number of samples to compute the average from   1  10000000 10

Long (I32)

nmax

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

Long (I32)

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