Machine Learning for Prediction Purposes on PI System...
Transcript of Machine Learning for Prediction Purposes on PI System...
Machine Learning for Prediction Purposes on PI System Data
By: Ahmad Fattahi, OSIsoft
Michael Christopher, OSIsoft
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 2
Machine Learning
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 3
The Smart Sneezing Colleague
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 4
“We are drowning in information and starving for knowledge”
Extracting important patterns and trends
Understanding what the data says
Applications span many industries
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 5
Relationship with PI System
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 6
PI System as the system of reference for enterprise data
• Collecting and serving historical data efficiently on demand
• Data = Value! This method heavily relies on historical data
• All data in one place
Handling large amounts of valuable data
• Better statistical results
• Improved discovery of correlations
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 7
Prediction
• Load forecasting
• Production forecasting
• Preemptive maintenance
• Enterprise Resource Planning
Patterns and Trends
• Discovering patterns of interest
• Classification and clustering
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 8
Available Tools
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 9
Microsoft SQL Server Analysis Services MS Excel Client
Data
Source
Data mining
add-in
SSAS
PI
DataLink
• Great integration with PI DataLink
• Easy-to-use, wizard-based UI
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 11
tag3 = SIN(2 * tag1 + tag2) + Noise
Build the model and learn
10,000 observations
Make predictions
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 12
MATLAB
• PI SDK, PI OPC, PI ACE, ADO DB
Several ways to integrate with PI System
• Statistics and Neural Network Toolboxes
Powerful machine learning
Can be combined with other advanced analytics
External
Data Source
MATLAB
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 13
Load Prediction
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 14
Using PI System and MATLAB in a Real World Scenario
Predict power demand at OSIsoft headquarters
• Regression (Decision) Tree
MATLAB Statistics Toolbox
• Outdoor temperature
• Day of the week
• Hour of the day
Investigate multiple predictors
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 15
Architecture
HQ Facilities PI Server
MATLAB
Training
Module Regression
Parameters
MATLAB
Forecasting
Module Forecast PI Server
PI XML Interface Weather.gov forecast
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 16
Facilities Historical Data
FAC.OAK.Power-Total_Demand_Calc.PV
151.35
kW
FAC.OAK.Weather-Outside_Temperature-Val .PV
51.957
°F
11/6/2011 12:00:00 AM10/30/2011 12:00:00 AM 7.00 days
100
150
200
250
300
350
400
40
46.667
53.333
60
66.667
73.333
80
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 17
Choosing Predictors
7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481
x 105
100
200
300
400
1 - Predictor Model; 60-day Training Period
Actual Power (kW)
Predicted Power (kW)
7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481
x 105
100
200
300
400
2 - Predictor Model; 60-day Training Period
Actual Power (kW)
Predicted Power (kW)
7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481 7.3481
x 105
100
200
300
400
3 - Predictor Model; 60-day Training Period
Actual Power (kW)
Predicted Power (kW)
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 18
Forecasts
vCampusDemo.FAC.OAK.Power-Total_Demand_Predict
149.38
forecast.weather.gov/temperature
52.250
F
11/13/2010 12:00:00 AM11/6/2010 12:00:00 AM 7.04 days
100
150
200
250
300
350
400
40
46.667
53.333
60
66.667
73.333
80
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 19
Observations and Forecasts
vCampusDemo.FAC.OAK.Power-Total_Demand_Predict
149.38
forecast.weather.gov/temperature
52.250
F
11/13/2010 12:00:00 AM11/6/2010 12:00:00 AM 7.04 days
100
150
200
250
300
350
400
40
46.667
53.333
60
66.667
73.333
80
11/6/2011 11:47:44.389 AM10/30/2011 12:00:00 AM 7.53 days
100
150
200
250
300
350
400
40
46.667
53.333
60
66.667
73.333
80
* Observations Forecasts
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 20
So What?
• Combine with knowledge of commercial electric rates and internal schedule
Resource Planning
• Alarm on trends off the norm
Preventative Maintenance
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 21
Conclusion
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 22
Introducing Machine Learning
Explaining how it can save money and resources
Showing how it can be done on PI System Data
Demonstrating a real-world example of how it can predict load and detect faults
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C 23
Ahmad Fattahi
Michael Christopher
vCampus Team Member
Technical Support Engineer
Thank you
© C o p y r i g h t 2 0 1 1 O S I s o f t , L L C