ChrisPIGuy

Event Frame Rollup Custom Data Reference

Blog Post created by ChrisPIGuy on Jul 10, 2020

As I alluded in one of my previous blog posts, I decided to reuse my Event Frame Counter custom Data Reference to create a new one that performs roll-ups on Event Frames.

 

This Data Reference will find all of the matching Event Frames for a selected Element based on the Event Frame Template and a time range. I can then pick which Event Frame Attribute Template to use in one of several calculations (see the screenshot below showing several Attributes configured and a sample of the Settings dialog box):

  • Sum - totals the selected Attribute from search results.
  • Average - performs a time-weighted average of the selected Attribute from search results.
  • Mean - performs a event-weighted average of the selected Attribute from search results.
  • Minimum - returns the smallest value of the selected Attribute from search results.
  • Maximum - returns the largest value of the selected Attribute from search results.
  • Range - returns the difference between the Minimum and Maximum values from the search results.

 

 

Like my previous custom Data Reference, this one provides options for defining the Search Mode and overriding the start and end times. By default the start and end times are provided by the client application like PI Vision.

 

Dan Fishman offered a great suggestion to add Event Frame duration roll-ups. I really liked this idea so I included the option to use the Event Frame Duration instead of an Attribute.  The only difference is that the Average and Mean are the same calculation in this scenario.

 

I envision such Data References to be useful for analyzing downtime events in Oil and Gas. For example, one could determine the longest downtime event for a month for a compressor or measure the total amount of gas withdrawn from a cavern storage well for the quarter.

 

Recently, I found an article in a pharmaceutical journal demonstrating how useful this data could be for analyzing batch events and using these statistical results for building multivariate data models and Monte Carlo simulations. If you include Critical Process Parameters (CPPs) and Key Process Parameters (KPPs) in the Event Frame Templates, then this type of Data Reference would be valuable for generating cross-batch statistics.

 

For example, if your CPP for a reactor is temperature, then you could potentially average all of the Unit Procedure or Operation temperatures from each batch in your campaign with such a Data Reference.

 

Does anybody have any ideas to improve this?

 

Improvement ideas aside, if you or your company may have a use for this type of Custom Data Reference, don’t hesitate to reply to this blog requesting that we connect.

 

Update 22-Oct-2020

I am happy to announce that a new version of the Event Frame Rollup Custom Data Reference is complete. This new version incorporates some great ideas provided by PI Square folks, such as the ability to perform Event Frame searches by time range and count and also allows the user to specify the search direction (e.g., FromEndTimeBackwards). These changes allow the user to view statistics from the last one or more Event Frames. For example, the Custom Data Reference and Event Frames can answer questions like:

  • How long was my asset down during the last downtime?
  • What was the average reactor temperature from the last three batches?
  • What was the maximum pressure of my gas well the last time it was shut-in?

 

The configuration dialog box now contains new controls to configure the search parameters, as shown below. I hope this is still very intuitive for PI Administrators.

Screen capture of Data Reference Editor

 

I also made several other minor enhancements such as better tab control and adding “Count” to the functions list.

Outcomes