Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster...

31
Machine Learning for Parameters of Linear State Estimation and Event Detection Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved. Marianna Vaiman, V&R Energy [email protected] i‐PCGRID Workshop 2019 • San Francisco, CA March 27, 2019

Transcript of Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster...

Page 1: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Machine Learning for Parameters of Linear State 

Estimation and Event Detection

Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Marianna Vaiman, V&R [email protected] 

i‐PCGRID Workshop 2019  •  San Francisco, CAMarch 27, 2019

Page 2: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

2Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Today we celebrate Johann Sebastian Bach with our first ever AI‐powered Doodle! The Doodle is an interactive experience encouraging players to compose a two measure melody of their choice. With the press of a button, the Doodle then uses machine learning to harmonize the custom melody into Bach’s signature music style…Next came our partners at PAIR who used TensorFlow.js to allowmachine learning to happen entirely within the web browser…

https://www.google.com/doodles/celebrating‐johann‐sebastian‐bach

2

3 4

3/22/2019

Page 3: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Contents

1. Machine Learning for Parameters of Kalman Filter 2. Machine Learning for Event Detection

3Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 4: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

1. Machine Learning for Parameters of Kalman Filter in PMU‐ROSE

4Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 5: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

State EstimationState Estimator (SE) is designed to produce a system state based on the “best estimate” of the system voltages and phase angles:– Provided that there are errors in the measured quantities; and – That there is a redundancy in measurements 

State Estimation is based on minimizing the sum of squares of the differences between the estimated and the measured values of a functionLinear State Estimator (LSE) is based on PMU measurements of voltage and current:– Voltage and current vectors are  considered as the state variable

Applications/advantages of LSE:– A backup to the conventional SE if it fails to solve or SCADA data is not 

available– A check/validation for the quality of conventional state estimator– High speed of state estimation due to using a direct non‐iterative solution

5Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 6: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

PMU ROSE Real‐Time Analysis

6Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Output of LSE:– Conditioned PMU data;– Bad data reporting and statistics;– A list of observable islands and their details;– PMU State Estimator Case.

Page 7: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Components of LSE Framework

Multi‐step process:1. Several pre‐screening 

techniques 2. Data range checks3. Combination of filtering 

and smoothing techniques based on Kalman filter

4. Linear state estimation5. End‐to‐end machine 

learning

7Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 8: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Observable Islands in WECC Network

8Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

A power system network is considered to observable if voltage vector at each node can be calculated based on PMUmeasurementsUses all signals available at Peak RCData sets used for observability analysis:

– PMU data– State Estimator (SE) data– PMU/SE mapping

The results change when topology changes or PMU signal is lost

Page 9: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Kalman FilteringAn algorithm that:– Uses a series of measurements observed over time, containing statistical noise 

and other inaccuracies, and – Produces estimates of unknown variables that tend to be more accurate than 

those based on a single measurement alone

The Kalman filter approach is a two‐stage algorithm: – The first stage is prediction, which projects the previous time step state 

forward in time by means of a predefined process model– The second stage is correction/estimation, which corrects the predicted state 

by accounting the available measurements and the accuracies of both process model and measurements

– LSE is used at the second stage

PMU‐ROSE creates the Kalman filter for each observable island

Page 10: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Prediction and Estimation using KalmanFiltering

The prediction equations obtain the a priori state estimate 𝑥 of the state 𝑥 at time step k given the knowledge of the process prior to time step k, up to and including time step k ‐ 1The estimation equations incorporate the new measurements obtained at time‐step k into the a priori estimate and are used to derive an improved a posteriori estimate 𝑥 of the true state 𝑥Used quadratic prediction based Kalman filter: – Uses quadratic relationship between the past, present and future/estimated 

state

10Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 11: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Prediction and Estimation using KalmanFiltering

Stage 1: PredictionStage 2: Correction (Update)

Figure source: https://en.wikipedia.org/wiki/Kalman_filter

𝑥 | = a posteriori state estimate at time k given observations up to and including at time k𝑃 | = a posteriori error covariance matrix (measure of estimated accuracy of the state estimate) 

11Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 12: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Kalman Filtering  – 1A linear system can be modeled as a pair of linear stochastic process and measurement equations:

𝑥 𝐴𝑥 𝑤𝑧 𝐻𝑥 𝑣

where

𝑥 ∈ 𝑅 = the system state vector;𝑧 ∈ 𝑅 = the measurement vector;A = n×n is the state transition matrix that links the system state at the 

