Adaptive clustering-based hierarchical layout optimisation for large-scale integrated energy systems

: Different energy systems are generally planned and operated independently, which result in the low energy utilisation, weak self-healing ability and low system reliability. Therefore, an adaptive clustering-based hierarchical layout optimisation method is proposed for a large-scale integrated energy system, considering energy balance, transmission losses and construction costs. First, an adaptive clustering partition method based on energy balance and load moments is proposed to determine the optimal location of energy hubs and to allocate each distributed generation and load to different energy hubs, forming multiple regional integrated energy systems adaptively. Then, the proposed hierarchical layout optimisation model is formulated as to find the modified minimum spanning tree of the regional integrated energy system and multi-regional integrated energy systems, respectively, to construct an economical and reliable interconnection network. Finally, the effectiveness of the optimisation model and strategy is verified by simulations.


Introduction
Facing the energy crisis and environmental pollution, the distributed renewable energy generation has received great attention [1,2]. However, the renewable energy generation is characterised by a large number, small capacity, wide distribution and time variability. To cope with the spatiotemporal characteristics of distributed generation and solve the problem of reliable access to the utility grid, the microgrid as an effective solution has been proposed [3][4][5]. In order to satisfy the diversified demands and further improve the primary energy efficiency, multienergy forms including cool, heat and gas are introduced into microgrids to constitute a regionally integrated energy system (RIES) [6,7].
Traditionally, different energy systems are planned and operated independently, leading to low energy utilisation, weak self-healing ability and low system reliability. Aiming to realise the coordinated optimisation and utilisation of multi-energy forms, the energy hub (EH) with functions of conversion, storage and scheduling is introduced and used for the RIES planning [8,9]. A two-stage mixed-integer linear programming method is proposed for RIES planning in [10], where the type selection and connection relationship of energy production and conversion equipment of EHs are realised, considering the access of distributed renewable energy. Then, a bi-level expansion planning model of RIES and multi-RIESs is proposed in [11], where a decentralised approach is applied to solve the capacity configuration of energy production and conversion equipment of EHs, given the carbon emission constraints. Considering the uncertainty of load demands and renewable energy generation, a data-driven two-stage stochastic programming method is proposed in [12] for EH capacity configuration, to minimise the construction cost and operation cost.
Furthermore, the coordinated planning including the operation control of large-scale integrated energy systems has been proposed in [13][14][15][16], which transforms the expansion planning of power and gas systems into a mixed-integer linear or non-linear programming model. Especially, the risk exposed uncertainties of load demands and energy prices are considered in [13,14]. For a large-scale centralised non-linear model, the numerical optimisation algorithm is difficult to get the global optimal solution, therefore the heuristic optimisation algorithm is applied. Aiming at the maximisation of social welfare, genetic algorithm, differential evolution algorithm and their improved algorithms are applied and compared in [14]. To minimise the operation costs, carbon emission costs and reliability costs of the system, a fuzzy particle swarm optimisation algorithm is used in [15]. However, the heuristic optimisation algorithm is slow and easy to fall into local optimum in solving the large-scale centralised model. Therefore, a hierarchical or decentralised optimisation strategy based on spatiotemporal decoupling characteristics is proposed to solve the large-scale centralised problem in a decomposed fashion [17][18][19].
However, the above studies on system planning of integrated energy systems mainly focus on the type selection, capacity configuration and connection relationship of production and conversion equipment in EHs, as well as the system operation control. While the optimal location of EHs and the layout optimisation of large-scale integrated energy systems are seldom considered in the existing research. As an effective solution, the clustering algorithm has been widely applied in industrial fields to reduce the complexity of a large-scale system [20][21][22][23]. To facilitate the layout optimisation of large-scale offshore wind farms, a fuzzy c-means clustering algorithm is used to allocate each wind turbine to the geographically nearest substation [24,25]. However, there are two limitations, i.e. the number of substations are directly given in advance without thinking of adaptive changes, and only Euclidean distance is regarded as the similarity measurement.
Following that, the layout optimisation of energy networks is taken into consideration, which has a significant impact on the overall efficiency and economy of systems [26]. In [27], the graph theory and improved genetic algorithm are combined to optimise the pipe network layout of district cooling systems, aiming at minimising the annual cost of pipe networks. The minimisation of average production costs and total cable trenching lengths are, respectively, taken as objective functions in [28,29], where the minimum spanning tree (MST) algorithm of graph theory is used to optimise the cable layout of wind farms. Different from the radial topology applied commonly in windfarm systems, a looped or meshed topology is needed for multi-RIES layouts to increase the reliability of energy interaction between different RIESs but which is less considered in existing studies [30]. Besides, the above work only focuses on the clustering and layout optimisation of the single energy system, without considering the reliable and economic layout optimisation of integrated energy systems.
To solve the above problems, an adaptive clustering-based hierarchical layout optimisation method is proposed for a largescale integrated energy system, considering energy balance, transmission losses and construction costs. First, an adaptive clustering partition method based on energy balance and load moments is proposed to determine the optimal location of EHs and to allocate each distributed generation and load to different EHs, forming multiple RIESs adaptively. Then, the proposed hierarchical layout optimisation model is formulated as to find the modified MST of integrated energy systems, to realise the dynamic radial layout optimisation of RIES and the looped or meshed layout optimisation of multi-RIESs, respectively, constructing an economical and reliable interconnection network.

