[go: up one dir, main page]

CN117081063A - A distributed charging load prediction method and system based on GCN-Crossformer model - Google Patents

A distributed charging load prediction method and system based on GCN-Crossformer model Download PDF

Info

Publication number
CN117081063A
CN117081063A CN202311114327.7A CN202311114327A CN117081063A CN 117081063 A CN117081063 A CN 117081063A CN 202311114327 A CN202311114327 A CN 202311114327A CN 117081063 A CN117081063 A CN 117081063A
Authority
CN
China
Prior art keywords
gcn
data
charging load
load prediction
crossformer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311114327.7A
Other languages
Chinese (zh)
Inventor
李燕妮
葛宜达
钱诗婕
彭甜
张楚
王业琴
纪捷
陈佳雷
王政
王熠炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaiyin Institute of Technology
Original Assignee
Huaiyin Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaiyin Institute of Technology filed Critical Huaiyin Institute of Technology
Priority to CN202311114327.7A priority Critical patent/CN117081063A/en
Publication of CN117081063A publication Critical patent/CN117081063A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for AC mains or AC distribution networks
    • H02J3/003Load forecast, e.g. methods or systems for forecasting future load demand
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2203/00Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
    • H02J2203/20Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Economics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Power Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种基于GCN‑Crossformer模型的分布式充电负荷预测方法及系统,首先获取历史充电负荷数据以及影响因素数据,并进行数据清洗;计算每个影响因素对充电负荷预测的贡献程度,对各个影响因素的重要性进行分析筛选;并将筛选出的影响因素数据以及历史充电负荷数据划分为训练集、验证集;构建GCN‑Crossformer充电负荷预测模型,并通过训练集和验证集进行训练,优化训练好的GCN‑Crossformer充电负荷预测模型的学习率和注意力头数;通过将优化后的GCN‑Crossformer充电负荷预测模型对充电负荷进行预测。采用结合了图卷积网络和Crossformer结构的深度学习融合模型。该融合模型可以充分利用充电站之间的空间关系和充电负荷的时间特性,实现更准确的分布式充电负荷预测。

The invention discloses a distributed charging load prediction method and system based on the GCN-Crossformer model. First, historical charging load data and influencing factor data are obtained, and the data is cleaned; the contribution degree of each influencing factor to charging load prediction is calculated. Analyze and screen the importance of each influencing factor; divide the screened influencing factor data and historical charging load data into training sets and verification sets; build a GCN‑Crossformer charging load prediction model and train it through the training set and verification set , optimize the learning rate and number of attention heads of the trained GCN‑Crossformer charging load prediction model; predict the charging load by using the optimized GCN‑Crossformer charging load prediction model. A deep learning fusion model that combines graph convolutional network and Crossformer structure is adopted. This fusion model can make full use of the spatial relationship between charging stations and the time characteristics of the charging load to achieve more accurate distributed charging load prediction.

Description

一种基于GCN-Crossformer模型的分布式充电负荷预测方法 及系统A distributed charging load prediction method based on GCN-Crossformer model and system

技术领域Technical field

本发明涉及充电负荷预测,具体是涉及一种基于GCN-Crossformer模型的分布式充电负荷预测方法及系统。The present invention relates to charging load prediction, specifically to a distributed charging load prediction method and system based on the GCN-Crossformer model.

背景技术Background technique

近年来,随着电动汽车的普及和充电设施的迅速发展,分布式充电负荷预测已经成为了一个重要的研究领域。负荷预测对于智能电网的可靠运维和高效管理有着至关重要的意义,对充电站负荷进行精准预测是提升充电站安全运营及经济效益的一项重要举措。对于电网运营商来说,准确预测充电负荷可以帮助他们合理调度电力资源,确保电网的稳定运行。In recent years, with the popularity of electric vehicles and the rapid development of charging facilities, distributed charging load prediction has become an important research field. Load forecasting is of vital significance to the reliable operation, maintenance and efficient management of smart grids. Accurate prediction of charging station load is an important measure to improve the safe operation and economic benefits of charging stations. For grid operators, accurate prediction of charging load can help them rationally dispatch power resources and ensure the stable operation of the grid.

