composer 30 day rolling average
Answers
Hi,
The MOVAVG block will average up to 255 samples, so for example, for a 30 day moving average you could configure 240 x 8 hour (28800 second) samples. For a better resolution you can cascade the MOVAVG blocks. A MOVAVG block with 240 x 2 minute (120 second) samples will give you an 8 hour moving average using 2 minute samples. Feed this into a MOVAVG of 240 x 8 hour samples and you have a 30 day moving average calculated from 2 minute sample data. Consider storing the data to restore blocks or possibly recipe blocks to avoid losing your your moving average in the event of controller failure / offline download. The restore block will load the moving average data set on power failure but will not tolerate an offline download. The recipe block will tolerate an offline download but will only capture the output of the MOVAVG block rather than the entire moving average data set. If the data is really important consider duplicating the MOVAVG logic in multiple nodes and then selecting the data from the node with the longest uptime or doing the calculation in a historian and writing back to the DCS.
Cheers,
Alan
Add new comment