PI Asset Framework

This article discusses the components and features of OSIsoft’s PI Asset Framework (AF) 2010 software system, and outlines various value-adding scenarios leveraging the capabilities of AF. What is AF? PI AF is a repository for asset-centric models and hierarchies. It is capable of integrating and retrieving data from a multitude of data sources such as PI servers and relational databases in an extensible manner. Data in the hierarchy is organized in the form of elements and attributes, and these hierarchies are searchable from PI client tools such as PI ProcessBook and PI Coresight. AF can also expose its hierarchy to non-PI systems through OLEDB connections or its software API, known as the AFSDK. A number of search capabilities are present, allowing users to search for elements and attributes by name, template, category, or a combination of these criteria. AF can also be integrated with other products such as PI Notifications to provide a real-time monitoring/alerting solution. Why is AF important? AF as a software product has been around for several years, but starting with version 2010 OSIsoft has made this a mandatory installation component for the PI system. The product is heavily integrated with the PI system and is linked in real time thanks to the AF link subsystem within PI. Through user conferences and training sessions OSIsoft has been pushing the user community to adopt AF as future versions of PI will be heavily reliant on AF for data access, and AF will eventually replace the PI Module Database. Here are the top 5 value-adding capabilities of AF:
  1. Easier and logical access to information – using the AF hierarchy, anyone with a basic understanding of operations can quickly find attributes receiving data PI tags. Users are no longer required to memorize cryptic tag naming conventions
  2. Better definition of organizational assets – in order to setup a proper hierarchy, the business will have to go through a mandatory exercise to organize assets and determine what information should be captured about them
  3. Easier management of change – AF supports templates. Once an asset type has been defined, it can be converted to a template. For example, a well element will contain a defined set of attributes. New wells at different sites will follow the standardized structure and attributes. Through its tight integration with PI, users can also auto-create tags for attributes of new elements based on a defined convention.
  4. Easier integration with other systems – Not only can AF access data from PI, it can communicate with relational databases such as SQL Server and Oracle. Furthermore, the data access framework is extensible as users can plugin custom data references developed through the .NET framework, allowing access to a large gamut of possible data sources including web services, files, and custom processes.
  5. Simplified Monitoring – PI Notifications, an add-on software product from OSIsoft, integrates with AF providing out-of-the-box monitoring functionality. Users can establish set points for alerts on items of information. Both business and IT users can benefit from this, as IT users can use notifications to monitor PI server health. PI Notifications comes with three built in delivery channels – email, office communicator, and web services. Users configure these channels to send real-time alerts.
AF System Components Server The AF system can be installed on the PI server node but it is recommended that it be installed on a separate instance. The application runs off of a SQL Server back end. For basic functionality, the express version of SQL Server is sufficient while advanced features such as job scheduling require higher editions. The security model for AF is tied to Active Directory, so integrated rights management is possible. Databases, elements, and attributes can all contain their own security settings. Client Tools AF data can currently be accessed through the following clients:  PI System Explorer, PI ProcessBook, Web Parts, Coresight, DataLink (starting version 2012). The configuration tools include PI System Explorer and PI AF Builder, which is an Excel add-in Hierarchy The AF hierarchy consists of elements and attributes. Elements can be likened to entities which have characteristics or properties. Oftentimes elements are items which exist physically, such as a meter or a boiler. The properties of these items are attributes (example: temperature or pressure characteristics). Data References Data references are where attributes get their values from. By default, AF ships with five different data references:
  • Value – a value typed by the user
  • PI Point – a PI tag
  • PI Point Array – a list of PI tags
  • AF Formula – a formula or function defined using one or more locations within the hierarchy
  • Table Lookup – data from a RDBMS data source either imported or linked to AF
Categories Elements and attributes can be assigned one or more categories. Within PI System Explorer, users can search for elements and attributes using categories.   Units of Measure The AF system provides a repository of units of measure for the organization. Units are organized into classes, and individual units. A class represents a type of a unit measuring something consistent. For example, a class of unit is Energy, with a base unit of measurement Joule. Another unit of measure within this class might be a calorie, which is 4.1868 J. Templates Elements and notifications can be made into templates, and naming conventions can be established to setup dynamic tag references. Templates can support inheritance and be used as search criteria. Templates allow a consistent definition to elements and notifications, allowing the enforcement of business rules and definitions within the asset model in AF. Real World Example – Well Data After discussing all these components, let’s look at a real world example to solidify our understanding of how each of these items fit together. Sample Company A is looking to establish a hierarchy for their well data and have decided to collect information on the following items:
  • The well UWI
  • Gas Flow
  • Bottom Hole Pressure
  • Drawdown Pressure
  • Run Hours
  • Current Month Total Production
  • Previous Month Total Production
The UWI is a metadata item and gas flow, bottom hole pressure, drawdown pressure, and run hours are stored in PI. The monthly total production numbers are stored in a field data capture system which contains a RDBMS data store. Below is a model for the data: In order to establish this structure through AF, the following steps must be completed:
  1. Configure table import for RDBMS data source
  2. Create a template for well attributes and link them to the data stores
The screenshots below show what a sample implementation of this scenario may look like. The RDBMS in the sample implementation is a SQL Server system. Step 1 – Configure table import for RDBMS data source   Setup data source                                                Configure connection properties     Step 2: Setup the template   Template general settings Attributes of template Configuration of a PI Point reference One of the advantages of using templates is that you have the ability to use substitution parameters for tag references. In this example, the Run Hours tag is named based on the UWI. The substitution parameter %@|UWI% will evaluate to the UWI name and thus, the tag reference will evaluate dynamically.       Configuration of Table Lookup Data Reference   By configuring the table in the AF library and the element template in this manner, the requirement to retrieve data from different data sources and combine it into a single element template representative of a real world object is met. PI Notifications As previously mentioned, PI Notifications is an add-on for PI AF which allows the setup and deployment of trigger based alerts based on data within AF. Users are able to customize the trigger, message, and the subscriptions to the notification from a GUI. While PI Notifications is not installed with AF, the application really adds value and should be installed with each implementation of AF. PI Notifications comes with three built-in communication methods (called delivery channels) – email, office communicator message, or web service invocation. The software is highly recommended because it allows an out-of-the-box framework for monitoring. Additionally, PI Notifications allows users to organize contacts from Active Directory (as well as external contacts) into groups and escalation teams where alerts are escalated based on acknowledgement status within a defined time period.  
Trigger Message      Subscriptions
  Practical Applications Once you’ve got the hierarchy established at your organization, and loaded into AF, how can you make use of it? This section discusses a few applications of AF beyond the obvious hierarchical search advantages. Element Relative Displays PI ProcessBook allows users to create ‘Element Relative Displays’. Essentially, when a group of elements belong to a single template, a ProcessBook display can be set up in such a way that it can be reused for all elements of that template. Instead of storing tag references, symbols and value displays store references to attributes of a template. In Run mode, a navigation section will be displayed allowing the user to select which element they wish to view. When the selection changes, ProcessBook dynamically updates the values in the display to the source data of the selected element. Daily Report through PI Notifications As of PI Notifications version 1.2.1205.6 (2010 R2), users have the ability to customize message templates. This means that users can schedule reports to be sent out to an established subscriber list with a customized HTML template where data is populated from attributes within AF. With this capability, a lot of custom reporting solutions are no longer needed as the out-of-the-box functionality from OSIsoft now fulfills this need. Analytics PI AF exposes its data through the OLEDB protocol with an add-on product known as PI OLEDB Enterprise. With this, client tools such as PI SQL Commander can be used to generate OLEDB queries which can access AF data. Microsoft Office products such as Excel and Access natively have the ability to connect to and retrieve data from OLEDB data providers, thus giving users the ability to analyze data from AF through pivot tables, pivot charts directly within these commonly available software products. Custom Applications To fulfill your needs which aren’t met by out-of-the-box functionality, AF comes with a programming library called the AFSDK, which allows programmatic access to AF and provides several utility functions. PI Notifications contains its own API, known as the ANSDK.