Development of the methodological basis of the simulation modelling of the multi-energy systems

. The most modern technical systems are an integration of various energy converters and sources of various physical nature. Mechanical, thermal, electromagnetic, as well as computer (information) monitoring and control system. Multi-energy systems (MES) also belong to the class of such technical devices. The main task in creating mathematical models is a methodological approach that allows joint modelling of 6 energy objects of various nature on a single methodological basis. The article considers the main approaches to the mathematical description of MES, as well as the assumptions and stages of formation for modelling this class of technical systems. The main advantages and disadvantages of the proposed methods for creating mathematical models are considered taking into account the possibility of using optimization methods and using the above models as digital twins for control systems. In addition, the article will present a methodological approach to the formation of mathematical models of an integrated energy system based on the concept of an energy hub using MATLAB.


The main provisions
An energy hub [1]- [5] is an intermediate link between energy producers, transport infrastructure and consumers on the other hand ( Figure 1). The main functions are the transfer, conversion and storage of energy resources. Energy consumption can be transmitted from input to output without changing shape (e.g. electricity) or significant quality changes. In addition, energy resources can be transformed from one form to another. For example, a thermal power plant can convert gas into heat and electricity. The hub structure consists of four parts: 1. Inputs -energy flows directly from producers or from the transport infrastructure system (fossil fuels, wind, solar energy, electricity, etc.).
2. Converters -responsible for the modification of energy resources, or for changing the physical parameters of energy resources (boiler room, chiller, heat pump, electric transformer, etc.).
3. Storage (storage, battery) is used to store fuel reserves, energy storage (for example, heat storage, electricity storage, gas tank, coal storage, etc.).
4. Exits -flows of energy resources that come from the hub to consumers (heat, cold, electricity, etc.). Figure 2 shows the possible types of energy conversion. The analysis of the mathematical description of the energy hub is carried out in three stages.
1. The systems of energy conversion are considered; 2. The presence of energy storage devices and their interaction with the system for converting various types of energy into each other is considered; 3. We consider transmission systems for various energy channels.
The analysis of the mathematical description is carried out under the following assumptions: 1. The system is in steady state, transients are not considered; 2. An energy hub consists only of converters and energy storage devices; 3. Energy is transmitted only from entrance to exit; 4. Energy flows are characterized by power and efficiency.

The traditional view
If there are several inputs and outputs, you can determine the transformation matrix in order to relate the vectors of the corresponding energy flows [6]- [12]. Then the relationship between the outputs and inputs of the energy hub (excluding energy storage) can be described as follows: where L is the vector of the outgoing energy flows, P is the vector of the supplied energy flows, C is the communication matrix describing the energy transformations inside the hub.
For a more detailed consideration, we will present equation (1) in an expanded form: where and are the flows of the output and input energy of a stable state, respectively. stands for coupling coefficient. The transformation matrix is determined by the structure of the energy hub.
In order to take into account energy storage devices, we introduce an additional coupling matrix for them: where E is the vector of energy carrier flows associated with the storage ring, S is the coupling matrix. Then, taking into account equation (3), equation (1) will take the following form: In the standard method for formulating the energy balance, the following order is followed: 1) determination of input and output power vectors; 2) the expression of the outputs of the Converter as a function of its inputs; 3) determination of the balance of nodal energies at the output transitions of the converter; 4) the statement of results in accordance with formula (2).

Graph View
The paper [13] presents a method based on graph theory.
Graph theory is used in various calculations, including it has proven itself to calculate steady-state modes of electrical circuits.
The structure and topology of the energy hub are mapped to a directed graph and then converted to matrix form. Fig. 3. Branches and unit for converting gas into electrical and thermal energy.

Gas Turbine
To map the physical components of an energy hub onto a graph, a number of new definitions were introduced in this article, namely: 1. Resistance to energy flow -= • , where the efficiency η can be displayed as a function of the input energy flow: = ( ); 2. The energy hub graph is an abstraction description of its topology and the totality of its nodes and branches. Since each energy flow has a specific direction, the graph of the energy hub is a directed graph; 3. Knots and branches -connections of energy flows and the flows themselves, respectively ( Figure 3); 4. The incidence matrix between branches and nodes defines the relationships between branches and nodes. Since there are two types of branches: the converter branch and the load branch, respectively, there are two categories of the incidence matrix of the branch node, the incidence matrix of the converter branch node and the incidence matrix of the load branch; 5. The impedance matrix of the branch energy flux. The diagonal matrix formed by the impedance of the energy flow of each branch of the converter is defined as the impedance matrix of the branch flow.
To form the graph in Figure 4. a series of data for each of the branches is entered into a specially prepared table, the input power vector P and the load power vector Pl are determined. Next, the impedance matrix of the branch energy flux is formed, as well as the incidence matrix between the nodes and the connections of the converter and the load. After that, the vector of outgoing energy flows and the coupling matrix are calculated to represent the result in accordance with formula (2).