目前,充电负荷预测方法主要有数学统计模型和神经网络模型。常见的统计模型主要有ARMA、SVM、多元线性回归模型等,但这些模型在处理复杂、非线性的充电负荷数据时往往效果不佳,在处理大规模充电网络时面临计算效率低下的问题,限制了其在实际应用中的推广。如RNN、CNN、LSTM等神经网络模型,具有强大的计算能力和学习能力,对数据深层特征进行提取,可以解决多变量、非线性复杂建模问题。另外,结合图神经网络的深度学习方法在充电负荷预测方面取得了一定的进展,但仍存在一些困难和缺点,许多现有方法仅关注空间特征或时间特征的提取,忽略了二者之间的相互作用,这可能导致模型在面对复杂的充电负荷变化时性能下降。At present, charging load prediction methods mainly include mathematical statistical models and neural network models. Common statistical models mainly include ARMA, SVM, multiple linear regression models, etc. However, these models are often ineffective when dealing with complex and nonlinear charging load data. They face the problem of low computational efficiency and limitations when dealing with large-scale charging networks. its promotion in practical applications. Neural network models such as RNN, CNN, and LSTM have powerful computing and learning capabilities. They can extract deep features of data and solve multi-variable, nonlinear complex modeling problems. In addition, deep learning methods combined with graph neural networks have made certain progress in charging load prediction, but there are still some difficulties and shortcomings. Many existing methods only focus on the extraction of spatial features or time features, ignoring the relationship between the two. interactions, which may lead to model performance degradation in the face of complex charging load changes.

发明内容Contents of the invention

发明目的:针对以上缺点,本发明提供一种提高电动汽车分布式充电负荷预测的精度、方便电网管理者进行能源调度和优化、提高能源的利用效率的基于GCN-Crossformer模型的分布式充电负荷预测方法及系统。Purpose of the invention: In view of the above shortcomings, the present invention provides a distributed charging load prediction based on the GCN-Crossformer model that improves the accuracy of distributed charging load prediction of electric vehicles, facilitates grid managers to perform energy scheduling and optimization, and improves energy utilization efficiency. Methods and systems.

技术方案:为解决上述问题,本发明采用一种基于GCN-Crossformer模型的分布式充电负荷预测方法,包括以下步骤:Technical solution: In order to solve the above problems, the present invention adopts a distributed charging load prediction method based on the GCN-Crossformer model, which includes the following steps:

(1)获取历史充电负荷数据以及影响因素数据,并进行数据清洗;(1) Obtain historical charging load data and influencing factor data, and perform data cleaning;

(2)计算每个影响因素对充电负荷预测的贡献程度,对各个影响因素的重要性进行分析筛选;并将筛选出的影响因素数据以及历史充电负荷数据划分为训练集、验证集;(2) Calculate the contribution of each influencing factor to charging load prediction, analyze and screen the importance of each influencing factor; and divide the screened influencing factor data and historical charging load data into a training set and a verification set;

(3)构建GCN-Crossformer充电负荷预测模型,将步骤(2)中的训练集和验证集输入GCN-Crossformer充电负荷预测模型中进行训练,其中通过图卷积网络GCN对数据进行空间特征提取,通过Crossformer模块捕捉数据在时间序列上的依赖关系;(3) Construct a GCN-Crossformer charging load prediction model, input the training set and verification set in step (2) into the GCN-Crossformer charging load prediction model for training, and extract spatial features from the data through the graph convolution network GCN. Capture the dependence of data on time series through the Crossformer module;

(4)优化训练好的GCN-Crossformer充电负荷预测模型的学习率和注意力头数;(4) Optimize the learning rate and number of attention heads of the trained GCN-Crossformer charging load prediction model;

(5)通过优化后的GCN-Crossformer充电负荷预测模型对充电负荷进行预测,得到最终的充电负荷预测值。(5) Predict the charging load through the optimized GCN-Crossformer charging load prediction model to obtain the final charging load prediction value.

进一步的,所述步骤(1)中的影响因素包括用户出行特征、用户居住地、充电站位置、充电设备分布、电动汽车数量、电价、天气和节假日。Further, the influencing factors in step (1) include user travel characteristics, user residence, charging station locations, charging equipment distribution, number of electric vehicles, electricity prices, weather and holidays.

进一步的,所述步骤(2)中利用XGBoost算法计算每个影响因素对充电负荷预测的贡献程度;XGBoost算法的构造如下:Further, in step (2), the XGBoost algorithm is used to calculate the contribution of each influencing factor to the charging load prediction; the structure of the XGBoost algorithm is as follows:

其中,为第j个样本的标签向量,表示此时的充电负荷;xj为第j个样本的特征,表示影响因素;F表示由树构成的函数空间;d(xj)表示特征xj到叶子结点的映射;F(xj)表示基本学习器的集合空间;fk(xi)是d(xj)与第k棵树的权值w之间的函数关系,K表示树的总数。in, is the label vector of the j-th sample , indicating the charging load at this time ; Mapping of nodes; F(x j ) represents the set space of the basic learner; f k ( xi ) is the functional relationship between d(x j ) and the weight w of the k-th tree, and K represents the total number of trees .

进一步的,所述步骤(3)中通过图卷积网络GCN对历史充电负荷数据以及影响因素数据进行空间特征提取;图卷积网络GCN的运算公式为:Further, in the step (3), the graph convolution network GCN is used to extract spatial features from the historical charging load data and influencing factor data; the operation formula of the graph convolution network GCN is:

