
94% of researchers rate our articles as excellent or good
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.
Find out more
METHODS article
Front. Energy Res., 07 April 2025
Sec. Smart Grids
Volume 13 - 2025 | https://doi.org/10.3389/fenrg.2025.1574038
To address the issues of insufficient control parameter identification accuracy and convergence speed during the grid connection of distributed power sources, a control parameter identification method for the Virtual Synchronous Generator (VSG) converter model considering the integration of electric vehicles (EVs) based on the dynamic particle swarm optimization algorithm is proposed. By constructing a VSG inverter control model suitable for distributed power sources and EV charging systems, analyzing the interactions between active and reactive power control loops under EV integration scenarios, selecting parameters and observations to be identified, and improving the Particle Swarm Optimization (PSO) algorithm based on actual conditions, the method ensures enhanced system adaptability. Simulation results demonstrate that the proposed method exhibits higher dynamic response capabilities, system stability, and adaptability under varying load conditions and uncertainties introduced by EV charging behaviors, highlighting its significant engineering application value.
With the global transformation of energy structure and the widespread application of renewable energy, the proportion of distributed energy sources such as photovoltaics and wind power in power systems is increasing. This raises higher demands for the stability and dynamic response of the grid. Traditional power systems rely on synchronous generators to provide stable voltage and frequency support. However, due to the variability and uncertainty of renewable energy output, the complexity of grid operation has significantly increased. As a result, Virtual Synchro-nous Generator (VSG) technology has emerged as one of the key solutions to this problem (Dai et al., 2022). Among the key aspects of VSG technology, the most critical issue is the identification of control parameters. To improve identification accuracy and system stability, various methods have been proposed, including traditional techniques such as least squares estimation, Kalman filtering, and gradient-based optimization methods (Marques and Verdelho, 1998). However, these traditional methods suffer from slow convergence speeds and are prone to being affected by local minimum, particularly when dealing with nonlinear dynamic systems like VSG. VSG technology enhances the stability and dynamic response of the power grid by simulating the inertia and damping characteristics of traditional synchronous generators (Xia et al., 2024) However, traditional control parameter identification methods often suffer from slow convergence and insufficient accuracy, making precise control difficult under complex operating conditions (Li, 2022). To address these issues, intelligent optimization-based control parameter identification methods have received increasing attention in recent years (Driesen and Visscher, 2008). Among them, Particle Swarm Optimization (PSO) is highly regarded for its simplicity, ease of implementation, and strong global search capabilities. However, the standard PSO algorithm is prone to falling into local optima, which limits its performance, especially when applied to dynamic nonlinear systems like VSG (Torres and Lopes, 2009). To overcome these limitations, this study develops a VSG inverter control model suitable for distributed energy, investigates the impact of active and reactive power control loops on system performance (Karapanos et al., 2011), and improves the PSO algorithm to enhance the accuracy and convergence speed of control parameter identification (Liu et al., 2017). In addition, recent studies have proposed various control strategies to enhance the inertia and damping capabilities of VSG, thereby supporting grid stability. Combining these strategies with intelligent optimization algorithms can significantly improve the system performance of VSG in microgrid environments. Simulation results show that the improved PSO outperforms traditional methods under practical conditions.
Furthermore, with the rapid global adoption of electric vehicles (EVs), their integration into the power grid has become increasingly important. Electric vehicles not only represent a new massive load but also act as distributed energy resources through Vehicle-to-Grid (V2G) technology (Vishnu et al., 2023). VSG plays a crucial role in facilitating the interaction between electric vehicles and the grid by providing necessary inertia and damping characteristics to stabilize the grid during the charging and discharging process of electric vehicles. Therefore, optimizing VSG control parameters is vital to ensuring the efficient and reliable integration of electric vehicles with the power grid. The method proposed in this study enhances the ability of VSG to respond to the dynamic demands introduced by electric vehicles, thus supporting the seamless integration of electric transportation with the existing power infrastructure. The writing structure of this article is as follows. Section 1 provides an overview of the research content of this paper; Section 2 introduces the parameter identification methodology for virtual synchronous generators (VSGs); Section 3 elaborates on the simulation process and analysis of results; Section 4 discusses the simulation findings and Section 5 concludes with a comprehensive summary of the entire paper. Compared with existing research, the novel contributions of this paper can be summarized as follows:
1. We have improved the inertial weight and learning factors in conventional particle swarm optimization algorithms through dynamic adjustment mechanisms to enhance global search capability.
2. The velocity and position update rules of conventional particle swarm algorithms have been optimized to accelerate convergence speed.
3. The algorithm’s response has been tested under scenarios involving electric vehicle load disturbances, validating its robustness in practical applications.
To overcome the limitations of traditional identification methods, a dynamic Particle Swarm Optimization (PSO) algorithm is proposed for identifying the control parameters of the VSG inverter. By dynamically adjusting the algorithm’s inertia weight and learning factors, the global search capability and local optimization performance are significantly enhanced, leading to improved accuracy and faster convergence in the identification process.
Electric vehicles (EVs) have two main characteristics: one is the need for charging, and the other is their ability to move randomly. Therefore, EVs are stochastic mobile loads, and these two attributes pose several challenges to the operation of the power grid. First, the charging process of EVs introduces high-order harmonics, which can affect the normal operation of electrical equipment. Second, due to the randomness of charging, grid voltage fluctuations are more likely to occur, leading to increased network losses and operational costs. As the number of EVs increases, their charging and discharging behaviors further exacerbate load fluctuations and uncertainties. To address these issues, this study incorporates an EV load model into the VSG inverter control framework, considering the rapid load variations caused by dynamic charging demands. By analyzing the impact of EV load characteristics on both active and reactive power control loops, and combining dynamic particle swarm optimization algorithms, the proposed method enhances the adaptability and robustness of the control parameter identification process under conditions of rapidly changing loads and high uncertainty. This approach effectively mitigates the negative impacts of EV charging on the power grid, thereby improving the stability and operational efficiency of the grid.
In order to achieve stable grid integration of distributed energy sources, it is first necessary to establish the control model for the VSG inverter. The core of this model involves simulating the active and reactive power control loops of a traditional synchronous generator, which regulate the output frequency and voltage, thereby enabling intelligent control of distributed energy sources.
The active power control loop of the VSG simulates the rotor dynamics of a traditional synchronous generator, as shown in Equation 1:
The reactive power control loop of the VSG simulates the voltage regulation equation of a traditional synchronous generator, as shown in Equation 2:
Among them.
Through the combined operation of these two control loops, the VSG can effectively regulate the output characteristics of distributed generation and improve its dynamic response capability and stability in the power grid.
Figure 2 shows the schematic diagram of the VSG-controlled inverter. It mainly includes the AC grid, power electronic switches, filter capacitors and inductors, pow-er measurement unit, dual-loop system, and PWM (Pulse Width Modulation) components.
To improve the efficiency of the PSO algorithm and prevent premature convergence, the inertia weight (
Among them.
In addition, the population initialization method has also been improved. The initial position and velocity of each particle are defined Equation 4:
Among them.
After initializing the algorithm, the fitness function values of each particle are evaluated based on the parameters to be identified. In each iteration, the particle’s new personal best is calculated and updated. By comparing the personal best positions of all particles, the global best is updated. Once the accuracy requirement is met, the iteration stops, and the optimal fitness value and the parameters to be identified are output.
The update of particle position and velocity is Equation 5:
Among them.
The improvement to the traditional PSO algorithm proposed in this study involves dynamic adjustments of inertia weight and learning factors to enhance both the global search ability and local optimization efficiency. The inertia weight, which determines the influence of previous velocities, is dynamically adjusted to balance exploration and exploitation throughout the optimization process. This adjustment helps the algorithm to avoid premature convergence and improves its ability to escape local optima. The learning factors, which control the influence of individual and social best positions, are also adapted to ensure faster convergence without sacrificing the global search ability. In comparison to standard PSO, the proposed method shows superior performance, particularly in complex and nonlinear systems, by providing faster convergence and higher accuracy in parameter identification. Additionally, when compared to other optimization algorithms such as Genetic Algorithms (GA) and Ant Colony Optimization (ACO), PSO demonstrates better efficiency in this application due to its less computational complexity and its ability to better handle continuous optimization problems with fewer parameters to tune. These improvements allow the proposed PSO algorithm to effectively identify control parameters in the VSG inverter model under varying conditions, showcasing its strong potential for real-world applications. Figure 3 introduces the process of the dynamic particle swarm optimization algorithm.
To validate the performance of the proposed PSO method, we conducted comparative simulations between standard PSO and our improved algorithm. The results in Table 1 indicate that the proposed method achieves a lower RMSE in parameter identification across multiple scenarios. Furthermore, our algorithm maintains its accuracy while reducing computational cost, making it more suitable for real-time applications in complex nonlinear systems.
In order to verify the effectiveness of the proposed improved particle swarm optimization algorithm in the control parameter identification of the VSG converter, we built the control module of the VSG converter in the MATLAB simulation environment. Figure 4 shows a topology diagram of the VSG control model.
Figure 5 shows the connection between the VSG system and the power grid. It mainly consists of components such as the Virtual Synchronous Generator (VSG) control module, power electronic converter, filter capacitors and inductors, and pow-er measurement devices. The VSG control module is the core part of the grid connection topology. It simulates the inertia and damping characteristics of a synchronous generator by adjusting the inverter’s output power, ensuring synchronization between the generator and the grid. The power electronic converter converts the grid’s AC power into DC power for charging electric vehicle loads. The filter capacitors and inductors are used to smooth the output current and voltage waveforms, reduce harmonic interference, ensure the quality of the system’s power, and improve the stability of the system. Power measurement devices monitor the power flow within the system and provide feedback signals to the VSG control module, maintaining synchronization with the grid.
Figure 5 shows the simulation architecture of the VSG (Virtual Synchronous Generator) converter module, covering the entire process from coordinate transformation to final power output. It is divided into four main parts.
The first part is the coordinate transformation section. The core function of this module is to convert the three-phase stationary coordinate system (abc coordinate system) into the synchronous rotating coordinate system (dq coordinate system). By processing current and voltage in the rotating coordinate system, the time-varying issues of the three-phase system can be transformed into a DC problem. This allows the current components to be decoupled, making the control more stable and easier to implement, and facilitating subsequent electromotive force (EMF) generation and power regulation. At the same time, it simplifies the control algorithm, reduces computational load, and helps improve the system’s real-time response speed and accuracy.
The second part is the electromotive force (EMF) generation layer. This module controls the magnitude and frequency of the EMF to simulate the operating characteristics of a traditional synchronous generator, allowing the system to remain synchronized with the grid during varying loads and fluctuations in power demand, providing a stable output similar to that of a traditional generator. It can also dynamically adjust the required EMF according to load changes, ensuring that the system can provide stable power under different load conditions. This enables the system to have higher flexibility and responsiveness. Figure 6 shows the block diagram of parameter identification. From the diagram, it can be seen that the active and reactive components of the electromotive force generation module are controlled, thereby achieving the identification of VSG control parameters.
The third part is the PWM signal generation layer, which combines the output from the EMF generation layer with the reference voltage to generate the necessary PWM signals for driving the power conversion in the next stage. This module ensures high-precision regulation of the output voltage, allowing the converter to efficiently supply power to the load while avoiding issues like waveform distortion or low efficiency that may arise with traditional control methods.
Finally, the main circuit layer is the core power output section of the VSG converter module. It converts the control signals and voltage generated by the previous module into efficient, stable power through power electronic devices (such as IGBTs), and outputs this power to electric vehicles or other load devices.
To assess the robustness of the improved PSO algorithm, we designed simulations under two distinct operating conditions: (1) normal conditions, where the load variation is moderate and predictable, and (2) harsh conditions, where sudden and significant load disturbances are introduced. The technical differences are summarized in Table 2.
In the simulation, the improved particle swarm optimization algorithm was compared with the standard particle swarm optimization algorithm. The evaluation metrics include the relative error and root mean square error (RMSE) of the parameter identification to assess the accuracy of the identification. The initial values of the standard identification parameters are set as shown in Table 3.
The simulation time is set to 0.5 s. From 0 to 0.2 s, the load consists of a steady 120 kW base load representing other types of non-EV loads. At 0.2 s, an electric vehicle (EV) charging load is introduced, increasing the total load to 140 kW. To simulate the dynamic characteristics of EV charging, an active load disturbance of 20 kW is added between 0.3 and 0.4 s, representing the rapid fluctuations in power demand caused by EV charging behaviours under actual operating conditions. This setup reflects the interaction between the VSG control and the varying load profiles, including both traditional loads and EV-specific dynamics. At the same time, corresponding identification parameters and observation values are selected,
Using the improved algorithm for iterative optimization, the number of iterations is set to 100, and the population size is set to 20. After reaching the maximum number of iterations, the optimal parameters are output as the identified parameters. The identification error is calculated using relative error to verify the validity of the identified parameters. The final simulation results are obtained. As shown in Table 4, the identification errors of the improved algorithm are significantly lower than those of the traditional algorithm for all parameters, especially for the identification of the damping coefficient
Figures 9, 10 shows the variation curves of active and reactive power output from the VSG converter under different load disturbance conditions. As can be seen from the figure, the improved algorithm is able to respond to load changes more quickly and accurately track the reference values, demonstrating the superiority of the improved algorithm.
The initial values of the standard identification parameters are set as shown in Table 5.
Table 5. Setting the initial values of the standard identification parameters under harsh conditions.
The simulation time is set to 0.5 s. From 0 to 0.2 s, the load is 120 kW, and from 0.2 to 0.5 s, the load is 140 kW. An 80 kW active load is introduced between 0.3 and 0.4 s to simulate the scenario of an electric vehicle charging. At the same time, corresponding identification parameters and observation values are the same as those in the normal scenario.
The improved dynamic algorithm is used for iterative optimization, with the same number of iterations and population size as in the standard case. In the simulation, the electric vehicle is model as a load during the charging process, with load disturbances introduced. The final results, as shown in Table 6, demonstrate that the dynamic algorithm can accurately track these disturbances, ensuring the stability of the charging process.
The number of iterations of the design at this stage is the same as the population size and normal conditions, and the identification parameters are output after the number of iterations are reached, and the simulation results are finally obtained.
Figures 11, 12 show the variation curves of active and reactive power output from the VSG converter during the electric vehicle charging process. The enlarged section shows the variation in reactive power after the electric vehicle load is connected. As seen from the figures, the dynamic particle swarm optimization algorithm can quickly respond to changes in the electric vehicle and accurately output the design values, meeting the charging requirements of the electric vehicle.
The simulation results indicate that the improved particle swarm optimization (PSO) algorithm significantly enhances the accuracy and convergence speed of VSG converter control parameter identification. Particularly in the face of nonlinear and complex operating conditions, the improved algorithm demonstrates better global search capability and disturbance resistance. In addition, simulations of electric vehicle load under harsh conditions were conducted, and the results indicated that the algorithm has strong adaptability. In contrast, the traditional PSO algorithm is more prone to getting stuck in local optima during the iteration process, resulting in unstable identification results. The effectiveness of the improved algorithm is mainly reflected in the following aspects:
1. Dynamic adjustment of inertia weight and learning factors enhances the global search capability, enabling the algorithm to escape local optima more quickly.
2. Optimizing the particle update rules improves the convergence speed of the algorithm, allowing it to obtain better solutions with fewer iterations.
3. Under electric vehicle load disturbance conditions, the algorithm can respond quickly to changes, maintaining high control accuracy and system stability.
While the improved PSO algorithm significantly enhances the accuracy and convergence speed of VSG control parameter identification, it has certain limitations. First, the dynamic adjustment of inertia weight and learning factors increases computational complexity. Second, the algorithm remains sensitive to hyperparameter selection, which may require additional tuning. Third, the scalability of the method in large-scale distributed energy systems is yet to be extensively validated. Lastly, although the method performs well under various disturbances, extreme grid scenarios require further study. Future research will explore adaptive learning-based PSO, automated hyperparameter tuning, and applications in multi-agent VSG coordination to overcome these challenges.
This study addresses the issues of insufficient accuracy and convergence speed in the control parameter identification of Virtual Synchronous Generator (VSG) converters during the integration of distributed power sources. A dynamic particle swarm optimization (PSO) algorithm is proposed. By constructing a control model for the VSG converter suitable for distributed power sources and combining it with the dynamic PSO algorithm, the accuracy and efficiency of control parameter identification are significantly enhanced. The simulation results verify the effectiveness and superiority of the proposed method.
Furthermore, the enhanced dynamic response and system stability achieved through the proposed method not only improve the integration of distributed energy sources but also facilitate intelligent charging and discharging management of EVs. This contributes to more efficient energy utilization and supports the deep integration of renewable energy with electric mobility, advancing the development of smart grids. Future research will focus on exploring particle swarm optimization (PSO) algorithms with automated hyperparameter tuning and mitigating systemic complexities through intelligent swarm control, while extending their applications to large-scale electric vehicle (EV) fleet management, aiming to address evolving energy demands.
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.
DW: Conceptualization, Funding acquisition, Methodology, Project administration, Supervision, Validation, Writing–review and editing. YH: Formal Analysis, Validation, Writing–original draft.
The author(s) declare that financial support was received for the research and/or publication of this article. This research was funded by the State Grid Zhejiang Electric Power Science and Technology Project 5211DS23000R.
Author YH was employed by State Grad Aksu Electric Power Supply Company.
The remaining author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
The authors declare that no Generative AI was used in the creation of this manuscript.
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Dai, Y., Zhang, L., Chen, Q., Zhou, K., and Hua, T. (2022). Multi-VSG-based frequency regulation for uninterruptible power AC micro-grid with distributed electric vehicles. Int. J. Electr. Power Energy Syst. 137, 107785. doi:10.1016/j.ijepes.2021.107785
Driesen, J., and Visscher, K. (2008). “Virtual synchronous generators,” in 2008 IEEE Power and Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st Century, Pittsburgh, PA, USA, 20-24 July 2008 (IEEE), 1–3. doi:10.1109/PES.2008.4596800
Karapanos, V., de Haan, S., and Zwetsloot, K. (2011). “Real time simulation of a power system with VSG hardware in the loop,” in IECON 2011 - 37th Annual Conference of the IEEE Industrial Electronics Society, Melbourne, VIC, Australia, 07-10 November 2011 (IEEE), 3748–3754. doi:10.1109/IECON.2011.6119919
Li, K. (2022). The FPGA-based parallel multi-rate electromagnetic transient real-time simulation method for inverters. Available online at: http://www.aeps-info.com.
Liu, W., Wen, Z., Shen, Y., and Zhang, Z. (2017). “Reinforcement learning-based distributed secondary optimal control for multi-microgrids,” in 2017 IEEE Conference on Energy Internet and Energy System Integration (EI2), Beijing, China, 26-28 November 2017 (IEEE), 1–4. doi:10.1109/EI2.2017.8245443
Marques, G. D., and Verdelho, P. (1998). “Control of an active power filter based on input-output linearization,” in IECON ’98. Proceedings of the 24th Annual Conference of the IEEE Industrial Electronics Society (Cat. No.98CH36200), Aachen, Germany, 31 August 1998 - 04 September 1998 (IEEE), 456–461. doi:10.1109/IECON.1998.724286
Torres, M., and Lopes, L. A. C. (2009). “Virtual synchronous generator control in autonomous wind-diesel power systems,” in 2009 IEEE Electrical Power and Energy Conference (EPEC), Montreal, QC, Canada, 22-23 October 2009 (IEEE), 1–6. doi:10.1109/EPEC.2009.5420953
Vishnu, G., Kaliyaperumal, D., Jayaprakash, R., Karthick, A., Kumar Chinnaiyan, V., and Ghosh, A. (2023). Review of challenges and opportunities in the integration of electric vehicles to the grid. World Electr. Veh. J. 14, 259. doi:10.3390/wevj14090259
Keywords: VSG converter, EV charging, generator control model, parameter identification, particle swarm optimization
Citation: Wu D and Hu Y (2025) Control parameter identification method for virtual synchronous generator considering electric vehicles based on dynamic particle swarm optimization. Front. Energy Res. 13:1574038. doi: 10.3389/fenrg.2025.1574038
Received: 10 February 2025; Accepted: 21 March 2025;
Published: 07 April 2025.
Edited by:
Shuai Lu, Southeast University, ChinaReviewed by:
Zhao Luo, Kunming University of Science and Technology, ChinaCopyright © 2025 Wu and Hu. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Dongqi Wu, d3Vkb25ncWkyMDIwQDE2My5jb20=
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
Research integrity at Frontiers
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.