32
Application of Machine Learning to Power Grid Analysis Mike Zhou (State Grid EPRI, China) JianFeng Yan, DongYu Shi (China EPRI, China) Donghao Feng (KeDong Electric Power Control Sys Com., China) 1 IEEE PES Technical Webinar Sponsored by IEEE PES Big Data Subcommittee Contact Info : [email protected]

IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

ApplicationofMachineLearningtoPowerGrid Analysis

MikeZhou(StateGridEPRI,China)JianFeng Yan,DongYu Shi (ChinaEPRI,China)

Donghao Feng (KeDong ElectricPowerControlSysCom.,China)

1

IEEE PES Technical Webinar Sponsored by IEEE PES Big Data Subcommittee

Contact Info:[email protected]

Page 2: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Agenda2

• Introduction• Open Platform for Applying Machine Learning (ML)• Power Grid Model Service• Research on Applying ML to Online DSA• ML Research Roadmap of CEPRI

F

Page 3: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

WhyMLResearchAgain?

• AlphaGoShowcase– “impossibleforatleast10moreyears”• "ArtificialIntelligenceistheNewElectricity“– AndrewNg• Open-sourceMLtools(GoogleTensorFlow)

3

1996

[1] “TensorFlow: An open-source software library for Machine Intelligence”, https://www.tensorflow.org/

[1]

Page 4: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

BasicIdea4

[y] = [W][x] + [b][x] [y]

Layer(1) Layer(n)…

Neural Network

Page 5: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

MLApplicationAreas5

• ImageRecognition• SelfDrivingCar• Automation• Robotics• PredictiveAnalytics

– Powergridanalysishasbeenguidingtheoperationsuccessfully

– Powergridanalysissofarismodel-driven– Data-drivenMLapproachwillbesupplemental

Page 6: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Agenda6

• Introduction• Open Platform for Applying Machine Learning• Power Grid Model Service• Research on Applying ML to Online DSA• ML Research Roadmap of CEPRI

F

Page 7: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

NNModelTrainingData• MLMainSteps:1)Training;2)Prediction

– TrainingdataisthefoundationforML

• Trainingdatasetcollection– LargeuserdatasetcollectedbyGoogle,Facebook

• Trainingdatasetgeneration– Powergridoperationdependsonthesimulation

• Guide thegridoperationwithprovenrecord• Contingencyanalysiscouldbedoneonly throughsimulation

– Needgridanalysistrainingdatagenerationtools/platforms

• OpenPlatformforApplicationofMLtoPowerGridAnalysishasbeencreated

7

Page 8: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PlatformArchitecture8

Google ML Engine(TensorFlow)

PS Model Service(InterPSS)

Training CaseGenerator

(Pluggable)

1. Training

2. Prediction

Page 9: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

SampleStudyCase

9

• Load bus P,Q adjusted by a random factor [0~200%], load Q is further adjusted by random factor [+/-20%]

• The load changes are randomly distributed to the generator buses

Gen Area

Load Area

Training Case

IEEE-14 Bus case as the basecase. Power is flowing from the Gen Area to the Load Area. When the operation condition changes, predict• Bus voltage, P, Q• Interface flow• N-1 CA max branch power flow

NN-Model Prediction

Interface

Page 10: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

BusVoltagePrediction(ACLoadflow)

• ACPowerFlow– GivenbusPQ,computebusvoltage(mag,ang),suchthatmaxbus

powermismatch(dPmax,dQmax)<0.0001pu– 1000trainingdatasetsaregeneratedandusedtotraintheNN-model

• Input:busP,Q,P• Output:busvoltage,…

• PredictionUsingNN-Model– 100testingcasesaregeneratedusingthesameprocessasthetraining

dataset.– ThetrainedNN-Modelisusedtopredictthebusvoltage

10

2

dV(mag) dV(ang) dPmax dQmax

Maximum 0.00118pu 0.00229rad 0.00937pu 0.00619pu

