Post on 28-Oct-2019
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
1
Lecture 2 Intelligent Energy Systems:
Monitoring Basics
Dimitry Gorinevsky
Seminar Course 392N ● Spring2012
Traditional Grid
• Worlds Largest Machine! – 3300 utilities – 15,000 generators, 14,000
TX substations – 211,000 mi of HV lines
(>230kV)
• A variety of interacting information decision and control systems
ee392N - Spring 2012 Stanford University
2 Intelligent Energy Systems © Dimitry Gorinevsky
Smart Energy Grid
3
Conventional Electric Grid
Generation Transmission
Distribution Load
Intelligent Energy Network
Load IPS
Source IPS
energy subnet
Intelligent Power Switch
Conventional Internet ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
Outline
1. Monitoring Applications 2. Statistical Process Control - SPC 3. Multivariate SPC – MSPC 4. Principal Component Analysis - PCA
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
4
Business Logic
Internet Applications
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
5
Database
Presentation Layer
Backend
Computer
Tablet Smart phone
Internet
CRM and ad analytics Portfolio optimization Decision support Fraud detection
Business Logic
Intelligent Energy Applications
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
6
Database
Presentation Layer
Computer
Tablet Smart phone
Internet Communications
Energy Application
Application Logic (Intelligent Functions)
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
7
Control Functions
• Control function in a systems perspective – Closed loop
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
8
Monitoring & Decision Support
• Monitoring functions are open-loop - Data presentation to a user
Power Generation Time Scales
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
9
Power Supply Scheduling
• Power generation and distribution • Energy supply side
Time (s) 1/10 10 1000 1 100 http://www.eeh.ee.ethz.ch/en/eeh/education/courses/viewcourse/227-0528-00l.html
Anomalies & Sustainment
Power Demand Time Scales • Power consumption
– DR, Homes, Buildings, Plants
• Demand side
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
10
Demand Response
Home Thermostat
Building HVAC
Enterprise Demand Scheduling
Time (s) 100 1,000 10,000
Anomalies & Sustainment
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
11
Monitoring Goals
• Situational awareness – Anomaly detection – State estimation
• System health management – Fault isolation – Condition based maintenances
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
12
Condition Based Maintenance
• DOD CBM+ Initiative
Outline
1. Monitoring Applications 2. Statistical Process Control - SPC 3. Multivariate SPC – MSPC 4. Principal Component Analysis - PCA
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
13
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
14
Anomaly Detection - SPC
• SPC - Statistical Process Control – Introduced for monitoring of manufacturing processes – Warning for off-target quality
• SPC vs. EPC – Engineering Process Control = feedback control
• Main SPC method – Shewhart Chart (Control Chart)
• Other SPC methods – EWMA, CuSum, Western Electric Rules
Plant/System Data
Exceedance Monitoring
• Currently used in most monitoring systems • Example: grid frequency deviation from 60Hz
– Empirical exceedance threshold
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
15
Monitoring Function: Exceedance
Detected Anomalies
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
16
SPC: Shewhart Control Chart • W.Shewhart, Bell Labs, 1924 • Statistical Process Control (SPC) • UCL = µ + 3·σ • LCL = µ - 3·σ
Walter Shewhart (1891-1967)
sample 3 6 9 12 12 15
mean µ
qual
ity v
aria
ble
Lower Control Limit
Upper Control Limit
Exceedance / Out of control
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
17
Shewhart Chart, cont’d • Quality variable assumed randomly
changing around a steady state • Detection: y(t) > UCL = µ + 3·σ • For a normal distribution, false alarm
probability is 0.27%
P(z > 3) = 1-Φ(3) = 0.1350·10-2 P(z < 3) = Φ(-3) = 0.1350·10-2
σµ−
=)()( tytz
UCL LCL
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
18
SPC: Use Examples
• SPC in manufacturing • Fault monitoring for PHM/CBM • Sensor integrity monitoring
– Fault tolerance and redundancy management
Sensor
Reference - +
Fault
|v| < 3σ Normal yes
no
Outline
1. Monitoring Applications 2. Statistical Process Control - SPC 3. Multivariate SPC – MSPC 4. Principal Component Analysis – PCA
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
19
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
20
Multivariate SPC • Univariate process: y(t)
• Two univariate processes
( ))(1)(
)1,(1 222
cccFczP
Φ−+−Φ=−=>2
202 ~ χ
σµ
−
=yz
Chi-squared CDF
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
21
MSPC Explanation
• MSPC=Multivariate Statistical Process Control • Scatter plot for correlated channels
Time series data Keep the data values, ignore the time stamp
y1(t)
y2(t)
y1
y2
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
22
Multivariate SPC
• Two correlated univariate processes y1(t), y2(t)
=
2
1
yy
y
=
2
1
µµ
µ
cov(y) = P
multivariate outlier: out of control
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
23
Whitened Variables
• Uncorrelated linear combinations z(t) = L·[y(t)-µ]
LTL= P-1 cov(z) = I
• Declare fault (anomaly) if
( ) ( ) 22
12 ~ χµµ −−= − yPyz T
( ) )2;(1 222 cFczP −=>
( ) ( ) 21 cyPy T >−− − µµ
CDF for Chi-squared with 2 DOF
Plant / System Data
Multivariate Monitoring
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
25
Monitoring data processing:
Advisory Info: • Anomaly
Historical Data Set
Models: Performance, Noise
xPxT
yxT 12 ˆ
ˆ−=
−= µ)(ty
P̂,µ̂
22 cT >
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
26
Hotelling's T2
• Empirical parameter estimates
( )
( )µµµ
µ
−≈−−=
≈=
∑
∑
=
=
ytytyN
P
yEtyN
TN
t
N
t
cov)ˆ)()(ˆ)((1ˆ
)(1ˆ
1
1
• Hotelling's T 2 two-sample statistics is
• T 2 distribution differs from since are
considered as random variables, y(t) ~ N(µ,P)
Harold Hotelling (1895-1973)
2χ µ̂,P̂
( ) ( )µµ ˆ)1(ˆˆ)1( 11
2 −+−+⋅= −+ NyPNyT T
NN
Multivariate SPC with T2
• The anomaly detection decision is • Threshold c is defined by the false positive/false
negative tradeoff based on the distribution
where F is the Fisher-Snedecor’s F-distribution p is the dimension of the data vector y N is the size of the training data set ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
27
22 cT >
pNpFpN
pNT −−−
,2
)()1(~
Outline
1. Monitoring Applications 2. Statistical Process Control - SPC 3. Multivariate SPC – MSPC 4. Principal Component Analysis – PCA
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
28
PCA
• PCA = Principal Component Analysis
• What if empirical covariance P=XXT/N is not invertible? Cannot compute xTP-1x – This happens in most real cases
• SVD of the data and covariance matrix X = U⋅ S⋅ VT = ∑k uk skvk
T
XXT= U⋅ S2⋅ UT = ∑k uk sk2uk
T
VTV = I ee392N - Spring 2012
Stanford University Intelligent Energy Systems
© Dimitry Gorinevsky 29
Scores
Loadings
[ ]µµµ ˆ)(ˆ)2(ˆ)1( −−−= NyyyX
PCA Structure
• Singular vectors (principal components) U = [UR U0]
UR - Range Space; nonzero singular values, sk > 0 U0 - Null Space; zero singular values, sk=0
>>[U,S,W]=svd(X*X’) % 2ms for 100x100
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
30
• Singular values sk
nonzero
‘zero’
k
PCA, T2, and Q statistics
• T2 statistics is used in Range Space of P is Range Space projection of x
• Range Space: covariance is invertible
• Must also monitor Null Space projection • Q statistics: Q = xTU0U0 x
– a.k.a. SPE (squared prediction error)
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
31
2RxxQ −=
xUUx RTRR =
RRTR xPxT 12 −=
PCA, T2, and Q Summary
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
32
Q T2
principal component #2
principal component #1
PCA Prediction Model
• Null space defines linear dependency between monitored variables
U0x = v ≈ 0 m linear equations • Can be interpreted as a dependence between two
subsets of variables
• SPE yields model prediction error:
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
33
=
zy
x vbzy +=m
k
2bzy −
End of Lecture 2
ee392N - Spring 2012 Stanford University
Intelligent Energy Systems © Dimitry Gorinevsky
34