其中,σ(·)为激活函数;I为单位矩阵,A为邻接矩阵;/>是对角矩阵;Hl和Wl分别为第l层的输出和参数值。Among them, σ(·) is the activation function; I is the identity matrix, A is the adjacency matrix;/> is a diagonal matrix; H l and W l are the output and parameter values of the l-th layer respectively.

进一步的,所述步骤(4)中采用适应度距离平衡策略FDB和随机游走策略对蜣螂优化算法DBO进行改进,得到IDBO算法;利用IDBO算法优化GCN-Crossformer充电负荷预测模型的学习率和注意力头数。Further, in step (4), the fitness distance balance strategy FDB and the random walk strategy are used to improve the dung beetle optimization algorithm DBO to obtain the IDBO algorithm; the IDBO algorithm is used to optimize the learning rate and sum of the GCN-Crossformer charging load prediction model. Number of attention heads.

进一步的,利用随机游走策略对蜣螂优化算法DBO中的蜣螂位置更新做出改进;蜣螂位置的更新公式为:Furthermore, the random walk strategy is used to improve the dung beetle position update in the dung beetle optimization algorithm DBO; the update formula of the dung beetle position is:

其中,Xi(t)表示蜣螂第t次迭代第i维的位置,ai为第i维变量随机游走的最小值,bi为第i维变量随机游走的最大值;ci(t)与di(t)分别为第i维变量在第t次迭代的最小值和最大值。 Among them , _ (t) and di (t) are the minimum and maximum values of the i-th dimension variable in the t-th iteration respectively.

进一步的,利用适应度距离平衡策略寻找种群中对搜索过程做出最大贡献的候选解,具体包括以下步骤:Further, the fitness distance balance strategy is used to find the candidate solution in the population that makes the greatest contribution to the search process, including the following steps:

(4.31)计算蜣螂算法中的第i个候选解的适应度值fi(4.31) Calculate the fitness value fi of the i-th candidate solution in the dung beetle algorithm;

(4.32)计算蜣螂算法中第i个候选解与当前最优解的欧氏距离 (4.32) Calculate the Euclidean distance between the i-th candidate solution and the current optimal solution in the dung beetle algorithm

(4.33)对候选解的适应度值和候选解到最优解的欧氏距离做归一化处理,通过加权求和的方式计算第i维候选解的FDB分数Si(4.33) Normalize the fitness value of the candidate solution and the Euclidean distance from the candidate solution to the optimal solution, and calculate the FDB score S i of the i-th dimension candidate solution through weighted summation:

其中,n为维度总数,ω∈(0,1)是权重系数;norm(·)表示归一化;Among them, n is the total number of dimensions, ω∈(0,1) is the weight coefficient; norm(·) represents normalization;

(4.34)根据候选解的FDB分数,用轮盘赌方法来确定最终选择的参考位置,改进后的位置更新公式如下:(4.34) Based on the FDB score of the candidate solution, the roulette method is used to determine the final selected reference position. The improved position update formula is as follows:

其中,是种群中随机选取的初始个体,e是规模系数,r是[0,1]中的均匀分布随机数,p是蜣螂个体数量,即种群规模;nump是最小距离阈值,Xfdb是FDB方法确定的参考个体。in, is the initial individual randomly selected in the population, e is the scale coefficient, r is a uniformly distributed random number in [0,1], p is the number of dung beetle individuals, that is, the population size; num p is the minimum distance threshold, X fdb is FDB Reference individuals determined by the method.

本发明还采用一种基于GCN-Crossformer模型的分布式充电负荷预测系统,包括:The present invention also adopts a distributed charging load prediction system based on the GCN-Crossformer model, including:

数据获取模块,用于获取历史充电负荷数据以及影响因素数据,并进行数据清洗;The data acquisition module is used to obtain historical charging load data and influencing factor data, and perform data cleaning;

数据划分模块,用于计算每个影响因素对充电负荷预测的贡献程度,对各个影响因素的重要性进行分析筛选;并将筛选出的影响因素数据以及历史充电负荷数据划分为训练集、验证集和测试集;The data division module is used to calculate the contribution of each influencing factor to charging load prediction, analyze and screen the importance of each influencing factor; and divide the screened influencing factor data and historical charging load data into a training set and a verification set and test set;

模型构建模块,用于构建GCN-Crossformer充电负荷预测模型,将步骤(2)中的训练集和验证集输入GCN-Crossformer充电负荷预测模型中进行训练,其中通过图卷积网络GCN对数据进行空间特征提取,通过Crossformer模块捕捉数据在时间序列上的依赖关系;The model building module is used to build the GCN-Crossformer charging load prediction model. The training set and verification set in step (2) are input into the GCN-Crossformer charging load prediction model for training, in which the data is spatially processed through the graph convolution network GCN. Feature extraction, capturing the dependence of data on time series through the Crossformer module;

