View on Github

Dynaωo

The nature of power system is deeply evolving towards a more diverse and difficult to predict behaviour due to the massive changes going on in the power system (large penetration of power-electronic based components such as Renewable Energies Sources - RES - or High Voltage Direct Current - HVDC - lines, booming use of complex automata, control strategies or smart grids). Due to this radical change from physically-driven to numerically-driven dynamics, being able to assess the system stability becomes harder but is still essential as any generalized incident will be unacceptable for the economy and the consumers. This requires to have access to a transparent, flexible, robust and easy to use suite of simulation tools that will allow to run collaborative studies in a very simple way by sharing not only the same data but also the same modelling and solving choices in an open-source frame. Such a tool will ensure to get similar results and to agree upon optimal and shared actions on the system to accompany the ongoing changes in the best possible way. This analysis has motivated us to launch a new effort on simulation tools that finally ends up in the development of the Dynaωo’s software.

To achieve this goal, Dynaωo is based on two mains principles: the use of a high-level modelling language Modelica and a strict separation between modelling and solving parts.

image

Modelica is an equation-based, declarative and object-oriented modelling language that is easy to read and understand. The equations are written in a similar way than they are written in textbooks for example. Using this language enables to easily share and discuss the modelling choices done because the final models implementation is available in an understandable way, even for the end-user. The Modelica language is already used in different and various industrial sectors. It is important to mention that Modelica-based tools already exist (Dymola, OpenModelica, JModelica, etc.) but they are not efficient enough for large-scale simulation of power system, which was one of the motivation for developing Dynaωo. In addition to this, the Modelica language itself has some limitations that are adressed in Dynaωo by the possibility to use C++ models in a similar way as Modelica models. Anyway, in the end all Modelica models are converted to C++ by Dynaωo.

In order to transform the Modelica code into an executable C code, Dynaωo uses OpenModelica, which is an open-source Modelica-based modelling and simulation environment, and particularly the OpenModelica compiler. OpenModelica is the Modelica open source environment that is the most widely used today in the Modelica community and that covers the best the language norm. As such and in order not to develop an in-house solution that will be difficult to maintain in the long-term, as well as to benefit from developments and progresses made for other industrial sectors simulations, we have made the choice to build Dynaωo upon OpenModelica. In addition to the transformation done by the OpenModelica compiler, Python scripts are implemented into Dynaωo to transform the outputs from the OpenModelica compiler in a generic frame that is also common to the C++ models available in Dynaωo. All the thereby generated C++ models are then combined to build a global model that will interact with the solving part.

image

To ensure acceptable performances both for compilation and simulation, a mechanism has been created into Dynaωo to compile non squared Modelica models individually (for example a generator model by itself) and before the simulation. These compiled models are then only instantiated during the simulation. This strategy enables to use Dynaωo for large-scale simulations (French EHV-HV networks - ie 250 000 continuous and 250 000 discrete variables) while keeping computation times in a range close to current simulation tools.

The global model only exposes a few methods to the solvers such as the residual functions, the Jacobian function or the zero-crossing functions. Having a separation between the modelling and the solving parts means that the choice of the numerical resolution method doesn’t interfere with the models implementation. This feature has several advantages: it enables to easily test or use new solvers, it eases the addition of new model and it allows modelling experts not to bother about numerical difficulties and vice versa.

image

There are currently two solvers included into Dynaωo:

One important idea in Dynaωo is that the same models could be used for different stability studies. It is the overall association between the different models and the selected solving strategy that enables to run a specific stability study. For example, short-term stability studies and long-term stability studies share a large common set of models but use different solving strategies. Indeed, short-term stability studies are simulated using the IDA solver which manages to capture the fast dynamics while long-term stability studies are done with the simplified solver that approximates the fast dynamics but enables to study the system long-term behavior with very good simulation times.

Dynaωo ‘s primary focus has been on long-term and short-term stability studies but the very encouraging results obtained and the flexibility of the approach led to an extension of the initiative. Dynaωo is now evolving towards a complete and coherent suite of simulation tools, sharing the same philosophy:

image

image

High level vision of the Dynaωo initiative

More details on the philsophy of Dynaωo can be found in our publications.