.Modelica.Clocked.RealSignals.Periodic.MovingAverage

Information

This block computes the output y as the average of the input u and of its past values (= moving average filter):

y(i) = ( u(i) + u(i-1) + u(i-2) + … ) / n

where y(i) and u(i) are the values of y and u at clock tick i, and n are the number of u and past u values that are taken into account.

This block could also be implemented with block FIRbyCoefficients by using the coefficients a = fill(1/n, n). However, block MovingAverage is a more efficient implementation since it can be implemented recursively, contrary to a general FIR filter.


Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f