优化模块,用于优化训练好的GCN-Crossformer充电负荷预测模型的学习率和注意力头数;Optimization module, used to optimize the learning rate and number of attention heads of the trained GCN-Crossformer charging load prediction model;

预测模块,用于通过优化后的GCN-Crossformer充电负荷预测模型对充电负荷进行预测,得到最终的充电负荷预测值。The prediction module is used to predict the charging load through the optimized GCN-Crossformer charging load prediction model to obtain the final charging load prediction value.

有益效果:本发明相对于现有技术,其显著优点是采用结合了图卷积网络和Crossformer结构的深度学习融合模型。图卷积网络是一种用于处理图结构数据的神经网络,它可以捕捉分布式充电站之间的空间关系;Crossformer可以捕捉数据在时间序列上的依赖关系。该融合模型可以充分利用充电站之间的空间关系和充电负荷的时间特性,实现更准确的分布式充电负荷预测。Beneficial effects: Compared with the existing technology, the significant advantage of this invention is that it adopts a deep learning fusion model that combines a graph convolution network and a Crossformer structure. Graph convolutional network is a neural network used to process graph-structured data. It can capture the spatial relationship between distributed charging stations; Crossformer can capture the dependence of data in time series. This fusion model can make full use of the spatial relationship between charging stations and the time characteristics of the charging load to achieve more accurate distributed charging load prediction.

利用极限梯度增强XGBoost算法获得每个影响因素对充电负荷预测的贡献程度,通过对各个影响因素的重要性进行分析,筛选出与充电负荷重要性高的影响因素数据;可以提高GCN-Crossformer充电负荷预测模型的精度和准确性,减少不必要的计算和数据处理。The extreme gradient enhanced XGBoost algorithm is used to obtain the contribution of each influencing factor to the charging load prediction. By analyzing the importance of each influencing factor, the influencing factor data with high importance to the charging load is screened out; the GCN-Crossformer charging load can be improved Improve the precision and accuracy of prediction models and reduce unnecessary calculations and data processing.

结合多种改进策略IDBO算法,通过引入随机游走策略对最优蜣螂适应度值进行扰动,提高蜣螂优化算法局部探索能力;利用适应度距离平衡策略寻找种群中对搜索过程做出最大贡献的候选解,使得IDBO算法在分布式充电负荷预测中可以更好地处理不同充电需求之间的差异,提高预测结果的准确性和稳定性。Combining multiple improved strategies with the IDBO algorithm, the optimal dung beetle fitness value is perturbed by introducing a random walk strategy to improve the local exploration capability of the dung beetle optimization algorithm; the fitness distance balance strategy is used to find the population that makes the greatest contribution to the search process. The candidate solution enables the IDBO algorithm to better handle the differences between different charging needs in distributed charging load prediction and improve the accuracy and stability of the prediction results.

附图说明Description of the drawings

图1所示为本发明分布式充电负荷预测的整体流程图。Figure 1 shows the overall flow chart of distributed charging load prediction according to the present invention.

图2所示为本发明中XGBoost算法流程示意。Figure 2 shows a schematic flowchart of the XGBoost algorithm in the present invention.

图3所示为本发明中GCN模型示意图。Figure 3 shows a schematic diagram of the GCN model in the present invention.

图4所示为本发明中Crossformer模型示意图。Figure 4 shows a schematic diagram of the Crossformer model in the present invention.

具体实施方式Detailed ways

如图1所示,本实施例中的基于GCN-Crossformer模型的分布式充电负荷预测方法,包括以下步骤:As shown in Figure 1, the distributed charging load prediction method based on the GCN-Crossformer model in this embodiment includes the following steps:

(1)收集历史充电负荷数据和影响因素数据,并进行数据清洗;影响因素包括用户出行特征、用户居住地、充电站位置、充电设备分布、电动汽车数量、电价、天气和节假日。(1) Collect historical charging load data and influencing factor data, and perform data cleaning; influencing factors include user travel characteristics, user residence, charging station location, charging equipment distribution, number of electric vehicles, electricity prices, weather and holidays.

(2)利用XGBoost算法获得每个影响因素对充电负荷预测的贡献程度,对各个影响因素的重要性进行分析,筛选出与充电负荷重要性高的影响因素数据;并将筛选的影响因素数据和充电负荷数据划分为训练集、验证集和测试集;(2) Use the XGBoost algorithm to obtain the contribution of each influencing factor to the charging load prediction, analyze the importance of each influencing factor, and screen out the influencing factor data that is highly important to the charging load; combine the screened influencing factor data with The charging load data is divided into training set, verification set and test set;

XGBoost算法实现过程如下:The implementation process of XGBoost algorithm is as follows:

