Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-04-26 02:20:00

sudhir
Member
Registered: 2016-04-01
Posts: 14

Moving average block

It calculates the time series average of previous N samples. What is the incremental time between samples? Is that the same as the REX master clock tick? Some of the blocks allow their own ticks but the moving average does not specify that. We are interested in calculating one week average, and want to specify N accordingly.

Offline

#2 2016-04-26 08:53:15

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Moving average block

Hello sudhir,

thank you for your question. Sample period is the same as the sample period of the task where the "AVG" function block is placed.
Maximum number of samples (N) is internally set to 10 000 for now. You can set "n" higher then "N" however it will be trimmed to 10 000 samples anyway.

1 week = 10080 minutes

If you want to keep the sampling period as fast as possible and also calculate moving average over one week (exactly one week without 80 minutes because of 10 000 samples limitation) you need to set the task sampling period to 1 minute and set "n" to 10 000 samples.
If you insist on entire one week you can use sampling period for example 90 s and set "n" to 6 720 samples.

In a new version of REX you will be allowed to set the maximum number of samples "N" (of course with some limitations of allocated memory according to actual target platform).

Regards, Tomas

Last edited by tomáš čechura (2016-04-26 10:04:17)

Offline

Board footer

Powered by FluxBB