Visualization of AI controlling distributed VRE in pop culture. Adopted from アイの歌声を聴かせて (Let Me Hear Ai’s Singing Voice, 2021)
Video version of this slide:
An article version of the slides can be found here.
Outline
- Introduction to terms
- What is AI?
- What is a distribution grid?
- What is a local energy market?
- What AI techniques are used in the distributed grid?
- Problems for LEM in the distribution grid (and how AI can be helpful)
- Accurate forecast of demand and VRE generation
- Time-efficient and reliable decision-making
- Well-functioning distribution grid
- Data security and privacy
- Conclusions
What is AI?
Artificial intelligence (AI) refers to the capability of computational systems to perform tasks typically associated with human intelligence, such as learning, reasoning, problem-solving, perception, and decision-making. (Wikipedia)
A simple way of classifying AI algorithms
A simple way to classify different AI techniques. Adopted from "What is artificial intelligence (AI)?" by Cole Stryker, August 2024.
A simple way of classifying AI training paradigms
A simple way to classify different AI training paradigms.
What is a distribution grid?
A simple representation of the power system.
What is a local energy market?
A simple representation of the power system, with a local energy market included.
So… what AI techniques are used in the distributed grid?
-
Modeling
- Classical machine learning
- Support vector machine / regression
- Decision tree / random forests
- Artificial neural network
- Deep learning
- Recurrent neural network
- Long short-term memory
- Gated recurrent unit
- Convolutional neuron network
- Multilayer perceptron
- Recurrent neural network
- Classical machine learning
-
Optimization
- Artificial bee colony
- Ant colony optimization
- Genetic algorithms
- Grey wolf optimization
- Particle swarm optimization
-
Hybrid
Number of articles published related to different AI techniques
[1] A review of the applications of artificial intelligence in renewable energy systems: An approach-based study. Mersad Shoaei, Younes Noorollahi, Ahmad Hajinezhad, Seyed Farhan Moosavian, Energy Conversion and Management, Volume 306, 2024.
[2] Artificial Intelligence Enabled Demand Response: Prospects and Challenges in Smart Grid Environment. M. A. Khan et al., IEEE Access, vol. 11, pp. 1477-1505, 2023.
But is applying AI really worth it?
No exception when discussing AI and the energy system
Left: "How AI Is Incrementally Fueling Energy Sector Innovation", Gaurav Sharma, Forbes, 2024. Right: "AI Needs to Be More Energy-Efficient", Scientific American, 2025.
Problems for LEM in the distribution grid
Accurate forecast of demand and VRE generation
Why does AI help in forecasting demand and VRE generation?
-
Demand and VRE supply are related to various factors
- Demand
- Household size and type
- Population (size, age, occupation…)
- Temperature
- Solar
- Current direct and indirect solar radiation
- Current temperature
- Cloud movement and forming / dissolving
- Wind
- Wind speed
- Terrain and land type
- Numerical forecast of synoptic weather systems
- Demand
-
Many of these factors exhibit non-linear relationships with broad spatial and temporal interdependencies.
-
Suitable for ML applications
Summary of forecast using AI in recent literature
-
Classical ML techniques remains relevant, as in [1].
-
Deep learning models such as long short-term memory RNN [2] and CNN [3] are also used.
-
Emerging AI can increase the accuracy of predictions. For example, transformer-based technique suitable for long sequence time-series forecasting [4].
-
A single sample of forecast might not be sufficient for stochastic economic dispatch and planning. Based on historical data, generative AI can create multiple synthetic load and generation profiles at once [5] for that purpose.