(2.1)定义数据集D={(xi,yi)},包含k棵树的模型可表示为:(2.1) Define the data set D = {(x i ,y i )}, and the model containing k trees can be expressed as:

其中,为第j个样本的标签向量,表示此时的充电负荷;xj为第j个样本的特征,表示影响因素;F表示由树构成的函数空间;d(xj)表示特征xj到叶子结点的映射;F(xj)表示基本学习器的集合空间;fk(xi)是d(xj)与第k棵树的权值w之间的函数关系,K表示树的总数。in, is the label vector of the j-th sample , indicating the charging load at this time ; Mapping of nodes; F(x j ) represents the set space of the basic learner; f k ( xi ) is the functional relationship between d(x j ) and the weight w of the k-th tree, and K represents the total number of trees .

(2.2)确定XGBoost训练的目标函数:(2.2) Determine the objective function of XGBoost training:

其中,l()为损失函数,Ω()为正常函数。Ω(fk)表示生成的回归树的复杂度,α为正则化参数,避免过拟合现象,T为叶节点数,β控制叶节点权值wjAmong them, l() is the loss function and Ω() is the normal function. Ω(f k ) represents the complexity of the generated regression tree, α is the regularization parameter to avoid overfitting, T is the number of leaf nodes, and β controls the leaf node weight w j ;

(3)通过图卷积网络GCN和Crossformer模型构建GCN-Crossformer充电负荷预测模型,将步骤(2)得到的训练集和验证集输入到GCN-Crossformer充电负荷预测模型中进行训练;(3) Build the GCN-Crossformer charging load prediction model through the graph convolution network GCN and Crossformer model, and input the training set and verification set obtained in step (2) into the GCN-Crossformer charging load prediction model for training;

构建GCN-Crossformer充电负荷预测模型的实现过程如下:The implementation process of constructing the GCN-Crossformer charging load prediction model is as follows:

(3.1)通过图卷积网络GCN对历史充电负荷数据和影响因素数据进行空间特征提取;(3.1) Extract spatial features from historical charging load data and influencing factor data through graph convolution network GCN;

图卷积的运算公式为:The operation formula of graph convolution is:

式中,I为单位矩阵,A为邻接矩阵;/>是对角矩阵;Hl和Wl分别为第l层的输出和参数值,σ(·)为激活函数;In the formula, I is the identity matrix, A is the adjacency matrix;/> is a diagonal matrix; H l and W l are the output and parameter values of the l-th layer respectively, and σ(·) is the activation function;

步骤4.2:通过Crossformer捕捉数据在时间序列上的依赖关系;Step 4.2: Capture the dependence of data on time series through Crossformer;

通过在注意力上增加一个偏置来表示嵌入的相对位置;Represent the relative position of the embedding by adding a bias to the attention;

式中,分别为子注意力模块中的向量,/>为常数归一化式,B为RPB矩阵。In the formula, are vectors in the sub-attention module respectively, /> is the constant normalization formula, and B is the RPB matrix.

(4)采用适应度距离平衡策略FDB和随机游走策略对蜣螂优化算法DBO进行改进,得到IDBO算法;利用IDBO算法优化GCN-Crossformer充电负荷预测模型的学习率,注意力头数,以提高模型预测的精度;实现过程如下:(4) Use the fitness distance balance strategy FDB and the random walk strategy to improve the dung beetle optimization algorithm DBO to obtain the IDBO algorithm; use the IDBO algorithm to optimize the learning rate and the number of attention heads of the GCN-Crossformer charging load prediction model to improve The accuracy of model prediction; the implementation process is as follows:

(4.1)初始化IDBO算法的相关参数,包括种群、维度、最大迭代次数、搜索空间的上下限;(4.1) Initialize the relevant parameters of the IDBO algorithm, including population, dimension, maximum number of iterations, and upper and lower limits of the search space;

(4.2)定义蜣螂的位置更新;(4.2) Define the location update of the dung beetle;

蜣螂滚球的位置更新:Dung beetle rolling ball location update:

xi(t+1)=xi(t)+α×k×xi(t-1)+b×Ax,Δx=|xi(t)-Xw| (8)x i (t+1)=xi ( t)+α×k×x i (t-1)+b×Ax,Δx=|x i (t)-X w | (8)

其中,xi(t+1)为第i只蜣螂在第t次迭代时的位置,k∈(0,0.2)表示偏转系数,b∈(0,1)为一个自然系数;Δx为光强度的变化程度,Xw为当前种群内的最差位置。α=1表示自然环境不影响原始方向,α=-1表示偏离原始方向。Among them, x i (t+1) is the position of the i-th dung beetle at the t-th iteration, k∈(0,0.2) represents the deflection coefficient, b∈(0,1) is a natural coefficient; Δx is the light The degree of change in intensity, X w is the worst position within the current population. α=1 means that the natural environment does not affect the original direction, α=-1 means that it deviates from the original direction.

蜣螂跳舞的位置更新为:The location of the dancing dung beetle is updated to:

xi(t+1)=xi(t)+tan(θ)|xi(t)-xi(t-1)| (9)x i (t+1)=xi ( t)+tan(θ)|x i (t)-x i (t-1)| (9)

其中,θ∈[0,π]为偏转角;Among them, θ∈[0,π] is the deflection angle;

蜣螂繁殖的位置更新为:The location of dung beetle breeding is updated to:

Bi(t+1)=X*+b1×(Bi(t)-Lb*)+b2×(Bi(t)-Ub*) (10)B i (t+1)=X * +b 1 ×(B i (t)-Lb * )+b 2 ×(B i (t)-Ub * ) (10)

蜣螂觅食的位置更新为:The location of dung beetles feeding has been updated to:

xi(t+1)=xi(t)+C1×(xi(t)-Lbb)+C2×(xi(t)-Ubb) (11)x i (t+1)= xi (t)+C 1 ×( xi (t)-Lb b )+C 2 ×(x i (t)-Ub b ) (11)

蜣螂偷窃的位置更新为:The location of Dung Beetle has been updated to:

xi(t+1)=Xb+S×g×(|xi(t)-X*|+|xi(t)-Xb|) (12)x i (t+1)=X b +S×g×(|x i (t)-X * |+|x i (t)-X b |) (12)

利用随机游走策略对蜣螂的位置更新做出改进:Use random walk strategy to improve the location update of dung beetles:

X(t)=[0,sum(2r(t1)-1),…,sum(2r(tn)-1)] (13)X(t)=[0,sum(2r(t 1 )-1),…,sum(2r(t n )-1)] (13)

其中,X(t)为步数集;t为最大迭代次数;r(t)为一个随机函数,定义为:Among them, X(t) is the number of steps; t is the maximum number of iterations; r(t) is a random function, defined as:

其中,随机数rand在[0,1]之间;上式作归一化处理,由于可行域存在边界,用下式直接更新蜣螂的位置:Among them, the random number rand is between [0,1]; the above formula is normalized. Since there is a boundary in the feasible region, the following formula is used to directly update the position of the dung beetle:

式中,ai为第i维变量随机游走的最小值;bi为第i维变量随机游走的最大值;ci(t)与di(t)分别为第i维变量在第t次迭代的最小值和最大值。In the formula, a i is the minimum value of the random walk of the i-th dimension variable; b i is the maximum value of the random walk of the i-th dimension variable; c i (t) and di (t) are respectively the i-th dimension variable in the random walk. Minimum and maximum values for t iterations.

(4.3)利用适应度距离平衡策略寻找种群中对搜索过程做出最大贡献的候选解;具体包括以下步骤:(4.3) Use the fitness distance balance strategy to find the candidate solution in the population that makes the greatest contribution to the search process; specifically, it includes the following steps:

(4.31)计算蜣螂算法中的第i维候选解的适应度值fi(4.31) Calculate the fitness value f i of the i-th dimension candidate solution in the dung beetle algorithm;

(4.32)计算第i维候选解与当前最优解的距离采用欧氏距离作为距离测量的指标;(4.32) Calculate the distance between the i-th dimension candidate solution and the current optimal solution Euclidean distance is used as the index of distance measurement;

(4.33)根据解的适应度值和到最优解的距离做归一化处理,通过加权求和的方式计算第i维候选解的FDB分数:(4.33) Perform normalization according to the fitness value of the solution and the distance to the optimal solution, and calculate the FDB score of the i-th dimension candidate solution through weighted summation:

其中ω∈(0,1)是权重系数;where ω∈(0,1) is the weight coefficient;

(4.34)求得FDB分数Si后,用轮盘赌方法来确定最终选择的参考位置,改进后的位置更新公式如下:(4.34) After obtaining the FDB score S i , the roulette method is used to determine the final selected reference position. The improved position update formula is as follows:

其中是种群中随机选取的一个个体,e是规模系数,r是[0,1]中的均匀分布随机数,p是蜣螂个体数量,即种群规模;nump是最小距离阈值,Xfdb是FDB方法确定的参考个体。in is a randomly selected individual in the population, e is the scale coefficient, r is a uniformly distributed random number in [0,1], p is the number of dung beetle individuals, that is, the population size; num p is the minimum distance threshold, X fdb is FDB Reference individuals determined by the method.

(4.4)判断是否达到最大迭代次数,若达到,则输出最优解,否则返回步骤(4.2)。(4.4) Determine whether the maximum number of iterations has been reached. If so, output the optimal solution, otherwise return to step (4.2).

