4 Replies Latest reply on Jan 20, 2011 11:28 AM by mikeloria

    weighted averages and Statistics other than time weighted


      We are producing a rolled product (coils) that is measured in feet, (usually 2000 to 4000 feet in length). In PI, I am creating a unitbatch for each coil and calculating the footage in 5 foot increments which I am plan to write these footage values into PI. The 5 foot increments are not equal time intervals since the line can stop, slowdown, speedup while the coil is being produced. There is process data such as temperatures, measured thickness, widths that I want to run statistics on such as avg,max, min, st dev.... I want to use the footage as the weighted component (1 process value for every 5 feet ) to calculate the statistics.


      Is there a way(a function) to do this without having to determine what the process value is for each 5 foot increment which is what I am about to do?


      I would be more than happy to execute this function programically and then store the result in PI. AF would be a wonderful place to have a formula for calculating the footage(which is based on a drive tach counter) and calculating the stats but I do not believe it can do that?


      Also, is there a way in process book to use the footage in the x axis and then show the desired process variable(s) in the y scale?




      This would be some seriously powerful capabilities if possible.




      Thanks in advance for your help in this matter.

        • Re: weighted averages and Statistics other than time weighted



          Let’s start with the PI ProcessBook question – you may use the XY-Trend and use your footage tage for the X axis and for the Y axis your process variables.


          For the other question – I think the way is you have to use your footage tag and run the calculation on this. If you calculate the footage “live” – you may use the totalizer with results written upon expression change. This will eliminate all programming , but probably will reduce maintenance .

            • Re: weighted averages and Statistics other than time weighted



              The problem though that I may run into is that I am adding the footage programically in history since I do not know the start and end of a coil until it has been produced so I need to back calculate.


              This means that the process data I wish to aggregate has already been added to the PI archive and the footage is added after the fact. My understanding is that the totalizer works off of the snapshot?


              In short, I need to perform this calculation on data that has already been written to the archive, after the fact. The start and end time for the calculation is also based on the start and end of each coil when it is in a unit batch.



                • Re: weighted averages and Statistics other than time weighted

                  Event Frames?


                  One master EF for the batch and then a child event frame for each 5 foot increment.  Then have Atrributes using the PI Point data reference to calculate your process data statistics using the containing EF's Start Time and End Time as parameters.  Once you create some "coil" templates the only bit of programming you will need will be the EF generator part.  The snag being the EF product is not in production just yet...

                    • Re: weighted averages and Statistics other than time weighted

                      I do not mind that it is not in production as much that there are none of the major clients available to my customers such as process book, datalink, oledb.....


                      I am waiting on that one.


                      also, I would have never thought of using event frames in such a way. Will event frames handle the load of a coil produced every 4 minutes and each coil having about 400 children (2000 ft / 5 ft)?


                      If there is no other alternative, I guess maybe when I calculate the 5 foot increments I will also get the value for the process variable I need in 5 foot incrfements and write this to PI in a separate PI Point. I can then do statistics based off of events (by value and not time)


                      The disadvantage to this is that it is additional PI Points and gives me a rigid number of process variables to observe in this way. If I wish to add or detract from the process variable list, I will need to make a code change.


                      Any other thoughts or suggestions would be highly appreciated.