Table of Contents
Fetching ...

Advancing Generative Artificial Intelligence and Large Language Models for Demand Side Management with Internet of Electric Vehicles

Hanwen Zhang, Ruichen Zhang, Wei Zhang, Dusit Niyato, Yonggang Wen, Chunyan Miao

TL;DR

The paper addresses automated demand-side management in IoT-enabled microgrids by integrating retrieval-augmented LLMs to translate natural-language objectives into MILP formulations and solver-ready code. The proposed three-stage workflow—Automatic Optimization Formulation, Automatic Code Generation, and Automatic Customizing Optimization—uses a RAG knowledge base to supply both mathematical models and executable templates, enabling non-experts to tailor DSM schedules. Empirical results show improved problem formulation over baseline prompts and a notable cost reduction in EV charging scheduling, demonstrating the approach's practicality for energy efficiency and adaptive DSM. This work highlights the potential of GenAI to augment EMS in real-time, configurable, and scalable ways, reducing engineering effort while maintaining optimization correctness.

Abstract

The energy optimization and demand side management (DSM) of Internet of Things (IoT)-enabled microgrids are being transformed by generative artificial intelligence, such as large language models (LLMs). This paper explores the integration of LLMs into energy management, and emphasizes their roles in automating the optimization of DSM strategies with Internet of Electric Vehicles (IoEV) as a representative example of the Internet of Vehicles (IoV). We investigate challenges and solutions associated with DSM and explore the new opportunities presented by leveraging LLMs. Then, we propose an innovative solution that enhances LLMs with retrieval-augmented generation for automatic problem formulation, code generation, and customizing optimization. The results demonstrate the effectiveness of our proposed solution in charging scheduling and optimization for electric vehicles, and highlight our solution's significant advancements in energy efficiency and user adaptability. This work shows LLMs' potential in energy optimization of the IoT-enabled microgrids and promotes intelligent DSM solutions.

Advancing Generative Artificial Intelligence and Large Language Models for Demand Side Management with Internet of Electric Vehicles

TL;DR

The paper addresses automated demand-side management in IoT-enabled microgrids by integrating retrieval-augmented LLMs to translate natural-language objectives into MILP formulations and solver-ready code. The proposed three-stage workflow—Automatic Optimization Formulation, Automatic Code Generation, and Automatic Customizing Optimization—uses a RAG knowledge base to supply both mathematical models and executable templates, enabling non-experts to tailor DSM schedules. Empirical results show improved problem formulation over baseline prompts and a notable cost reduction in EV charging scheduling, demonstrating the approach's practicality for energy efficiency and adaptive DSM. This work highlights the potential of GenAI to augment EMS in real-time, configurable, and scalable ways, reducing engineering effort while maintaining optimization correctness.

Abstract

The energy optimization and demand side management (DSM) of Internet of Things (IoT)-enabled microgrids are being transformed by generative artificial intelligence, such as large language models (LLMs). This paper explores the integration of LLMs into energy management, and emphasizes their roles in automating the optimization of DSM strategies with Internet of Electric Vehicles (IoEV) as a representative example of the Internet of Vehicles (IoV). We investigate challenges and solutions associated with DSM and explore the new opportunities presented by leveraging LLMs. Then, we propose an innovative solution that enhances LLMs with retrieval-augmented generation for automatic problem formulation, code generation, and customizing optimization. The results demonstrate the effectiveness of our proposed solution in charging scheduling and optimization for electric vehicles, and highlight our solution's significant advancements in energy efficiency and user adaptability. This work shows LLMs' potential in energy optimization of the IoT-enabled microgrids and promotes intelligent DSM solutions.
Paper Structure (31 sections, 23 equations, 5 figures, 3 tables)

This paper contains 31 sections, 23 equations, 5 figures, 3 tables.

Figures (5)

  • Figure 1: Overview of EMS with various AI approaches --- An illustration of DAI and GenAI applications within EMS, where EMS acts as the platform for implementing DSM. The central part highlights a representative EMS layout, featuring the forecasting module, renewable energy source, ES, EV, along with both dispatchable and non-dispatchable loads. Ultimately, DAI and GenAI collaborate to enable efficient and secure operations of the EMS.
  • Figure 2: A general framework design of a GenAI agent supporting modeling and code generation for IoT-enabled microgrid. Specifically, to address the challenges faced by EMS developers for IoT-enabled microgrid—such as complex optimization problem formulation and the difficulty of coding implementation—and to enable non-experts (e.g., end users) to customize EMS scripts, we introduce a generative AI agent that supports these tasks through natural language interaction. The generative AI agent is responsible for formulating optimization problems, generating coding scripts, and modifying existing scripts according to the requirements of both EMS developers and end users.
  • Figure 3: An overview of the function-oriented workflow under the proposed general framework. --- RAG-based LLM for energy optimization and DSM: Automatic optimization formulation, code generation, result generation based on user's request. A & B: The comparison of the optimization formulations between the backbone GPT-4o and the proposed RAG-enhanced LLM.
  • Figure 4: Incorrect vs. correct problem formulations --- A numerical comparison between the incorrect and correct optimization models is presented, where the incorrect formulation omits the variable representing power sold to the grid, $P^{\mathrm{exp}}_{\mathrm{grid}}$, as well as the control variables for dispatchable loads, namely $\lambda_{\mathrm{Cleaner}}(t)$ and $\lambda_{\mathrm{DishWasher}}(t)$, which govern the on/off operation of household devices.
  • Figure 5: Simulation results of customizing optimization --- Comparison of the default optimization from the manufacturer and the customized optimization from the end user. Default: Optimized result from the manufacturer. Customized: Optimized result from the end user.