[1] Assessing the impact of employing machine learning-based baseline load prediction pipelines with sliding-window training scheme on offered flexibility estimation for different building categories. Italo Aldo Campodonico Avendano et al., Energy and Buildings, Volume 294, 2023.
[2] Federated learning assisted distributed energy optimization. Du, Y., Mendes, N., Rasouli, S., Mohammadi, J., Moura, P.. IET Renew. Power Gener. 18, 2524–2538 (2024).
[3] Domain-informed CNN architectures for downscaling regional wind forecasts. Alexander M. Campbell et al., Energy and AI, Volume 20, 2025.
[4] A blockchain-based framework for federated learning with privacy preservation in power load forecasting. Qifan Mao et al., Knowledge-Based Systems, Volume 284, 2024.
[5] Innovative distribution network design using GAN-based distributionally robust optimization for DG planning. Li, P., Shen, Y., Shang, Y., Alhazmi, M.. IET Gener. Transm. Distrib. 19, e13350 (2025).
Effects of better forecasting in a LEM
-
Better load forecast: in one recent study, average difference to the optimal market clearing price decreases by 45% for 77% of root-mean-square error reduction in load forecast in one 100 household community. In another 25 household community, 37% of RMSE decrease in load forecast reduces average difference to the optimal market clearing price by 83% [1].
-
Better VRE forecast: one recent study using LSTM to forecast VRE output creates 15% savings for participants in a decentralized renewable energy market, while reducing grid congestion by up to 20% [2].
[1] Federated learning assisted distributed energy optimization. Du, Y., Mendes, N., Rasouli, S., Mohammadi, J., Moura, P.. IET Renew. Power Gener. 18, 2524–2538 (2024).
[2] Federated Learning-Based Energy Forecasting and Trading Platform for Decentralized Renewable Energy Markets. R. S. S. Nuvvula et al., 2024 12th International Conference on Smart Grid (icSmartGrid), Setubal, Portugal, 2024, pp. 277-283.
Visualization of a tourist enjoying the scenery of a coastal wind farm in pop culture. Adopted from 365 Days to the Wedding Ep. 2 (2024).
Time-efficient and reliable decision-making
Why does AI help in decision-making
-
For professional traders and market operators, conventional optimization methods can be time-consuming, especially if the problem is non-convex.
-
In addition, LEMs consist of ordinary households. Households and small businesses might not acquire the necessary domain knowledge to participate in LEMs on their own. Their dispatch and bidding strategies may therefore rely on simple heuristics.
-
AI can therefore strike a balance between the two extremes.
-
AI can be trained with supervised or reinforcement learning for decision-making
- Supervised learning: the “correct” decisions are labeled on the data using either conventional optimization methods or existing datasets
- Reinforcement learning: the model adjusts its policy iteratively to improve a reward function.
Visualization of AI performing tasks more efficiently and accurately than human counterparts. Adopted from "Yuki Installs Gentoo" by Mental Outlaw (2020).
Summary of decision-making using AI for flexibility dispatch
-
Dispatch of flexibility can be formulated as a classification problem. For example, a EV can be instructed to charge, discharge, or stay idle using a decision tree [1] or a transformer model [2].
-
Energy demand for training an AI model can also be used as a flexibility asset [3].
[1] Optimization Challenges in Vehicle-to-Grid (V2G) Systems and Artificial Intelligence Solving Methods. Escoto, M., Guerrero, A., Ghorbani, E., & Juan, A.A. (2024). Systems and Artificial Intelligence Solving Methods. Applied Sciences.
[2] FedPT-V2G: Security enhanced federated transformer learning for real-time V2G dispatch with non-IID data. Yitong Shang & Sen Li, Applied Energy, Volume 358, 2024.
[3] FedZero: Leveraging Renewable Excess Energy in Federated Learning. Philipp Wiesner, Ramin Khalili, Dennis Grinwald, Pratik Agrawal, Lauritz Thamsen, and Odej Kao. 2024. In Proceedings of the 15th ACM International Conference on Future and Sustainable Energy Systems (e-Energy ’24).