Example of the EH-based RIES
From the view of completeness, the EH-based RIES is comprised of energy input, energy conversion, energy storage, energy transmission and energy consumption, which are depicted in Fig. 1 as an example [31][32][33].
The relationship between different energy systems (electricity, gas and heat) is determined by the conversion and storage equipment of EHs. The type selection and capacity configuration of candidate equipment in EHs associated with the system operation optimisation are really important, which have been introduced in [10][11][12]31] and partly studied in our previous work [19]. While the optimal location of EHs and the layout optimisation of large-scale integrated energy systems are ignored or seldom considered in the existing research, which are vital for the construction of an economical and reliable interconnection network. Assuming that the system planning of candidate equipment associated with the operation optimisation (including system power balance constraints) in the EH is completed, the EH can be abstracted as a multi-port energy conversion node. Based on this assumption, the adaptive clustering-based hierarchical layout optimisation for large-scale integrated energy systems is mainly studied in this paper, and the steps are shown in Fig. 2.
To facilitate the layout optimisation of large-scale integrated energy systems, an adaptive clustering partition method is first proposed to determine the optimal location of EHs and to allocate each distributed generation and load to different EH-based RIESs. Then, according to the interface characteristics of EHs (including interface number and capacity), the dynamic radial layout optimisation of RIES and the looped or meshed layout optimisation of multi-RIESs are realised by applying the modified MST algorithm.

Main principles of EH-based clustering partition
Two main principles of the EH-based clustering partition are as follows: where r represents the type of energy forms, r = 1 represents electricity, r = 2 represents gas and r = 3 represents heat. D io represents the distance between node i and cluster centre o, α ir represents the weight of energy form r in node i, η r represents the transmission efficiency of energy form r, P ir represents the maximum transmission power of energy form r in node i, x i1 and u o1 represent the X-distance of node i and cluster centre o, respectively, x i2 and u o2 represent the Y-distance of node i and cluster centre o, respectively. When the cluster centre o is selected as the optimal location of EHs, the integrated load moment of electricity, gas and heat shown in (1) should be minimised. Therefore, the distributed nodes with smaller load moments can be divided into the same partition as far as possible.

Energy balance of distributed generation and load:
In the process of clustering partition, in order to improve the local utilisation of distributed energy and reduce the long-distance transmission loss, the minimisation of (4) means that the total capacity of generation nodes should be close to the total capacity of load nodes in each partition C o .
where x i3r (r = 1, 2, 3) represents the capacity of energy form r in the generation node i x i3r > 0 or load node i x i3r < 0 , C o represents the total number of generation nodes and load nodes in the partition C o and u o3r represents the average capacity of energy form r for the total generation nodes and load nodes in the partition C o . When u o3r < 0 the total capacity of generation nodes is less than the total capacity of load nodes for energy form r in the partition C o . Therefore, the generation node i x i3r > 0 should be divided into the partition C o to minimise the (4).
When u o3r > 0 the total capacity of generation nodes is greater than the total capacity of load nodes for energy form r in the partition C o . Therefore, the load node i x i3r < 0 should be divided into the partition C o to minimise the (4).
In order to realise the local utilisation of large-scale distributed energy and reduce the long-distance transmission loss, a clustering partition optimisation model based on load moments and energy balance is proposed.

EH-based clustering partition optimisation model
According to the above analysis, the optimisation goal of clustering partition should reflect the load moment from distributed nodes to the cluster centre, as well as the energy balance of distributed generations and loads in each partition C o .

Equivalent load moment:
According to the load moment and energy balance, the equivalent load moment L io between node i and cluster centre o is defined as: where the first term of (6) represents the integrated load moment of electricity, gas and heat between node i and cluster centre o as well as the weighting coefficient α 1 . The second term represents the energy balance of electricity, gas and heat in each partition C o as well as the weight coefficient α 2 . (7), the objective function J of clustering partition based on equivalent load moments can be expressed as to minimise total equivalent load moments between node i and cluster centre o

Objective function: As shown in
If there is a common connection point 0, the load moment from the cluster centre o to the common connection point 0 should also be considered into the objective function, as: where P 0 represents the maximum transmission power of the common connection point 0 and D 0o represents the distance from the common connection point 0 to the cluster centre o.

Adaptive k-means algorithm
Due to simple and efficient clustering characteristics, the k-means algorithm has been widely used [34,35]. However, there is also a certain limitation in the clustering process of the traditional kmeans algorithm [36,37]. For example, the number of cluster centres is directly given in advance without thinking of adaptive changes, and only Euclidean distance is regarded as the similarity measurement. Therefore, an adaptive k-means algorithm based on cluster centre optimisation and attribute weights is proposed to realise the adaptive clustering partition of large-scale distributed generations and loads, as well as the optimal location of EHs, as shown in Fig. 3.
For large-scale distributed generations and loads, the clustering partition optimisation model involves different indicators, such as physical location and power capacity, which are unable to compare and synthesise directly, due to different attributes or dimensions of the indicators. Therefore, it is necessary to eliminate the impact of different indicators through data standardisation, in order to obtain reliable and rational results.

Cluster centre optimisation:
The idea of the elbow method is to run k-means clustering for a given range of cluster centres k and calculate the objective function J for each value of k. Then, the J is plotted for each value of k, and the 'elbow' (the inflection point on the curve) is the best value of k. Following that, k distributed nodes are selected as the initial cluster centres.

Attribute weight:
Considering the physical location, energy form and power capacity, the equivalent load moment is obtained by weighting the load moment and energy balance. To improve the efficiency and quality of clustering partition, the distributed nodes with slightly larger load moments but favourable for energy balance can be divided into the same partition. The distributed nodes with slightly smaller load moments but unfavourable for energy balance can be divided into different partitions.
Based on the adaptive clustering partition, the distributed generation and load nodes are divided into k RIESs, and the cluster centre near distributed nodes in each RIES is selected as the optimal location of EHs. Then, the hierarchical layout optimisation of RIES and multi-RIESs are carried out, respectively, to construct an economical and reliable interconnection network.

Hierarchical layout optimisation
The proposed hierarchical layout optimisation of integrated energy systems includes the dynamic radial layout optimisation of RIES and the looped or meshed layout optimisation of multi-RIESs.

Dynamic radial layout optimisation of RIES based on penalised MST
To optimise the network layout of each RIES, not only the transmission loss but also the conversion loss of different energy forms is necessary to be considered. Within a RIES, the dynamic radial layout optimisation is implemented independently for different energy forms, but the coordinated conversion of different energy forms can be realised by the EH located in cluster centres.
As shown in Fig. 4, multiple distributed generations and loads in each RIES o can be abstracted into a weighted graph  (9) is taken as the penalty weight of edge (i,j), which reflects the transmission loss and construction cost of the energy form r.
where w i j, r represents the load moment of energy form r related to the edge (i,j), D i j represents the distance of the edge (i,j) and β or represents the penalty factor of each node directly connected to the EH o in energy form r.

Objective function:
To minimise the transmission loss and construction cost, the dynamic radial layout optimisation of energy form r between distributed nodes in each RIES o is transformed into (10), which is used to find the penalised MST in the graph where J or represents the total load moments of energy form r of the penalised MST for the RIES o, T or represents the penalised MST of energy form r in the graph G o , d r in (o) represents the internal connection degree of energy form r of EH o, n or in represents the internal interface number of energy form r of EH o connecting distributed generation and load.