Bidirectional energy flow view
The paper [14] presents a model for accounting for bidirectional flow in an energy hub: All points of interaction of energy flows are presented as nodes. The MES node model consists of three subcomponents: an energy conversion model, a storage model, and a Prosumer model [12], [13]. An example of conversion is shown in Figure 5.
The input terminal nodes are limited by non-negative constraints, as well as the upper limit, which represents the capacity limit imposed on the input energy. The nodes of the output terminal are limited by non-positive constraints, as well as lower bounds, which represent capacity constraints imposed on the output energy. The I / O terminal nodes have both a negative lower limit and a positive upper limit to impose capacitance restrictions on the output and input energy, respectively.
Depending on the number of paths between one node and another, the existence of an additional degree of freedom is determined.
Taking into account the efficiency of the connections between the nodes, as well as the direction of the energy flows, an array is created that describes the processes of energy interaction in the hub. (6) Next, the array is converted into a system of equations, on the basis of which it is possible to build a control system, including digital.

Variant of representation using MATLAB
The mathematical description of the blocks implementing the simulation model is based on the principle of reducing all physical measurements of energy channels to a single measuring system in which the Joule is selected. This made it possible to significantly simplify the mathematical description of the blocks for converting various types of energy into each other and to analyze the influence of various types of energy carriers on the general energy characteristic of a multi-energy system.

3
This approach allowed us to take into account the exergy component through the channel of production, distribution and use of thermal energy. This model allows us to study the conditions of MES in a stationary (static) state, taking into account consumer load curves.
Papers [3,16] provides a structural diagram that can become the basis for constructing control systems that ensure work in accordance with the proposed target functions, in particular the rational use of various types of energy, taking into account pricing and tariff policies.
Thus, during the implementation of the concept, a simplified mathematical model of a multi-energy system was obtained and its software implementation was implemented for three or more common types of power units. The approaches to numerical evaluation for obtaining the information base used in these systems are developed. Obviously, the decision to create a multienergy system is made on the basis of economic benefits. Figure 6 shows an example of a functional diagram of the power supply channel of a general simulation model of an energy hub, taking into account the specifics of simulation in Matlab / Simulink.

Conclusions
This article analyzed the main methodological approaches for creating mathematical models of multienergy systems, taking into account their applicability for solving problems of optimizing functioning, as well as the possibility of using these models as digital twins in monitoring and control systems.
The following features are characteristic of traditional methods of mathematical description of MES.
-for multi-component energy hubs, the formulation of the coupling matrix is associated with a number of difficulties; -modeling processes require completely manual expression and analysis of energy flows, which takes quite a long time, especially for complex multi-energy systems.
The above features cause certain difficulties when using multi-energy objects as digital twins.
One of the areas of mathematical description of energy hubs is graph theory. From the point of view of the authors, the presentation in the form of graphs most fully illustrates the direction of the energy distribution flows, as well as the basic principles of converting one type of energy into another. However, this approach has a number of features related to the presentation of data, and therefore, in practice, the authors cannot unequivocally state the possibility of graph theory for creating digital twins.
At the same time, in modern power supply systems, the task arises of taking into account the influence of an active consumer on the energy balance of the energy system as a whole. This paper presents the concept of bidirectional distribution of energy flows. The data approach is quite promising given the direction of development of modern energy. This concept needs a more detailed study and formalization for the mathematical description of MES.
Recently, systems of simulation of various technological processes are widely used. The authors tested the application of the basic principles that underlie the simulation modeling methods, taking into account the features presented to the mathematical modeling of MES. For these purposes, a methodological basis was developed for creating simulation models of MES. This approach can be implemented for any arbitrary number of types of both traditional and non-traditional energy carriers, regardless of their physical nature, as well as for energy storage systems.