Summary of decision-making using AI in a LEM
-
AI application of decision-making in the LEM can be categorized into 3 groups:
- Centralized: assuming the market operator obtains all relevant information and trains one single model, as in [1].
- Decentralized: each local agent trains their own model based on their own accessible data, as in [2] [3].
- Distributed: each local agent trains their own model based on their own accessible data, but the parameters of their models are aggregated to guide updates of each local model, as in [4] [5].
-
In the decentralized and distributed framework, agents usually use reinforcement learning to obtain a set of policy according to observation.
-
For the distributed framework, there is also the distinction of coordination off line or on line. In the former case the local models are trained in a distributed manner, but in real time implementation each agent implement the local model independently, while in the latter case agents communicate with each other also in real time implementation.
-
A decentralized framework usually converges slower than a distributed framework, which in turn usually requires more time and energy than a centralized framework. However, decentralized and distributed frameworks have advantages over centralized frameworks in terms of security and privacy.
[1] Smart coordination of buildings to incentivise grid flexibility provision: A virtual energy community perspective. Naser Hashemipour, Raquel Alonso Pedrero, Pedro Crespo del Granado, Jamshid Aghaei, Energy and Buildings, Volume 310, 2024.
[2] Reinforcement Learning Enabled Peer-to-Peer Energy Trading for Dairy Farms. Shah, Mian Ibad Ali, Enda Barrett, and Karl Mason. International Conference on Practical Applications of Agents and Multi-Agent Systems. Cham: Springer Nature Switzerland, 2024.
[3] Decentralized coordination of distributed energy resources through local energy markets and deep reinforcement learning. Daniel C. May, Matthew Taylor, Petr Musilek, Energy and AI, Volume 18, 2024.
[4] Consensus-based dispatch optimization of a microgrid considering meta-heuristic-based demand response scheduling and network packet loss characterization. Ali M. Jasim, Basil H. Jasim, Soheil Mohseni, Alan C. Brent, Energy and AI, Volume 11, 2023.
[5] Federated Reinforcement Learning for decentralized peer-to-peer energy trading. Zhian Ye, Dawei Qiu, Shuangqi Li, Zhong Fan, Goran Strbac, Energy and AI, Volume 20, 2025.
Effects of decision-making using AI
-
Using AI is much more time-efficient than conventional optimization methods. For the dispatch of a few hundred EVs it can be about 5000 times faster to use AI [1] [2].
-
However, the models are usually benchmarked against simple heuristic or other AI models. The optimal gap between conventional optimization methods and AI is usually not reported. In [3], we see that a 60 to 100 times increase in computation speed results in 10% - 25% less objective value of a maximizing problem.
-
Sometimes a convex-relaxation can be applied to the original problem so a conventional optimization algorithm is feasible in terms of time efficiency. If the optimality gap between the relaxed optimal and the AI arrived solution is small (as in [4]), this indicates that the AI algorithm is an appropriate alternative to a conventional optimization algorithm.
[1] Optimization Challenges in Vehicle-to-Grid (V2G) Systems and Artificial Intelligence Solving Methods. Escoto, M., Guerrero, A., Ghorbani, E., & Juan, A.A. (2024). Systems and Artificial Intelligence Solving Methods. Applied Sciences.
[2] FedPT-V2G: Security enhanced federated transformer learning for real-time V2G dispatch with non-IID data. Yitong Shang & Sen Li, Applied Energy, Volume 358, 2024.
[3] Real-time outage management in active distribution networks using reinforcement learning over graphs. Jacob, R.A., Paul, S., Chowdhury, S. et al. Nat Commun 15, 4766 (2024).
[4] Smart coordination of buildings to incentivise grid flexibility provision: A virtual energy community perspective. Naser Hashemipour, Raquel Alonso Pedrero, Pedro Crespo del Granado, Jamshid Aghaei, Energy and Buildings, Volume 310, 2024.
Well-functioning distribution grid
Why does AI help in maintaining a functioning distribution grid
-
The power flow equations of the distribution grid make the optimal control problem non-convex when voltage control is considered. Conventional optimization methods can be time-extensive.
-
During a contingency, deciding whether to turn on / off switches and controlling critical components is also computationally challenging for conventional optimization methods.
-
During a contingency, obtaining a robust and stable control policy is more important than obtaining the optimal policy.
Summary of maintaining a functioning distribution grid using AI
-
The identification of critical components that are under high risks of failure can be formulated as a classification problem, e.g. whether a feeder will very likely to experience outage the next day [1] or whether a transformer will fail in the coming year [2]. The goal is for DSOs to gain more information in the failure probability of the components and act according either through local energy markets or maintenance rescheduling.
-
Real time fault detection can also be formulated as a classification problem according to the measurements gathered. Simple AI (such as the fuzzy logic [3]) is sufficient to perform the task, although convolutional neural networks have been shown to provide better performance than classical ML [4].
-
Using AI for frequency control is less relevant in distribution grids since the control parameters are determined by the TSO under normal operational conditions. For the distribution grid, more focus is on using AI for voltage control.
-
Since the power network can be seen as a graph with buses as vertices and power lines as edges, graph convolutional neural network can be used for real-time voltage control [5] or outage management [6] in an active distribution network.
[1] Machine Learning Applications to Ice-Storm Power Outage Forecasting for Distribution System Resilience Enhancement. A. Bahrami, M. Shahidehpour, S. Pandey, H. Zheng, A. Alabdulwahab and A. Abusorrah, 2023 IEEE IAS Global Conference on Emerging Technologies (GlobConET), London, United Kingdom, 2023.
[2] Predictive Maintenance for Distribution System Operators in Increasing Transformers’ Reliability. Vita V, Fotis G, Chobanov V, Pavlatos C, Mladenov V. Electronics. 2023; 12(6):1356.
[3] Artificial Intelligence in Power Distribution Systems. Moise, R.A., Fratu, A. Smart Mobile Communication & Artificial Intelligence. IMCL 2023.
[4] Distribution Grid Fault Classification and Localization using Convolutional Neural Networks. Zhou, M., Kazemi, N. & Musilek, P. Smart Grids and Energy 9, 24 (2024).
[5] Cloud-Edge Collaboration-Based Local Voltage Control for DGs With Privacy Preservation. J. Zhao et al. IEEE Transactions on Industrial Informatics, vol. 19, no. 1, pp. 98-108, Jan. 2023.
[6] Real-time outage management in active distribution networks using reinforcement learning over graphs. Jacob, R.A., Paul, S., Chowdhury, S. et al. Nat Commun 15, 4766 (2024).
Data security and privacy
Summary of using AI to keep data secure and private
-
To avoid large flow of data, we can form the AI training process in a distributed manner commonly known as “federated learning”.
-
In a federated learning setting, each agent trains their local model with their local data. Only the model parameters are shared with each other. Usually, a global update of some information of these parameters (e.g. the weighted average of the local parameters or their gradient) is conducted by a central server or a designated worker among the agents. The global information is then broadcasted to all the agents for them to update their local model parameters accordingly.
-
To preserve privacy of local data, encryption methods such as homomorphic encryption or differential privacy are used when transmitting model parameters during federated learning. This can also help keep the system secure from a cyberattacker [1].
-
AI can be used to detect anomalies within the data [1]. However, the threat model these AI algorithms assume is usually called a “white-box attack”, where an attacker can only perform effective malicious data injection with complete knowledge of the model. With use of GenAI, it is possible for an attacker with only knowledge of the output of a grid stability prediction model to learn and conduct effective attacks [2].
[1] Privacy-preserving federated learning for detecting false data injection attacks on power system. Wen-Ting Lin, Guo Chen, Xiaojun Zhou, Electric Power Systems Research, Volume 229, 2024.
[2] GAN-GRID: A Novel Generative Attack on Smart Grid Stability Prediction. Efatinasab, E., Brighente, A., Rampazzo, M., Azadi, N., Conti, M. European Symposium on Research in Computer Security 2024.
Conclusion
-
Many existing and potential applications of AI in the control of distribution grids, including accurate forecast, time-efficient and reliable decision-making, maintaining distribution grid’s function, and data security and privacy.
-
ANN and classical ML once dominated the research, but in very recent years DL and GenAI become hot topics. Blockchain and other encryption techniques are commonly applied together with AI, especially in a federated learning environment.
-
For local electricity markets specifically, AI technologies provide market participants, market operators, and DSOs improvement of supply and demand forecast. They can also offer time-efficient and privacy preserving alternatives to traditional market clearing algorithms based on centralized and conventional optimization methods. However, loss of optimality, as a trade-off, can often be overlooked.
-
Most literature around AI and distribution grid discusses positive synergies between AI and the grid; still, negative impacts should be considered more holistically alongside, including:
- Higher energy demand
- More sophisticated cyberattacks
- Social inequality due to differences in computational resources