(5)使用测试集对分布式充电负荷进行预测,验证最终GCN-Crossformer充电负荷预测模型的可靠性,通过优化后的GCN-Crossformer充电负荷预测模型对充电负荷进行预测,得到充电负荷预测值。(5) Use the test set to predict the distributed charging load, verify the reliability of the final GCN-Crossformer charging load prediction model, predict the charging load through the optimized GCN-Crossformer charging load prediction model, and obtain the charging load prediction value.

Claims (10)

1. The distributed charge load prediction method based on the GCN-Crossformer model is characterized by comprising the following steps of:
(1) Acquiring historical charging load data and influence factor data, and cleaning the data;
(2) Calculating the contribution degree of each influence factor to the charge load prediction, and analyzing and screening the importance of each influence factor; dividing the screened influence factor data and the historical charging load data into a training set and a verification set;
(3) Constructing a GCN-cross former charge load prediction model, inputting the training set and the verification set in the step (2) into the GCN-cross former charge load prediction model for training, wherein the spatial feature extraction is carried out on data through a graph rolling network GCN, and the dependence of the data on time sequence is captured through a cross former module;
(4) Optimizing the learning rate and the attention head number of the trained GCN-Crossformer charge load prediction model;
(5) And predicting the charging load through the optimized GCN-Crossformer charging load prediction model to obtain a final charging load prediction value.
2. The distributed charge load prediction method according to claim 1, wherein the influencing factors in step (1) include user travel characteristics, user residence, charging station location, charging device distribution, electric car number, electricity price, weather, and holidays.
3. The method according to claim 1, wherein the contribution degree of each influencing factor to the charge load prediction is calculated by using XGBoost algorithm in the step (2);
the construction of the XGBoost algorithm is as follows:
wherein,a label vector which is the j-th sample and indicates the charging load at that time; x is x j Representing influencing factors for the features of the j-th sample; f represents a function space formed by a tree; d (x) j ) Representing characteristic x j Mapping to leaf nodes; f (x) j ) Representing a collection space of the base learner; f (f) k (x i ) Is d (x) j ) And the weight w of the kth tree, wherein K represents the total number of the trees.
4. The method according to claim 1, wherein in the step (3), the spatial feature extraction is performed on the historical charging load data and the influence factor data through a graph rolling network GCN; the operational formula of the graph roll network GCN is:
wherein σ (·) is the activation function;i is an identity matrix, A is an adjacent matrix; />Is a diagonal matrix; h l And W is l The output of the first layer and the parameter value, respectively.
5. The method for predicting the distributed charging load according to claim 1, wherein in the step (4), an adaptability distance balance strategy FDB and a random walk strategy are adopted to improve a dung beetle optimization algorithm DBO, so as to obtain an IDBO algorithm; the learning rate and the attention head number of the GCN-Crossformer charge load prediction model are optimized by using an IDBO algorithm.
6. The method for predicting distributed charging load according to claim 5, wherein the position update of the dung beetles in the dung beetle optimization algorithm DBO is improved by using a random walk strategy; the updating formula of the dung beetle position is as follows:
wherein X is i (t) represents the position of the ith dimension of the t-th iteration of the dung beetle, a i Is the minimum value of the random walk of the variable in the ith dimension, b i Maximum value of random walk for the ith dimension variable; c i (t) and d i (t) is the minimum and maximum values, respectively, of the ith dimension variable at the t-th iteration.
7. The method of claim 5, wherein the step of searching for a candidate solution in the population that contributes most to the search process using a fitness distance balancing strategy, comprises the steps of:
(4.31) calculating the fitness value f of the ith dimension candidate solution in the dung beetle algorithm i
(4.32) calculating Euclidean distance between the ith dimension candidate solution and the current optimal solution in the dung beetle algorithm
(4.33) normalizing the fitness value of the candidate solution and the Euclidean distance from the candidate solution to the optimal solution, and calculating the FDB score S of the ith dimension candidate solution by means of weighted summation i
Wherein n is the total number of dimensions, ω∈ (0, 1) is a weight coefficient; norm (·) represents normalization;
(4.34) determining the final selected reference position by a roulette method based on the FDB score of the candidate solution, the modified position update formula being as follows:
wherein,is the initial individual selected randomly in the population, e is the scale factor, r is [0,1]Wherein p is the individual number of the dung beetles, namely the population scale; num (num) p Is the minimum distance threshold, X fdb Is a reference individual determined by the FDB method.
8. A prediction system employing the distributed charge load prediction method according to any one of claims 1 to 7, characterized by comprising:
the data acquisition module is used for acquiring historical charging load data and influence factor data and cleaning the data;
the data dividing module is used for calculating the contribution degree of each influence factor to the charge load prediction and analyzing and screening the importance of each influence factor; dividing the screened influence factor data and the historical charging load data into a training set, a verification set and a test set;
the model construction module is used for constructing a GCN-Crossformer charging load prediction model, inputting the training set and the verification set in the step (2) into the GCN-Crossformer charging load prediction model for training, wherein the spatial feature extraction is carried out on data through a graph rolling network GCN, and the dependence of the data on time sequence is captured through the Crossformer module;
the optimization module is used for optimizing the learning rate and the attention head number of the trained GCN-Crossformer charge load prediction model;
the prediction module is used for predicting the charge load through the optimized GCN-Crossformer charge load prediction model to obtain a final charge load prediction value.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311114327.7A 2023-08-30 2023-08-30 A distributed charging load prediction method and system based on GCN-Crossformer model Pending CN117081063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311114327.7A CN117081063A (en) 2023-08-30 2023-08-30 A distributed charging load prediction method and system based on GCN-Crossformer model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311114327.7A CN117081063A (en) 2023-08-30 2023-08-30 A distributed charging load prediction method and system based on GCN-Crossformer model

