Introduction to Simulink with Engineering Applicatioins, Second Edition

This appendix describes the Weighted Moving Average block which is no longer used in the latest revision of Simulink. It has been replaced by the Digital FIR filter block described in the Discrete Blocks Library, Chapter 5. It is presented here as an introduction to the concept of moving average, and for the benefit of those readers who are working with previous versions of the Simulink package.

The Weighted Moving Average block samples and holds the N most recent inputs, multiplies each input by a specified value (given by the Weights parameter), and stacks them in a vector. This block supports both single-input / single-output (SISO) and single-input / multi-output (SIMO) modes. For a detailed discussion please refer to the Help menu for this block.
The following discussion will help us understand the meaning of a weighted moving average.
Suppose that the voltages displayed by an electronic instrument in a 5-day period, Monday through Friday, were 23.5, 24.2, 24.0, 23.9 and 24.1 volts respectively. The average of those five readings is
Now, suppose that on the following Monday the reading was found to be 24.2 volts. Then, the new 5-day average based on the last five days, Tuesday through Monday is
We observe that the 5-day average has changed from 23.94 to 24.08 volts. In other words, the average has "moved" from 23.94 to 24.08 volts. Hence, the name moving average.
However, a more meaningful moving average can be obtained...