.Modelica_Synchronous.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 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos