This Lab was part of PI World 2018 in San Francisco. The Lab manual used during the instructor led interactive workshop is attached. Lab VM is available via OSIsoft Learning

In a crude oil refinery, gasoline is produced in the stabilizer (distillation) column. Gasoline RVP is one of the key measurements used to run and adjust the column operations. Refineries that do not have an on-line RVP analyzer have to use lab measurements - available only a few times - say, a couple of samples, in a 24-hour operation.

As such, column process values (pressure, temperature, flow etc.) and historical RVP lab measurements can be used via machine learning models to predict RVP more often (say, every 15 minutes or even more frequently) to guide the operator.

Figure: Stablizer column

Figure: Stablizer column - AF data model

In the hands-on portion, you

Review the AF model

Use PI Integrator to prepare and publish historical data (to a SQL table) - this data is used for model development

Review the step-by-step machine learning model development process in Python/Jupyter

Deploy the model for real-time operations

Use PI Integrator to stream real-time stabilizer process data to Kafka. And, using Python and kafka consumer, calculate the model-predicted RVP and write it back to PI via PI WebAPI

Excellent job Mr. Gopal.I am planning to implement a few Data Analysis Calculations into our PI AF Analysis, what would be your recommendations on implementing the following Analyses?:

1. Hydrocarbon Phase Envelope - Real Time Pressure vs Temperature Curve against a Static Envelope2. Data Anomaly Detection - besides using Max and Min Limits, we are using Moving Averages and Standard Deviation to capture the outliers in a PI AF Event Frame. Is there a better approach using Predictive Machine Learning?

For Data Anomaly Detection we are looking at univariate anomalies. Simple example as below for a time series data:

We are able to achieve something close to this, by implementing a moving average calculation and moving standard deviation and creating an upper and lower control limit (UCL and LCL) as below:

UCL = Avg+2*Std Dev

LCL = Avg+2*Std Dev

And we are able to do an AF Analytics which would generate an event frame for periods where the data is outside the control band.

The issue with this method is we need to setup analytics for each of the parameters that we want to analyze. And also each of the data requires some ‘tuning’ in terms of period of averaging and the number of standard deviations we want to use for the control limit equation.

We would like to explore if there are better alternatives where we can detect anomalies for our entire number of tags (5k tags).

Our preference is to use a simpler methods before moving on to more complex solutions :

And, you have properly configured Zero/Span for the important control variables? And, instead of all the 5K tags - I'll start with the key tags in the control loops that keep your systems at a desired state...

Also, for how long (duration) do the spikes shown in your chart last? And, how quickly does it go from average to above/below 2-sigma...