Publications (1)

Publication Number Publication Date
CN117081063A true CN117081063A (en) 2023-11-17

Family

ID=88711472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311114327.7A Pending CN117081063A (en) 2023-08-30 2023-08-30 A distributed charging load prediction method and system based on GCN-Crossformer model

Country Status (1)

Country Link
CN (1) CN117081063A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874495A (en) * 2024-01-17 2024-04-12 昆明理工大学 Solar power generation power combination prediction method and device
CN118199054A (en) * 2024-04-23 2024-06-14 淮阴工学院 Power load prediction method, device and medium
CN118333225A (en) * 2024-05-06 2024-07-12 湖北工业大学 Deep learning-based power load prediction method and device and electronic equipment
CN118627698A (en) * 2024-08-13 2024-09-10 深圳汇能新能源科技有限公司 A method and system for predicting electric vehicle charging load based on spatiotemporal characteristics

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874495A (en) * 2024-01-17 2024-04-12 昆明理工大学 Solar power generation power combination prediction method and device
CN117874495B (en) * 2024-01-17 2024-06-04 昆明理工大学 A method and device for predicting solar power generation power combination
CN118199054A (en) * 2024-04-23 2024-06-14 淮阴工学院 Power load prediction method, device and medium
CN118199054B (en) * 2024-04-23 2024-10-29 淮阴工学院 Power load prediction method, device and medium
CN118333225A (en) * 2024-05-06 2024-07-12 湖北工业大学 Deep learning-based power load prediction method and device and electronic equipment
CN118627698A (en) * 2024-08-13 2024-09-10 深圳汇能新能源科技有限公司 A method and system for predicting electric vehicle charging load based on spatiotemporal characteristics

Similar Documents

Publication Publication Date Title
Yu et al. Short term wind power prediction for regional wind farms based on spatial-temporal characteristic distribution
CN117081063A (en) A distributed charging load prediction method and system based on GCN-Crossformer model
CN112100911B (en) A Solar Radiation Prediction Method Based on Deep BILSTM
CN109214503B (en) Power transmission and transformation project cost prediction method based on KPCA-LA-RBM
CN116644970A (en) A Photovoltaic Power Prediction Method Based on VMD Decomposition and Stacked Deep Learning
Raghavendra et al. Artificial humming bird with data science enabled stability prediction model for smart grids
CN114462718A (en) CNN-GRU wind power prediction method based on time sliding window
Wang et al. Prediction method of wind farm power generation capacity based on feature clustering and correlation analysis
CN114897129A (en) A short-term power prediction method for photovoltaic power plants based on daily similarity clustering and Kmeans-GRA-LSTM
CN116468138A (en) Air conditioner load prediction method, system, electronic equipment and computer storage medium
CN108470358A (en) A kind of point cloud registration method for shaking artificial bee colony algorithm based on second order
CN114065646B (en) Energy consumption prediction method based on hybrid optimization algorithm, cloud computing platform and system
CN118841945A (en) Photovoltaic power generation amount prediction system and method considering similar day selection and weather types
CN117526316A (en) Load prediction method based on GCN-CBAM-BiGRU combined model
CN118336705A (en) Short-term load interval prediction method
CN108985323A (en) A kind of short term prediction method of photovoltaic power
CN113361776A (en) Power load probability prediction method based on user power consumption behavior clustering
CN113989544A (en) Group discovery method based on deep map convolution network
CN116702992A (en) Power generation power prediction method and device, electronic equipment and storage medium
CN118133060A (en) Photovoltaic power generation prediction method, device and storage medium based on time-series generation edge
CN118944043A (en) Method and system for predicting and analyzing power generation of renewable energy affected by multiple factors
Wibawa et al. Long Short-Term Memory to Predict Unique Visitors of an Electronic Journal
CN113762591B (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning
CN119315528A (en) Power load combination prediction method, system, electronic equipment and medium
CN116245259B (en) Photovoltaic power generation prediction method and device based on depth feature selection and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination