IDEAS home Printed from https://ideas.repec.org/a/eee/appene/v407y2026ics0306261925020744.html

In-context learning enhanced large language model for robust distribution system state estimation

Author

Listed:
  • Li, Yue
  • Cheng, Gang
  • Zhao, Junbo
  • Liu, Yitong

Abstract

Existing data-driven distribution system state estimation (DSSE) methods face significant challenges in capturing useful information from massive zero injections that are prevalent in practical large-scale distribution systems. If zero-injection nodes are not explicitly utilized, limited real-time measurements can lead to a low observability problem. These methods are also vulnerable to bad data under heterogeneous data sources from different measurement units, such as advanced metering infrastructure (AMI), supervisory control and data acquisition (SCADA), and pseudo-measurements. This paper presents a proof-of-concept study of a large language model (LLM)-based DSSE method to address these challenges. The zero injections are transformed into textual content and are extracted through the self-attention mechanism of LLMs. The quantized low-rank adapter (QLoRA) and in-context learning (ICL) are utilized for efficient fine-tuning and quick adaptation, minimizing extensive weight adjustments across varied operational conditions. These strategies not only enhance the model’s scalability but also improve its adaptability and robustness to various situations. In particular, the self-attention mechanism allows the proposed method to deal with bad data effectively. The developed LLM-based method is evaluated against various data-driven approaches and the conventional weighted least squares (WLS) method on a realistic 2135-node Dominion Energy distribution feeder, which contains 60.98% zero-injection nodes. Specifically, incorporating zero-injection information reduces the voltage-magnitude mean absolute error (MAE) by 41.67% (from 0.0012 p.u. to 0.0007 p.u.), and under 10% bad data, the proposed method maintains a low MAE of 0.0049 p.u., compared with 0.0677 p.u. for the WLS method. These simulation results demonstrate the effectiveness and advantages of the proposed method under diverse measurement conditions and topology changes.