Average 0.00028pu 0.00055rad 0.00225pu 0.00171pudV(msg,ang): Bus voltage predicted is compared with the accurate AC Power Flow results dP/Qmax: Bus voltage predicted is used to compute the network max bus power mismatch

Page 11: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Bus/InterfacePQPrediction(ACLoadflow)

• BusP,Q– SwingBusP,Qprediction(100testingcases)

• Averagedifference: 0.00349pu 0.35MW/Var• Maxdifference: 0.01476pu 1.48MW/Var

– PVBusQprediction(100testingcases)

• Averagedifference: 0.00353pu 0.35MVar• Maxdifference: 0.02067pu 2.07Mvar

• InterfaceFlow– Interfacebranchset[5->6,4->7,4->9]– InterfaceFlowP,Qprediction(100testingcases)

• Averagedifference: 0.00084pu 0.08MW/Var• Maxdifference: 0.00318pu 0.32MW/Var

11

Page 12: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

MaxBranchPowerFlowPrediction(N-1CA)

• N-1ContingencyAnalysis(CA)– InN-1CA,thebranchpowerflowiscalculatedwhenthereisabranch

outage.Furthermore,themaxbranchflowofeachbranchconsideringallcontingenciestochecklimitviolationorforscreening.

– 1000trainingdatasetsaregeneratedandusedtotraintheNN-model• Input:busP,Q,P• Output:maxbranchpowerflow

• PredictionUsingNN-Model– 100testingcasesaregeneratedusingthesameprocessasthetraining

dataset.– Maxbranchpowerflowpredictioniscomparedwiththeaccurate

simulationresults

• Averagedifference: 0.0134pu 1.34MW• Maxdifference: 0.0509pu 5.09MW

12

2

Page 13: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

OpenPlatformforApplicationofMLtoPowerGrid Analysis

• IntegrationofGoogleTensorFlowandInterPSS– TensorFlowasMLengine– InterPSS

• Providespowergridsimulationmodelservice• Pluggabletrainingdatagenerator

• ThePlatformhasbeenopen-sourced– Apache-2.0License– Open-sourceProjectLocationGitHub:https://github.com/interpss/DeepMachineLearning

13

(Summary)

[2]

[2] “The InterPSS Community Site”, www.interpss.org

Page 14: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Agenda14

• Introduction• Open Platform for Applying Machine Learning• Power Grid Model Service• Research on Applying ML to Online DSA• ML Research Roadmap of CEPRI

F

Page 15: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PowerGridModelService15

• TheNeedForCreatingtheTrainingData– Powergridmeasurementdataisnotenough– Trainingdataforsecurityanalysisneedtobecreated

• N-1CA,transient/voltagestabilitylimit

• ValidNNModelPredictionAccuracy– CommonMLApproach

• CollectedDataset=>Trainingset+Testingset

– Modelservicecreatesdataon-demandrandomlyoraccordingcertainrules

• BasedonInterPSSSimulationEngine– Accuratepowergridsimulationmodelbehind

Page 16: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

AboutInterPSS16

“Solving power grid simulation problem usingthe modern software approach”

• InterPSS:InternetTechnology-basedPowerSystemSimulator

• InterPSSprojectstartedin2005– Object-oriented,Javaprogramminglanguage– PSS/E,BPA,PSASP(ChinaEPRI)similarfunctions– Freesoftware

[3] M. Zhou, “Solving Power System Analysis Problems Using Modern Software Approach,“ US Gov FERC Increasing Market and Planning Efficiency through Improved Software Meeting, DC June 2010.

[3]

Page 17: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

InterPSSSoftwareArchitecture17

Application Suite

Traditional ApproachLittle could be extended

and customized

InterPSS Core Engine

InterPSS ApproachApplication created by

extension, integration and customization

Extensions

Desktop Edition

Cloud Edition

Integration with other systems

ü

[4] M. Zhou, Q.H. Huang, “InterPSS: A New Generation Power System Simulation Engine," submitted to PSCC 2018

[4]

