1. Introduction
With the continuous growth of global energy demand and the improvement of environmental protection awareness, regional integrated energy systems (RIESs), as a key technology to achieve sustainable energy utilization, have attracted widespread attention [
1,
2]. RIESs leverage advanced information and communication technology, energy conversion, and optimization control technologies to establish corresponding coupling relationships among different energy subsystems, such as electricity, gas, heat, and cooling [
3]. This breaks away from the traditional energy system planning and operation, which are limited to a single form of energy, and maximizes the synergy and complementary advantages of multiple forms of energy. It enhances energy utilization efficiency and the level of renewable energy integration [
4].
The mainstream multi-energy flow modeling methods based on the unified model approach are primarily divided into the energy hub method and the unified energy path method [
5,
6]. In terms of the energy hub, Ref. [
7] introduces an innovative and extended energy hub approach for the configuration optimization of RIESs, addressing the shortcomings of traditional methods by considering the combination, capacity, and operational strategy of energy devices. With the successful application of circuit theory in non-electrical energy networks, an increasing number of scholars have begun to explore the unified energy path method [
8]. Ref. [
9] proposes a uniform framework for modeling district heat networks (DHN) in the Laplace domain, addressing heat losses and transfer delays through an electrical-analog perspective. Ref. [
10] uses a thermal circuit model for heat networks, incorporating a fractional-order model solved by a decomposition method, which enhances system flexibility and reducing operational costs.
Considering the characteristics of multi-system and multi-energy coupling in RIESs, the approaches to calculating their flow problems are mainly divided into two categories: the unified method [
11] and the decomposition method [
12]. Ref. [
13] develops models for various energy sub-systems within an integrated electricity-gas-thermal energy system, and the multi-energy flow is calculated based on the Newton–Raphson method. Ref. [
14] presents a unified time-domain model for RIES based on two-port network equivalence theory and offers a novel approach for collaborative analysis by converting complex multi-energy interactions into equivalent transfer matrices. In [
15], a novel decentralized algorithm based on heterogeneous decomposition is proposed, showing effective congestion alleviation in the electric power system and efficient, robust algorithm performance with minimal communication requirements.
Modeling and simulation are fundamental to the analysis of RIESs, serving as a numerical equivalent mapping of real physical systems [
6]. The dynamic simulation of RIESs considers the dynamic behavior of energy conversion equipment, typically requiring the solution of a combination of partial differential, ordinary differential, and algebraic equations. Using digital simulation technology and through collaboration between software and hardware, it ultimately achieves the simulation of multi-energy flow within the RIES [
16]. The development of a software platform for joint simulation of multi-energy flow systems has been explored [
17]. Ref. [
18] introduces the electrical integrated energy system simulation platform SAint, developed by Pambour. Ref. Gusain et al. [
19] discusses an open-source integrated energy system simulation software, EnergySim, which supports static simulations for specific systems. Based on digital simulation technology, hardware-in-the-loop (HIL) simulation incorporates real physical models, representing a form of semi-physical simulation [
20]. Ref. [
21] constructs a physical simulation platform for thermal networks. Utilizing similarity theory, they achieved a digital space mapping of a micro thermal network and conducted HIL simulation tests. Based on the existing literature and the state of the art on RIES simulation research, the scheduling strategies for RIESs have been investigated widely. Ref. [
22] presents a distributionally robust scheduling strategy for RIESs using a two-level Stackelberg game model. In Ref. [
23], a three-stage planning model for thermal energy storage is examined by a pairwise reformulation technique. Ref. [
24] presents a planning model for an electricity-thermal-cooling RIES that enhances energy efficiency by integrating load clustering.
Current research on the multi-energy flow in RIES primarily targets the AC power grid [
13]. However, with the growing contribution of distributed energy sources like photovoltaic and wind energy, the connection between distributed energy carriers, led by microgrids, and integrated energy systems is becoming more significant. Despite this increasing importance, there is little research focusing on the energy flow in an RIES that incorporates a microgrid. DC microgrids (DMGs) offer simplified operation coordination, as the DC bus voltage is the sole control parameter, eliminating the frequency and reactive power challenges inherent in AC systems [
25]. Regarding the optimal dispatch of microgrids, Ref. [
26] utilizes a two-level hierarchical multi-agent system for microgrids to achieve significant cost reductions by optimally dispatching power among microgrid components. Ref. [
27] introduces a real-time distributed economic dispatch scheme for grid-connected microgrids, employing a virtual leader agent for power balance and a consensus algorithm for optimization. The above literature mainly considers the optimal dispatch of microgrids from the perspective of cost minimization, and does not consider the actual dynamic behavior of each module in the microgrid. So far, few studies have conducted dynamic behavior simulation analysis from the perspective of component models, simulation conditions, and control complexity (including communication delay and security) of microgrids [
23]. To bridge these identified research gaps, this paper sets out to address crucial issues in DMG control, together with the energy flow calculation of DHN and natural gas networks (NGNs). Our approach involves developing and validating new control strategies and schedule algorithms. DMG employs an improved two-layer hierarchical control system which contains bus and device control layer, requiring only the collection of each device’s output current and bus voltage. The multi-energy flow scheduling strategy focuses on the coupling nodes between networks as breakthrough points and uses the decomposition method for power flow calculation. By leveraging the real-time capabilities of a hardware simulation platform, we aim to propel the simulation of RIESs towards enhanced efficiency, reliability, and sustainability. The main contributions of this paper are as follows:
Modeling and control of device-level units and energy networks: Averaged switch models of device-level units in DMG are developed and verified in PSIM; the unified energy path method is utilized in both DHNs and NGNs. These models and methods provide new perspectives for understanding and calculating complex energy systems.
Development of energy control algorithms: Hierarchical control strategies for DMG island operation mode and multi-energy dispatch strategies are designed for RIES. These strategies and algorithms can effectively calculate the energy flow and ensure stable operation of the RIES.
DSP-based real-time simulation platform design: A novel simulation platform is built, using DSP as the core processing unit to support highly complex system model iteration and data communication. Through this platform, real-time simulation results of the mathematical models and proposed control algorithms can be achieved.
The organization of this paper is as follows:
Section 2 describes the mathematical models of device-level units in RIESs; the unified modeling of DHN and NGN is documented in
Section 3;
Section 4 introduces the hierarchical island strategy (HIS) for DMG and the multi-energy dispatch strategy (MEDS) for RIESs; a real-time simulation platform for RIESs is constructed and experiments verification are conducted in
Section 5.
5. Real-Time Platform Implementation and Experimental Verification
To validate the accuracy of the device-level unit models and the efficiency and flexibility of the energy control strategies, this paper presents a design for a real-time simulation platform based on DSPs, as shown in
Figure 13. The communication protocol between the DSPs requires network communication rate of 1000 Mbps to support high-speed data transfer, ensuring real-time performance. Communication latency is maintained below 10 microseconds to prevent any adverse impact on system performance. The DSPs are divided into a simulation group and a control group, where the simulation group is used to run the device-level unit and energy network models; the control group receives computational results from the simulation group in sequence via the TCP/IP protocol and controls them according to HIS and MEDS. The PC can monitor and modify the parameters of the control group through the Modbus TCP protocol to achieve scheduling simulations under different conditions. Subsequently, an 18-node RIES case is proposed to conduct dispatch experiments in thermal-led and electricity-led modes. The hierarchical island strategy and multi-energy dispatch strategy implemented in this study have a computational complexity of
, where
n represents the number of nodes in the energy system. This quadratic complexity arises from the need to manage multiple interactions between different energy sources and loads in real time.
5.1. Iteration Technique
To transform the averaged switch models of device-level units within the DMG, derived in
Section 2, into iterative equation sets executable by DSP, this paper selects appropriate transformation methods based on the model order: for open-loop control models with lower orders, such as electrical power transmission lines, first-order forward Euler discretization is used; for transfer functions with closed-loop control and higher orders, bilinear transformation is employed for discretization.
The device-level units often contain numerous state variables that are closely interconnected. Using the conventional forward Euler method can be slow, resulting in lengthy convergence times. To address this, an iterative acceleration algorithm is proposed on the basis of the discretized equations. This method enhances the first-order forward Euler approach by utilizing the updated values of a state variable once its iteration is complete for calculating the next related state variable. For instance, in an N-order system, this approach leads to a set of differential equations involving N state variables:
By applying the acceleration algorithm, we can obtain the following iterative equations:
5.2. Case Configuration
The RIES case study, as shown in
Figure 14, comprises a five-node DMG, a six-node DHN, and a seven-node NGN. The DMG is composed of RIES device-level units, including PV generation, MT generation, BAT storage, and load. The load unit consist of resistive loads EB and CPL (such as electrical vehicle charger). The stable DC bus voltage is 750 V. The maximum power of PV at S = 1000
and T = 298 K is 25 kW; the rated power of the MT generation unit is 42 kW, with a rated speed for the PMSG of 12,000 r/m; the initial SOC of BAT storage unit is 0.65. In the energy conversion equipment, the heat production efficiency of MT (
) is 0.4, and its electrical efficiency (
) is 0.3; the efficiency of the EB (
) is 0.85. The specific circuit parameters of each device-level unit are presented in
Table A1.
The DHN includes a symmetrical six-node supply water network and a six-node return water network. A heat source is located at nodes 1–7, operating under fixed outlet pressure and temperature modes to regulate the overall temperature of the DHN; simulated users are placed between nodes 6–12, 4–10, and 5–11, where the mass flow rate in their branches is determined by pressure, and the heat exchange power is given; a regulating valve operating in a fixed opening mode is installed between branch 2–6; and a booster pump operating in a fixed speed mode is installed between branches 3–4 and 3–5. Specific pipeline branch parameters are presented in
Table A2, with the control valve and booster pump parameters shown in
Table A3.
In this DHN, node 1 is set as a fixed pressure node with a given supply water pressure of 3000 Pa. Node 1 is also the thermal source, with a given temperature; the remaining nodes are defined as fixed injection nodes, where node 7 has a given mass flow rate of 0.15 kg/s, and the mass flow rates for the other nodes are zero. The initial base value for mass flow rate in each branch is set to 0.05 kg/s, with a convergence threshold of 1 and an update step size of 0.7.
The seven-node natural gas network includes six pipeline branches; gas sources are located at nodes 4 and 7, supplying natural gas to the network; natural gas loads are placed at nodes 1, 3, and 5, with node 5 being the MT coupling node; a compressor is set between branch 6–2 to increase the gas pressure by 2 kPa. Specific parameters for the pipeline branches are shown in
Table A4.
In the NGN, nodes 4 and 7 are set as fixed pressure nodes, with node 4 having a gas pressure of 10 kPa and node 7 a pressure of 8 kPa. The remaining nodes are defined as fixed injection nodes, with nodes 1 and 3 given mass flow rates of 0.0025 kg/s, nodes 2 and 6 given zero mass flow rate, and node 5 providing the gas fuel for the MT. The base gas flow velocity for each branch is set to 10 m/s, with a convergence threshold of 1 and a base value update step size of 0.75.
5.3. Experimental Results
The real-time platform selects the TMS320F28335 DSP as its core processing unit, with the onboard W5300 network chip enabling data communication within the hardware platform; it is paired with the DAC8552 for observing the DA conversion results of the model computations through an oscilloscope. The physical platform is shown in
Figure 15, where the DSP module group consists of four DSPs, one of which is for the control group DSP; the remaining simulation group DSPs run models of the DMG, DHN, and NGN, respectively.
5.3.1. Thermal-Led Experiment
In the thermal-led mode, the output power of MT is determined by the thermal load, with the electrical load remaining constant. Adjusting the temperature of the heat source facilitates changes in the thermal load. In this experiment, the electrical load, specifically the CPL load
, is kept constant at 75 kW, and the temperature of the heat source is raised from 80 °C to 100 °C.
Figure 16a depicts the iteration of mass flow rates for the 5 branches of the supply water network and the error correction process, which converges after nine iterations. The changes in water pressure and temperature are shown in
Figure 16b.
As shown in
Figure 17a–c, before the increase in thermal load, it is less than the maximum heat production capacity of MT, and heating is provided solely by MT with EB not operational. At this point, the load current
in DMG corresponds only to the electrical load demand, and the SOC of the storage is below its maximum value. According to HIS, it is indicated that the DMG is in mode 2, with the PV generation unit operating in MPPT mode; HIS adjusts the charging power of the BAT to stabilize the DC bus voltage at 750 V, with SOC in an increasing state.
When the thermal load exceeds the heat production limit of MT, MT operates at its rated power, and its output current rises from 49.3 A to the rated current of 54.1 A; EB increases its power consumption to compensate for the thermal load difference, causing the load current to increase from 100.8 A to 112.4 A. At this point, HIS indicates that the DMG switches from mode 2 to mode 4. The PV generation unit continues to operate in MPPT control mode; the BAT storage unit switches from charging to discharging, with its output current changing from −1.5 A to 5.2 A, and SOC begins to decrease; the DC bus voltage experiences a temporary drop at the moment of thermal load increase, and HIS quickly switches the BAT operation state and adjusts the discharge power to stabilize the DC bus voltage at 750 V.
The increase in MT output power causes the electromagnetic torque
of the PMSG to increase, and since the mechanical torque
, the speed temporarily drops. Subsequently, the fuel demand for MT increases from 0.92 pu. to 1.0 pu., the output mechanical torque
increases, and the speed recovers to 12,000 r/m, as shown in
Figure 17d.
Using the stabilized fuel input value of the MT, the steady-state flow calculation for the NGN converges after eight and seven iterations, as shown in
Figure 18. The gas pressure at each node and the mass flow rate through each branch are listed in
Table 1. Except for the gas source nodes, the gas pressure at other nodes decreases with the increase in thermal load. Due to the presence of the compressor, the mass flow rate in branch 6-2 decreases, while the mass flow rates in the other branches increase due to the increase in thermal load.
5.3.2. Electricity-Led Experiment
In the electricity-led mode, the electrical load determines the output of the MT, with the thermal load remaining constant, and changes to the electrical load are achieved by adjusting the CPL power. In this experiment, the temperature of the heating network’s heat source is kept constant at 100 °C, and the electrical load is increased from 32 kW to 80 kW.
The iteration of mass flow rates for the five branches of the supply water network and the error correction process in this mode are the same as the thermal-led experiment, as shown in
Figure 16a. The hydraulic flow calculation shows the water pressure at various nodes as depicted in
Figure 16b, with the node temperature indicated by the red curve.
As shown in
Figure 19a–c, before the increase in electrical load, it is below the maximum electrical power output of MT. At this time, the thermal load within the system exceeds the heat production capacity of MT, compensated by EB for the thermal load difference. The load current
is 77.8 A, and the SOC of the BAT is below its maximum value, indicating that the DMG is in mode 2, with the PV generation unit operating in MPPT mode; HIS adjusts the BAT charging power to stabilize the DC bus voltage at 750 V, with SOC in a rising state.
After the increase in electrical load, exceeding the maximum electrical power output of MT, MT operates at its rated power, with its output current rising from 39.4 A to the rated current of 54.4 A. At this time, the load current rises from 77.8 A to 118.1 A, indicating that the DMG switches from mode 2 to mode 4, with the PV generation unit still operating in MPPT mode, outputting 33.1 A; the BAT storage unit switches from charging to discharging, with its output current changing from −15.3 A to 10.5 A, and SOC begins to decrease. The DC bus voltage undergoes a transient drop at electrical load increase instant, with HIS quickly switching the BAT operation state and adjusting the discharge power to stabilize the DC bus voltage at 750 V. Changes in fuel demand and speed of MT are shown in
Figure 19d.
Using the stable value of fuel demand calculated with Equation (
41), the mass flow rate
at the MT coupling node is determined for steady-state flow calculations. The iterative process of the gaseous velocity base values is shown in
Figure 20, which converged after eight iterations. The gas pressure at each node and the mass flow rate through each branch are listed in
Table 2. These results highlight how the network responds to changes in demand, with pressure adjustments across nodes and variations in mass flow rates through the branches to accommodate the energy needs in the electricity-led mode.
6. Conclusions
This paper introduced a real-time simulation platform for a RIES that includes DMG, DHN, and NGN. To facilitate real-time multi-energy flow simulation of the RIES, it first developed averaged switch models and control methods for device-level units within the DMG, along with the circuit-dual models for the DHN and NGN. The hierarchical island strategy (HIS) and the multi-energy dispatch strategy (MEDS) were proposed for multi-energy flow control and calculation. Validation was performed through designed case studies and the constructed experimental platform. Experimental results demonstrated that the HIS can quickly adjust the operation modes of device-level units in real time to ensure bus voltage stability. Simultaneously, the MEDS incorporating energy conversion devices such as MT and EB, employed the decomposed flow method for simulating multi-energy flows of RIES under different operational modes. In conclusion, the developed real-time simulation platform not only maintained the stable operation of the DMG, but also effectively managed energy dispatch for the DHN and NGN. This work contributed theoretical and practical insights for the control and simulation of RIES, thus providing practical references for the simulation, design, and operation of integrated energy systems.
In the future, our research could explore advanced optimization algorithms to enhance the efficiency of MEDS, potentially integrating AI and machine learning to predict and manage energy demands dynamically. Additionally, investigating the long-term resilience of RIES against various environmental and operational stresses could further solidify the practical applicability of the simulation platform. Developing expandable models that can be adapted to larger or more complex energy networks may also be a fruitful direction, aiming to support the growing needs of urban energy systems worldwide.