Skip navigation
All Places > All Things PI - Ask, Discuss, Connect > Blog > 2018 > January
This Lab was part of the TechCon Hands-on Labs during PI Users Conference in 2017 in San Francisco.  The Lab was also offered in Sao Paulo, Brazil during LATAM Regional 2017 and at UC EMEA London. The Lab manual is attached; the manual is intended for an instructor led interactive workshop – so you may find the written content short on some of the explanations.


You can access the VM used for the lab via Home Page - OSIsoft Learning and, look under the Virtual Learning Environment.

Below is an extract from the Intro section of the Lab manual:


At TechCon 2016, we reviewed an end-to-end use case for developing a machine learning (multivariate PCA - principal component analysis) model to predict equipment failure. This lab builds on those concepts but we now use data from a process unit operation and apply data science and machine learning methods for diagnostics.


Troubleshooting faulty processes and equipments – also known as FDD (fault detection and diagnostics) or anomaly detection is a challenge.  This hands-on-lab provides an end-to-end walk-through for applying data driven techniques - specifically machine learning - for such tasks.


The learning objectives of this lab include:

  • Extracting data from the PI System using PI Integrator
  • Using the PI System data with R, data cleansing, feature selection, model development for a multivariate process using PCA (principal component), etc.
  • Using the PCA model with Shiny to create an interactive display for visualizing and exploring faults vs. normal operation; also using SVM (support vector machine) for classification and prediction of Air Handler (AHU) fault/no-fault state
  • Using Azure ML with PI System data for machine learning
  • Deploying the machine learning model for continuous execution with real-time data
  • Understanding the end-to-end data science process – data retrieval, data cleansing, shaping and preparation with meta-data context, feature selection via domain specific guidelines, applying machine learning methods, visualizing the results and operationalizing the findings


The application of data science and machine learning methods are well known in several fields – image and speech recognition, fraud detection, search, shopping recommendations, and others.  In manufacturing, including manufacturing operations management, and particularly in plant-floor operations with time-series sensor data, select data science/machine learning methods are highly effective.


Principal Component Analysis (PCA) is one such well-known and established machine learning technique for gaining insights from multivariate process operations data. PCA has several use cases – exploratory analysis, feature reconstruction, outlier detection, and others. And, other derived algorithms such as PLS (projection to latent structures), O-PLS (orthogonal …), PLS-DA (… discriminant analysis) etc. are widely used in the industry.

In a multivariate process, several parameters - sometimes just a handful but often dozens of parameters - vary simultaneously, resulting in multi-dimensional datasets that are difficult to visualize and analyze. Examples of multivariate processes are:

  • Brewery - Beer fermentation
  • Oil Refinery – Distillation column
  • Facilities – Heating, Ventilation and Air-Conditioning (HVAC) - Air Handler Unit


...In this lab, we use the Air Handler Unit (AHU) to illustrate an approach for analyzing such multivariate processes.  A typical HVAC system with AHU is shown below.



Figure HVAC system with Air Handling Unit (AHU)


Sensor data available from the AHU, as part of the BMS (building management system) are:

  • Outside air temperature
  • Relative Humidity
  • Mixed air temperature
  • Supply air temperature
  • Damper position
  • Chilled water flow
  • Supply air flow
  • Supply air fan VFD (variable frequency drive) power

During the course of a day, the AHU operating conditions change continuously as the outside air temperature rises and falls, along with changing humidity and wind conditions, changing thermostat set-points, building occupancy level, and others. The BMS control system adjusts the supply air flow rate, chilled water flow rate, damper position etc. to provide the necessary heating or cooling to the rooms to ensure tenant comfort.


However, fault conditions such as incorrect/drifting sensor measurements (temperature, flow, pressure …), dampers stuck at open/closed/partial-open position, stuck chilled water valve, and others, can waste energy, or lead to tenant complaints from other malfunctions causing rooms to get too hot or too cold.

For troubleshooting and diagnostics, HVAC engineers need tools to answer questions such as:

  • How can I use data to detect faulty AHU operations i.e. air damper stuck open at 100% open on a hot day in mid-July?
  • What’s the AHU “state” during 100 ºF + days? In 2016? In 2015? And, in 2014 before we installed the Economizer?
  • What are the AHU outlier/extreme operating states?
  • How did it get to the extreme state; what were the immediate prior operating states for that day?
  • What’s the AHU state at supply fan flow limit constraint? When did it happen?

Filter Blog

By date: By tag: