Simulating the synchronization loop of a grid-following converter in OpenModelica

Other authors

Universitat Politècnica de Catalunya. Departament d'Enginyeria Elèctrica

Prieto Araujo, Eduardo

Carreño Galeano, Miguel Alberto

Publication date

2025-07-16



Abstract

The increasing penetration of renewable energy sources such as solar and wind power into modern electrical grids has led to a fundamental shift in power system dynamics, from synchronous generator based systems to converter based systems. In this context, Voltage Source Converters (VSCs) serve as the primary interface between renewable energy sources and the grid. The performance and stability of these VSCs depend critically on two key control mechanisms: the inner current control loop and the outer synchronization mechanism, commonly implemented using a Phase Locked Loop (PLL). This thesis investigates the modelling, simulation, and validation of these control loops, particularly within the environment of OpenModelica, an open-source, equation based simulation tool and its integration with Dynawo, a modular simulation framework. The objective of this project is twofold. First, it aims to construct and simulate a grid- following converter that includes both a current control loop and a PLL, using OpenModelica. Second, it explores the feasibility of integrating this setup with Dynawo to manage multiple simulation cases efficiently. The current control loop is modelled in the dq-frame and is designed using PI controllers. Derivations of the current loop are provided to establish a theoretical foundation. The PLL model is studied under various network configurations, ranging from ideal voltage sources to RL elements. To derive the conditions under which the system remains stable. Theoretical expressions for PI controller gains are developed for each case based on the system’s natural frequency and damping ratio. Simulations were carried out for different scenarios by varying the proportional and integral gains of the PLL. The simulation results confirm the analytical findings, demonstrating how poor tuning can lead to instability, especially in weak grid conditions. The implementation of the model in OpenModelica required the creation of custom blocks for Park and Inverse Park transformations, as well as for the PLL and current loop, highlighting the flexibility and adaptability of the tool. Integration with Dynawo was partially successful, providing valuable insights into the limitations. This work provides a valuable framework for future research and development involving grid-following converters and control strategies. It also underscores the importance of open source tools, offering an alternative to platforms like MATLAB/Simulink. Furthermore, the economic, environmental, and social impacts of the simulation setup are assessed to demonstrate its sustainability and inclusiveness. Overall, this thesis contributes both technically and practically to the field of power electronics and renewable energy integration.

Document Type

Master thesis

Language

English

Publisher

Universitat Politècnica de Catalunya

Recommended citation

This citation was generated automatically.

Rights

Open Access

This item appears in the following Collection(s)