Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 2, 2024 261 Two‐Layer Optimization Scheduling of Electric Vehicle Charging and Energy Storage Systems in Microgrids Tiange Xiang1, * 1Department of Electrical Engineering, Minjiang University, Fuzhou, Fujian, 350000, China *Corresponding Author’s Email:1847431391@qq.com Abstract: In the context of the global energy structure transformation, microgrids, as a new type of power system, have garnered widespread attention for their flexibility and efficiency. Electric vehicles as a green transportation tool, introduce significant volatility in charging loads. This paper explores the challenges posed by the volatility of EV charging loads and the conflict in managing energy storage systems on the stability and economic performance of microgrids. It presents an optimization approach and establishes a two-layer optimization model to address the conflicts between charging demand and energy storage management. By employing dynamic scheduling strategies to enhance responsiveness, the paper aims to mitigate the impact of charging fluctuations on the microgrid. A case study using a mixed-line scenario is provided for two-layer optimization modeling. The paper summarizes the key issues and solutions of the research, and based on theoretical and practical needs, identifies future development trends, emphasizing higher precision, stability, and the integration of intelligent scheduling optimization methods. Keywords: Microgrid, Electric Vehicle Charging, Energy Storage System, Two-Layer Optimization, Scheduling Strategy. 1. Introduction Currently, the rapid growth in energy demand driven by social development and the significant greenhouse gas emissions from fossil fuel-based power generation necessitate a disruptive transformation of the energy structure to achieve the strategic goals of “carbon peaking” and “carbon neutrality” [1]. A microgrid is an independent power network composed of local generation equipment, energy storage systems, loads, and control systems that can operate independently from the main grid. Its flexibility and efficiency make it highly advantageous in dealing with instability in power supply and enhancing the utilization rate of renewable energy. A microgrid cluster combines multiple individual microgrids to enhance the stability of the microgrid system, allowing renewable energy to meet diversified power demands flexibly and reducing the impact of electric vehicle (EV) charging loads on the traditional large grid [2]. The structure of a microgrid cluster is illustrated in Figure 1. Figure 1. Structure of a Microgrid Cluster Electric vehicle (EV) charging loads exhibit significant time dependency, with demand fluctuating greatly across different time periods. For instance, peak charging demands can pose a burden on the microgrid, especially as the number 262 of EVs surges. Such load fluctuations increase the complexity of power system operations and may affect the economy and reliability of the microgrid [3]. As a crucial component of the microgrid system, the energy storage system provides flexible energy reserves and scheduling capabilities in cases of energy shortages or supply load fluctuations [4]. By optimizing the charging and discharging strategies of the energy storage system, the stability and economy of the microgrid can be significantly improved. However, the scheduling of the energy storage system needs to be coordinated with EV charging loads to achieve optimal operational effectiveness. Optimizing the scheduling strategy for the energy storage system requires consideration of not only the system’s real-time load and generation but also the integration of fluctuating EV charging demands [5]. This paper explores the two-layer optimal scheduling problem of EV charging and energy storage systems in microgrids. The two-layer optimization model focuses on system economy and stability at the higher level, while optimizing scheduling strategies at the lower level. Through a review of existing research, key issues are identified, and solutions and future research directions are proposed. The aim is to provide new ideas and methods for optimal scheduling in microgrids, enabling more efficient and stable power system operations. 2. Conflict Between Charging Demand and Energy Storage Management The primary conflict between charging demand and energy storage management arises from load fluctuations, limitations in energy storage system capacity, and the sudden nature of charging demand. Electric vehicle (EV) charging demand exhibits significant periodicity and uncertainty, particularly surging during peak periods, which markedly increases the load on microgrids. This sudden demand may cause the energy storage system to be unable to meet grid demands during peak times, affecting the stability and efficiency of the microgrid. 2.1. Difficulties in Addressing the Conflict The conflict between charging demand and energy storage management presents several challenges. The first is the uncertainty in load forecasting. EV charging demand is influenced by various factors such as user habits, weather conditions, and the prevalence of electric vehicles, making accurate forecasting difficult. During peak periods, balancing between electricity costs, energy storage efficiency, and grid stability is required. Particularly with limited energy storage system capacity, configuring charging loads and energy storage discharge strategies becomes a critical challenge. Optimization models must consider multiple levels of constraints and objectives, and accurately describing and solving these models while ensuring computational efficiency is a challenge. 2.2. Solutions To address the conflict between charging demand and energy storage management, the following two solutions can be considered: 2.2.1. Optimizing Energy Storage System Scheduling Strategies Introducing adaptive control algorithms, such as reinforcement learning-based scheduling strategies, to dynamically adjust the charging and discharging strategies of energy storage systems based on real-time data, thereby balancing EV charging demand and energy storage system scheduling [6]. 2.2.2. Bi-level Optimization Model Employing multi-level optimization models by decomposing the problem into upper-level charging demand optimization and lower-level energy storage system optimization. By coordinating the upper and lower level models, the optimization of charging demand and energy storage scheduling is achieved. For example, the upper-level model optimizes distribution network scheduling, while the lower-level model optimizes microgrid operation, using Point of Common Coupling (PCC) for power exchange, thereby enhancing overall system efficiency and stability [7]. These solutions can effectively alleviate the conflict between charging demand and energy storage management, improving the overall efficiency and stability of microgrid systems by improving forecasting techniques, optimizing scheduling strategies, introducing demand response mechanisms, and employing multi-level optimization models. 3. Impact of EV Charging Load Fluctuations on Microgrids In recent years, electric vehicles (EVs) have received widespread attention as green transportation tools. With the rapid development of the EV market, charging demand has significantly increased, reflected in the rising number of EVs, diversified charging methods, and widespread charging infrastructure. However, the fluctuations in EV charging loads pose new challenges to the stability and economy of microgrids. 3.1. Major Causes of Impact EV charging behavior is random and influenced by user habits and demand, with peak charging potentially causing a significant load increase. Variations in charging power and differences between fast and slow charging also affect load fluctuations. Peak hours in the morning and evening, as well as late at night, are periods of fluctuating charging demand. Weather and seasonal changes, especially in winter, impact EV battery performance and charging demand. To mitigate the impact on microgrids, attention should be focused on power, weather, and seasonal variations. 3.2. Challenges in Addressing the Impact Due to the randomness and time-dependence of EV charging loads, microgrids need to have sufficient flexibility and real-time scheduling capabilities. This imposes high requirements on the control systems of microgrids, particularly in load forecasting and scheduling decision- making. Specifically, the following aspects increase the difficulty of the issue: 3.2.1. Complexity of Load Forecasting EV charging load forecasting is complex due to the randomness and variability of charging loads, making traditional methods potentially inaccurate. Advanced machine learning and deep learning models are needed to improve forecasting accuracy, but training and validating these models require large amounts of data and computational resources, increasing forecasting difficulty. 263 3.2.2. Challenges in Real-time Scheduling Real-time scheduling of microgrids needs to be adjusted based on EV charging load forecasts. Load fluctuations may lead to frequent changes in scheduling, challenging the response speed and flexibility of the scheduling system, requiring algorithms to process large volumes of data and make rapid decisions. 3.2.3. Ensuring System Stability Severe fluctuations in EV charging loads may affect the stability of microgrids, leading to voltage and frequency instability. Therefore, voltage and frequency regulation technologies need to be incorporated into load forecasting and scheduling to ensure the stable operation of microgrids. 3.2.4. Economic Optimization When addressing EV charging load fluctuations, microgrids need to balance system stability with economic benefits. The key lies in optimizing the configuration of charging facilities, formulating charging strategies, and controlling energy costs. 3.3. Solutions To address the impact of EV charging loads on microgrids, dynamic scheduling strategies can be employed. By adjusting charging plans (such as charging times or power) in real-time to balance loads, and using demand response technologies to charge during low power demand periods, the impact on the grid can be reduced. Microgrid scheduling strategies are based on successful experiences and expert knowledge, and involve prioritizing the allocation of load demands among different generation units. By observing the different operating conditions of typical WT-PV-BS microgrids in off-grid modes, multi-mode scheduling strategies S can be obtained, as shown in formula (1), with four possible basic scheduling strategies [8]. S S , S , S , S (1) S ——Load tracking strategy based on BS in island mode, where, under adequate DG unit power supply, the BS charge/discharge strategy tracks system power fluctuations according to system load demand S ——Normal load-following strategy where EPG and DG supply follow system power fluctuations, but charging to or discharging from BS S ——Peak-shaving strategy where BS discharges at full load, DG operates to meet remaining load demand and sells electricity to EPG S ——BS charging strategy where DG output meets system load demand and charges the BS Dynamic scheduling strategies rely on accurate load forecasting and optimization algorithms. Forecasting models need to consider EV charging habits, user behavior, and weather factors to provide accurate load forecasts. Based on these forecasts, scheduling algorithms can dynamically optimize the distribution of charging loads to achieve the best grid operating state. Dynamic scheduling strategies enhance the grid’s ability to respond to sudden load changes, quickly adjust charging and storage plans to adapt to load fluctuations, reduce uncertainty and risks in microgrids, and optimize charging to lower operational costs. 4. Multi-objective Bi-level Optimization Techniques Multi-objective bi-level optimization techniques combine multi-objective optimization (MO) and bi-level optimization (BLO) to solve complex optimization problems. MO addresses multiple conflicting objectives, while BLO handles problems involving upper and lower-level decision-making. Practical applications, such as energy management, traffic scheduling, and supply chain management, often involve multiple objectives and levels, making traditional methods inadequate. This has driven the development of new algorithms, such as heuristic algorithms and robust optimization, aimed at improving computational efficiency and handling data uncertainty. 4.1. Bi-level Optimization Modeling with Mixed-line Production Lines as an Example In the upper level of the model, decisions need to be made regarding the allocation of product family tasks. Specifically, this involves reasonably assigning these tasks to different workstations while adhering to job priority conditions. The basic criteria for evaluating this allocation include balancing the workload within each workstation, balancing the load between workstations, and the overall benefits of dynamic balance. In mixed-line production lines, similar tasks for different products may have different operation times. Additionally, the operation time of each task may vary. Therefore, when these tasks are allocated to different workstations, the workload time at each workstation may approach or exceed the set cycle time. In such cases, consideration is needed for balancing the workload of different products at each workstation while ensuring that the workload between different workstations remains balanced. The proposed goals for balancing workload within workstations and between workstations are represented by formula (2). (2) In the sorting problem of mixed-model production lines, due to different operation times for similar tasks of different products, different production sequences may lead to different waiting times when these tasks are assigned to the same workstation. Assuming that the working time at each workstation on the mixed-model line is based on the maximum working time, other workstations must continue operations only after the completion of tasks at this workstation. Therefore, one of the optimization objectives is to balance the working time at each workstation with the maximum working time across all workstations. The objective function is given by formula (3). 264 (3) The upper-level objective function considers the balance and sequencing issues of mixed-model production lines. In this paper, the upper-level objective function is formulated as the minimum product of internal workload balance at workstations, inter-workstation workload balance, and dynamic balance, using a nested genetic algorithm for multi- objective bi-level optimization, exemplified by mixed-model line planning, as shown in formula (4). F (Y,X) J J J (4) The lower-level model involves the production scheduling decisions for the mixed-model production line. Scheduling determines the load levels at each workstation and the timing of material requirements, all of which are related to costs [9]. 4.2. Results Analysis: The upper-level decision involves assigning tasks to workstations to optimize production efficiency, while the lower-level decision deals with task sequencing to reduce waiting times and working hours. The upper-level optimization focuses on load balancing and resource allocation, whereas the lower-level optimization concentrates on task sequencing to minimize idle time. Multi-objective bi- level optimization techniques balance the production line and enhance overall efficiency by dynamically adjusting task allocation and sequencing, thereby maintaining optimal production performance in a dynamic environment. 5. Outlook 5.1. Further Research on Charging Demand and Energy Storage Management: Intelligent Scheduling Technologies: Future work should incorporate AI and machine learning technologies to analyze and adjust electric vehicle charging and energy storage systems in real-time for efficient coordination. Demand Response Mechanisms: Optimize demand response mechanisms through dynamic pricing, incentives, and real-time feedback to balance charging demand and energy storage systems, particularly during peak and off-peak periods. Cross-Regional Coordination: Research how to optimize charging demand and energy storage management across different microgrids and main grids, achieving load shifting, energy storage sharing, and joint scheduling. 5.2. Study of Electric Vehicle Charging Load Fluctuations on Microgrids: Fluctuation Prediction and Control Technologies: Develop high-precision forecasting models and real-time data analysis to optimize microgrid operation strategies and mitigate load fluctuation impacts. Fluctuation Suppression Technologies: Investigate new energy storage systems and rapid response devices, such as supercapacitors and advanced battery management systems, to handle sudden fluctuations in charging load. Charging Mode Optimization: Explore the effects of different charging modes on load fluctuations and optimize charging strategies (e.g., smart charging and demand response) to smooth out load curves. 5.3. Development Trends in Multi-Objective Bi-Level Optimization Technologies: Algorithm Improvements: Research new optimization algorithms (e.g., hybrid algorithms, evolutionary algorithms, intelligent algorithms) to enhance solution efficiency and optimization quality. Multi-Scale Optimization: Explore multi-objective optimization across different temporal and spatial scales to achieve comprehensive optimization results. Practical Application Validation: Validate and adjust multi- objective bi-level optimization technologies in real microgrids to ensure the effectiveness and feasibility of models and algorithms. 6. Conclusion The bi-level optimization scheduling problem for electric vehicle charging and energy storage systems in microgrids holds significant practical importance and complexity. By conducting a detailed study of the conflicts in charging demand and energy storage management, the impact of charging load fluctuations on microgrids, and the application of multi-objective bi-level optimization technologies, valuable insights and solutions can be obtained. 6.1. Conflicts in Charging Demand and Energy Storage Management: Conflict Manifestation: Increasing electric vehicle charging demand puts pressure on the energy storage system, affecting microgrid stability. Solutions: Optimize charging schedules, improve energy storage management strategies, and introduce intelligent scheduling and demand response mechanisms. Future developments may include AI-based intelligent scheduling and dynamic optimization algorithms. 6.2. Impact of Electric Vehicle Charging Load Fluctuations: Impact of Fluctuations: Charging load fluctuations may lead to load imbalances and system instability in the grid. Countermeasures: Improve forecasting models, optimize charging modes, and innovate fluctuation suppression technologies. Future research should focus on advanced forecasting techniques and new energy storage systems to enhance microgrid stability. 6.3. Application of Multi-Objective Bi-Level Optimization Technologies: Technical Significance: Multi-objective bi-level optimization technologies achieve optimal resource allocation and improved production efficiency by integrating multiple objectives. Future Directions: Algorithm improvements and innovations, multi-scale optimization, and practical application validation. Optimization technologies should be adjusted according to technological advancements and actual needs to adapt to changing environments. Overall, research into charging demand, energy storage management, load fluctuations, and optimization technologies can enhance the scheduling efficiency and 265 stability of microgrids, contributing to the realization of intelligent and green power systems. References [1] I Bowen, Fan Ying.(2023). Research on power system planning under high proportion of renewable energy access[J]. Journal of management science, 2023, (10): 21-35. [2] Fu Yang, Xing Xing-Yue, LI Zhen-Kun, et al.(2022)Multi- stage robust optimization planning of microgrid group based on master-slave game[J].Power automation equipment, 42(04): 1-8. [3] Room Super Yun, Yang Kun & Chai Ruihuan.(2024).Two- layer multi-objective optimal scheduling of microgrid groups with electric vehicles at TOU.Journal of Electric Power Science and Technology(01),39:124-133. [4] Choudhury Subhashree. (2022). Review of energy storage system technologies integration to microgrid: Types, control strategies, issues, and future prospects. Journal of Energy Storage,48:1-2 [5] AbuElrub A ,Hamed F ,Saadeh O .(2020).Microgrid integrated electric vehicle charging algorithm with photovoltaic generation [J]. Journal of Energy Storage, 32:1-2. [6] Pang Kexin.(2023).Research on elastic microgrid expansion planning based on deep reinforcement learning[D].Nanjing University of Science and Technology.25-30. [7] Mei Peng, Lin Zhixian, Li Tengfei.(2023).Cloud model based two-layer optimal scheduling method of distributed photovoltaic distribution network [J]. Radio engineering, 53 (09): 2158-2164. [8] Dong Hai, Cao Xiaolan.(2023). Dynamic scheduling of hybrid energy microgrids based on policy drive[J].Journal of Solar energy, 44(07):22-29. [9] Zhang Wei, Wang Lijuan, Peng Jingli.(2023) Nested genetic algorithm for multi-objective bilevel optimization: A case study of mixed line programming [J]. Mechanical and electrical engineering technology,52(11):38-42.