> On 11 April 2016 at 13:05, Nicklas Karlsson > <[email protected]> wrote: > > > Is is rather straightforward to calculate from for example the last 100 > > arrival times but a moving average algorithm would be preferred to reduce > > CPU load. Do anybody have any ideas? > > The simplest implementation of a moving-average is probably: > > For a gain fraction from 0 to 0.5 where 0.1 gives a 10-sample average: > > new = old * (1 - gain) + new * gain > > It works better if pre-loaded with the first sample and it is not any > sort of ideal filter as historical values are never actually lost, > just diluted. A true rolling average needs to store N-samples in a > buffer then subtract oldest/N and add newest/N.
Diluted old values may better or worse. Problem is I can't get a grip on howto calculate moving average arrival time within the period. Until this is solved I calculate number of periods and where phase is located within period in average for all values each time. It will work to calculate by using each value every time even though it use a ridiculous amount of clock cycles. Nicklas Karlsson ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
