A software platform for constructing a digital twin of the integrated energy system

. An integrated energy system is a complex technical object, digital twin technologies improve the quality of its design and management. The paper proposes a methodological approach to the development of a software platform for constructing a digital twin of the integrated energy system and solving a set of problems that arise during system design and management. The Model-Driven Engineering (MDE) concept is implemented to automate the stages of a digital twin construction based on the platform. A three-level architecture of a network multiuser software system is proposed. An algorithm used for automated construction of a digital twin of the integrated energy system is presented.


Introduction
Recently, an integrated approach has been developed to address the joint development and functioning of several separate systems (electricity, heat, gas, cooling, etc.) as part of an integrated energy system (IES) [1,2].At the same time, IES is understood as a system that includes a set of individual energy systems interconnected through common interdependent modes of operation when producing, consuming and transporting the corresponding types of energy, and with the integrated development of these systems.
Integration of individual energy systems into a single technological complex will ensure the implementation of new functionality, the use of more advanced technologies in management and the design of integrated centralized systems with coordinated control of their modes and active participation of consumers in the energy supply process.The transition to the construction of IES provides higher economic efficiency of the listed systems, high reliability and uninterrupted power supply to consumers.
The issue of optimal design of IES is very important, and its effective solution provides a significant reduction in economic costs and an acceptable quality of supplying the consumer with the necessary energy [1,3,4].The use of modern approaches based on the concept of digital twins makes it possible to improve the adequacy of mathematical and computer models, provides the ability to solve design problems within a single software, which makes it possible to obtain a solution to a design problem of higher quality in comparison with the approaches of previous generations.At present, approaches to the design of complex technical systems based on the concept of digital twins [5] become widespread both in the energy sector [6] and in other industries [7][8][9].
The Melentiev Energy Systems Institute of the Siberian Branch of the Russian Academy of Sciences (ESI SB RAS) has formulated a new scientific problem of developing a unified and universal technology for building a digital twin of IES and developing a software tool for designing these systems.This paper proposes an original methodological approach to the design of a software platform for constructing digital twins of IESs and their design.

Formulation of the scientific problem
Based on the performed structuring of the problems and research of IES, a conclusion was made about the need to develop a unified software platform for modeling and designing IES.The platform should act as a basis for the automated construction of IES digital twins and solve the whole range of problems of computer simulation of IESs during their design.
The new platform must meet the following requirements: Ensure that all sub-problems are solved within a single software system.
Link the solutions to individual sub-problems into a single solution.
Flexibly adjust the computational procedure to the features of the equipment and mathematical models that describe its operation.
Flexibly adjust the computational process by implementing various algorithms for solving the problem.
Platform elements should be developed in accordance with the component programming paradigm, which will ensure the possibility of presenting methods, algorithms and models in the form of reusable software fund elements.Software components should have standardized software interfaces within a single software tool with a description of subroutines, input and output data formats.In turn, the practical application of the component approach leads to a complex problem caused by the need to integrate a large number of software components used to model various system elements, which can be represented by a wide range of equipment and be in different states, into the software system.The high difficulty of maintaining the entire set of necessary software components up to date allows a conclusion that in order to implement the software platform, it is necessary to involve programming paradigms focused on automating the stages of software construction.
Modern approaches to software development are the subject of research by many specialists and are widely presented in the literature.The object-oriented approach [10,11] is the basis for modeling complex software system.In [12][13][14][15], the Model-Driven Engineering (MDE) concept is proposed to automate the stages of software construction.The MDE concept is a set of methodological approaches to the automated construction of complex software systems based on predeveloped models.This concept of software development is currently actively developed; approaches based on it make it possible to successfully develop complex software systems [16][17][18].Approaches to automating the stages of software construction based on metaprogramming are described in [19,20].