Page 18: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PowerNetworkObjectModel18

[5] E. Zhou, "Object-oriented Programming C++ and Power System Simulation," IEEE Trans. on Power Systems, Vol. 11, No. 1 Feb. 1996.

[5]

AlgoA[ ]B[ ]C[ ]

X[ ]Y[ ]Z[ ]

Algo

ObjectModel

Process I/O In-Memory Data Exchange

Input Input

Output Output

Algorithm-Focused Pattern Model-Focused Pattern

• DataProcessingPatterns– Algorithm-focused pattern

• Procedureprogrammingapproach• PSS/E, BPA,PSASP(China EPRI)basedonthispattern

– Model-focusedpattern• Object-orientedapproach

• InterPSSusestheModel-FocusedPattern

Page 19: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

TrainingCaseGeneration19

Algo

InterPSSObject Model

Py4J

SimulationService

• ObjectandAlgorithmDecoupledRelationship• CommonAlgorithmImplemented

– TopologyAnalysis,Loadflow,N-1CA,StateEstimation– ShortCircuitAnalysis,TransientStabilitySimulation

• TrainingDataGenerator– Trainingdatagenerationimplementedasaspecialalgorithm– UsePy4Jastheruntimetohosttheobjectmodelandinterface

withTensorFlow(Python)

Google ML Engine(TensorFlow)

Process I/O

In-Memory Data Exchange

Training CaseGenerator

[6] “Py4J - A Bridge between Python and Java”, https://www.py4j.org/

[6]

Java

Python

Page 20: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PowerGridModelService20

• BasedonInterPSSSimulationEngine• ProvideFlexiblePowerGridModelService

– InterPSSpowernetworkmodelhostedinaJavaruntimeenvironment

– Pluggabletrainingdatagenerator• CreatecustomtrainingdatageneratorusingInterPSSpowernetworkobjectmodelAPI

(Summary)

Page 21: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Agenda21

• Introduction• Open Platform for Applying Machine Learning• Power Grid Model Service• Research on Applying ML to Online DSA• ML Research Roadmap of CEPRI F

Page 22: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

DSAChallenges• CurrentDynamicSecurityAssessment(DSA)

– Repackageofoff-linesimulationprograms(TS,Small-signal)– Runninginthebatchmodeperiodically(15min)– InChinaStateGriddispatchingcenter,aroundtriptakes6-10minto

complete– Theonlineanalysismodelsizeislarge-scale(40Kbuses)

• Challenges– Thetime-domainsimulationhaslimitedspeed-uproom– Thesimulationresultsarenotintuitivefortheoperators– Remedyactionscannotbedirectlyderivedfromtheresults

22

[7] M. Zhou, et al, “Development of Fast Real-time Online Dynamic Security Assessment System,” IEEE SmartGrid NewsLetter, June 2016.

[7]

Page 23: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

CCTPrediction• CriticalClearingTime(CCT)

– Maximumtimeduringwhichadisturbancecanbeappliedwithoutthesystemlosingitsstability.

– Determinethecharacteristicsofprotections– Measurequantitativelysystemdynamicsecuritymargin

• CCTComputation– ~100secusingthesimulationapproach(40KBus)– ML-basedapproach:usingNeuralNetwork(NN)modeltopredictCCT

23

Page 24: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

NN-ModelBasedCCTPrediction

• NN-Model(percontingency)isconstructed(trained)fortheCCTprediction;

• NN-Modelinput(FirstLayer Features):powergridmeasurementinfo,suchasGen(P,V);Substation(P,Q),andz(i,j)betweensubstations;

• AsetofLastLayer FeaturesarederivedandusedforCCTPrediction.

24

First Layer Feature

Last LayerFeature

PredictionResult

CCT

Page 25: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PreliminaryResults25

NetworkSize

40K+Buses,3370Substations

NN-ModelOutput

CCTforaFault

FirstLayerFeatures

Gen(P、V);Substation(P, Q);Zbetweensubstations;

(Dimension :8772)