Suggested Citation

  • Li, Yue & Cheng, Gang & Zhao, Junbo & Liu, Yitong, 2026. "In-context learning enhanced large language model for robust distribution system state estimation," Applied Energy, Elsevier, vol. 407(C).
  • Handle: RePEc:eee:appene:v:407:y:2026:i:c:s0306261925020744
    DOI: 10.1016/j.apenergy.2025.127344
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0306261925020744
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.apenergy.2025.127344?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    References listed on IDEAS

    as
    1. Tian, Shuxin & Zhu, Feng & Shen, Jinhua & Yang, Xijun & Fu, Yang & Mi, Yang & Ling, Ping, 2025. "Distributed state estimation of active distribution network considering mixed-frequency measurement data hierarchical encryption," Applied Energy, Elsevier, vol. 388(C).
    2. Song, Shaojian & Xiong, Hao & Lin, Yuzhang & Huang, Manyun & Wei, Zhinong & Fang, Zhi, 2022. "Robust three-phase state estimation for PV-Integrated unbalanced distribution systems," Applied Energy, Elsevier, vol. 322(C).
    3. Huang, Manyun & Wei, Zhinong & Lin, Yuzhang, 2022. "Forecasting-aided state estimation based on deep learning for hybrid AC/DC distribution systems," Applied Energy, Elsevier, vol. 306(PB).
    4. Zhang, Jinxian & Zhao, Junbo & Cheng, Gang & Rouhani, Alireza & Chen, Xiao, 2025. "Explainable multi-fidelity Bayesian neural network for distribution system state estimation," Applied Energy, Elsevier, vol. 392(C).
    5. Tomaselli, Domenico & Stursberg, Paul & Metzger, Michael & Steinke, Florian, 2025. "Probabilistic geo-referenced grid modeling: A Bayesian approach for integrating available system measurements," Applied Energy, Elsevier, vol. 380(C).
    6. Xu, Junjun & Wu, Zaijun & Zhang, Tengfei & Hu, Qinran & Wu, Qiuwei, 2022. "A secure forecasting-aided state estimation framework for power distribution systems against false data injection attacks," Applied Energy, Elsevier, vol. 328(C).
    7. Al-Wakeel, Ali & Wu, Jianzhong & Jenkins, Nick, 2017. "k-means based load estimation of domestic smart meter measurements," Applied Energy, Elsevier, vol. 194(C), pages 333-342.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Zhang, Jinxian & Zhao, Junbo & Cheng, Gang & Rouhani, Alireza & Chen, Xiao, 2025. "Explainable multi-fidelity Bayesian neural network for distribution system state estimation," Applied Energy, Elsevier, vol. 392(C).
    2. Cui, Jia & Fu, Tianhe & Yang, Junyou & Wang, Shunjiang & Li, Chaoran & Han, Ni & Zhang, Ximing, 2025. "An active early warning method for abnormal electricity load consumption based on data multi-dimensional feature," Energy, Elsevier, vol. 314(C).
    3. Ruhang, Xu, 2020. "Efficient clustering for aggregate loads: An unsupervised pretraining based method," Energy, Elsevier, vol. 210(C).
    4. Rongheng Lin & Budan Wu & Yun Su, 2018. "An Adaptive Weighted Pearson Similarity Measurement Method for Load Curve Clustering," Energies, MDPI, vol. 11(9), pages 1-17, September.
    5. Yin, Linfei & He, Xiaoyu, 2023. "Artificial emotional deep Q learning for real-time smart voltage control of cyber-physical social power systems," Energy, Elsevier, vol. 273(C).
    6. Zhao, Zhenghui & Shang, Yingying & Qi, Buyang & Wang, Yang & Sun, Yubo & Zhang, Qian, 2024. "Research on defense strategies for power system frequency stability under false data injection attacks," Applied Energy, Elsevier, vol. 371(C).
    7. Kuper, Laura & Metzger, Michael & Stursberg, Paul & Niessen, Stefan, 2025. "Computationally efficient topology design of district heating networks by price-collecting Steiner trees," Energy, Elsevier, vol. 333(C).
    8. Wu, Shutan & Wang, Qi & Hu, Jianxiong & Ye, Yujian & Tang, Yi, 2025. "Attack-resilient state estimation for cyber-physical power systems: A dynamic spatial-temporal redundancy reconfiguration framework for FDIA detection," Applied Energy, Elsevier, vol. 397(C).
    9. Satpathy, Priya Ranjan & Ramachandaramurthy, Vigna Kumaran, 2026. "Artificial intelligence and machine learning for distributed energy resource management systems: Applications, frameworks, and future directions," Applied Energy, Elsevier, vol. 403(PB).
    10. Asier Diaz-Iglesias & Xabier Belaunzaran & Ane M. Florez-Tapia, 2025. "Short-TermPower Demand Forecasting for Diverse Consumer Types Using Customized Machine Learning Approaches," Energies, MDPI, vol. 18(20), pages 1-26, October.
    11. Zhong, Shengyuan & Wang, Xiaoyuan & Zhao, Jun & Li, Wenjia & Li, Hao & Wang, Yongzhen & Deng, Shuai & Zhu, Jiebei, 2021. "Deep reinforcement learning framework for dynamic pricing demand response of regenerative electric heating," Applied Energy, Elsevier, vol. 288(C).
    12. Hanshan Qing & Abhinav Kumar Singh & Efstratios Batzelis, 2025. "Review on Distribution System State Estimation Considering Renewable Energy Sources," Energies, MDPI, vol. 18(10), pages 1-20, May.
    13. Jieyi Kang & David Reiner, 2021. "Machine Learning on residential electricity consumption: Which households are more responsive to weather?," Working Papers EPRG2113, Energy Policy Research Group, Cambridge Judge Business School, University of Cambridge.
    14. Emilio Ghiani & Alessandro Serpi & Virginia Pilloni & Giuliana Sias & Marco Simone & Gianluca Marcialis & Giuliano Armano & Paolo Attilio Pegoraro, 2018. "A Multidisciplinary Approach for the Development of Smart Distribution Networks," Energies, MDPI, vol. 11(10), pages 1-29, September.
    15. Zhou, Huansheng & Zheng, J.H. & Li, Zhigang & Wu, Q.H. & Zhou, X.X., 2019. "Multi-stage contingency-constrained co-planning for electricity-gas systems interconnected with gas-fired units and power-to-gas plants using iterative Benders decomposition," Energy, Elsevier, vol. 180(C), pages 689-701.
    16. Xianglong Zhang & Ying Liu & Songlin Gu & Yuzhou Tian & Yifan Gao, 2025. "Multi-Level Asynchronous Robust State Estimation for Distribution Networks Considering Communication Delays," Energies, MDPI, vol. 18(14), pages 1-20, July.
    17. Mitra, Somalee & Chakraborty, Basab & Mitra, Pabitra, 2024. "Smart meter data analytics applications for secure, reliable and robust grid system: Survey and future directions," Energy, Elsevier, vol. 289(C).
    18. Elnozahy, Ahmed & Abdel-Salam, Mazen & Abo-Elyousr, Farag K., 2024. "Optimal techno-economic energy coordination of solar PV water pumping irrigation systems," Energy, Elsevier, vol. 288(C).
    19. Alejandro Pena-Bello & Edward Barbour & Marta C. Gonzalez & Selin Yilmaz & Martin K. Patel & David Parra, 2020. "How Does the Electricity Demand Profile Impact the Attractiveness of PV-Coupled Battery Systems Combining Applications?," Energies, MDPI, vol. 13(15), pages 1-19, August.
    20. Raghuvamsi, Y & Teeparthi, Kiran, 2023. "A review on distribution system state estimation uncertainty issues using deep learning approaches," Renewable and Sustainable Energy Reviews, Elsevier, vol. 187(C).

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:appene:v:407:y:2026:i:c:s0306261925020744. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/wps/find/journaldescription.cws_home/405891/description#description .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.