5.3.2 Lecture Notes Cosimulation for energy system analysis

Course subject(s) 5. Multi-carrier Grid Integration

Co simulation

This image is from freepik

This lecture will discuss the co-simulation in energy systems. The following topics will be covered:

  • The meaning of co-simulation
  • The working of a co-simulation
  • The errors in a co-simulation
  • The use cases

The meaning of co-simulation

The meaning of co-simulation can be understood from the following example. Consider a local energy system operator (LSO), who has to control the electricity, gas, and heat distribution in a certain community. The LSO will ask an electrical engineer to model the electrical grid, a mechanical engineer to model the heat network, and a fluid-dynamics engineer to model the gas network. Also, a control system engineer can be asked to create an advanced machine learning-based control strategy.

Now the LSO wants to evaluate the system all together. Because the LSO did not specify the modelling framework, it can be expected that the different engineers have used a different platform. The electrical engineer probably has used PowerFactory, a very useful tool for power system modelling. The mechanical engineer has used Modelica to model the heat distribution, since this is very suited for this job. The fluid dynamics engineer modelled the gas network in MATLAB, while the control system engineer has developed its strategy in Python.

The choice for each modelling platform is obvious for the subsystems. However, this creates a problem for the LSO, since it has to find a way to simulate everything together. One solution could be to ask each engineer to convert their models in one software language and integrate the system. This is not a good idea, since it requires a lot of expertise from the engineers and the main software might not be suited for each model.

This is a situation where co-simulation can be used. The concept of co-simulation is to allow users to combine models developed in different modelling environments. This allows the analysis to retain the developed models in state-of-the-art software. Because these software’s are mature and state of the art, they have excellent libraries for solving any required problems using their own developed solvers, thus accelerating the time and accuracy of the model solutions. Transferring the entire system to a common modelling language can result in making assumptions about certain subsystems, which may not be ideal.

The working of a co-simulation

In a co-simulation, there is one central entity. This is called the co-simulation master coordinator. The master coordinator has the following tasks:

  • It controls the time progression in the simulation.
  • It directs the subsystem simulators to start or stop their simulation
  • It sets the inputs and outputs of the simulators
  • It coordinates the flow of information between the subsystems.

There are two ways in which co-simulation can be implemented: event-based coordination and fixed time step coordination. Event-based coordination relies on the generated events from the simulators. These events are placed on the execution list based on the time priority of the events, which is done by the master coordinator. An event can be any instance that causes a change in the state of the simulator. There are typically three types of events:

  • An input event, where the simulator generates an event because it requires an input.
  • A time event, where the simulator is asked to simulate for a certain amount of time.
  • A state event, where a change in the simulator occurs that needs to be modified

Handling one event can lead to a change of the list of later events, which is managed by the master coordinator. Because events can occur at non-fixed times, the simulation makes time jumps to the time of the next events in the event list.

In fixed time step coordination, the master coordinator lets the individual subsystems simulate at their own time steps, but with a fixed time interval. At each time step, the master coordinator provides inputs to the subsystem and the next time instance when the subsystems must pause.

The errors in co-simulation

One of the big challenges in co-simulation are the errors. In the co-simulation setup, the exchange of information does not occur continuously, but at fixed time steps. Therefore, the inputs of the simulators have to be interpolated. This interpolation can be done in three ways:

  • Constant interpolation
  • Linear interpolation
  • Polynomial interpolation

These errors can be decreased by reducing the time steps. However, this will increase the simulation time. Therefore, this is a trade-off that needs to be made when designing a co-simulation.

The use cases

The technique of co-simulation can be used in various applications towards the energy system. Examples of these applications are:

  • The analysis of coupled electric and heat distribution networks
  • The transmission and distribution network analysis
  • The coupled gas and electric network analysis

Conclusion

This lecture analysed the co-simulation of an energy system. First, the meaning of co-simulation was explained, which was followed by a discussion on how a co-simulation works. After this, it was explained how errors are introduced in a co-simulation. Finally, examples of different applications in which co-simulation is used were covered.

Creative Commons License
Technology of Intelligent and Integrated Energy Systems by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/technology-of-intelligent-and-integrated-energy-systems/
Back to top