LastLayerFeatures

About 20

FeatureReduction

BasicNNunit: AutoEncoder

500kV厂站

220kV厂站

省内500kV子网

220kV子网

AutoEncoder

AutoEncoder AutoEncoder...

...

CCT

AutoEncoder

高级特征

CCTCalculation

Averageerror

Maxerror

Trainingcase

Testingcase

TimeNN-Model

TimeSimulation

AccRatio

AFault 2.65% 28.69% 24594 4660 2ms ~100s 1:50000

Last LayerFeature

First Layer Feature

i,j

Page 26: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

BasicNNunit:AutoEncoder26

“The aim of an AutoEncoder is to learn a representation (encoding) for a set of data, typically for the purpose of dimensionality reduction.”

• About30mintrainingtime(oneGPU,40K-busnetwork)• NNModelInput(FirstLayerFeatures)

– GenP,V;SubstationP,Q;Zbetweensubstations (total8K+variables)– ThegoalisletAItoselectthrough trainingasetoflastlayerfeatures

(artificial)forpredictingCCT

• TheCurrentPractice– Asetofkeyfeatures(physical,suchasinterfaceflow)areselectedby

humanexperttomonitor thestability– Usephysicalfeaturesorartificiallastlayer featurestodetermine

thesecuritymargin?

i,j

Page 27: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

PotentialBenefit• Speed-upDSASystemResponseSpeed

– ForCCTprediction:50Ktimesfaster(40K-Bus,2msvs 100s)

• ProduceMoreIntuitiveResults– NNmodeltodigestlarge-scalesimulationoutcometocreatemoreintuitive

results– The“lookup”approachisveryclosetohumanoperatorexperience

• EnhancedDecisionSupport– NNmodelturns/reducesFirstLayer Features(P,Q,V)toLastLayerFeatures– UsetheLastLayer Featurestocomparethecurrentcasewithhistory

simulationcasestoidentify“similarcases”– Ifremedyactionsareneededforthecurrentcase,theycouldbefoundin

thesimilarhistorysimulationcases.

27

Page 28: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Agenda28

• Introduction• Open Platform for Applying Machine Learning• Power Grid Model Service• Research on Applying ML to Online DSA• ML Research Roadmap of CEPRI F

Page 29: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

CEPRIPowerSystemSimulationGroup

MLResearchRoadmap(1)• Newsupersimulationcenter(ChinaStateGrid)

– Massiveprocessingpower(750Blades,20Kcores)– Massivestorageroom(2.4PB,~2Mcases)– ProductionsupportforStateGriddispatchingcentersinChina

• Trainingdataset– Collectreal-worldsimulationcasesandresults– Basedonthehumanexperiencetogeneratemorescenariosbasedon

therecordedhistoryoperationcases– UsetotrainNN-modelsforthepredictiveanalysis

29

Page 30: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

CEPRIPowerSystemSimulationGroup

MLResearchRoadmap(2)• Simulationresultprocessing

– Thenewsimulationcenterwillgeneratemassivesimulationresult– Thehumanexpertsarenotcapabletoprocesstheresult– DigestmassivesimulationresultsusingNN-model– DiscoverknowledgetoguideChina’sUHVpowergridoperation

30

Page 31: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

Summary• AI,especiallyML,landscapehasbeenfundamentallychangedoverthelast5~10years– Thedevelopmentspeedisunprecedented– Manybreaking-throughsuccessfulstories

• Theenablingtechnologiesareaccessibletoeveryone– Powerfulcomputinghardware(CPU+GPU)– Newopensourcesoftwaretools

• Therighttimetorenew/restartresearchonapplicationofMLtopowergrid– Opencollaborationapproachisrecommended

31

Page 32: IEEE PES Technical Webinar Sponsored by IEEE PES Big Data …site.ieee.org/pes-bdaps/files/2017/11/IEEE-PES-Webinar... · 2017-11-26 · Application of Machine Learning to Power GridAnalysis

ThankYouQ&A

32