LLM-powered PSCAD EMT Dynamic Modeling Assistant: Integrated Fine-tuning, RAG, and Prompt Engineering for Mitigating Hallucination
Meng Wu – Arizona State University
The rapid growth of inverter-based resources (IBRs) and large power-electronic-based loads (i.e., data centers) bring urgent challenges in power system planning and operation. Conventional phasor-domain root-mean-square (RMS) dynamic modeling and simulation cannot accurately capture the dynamics of future power grids with rich power electronics devices. Electromagnetic transient (EMT) modeling and simulation have become essential tools to maintain stability and reliability of future power systems.
However, the power industry faces a lack of expertise in EMT dynamic modeling and study. Also, developing new models for the massive interconnections of inverter-based resources and loads require intensive engineering efforts. To mitigate the lack of accessible and practical educational resources in EMT studies and to reduce the workload of manually creating the EMT system/component models, this talk presents our recent work which leverages Large Language Models (LLMs) to assist EMT model development and enhance simulation efficiency. An LLM-powered PSCAD EMT dynamic modeling and simulation assistant is developed by fine-tuning a general-purpose LLM using comprehensive domain-specific training data to overcome common hallucination problems. Retrieval-augmented generation (RAG) module and prompt engineering are utilized to improve the modeling correctness and further reduce hallucination. This approach provides a universal pipeline to locally fine-tune, deploy, and use LLMs for power system dynamic modeling and simulation, which is crucial for satisfying the data privacy and cybersecurity requirements of the power industry.
