
Re: PIAF analyses  Compute average of moving range
rborges Apr 4, 2018 3:17 PM (in response to simon76)Hi Simon,
If I got it right you have,
UCL = (x + 3 * MR)/1.28
LCL = (x  3 * MR)/1.28
MR = value _{i} – value _{i1}
So your main problem is how to get the delta between the current value and the previous one, right? If that's the case, there is a function called DeltaValue that does exactly what you are looking for:
Returns the difference between the current value and the immediately previous value of an attribute with a numeric or DateTime value type
I hope it helps!

Re: PIAF analyses  Compute average of moving range
simon76 Apr 5, 2018 10:02 AM (in response to simon76)Hi Rafael,
Thanks for your response. Indeed, the function DeltaValue can work but in my case what I would like is the average of the MR (in yellow in the table below). I give you another example more simplified with random values:
Value is my measure and his average is 2,75 (easy to compute with the function 'TagAvg()').
But, to compute the average of MR (2,3333), first, I need to calculate the difference between the current value and the previous value (32=1 ; 13=2 ; 51=4). For example, DeltaValue will compute 1 (32) but where could I store this result? I can't create one attribute for one MR because in this example there are 3 values but in my real case, there are about 100 values.
Moreover, "value" is already an average of all values between each date (interval 4 hours), defined like the screen below:
I hope that I have been understandable and thank you again for your help, I really appreciate!
Simon

Re: PIAF analyses  Compute average of moving range
sraposo Apr 5, 2018 1:43 PM (in response to simon76)1 of 1 people found this helpfulHi Simon,
Why not configure two analyses? One analysis will calculate the difference between two values and the second will compute the average of the differences. The first analysis could output to an attribute with an analysis data reference if you don't want to use two PI Points, though keep in mind this will be more resource intensive as the analysis service will need to calculate the differences on each computation of the average.
Hope this helps,
Seb


Re: PIAF analyses  Compute average of moving range
simon76 Apr 5, 2018 4:14 PM (in response to simon76)Hi Sebastien,
Could you explain more in detail, please?
I have tried this:
Analyse 1:
The dates limits of analyses are 20/07/2017 00:00:00 to 25/07/2017 00:00:00.
The calculations of MR1 is every 4 hours between this 2 dates.
Currently, in my attribute "MR1" (output of analyse), there is the value 0,071. And, if I change the date (next interval +4 hours), the output will have another value but how the analyse 2 can compute the average of all the values of attribute "MR1"? (0,071 will be deleted and the next value of MR1 will be stored).
Thanks,
Simon.

Re: PIAF analyses  Compute average of moving range
sraposo Apr 6, 2018 2:07 PM (in response to simon76)Hi Simon,
I'm not sure I understand the need of a start date. What's the purpose?
Is the data in 'Vibration_signature' updating every 4 hours? If so, why not configure the analysis as:
Difference 'Vibration_signature'  PrevVal('Vibration_signature','*')
Configure the analysis as Event Triggered
If the data for Vibration_signature does not have a constant 4h frequency, then:
Difference 'Vibration_signature'  TagVal('Vibration_signature','*4h')
You can then configure another analysis to use the TagAvg() function.
Hope this helps!
Thanks,
Seb


Re: PIAF analyses  Compute average of moving range
simon76 Apr 9, 2018 10:13 AM (in response to simon76)Hi Sebastien,
The need of a start date is UCL, LCL is computed only during a specific period. This is a reference period determined when an equipment is overhauled (this reference period is different according to each equipment). In the case above, the reference period to make the calculation of UCL, LCL is "20/07/2017 00:00:00" to "25/07/2017 00:00:00" with an interval of 4 hours (configurable, and the data vibration are updating in real time).
So, what do you think about event frames in this case?
The final objective of the tool is to have a dashboard visualizing the health state of rotating machines. That's why there are vibration sensors installed on each equipment.
Thanks,
Simon