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 PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012549 training Methods 0.000 claims abstract description 18
- 238000012795 verification Methods 0.000 claims abstract description 12
- 241000254173 Coleoptera Species 0.000 claims description 28
- 238000004422 calculation algorithm Methods 0.000 claims description 28
- 210000003608 fece Anatomy 0.000 claims description 28
- 238000005295 random walk Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 10
- 238000005457 optimization Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 8
- 238000004140 cleaning Methods 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- 238000010606 normalization Methods 0.000 claims description 4
- 238000005096 rolling process Methods 0.000 claims description 4
- 238000012360 testing method Methods 0.000 claims description 4
- 239000013598 vector Substances 0.000 claims description 4
- 230000004913 activation Effects 0.000 claims description 3
- 238000009826 distribution Methods 0.000 claims description 3
- 230000005611 electricity Effects 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims 4
- 238000010276 construction Methods 0.000 claims 2
- 238000012216 screening Methods 0.000 claims 2
- 238000003860 storage Methods 0.000 claims 1
- 230000004927 fusion Effects 0.000 abstract description 4
- 238000013135 deep learning Methods 0.000 abstract description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 238000013179 statistical model Methods 0.000 description 2
- 241001123248 Arma Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000009395 breeding Methods 0.000 description 1
- 230000001488 breeding effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012417 linear regression Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for AC mains or AC distribution networks
- H02J3/003—Load forecast, e.g. methods or systems for forecasting future load demand
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/20—Ensemble learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, 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
技术领域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为叶节点数,β控制叶节点权值wj;Among 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)
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)
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 |
-
2023
- 2023-08-30 CN CN202311114327.7A patent/CN117081063A/en active Pending
Cited By (6)
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 |