Penalty MST algorithm:
Prim algorithm and Kruskal algorithm are both classic algorithms for finding MST from connected graphs. Strategically speaking, the Kruskal algorithm can find the MST only by sorting the edge weight once, which has higher efficiency. To minimise the transmission loss and construction cost, a penalty MST algorithm based on the Kruskal algorithm is proposed to realise the dynamic radial layout optimisation of RIES, where the penalty factor is dynamically adjusted and determined according to the internal interface number of EHs connecting distributed generation and load, as shown in Fig. 5.
Initially, β or = 1, when β or > 1, the distributed nodes directly connected to the cluster centre o in energy form r will decrease as the increase of β or . When 0 < β or < 1 the distributed nodes directly connected to the cluster centre o in energy form r will increase as the decrease of β or .

Looped or meshed layout optimisation of multi-RIESs based on balanced MST
The layout optimisation of multi-RIESs is considered based on the optimal location of EHs. According to the estimation from the US Energy Information Administration, the average loss rate of electricity transmission is ∼5% [38]. The loss rate of gas transported through pipeline systems is ∼8% [39]. However, a high level of heat losses during the transportation is up to 30% of generation [40]. Based on the above-estimated transmission loss of different energy systems, the long-distance transmission loss of heat is larger, compared with electricity and gas. Therefore, the interconnection of multi-RIESs only includes electricity and gas networks in this paper.
The long-distance transmission of gas requires a booster station, and some booster stations are electrically driven. Considering the reuse and sharing of certain infrastructures during the transmission process of electricity and gas, the layout optimisation of different energy forms between EHs is considered together, by minimising the integrated load moment of electricity and gas.
As shown in Fig. 6, multi-RIESs based on the EH are abstracted into a weighted graph G EH = {V, E}. The EHs are abstracted into nodes and constitute a node set V = 1, 2, …, k (k represents the number of partitions, that is, the total number of EHs). The interconnection between EHs is abstracted into node edges and constitutes an edge set E. (11) and (12), the integrated load moment of electricity and gas is taken as the integrated weight of edge (m,n) connecting EH m and n, which reflects the transmission loss and construction cost of the electricity and gas network w mn = ∑ r = 1 2 w mn, r (11) w mn, r = α mr P mr D mn P mr = max (P mr , P nr ), (m, n) ∈ E α nr P nr D mn P nr = max (P mr ,

Integrated weight of edge w mn : As shown in
where w mn represents the integrated load moment of electricity and gas related to the edge (m,n), w mn, r represents the load moment of energy form r related to the edge (m,n), D mn represents the distance of edge (m,n), α mr represents the weight of energy form r in the EH m and P mr represents the maximum transmission power of energy form r in the EH m.

Objective function:
To minimise the transmission loss and improve the energy supply reliability, the layout optimisation of multi-RIESs based on the EH is transformed into (13), which is used to find a balanced MST of electricity and gas in the weighted graph G EH , where the external connection degree of energy form r of EH m is not >2 where J EH represents the total integrated load moment of electricity and gas of the balanced MST for multi-RIESs, T represents the balanced MST of electricity and gas in the graph G EH and d r ex (m) represents the external connection degree of energy form r of EH m connecting the other EHs. Fig. 7, to increase the reliability and minimise the transmission loss and construction cost, a balanced MST algorithm is proposed to realise the looped or meshed layout optimisation of multi-RIESs, where the external connection degree of each EH is kept as balanced as possible.

Balanced MST algorithm: As shown in
Considering the system reliability, economy and equivalence, the edge that makes T a looped layout (the external connection degree of electricity and gas of each EH is 2) is selected to join T. Then, the edge with the lowest weight is selected to join T, forming a meshed layout of multi-RIESs.

Simulation results and analysis
An integrated energy system with 80-distributed nodes is used as a simulation case to be planned. According to the system plan design, the physical location of 80 distributed nodes and their energy form, power capacity can be obtained. Table 1 shows the Xdistance, Y-distance, type and capacity of distributed nodes.

Optimal k (the number of EHs or partitions):
For the integrated energy system with 80-distributed nodes, the elbow method is used to optimise and determine the value of k. As shown in Fig. 8, the objective function J is plotted for each value of k from 2 to 10. As the k increases, the decrease of J tends to be smooth, creating the inflection point on the curve. Therefore, k = 6 is selected as the optimal value in this paper.

Optimal clustering partition:
After the optimal number of EHs k = 6 is determined, the optimal clustering partition of the integrated energy system with 80-distributed nodes is shown in Fig. 9. In each partition, the cluster centre is selected as the optimal location of EHs, close to the distributed generation and load, which will bring benefits to realise the local utilisation of distributed energy and reduce the long-distance transmission loss.

Hierarchical layout optimisation
According to optimisation results of the adaptive clustering partition, the partition 5 is selected as a case to analyse the dynamic radial layout optimisation of RIES. The attributes (X-distance, Ydistance, type and capacity) of each distributed node in partition 5 are shown in Table 2, where the cluster centre of partition 5 is the optimal location of EH 5. The cluster centres of partitions 1-6 are obtained from optimisation results of the adaptive clustering partition and used as the optimal locations of EH 1-6. Besides, the interface capacity of electricity, gas and heat of EH 1-6 is shown in Table 3. Based on the optimal location and interface capacity of EHs, the looped or meshed layout optimisation of multi-RIESs is carried out. Note that the capacity value of electricity/gas/heat generation is positive, and the capacity value of electricity/gas/heat consumer is negative. r = 1 represents electricity, r = 2 represents gas, and r = 3 represents heat.

Dynamic radial layout optimisation of RIES:
The dynamic radial layout optimisation of RIES 5 based on the penalty MST is shown in Fig. 10. When β or = 1, as shown in Fig. 10a, the distributed nodes 15, 56, 58 and 70 containing energy form, electricity, and with smaller equivalent load moment to cluster centre 5 are directly connected to the EH 5 through transmission lines. The distributed nodes 15, 34 and 70 containing energy form, gas, and with smaller equivalent load moment to cluster centre 5 are directly connected to the EH 5 through gas pipes. The distributed nodes 15, 17 and 70 containing energy form, heat, and with smaller equivalent load moment to cluster centre 5 are directly connected to the EH 5 through heat pipes.
As shown in Figs. 10b and c, when β or > 1, the distributed nodes in RIES 5 tend to construct a penalty MST in a serial manner. As β or increases, the distributed nodes directly connected to the EH located in the cluster centre 5 gradually decreases. As shown in Figs. 10d and e, when 0 < β or < 1, the distributed nodes in RIES tend to directly connect the EH and construct a penalty MST. As β or decreases, the distributed nodes directly connected to the EH located in the cluster centre 5 gradually increases, but which cannot be greater than the internal interface number of the EH 5. Therefore, the layout optimisation of RIES influenced by penalty factors, can be adjusted according to the internal interface number of EHs connecting distributed generation and load.

Looped or meshed layout optimisation of multi-RIESs:
After determining the optimal location of EHs, the traditional MST of multi-RIESs based on the integrated load moment of electricity and gas is shown in Fig. 11a. The RIESs 1, 2 and 4 corresponding to the EHs 1, 2 and 4 only have one connection degree, which is vulnerable in the energy supply. The RIES 3 corresponding to the EH 3 has a high connection degree, which is more reliable in the energy supply.
Considering the system reliability, economy and equivalence, the MST based on the integrated load moment of electricity and gas for multi-RIESs is optimised. In the optimised network layout   shown in Fig. 11b, the external connection degree of each EH is as balanced as possible, that is, the external connection degree of each node is not >2.
To improve the reliability of the energy supply, a looped or meshed layout is preferable. First, the edge (2,4) that makes the balanced MST form a looped layout (the external connection degree of each EH is 2) is selected to join the balanced MST. Then, the smallest weighted edge (3,6) is selected from all the remaining edges to join the balanced MST, as shown in Fig. 11c.

Conclusions
In order to construct an economical and reliable interconnection network of the integrated energy system, an adaptive clusteringbased hierarchical layout optimisation method is proposed for a large-scale integrated energy system, considering energy balance, transmission losses and construction costs.
First, the proposed adaptive clustering partition method based on energy balance and load moments realises the optimal location of EHs and allocates each distributed generation and load to different EHs, forming multiple RIESs adaptively.
Then, the proposed hierarchical layout optimisation method realises the dynamic radial layout optimisation of RIES and the looped or meshed layout optimisation of multi-RIESs, constructing an economical and reliable interconnection network.