A bi-level planning model involving operating cost and user benefit is constructed. 涉及运营成本和用户收益的两层规划模型被构建。
•
The proposed method achieves supply-demand balance, improves energy efficiency. 提出的 方法 实现 了 供需 平衡, 提高 了 能源 使用效率。
Abstract 摘要
This paper investigates optimal planning of integrated electricity and heat systems (IEHS) based on convolutional neural network-bidirectional long short term memory with attention mechanism (CNN-BiLSTM-Attention) network forecasts. Firstly, CNN and BiLSTM are employed to extract the spatio-temporal features of IEHS data, and the attention mechanism automatically assigns corresponding weights to BiLSTM to distinguish the importance of different time load sequences, then a combined CNN-BiLSTM-Attention network is constructed, which allows for a more accurate load forecasting. Furthermore, we establish optimal planning strategy to improve efficient operation and energy efficiency of the IEHS, in which the upper-level planning model with the optimization objective of minimizing comprehensive operation costs is formulated, the lower-level efficiency model aiming to balance revenue and cost is considered, then genetic algorithm and iterative solution strategy of Cplex solver are applied to optimize the bi-level objective functions. Simulation results show that the proposed CNN-BiLSTM-Attention model obtained smaller RMSE, MAE and MAPE compared to several other forecasting models. In addition, the optimization method could obtain global optimal solution of the bi-level objective functions, which improves the energy utilization efficiency of the IEHS. 这篇论文基于卷积神经网络-双向长短期记忆带注意力机制(CNN-BiLSTM-Attention)网络预测,研究了综合电力和热力系统(IEHS)的最优规划。首先,使用 CNN 和 BiLSTM 提取 IEHS 数据的空间-时间特征,注意力机制自动为 BiLSTM 分配相应的权重,以区分不同时间负荷序列的重要性,然后构建了结合 CNN-BiLSTM-Attention 网络,这使得负荷预测更加准确。此外,我们建立了最优规划策略以提高 IEHS 的高效运行和能源效率,在此策略中,建立了上层规划模型,其优化目标是最小化综合运行成本,下层效率模型旨在平衡收入和成本,然后应用遗传算法和 Cplex 求解器的迭代求解策略来优化双层目标函数。仿真结果表明,提出的 CNN-BiLSTM-Attention 模型在均方根误差(RMSE)、平均绝对误差(MAE)和平均绝对百分比误差(MAPE)方面均优于其他几种预测模型。 此外,该优化方法可以获取双层目标函数的全局最优解,从而提高 IEHS 的能量利用效率。
To date, the multi-energy systems have been recognized as research focus since that they have the merits of flexible and efficient energy production and utilization. One of most important forms of multi-energy systems is the IEHS, consisting of the electricity system and district heating system [1], which facilitates efficient interactions between individual energy sectors. Therefore, a balance between energy supply and consumption could be achieved by multi-energy interaction in energy conversion and storage equipment [2], [3]. However, more challenges also arise due to the coupling which makes the interconnected systems much more complex. For example, the time scales of the electricity and heating systems are often quite different [4], making it difficult to establish accurate prediction model. Moreover, considering longer term dispatching, the uncertainties will have vital impact on economic and stable operation of the IEHS. Consequently, it is important from the standpoint of application to research load forecasting and operation optimization of the IEHS. 截至今日,多能源系统已被视为研究重点,因为它们具有灵活高效的能源生产和利用的优点。多能源系统中最重要的一种形式是 IEHS,它由电力系统和区域供暖系统组成 [1],有助于各个能源部门之间的高效互动。因此,通过能源转换和存储设备中的多能源互动,可以实现能源供应与消费之间的平衡 [2]、[3]。然而,由于耦合导致的复杂性也带来了更多的挑战。例如,电力系统和供暖系统的时标往往相差很大 [4],这使得建立准确的预测模型变得困难。此外,从长期调度的角度考虑,不确定性将对 IEHS 的经济稳定运行产生重要影响。因此,从应用的角度出发,研究 IEHS 的负荷预测和运行优化非常重要。
Deep neural networks, a new class of promising architectures to provide comprehensive and detailed information from raw data, have been widely applied in load forecasting of multi-energy systems. In general, there are two main methods based on deep learning, that is, single model method and combined model method. For single model method, Lin et al. investigated a dual-stage attention based LSTM network for short-term zonal load probabilistic forecasting [5]. A recurrent neural network (RNN) model, consisting of two simple RNN layers and a dense layer, was constructed, which was used to predict future energy load values [6]. Based on deep belief network, a deep learning based approach was applied for deterministic and probabilistic wind speed forecasting [7]. Among these deep learning models, the LSTM is considered as an effective technique for tackling time series forecasting issues due to its efficient performance for accurate modeling of complex nonlinearity [8]. In the literature [9], an ensemble strategy was incorporated with the LSTM model, and a strand-based LSTM recurrent neural network was applied to heat load forecasting for combined heat and power plants. Guo et al. developed a BiLSTM multi-task learning methodology for integrated energy systems, which focuses on the coupling relationship among multiple loads [10]. By introducing an enhanced framework based on BiLSTM neural network, Pavlatos et al. researched electrical load forecasting [11]. It is noteworthy that, even though these models mentioned above have been performed for load forecasting, single model used still has some shortcomings, such as loss of sequence feature information, confusion of structural information between data and insufficient multidimensional feature mining. 深度神经网络,这是一种新的有前途的架构,能够从原始数据中提供全面和详细的信息,已在多能系统负荷预测中得到了广泛应用。一般来说,基于深度学习的方法主要有两种,即单模型方法和组合模型方法。对于单模型方法,Lin 等人研究了一种基于双阶段注意力的 LSTM 网络进行短期区域负荷概率预测[5]。构建了一个由两个简单的 RNN 层和一个密集层组成的递归神经网络(RNN)模型,用于预测未来能源负荷值[6]。基于深度信念网络,一种基于深度学习的方法被应用于确定性和概率性风速预测[7]。在这些深度学习模型中,LSTM 被认为是一种有效的技术,因为它在准确建模复杂非线性方面表现出色[8]。在文献[9]中,将集成策略与 LSTM 模型结合使用,并应用了一种基于线程的 LSTM 递归神经网络进行热负荷预测,适用于热电联产电厂。Guo 等人 开发了一种用于综合能源系统的 BiLSTM 多任务学习方法,该方法专注于多个负荷之间的耦合关系 [10]。Pavlatos 等人基于 BiLSTM 神经网络引入了增强框架,研究了电力负荷预测 [11]。值得注意的是,尽管上述模型已被用于负荷预测,但单模型使用仍然存在一些不足,如序列特征信息丢失、数据之间结构信息混淆以及多维特征挖掘不足等问题。
In contrast to a single model, the combined model combining the features and advantages of different models, which can realize a more accurate forecasting. In the past decade, much attention has been paid to this direction. For example, Sajjad et al. developed hybrid sequential learning-based energy forecasting model that employs CNN and gated recurrent units into a unified framework for short term residential load forecasting [12]. In [13], Fazlipour et al. presented a deep LSTM-based stacked autoencoder model for short-term load forecasting. Utilizing CNN and LSTM to extract input data properties and learn long term dependency within input data, then a hybrid parallel CNN-LSTM network was proposed in [14]. Li et al. put forward short-term multi-energy load forecasting method for integrated energy systems in [15]. By feature selection scheme, a CNN-BiLSTM model is implemented for short-term wind power forecasting in [16]. However, we would like to emphasize that the above-mentioned research works do not focus on the coupling relationship among multiple loads. 与单一模型相比,结合不同模型的特征和优势的综合模型可以实现更准确的预测。在过去十年中,这一方向受到了广泛关注。例如,Sajjad 等人开发了一种基于混合序列学习的能源预测模型,将 CNN 和门控循环单元结合到统一框架中,用于短期住宅负荷预测[12]。在[13]中,Fazlipour 等人提出了一种基于深度 LSTM 的堆叠自编码器模型,用于短期负荷预测。利用 CNN 和 LSTM 提取输入数据特性并学习输入数据中的长期依赖性,然后在[14]中提出了一个混合并行的 CNN-LSTM 网络。李等人在[15]中提出了综合能源系统中的短期多能源负荷预测方法。通过特征选择方案,在[16]中实现了基于 CNN-BiLSTM 的短期风力发电预测模型。然而,我们希望强调的是,上述研究工作并未关注多个负荷之间的耦合关系。
To address these issues, we introduce attention mechanism to the CNN-BiLSTM model, and call the proposed model CNN-BiLSTM-Attention network. The attention mechanism is implemented to preserve important information in input features by weight distribution and enhance the feature extraction ability of data. Also, it can solve the issue of information loss caused by excessively long sequences in the BiLSTM. Compared with the existing forecasting models, the proposed CNN-BiLSTM-Attention network has two advantages: 为了解决这些问题,我们在 CNN-BiLSTM 模型中引入了注意力机制,并将提出的模型称为 CNN-BiLSTM-Attention 网络。注意力机制通过权重分布保留输入特征中的重要信息,并增强数据的特征提取能力。此外,它还可以解决 BiLSTM 中由于序列过长而导致的信息丢失问题。与现有的预测模型相比,提出的 CNN-BiLSTM-Attention 网络有两个优势:
(1)
Unlike the CNN-LSTM-Attention [14], [17], the CNN-BiLSTM-Attention network, involving forward LSTM layer and backward LSTM layer, could reveal the correlation of multiple loads, thus load data features could be effectively extracted. 与 CNN-LSTM-Attention [14], [17] 不同,CNN-BiLSTM-Attention 网络包含前向 LSTM 层和后向 LSTM 层,因此可以揭示多种负荷之间的关联性,从而有效地提取负荷数据特征。
(2)
Compared to the combined model CNN-GRU [12] and CNN-BiLSTM [15], [16], [18], the proposed CNN-BiLSTM-Attention network introduced the attention mechanism, which can allocate important features between electricity and head loads in network training, it allows for more accurate load forecasts. 与结合模型 CNN-GRU [12] 和 CNN-BiLSTM [15]、[16]、[18] 相比,提出的 CNN-BiLSTM-Attention 网络引入了注意力机制,可以在网络训练中分配电和头载荷的重要特征,从而允许更准确的负荷预测。
Accuracy load forecasting in IEHS is essential to precisely obtain the system state variation trend and operation characteristics, providing a foundation for economic dispatch and efficient operation. In order to obtain sustainability on both supply and demand in the IEHS, a vital factor, integrated demand response, is proposed to be considered in order to balance supply and demand. On the one hand, it can provide assurance for the operation and switching of energy in different systems. On the other hand, it could reduce energy usage costs by optimizing users energy usage, timely understanding the market price of energy, and responding accordingly. Lately, operation optimization and scheduling considering demand response of the IEHS have been concerned. Based on uncertainty and integrated demand response, Xiao et al. investigated optimal scheduling of regional integrated energy system [19]. Taking into account electricity and heat demands together, a distributed solution algorithm was implemented for scaled nonlinear optimization problem [20]. However, the above-presented strategies only take the minimum comprehensive economic cost as an objective function of IEHS, ignoring benefit costs. Besides, they are implemented based on historical data and fail to consider load forecasting work. To the best of our knowledge, scant literature has ever explored simultaneously load forecasting and optimization of the IEHS, which is essential to energy efficiency in IEHS. IEHS 的准确负荷预测对于精确获取系统状态变化趋势和运行特性、为经济调度和高效运行提供基础至关重要。为了在 IEHS 中实现供需的可持续性,提出了综合需求响应这一重要因素以平衡供需。一方面,它可以为不同系统中的能源运行和切换提供保障。另一方面,它可以通过优化用户能源使用、及时了解能源市场价格并相应地作出反应来降低能源使用成本。最近,考虑 IEHS 需求响应的运行优化和调度引起了关注。基于不确定性与综合需求响应, Xiao 等人研究了区域综合能源系统的最优调度问题 [19]。同时,考虑电力和热能需求,实现了一个分布式解决方案算法以解决缩放的非线性优化问题 [20]。 然而,上述提出的策略仅将最小综合经济成本作为 IEHS 的目标函数,忽略了效益成本。此外,这些策略基于历史数据实施,并未考虑负荷预测工作。据我们所知,很少有文献同时探讨负荷预测和 IEHS 的优化,而这对于 IEHS 的能效至关重要。
In current research, aim at investigating issue of load forecasts and optimization for IEHS, main originality and contributions of this paper can be summarized as follows. 在当前研究中,旨在探讨 IEHS 的负荷预测和优化问题,本文的主要创新性和贡献可以总结如下。
(1)
Compared to the energy storage system, this research constructed an IEHS that includes wind turbine, photovoltaic unit, battery storage device, cogeneration unit and thermal storage unit. 与储能系统相比,本研究构建了一个包含风力发电机、光伏单元、电池储能装置、 cogeneration 单元和热储能单元的 IEHS。
(2)
In contrast to the single objective optimization model aiming at minimum comprehensive operating cost presented in [2], [8], [20], a bi-level planning model considering both the comprehensive operating cost and user benefit objectives is constructed, in which the upper-level economic planning model that minimizes comprehensive operation costs, the lower-level efficiency planning model that meets user’s integrated demand response and maximizes user’s benefits. 与[2]、[8]、[20]中提出的旨在最小化综合运营成本的单目标优化模型不同,构建了一个同时考虑综合运营成本和用户效益目标的多层次规划模型,在该模型中,上层的经济规划模型旨在最小化综合运营成本,下层的效率规划模型满足用户的综合需求响应并最大化用户效益。
(3)
The bi-level planning model realizes the IEHS optimization through power interaction, optimizing the use and allocation of energy, thus balancing balance the supply and demand relationship and improving energy utilization efficiency. Meanwhile, user benefits are taken into consideration in the optimization, which could balance of benefits among multiple entities of IEHS. 双层规划模型通过电力交互实现 IEHS 优化,优化能源的使用和分配,从而平衡供需关系并提高能源利用效率。同时,在优化过程中考虑用户利益,可以在 IEHS 的多个实体之间平衡利益。
The remaining sections of this paper is organized as below. In Section 2, we first briefly describe the interaction structure for the IEHS, and then establish the combined CNN-BiLSTM-Attention load forecasting model. In Section 3, a bi-level optimization strategy of the IEHS is designed in detail, including an upper-level optimal scheduling model and a lower-level efficiency model, then corresponding optimization technique is introduced. In Section 4, taking integrated energy systems dataset of Arizona State University Tempe campus as a case, the effectiveness and feasibility of developed scheme is verified by simulation analysis. Finally, conclusions of this research are discussed. 本文剩余部分的组织结构如下。在第 2 节中,我们首先简要描述 IEHS 的交互结构,然后建立结合 CNN-BiLSTM-Attention 的负荷预测模型。在第 3 节中,详细设计了 IEHS 的双层优化策略,包括上层最优调度模型和下层效率模型,然后介绍了相应的优化技术。在第 4 节中,以亚利桑那州立大学 Tempe 校区的综合能源系统数据集为例,通过仿真分析验证了所开发方案的有效性和可行性。最后,讨论了本研究的结论。
2. IEHS structure and CNN-BiLSTM-Attention model 2. IEHS 结构和 CNN-BiLSTM-Attention 模型
Traditional integrated electricity systems research have paid attention to a single form of energy source, and failed to consider the coupling characteristics of multiple energies. In current research, we utilize the IEHS of Arizona State University Tempe campus [21] as a target to investigate the inherent coupling characteristics between electricity and heat loads. Fig. 1 shows IEHS interaction structure. 传统集成电力系统研究关注单一能源形式,未能考虑多种能源的耦合特性。当前的研究中,我们以亚利桑那州立大学 Tempe 校区的 IEHS [21]为目标,探讨电力和热负荷之间的固有耦合特性。图 1 展示了 IEHS 的交互结构。
The integrated energy system of the campus contains the conversion relationship of various energy forms to satisfy the load demand of the campus. Power sources include power grid purchase, wind power, photovoltaic, gas turbines, etc, while transmission equipment supplements the elastic demand of electricity load. The heat energy mainly comes from the heat of gas turbines, gas boilers, etc and the heat storage units supplements the heat load demand. The IEHS equipment is mainly composed of gas turbine, gas boiler, energy storage equipment and other parts. In current research, the IEHS consists of two structures, i.e, electricity structure and heat structure, in which the electricity structure is made up of combined heat and power units and wind energy storage apparatus, while the heat structure is made up of combined heat and power units. 校园综合能源系统包含各种能源形式的转换关系,以满足校园的负荷需求。电源包括电网购买、风能、光伏、燃气涡轮机等,而传输设备补充了电力负荷的弹性需求。热能主要来自燃气涡轮机、燃气锅炉等,热储能单元补充热负荷需求。IEHS 设备主要由燃气涡轮机、燃气锅炉、储能设备等部分组成。目前的研究中,IEHS 由两种结构组成,即电力结构和热结构,其中电力结构由热电联产单元和风能储能装置组成,而热结构由热电联产单元组成。
Fig. 1. Schematic structure of the IEHS. 图 1. IEHS 的示意图
Currently, we consider the coupling characteristics of electric and heat load, and calculate the load coupling degree of system. We start with data standardization (1)where represents the mean value of electricity and heat loads, stands for standard deviation, indicates the number of hours, the actual value of the load on day i, x is e or h, e and h represent electricity and heat loads respectively. 目前,我们考虑电负荷和热负荷的耦合特性,并计算系统的负荷耦合度。我们从数据标准化开始,其中 (1) 表示电和热负荷的均值, 代表标准差, 表示小时数, 表示第 i 天的实际负荷值,x 是 e 或 h,e 和 h 分别代表电负荷和热负荷。
The proportion of the i-day electricity and heat load to the system load is (2)where is the standard value of the load, indicates the total load on day . i-day 的电力和热负荷占系统负荷的比例为 (2) ,其中 是负荷的标准值, 表示第 天的总负荷。
Then, we compute the entropy of the system load on day as follows: (3) 然后,我们计算第 天系统负载的熵,如下: (3)
For day , the system load difference coefficient and load weight are calculated as (4) 对于第 天,系统负载差异系数 和负载权重 计算为 (4)
In the following, we compute the comprehensive change index of electricity and heat load (5)where is the comprehensive change index. 在以下内容中,我们计算了电和热负荷的综合变化指数 (5) ,其中 是综合变化指数。
Thus, we could get the load coupling degree (6) 因此,我们可以得到负载耦合程度 (6)
2.1. Convolutional neural network 2.1. 卷积神经网络
The CNN, with its special structure, could effectively explore the relationship of multiple energy sources load, more important features can be extracted to enhance the data feature quality [22], which provides support for increasing the precision of the IEHS load forecasting. The components of CNN comprise convolution layer, pooling layer and fully connected layer, as shown in Fig. 2. The convolution layer is the core [23], which involves a small set of learning convolution kernels that map low-dimensional to high-dimensional characteristic, and enhance their depth. To reduce parameter dimension, the primary features are extracted, then the neurons are mapped in nonlinear way by activation functions. Subsequently, utilizing maximum pooling and average pooling to summarize the features obtained from the convolution operation, decreasing data dimension. Lastly, the feature is transformed into a one-dimensional structure through a fully connected layer to extract feature vectors. We would like to stress that since the CNN cannot explore time series features [24], so we introduce the BiLSTM model to handle with it. CNN 凭借其特殊的结构,能够有效地探索多种能源负荷之间的关系,提取更重要的特征以提高数据特征质量 [22],从而为提高 IEHS 负荷预测精度提供支持。CNN 的组件包括卷积层、池化层和全连接层,如图 2 所示。卷积层是核心 [23],涉及一组学习卷积核,将低维度映射到高维度特征,并增加其深度。为了减少参数维度,提取主要特征,然后通过激活函数以非线性方式映射神经元。随后,利用最大池化和平均池化来总结卷积操作获得的特征,降低数据维度。最后,通过全连接层将特征转换为一维结构以提取特征向量。我们强调,由于 CNN 无法探索时间序列特征 [24],因此我们引入了 BiLSTM 模型来处理这一问题。
Fig. 2. Schematic structure of the CNN. 图 2. CNN 的结构示意图。
2.2. BiLSTM model 2.2. BiLSTM 模型
LSTM is a variation of recurrent neural network by substituting the elementary hidden neurons with LSTM units, which can effectively address this gradient issue in recurrent neural network, and simultaneously keep the advantage of recurrent neural network in tackling time-series issue [25]. The structure of LSTM unit is displayed in Fig. 3, which involves three gate controllers, namely the forget, input and output gates, and they mainly used to determine what information should be remembered. LSTM 是递归神经网络的一种变体,通过用 LSTM 单元替代基本的隐藏神经元,可以有效地解决递归神经网络中的梯度问题,并同时保持递归神经网络在处理时间序列问题方面的优势 [25]。LSTM 单元的结构如图 3 所示,包括三个门控制器,即忘门、输入门和输出门,它们主要用于决定应该记住什么信息。
From Fig. 3, three gates at time t are computed as (7)(8)(9)where , and are the forget gate, input gate and output gate, respectively, is nonlinear activation function, usually, the sigmoid function can be used for the gates. , and denote weight, , and represent bias, is current input. 从图 3 中,时间 t 的三个门为 (7)(8)(9) ,其中 、 和 分别是忘门、输入门和输出门, 是非线性激活函数,通常门可以使用 sigmoid 函数。 、 和 表示权重, 、 和 表示偏置, 是当前输入。
Inside the LSTM, an intermediate state is generated as (10)(11)where tanh () is the nonlinear tanh activation function, is the weight, is the bias, and is an intermediate state. 在 LSTM 中,生成了一个中间状态 作为 (10)(11) ,其中 tanh ( ) 是非线性的 tanh 激活函数, 是权重, 是偏置, 是一个中间状态。
Then, the hidden state of this LSTM is updated as (12) 然后,这个 LSTM 的隐藏状态更新为 (12)
In the LSTM, the state is in a single direction, that is, transmitted from front to back. It should be emphasized that in IEHS load forecasting, the electric heating load is time-dependent, and the load is correlated from previous moment to the next moment. As a result, BiLSTM is introduced for feature extraction. The BiLSTM can take advantage of the temporal correlation between multi-energy loads, which includes forward LSTM layer and backward LSTM layer, whose output is determined utilizing the state of two LSTMs [26], structure of the BiLSTM is displayed in Fig. 4. 在 LSTM 中,状态是单向传递的,即从前向后传递。需要注意的是,在 IEHS 负荷预测中,电加热负荷具有时间依赖性,负荷从上一时刻到下一时刻是相关的。因此,引入了 BiLSTM 进行特征提取。BiLSTM 可以利用多能负荷之间的时序相关性,包括前向 LSTM 层和后向 LSTM 层,其输出是利用两个 LSTM 的状态确定的[26],BiLSTM 的结构如图 4 所示。
The hidden layer updates status of forward LSTM and backward LSTM, and the final output of the BiLSTM can be expressed by (13)(14)(15)where , and are activation functions of each layer, respectively, is the input of (i), and represent the LSTM hidden states of the forward and backward iterations, respectively, is the output, indicates the weights of each layer. 隐藏层更新前向 LSTM 和后向 LSTM 的状态,BiLSTM 的最终输出可以表示为 (13)(14)(15) ,其中 、 和 分别是每层的激活函数, 是 (i )的输入, 和 分别表示前向和后向迭代的 LSTM 隐藏状态, 是输出, 表示每层的权重。
Fig. 4. Structure diagram of the BiLSTM. 图 4. 双向 LSTM 的结构图。
2.3. Attention mechanism 2.3. 注意机制
Since the electricity and head loads have different focuses, there is no need to handle with each feature to forecast them. Focusing too much on irrelevant characteristics will be detrimental to exploring effective information. In this case, the attention mechanism is introduced for allocating important features between electricity and head loads [22], its structure is described in Fig. 5. In the IEHS load forecasting, the probability of attention distribution is calculated, including probability distribution of generating attention. Consequently, the feature vector is obtained to highlight the impact of different characteristics. 由于电力负荷和头负荷的关注点不同,无需分别处理每个特征来进行预测。过多关注无关特征会妨碍有效信息的探索。在这种情况下,引入了注意力机制来分配电力负荷和头负荷的重要特征 [22],其结构如图 5 所示。在 IEHS 负荷预测中,计算了注意力分布的概率,包括生成注意力的概率分布。最终获得特征向量以突出不同特征的影响。
The switching process of attention states is described as (16)(17)(18)(19)where (i) is the input of attention, i.e., output of the BiLSTM, is hidden layer output in BiLSTM, is attention coefficient of , F is the output of attention, is eigenvector, V, U, W, and b are learning parameter for this model, and they may be constantly updated as model. 注意力状态转换过程描述为 (16)(17)(18)(19) ,其中 (i ) 是注意力的输入,即 BiLSTM 的输出, 是 BiLSTM 的隐藏层输出, 是 的注意力系数,F 是注意力的输出, 是特征向量,V、U、W 和 b 是该模型的训练参数,它们可能会随着模型的更新而不断调整。
Fig. 5. The Attention unit structure diagram. 图 5. 注意机制单元结构图。
2.4. CNN-BiLSTM-Attention model 2.4. CNN-BiLSTM-Attention 模型
Based on the above analysis, this paper puts forward load forecasting approach applying CNN-BiLSTM-Attention model, and specific implementation process is illustrated in Fig. 7, it could be described utilizing the following steps: 基于上述分析,本文提出了应用 CNN-BiLSTM-Attention 模型的负荷预测方法,并在图 7 中具体展示了实施过程,可以描述为以下步骤:
(1) First, applying the CNN architecture involving two one-dimensional convolutional layers and a pooling layer to automatically mine underlying features within load data. The convolution layer utilized for mining effective nonlinear local features, and pooling layer compresses extracted features and generates more critical feature information. (1) 首先,应用包含两个一维卷积层和一个池化层的 CNN 架构,自动挖掘负荷数据中的潜在特征。卷积层用于挖掘有效的非线性局部特征,而池化层则压缩提取的特征并生成更为关键的特征信息。
(2) Second, the BiLSTM hidden layer learns local features obtained in the step one, then the global information could be extracted iteratively from local features. These features generated are passed to the attention mechanism, which automatically allocates the importance of the time information. Consequently, the time series properties of load data could be used to mine deep time correlation more effectively. (2) 第二,BiLSTM 隐藏层学习步骤一中获得的局部特征,然后可以从局部特征中迭代提取全局信息。生成的这些特征会被传递给注意力机制,该机制会自动分配时间信息的重要性。因此,可以更有效地利用负载数据的时间序列特性来挖掘深层次的时间相关性。
(3) Third, the attention layer output is transmitted to a fully connected layer, realizing load forecasting of CNN-BiLSTM-Attention model. Furthermore, random deactivation technology is introduced into preventing overfitting, that is a dropout layer is attached behind every hidden layer in the BiLSTM [27], which could not only prevent overfitting, but also improve model generalization and reduce model training time. (3) 第三,注意力层的输出传递到全连接层,实现了 CNN-BiLSTM-Attention 模型的负荷预测。此外,在 BiLSTM 的每个隐藏层后面引入了随机失活技术,即附加一个 dropout 层[27],这不仅可以防止过拟合,还能提高模型的泛化能力并减少模型训练时间。
(4) Finally, we adopt adaptive moment estimation technique [28] to train the constructed CNN-BiLSTM-Attention model, improving the accuracy of the model. (4) 最后,我们采用自适应矩估计技术 [28] 来训练构建的 CNN-BiLSTM-Attention 模型,提高模型的准确性。
Based on the above analysis, the flowchart of the CNN-BiLSTM-Attention network training is shown in Fig. 7. 基于上述分析,CNN-BiLSTM-Attention 网络训练的流程图如图 7 所示。
Fig. 7. Flowchart of the CNN-BiLSTM-Attention network training. Fig. 7. CNN-BiLSTM-Attention 网络训练流程图。
Remark 1 备注 1
For the use of CNN-BiLSTM-Attention network, we solve overfitting of data and the complexities from two aspects. First, in terms of overfitting of data, random deactivation technology is introduced into preventing overfitting, that is a dropout layer is attached behind every hidden layer in the BiLSTM, as shown in Fig. 6, its role is to randomly drop a portion of neurons during training to prevent the model from becoming overly dependent on specific neurons, which could not only prevent overfitting, but also improve model generalization. Second, to reduce the complexities, we appropriately the convolutional layer number of CNN and the hidden layer number of BiLSTM. Also, the attention mechanism used can better allocate the input information features and reduce the computational time by the models to process excess information during the optimization process. 对于 CNN-BiLSTM-Attention 网络的使用,我们从两个方面解决了数据过拟合和复杂性问题。首先,在数据过拟合方面,引入了随机失活技术以防止过拟合,即在 BiLSTM 的每个隐藏层后面附加一个 dropout 层,如图 6 所示,其作用是在训练过程中随机丢弃一部分神经元,防止模型过度依赖特定的神经元,这不仅可以防止过拟合,还可以提高模型的泛化能力。其次,为了减少复杂性,我们适当减少了 CNN 中的卷积层数量和 BiLSTM 中的隐藏层数量。此外,所使用的注意力机制可以更好地分配输入信息特征,并在优化过程中减少模型处理多余信息的计算时间。
Remark 2 备注 2
In the IEHS, sampling and calculation delay is a common problem, which is mainly caused by the physical characteristics of various energy sources in the system, the random fluctuations of wind and photovoltaic, and the characteristics of multiple time scales, which brings certain difficulties to the load forecasting of the IEHS. In load forecasting research, when sampling and computation delay occurs, the training data of the model cannot be updated in real time, and the feature information of the data cannot be effectively extracted, thus unable to fully reflect the dynamic change of load. This will lead to weak training ability and generalization ability of the model, and ultimately affect the accuracy and timeliness of load forecasting. 在 IEHS 中,采样和计算延迟是一个常见问题,主要是由系统中各种能源源的物理特性、风能和光伏的随机波动以及多时间尺度的特点引起的,这给 IEHS 的负荷预测带来了一定的困难。在负荷预测研究中,当出现采样和计算延迟时,模型的训练数据不能实时更新,数据的特征信息也不能有效提取,从而无法充分反映负荷的动态变化。这将导致模型的训练能力和泛化能力较弱,最终影响负荷预测的准确性和及时性。
3. Bi-level planning model and optimization strategy for the IEHS 3. IEHS 的两级规划模型及优化策略
The established CNN-BiLSTM-Attention network is utilized to achieve load prediction for the IEHS, on the basis of this, we further address the IEHS optimization. The IEHS considered in Fig. 1 mainly consists of gas internal combustion engine, gas boiler, storage battery, heat accumulator and other equipments. When the power of the IEHS is insufficient, it can be supplemented by batteries and electricity purchase from the grid. When the heat generated through this system is insufficient, the energy conversion of the heat accumulator and gas turbine can be applied to supplement the heat energy, and ultimately meet the random requirements of the energy supply as well as the needs of the user. To enhance the efficient operation and energy efficiency of the IEHS, a bi-level programming model that simultaneously considers comprehensive operation costs and user benefits is formulated in this section, then corresponding optimization strategies are also mentioned. 利用已建立的 CNN-BiLSTM-Attention 网络实现 IEHS 的负荷预测,基于此,我们进一步解决 IEHS 的优化问题。图 1 中考虑的 IEHS 主要由燃气内燃机、燃气锅炉、储能电池、热能蓄热器及其他设备组成。当 IEHS 的功率不足时,可以通过电池和电网购电进行补充。当通过该系统产生的热量不足时,可以通过热能蓄热器和燃气轮机的能量转换来补充热量,最终满足能源供应的随机需求以及用户的需求。为了提高 IEHS 的高效运行和能源效率,在本节中制定了同时考虑综合运行成本和用户利益的双层规划模型,随后还提到了相应的优化策略。
3.1. The upper-layer planning model considering comprehensive operation costs 3.1. 考虑综合运营成本的上层规划模型
The upper-level planning model is responsible for minimizing comprehensive operation cost for the IEHS, i.e., objective function (14), during the planning period. Currently, the comprehensive operation cost includes grid transaction costs in (15), maintenance costs in (16), fuel costs in (17), and revenue from selling electricity and heat to users in (18), in which when the grid transaction costs is greater than 0, it means buying electricity from the grid. Otherwise, it means selling electricity to the grid. Besides, in the planning model, to better meet the changing demand for electricity and heat and improve energy efficiency, users demand response including user electricity load in (19) and user heat load in (20), is also involved. In addition, the cost of solar PV, wind and battery in (21) are also considered in the objective function . (20)(21)(22)(23)(24)(25)(26)(27) 高层规划模型负责在规划期内最小化 IEHS 的综合运营成本,即目标函数(14)。目前,综合运营成本包括电网交易成本 (15)、维护成本 (16)、燃料成本 (17)和向用户出售电力和热能所得收入 (18),其中当电网交易成本大于 0 时,表示从电网购买电力;否则,表示向电网出售电力。此外,在规划模型中,为了更好地满足电力和热能需求的变化并提高能源效率,用户响应需求包括用户电力负荷 (19)和用户热负荷 (20)。另外,太阳能光伏、风能和电池的成本 (21)也被纳入目标函数 中。 (20)(21)(22)(23)(24)(25)(26)(27)
Remark 3 备注 3
The objective function given in Eq. (20) is convex. Currently, the genetic algorithm is used to optimize Eq. (20), it selects individuals with high fitness and performs crossover and mutation to gradually move the population towards the optimal solution. This local search ability helps the algorithm discover local optimal solutions in the search space. Based on the properties of convex functions, the local optimal solution of a convex function is the global optimal solution. Therefore, the optimal solution obtained by the genetic algorithm can be considered as the global optimal solution of the objective function. 给定的目标函数(式(20))是凸函数。目前,使用遗传算法优化式(20),它选择适应度高的个体并进行交叉和变异,逐步将种群推向最优解。这种局部搜索能力有助于算法在搜索空间中发现局部最优解。基于凸函数的性质,凸函数的局部最优解就是全局最优解。因此,遗传算法获得的最优解可以被认为是目标函数的全局最优解。
This planning model considers IEHS operation constraints while minimizing the IEHS cost as well as satisfying users demand response. All these constraints are applied into hourly time resolution across all equipment, which involve: 该规划模型在最小化 IEHS 成本的同时考虑 IEHS 运行约束,并满足用户的需求响应。所有这些约束都应用于所有设备的每小时时间分辨率中,包括:
(1) Electricity equilibrium constraints: Constraint (22) maintains that the model will propose a balance between electricity supply and demand at every time interval within the electricity system, including heat demand and electricity demand driven by heat energy. In this model, wind power, photovoltaic output, gas turbine power supply, electricity demand load and battery charge and discharge power constitute balance constraints. Electricity supply balance plays a decisive role in the frequency stability and voltage stability of the grid. (28) (1) 电力平衡约束:约束(22)确保模型将在电力系统内的每个时间间隔内提出电力供应与需求之间的平衡,包括由热能驱动的热需求和电力需求。在这个模型中,风能输出、光伏输出、燃气涡轮供电、电力需求负荷以及电池充放电功率构成平衡约束。电力供应平衡在电网的频率稳定性和电压稳定性中起着决定性作用。 (28)
(2) Heat equilibrium constraints: Constraint (23) illustrates energy balance for heat system. In this model, heat power balance constraint is composed of gas boilers, waste heat boilers, heat demand loads, and heat storage units, maintaining the supply and demand balance of heat source conversion. Heat loss often occurs when heat is transmitted through pipes, for a pipe unit with a temperature of and heat transfer coefficient of , the heat loss at time is [29], [30], and it is added to the heat equilibrium constraints to obtain. (29) (2) 热平衡约束:约束 (23) 说明了热系统中的能量平衡。在该模型中,热功率平衡约束由燃气锅炉、余热锅炉、热负荷和热储存单元组成,维持热源转换的供需平衡。热传输过程中常常会发生热损失,对于温度为 、热传递系数为 的管段,在时间 时的热损失为 [29]、[30],将其添加到热平衡约束中以获得 (29) 。
(3) Device constraints: Device constraints ensure that each device works within its optimal operating range, avoiding overuse or overload of devices, and maintaining system stability and reliability. Constraints (24) to (31) involve output constraint of the device, capacity constraint of the energy storage device, charging and discharging constraint, purchasing power constraint, and climbing rate constraint. (30)(31)(32)(33)(34)(35)(36)(37) (3) 设备约束:设备约束确保每个设备在其最佳工作范围内运行,避免设备过度使用或过载,从而保持系统的稳定性和可靠性。约束 (24) 至 (31) 包括设备的输出约束、储能设备的容量约束、充放电约束、购电能力约束和爬坡率约束。 (30)(31)(32)(33)(34)(35)(36)(37)
(4) Rechargeable battery constraints: The battery can effectively manage the use of the battery, ensure that it plays the best role in the IEHS, and improve the stability and reliability of the IEHS. Constraints (32) to (38) include battery charge and discharge constraint, charge state constraint, mutual exclusion constraint, charge and discharge frequency constraint, and charge and discharge climb rate constraint. (38)(39)(40)(41)(42)(43)(44) (4) 可充电电池约束:电池可以有效管理电池的使用,确保其在 IEHS 中发挥最佳作用,并提高 IEHS 的稳定性和可靠性。约束 (32) 至 (38) 包括电池充放电约束、充电状态约束、互斥约束、充放电频率约束以及充放电爬坡率约束。 (38)(39)(40)(41)(42)(43)(44)
(5) Heat storage unit constraints: Heat storage unit constraint is helpful to manage and enhance the performance of heat storage unit, which is beneficial for improving the energy utilize efficiency and enhancing the economy for the IEHS. In this model, the constraints of heat storage and heat release, state of charge and discharge, mutual exclusion and climb rate of the storage unit are included in constraints (39) to (43). (45)(46)(47)(48)(49) (5) 热存储单元约束:热存储单元约束有助于管理和提升热存储单元的性能,有利于提高 IEHS 的能量利用效率和经济性。在该模型中,热存储和热释放的约束、充放电状态、互斥性和存储单元的爬坡率约束包含在约束(39)到(43)中。 (45)(46)(47)(48)(49)
Based on the established upper-level planning model with various constraints, as described in (15)–(43), the genetic algorithm [31] is applied for optimizing variables including transferable electricity load , transferable heat load , charging power of the battery , discharging power of the battery , heat storage power of the heat storage unit , heat release power of the heat storage unit , output electricity power of the gas turbine , output heat power of the gas boiler , purchase electricity from the grid , and offer electricity to grid . In this case, the lowest comprehensive operation cost of the IEHS could be obtained. 基于第(15)至(43)条中描述的具有各种约束的上层规划模型,应用遗传算法[31]对可转移的电力负荷 、可转移的热负荷 、电池充电功率 、电池放电功率 、热储能单元的热储能功率 、热储能单元的热释放功率 、燃气轮机的输出电力功率 、燃气锅炉的输出热功率 、从电网购电 和向电网供电 等变量进行优化。在这种情况下,可以得到 IEHS 的最低综合运行成本。
3.2. The lower-level user benefit model considering user demand 3.2. 考虑用户需求的低层级用户收益模型
The lower-level planning model is responsible for solving optimal operation of IEHS under the synergistic action of energy operators and integrated demand response, taking the benefit function and energy use cost into account. More specifically, it is to maximize the difference between the user benefit function and the energy use cost in the objective function (44). (50)(51) 下级规划模型负责在能源运营商和综合需求响应协同作用下,解决 IEHS 的最优运行问题,并考虑效益函数和能源使用成本。具体来说,是在目标函数(44)中最大化用户效益函数与能源使用成本之间的差值。 (50)(51)
This model takes into account not only the comprehensive operation constraints of the upper-level model, but also the price constraints and the adjustment constraints of the heating load in the lower-level model, which includes: 该模型不仅考虑了上级模型的综合运行约束,还考虑了下级模型中的供暖负荷的价格约束和调整约束,包括:
(1) Price constraints: Constraint (46) is that to protect the interests of each participant, the energy price set by the operator should meet the selling price constraint and the selling heat price constraint. (52) (1) 价格约束:约束(46)是为保护每位参与者的利益,运营商设定的能源价格应满足销售价格约束和销售热能价格约束。 (52)
(2) Electricity heat load adjustment constraints: Constraint (47) can balance the effective cooperative supply of electricity energy and heat energy, improving the utilization efficiency of IEHS, and reducing the cost. In this model, electricity load transfer constraints and heat load transfer constraints are considered. (53) (2) 电力热负荷调整约束:约束 (47) 可以平衡电力能源和热能的有效协同供应,提高 IEHS 的利用效率,并降低成本。在此模型中考虑了电力负荷转移约束和热负荷转移约束。 (53)
Based on the established mixed-integer programming model described in (44)–(47), the iterative solution strategy of Cplex solver is utilized for solving parameters involving user electricity load , user heat load , electricity selling prices of operators to user , and heat selling prices of operators to user, which has fast solution speed and provide reliable and stable optimization results. Therefore, the optimal results lower-level user benefit model considering user demand could be obtained. 基于在(44)–(47)中描述的混合整数规划模型,利用 Cplex 求解器的迭代求解策略来求解涉及用户电负荷 、用户热负荷 、运营商向用户出售电的价格 以及运营商向用户出售热的价格的参数,该方法具有较快的求解速度并能提供可靠且稳定的优化结果。因此,可以得到考虑用户需求的最优低层级用户收益模型。
4. Example results and analysis 4. 示例结果与分析
The IEHS involves electricity and heat loads, and they are influenced by elements including climatic condition, society development level, and data types, etc. In this research, we select the Arizona State University Tempe Campus [21] as an objective to investigate the inherent coupling properties of electricity and heat loads, and it is characterized by hot summers and warm winters. The load data set including electricity and heat load types and weather data set are obtained from January 2020 to March 2020, and the time resolution is 1 h. Weather data are taken from the nearest weather station [32], weather characteristics used involve temperature, precipitation, dew point, and barometric pressure. IEHS 涉及电力和热负荷,这些负荷受气候条件、社会发展水平和数据类型等因素的影响。在本研究中,我们选择亚利桑那州立大学坦佩校区[21]作为研究对象,以调查电力和热负荷的固有耦合特性,该校区特点是夏季炎热、冬季温暖。负荷数据集包括电力和热负荷类型以及气象数据集,数据获取时间范围是从 2020 年 1 月到 2020 年 3 月,时间分辨率为 1 小时。气象数据来自最近的气象站[32],使用的气象特征包括温度、降水量、露点和气压。
As this IEHS belongs to the campus type and is less affected by economic factors, economic factors are not considered in current research. Before data processing, we will convert heat load data with kW as the base unit. Then, load data and weather data are normalized by applying the max–min normalization method, i.e., , where is the input sequence, is the normalization sequence, and are the minimum and maximum values for the input sequence, respectively. 由于该 IEHS 属于校园类型且受经济因素影响较小,因此当前研究中未考虑经济因素。在数据处理前,我们将以 kW 为基本单位转换热负荷数据。然后,使用最大最小规范化方法对负荷数据和气象数据进行归一化,即 ,其中 是输入序列, 是归一化序列, 和 分别是输入序列的最小值和最大值。
Fig. 8 shows the load coupling degree of electricity and heat load, and the average load coupling degree calculated is 0.8320. The coupling degree value is , the higher the value, the higher the coupling degree of the loads. In general, when the coupling degree is greater than 0.5, it indicates that there is a coupling degree between the loads, thus there is a strong coupling between electricity and heat loads. 图 8 显示了电负荷和热负荷的耦合程度,计算得到的平均耦合程度为 0.8320。耦合程度值为 ,数值越大,负荷的耦合程度越高。一般来说,当耦合程度大于 0.5 时,表明负荷之间存在耦合关系,因此电负荷和热负荷之间存在较强的耦合。
4.1. Comparative analysis and performance of load forecasting model 4.1. 模型负荷预测的比较分析及性能
Aiming at investigating the influence of load coupling characteristics on load predicted, and certificating the predicted performance of the proposed CNN-BiLSTM-Attention model, a short-term forecast is set, that is 24 h forecast, with a time interval of 1 h. In this section, root-mean-square error (), mean absolute error (), and mean absolute percentage error () are chosen as evaluation criteria to evaluate the predicted performance and influence for different types of models, where is the forecasting load, is the actual load, n is number of sequences. 为了研究负载耦合特性对负载预测的影响,并验证所提出的 CNN-BiLSTM-Attention 模型的预测性能,设置了短期预测,即 24 小时预测,时间间隔为 1 小时。在本节中,均方根误差( )、均绝对误差( )和均绝对百分比误差( )被选作评估标准,用于评估不同类型模型的预测性能和影响,其中 是预测负载, 是实际负载,n 是序列数。
Table 1 lists RMSE comparisons for selecting different hyperparameter, and the following conclusions can be drawn from Table 1. From the training results of 1 to 4 and 13, it can be seen that when the neurons number of hidden layer in BiLSTM, learning rate and decline factor are fixed, different RMSE can be obtained by changing the number of convolutional kernels of CNN, and the RMSE is the smallest when the number is 32 and 64. Similar to the same method, when the neurons number of hidden layer in BiLSTM are 100 and 50 respectively, and the learning rate and decline factor are 0.01 and 0.4 respectively, we can get the smallest RMSE for the CNN-BiLSTM-Attention. 表 1 列出了选择不同超参数的 RMSE 比较,从表 1 中可以得出以下结论。从 1 到 4 和 13 的训练结果可以看出,当 BiLSTM 隐层神经元数量、学习率和衰减因子固定时,通过改变 CNN 的卷积核数量,可以得到不同的 RMSE,且当卷积核数量为 32 和 64 时,RMSE 最小。类似的方法,当 BiLSTM 隐层神经元数量分别为 100 和 50,学习率和衰减因子分别为 0.01 和 0.4 时,可以得到 CNN-BiLSTM-Attention 的最小 RMSE。
Table 1. RMSE comparisons for different hyperparameter. 表 1. 不同超参数的 RMSE 比较
Serial number 序列号
Convolution kernel 卷积核 number
Neurons number of hidden layer (BiLSTM) 隐藏层神经元数量(BiLSTM)
Learning rate and decline factor 学习率和衰减因子
RMSE (kW) RMSE (千瓦)
1
15.2142
2
15.1833
3
16.0382
4
16.3121
5
16.2365
6
15.9213
7
16.2131
8
16.1921
9
15.7251
10
16.1572
11
16.4191
12
16.3096
13
Table 2. Hyperparameter setting. 表 2. 超参数设置。
Empty Cell
Parameter definition 参数定义
Parameter value 参数值
CNN
Number of convolution layers 卷积层数量
2
Convolution kernel size and number 卷积核大小和数量
,
Number of pooling layers 池化层的数量
1 (Average pooling) 1 (平均池化)
BiLSTM
Hidden layers 隐藏层
2
Number of hidden layer neurons 隐藏层神经元数量
Weight loss rate (Dropout layer) 权重减少率 (Dropout 层)
0.25
Attention 注意
Number of channels 通道数量
16
Initial training 初始训练
Maximum iterations 最大迭代次数
120
Learning rate 学习率
0.01
Decline factor of learning rate 学习率衰减因子
0.4
Batch size 批量大小
30
Remark 4 备注 4
In this research, a CNN-BiLSTM-Attention model is built using MATLAB 2023b on a processor Intel (R) Core (TM) i5-12400F@4.00GHz CPU platform. The computational complexities of the model are mainly affected by the convolutional layer number of CNN and the hidden layer number of BiLSTM. To be specific, adding convolutional layers of CNN can extract effectively data features, but too many layers will increase the computational time. Currently, we select two convolutional layers, and the number of convolution kernel in each layer is 32 and 64 respectively, as listed in Table 2. In addition, the BiLSTM uses forward LSTM layer and backward LSTM layer to improve the model’s understanding of temporal features. The simulation results show that when the number of hidden layers exceeds two, the training error and calculation time increase with the increase of the number of hidden layers. Thus, we use two hidden layers, and the number of hidden layers is 100 and 50 respectively, as listed in Table 2. Finally, the attention mechanism is introduced, which could allocate important features and ignore irrelevant characteristics, reducing the computational complexities of CNN-BiLSTM and improving the interpretability of the model. 在本研究中,使用 MATLAB 2023b 在 Intel (R) Core (TM) i5-12400F@4.00GHz 处理器平台上构建了一个 CNN-BiLSTM-Attention 模型。模型的计算复杂度主要受 CNN 的卷积层数量和 BiLSTM 的隐藏层数量的影响。具体来说,增加 CNN 的卷积层可以有效地提取数据特征,但过多的层会增加计算时间。目前,我们选择了两个卷积层,每层的卷积核数量分别为 32 和 64,如表 2 所示。此外,BiLSTM 使用前向 LSTM 层和后向 LSTM 层来提高模型对时间特征的理解。仿真结果表明,当隐藏层的数量超过两个时,随着隐藏层数量的增加,训练误差和计算时间也会增加。因此,我们使用了两个隐藏层,每层的隐藏层数量分别为 100 和 50,如表 2 所示。 最终,引入了注意力机制,它可以分配重要特征并忽略无关特征,从而减少 CNN-BiLSTM 的计算复杂性并提高模型的可解释性。
Table 2 lists the CNN-BiLSTM-Attention model construction and training. First, CNN is composed of two one-dimensional convolutional layers, a pooling layer, and a fully connected layer, in which the size and number of convolution kernels of the first convolution layer are set to 1 and 32, respectively, and the size and number of convolution kernels of second convolution layer are set as 1 and 64, respectively, and average pooling principle is applied for pooling. Completing data feature extraction in the CNN, converting features to one-dimensional vector, which is transmitted to a fully connected layer. Second, BiLSTM layer has two hidden layers with 100 and 50 neurons, respectively. Aiming at preventing overfitting, we introduce a dropout layer with a deactivation rate of 0.25 behind BiLSTM layer. Set initial learning rate to 0.01, iteration to 120 times, batch size to 30, after repeated parameter adjustments, the best predicted effect could be achieved. Third, addressing the important information of electricity and heat loads, sixteen attention layers are utilized. Finally, the load is output by means of two fully connected layers, then the adaptive moment estimation technique is carried out. 表 2 列出了 CNN-BiLSTM-Attention 模型的构建和训练。首先,CNN 由两个一维卷积层、一个池化层和一个全连接层组成,在第一个卷积层中,卷积核的大小和数量分别设置为 1 和 32,第二个卷积层中卷积核的大小和数量分别设置为 1 和 64,并采用平均池化原则进行池化。完成 CNN 中的数据特征提取,将特征转换为一维向量,传入全连接层。其次,BiLSTM 层包含两个隐藏层,分别有 100 和 50 个神经元。为了防止过拟合,在 BiLSTM 层后面引入了一个失活率为 0.25 的 dropout 层。将初始学习率设置为 0.01,迭代次数为 120 次,批量大小为 30,经过多次参数调整后,可以达到最佳预测效果。最后,为了处理电力和热负荷的重要信息,使用了 16 个注意力层。 最终,负载通过两个全连接层输出,然后进行自适应矩估计技术处理。
Table 3 lists computational time comparisons for training and testing of the proposed method with other method. It is evident from Table 3 that in contrast to the combinatorial forecasting models, the single forecasting model, i.e., LSTM and BiLSTM, takes less computational time, but lower prediction accuracy for the IEHS. In addition, for the CNN-BiLSTM-Attention and CNN-BiLSTM, the attention mechanism can better allocate the input information features and reduce the computational time by the models to process excess information during the training process. In fact, the training and testing of model need to effectively balance the computational time and the accuracy. To some extent, it is desirable to obtain higher prediction accuracy at the cost of acceptable computational time. 表 3 列出了所提出方法与其他方法在训练和测试中的计算时间比较。从表 3 可以看出,与组合预测模型相比,单一预测模型,即 LSTM 和 BiLSTM,在计算时间上较少,但在 IEHS 的预测精度上较低。此外,对于 CNN-BiLSTM-Attention 和 CNN-BiLSTM,注意力机制可以更好地分配输入信息特征,并在训练过程中通过减少模型处理多余信息的时间来降低计算时间。实际上,模型的训练和测试需要在计算时间和精度之间有效平衡。在一定程度上,可以在可接受的计算时间内获得更高的预测精度。
Table 3. Computational time comparisons for different models. 表 3. 不同模型的计算时间比较。
Model
Total time 总时间 (training and testing) (训练和测试)
LSTM
BiLSTM
CNN-LSTM
CNN-BiLSTM
CNN-LSTM-Attention
The proposed model 提出的模型
To certificate the forecasting performance of the CNN-BiLSTM-Attention model, single-task model such as LSTM [6] and BiLSTM [12], [13], and multi-task benchmark model involving CNN-LSTM [14], CNN-BiLSTM [16], and CNN-LSTM-Attention [33] are also established to predict electricity and heat loads for the IEHS. Also, these models are compared with CNN-BiLSTM-Attention model. Applying the same input and output data to train these models, load forecasting results of 24 h are illustrated in Fig. 9, Fig. 10. Table 4 shows the forecasting error involving RMSE, MAE, MAPE in the test set. 为了验证 CNN-BiLSTM-Attention 模型的预测性能,还建立了单任务模型如 LSTM [6]和 BiLSTM [12]、[13],以及涉及 CNN-LSTM [14]、CNN-BiLSTM [16]和 CNN-LSTM-Attention [33]的多任务基准模型,用于预测 IEHS 的电力和热负荷。此外,这些模型还与 CNN-BiLSTM-Attention 模型进行了比较。使用相同的输入和输出数据训练这些模型,24 小时的负荷预测结果如图 9、图 10 所示。表 4 展示了测试集中的预测误差,包括 RMSE、MAE、MAPE。
From Fig. 9, Fig. 10, we can draw some conclusions. First, we can easily observe that electricity and heat loads predicted curve of multi-task model can track the actual output more effectively than single-task model, and the curve is closer to the actual load curve. Moreover, in the multi-task model forecast, an appropriate number of attention mechanisms are introduced to improve the predicted performance of the loads, which is more obvious in the electricity load forecast. Third, overall, among the six models, the proposed CNN-BiLSTM-Attention model performed the best predicted performance, but the load forecasting performance decreased significantly when the time is from 12 to 18. 从图 9 和图 10 中,我们可以得出一些结论。首先,我们可以明显观察到,多任务模型预测的电力和热负荷曲线比单任务模型更能有效地跟踪实际输出,且曲线更接近实际负荷曲线。此外,在多任务模型预测中,适当引入了注意力机制以提高负荷预测性能,这一点在电力负荷预测中更为明显。第三,总体而言,在六种模型中,提出的 CNN-BiLSTM-Attention 模型的预测性能最佳,但当时间从 12 点到 18 点时,负荷预测性能显著下降。
Fig. 10. Heat load predicted results of different models. 图 10. 不同模型的预测热负荷结果。
The electricity and heat load forecasting performances in Table 4 are analyzed in detail below. From the perspective of the single forecasting model, the LSTM trains the forecasting model in a single direction, but the BiLSTM involves forward LSTMlayer and backward LSTMlayer, the forecasting result is determined by the state of two LSTMs, which can more effectively extract the correlation of time series load data. Compared to the values displayed in the LSTM model, the BiLSTM obtains a lower average error (electricity and heat load), RMSE, MAE and MAPE are reduced by 6.03%, 13.36% and 4.06% respectively. 表 4 中的电力和热负荷预测性能将在下面进行详细分析。从单个预测模型的角度来看,LSTM 是单向训练预测模型,但 BiLSTM 包含前向 LSTM 层和后向 LSTM 层,预测结果由两个 LSTM 的状态决定,这可以更有效地提取时间序列负荷数据的相关性。与 LSTM 模型显示的值相比,BiLSTM 获得了较低的平均误差(电力和热负荷),RMSE、MAE 和 MAPE 分别降低了 6.03%、13.36% 和 4.06%。
Table 4. Performance comparison of various model types. 表 4. 各种模型类型的表现比较。
In terms of combined forecasting models, since the CNN could capture spatial data features, the forecasting performance of the CNN-BiLSTM and CNN-LSTM models are superior to that of single BiLSTM or LSTM. From the results in Table 4, the RMSE, MAE and MAPE of the CNN-BiLSTM model are 39.32%, 30.12% and 16.15% lower than that of the BiLSTM model respectively. 在结合型预测模型方面,由于 CNN 能够捕捉空间数据特征,所以 CNN-BiLSTM 和 CNN-LSTM 模型的预测性能优于单个 BiLSTM 或 LSTM 模型。从表 4 的结果可以看出,与 BiLSTM 模型相比,CNN-BiLSTM 模型的 RMSE、MAE 和 MAPE 分别低 39.32%、30.12%和 16.15%。
In the CNN-LSTM-Attention and CNN-BiLSTM-Attention, the attention mechanism is introduced for allocating important features between electricity and head loads, thus they can obtain high prediction accuracy compared to the models that do not involve the attention mechanism. In addition, from Table 4, with the same attentional mechanism, the RMSE, MAE and MAPE of the CNN-BiLSTM-Attention model are 24.58%, 31.48% and 31.33% lower than that of the CNNLSTM-Attention model respectively. 在 CNN-LSTM-Attention 和 CNN-BiLSTM-Attention 中,引入了注意力机制来分配电负荷和头负荷之间的重要特征,因此它们的预测准确性比不包含注意力机制的模型更高。此外,根据表 4,在相同的注意力机制下,CNN-BiLSTM-Attention 模型的 RMSE、MAE 和 MAPE 分别比 CNN-LSTM-Attention 模型低 24.58%、31.48%和 31.33%。
4.2. Analysis of optimization results for the IEHS 4.2. IEHS 优化结果分析
Based on the forecasting loads obtained applying the proposed CNN-BiLSTM-Attention model, a bi-level planning model and optimization strategy for the IEHS is designed in current research. In order to coordinate the energy allocation of bi-level programming model and realize the optimal allocation and use of energy, we set IEHS parameters as listed from Table 5, Table 6, Table 7, which include electricity heat conversion equipment parameters, energy storage equipment parameters, and economic parameters. 基于所提出的 CNN-BiLSTM-Attention 模型预测的负荷,当前研究设计了一种 IEHS 的两级规划模型及优化策略。为了协调两级规划模型的能源分配并实现能源的最优分配和利用,我们将 IEHS 参数设置为表 5、表 6、表 7 中列出的内容,包括电热转换设备参数、储能设备参数和经济参数。
The randomness of solar and wind is considered in the IEHS optimization. Firstly, based on wind power and photovoltaic data, the probability density function of wind power and photovoltaic output for each period within 24 h is generated by kernel density estimation method, in which the Gaussian kernel function is used. Then, the probability distribution function of each period is sampled to obtain 500 random scenarios of wind power and photovoltaic. On this basis, the K-means method [34] is used to reduce, and then five groups of wind power and photovoltaic uncertainty scenarios are obtained, as shown in Fig. 11, Fig. 12. Finally, scenario 1 is selected as the randomness of wind power and photovoltaic in the IEHS optimization. 考虑了太阳能和风能的随机性,将其纳入了 IEHS 优化中。首先,基于风力发电和光伏数据,通过核密度估计方法生成了 24 小时内每个时间段的风力发电和光伏发电的概率密度函数,其中使用了高斯核函数。然后,对每个时间段的概率分布函数进行采样,以获得 500 个随机的风力发电和光伏发电场景。在此基础上,使用 K-means 方法进行降维,然后得到五组风力发电和光伏发电的不确定性场景,如图 11、图 12 所示。最后,选择场景 1 作为 IEHS 优化中的风力发电和光伏发电的随机性。
Fig. 12. Photovoltaic output in five scenarios . 图 12. 五种情景下的光伏输出
In the upper-level planning model, our goal is to minimize the comprehensive operation cost of the IEHS, thus an objective function with five constraints is established, and the genetic algorithm is applied to optimize variables. In the lower-level planning model, our task is to solve the IEHS parameters under the synergistic action of energy operators and integrated demand response, taking the benefit function and energy use cost into account. Fig. 13, Fig. 14 describe the iterative results of the upper-level planning model and the lower-level planning model, respectively. 在高层规划模型中,我们的目标是尽量减少 IEHS 的综合运行成本,因此建立了包含五个约束的目标函数,并应用遗传算法优化变量。在低层规划模型中,我们的任务是在能源运营商和综合需求响应协同作用下,解决 IEHS 参数,并考虑效益函数和能源使用成本。图 13 和图 14 分别描述了高层规划模型和低层规划模型的迭代结果。
Fig. 13, Fig. 14 describe the iterative results of the upper-level planning model and the lower-level planning model, respectively. It can be clearly seen from Fig. 13, Fig. 14 that the upper-level programming model and the lower-level programming model converge at about 70 iterations. In addition, we can draw two meaningful conclusions. First, constantly adjusting energy price and device parameter variables, the income of operators shows an upward trend, meeting the energy needs of users. Besides, the bi-level programming model has game interaction in the iterative process, and finally achieves convergence. The results suggest that the proposed bi-level programming model and optimization strategy are economical and can achieve the balance of interests of each subject. Fig. 13, Fig. 14 分别描述了高层规划模型和低层规划模型的迭代结果。从 Fig. 13, Fig. 14 可以清楚地看到,高层规划模型和低层规划模型在大约 70 次迭代后收敛。此外,我们可以得出两个有意义的结论。首先,不断调整能源价格和设备参数变量,运营商的收入呈现上升趋势,满足用户的能源需求。此外,双层规划模型在迭代过程中具有博弈交互,最终实现收敛。结果表明,提出的双层规划模型和优化策略是经济的,并且能够实现各主体利益的平衡。
The genetic algorithm is used to optimize the designed bi-level planning model, which is a method to search for the optimal solution by simulating the natural evolutionary process. After 70 iterations in Fig. 13, the algorithm gradually finds a point close to the global optimal solution, and the optimized parameters gradually reaches a stable state. Therefore, the variation amplitude of the objective function decreases, and the algorithm tends to converge. In terms of optimality, after 70 iterations, the optimization algorithm gradually approaches the global optimal solution. When the optimal solution is reached, further iterations do not significantly change the value of the objective function, so the algorithm gets the optimal solution. 遗传算法用于优化设计的双层规划模型,这是一种通过模拟自然进化过程来寻找最优解的方法。如图 13 所示,在 70 次迭代后,算法逐渐找到一个接近全局最优解的点,优化参数逐渐达到稳定状态。因此,目标函数的变化幅度减小,算法趋于收敛。从最优性来看,在 70 次迭代后,优化算法逐渐接近全局最优解。当最优解达到时,进一步迭代不会显著改变目标函数的值,因此算法获得最优解。
In IEHS, the pricing strategy is related to energy efficiency, economy and sustainability. The appropriate price can satisfy users and improve the economy of the system. Fig. 15, Fig. 16 exhibit optimization results of electricity and heat selling prices, respectively. From Fig. 15, users purchase more electricity at low price periods and less electricity at high price periods, which further verifies the accuracy of the results. As can be seen from Fig. 16, when the system does not have enough heat supply, users purchase heat according to the principle of buying more at low price and less at high price. From the results of electricity price and heat price, it can be concluded that the operators have made reasonable planning for the heat price and electricity price, which has realized the interests of users and operators. 在 IEHS 中,定价策略与能源效率、经济性和可持续性相关。合适的定价可以满足用户需求并提高系统的经济性。图 15 和图 16 分别展示了电力和热能销售价格的优化结果。从图 15 可以看出,在低电价时期用户购买更多的电力,在高电价时期购买较少的电力,这进一步验证了结果的准确性。如图 16 所示,当系统缺乏足够的热能供应时,用户会根据低电价多买、高电价少买的原理购买热能。从电价和热价的结果来看,可以得出运营商对热价和电价进行了合理的规划,实现了用户和运营商的利益。
Furthermore, to research the influence of electricity and heat demand response on IEHS unit and the electricity and head loads, Fig. 17, Fig. 18 describe electricity load curve and heat load curve of user demand response, respectively. 此外,为了研究电力和热需求响应对 IEHS 单元以及电力和热负荷的影响,图 17 和图 18 分别描述了用户需求响应的电力负荷曲线和热负荷曲线。
It can be clearly observed from Fig. 17 that before the electricity demand response, the peak time of the electricity load is from 3 to 7 and from 19 to 23. After adding the electricity demand response, under the action of the economic incentive mechanism, the electricity load is obviously transferred from the load peak time to the load trough time, that is, from 10 to 18. As shown in Fig. 18, before the heat demand response, the peak time of the heat load is from 14 to 22. After the introduction of the heat demand response, the heat load in this period is obviously transferred to other periods. The above results suggest that the introduction of electricity and heat demand response can effectively transfer the load from the peak time to the trough time, and realize peak clipping and valley filling with electricity and heat loads. 从图 17 可以看出,在实施电力需求响应之前,电力负荷的高峰时段是从 3 点到 7 点和从 19 点到 23 点。在引入电力需求响应后,在经济激励机制的作用下,电力负荷明显从高峰时段转移到了低谷时段,即从 10 点到 18 点。如图 18 所示,在实施热需求响应之前,热负荷的高峰时段是从 14 点到 22 点。在引入热需求响应后,这一时段的热负荷明显转移到了其他时段。上述结果表明,引入电力和热需求响应可以有效将负荷从高峰时段转移到低谷时段,并通过电力和热负荷实现削峰填谷。
Fig. 18. Heat load curve of user demand response. 图 18. 用户需求响应的热负荷曲线。
Lastly, the feasibility of this scheme including electricity and heat loads planning and equipment supplies, and demands conversion of the IEHS is certificated, and the scheduling results of electricity energy and heat energy are presented in Fig. 19 and Fig. 20, respectively. 最后,本方案包括电力和热负荷规划及设备供应的可行性得到证实,并且 IEHS 的需求转换也得到了确认,电力能量和热能量的调度结果分别如图 19 和图 20 所示。
From Fig. 19, we could easily observe that when the time is from 9 to 18, the user electricity consumption is relatively low, and the electricity load is mainly provided by the photovoltaic output, the insufficient part is supplemented by the gas turbine, and the excess part is transferred to the battery energy storage. While the time is from 18 to 23, the demand for electricity load rises, the output of wind power and photovoltaic power generation is fully absorbed, and the output of gas turbines increases. 从图 19 可以看出,当时间从 9 点到 18 点时,用户用电量相对较低,电力负荷主要由光伏输出提供,不足部分由燃气轮机补充,多余部分则转移到电池储能中。而当时间从 18 点到 23 点时,电力负荷需求上升,风能和光伏发电的输出被完全吸收,燃气轮机的输出增加。
According to the heat load planning results in Fig. 20, while the time is from 15 to 20, there is a low peak of heat use, and the heat load is mainly supported by the waste heat boiler, and the insufficient part is supplemented by the heat storage unit. Through the above discussion, we could draw easily that the proposed bi-level programming model and optimization strategy can reasonably balance the supply and demand relationship of the IEHS, satisfy the energy demand of IEHS, and improve the economy of IEHS. 根据图 20 的热负荷规划结果,在时间从 15 点到 20 点之间,热使用有一个低峰,主要由余热锅炉承担热负荷,不足部分由热储单元补充。通过上述讨论,我们可以很容易地得出,提出的双层规划模型和优化策略能够合理地平衡 IEHS 的供需关系,满足 IEHS 的能源需求,并提高 IEHS 的经济性。
The waste heat recovery efficiency mainly affects the energy efficiency and stability of the IEHS. Specifically, the higher the waste heat recovery efficiency, the heat production of the waste heat boiler will be relatively improved, thereby reducing the demand for external energy, and improving the overall energy utilization rate of the IEHS. However, the waste heat recovery efficiency is not the higher the better, the efficiency and performance of waste heat recovery equipment limit the improvement of the recovery efficiency, and to improve the waste heat recovery efficiency requires more funds to upgrade the equipment. Generally, the waste heat recovery rate is around 0.8. In addition, as shown in Fig. 20, the heat load curve is basically balanced with the waste heat boiler generating, which can reasonably balance the supply and demand relationship of IEHS. 废热回收效率主要影响 IEHS 的能量效率和稳定性。具体来说,废热回收效率越高,废热锅炉的产热量会相对提高,从而减少对外部能源的需求,提高 IEHS 的整体能量利用率。然而,废热回收效率并非越高越好,废热回收设备的效率和性能限制了回收效率的提升,提高废热回收效率需要更多的资金来升级设备。通常,废热回收率约为 0.8。此外,如图 20 所示,热负荷曲线基本与废热锅炉产生的情况平衡,可以合理平衡 IEHS 的供需关系。
5. Conclusions 5. 结论
In this research, we have accomplished the load forecasting model and load scheduling optimization of the IEHS, in which the CNN-BiLSTM-Attention is established as load forecasting model, and a bi-level planning model and optimization strategy is focused on. In general, there are two main contributions of this study. First, the CNN-BiLSTM-Attention, as a multi-task model, can make full use of the coupling information of input features, and predict load more accurately compared with other model types. In terms of electricity load, the RMSE, MAE and MAPE of the CNN-BiLSTM-Attention model are 27.23%, 26.01% and 25.31% lower than that of the CNNLSTM-Attention model, respectively. Likewise, the RMSE, MAE and MAPE of the heat load reduces 22.12%, 35.32% and 35.11% respectively. Second, the upper-level planning model that minimizes comprehensive operation costs, and lower-level efficiency model considering electricity and heat demands aiming to balance revenue and cost are addressed for realizing optimal distribution and utilization for energy source, simulation results show that the upper-level planning model and lower-level planning model converge at about 70 iterations. 在本研究中,我们完成了 IEHS 的负荷预测模型和负荷调度优化,其中建立了 CNN-BiLSTM-Attention 作为负荷预测模型,并重点研究了双层规划模型和优化策略。总体而言,本研究主要有两个主要贡献。首先,CNN-BiLSTM-Attention 作为一种多任务模型,能够充分利用输入特征的耦合信息,相比其他模型类型,预测负荷更为准确。在电力负荷方面,CNN-BiLSTM-Attention 模型的 RMSE、MAE 和 MAPE 分别比 CNNLSTM-Attention 模型低 27.23%、26.01%和 25.31%。同样,热负荷的 RMSE、MAE 和 MAPE 分别降低了 22.12%、35.32%和 35.11%。其次,提出了最小化综合运行成本的上层规划模型,以及考虑电力和热能需求、旨在平衡收入和成本的下层效率模型,以实现能源资源的最优分配和利用。仿真结果显示,上层规划模型和下层规划模型在大约 70 次迭代后收敛。
From the perspective of research limitations, it fails to consider the sampling and computation delay for IEHS. In the future research work, we will study from two aspects. Firstly, sampling and calculation delay is a common problem, mainly due to the physical characteristics of various energy sources, the random fluctuations of wind and photovoltaic energy, and the multi-time scale characteristics. Therefore, it is necessary to study the load prediction and optimal scheduling models with sampling and computation delay. In addition, we will extend the proposed forecasting model and bi-level optimization method to large scale MW system, but this also creates new challenges for the proposed approach. Due to the large amount of data and complex data types involved in large scale MW system, the training time of forecasting model is increased, and the prediction accuracy is also required in real time scenarios. 从研究局限性来看,它未能考虑 IEHS 的采样和计算延迟。在未来的研究工作中,我们将从两个方面进行研究。首先,采样和计算延迟是一个常见问题,主要由于各种能源的物理特性、风能和光伏能的随机波动以及多时间尺度特性。因此,有必要研究考虑采样和计算延迟的负荷预测和最优调度模型。此外,我们将扩展所提出的预测模型和双层优化方法到大规模 MW 系统,但这也会为所提出的方法带来新的挑战。由于大规模 MW 系统涉及大量数据和复杂的数据类型,预测模型的训练时间增加,同时在实时场景中也需要保证预测精度。
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. 作者声明他们没有任何已知的 competing financial interests 或者个人关系,这些关系可能会影响本文所述工作的外观。
Acknowledgments 致谢
This work was supported by the National Natural Science Foundation of China (62003151), Changzhou Municipal Science and Technology Bureau (CJ20220065), Qinglan Project of Jiangsu Province of China ([2022]29), and Zhongwu Youth Innovative Talents Support Program in Jiangsu University of Technology (202102003). 这项工作得到了国家自然科学基金(62003151)、常州市科学技术局(CJ20220065)、江苏省青蓝工程([2022]29)以及江苏科技大学中武青年创新人才支持计划(202102003)的资助。
Data availability 数据可用性
Data will be made available on request. 数据将在收到请求后提供。
Assessment of the solar energy accommodation capability of the district integrated energy systems considering the transmission delay of the heating network
Int J Electr Power Energy Syst, 130 (2021), Article 106821
With the increasing global attention on energy efficiency and carbon emissions, the optimization of integrated energy systems (IES) has become the key to improve energy efficiency and reduce pollution emissions. However, most of the existing optimization methods cannot effectively deal with the complexity of high dimensional continuous action space. Therefore, this paper focuses on a novel multi-objective optimization strategy for the electricity–gas–heat integrated energy systems (EGH-IES). Firstly, considering the absorption capacity of wind power and the emission of pollutant gases, a multi-objective optimization model is constructed based on the mechanism model and operation constraints of each device in EGH-IES, in which the integrated operation cost and the environmental factors are taken as optimization objectives. Then, the multi-objective optimization problem is designed as the optimal strategy of interaction learning between agent and environment in reinforcement learning, and the output power of the devices constitutes the action of reinforcement learning. Additionally, the Ornstein–Uhlenbeck process is introduced to enhance the training efficiency and exploration performance of the agent, and the deep deterministic policy gradients (DDPG) algorithm is employed to optimize the action, thus the output power of the appliances could be obtained. Finally, the simulation results show that compared with deep Q network (DQN) method and proximal policy optimization (PPO) method, the reward function value of the proposed method increases by 2.43% and 6.09%, respectively, which represents a reduction in economic cost and pollutant emissions. These verify the effectiveness and superiority of the proposed multi-objective optimization scheme in cost reduction and benefit improvement for the EGH-IES.
Utilizing shared energy storage services presents a viable solution for microgrids to manage the increasing integration of distributed energy resources in retail electricity markets. By optimizing time-varying pricing, it is possible to impact the internal operations of microgrids that involve shared energy storage through price signals, as electricity retailers seek to aid in the deregulation of retail markets. This paper presents a bi-level optimization model that captures the interactions between electricity retailers and microgrid operators. At the upper level, the electricity retailer’s objective is to maximize economic profits by making day-ahead hourly strategic pricing decisions in the retail market and determining electricity purchases in the wholesale market. Meanwhile, at the lower level, the microgrid operator aims to minimize total costs by coordinating energy storage services among multiple internal aggregators and making decisions in the retail market. The microgrid operator oversees the centralized day-ahead operation decisions between the shared energy storage operator and various aggregators. Each aggregator manages a specific number of prosumers/customers and shares energy storage facilities. To achieve an equilibrium solution for the pricing strategies of electricity retailers and the operational challenges faced by microgrid operators, a bi-level nested genetic algorithm is proposed. This algorithm aims to identify effective pricing strategies for the electricity retailer, which will encourage multiple aggregators to utilize shared energy storage systems within the microgrid. The findings indicate that the electricity retailer can boost their profits by a minimum of 48.8% by adopting the proposed pricing approach. Additionally, the direct incentives within the pricing strategies play a crucial role in motivating aggregators to participate in providing energy storage services, resulting in a 26.1% reduction in costs for the microgrid operator.