previous time step k−1 to the state at the current time step k;H = m×n matrix that relates the system state and the measurement set 𝑧 ;𝑤 ∈ 𝑅 = the process noise at time step k; assumed to be white;𝑣 ∈ 𝑅 = measurement noise; assumed to be white.

12Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 13: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Kalman Filtering – 2 

The process noise and measurement noise are assumed to be mutually independent random variables with normal probability distributions:𝑝 𝑤 ~ 𝑁 0, 𝑄

where

𝑄 = the process noise covariance matrix𝑅 = the measurement noise covariance matrix

𝑝 𝑣 ~ 𝑁 0, 𝑅

13Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 14: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Prediction using Kalman FilteringStage 1: Prediction

Stage 2: Correction/LSE– Applies both heuristic and statistical methods to identify suspected bad data points and topology changes

– Considers relationship between signals

14Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 15: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Correction Using Kalman Filter and LSEDisplays PMU values and values computed by LSE, compares PMU and LSE values with State Estimator values

Red graph – real‐time PMU measurements; Pink graph – the same PMU measurements processed by the LSE (conditioned values); Orange line – State Estimator value. 

15Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 16: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Parameter Learning for Kalman FilterDuring learning we want to learn the best parameters to maximize the likelihood of the input valuesA number of parameters affect filtering:– Transition (process) variance– Observation (measurement) variance– Constraint variance

At each step, calculate the likelihood of the new input values and the derivatives of this likelihood by all parameters included in learningMake a small gradient step towards likelihood maximization After several hundred steps, the parameters are adopted to the dataOnline learning is done continuously

16Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 17: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Parameters Included in LearningTransition Variance – Components of matrix 𝑄– Difference between new and previous values (voltages at the next timestamp)– The smaller the Transition Variance is, the closer the new values are to the previous 

ones, and the smoother output signals are

Measurement Variance– Components of matrix 𝑅 – Difference between the measured input values and the predicted ones using the 

Kalman filterSimilar to measurement error 

– The smaller the Measurement Variance is, the closer the output signals are to the input signals

Constraint Variance – Based on Kirchhoff’s law– The smaller the Constraint Variance is, the more accurately Kirchhoff’s equations are 

satisfied

17Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 18: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Disabled

Red graph – PMU measurementsPink graph  – LSE values: learning disabledOrange line – State Estimator value

18Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 19: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Disabled

Pink graph  – LSE values: learning disabledOrange line – State Estimator value

19Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 20: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.001

Red graph – PMU measurementsPink graph  – LSE value with learning Orange line – State Estimator value

20Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 21: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.001 (cont)

Red graph – PMU measurementsPink graph  – LSE value with learning Orange line – State Estimator value

21Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 22: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.001 (cont)

Pink graph  – LSE value after learning Orange line – State Estimator value

22Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 23: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.001 (cont)

Pink graph  – LSE value after learning Orange line – State Estimator value

23Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 24: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.01

Red graph – PMU measurementsPink graph  – LSE value with learning Orange line – State Estimator value

24Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 25: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.01 (cont)

Pink graph  – LSE value after learning Orange line – State Estimator value

25Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 26: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.1

Red graph – PMU measurementsPink graph  – LSE value with learning Orange line – State Estimator value

26Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 27: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Learning is Enabled, Rate =0.1 (cont)

Pink graph  – LSE value after learningOrange line – State Estimator value 

27Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 28: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

2. Machine Learning for Event Detection in D‐PMU ROSE (Distribution‐PMU ROSE)

28Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 29: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Microsoft’s LightGBM– A gradient boosting method (a 

machine learning technique for regression and classification problems) that uses tree‐based learning algorithms:

Faster training speed, higher efficiencyLower memory usageBetter accuracyCapable of handling large‐scale data

Google’s TensorFlow– A  symbolic math library, and is also used for machine learning applications 

such as neural networks, which was developed by Google Brain – Uses data flow graphs; graph nodes represent mathematical operations, 

while the graph edges represent the multidimensional data arrays (tensors) that flow between them

Both TensorFlow and LighGBM are free and open‐source software

Machine Learning Libraries in D‐PMU ROSE

29Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Page 30: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

Event Detection

Before Event

30Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.

Event

Observability changes after an event has occurred

Page 31: Machine Learning for Parameters of Linear State Estimation ... · learning algorithms: Faster training speed, higher efficiency Lower memory usage Better accuracy Capable of handling

THANK YOU!

31Copyright © 1996‐2019 V&R Energy Systems Research, Inc. All rights reserved.