Spyros Chatzivasileiadis: Physics-Informed Graph Neural Networks for Power Systems
By DTU: Lectures on Power & Energy Systems
Summary
## Key takeaways - **Trustworthy AI Essential for Power Systems**: AI tools in power systems must be trustworthy because black-box models cannot be relied upon for safety-critical operations where blackouts can cause lives lost and millions in economic damage, as seen in the recent Spain and Portugal blackout. Statistics like 98% accuracy are insufficient; methods should ensure interpretability, verifiability, and safety by design, such as projecting actions into feasible space to avoid constraint violations. [04:28], [05:07] - **Physics-Informed Networks Speed Simulations**: Physics-informed neural networks accelerate numerical tools in scientific computing by 10 to 1000 times by replacing iterative numerical methods with fast matrix multiplications after training, incorporating physics equations into the loss function to train without large databases. A mix of data and equations is needed for good performance, allowing simulations on laptops post-training. [09:25], [10:04] - **Wind Farm Dynamics Accelerated 25-100x**: Collaborating with Ørsted, physics-informed neural networks replaced wind farm models to determine regions of attraction, evaluating 5 million points in 90 minutes training plus 30 minutes evaluation, versus two days on a high-performance cluster for conventional simulators. This proof-of-concept for controller tuning in the design phase shows neural networks can handle large-scale dynamic simulations far faster. [13:26], [15:02] - **Graph Networks Handle Exponential Contingencies**: For the 118-bus system with 178 lines, n-minus-3 contingencies number nearly 800,000, exploding to 700 billion scenarios yearly with varying generation and demand; graph neural networks, trained only on base case and n-minus-1, infer higher-order contingencies by capturing topology changes. This enables screening billions of scenarios to identify critical ones for detailed analysis, addressing the intractable search space. [21:26], [23:00] - **GNNs Outperform DC Power Flow in Screening**: Physics-informed graph neural networks and guided dropout, trained on n-minus-1, achieve 35% recall for detecting line overload violations in n-minus-3 contingencies on larger systems, surpassing DC power flow's near-zero performance while being 100-400 times faster in execution. Overall, including training, they are 10 times faster than AC power flow for up to 500,000 scenarios, ideal for rapid contingency screening. [40:51], [46:02]
Topics Covered
- Why trust black-box AI for safety-critical power grids?
- Neural networks accelerate simulations 100 times faster?
- Physics-informed networks need no real data?
- Graph networks infer n-minus-3 from n-minus-1?
- AI screens 700 billion scenarios in minutes?
Full Transcript
So today we're going to talk about um um graph neural networks for power systems. Uh to be uh completely honest I will have some slides before that a bit more about or more general about the applications of AI in power systems uh and some ideas uh and then I'm going to talk a bit about physics informed neural networks and then I'm going to talk about physics informed graphical networks.
Okay, that's how I'm going to do that.
And I have 45 minutes.
Uh and you're welcome to uh interrupt me whenever uh you'd like to.
Um okay, so let's start.
Yeah. Uh first some acknowledgements really.
I mean this work that I'm going to present of course is not uh uh not every person here has uh been part of the work I will present but uh without uh this contribution or their contribution I couldn't have been here.
So many thanks to everybody and many thanks also to our funding agencies.
So the European Commission also the European Council because what I'm going I'm going to talk about today is actually funded by the ERC.
Um this is not working.
Yeah. So what I'm going to talk about is uh a bit about trustworth AI or some some thoughts about it uh and then about as I said physics in for neural networks just a couple of slides and then I'm going to focus on this graph uh and neural networks.
So I don't know if you have realized or if you have thought about it but AI and energy at the moment are two of the sectors that have been identified with the highest growth potential.
Okay. So, working as I think most of you do at the intersection of these two uh is is something that you will see a lot of development interest in the coming years.
Okay.
Um for some reason this is not just give me a moment to change clickers.
Great. So I mean Mariam already presented uh a different application of AI.
There a lot of speakers that uh um present application of AI.
There is already there are already applications or let's say tools AI tools that offer value to the to power systems and power system operation.
Okay. And this studied already from the 90s. uh we had the the short-term load forecasting from EPRI that was actually adopted by several utilities.
Uh we had also the work of Lee Venkel with decision trees for part security assessment.
This also found applications in utilities. So these were the the first efforts and 30 years later to be honest there's not too much but there is uh quite some especially over the last years as you can see it's a lot about forecasting so also weather forecasting predictive maintenance uh energy trading um and now we're moving into new types of AI tools right uh so we have chat GPT we have generative AI uh we have uh actually tools that We don't even know what they can do for us and that's an open interest topic. So far we have seen real applications of generative AI into actually reading large documents like manuals and then uh utilities send their technicians out in the field and they no longer need to have uh let's say to know the manual, right?
They get a step-by-step instruction on how to maintain or how to fix a component that is that that's faulty.
At the same time this to be honest becomes a bit scary and that's why I have this screenshot is actually uh from or Twitter.
So there is this question uh that uh uh some that some alpan got from somebody how much open AAI uh how much money have they spent on electricity just for replying thanks and please right uh and then some ad replies that millions of dollars but it's well spent because you never know it's a joke but is it?
Yes.
So would you able to trust AI to run your electricity network when millions actually first of all if something goes wrong lives can be at risk we had now the blackout uh in in Spain and Portugal and we're talking about not also no not some lives were lost and also millions of euros of economic damage So you will not trust or you will not let something run your system or even part of your system without knowing that it will not lead to such of an unacceptable behavior.
Right? So what we need is trustworth AI and that's uh one of let's say if you want the main one of the takeaways I want you to have from this uh talk is um uh the yeah that if in the methods that we develop to think about trustworthiness so here's let's say the barriers uh for power systems and why AI has not found as much of an application yet in power systems okay it's coming but it's not yet there and the thing is that a lot of AI tools are considered a black box.
So why would we trust a black box to run our system? Right?
Um when we test our methods, so we developed my to an AI tool. We we uh test its performance before we deploy it.
And what is the performance metric?
It's usually statistical.
It's accuracy for example, right? So I get a bunch of data points and I pass them through my tool and I measure okay what kind what error do I get? It's like 1% error.
Am I 98% accurate? I'm a 99. Am I a 95?
And then assuming that this data representative of my real situation when I deploy the neural network, then I I I tell uh my client, please go ahead uh deploy it. You're going to be 98% of the time you're going to be safe. Right?
So statistics however are not enough when you're talking about safety safety critical operations.
Statistics are good when you do forecasting because then there there's no better option.
It's such a complex problem.
So in forecasting you actually need uh to uh to have some tool and then you can be as as accurate.
You can never be anyway 100% accurate.
That's one one for example um um option at the same time.
And then this is something that you will also listen if you have not already uh uh heard.
I mean we have spent decades developing models decades.
It's millions of person hours developing good models in order to simulate the power system and be able to predict or anticipate blackouts.
So why would we do away with all these models and just go to some directly datadriven right and that's where it comes that uh then we're talking about trustworth AI and we're also talking about physics informal networks and also a number of people here have talked about physics informal networks and I'm happy to see that there is um this interest or let's say uh this kind of movement towards uh how to best take advantage uh of both the physics and the data, right? Because that's the goal at the end of the day to take advantage of what we have to to produce something better.
Okay? So when you design uh an NIA method, please consider interpretability.
So how can I explain the decision that my AI tool uh takes or makes?
Right? You can also consider verifying your neural network if this is like for a control of a statical application.
You can consider physics in formula networks and you can also consider as we also see it in reinforcement learning now also the winning algorithm of the RT um competition learn to run a power network that is an RL algorithm it is actually safe if you want by design.
So it predicts or estimates an action and then it projects that into the physible space.
So making sure that the constraints are not violated. So you can also add something like that. Okay.
But think about how you can also ensure safety if if your tool uh runs a risk of actually violating safety critical constraints.
Okay, so that's the first part.
Now I'm going to spend a couple of slides on physics informal networks.
I'm not going to have any equations but I'm going to have some motivation.
Okay, physics informal networks can be used for many um um applications. What we are looking at is actually in the family of scientific computing.
So how can I uh accelerate existing numerical tools by 10, 100, a thousand times?
Okay, I'm not talking of a delta improvement of let's say uh 50% faster or even two times faster. For that, we can use our conventional tools and uh maybe maybe we can achieve something like that.
If we really want to change mindset, change the type of tools we're using, we must aim at at least 10 times faster or I don't know, that's my my take.
It can be five times faster, but something that's not an improvement of 10 20%.
Okay? Otherwise also the vendors will never accept something like that or the utilities. Yeah. So u why can neural networks have you thought about that?
Why can neural networks be faster than conventional methods?
Let me go back.
Have you thought about that?
What do you think?
What about the type of operations?
Uh models are typically numerical.
You need some numerical methods iterative to arrive to something physible neural networks.
Once I train this matrix multiplications, vector multiplications very good algebra that's exactly the so because most of our problems are nonlinear uh and then we require numerical methods that are iterative right and what neural networks do is that once we train them as you said exactly then it's a matric multiplication and that's why it's very fast okay so the idea is to replace if you want this kind of iterative numerical methods with something that's very past in real time but I have spent time training it right so in a way I'm actually offsetting or let's say uh offsetting the the the time towards uh uh a period that maybe is not uh time critical in order to be much faster when I really need the tool.
So uh and then what is the benefit of physics informal networks over the standard neural networks? Some of you might have thought about it, some uh some may not. But the idea is that I include the physics inside the neural network training.
So instead of actually minimizing a loss function that is let's say minimize the error between data points label data points versus uh what the estimate of a neural network is I minimize the error between the output of the neural network and an equation.
And if I do that I don't need to generate databases. I don't need to generate data.
I train the neural network just by fitting it into a model.
That's that's more or less what I do.
Okay. In order for this to work well, we have found that only the equations it doesn't works well.
So we need a mix of data and equations to achieve a good performance. Okay.
This data can also be generated by simulations if we don't have real data.
Good. Now the plan is or what the goal as I said is to be 10 times 100 times thousand five times faster depending on the applications. Okay.
And it's already finding quite some uh uh let's say traction in the computational uh physics uh and computational free dynamics and others.
So in the next two slides I'm going to present you an example how have applied physics informal networks in partial dynamics and then we're going into uh the graph neural networks. So two three slides.
Yeah. So what we did here is we work with URED. URED is the largest offshore wind developer uh in the world and it's actually it's headquarters a few kilometers away from here.
So what they do is they need to perform a lot of dynamic simulations to tune their controllers for the wind farms. So before actually they build or let's say they uh deliver a wind farm, they need to perform a lot of simulations in the design phase to design their controllers to make sure that it does not create problems for the grid. Right?
So they are looking into how to accelerate this design phase and then we work with them in actually replacing a wind farm uh uh model with uh a physical for neural network and what we're trying to um determine is the region of attraction.
So imagine you have a controller.
This is a phase loop loop. You don't need to care about what exactly is this controller.
So you have a controller and I want to understand if I excite my system.
So if I start from an non let's say a initial point that is not in equilibrium if this is going to converge to a stable point right so how far can I go the better the controller is the further away can go and I can still converge back to a to a stable point okay so I'm checking that iteratively uh so you can imagine how many simulations this is so this is now results for a region of attraction for different set points of a controller uh for uh 250,000 points, right? And the only way we can check if this works or not is by inspection.
So we have our conventional simulation or conventional simulator and our physics informed neural network.
And we can see that actually it works pretty well.
So after that we went to 5 million points.
Okay. And we couldn't do that with our convention simulator.
It would have taken about two days in a high performance computing cluster.
And we were able to do that with this neural networks.
90 minutes for the training, 30 minutes for the evaluation.
So it can be 25 to 100 times faster.
And that's just uh let's say it's a proof of concept if you want.
It requires a lot of work still from all of us to arrive at something that can be actually usable uh um or deployed at in large scale at the industry.
An added benefit if you want to think about it is that once trained a physics formial network can run on a laptop.
It's a matrix multiplication.
Okay. But of course the training the training uh is computationally intensive.
Good. Now we have trained this is a single let's say wind farm connected to the grid. The grid is represented by one bus. So it's actually a small system. What do we do when we have larger systems?
you have ideas.
So our first idea was to take a neural network and uh simulate the whole system and that didn't work very well.
First of all, it doesn't scale very well.
So we managed to go up to 57 buses or maybe even a bit more but it will not go to thousand buses and every time the topology changes and that's one of the main motivations also for the graph neural networks we we will discuss uh right after is that every time the topology changes the neural network has to be retrained.
So that that's not viable.
So the idea we're working at the moment is what we call um in short for us pinsim and it's actually a modular way to create a new simulator. Okay. So what we do is we uh create a different neural network for every component and now we're working on actually creating a solver that will bring these neural networks together and solve solve them together. Right?
So instead of having a library of conventional models, we can have a library of neural networks. If we have this solver like I don't know have used how many of you have used power factory I'm not too sure uh or any of these commercial solvers we have now a different solution algorithm that brings inter interfaces all neural networks together and gets the trajectory out the dynamic uh uh trajectory out.
So this is a way to deal with problems like topology that uh cannot be learned by conventional neural networks.
That's about dynamics.
That's about physics for neural networks.
What we're going to discuss now is again a little bit of physics for networks.
Is again about how we address topology but for steady state power flow.
Okay. The idea is that uh I want to create a method with both both of what I have said so far.
So both the graph neural networks but also the the pins. I want to create methods for two reasons. First I want to be much faster. So then I can actually generate or let's say simulate a lot a lot of scenarios in much shorter time.
But then I can also create proxies if I can have an an a reliable model let's say of my network that can um capture topology then I can put that in optimization problem and I can capture a minus1 minus 10 minus k okay faster than all these nonlinear equations that uh I need to uh involve same with pins the pin so the previous uh case for example it captures differential equations there's no efficient way to have differential equations inside an optimization problem or a multiple different optimization problem so maybe pins can can act as a proxy there these are just ideas we haven't tried that um but there is potential okay so this is work with Agnes Agnes used to be uh with us as a postto and now she has moved to Imperial College this is the first time I actually talk about this work uh It's a preprint.
You you can find it uh also on that link if you want.
Okay. So what is the goal?
The goal is to train a graph neural network to estimate voltages and line flows of n minus k contingencies.
Okay. And there are papers about this.
Um, our goal with this work is first of all use the DNN not necessarily as the most accurate estimator but rather as a screening tool.
What I want to do, I want to screen millions or billions of scenarios, pick the most critical ones or find what are the most critical ones and then run uh normal power flows or whatever I need to run on those.
Okay, so I need a very fast screening tool.
That's number one. Number two is because there are also works like this.
I I don't want to train on n minus 2, n minus 3 and minus k. I want to train only on the base case and n minus one and then the graph neural network should infer the rest. So I want to see how how possible it is to train only on a limited set of continuences that is actually tractable.
Nman one is tractable.
That's why you also have still n minus one security criterion and then let the graph neural network infer what happens in n minus 3. Okay, that's a goal.
And why DNN exactly?
Because it captures topology. So let me give you an example.
So these are now the four systems that we have used for this work.
Six bus, 24 bus, 57 bus, 118 bus.
The 118 bus I guess some of you have already worked with that has 178 lines.
How many n minus one contingencies?
178 in terms of address lines.
Let's focus on only lines here.
Okay.
Or branches. How much n minus 3 contingencies?
Almost 800,000.
Okay.
It grows exponentially. Now 800,000 contingencies for a single demand and generation scenario.
Now over a year we don't have a single demand generation scenario.
Of course we can have some critical ones and then I just may make a thought exercise.
It's not necessary that this should be like that. But let's suppose that I have 19 generators and I just assume a high and a low generating scenario for each of those.
Right? How many combinations do I have?
Two to the 19.
And then what I say is again that's out of my head right I I assume that's a single load profile. I assume that that the load over the day may be very uniform in that region uh of the world in that grid. So let's assume that I have only a high and a low demand scenario.
And if I combine that then I have 2 to the 20. 2 to the 20 is one million scenarios generation demand scenarios times 700 or 800,000 contingencies.
We're talking about 700 billion scenarios.
Okay, so I need normally if I want to check for everything and let's assume we want to do that. I need to check for 700 billion n minus3 contingencies.
Okay, with AC powerflow and the question we ask is can graph neural networks do that faster?
Okay, that's the whole point by training only on the n minus one. Ah, this doesn't work.
by training only on n minus one.
So can they infer what happens in the rest?
Good. Any questions so far?
Because that that's the how we set the problem.
Is that clear?
You have question?
Yeah, you have to unmute. Sorry, I forgot that.
Okay. No.
Uh my question is why we need to secure uh against contingency n minus 3 because if we u we screen the system for n minus one and it's uh secure we don't need to consider n minus 3 the probability of happening n minus 3 is completely negligible even n minus one doesn't happen a lot I agree that the probability of n minus 3 is much lower than n minus2 uh however you see Um the blackout we have is actually because we have already secured the system for n minus one.
The blackouts that appear are because they're going beyond n minus one, n minus 2, n minus 3. Having a more complex system, it's more probable that maybe two components fail.
So there is a actually a trend to actually consider maybe more contingencies.
And the way to do that is also probabilistic.
Maybe you don't need to consider all n minus one, all nus2, all n minus three. You can h think about risk.
This is another way to do that.
But then you need to consider some high higher risk in minus two and higher risk in minus three.
Okay. Very good.
So what I'm going to do here uh we uh work with four different um neural networks right two of them were the guided dropout based on the guided dropout and I'm going to briefly explain what guided dropout is and the other two were based on this edge varying graph neural network okay and now for each of these families and I'm going to also have a slide about that for each of those families we explored if physics or physics formed helps or not uh in a better inference of the neural networks.
So I'm going to present in four uh different models.
I'm going to compare them and then I'm going to compare their performance with DC power flow because this is let's say when you go beyond minus one and you consider let's say cascading uh this is what you uh are are going to to use DC power flow because it's more computationally uh feasible.
And then I'm also going to assess their performance in terms of time. Okay.
So three things. Let's talk about guide dropout.
This is actually uh uh an idea that uh came by uh um and and others uh of how to encode topology partial topology into a neural network.
Okay. So what they do, what did they do?
They they took a neural network.
In the input they have um the busar injection um and then they have a bunch of neurons but then they have some conditional neurons that are always off but if a line is out then I turn this neuron on right so I I activate the neuron.
So by learning the base case and what happens if I take a line out then I actually have maybe one or two or more neurons for us to work with two actually.
So two neurons per line outs if you want or per line switch in and out. Um this can encode how the how the flows change.
Okay. Okay. So base case no neuron in I I take a line out and then the first neuron uh is uh is here activated and then I learn so the weights here that are that are learned are linked with this topology.
So this actually neuron here captures the change the topology the change in the flows.
Okay, that's an example with one.
As I said, we have used two uh here.
Then another line is out.
Then I um I I learn the change topology or the change flows based on topology uh through this change in my neural network.
Okay. So I adapt my neural network or the topology of my neural network to capture the different topologies in the power system.
It's actually to be honest a smart idea and it has shown to actually uh that the principle of superposition kind of works.
So the idea is that then I can have both neurons out or both neurons in and I can capture the topology of n minus two. So two lines out.
Okay. So what do we do here?
We train for this. So the base case and then we train the weights with a sing so a single line out every time.
So we train for L minus one but then I test for n minus 2 and n minus 3.
So my testing set has actually all the uh this kind of combinations of neurons and see how that works. Okay, that's the guy drop out.
Questions? Good. Now a slide about graph neural networks.
Um so this works a bit different because now um the neurons are connected in the same way that the topology of the grid is right.
So we have weights where we have also uh branches if you want. Now the cool thing is actually how you um capture the dependency uh between the different nodes and then you can have several layers. So this is what we call here hops. So here in this first case this uh this captures let's say the the the change uh in this if you want whatever voltage will be dependent only on the neighboring buses.
So that's uh the first hope, right? But then you might realize that you know what no I'm also dependent on on on two two buses uh away.
So maybe I need to capture also two bus away or maybe three buss away.
Right? So it gets quite complicated but the graphual network can theoretically capture um um interdependencies between nodes or across nodes that are a bit further away.
Okay, it's a designed criterium how far you want to go questions with that.
Okay, but then if I capture the graph right of the topology of my system in a graph neural network, then I know if I have a line out, I know which actually um edge I have to deactivate.
Is that clear?
It's more straightforward I think than the guide dropout in that sense. Good.
Now and besides these two families, we also considered adding or not adding the physics.
So besides actually training on data, we also added the power flow equations here.
So an additional loss term um where we also try to minimize the deviation of the neural network output from the power flow equations.
So we also test for that.
Okay.
So in here now are the first results.
So we have the the first we compare if physics make a yeah a question is it maybe you need to unmute.
Yeah. Yes. Yes. A question on the previous slide. When you say that you insert the power flow equations which power flow equations does it need to be linear? Can it be the AC?
We have the AC power flow equations. So the the the exact ones they can also be we have not tried the linear ones but we want to be as exact as possible to have this loss as close to the I don't know if you want to call it reality but as close to that model as possible. So it's the nonlinear ones.
Okay. It could be interesting to see if the linear ones could also do an equally Yeah.
how they perform. Yeah.
Okay. So these are results now.
Um what you see here it's a bit busy but I'm going to guide you through it.
Uh so this this this column here is guided dropout this family with and without pins with without and physics informed term and this is graph neural network.
Okay. And what I want you maybe to focus is on the mean. So what I what we plot here is the mean absolute voltage error.
So this is the mean error of the voltage the bus voltage at the output of the neural network in per unit right.
uh there are different uh axis um limits here just in order to to improve the visualization but what I want you to focus is on the mean absolute error uh for the voltage for the bus voltage in every case and you can see that it's quite consistent that in the graph neural networks the physics informed graph neural network performs better than without the physics but in the guided dropout the um the one without the physics performs better so a lower error than the one with the physics.
Okay. Why? We are not sure yet.
It's up for um exploration, right?
But what we did after that is that then we focused only on two of the four.
So we focused only the gadget dropout without uh physics and on the graphical network with physics.
Okay. So the rest of the results will focus only on these two to make it also a bit easier to compare.
Clear so far.
Good. Now the next uh analysis we we did uh is uh on regression. So we use a neural network to estimate numerical values.
We estimate the output in terms of bus voltages but also line flows.
Right? So I'm only going to present here the line flows. the voltage results are actually better but I prefer this uh because then I can also connect that with a DC power flow that one. Okay.
So here are the results for the n minus one.
So remember that we trained on n0 n minus one.
So this is really what has been trained for and you can see that for example for the small system this works actually h sorry I haven't explained what you're seeing right so guy drop out and graph neural networks first of all the two columns that we compare uh and what I have here is the actual line flow or line loading uh in in per unit so this is from this would go from zero to one the line loading Um and then this is the predicted one.
Okay. So maybe not it's per unit the line loading per unit is not go from zero to one necessarily and this is the predict one.
So so the the good performance is if you are exactly on the x= y line. Okay. So then it's one to one.
The the predict is equal to the actual.
That's what I want.
I want actually a performance like this one.
This is perfect.
This is also good enough.
Okay, you can see that the graph neural networks perform a little better, right?
So, they do perform a little bit better.
Um, but it's it's okay.
I mean, they could also get better than that.
Yeah. Now, let's go to the interesting stuff, though.
Uh, n minus n minus 3.
Okay. And this is now the results on nus n minus 3. haven't tested I haven't trained for that. So obviously the performance is getting worse than what I have trained for but something like that. So for the fit seven bus this actually a pretty good uh inference right as I said what I want this model for is to screen.
So I want to screen millions or billions of scenarios and then just keep the most relevant ones to to analyze them further.
Okay. So this is the performance we get.
Is there improvement potential?
Absolutely. How? Maybe it's up to you.
I don't know. We we need to It's an open open topic.
Yeah. There's a lot of things one can uh uh adjust, change, optimize to to improve that. Okay. Yes.
Uh one thing that I noticed is that uh sorry the 57 bus performance is better than the 24 bus actually for all of the and do you know why like uh why is that happening?
It's the characteristics of the network.
I cannot tell exactly why but is the probably the topology or the same.
Yeah. Okay.
Yeah. Maybe this also reminds me one more point because we actually tested that over up to 500,000 uh points but this test data points that we picked randomly right. So if we pick different test database maybe we'll see different things.
So this is also something that one has to keep in mind.
You have a question? Yeah.
Yeah, I'm I'm just curious if you because you you're using this to identify certain NM tree cases for instance, right?
But did you identify like false positive and false negative alarm?
Did you investigate that?
I'm curious to Yeah, that's my next slide.
Okay, other questions.
Great. So since Lisio asked uh uh what we did with force positive and force negative. So exactly this is the question we asked since we're doing screening maybe we're are more interested not in the actual numerical values but how often uh we can identify critical contingencies or let's say over line overloadings and that's why now I saw this and not the voltage because I want to compare that to DC power flow.
So indeed that's what we did.
Uh so here is again for the n minus one.
uh here I do classification okay again the same columns we have uh the uh no no it's different sorry so we have the the two different classes if a line is congested so there's like say a violation we go beyond the limit or if uh it's it's a normal operation okay the metric I use is called rec recall I guess some of you are familiar with recall it's the so-called true positive rate what it measures is how many true positives I have out of the total positives in the class so out of the total class that I have here that is let's say normal operation or uncongestent lines how many of them was my network able to determine a good value is 100%. A really bad value is zero.
Okay. Yeah. Obviously, if the class is small, right, if I don't have so many congestions or line line limit violations, then it's more challenging for my neural network or any tool to determine uh uh these violations, right?
So, the best for these classification problems is to have a balanced classes.
That's when it works best.
Good. So what do we see here that's n minus one again we have trained for that uh we see of obviously the uncongested case is quite large or the the class so the and we see actually that probably so this is DC power flow the green is DC power flow uh this is guided dropout the blue and the the orange one is the graph neural network right uh and we compare we our ground truth is the AC power flow that's why you don't see it here so the AC power flow is the two values and here is the comparison between the three. Uh and you can see that I would say that they do a pretty decent job most of them but for the violations they do a pretty lousy job.
Okay, DC power flow included to be honest uh the graph neural networks and the guide dropout are better than the DC power flow that is actually the benchmark uh that's also used I think or has been used extensively.
Okay, now let's go and see the n minus 2 n minus 3 only.
I just keep n minus 2 for for I don't know time efficiency if you want.
I mean all these results are in this manuscript if you want to uh go and get a a better look also for voltage not not just for line flows. So here is n minus 3 again we haven't tested for that um what we see is um again pretty okay for the base case but what is interesting for us is the violations and then DC power flow is really zero so they don't really it's not able to to get the the critical uh line flows and then uh there are different uh performances in different systems for the guide dropout in graph neural network but they still for the larger systems they're about 35%.
Right?
So why do you think or how would you improve the performance?
Now somebody comes to you with this problem. What do you do?
You can just come up with anything, right?
Make what bigger. So the one option is to make it bigger. Make what bigger?
Network. The network. Yeah. True.
Make it bigger. Yeah. Training data.
Training data. Yeah, very good. So what what about the training data?
Then you try with more cases.
So more cases, different flows.
Yes, that that's an option. Yeah.
Others using network.
If you use a real network, talk to RT.
Yes. Oh, if it's from France. Yes.
They need to solve this problem.
the operators are actually doing this and they know certain things. Yes.
Very good. So all these are good ideas.
Um what we think uh needs improvement uh is data.
Of course all the others can also I mean probably also a bigger network or a different I don't know somehow the physics but what we think is database is important. We need to have balanced classes.
uh and it's a a a huge search space, right?
If you think about the number of scenarios even for the 178 n minus one times a million, we're talking about 178 million possibility, right?
Um so how do you actually pick this kind of I don't know 50 or 100,000 data points uh that can help you or or 500 that we have here. So 500,000.
So that's why we think that data is important and this is an open research topic as well. Uh we need if we want to do good AI then we need to actually have good data.
Real data is one option but real data is not always available.
So creating database or finding efficient uh uh ways to generate efficiently databases with informationrich content is a challenge in its own scientific challenge. Right?
So we have tried to do some things and this is just a plug here if you want.
We just came up Bastian is also here in the room.
Uh he has an open source toolbox that you're welcome to use. It also does n minus k n minus one sorry um and and small signability.
Good. Now let's go to the to the original question.
So which method do you think is the fastest?
options. So the options are the following.
Um we have DC power flow, we have AC power flow, we have the guided dropout method and the physics informed graph new network DC power flow. We're good.
So we have one vote for DC power flow.
I'm finishing five minutes. Okay.
include both training and that's I left it open on purpose right so let's see how it's only execution and then I have also the results with the training right so these are the results for the four different test systems just for execution so I have already trained and I only evaluate okay this is logarithmic axis what does this mean this means that the bar here so the lower part of this bar is not represent it's proportional to this one. Right?
Here is a lot more time condensed than here.
Good. So then the neural network methods can actually be 100 to 400 times faster when we only talk about execution.
100 to 400 times faster means that if I want to run a thousand 100,000 scenarios, I can run them in 1.5 minutes with a neural network, but I need five hours with AC powerflow. Okay, so it's big.
And now imagine if you want to do millions, right?
So the speed is there.
Of course we need to improve the performance and also if this if this is let's say faster then you can also plug it in optimization problem and then maybe improve the performance there in terms of of time or convergence. Okay.
So this works well. Uh there is no real difference between uh guide dropout and graph network.
You can see that they are more or less uh similar. What was also interesting for us is we didn't see big difference between DC power flow and AC.
So our hypothesis there is that AC or the the solution methods for this kind of quadratic problems has improved so much that uh we don't see at least a difference in in in our uh tests.
Yeah. Now what we've included training time, right? And this is my last uh result. So this is what uh how things it's a busy slide. I will guide you through it.
Again for different systems again the same u uh cases. Here we have DC power flow AC power flow guide dropout and the graph neural network DC AC guide dropout graph.
Um that's one. Yeah.
So let's focus on this first. So you can see that then uh okay and what I what I plot in these two bars that is for the neural networks is how much time it took me the data set generation because this is also part of the training the data set generation and the training and the execution okay so I have data set generation training and testing that's what I have so you can see that let's say for the 24 bus data set generation training and and and testing is already 10 times faster than running uh DNA power flow.
So that's that's good actually.
Uh but for the larger systems we see that the trade-off at least in this test is about 500,000 points. So if I want to go over 500,000 scenarios then uh it might make sense to go into a neural network solution.
there's an asterisk or a footnote assuming that I am satisfied with the performance right and I can tell you that probably you will be satisfied with the performance against the DC power flow but the the the real benchmark is the AC power flow okay good h now an interesting uh maybe comparison as a last point is uh the difference between the guide dropout and uh graphinal networks because this is physics informed so I need less data and this is only based on data.
So what happens here? It's interesting to see.
I guess some of you might have seen that already.
In the guide dropout, it's only databased.
I have I spend more time generating my database. I need need more data.
But then my training time is faster.
But in the physics informed, I need less data. So less time in uh in generating data.
Again, this is logarithmic.
So this is not the same as here, right?
So it's exponentially more.
H but then the training is exponentially more.
So there's a trade-off there that one has to uh consider.
Good. Last slide conclusions.
Um yeah, first of all, if we do AI applications for uh power systems, as long as this is safety critical, then we need to be somehow trustworthy.
So I hope that you will remember that.
And then we talked about graph aware neural networks.
So guide dropout and graph neural networks.
What we try to do is we tried to find ways to accelerate uh a a huge uh so a problem that's actually exponential uh how to do n minus 2 and n minus 3 and we found that it can be 100 to uh 400 times faster um but of course we also uh need to look into the performance and how to to to improve that.
Okay, any questions?
Yes, Nick, let me Did you also try to include maybe just a few n minus one cases into the training to see how much better it would get just like with small number of them?
We have all the n minus one. You mean n minus two or oh sorry n minus2 if you included couple of them we want to avoid that by design because the moment I open the door to n minus2 then I don't know where to stop because but I I want to create a tool that can infer from n minus one the rest of the topologies. Mhm.
So that's why so maybe just like I don't know 0.1% of possible combinations would already increase could be yes this this could be something uh I I find it an equally at least from a research point of view uh interesting challenge to have no n minus 2 and see what you can do with all the data that on the n minus one.
So how more can we improve this? But yes, it's definitely point.
Yeah.
Uh thank you very much for the great presentation.
So uh anyway, this is exactly the information I was looking for from the summer school. So 2 3 months ago at air grid, we started to uh exactly try to solve this problem because the DC and AC power flow could take weeks to run for each hour for 50 contingencies for the whole year.
Um uh so we actually work for the long-term planning and may I ask what what happens or how do I solve or how do I think about when I have to add a node or multiple nodes or lines uh to my let's say model.
Uh how do you think uh we should be thinking about that?
It's a cool question that I haven't thought about to be honest.
Um that's a very nice question.
I so first I will start by not by saying I don't know but I can start let's say thinking about that um and here are some pointers I think then what one should do is add a one more uh neuron right so I need to add a line so I add one more neuron the thing is and that's the challenge that needs to be solved is that if you add a line then you know more or less the the reactance of the line.
So you know maybe the length or you know the characteristics of the line right?
And you don't know that from the weights.
Okay. So here's what I would do.
I would go to the to the full-blown system.
So what the maximum of number of lines that you can add and I will I'll create that system and I will train on that with n minus one. So taking a line out.
So, and then work backwards to the system I am now. And that's how you can optimize and see which lines makes most sense to add. Does that make sense? Yes.
Yeah. Yeah.
Thank you very much. uh do I understand that uh given the number of bosses you have uh when you are creating the neuron network you have to create the number of neurons to be equivalent to the number of bosses you have correct what I didn't discuss is that there's also a layer in the front and at the end that's fully connected layers so there's more neurons than just the nodes but indeed you did need at least as many neurons as the nodes really okay so uh so my again it's similar to the question I asked uh I forgot her name the professor from yesterday about uh applying um optimization uh to uh to AC power flow and the question about uh given the more the bosses you have and the more contingency you go to m minus k the combination explodes.
Yeah.
And the question is uh have you considered the model reduction uh to to kind of like of course try to scale down the system to smaller nodes uh or smaller bosses that have equivalent representation of the bigger assuming that you have a thousand nodes and then you are trying to reduce these nodes to say 50 nodes that should give equivalent electrical characteristics and this gives you uh few fewer combination of n minus one that in theory could uh simulate um similar consequences.
Yeah. And I'm wondering if you think about exploring this such that in this scenario of reduce node combination, you could potentially uh uh run n minus2, train your model in n minus2 or your graph neuronet network in n minus2 but with less combination. Got it. Yeah.
Yeah. True. That's a actually that's a very valid approach especially with conventional methods.
That's exactly what people try to do and focus only on the lines that are that are relevant right so interconnections maybe that that are important.
Our goal here is actually to replace this computationally intensive uh method with a graphical network that is 100 or 400 times faster but keeping the full detail. So that is the first step.
If we manage that then of course one could actually create an equivalent with a reduced order model but it's the same exercise as what we do here.
For me it's more interesting to keep as much of the detail as possible but make it orders of magnitude faster.
Yeah there is first thanks.
Uh I was just wondering whether it kiten makes sense to use the neural network as a warm start for then making like subsequent uh like uh AC load flow.
Uh you could it's interesting to see actually how much uh indeed it's interesting to see how much you can save in computation time. Yes.
[Music] Um what I I would also add to that is maybe you can include the neural network to an optimization and use that as a first uh way to see which um yeah um what is the solution of the optimization with that and then try to to to check for different scenarios.
So use the optimizer to search maybe best topologies or worst case topologies based on the graph neural network and then simulate them and see what is the the worst case really does make sense in the AC power flow that's a good point it's good good to to explore that I don't know thank you very much um I was also super surprised and impressed to see that it's actually better than DC power flow u but also that the performance depends a bit on the topology as you mentioned on the characteristics whether it's more radial or more mesh the network and I was wondering if there's a simple way to improve the performance by differentiating the characteristics of the network for example I don't know for example using the weighted degree of the network to see before if the network is super meshed or super radial and then instead of a one size or one model fits all solution have like for this degree distribution take this trained network for this degree distribution take this and then you have a maybe a much better performance already yeah that's a great point I completely agree so it's how mess the network is and that I think what what actually this can inform is the the number of hops in the graphal network right so how much depend am I in the if I go back you can see that here Um yeah here so here it's the more messed I am the more interdependent I am across nodes right so I can take the degree and then maybe here have taken I think two or three hopes for all networks maybe we can differentiate across networks based on how messed they are right that's a very good point yeah I agree Yes, as you told in the beginning um the the solving time is one of the the most important things to make the vendors trust with such methods. So the question is that if some small topological change happen in network if this is possible to avoid retraining and with some technique make it possible to solve uh such analysis without need to retrain.
Yes. But this exactly what this captures right the top topological changes.
So you don't need to retrain because of because of color representation because of the graph neural network or the guide dropout.
But it's exactly so you don't retrain uh you train once and then it captures all topology.
So that's what exactly what we're trying to capture.
Yeah. Last one. Yeah. As understood as understood your network you have to as understood your network outputs like the flows or voltages or whatsoever.
But your main goal is only to say if this can be potentially dangerous configuration or not and to try solve it then with AC power flow. Why not then to train just that your whole network outputs a single probability value how risky this is to tag this actually.
So it would be much easier for the network.
True. That's a different metric indeed.
We haven't used that output.
Indeed that could be also good a good way to go for that.
Yeah. I mean the way we started is first we wanted to be as exact as possible and then we we actually saw okay if we're not as exact as we we can then what can we do uh yeah if we can classify better or things like that but this may be a more tailored metric that because since anyway you will still validate it with a proper power flow.
Yeah it's very good.
Yeah thanks. Okay so I think uh for the sake of your break uh we'll stop here.
Thank you very much everybody.
[Applause]
Loading video analysis...