A new methodological approach
The paper proposes an original methodological approach to the implementation of a software platform for the automated construction of digital twins of IES and the solution of practical problems arising in the design of these energy systems.The MDE concept is the basis for automated software construction based on this platform.A distinctive feature of the implementation of this concept within the framework of the developed approach is the wide use of modern metaprogramming technologies [19,20], which provide high flexibility to dynamically design elements of a software system and make necessary changes to it.
The main components of the developed methodological approach are: Range of software components and their standardized software interfaces.
Composition of the ontology systems and methods for their development.
Three-level architecture of a multi-user software system.
An original approach to the automated construction of a digital twin of the IES.
The main components of the developed software platform are the following: components that control the operation of other software components; components that implement mathematical methods and algorithms; components that provide access to databases and ontologies (an ontology of IES, which includes ontologies of individual energy systems; a software ontology, problem ontology).Java is the main programming language for implementing the platform.Individual software components can be implemented in C/C++, Fortran, Python, and other languages.To store ontologies, a domain-specific language developed on the basis of the XML data description language (eXtensible Markup Language) is used.
The three-level architecture of the network multiuser system proposed for the implementation of the software platform is shown in Fig. 1.The system consists of the following three subsystems: 1. Web application running on the server.This subsystem is responsible for interacting with users within a computer network and for solving computational and analytical problems on the server side.
2. The client part of the network system.It is designed to work with graphic computer models of IES and data on their elements.This subsystem is used to prepare initial data and view calculation results.
3. Data storage subsystem.It is intended for storage and multiple use of a computer model of the IES, initial data and calculation results, and graphical data on urban development.
The server part of the software system is developed in Java and runs under the Apache Tomcat servlet container.To store the IES model and transfer its configuration between subsystems of the software platform, the text data exchange format JSON (JavaScript Object Notation) is used.Computer models of IES created by users are stored by the platform in a database and can be repeatedly used in calculations.To interact with databases, JDBC (Java DataBase Connectivity) technology is used, which provides a single interface for interaction between the platform and database management systems (DBMS) using the SQL (Structured Query Language).Depending on the scale of the problem to be solved, the number of one-time users and the specific features of the network load on the web application, JDBC provides the possibility of flexible integration into the platform of various multi-user relational DBMSs, such as Firebird, PostgreSQL, MS SQL Server, and others.
The interaction of the user of the software platform with the computer model of the IES is organized as work with a set of layers, each of which corresponds to one of the levels of the hierarchical model of the IES.At the same time, depending on the goals of modeling and the features of the problem being solved, one layer can represent both a separate energy system (as a whole) as part of the IES, and one of the levels of the hierarchical model of any subsystem of the IES.The IES hierarchical model can consist of models of individual energy systems of different scales (interregional networks, large urban backbone networks, regional distribution networks, networks of individual settlements, etc.).An IES of a small settlement, for example, can be connected to a large gas transmission system and an urban power system, while the heat supply system as part of this IES can be of a small scale and run on gas or coal.
We developed an original approach to designing a digital twin and organizing the computational process.In accordance with this approach, the digital twin and the computing subsystem are built in an automated mode.The approach suggests that automated design is performed in accordance with the algorithm, the steps of which are presented in the following form.1. Generate a list of equipment to be used based on the computer model of the IES created by the user.2. Generate a list of mathematical models of the equipment used based on the computer model of the IES.  7. Link software components that implement algorithms and mathematical models of equipment to the software system.8. Construct the data structures necessary for the functioning of the linked software components.

Conclusions
The transition to the modeling and design of modern energy systems such as IESs can significantly increase the efficiency of their work.IESs are complex technical objects that require the structuring of large amounts of data, the use of complex mathematical models and methods, and the organization of complex computational processes.Digital twin technologies make it possible to overcome these difficulties.The paper proposes a methodological approach to the development of a software platform for automated construction of digital twin of IES and solving a set of problems that arise when designing these systems.To automate the stages of the digital twin construction, the concept of MDE is implemented.A three-level architecture of a network multiuser software system is proposed.An approach to the automated construction of a digital twin is proposed and the algorithm used for the automated construction is presented.
The methodological support proposed in the paper can be used in organizations involved in the development of software for the analysis, design and optimization of IES for various purposes.The developed software, when implemented in design organizations, will improve the quality of the received design recommendations and reduce the complexity of obtaining them. /doi.org/10.1051/e3sconf/202346101001461

Fig. 1 .
Fig. 1.Three-level architecture of a multi-user network software system.

3 .
Generate a list of required software components based on the lists created in the previous steps.4. Construct a description of a software component that implements an algorithm for solving an applied problem. 5. Construct a model of the designed subsystem of the software system.6. Import the description of the required software components from the software ontology. /doi.org/10.1051/e3sconf/202346101001461