L2RPN Challenge
- Learning to Run a Power Network through AI
Di Shi
Team: Tu Lan, Jiajun Duan, Bei Zhang, Zhiwei Wang, Xiaohu Zhang, Ruisheng Diao, Yan Zan AI & System Analytics GEIRI North America (GEIRINA) @PSERC Summer Workshop July 16, 2019
L2RPN Challenge - Learning to Run a Power Network through AI Di Shi - - PowerPoint PPT Presentation
L2RPN Challenge - Learning to Run a Power Network through AI Di Shi Team: Tu Lan, Jiajun Duan, Bei Zhang, Zhiwei Wang, Xiaohu Zhang, Ruisheng Diao, Yan Zan AI & System Analytics GEIRI North America (GEIRINA) @PSERC Summer Workshop July
Team: Tu Lan, Jiajun Duan, Bei Zhang, Zhiwei Wang, Xiaohu Zhang, Ruisheng Diao, Yan Zan AI & System Analytics GEIRI North America (GEIRINA) @PSERC Summer Workshop July 16, 2019
Meaning of Different Terms: AI, ML, DL
2
Source: Nvidia
A process where a computer solves a task in a way that mimics human behavior. Generalized AI vs. Applied AI. A subset of ML and refers to artificial neural networks composed of many layers. A subset of AI and refers to algorithms that parse data, learn from them, and then apply what they’ve learnt to make intelligent decisions.
Credit: Nvidia
Milestones of AI Development
3
AlphaStar defeated top human players in Star Craft II
Source: https://www.pinterest.com/pin/786792997375069862/?lp=true
AI Categories and Applications
4
*Source: https://towardsdatascience.com/machine-learning-for-biginners-d247a9420dab
5
In Out error target
labeled data
Application
Classification Predict a target numeric value
Common Algorithms
unlabeled data
Application
Clustering Visualization Dimensionality reduction Anomaly detection
Common Algorithms
Analysis
Analysis
In Out In Out reward & state environment
Application
DeepMind’s AlphaGo Fire-extinguish robots Grid Mind
Common Algorithms
(TD) Q-Learning SARSA
many unlabeled & few labeled data
Application
Google Photos Webpage classification
Common Algorithms
unsupervised and supervised learning
In Out
6
Trend of AI in Power Grids
planning
Generation Transmission Distribution End user
Potential Applications
Monitoring Diagnosis Forecasting Reasoning/planning Decision making Autonomous control
GEIRINA’s R&D Focus!
7
8
Timeline for the Competition
May 15th, 2019: Beginning of the competition with the release of public RL environment. Participants can start submitting agent models
feedback in the leaderboard on validation scenarios. May 27th, 2019: Potential release of a new baseline to foster competition if several participants are already doing better than this baseline. June 15th, 2019: Start of the testing days on unseen test scenarios. June 19th, 2019: End of the competition, beginning of the post-competition process Jul 1rst, 2019: Announcement of the L2RPN Winners. Jul 14th, 2019: Beginning of IJCNN 2019.
This was later extended to Jun. 23rd, 2019
Why should we care?
the power grid
renewables
…
lines
Q: How to alleviate the burden through the topology control?
9
1 2 3 4 5 6 7 8 9 10 11 12 13 14
996.8 A 399.9 A 428.4 A 374.4 A 221 A 447.1 A 301.9 A 123 A 100 A 208.9 A 390.5 A 353.7 A 211.8 A 175.1 A 161.6 A 100 A 155.3 A 315.5 A 150 A 241 A
Slack Bus
System Summary
limits as indicated)
11
Optimization problem: Maximize the remaining power transfer capability over all time steps of all scenarios
Transfer Capability at a Time Step: Transfer Capability at a Scenario: Transfer Capability of All Scenarios: *Note: Game
certain constraint is violated * 1st day 2nd day nth day Scenario 1: 1st day 2nd day nth day Scenario 2: 1st day 2nd day nth day Scenario n:
1st day 2nd day nth day Scenario 1: 1st day 2nd day nth day Scenario 2: 1st day 2nd day nth day Scenario n:
Line Switching (20 lines) Node Splitting (156 for 14 nodes)
Bus1 Bus2 Bus1 Bus2 Bus1-2 Bus2 Bus1-1 Bus1-2 Bus2 Bus1-1 Bus1-2 Bus2 Bus1-1
e.g.
*Note: A Maximum of 1 action at the node + 1 action at a line per timestep is allowed
12
13
1st day 2nd day nth day Scenario 1: 1st day 2nd day nth day Scenario 2: 1st day 2nd day nth day Scenario n:
node can be reused, the violation on this will cause: 1) step score to be 0; 2) the action will not be taken, resulting in no action.
Scenario Consequence Time Steps to Recover Line Flow >= 150% Line immediately broken and disconnected 10 100% < Line Flow < 150% Wait for 2 more timestep to see whether the
3
14
1st day 2nd day nth day Scenario 1: 1st day 2nd day nth day Scenario 2: 1st day 2nd day nth day Scenario n:
Interval: Every 5 min!
2018-01-01 2018-01-02
15
Not considered in the competition, for future extension
16
solve the mixed-integer nonlinear dynamic optimization (AC power flow); 2) so many hard and soft constraints; 3) hard to mathematically model those dynamic constraints; 4) huge scale due to the consideration of long continuous timesteps
which will be further explained later
hundreds and thousands of timesteps
difficulty in training the agent.
17
Generalized model for network topology change
k
max
𝑙∈𝛻𝑙
𝜇𝑙
2 max
0, 1 ( ) ,
k k k k
k S k S
k
is constrained by
18
1 2 1 2
(1 ) (1 ), (1 ) (1 ),
i i i i V V i i i i
M z M z i M z V V M z i
,0 1 ,0 2 1 2 1 2
(1 ) , / , / (1 ) (1 ) , , (1 ) (1 ) , ,
g g n n n sl g g n n n sl P g P n n n sl P g P n n n sl Q g Q n n n Q g Q n n n
P z P n P z P n z M P z M n z M P z M n z M Q z M n z M Q z M n
1 2
(1 ) , ,
d d m m m d d m m m
P z P m P z P m
( ) ( ) ( ) 1 ( ) ( ) ( ) 2 ( ) ( ) ( ) 1 ( ) ( ) ( ) 2
(1 ) (1 ) , , (1 ) (1 ) , ,
i j l i j i j l k k k i j l i j i j l k k k i j l i j i j l k k k i j l i j i j l k k k
z M P z M k z M P z M k z M Q z M k z M Q z M k
( ) 1 ( ) 1 ( )
, , ,
l i j l k k k l i j l k k k i j k k
z M P z M k z M Q z M k z z k
Voltage magnitude and angle at two busbars in a substation A generator can be placed at either busbar of a substation A load can be placed at either busbar of a substation The end of a transmission line can be placed at either busbar of a substation
19
Active and reactive power at each end of a transmission line k The ‘real’ voltage magnitude and angle at each end of a transmission line The power flow on a transmission line considering transmission switching Constraints for apparent power on transmission line k
( ) ( ) ( ) 1 2 ( ) ( ) ( ) 1 2
, ,
i j i j i j k k k i j i j i j k k k
P P P k Q Q Q k
( ) ( ) ( ) ( ) 1 ( ) ( ) ( ) ( ) 2 ( ) ( ) ( ) ( ) 1 ( ) ( ) ( ) ( ) 2
, (1 ) (1 ) , , (1 ) (1 ) ,
i j V i j i j i j V k k k k i j V i j i j i j V k k k k i j i j i j i j k k k k i j i j i j i j k k k k
z M V V z M k z M V V z M k z M z M k z M z M k
2 2 2
(1 ) ( ) ( cos( ) sin( )) (1 ) , (1 ) ( ) ( ) ( sin( ) cos( ) ) (1 ) , (1 ) ( ) ( cos(
l i i j i j k k k k k k k k i j i l k k k k k l i i j i j k k k k k k k k k i j i l k k k k k l j j i j i k k k k k k k k
z M g V V V g b P z M k z M V b b V V g b Q z M k z M g V V V g
2
) sin( )) (1 ) , (1 ) ( ) ( ) ( sin( ) cos( ) ) (1 ) ,
j i j l k k k k k l j j i j i k k k k k k k k k j i j l k k k k k
b P z M k z M V b b V V g b Q z M k
2 2 2 2
( ) ( ) , ( ) ( ) ,
i i i k k k j j j k k k
S P Q k S P Q k , ,
i k k j k k
S S k S S k
20
Power balance at each busbar If the substation does not split, all the components within it should remain at the same busbar. Limits for the number of buses that can split and the number of lines that can be switched.
1 1 1 1 ( ) ( ) 1 1 1 1 ( ) ( ) 2 2 2 2 ( ) ( ) 2 2 2 2 ( ) ( )
0, 0, 0, 0,
i i i i i i i i
g d i i n m k k n m k f i k t i g d i i n m k k n m k f i k t i g d i i n m k k n m k f i k t i g d i i n m k k n m k f i k t i
P P P P i Q Q Q Q i P P P P i Q Q Q Q i
1, , 1, , 1, , ( ) ( )
i n i i m i i i k
z z i n z z i m z z i k f i t i (1 ) 1
i i
z
(1 ) 1
k
k k
z
nonlinear programming, which is difficult to solve using commercial solver.
dramatically increased due to the significant increase of the number of
competition.
21
1st Attempt Failed! (Curse of Dimention) 3 Different Ideas
22
Pros Cons
Method 1 (Imitation Learning) The pretrained Q-value distribution does reflect the action effectiveness. The action space is still too big even for the imitation learning. Method 2 (DDQN of substation act.) The reduced action space is enough to solve most of scenarios. The score is not high enough due to the limitation of action space, and the training time is quite long. Method 3 (PPO) All feasible action combinations are properly considered. The convergence is a problem due to the large action space.
23
24
25
26
27
28
29
DRL Value Learning rate 1e-4 / 1e-3 Gamma 0.99 Replace target per step 128 / 256 Replay memory size 256 / 512 / 1024 PER alpha 0.6 PER beta 0.4 Batch size 4 / 8 / 32 Imitation Learning Value Learning rate 1e-2 / 3e-2 Batch size 1 / 4 / 8 Episodes 1000 Advantage FC #neurons 64 / 128 / 256 Loss weight factor 0.5 / 0.7 / 0.9
timesteps (1 – month data) without any problem in the short competition period. For 3120 actions, the problem has different 31207000 trajectories for each scenario
30
31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Model Mean Score All Mean Score W/O Game Over Game Over Count Action_156_danger_92 73665.9579 83238.3705 23 Action_156_danger_93 71455.1479 83087.3818 28 Action_156_danger_95 79064.1378 82789.6731 9 Action_176_danger_92_95 66997.7893 83747.2367 40 Action_251_danger_90_95 74863.0436 84591.0097 23 Action_251_danger_93_95 77495.2039 84233.9173 16 Action_251_danger_95_95 76550.0887 84120.9766 18 Action_251_danger_90 74979.7389 83776.2445 21 Action_251_danger_92 76334.7795 83425.9886 17 Action_251_danger_93 76978.1452 83219.6165 15
32
33
Ranking 1st in both development phase and final phase Development Phase ! Final Phase !
35
36
Grid Sense: IoT+X Leveraging edge computing for enhanced system SA and control
System architecture: edge computing Edge device: smart outlet Cloud platform
GEIRINA Grid Eye: SA platform that has been running in the provincial/state- level system for the past 36 months
Situational awareness: alarming & data visualization Parameter/data calibration Oscillation detection and location Data exploration & stability tracking
GEIRINA Grid Mind: Data-driven autonomous grid dispatch and control platform with self-learning capability
DRL: deep learning + reinforcement learning Ability to handle faster grid dynamics Sub-second autonomous dispatch & control Self-learning with grid interaction capabilities
*For more information, please check: www.geirina.net/research/2