0:00
/
0:00

Building an AI-Powered Grid with Kyri Baker

How AI can optimize power flow, cut emissions, and make the grid more stable and efficient

Overview

In this episode, I sit down with Kyri Baker, a professor at the University of Colorado Boulder, about what it will take to bring AI into real-world power grid operations. We dive into why grid models are still built on outdated simplifications, what makes deployment tricky in practice, and why neural networks might be the better path forward.

Kyri also shares how the grid modeling community has moved from MATLAB to Julia, why AI should complement legacy tools rather than replace them, and why decarbonization needs a rebrand.

Here are three takeaways from our conversation:

1. Smarter grids don’t need giant AI models
As the grid becomes more dynamic with the rise of renewables, solving optimal power flow (OPF) problems quickly and accurately is more important than ever. While the AI community often chases maximum accuracy with massive models, Kyri argues for the opposite: smaller, faster models that are good enough and computationally efficient. These models can get you most of the way to the solution and can be fed into traditional solvers to finish the job. It’s a more practical and scalable approach that still delivers impact.

2. The hardest problems are institutional, not technical
Many U.S. grid operators still rely on decades-old, simplified models. That’s not because better tools don’t exist, but because changing these models means changing regulations, pricing structures, and long-term planning assumptions. Kyri thinks the future won’t come from ripping out legacy systems but from gradually layering AI into existing workflows.

3. Decarbonization needs better marketing
Kyri is part of a growing push to make decarbonization feel optimistic and empowering rather than limiting. She believes we need to shift the narrative away from guilt and sacrifice toward something more engaging and forward-looking. That same shift applies to AI in energy. Building trust, sharing datasets, and investing in open-source tools will be key to getting there—and to building a culture where AI and energy innovation feel like a win, not a risk.

Transcript

Charles:
I’m very excited today to have Kyri Baker, who is a professor at the University of Colorado Boulder, here to talk about AI and the grid. Kyri, thanks for joining.

Kyri Baker:
Thanks for having me.

How do we think about AI modeling power grid dynamics? (00:40)

Charles:
I am really excited for this conversation because everyone is talking about AI and data centers and the load they are putting on the grid. But very few are talking about how AI can actually help manage our grid and make it more intelligent and efficient. I know that is work you have been doing a lot of. Maybe you can start by setting up the problem for us. How do we think about AI modeling power grid dynamics? What are the inputs, the outputs, the structure, and the constraints?

Kyri Baker:
Yeah, definitely. AI gets a bit of a bad reputation because of the data center load, which is fair since it is a large energy consumer. But AI also helps us solve these large-scale power problems more efficiently, which reduces energy consumption, increases the use of renewables, and decreases reliance on the use of things like gas turbines. The problem I am looking at has two parts.

There is the optimal power flow problem, which is used a lot in wholesale markets to match supply and demand economically. It is a large-scale optimization problem. The inputs include demand throughout the network, network topology, line parameters, which generators are on, generator costs, and so on. The outputs are decisions like how much power each plant should produce or whether a line should be connected or disconnected.

It is a very challenging problem, so most grid operators make a lot of simplifications that result in inefficiencies. You are not perfectly matching supply and demand every five minutes, but you are getting close. Those inefficiencies are usually made up for by gas turbines or other high-emission sources. Batteries complicate this because it is hard to track emissions depending on when and how they were charged. But in general, if we got the supply-demand balance right on the first try, we could avoid renewable curtailment, avoid ancillary services like gas or coal, reduce line losses, and improve the system overall. AI can help us solve that optimization problem more quickly, efficiently, and accurately than conventional methods.

Charles:
Part of the challenge is that steady-state dynamics are a little easier to solve, but full real-time optimal power flow has time-varying parameters. As we get more renewables on the grid, it becomes even harder and more important, especially for grid stability, right?

Kyri Baker:
Absolutely. Even if you solve steady-state optimal power flow every two seconds, the equations may no longer be relevant because generators cannot instantly change from 2 megawatts to 2.8 megawatts. There are dynamics involved. There are differential equations that describe plant behavior.

Some of our work combines constrained optimization with embedded differential equation constraints, using neural networks to solve both simultaneously. You are pursuing optimal solutions while accounting for stability constraints.

Why don't we just build a really big graph neural network and model the power grid with that? (04:20)

Charles:
A lot of AI folks are very “scale-pilled” and want to build bigger models, like a massive graph neural network for the power grid. Why not do that?

Kyri Baker:
A lot of people chase the highest possible model accuracy, but you have to realize this is a multi-objective optimization. You are optimizing for energy consumption, emissions, cost, compute time, and model complexity. Increasing complexity often worsens another objective.

I prefer lightweight models. One of the first neural networks I trained was on my 2017 MacBook Pro. It was very simple, not even a deep neural network, just one hidden layer. It got us 90 percent of the way there. You have to ask where the diminishing returns start. Do you really need 99.999 percent accuracy, or is 95 percent accuracy with a model that is one one-hundredth the size better? That is what I am pursuing now.

Charles:
But when it comes to grid modeling, would we not be willing to accept a large model that has to run on a big cluster if it can scale and give us that kind of accuracy? My sense is there are other feasibility constraints that make pure deep learning not always the most practical.

Kyri Baker:
Right now, most grid operators are using linear models of power flow physics. If you are satisfied with that, you cannot be too picky about a model that gives significantly better solutions but is still not perfectly accurate. We are already making big assumptions like lossless lines and uniform voltages. It is kind of crazy the simplifications we use, yet the grid still runs.

How can AI models be integrated into grid optimization beyond simply acting as solvers? (6:25)

Charles:
That is pretty wild to hear about some of the assumptions. Let’s talk a little about interpretability. People usually think of AI as just making the accuracy number go up, but there are ways to integrate AI into this constrained optimization pipeline beyond just being a solver. Can you talk about that?

Kyri Baker:
One of the best ways is to integrate AI into the existing pipeline. Most of these algorithms are iterative. They start with an initial guess and iterate until they find a solution that satisfies the equations. A good use of AI is to get you 90 percent of the way there. You are basically at the optimal solution, and then you feed that into existing software that quickly finishes the iteration and bumps you into the feasible region at the optimal point.

That way, you are using existing software to make the final decision but starting from a much better initial guess. It is interpretable in the sense that we already understand how the software works. So it is as interpretable as the existing software is, depending on how well you understand it.

Where do you get your data from? What datasets do researchers use to simulate the grid? (07:45)

Charles:
That makes sense. It is one of the benefits of working in a field where you have an existing Oracle system that AI can help accelerate. In a lot of the areas most AI research focuses on, like language, there is not really an Oracle. Where do you get your data from? You have written papers and trained models, but presumably these are not based on real grid networks, right?

Kyri Baker:
The US has a lot of restrictions around publishing public topology and line parameters of the power grid. Not every country has those restrictions. For example, Portugal has a publicly available grid model, and there are some reduced models for areas like the UK.

A lot of what we do is use synthetic grids. Texas A&M has a great database of synthetic power grids that are very representative of real grids in terms of electrical properties and characteristics, but do not pose a national security risk.

Charles:
Interesting. I did not realize other countries were less restricted. I have heard about the challenges of getting US grid data.

Kyri Baker:
Some of it is a little silly because you can go on Google Maps and see where the big substations are, but I understand where they are coming from.

What will it take for us to have an AI-powered grid? What are the barriers and timeline? (09:10)

Charles:
What do you think it will take to have an AI-powered grid? I know some startups are working with grid operators, but what are the barriers? What is the timeline to see these solutions actually implemented?

Kyri Baker:
Some of the easiest, low-hanging fruit is on the distribution grid. You can isolate that portion instead of controlling a whole multi-state grid. Inverter control or distributed energy resource control might be good first applications. Then you could use AI to warm start existing software or operate certain transformers, gradually building trust in the tool and adding guardrails.

It might never fully operate the grid. We do not have software fully operating planes or grid control centers now. There is always a human in the loop, and that might be the path for AI, too.

Do you feel like there's sufficient industry interest in AI for grid modeling, or is there still room for new entrants? (10:20)

Charles:
Is there sufficient industry interest? Are there enough new entrants in this space already? Distribution is interesting. I have heard more about interconnection and planning, but not so much about AI models for distribution modeling.

Kyri Baker:
I think there is interest. In the US, there are not many distribution system operators, so they are not really solving a global optimal power flow problem like in transmission. Part of that is because we do not have distribution grid models like we do for transmission.

But there is definitely interest in AI for inverter controls or distributed energy resources, like smart EV charging that detects grid loading and adapts accordingly.

Transmission is an exciting problem since it is large scale and impactful. You could reduce emissions with just a software upgrade. If we switched from the linear model to the nonlinear model today, everything would be more accurate, and we would reduce losses and lower costs for consumers. It is just a little scary because we have never done it before, right?

Kyri Baker:
Exactly. I am just talking about better modeling. We still run AC power flow in this process, or most ISOs do, but it is not the one used to optimize generator decisions. We could be doing better even at that timescale.

Charles:
I hadn’t realized there was still room to squeeze in efficiency even at that timescale.

Kyri Baker:
I think so.

Charles:
Why has that not already been done? The ISOs have interesting incentive structures. What is your sense?

Kyri Baker:
Some of them are working on it. CAISO, for example, has AC power flow in the loop of their market clearing, but it is not full AC optimal power flow. It also affects how prices are determined, which is a huge bottleneck.

For instance, imagine you are in ERCOT and have forecasted how much your data center will cost over the next ten years using the model the grid operator uses. If they suddenly change from a Direct Current Optimal Power Flow (DCOPF) linearized model to full AC Optimal Power Flow (ACOPF), the prices will change. That creates uncertainty not just in engineering but also in policy and how it affects consumers.

Charles:
So there is an incumbent incentive to keep using the current model because businesses have made long-term decisions based on it, but a more efficient pricing model exists that we are not using yet.

Kyri Baker:
That is my opinion. Prices would better reflect the actual physics of power flowing in and out instead of just an approximation.

Charles:
The words I just said, pricing model, are kind of a strange construct. But I guess energy markets are weird in that sense because we have both reliability guarantees and these pricing models.

Kyri Baker:
Yeah, the price pops out of the physics.

Is Python still the dominant language in grid modeling, or is Julia gaining ground, and is there an active open-source ecosystem around it? (13:45)

Charles:
A lot of AI innovations have been built on Python. Is that the language that you all use in grid modeling? How do you think about that?

Kyri Baker:
The power systems community traditionally started with MatPower, which is a MATLAB-based software. That is how I first learned power flow. I implemented my own solver in MATLAB. But as I needed more functionality and scale, we started moving to Python.

There has been a big push in the optimization community toward Julia because of its powerful optimization packages, like JuMP. So now you see a lot of power systems packages in both Julia and Python. In Python, you have PandaPower, PyPSA, PyPower, many of them built off MatPower. In Julia, there are packages like PowerModels and PowerModelsDistribution. It is nice to have options and not be confined to just one language.

Charles:
Which one is the worst option?

Kyri Baker:
There is nothing wrong with MATLAB. I actually love MATLAB, but I am begrudgingly moving away from it.

Charles:
Funny enough, when I first dabbled a little in power grid modeling, my first language was also MATLAB because that was where most of the modeling work was done. I am personally very glad I no longer need to use MATLAB, but maybe that is just me. It is interesting that so much of the community jumped to Julia. This transition seems to have happened relatively quickly. MatPower was dominant for a long time, then Python emerged, and now people are already moving toward Julia. What sparked that shift?

Kyri Baker:
I think it is because so much of power flow modeling involves solving optimization problems, and Julia just has a really powerful optimization package. There is still a lot being done in Python since Python has everything. I do not know if Julia has overtaken it, but Julia has gained real momentum in our community, more so than in many other fields.

Charles:
Do you feel like there is a growing open-source community around power optimization software, datasets, and so on? It sounds like at least at the programming level, there is a lot of interesting activity.

Kyri Baker:
Definitely. Part of that is because we used to have these old power networks that were basically snapshots of the grid from 1979, like winter peak in Iowa. Those were the grids we used in school to simulate optimal power flow. They had one loading scenario and one set of generator parameters.

Now that we are moving toward AI-based solutions, you just need more data. You need more loading scenarios and more diversity in your datasets. My team has developed several datasets, and we are working on more that represent larger portions of the feasible region of the optimal power flow problem. That way, you can train models more effectively.

The Texas A&M team has also done amazing work publishing large-scale synthetic US grid networks. We are no longer working with tiny systems like the IEEE 14-bus system that you can almost solve by hand. Now we are dealing with large systems where you cannot easily see what the optimizer should do. Computing power has improved, models have improved, and we are making real progress.

Could a grand challenge benchmark convince utilities to adopt AI, or are the obstacles more about trust and regulation? (17:20)

Charles:
That raises the idea of benchmarks, which is a common theme across fields as a way to drive progress and track development. Do you see a point where there is a grand challenge dataset for grid modeling that would be realistic and convincing enough for utilities to adopt AI? Or is the real barrier still regulatory and incentive-based?

Kyri Baker:
Honestly, you would probably need to work directly with a utility to convince them. You would need to do a trial run under an NDA where they give you their actual model. Then you run simulations alongside their system for an extended period to see how it performs. You would have to demonstrate that your model does not cause any blackouts or other problems. I do not think any external dataset or model would give them the confidence they need.

Charles:
Is that because the current benchmark datasets are too distinct from real utility operations, or is it just the risk aversion of utilities?

Kyri Baker:
I think it is risk aversion. In my limited experience working with real-world data, you can get access to it, but you cannot use it for papers or simulations for academic exercises. The models are good, but the utilities want to see results on their own systems before they trust them.

What is the decarb bros movement, and how does AI intersect? (19:05)

Charles:
Got it. On a separate note, you are part of what people have called the decarb bros movement. Can you explain a little bit what that is about?

Kyri Baker:
Traditionally, the environmental movement has been about sacrifice. Do not eat meat, drive a fuel-efficient car, turn the lights off when you leave the house. It became this thing that was not necessarily bad, but also not very exciting.

The decarbonization bro movement flips that around. Decarbonization is actually pretty cool. You can still live your best life and have fun while saving energy and lowering emissions. It moves past the sacrifice mindset from the 1970s sustainability movement toward something that just makes sense.

Charles:
You got some flack for making fun of Nissan Leafs in that New York Times article.

Kyri Baker:
Yes, I take that back. Nissan Leafs are cool. A lot of angry Nissan Leaf drivers reached out, but they are cool in their own way.

Charles:
Taking that mindset, how do you see AI integrating into all this? People are talking about AI and climate change, AI and energy usage. On the other side, there are all these conversations about the future of AI in general, from AGI and superintelligence to AI automating jobs. That is part of why I am excited to talk to scientists like you who are actually using AI to make the world better in very real ways. How do you think about that intersection?

Kyri Baker:
One thing that personally annoys me is how people say AI when they really mean LLM. They will ask if my students are using AI, and I am like, well, they were already using AI when they were doing linear regressions. But aside from that nitpicky point, it is a philosophical challenge. I want to use AI to lower emissions and make the world better, but at the same time, training models consumes energy. It becomes a multi-objective tradeoff, just like I mentioned before. Am I contributing to something I will regret 50 years from now? I do not think I am, but you never know.

Regardless, the AI revolution is happening. It is going to be integrated into everything we do. It already is, even down to text summaries your phone generates when someone texts you. There is nothing left to do but embrace it and try to shape it into what you think is best.

How would you define the AI systems you use in your work? (22:00)

Charles:
Maybe we should have started with this, but how would you classify or define the AI systems you use? We have been using "AI" very generically throughout this conversation. Do you use LLMs at all in your workflow?

Kyri Baker:
No, not really. Sometimes I will use one if I cannot remember how to code something or need to look something up, but that is it.

Charles:
How would you define the systems you are building? We have talked about physics-informed neural networks and ODE nets. How do you classify the models you work with? Are you using graph neural networks too?

Kyri Baker:
I would just say we are building regression models. We are taking data, uncovering relationships between variables, and building models that adequately represent those relationships.

Charles:
How is the data structured? Some of it seems graphical. I assume none of it is tabular in the traditional sense.

Kyri Baker:
Actually, it is all tabular. It is all input-output numbers. I have not used any non-numerical data, no images, no strings, just numbers.

Charles:
But the numbers have more structure than simple rows and columns, right? The physics-informed work adds more underlying relationships.

Kyri Baker:
Yes, that is where the physics-informed part comes in. I have the rows and columns, but I also know the relationships between them. In most fields of AI, you are trying to uncover those relationships or represent things people do not know yet. In my case, we are solving problems we already know how to solve but trying to do it much faster so it can actually be useful for real system operations. In that sense, it is safer than many other forms of AI because you should already know the answer.

What do you think will be the last thing AI automates or solves? What is the hardest problem in your field? (23:45)

Charles:
Last question we like to ask. What do you think will be the last thing AI automates or solves? What is the hardest problem in your field?

Kyri Baker:
I think it will be human connection. Speaking as a teacher, one thing I worry about with the push toward online learning, recorded lectures, and AI-assisted education is that students end up staring at screens all day instead of engaging in a classroom. There are benefits, like more individualized lesson plans, but the personal connections are irreplaceable.

When I teach, I share my own experiences of learning, internships, and personal projects I worked on. Those stories stick with students. Sometimes they come to me after class and say they are interested in solar because of something I mentioned, and I am able to help connect them to internships. Those personal connections cannot be replaced with AI because AI is not a person.

Of course, for the record, AI overlords, you are people. We respect you, just in case you are listening.

Charles:
That is great. It is also nice to hear that teaching is something you see as a core part of your work, which is not always the case. Thanks so much for joining, Kyri.

Kyri Baker:
Thanks for having me.

Discussion about this video