CN116451824B - Photovoltaic power prediction method based on neural network and honeypot optimization - Google Patents

Photovoltaic power prediction method based on neural network and honeypot optimization Download PDF

Info

Publication number
CN116451824B
CN116451824B CN202211645456.4A CN202211645456A CN116451824B CN 116451824 B CN116451824 B CN 116451824B CN 202211645456 A CN202211645456 A CN 202211645456A CN 116451824 B CN116451824 B CN 116451824B
Authority
CN
China
Prior art keywords
neural network
parameter
weights
parameters
data
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.)
Active
Application number
CN202211645456.4A
Other languages
Chinese (zh)
Other versions
CN116451824A (en
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.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
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 Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN202211645456.4A priority Critical patent/CN116451824B/en
Publication of CN116451824A publication Critical patent/CN116451824A/en
Application granted granted Critical
Publication of CN116451824B publication Critical patent/CN116451824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • H02J3/00Circuit arrangements for AC mains or AC distribution networks
    • H02J3/004Generation forecast, e.g. methods or systems for forecasting future energy generation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2300/00Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
    • H02J2300/20The dispersed energy generation being of renewable origin
    • H02J2300/22The renewable source being solar energy
    • H02J2300/24The renewable source being solar energy of photovoltaic origin
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

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

Abstract

The invention relates to a photovoltaic power prediction method based on neural network and honeypot optimization, and provides a photovoltaic power generation prediction model based on a badger algorithm and an enhanced counter-propagation neural network aiming at the defect that random initial weight and bias seriously affect the performance of a BP neural network. The solar irradiance per hour and the ambient temperature of the peltier cell are used as input data for the predictive model, and the historical power generation per hour (power) is used as the expected output. HBAs are introduced in the BP neural network to optimize initial weights and biases. The simulation results of various indexes show that the prediction accuracy of the HBA-BP neural network is improved to a certain extent relative to a BP prediction model.

Description

一种基于神经网络和蜜罐优化的光伏功率预测方法A photovoltaic power prediction method based on neural network and honeypot optimization

技术领域Technical Field

本发明属于提高预测精度和效率的功率预测算法,涉及一种基于神经网络和蜜罐优化的光伏功率预测方法。The invention belongs to a power prediction algorithm for improving prediction accuracy and efficiency, and relates to a photovoltaic power prediction method based on neural network and honeypot optimization.

背景技术Background Art

元启发式算法被广泛用作在多个工程和科学研究领域的各种复杂问题中获得最优解的主要技术之一。它们在解决确定性算法陷入局部最优的复杂问题中非常有用,因为它们具有寻找几种局部解决方案的多功能性,例如在实际应用中的结构工程问题的优化设计,可再生能源系统,深度神经网络(DNNs)模型优化,以及其他应用。元启发式算法并不完美,一个弱点是最优解的质量取决于参数值的数量和算法的停止条件,通常由迭代次数决定。近年来开发了许多元启发式算法。如,粒子群优化算法(PSO)、鲸鱼优化算法(WOA)、变色龙群算法(CSA),非洲秃鹰优化算法(AVOA),蜜罐算法(HBA)等等。其中,蜜罐算法针对于求解最优解的精度较高。反向传播(BP)神经网络作为一种预测算法已应用于光伏(PV)系统的发电预测,而实际应用中的预测精度一直是一个问题。所以,我们以蜜罐算法和反向传播神经网络相结合的方式来提高对PV系统的控制性能。结果表明,预测精度和效率方面优于传统的反向传播神经网络模型。Metaheuristic algorithms are widely used as one of the main techniques for obtaining optimal solutions in various complex problems in multiple engineering and scientific research fields. They are very useful in solving complex problems where deterministic algorithms are stuck in local optima because they have the versatility to find several local solutions, such as the optimal design of structural engineering problems in practical applications, renewable energy systems, deep neural network (DNNs) model optimization, and other applications. Metaheuristic algorithms are not perfect. One weakness is that the quality of the optimal solution depends on the number of parameter values and the stopping condition of the algorithm, which is usually determined by the number of iterations. Many metaheuristic algorithms have been developed in recent years. For example, particle swarm optimization algorithm (PSO), whale optimization algorithm (WOA), chameleon swarm algorithm (CSA), African vulture optimization algorithm (AVOA), honeypot algorithm (HBA), etc. Among them, the honeypot algorithm has a higher accuracy in solving the optimal solution. Back propagation (BP) neural network as a prediction algorithm has been applied to power generation prediction of photovoltaic (PV) systems, but the prediction accuracy in practical applications has always been a problem. Therefore, we combine the honeypot algorithm and the back propagation neural network to improve the control performance of the PV system. The results show that the prediction accuracy and efficiency are better than the traditional back propagation neural network model.

蜜罐优化算法与其他的元启发式算法有所不同。受到蜜獾智能觅食行为的启发,从数学上开发了一种解决优化问题的有效搜索策略。通过受控随机化技术,HBA甚至在搜索过程结束时也能保持充足的种群多样性(在这里,种群即为权重和偏置,解为最佳的权重和偏置),而(BP)神经网络在光伏系统的发电预测中,预测精度比较低,这是由于初始权重和偏置是随机设置而导致的。所以说,对于光伏系统的发电预测,BP神经网络仍然有着改进的空间。The honeypot optimization algorithm is different from other metaheuristic algorithms. Inspired by the intelligent foraging behavior of honey badgers, an effective search strategy for solving optimization problems is mathematically developed. Through controlled randomization technology, HBA can maintain sufficient population diversity even at the end of the search process (here, the population is the weight and bias, and the solution is the optimal weight and bias), while the (BP) neural network has a relatively low prediction accuracy in the power generation prediction of photovoltaic systems, which is caused by the random setting of the initial weights and biases. Therefore, there is still room for improvement in the BP neural network for power generation prediction of photovoltaic systems.

发明内容Summary of the invention

要解决的技术问题Technical issues to be solved

为了避免现有技术的不足之处,本发明提出一种基于神经网络和蜜罐优化的光伏功率预测方法。In order to avoid the shortcomings of the prior art, the present invention proposes a photovoltaic power prediction method based on neural network and honeypot optimization.

本发明基于上述分析,可以对BP神经网络算法进行改造。通过结合HBA算法的优点,即考虑初始权重和偏置的影响,来提高算法的性能进而使BP神经网络算法在PV系统的应用中获得更好的动态性能。利用HBA来调整权重和偏置从而提高BP神经网络算法的精确性。本工作的具体贡献如下:Based on the above analysis, the present invention can transform the BP neural network algorithm. By combining the advantages of the HBA algorithm, that is, considering the influence of the initial weight and bias, the performance of the algorithm can be improved so that the BP neural network algorithm can obtain better dynamic performance in the application of the PV system. HBA is used to adjust the weight and bias to improve the accuracy of the BP neural network algorithm. The specific contributions of this work are as follows:

(1).基于BP神经网络算法已应用于光伏发电的预测,提出一种增强精确性的优化算法(HBA-BP),以增强PV系统中发电量预测的精确性。(1) Based on the fact that BP neural network algorithm has been applied to the prediction of photovoltaic power generation, an optimization algorithm with enhanced accuracy (HBA-BP) is proposed to enhance the accuracy of power generation prediction in PV systems.

(2).将HBA-BP对于光伏发电的预测结果与BP的预测结果进行比较分析。(2) Compare and analyze the prediction results of HBA-BP for photovoltaic power generation with those of BP.

(3).利用优化设计问题的性能指标,包括平均绝对误差(MAE)和均方根误差(RMSE),并充分考虑PV系统的温度变化的影响来评价所提出的HBA-BP。(3) The proposed HBA-BP is evaluated using the performance indicators of the optimization design problem, including mean absolute error (MAE) and root mean square error (RMSE), and fully considering the impact of temperature variation of the PV system.

技术方案Technical Solution

一种基于神经网络和蜜罐优化的光伏功率预测方法,其特征在于步骤如下:A photovoltaic power prediction method based on neural network and honeypot optimization, characterized by the following steps:

步骤1:对三类原始数据分别进行归一化处理,三类原始数据包括光照强度y1、环境温度y2和功率y3,得到三类原始数据归一化后的参数数据ynStep 1: normalize three types of original data respectively, the three types of original data include light intensity y 1 , ambient temperature y 2 and power y 3 , and obtain parameter data yn after normalization of the three types of original data;

其中,yn(n=1,2,3)表示对应原始数据ym(m=1,2,3)的归一化数据(-1<yn<1);ym,min和ym,max分别是三类对应原始数据的下边界和上边界;Wherein, y n (n=1,2,3) represents the normalized data (-1<y n <1) corresponding to the original data y m (m=1,2,3); y m,min and y m,max are the lower and upper boundaries of the three categories of corresponding original data respectively;

将归一化后的每类数据,随机的分为两个组为训练数据和测试数据;After normalization, each type of data is randomly divided into two groups: training data and test data;

步骤2:对BP神经网络初始化参数,参数定义为权重和偏置所构成的向量:Step 2: Initialize the parameters of the BP neural network. The parameters are defined as a vector consisting of weights and biases:

xi=lbi+rand×(ubi-lbi);rand∈[0,1]x i =lb i +rand×(ub i -lb i ); rand∈[0,1]

其中,ubi为参数的上边界,lbi为参数的下边界;rand是[0,1]内的随机值,i表示第i个参数;Among them, ub i is the upper boundary of the parameter, lb i is the lower boundary of the parameter; rand is a random value in [0,1], and i represents the i-th parameter;

将三类训练数据输入BP神经网络,BP神经网络输出与参数对应的功率值;The three types of training data are input into the BP neural network, and the BP neural network outputs the power value corresponding to the parameter;

步骤3:对所有参数下的功率值进行评估:Step 3: Evaluate the power values under all parameters:

最小均方误差为最佳参数值即对应权重和偏置所构成的向量保存到TposThe minimum mean square error is the optimal parameter value, that is, the vector consisting of the corresponding weight and bias is saved in T pos ;

步骤4:计算强度I即参数集中度:Step 4: Calculate the intensity I, i.e. the parameter concentration:

其中:取值为2,Ii表示参数集中度,di表示参数与其他参数之间差的距离;Among them: the value is 2, I i represents the parameter concentration, and d i represents the distance between the parameter and other parameters;

更新递减因子α: Update the decrement factor α:

其中:t表示当前迭代次数,C为常数,tmax为最大迭代次数;Where: t represents the current number of iterations, C is a constant, and t max is the maximum number of iterations;

步骤5:更新参数xnew,返回步骤3;Step 5: Update the parameter x new and return to step 3;

所述参数xnew的计算为:The parameter x new is calculated as:

当R<0.5时:When R<0.5:

xnew=xprey+βIFxprey+r1αdiF|cos(2πr2)×[1-cos(2πr3)]|x new =x prey +βIFx prey +r 1 αd i F|cos(2πr 2 )×[1-cos(2πr 3 )]|

当R≥0.5时:When R ≥ 0.5:

xnew=xprey+βIFxprey+r4αdiFx new =x prey +βIFx prey +r 4 αd i F

其中,xnew表示新的参数,求解最佳参数的能力定义为β≥1,R、r1、r2、r3和r4是介于0和1之间的独立随机数,xprey表示当前最好的参数;Where x new represents the new parameters, the ability to solve the best parameters is defined as β ≥ 1, R, r 1 , r 2 , r 3 and r 4 are independent random numbers between 0 and 1, and x prey represents the current best parameters;

所述F用于改变参数值更新的方向:The F is used to change the direction of parameter value update:

步骤6:对Tpos内的权重和偏置进行训练:Step 6: Train the weights and biases in Tpos :

其中,Tpos表示最佳的那一组权重和偏置,Wt+1表示(t+1)次训练的权重,所定义的学习率lr也称为步长。Loss是训练中期望与预测值差异的度量,Wt表示t次训练的权重;Where T pos represents the best set of weights and biases, W t+1 represents the weights of (t+1) training times, and the defined learning rate lr is also called the step size. Loss is a measure of the difference between the expected and predicted values in training, and W t represents the weights of t training times;

步骤7:将以上训练得到的权重和偏置带入下式,输出预测值YpStep 7: Substitute the weights and biases obtained from the above training into the following formula and output the predicted value Y p :

其中,wij和bj是输入层到隐含层节点的权重和偏置参数。wjk和bk表示从隐藏层节点到输出层节点的权重和偏置,Yp表示预测值,即,预测的功率。是隐含层中节点的激活函数,为输出层节点的激活函数,m为输出层节点数,n是输入层的节点数,i是输入层的网络节点,j是隐藏层的网络节点,k是输出层的网络节点。Among them, w ij and b j are the weights and bias parameters from the input layer to the hidden layer nodes. w jk and b k represent the weights and biases from the hidden layer nodes to the output layer nodes, and Yp represents the predicted value, that is, the predicted power. is the activation function of the nodes in the hidden layer, is the activation function of the output layer nodes, m is the number of output layer nodes, n is the number of input layer nodes, i is the network node of the input layer, j is the network node of the hidden layer, and k is the network node of the output layer.

所述两个组数据中训练数据为80%,测试数据为20%。The two groups of data include 80% training data and 20% testing data.

所述常数C取值为2。The constant C has a value of 2.

所述β默认=6。The default value of β is 6.

有益效果Beneficial Effects

本发明提出的一种基于神经网络和蜜罐优化的光伏功率预测方法,针对随机初始权重和偏置严重影响BP神经网络性能的不完善性,所提出的基于蜜獾算法和增强型反向传播神经网络的光伏发电预测模型。将珀斯的每小时太阳辐照度和环境温度用作预测模型的输入数据,并将历史每小时发电量(功率)用作预期输出。在BP神经网络中引入HBA来对初始权重和偏置进行优化。各种指标的仿真结果说明相对于BP预测模型,HBA-BP神经网络的预测精度得到了一定程度上的提升。The present invention proposes a photovoltaic power prediction method based on neural network and honeypot optimization. In view of the imperfection that random initial weights and biases seriously affect the performance of BP neural network, a photovoltaic power generation prediction model based on honey badger algorithm and enhanced back propagation neural network is proposed. The hourly solar irradiance and ambient temperature of Perth are used as input data of the prediction model, and the historical hourly power generation (power) is used as the expected output. HBA is introduced into the BP neural network to optimize the initial weights and biases. The simulation results of various indicators show that the prediction accuracy of HBA-BP neural network is improved to a certain extent compared with the BP prediction model.

现有技术中,虽然可以通过BP神经网络对PV系统发电量进行预测,但预测精度会受到BP结构的影响;具体来说,初始权重和偏置是随机设置的,导致预测精度低。本发明提出的基于BP神经网络和HBA集成的优化光伏发电预期模型(HBA-BP)将利用HBA调整权重和偏置。然后,根据珀斯的数据模拟实验,HBA-BP和BP模型预测结果的比较表明,HBA可以提高BP神经网络的性能以获得更准确的结果。In the prior art, although the power generation of the PV system can be predicted by the BP neural network, the prediction accuracy will be affected by the BP structure; specifically, the initial weights and biases are randomly set, resulting in low prediction accuracy. The optimized photovoltaic power generation expectation model (HBA-BP) based on the integration of BP neural network and HBA proposed in the present invention will use HBA to adjust the weights and biases. Then, based on the data simulation experiment in Perth, the comparison of the prediction results of HBA-BP and BP models shows that HBA can improve the performance of BP neural network to obtain more accurate results.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1:方法流程如图1所示:(其中,t表示当前迭代次数,tmax为最大迭代次数。)Figure 1: The method flow is shown in Figure 1: (where t represents the current iteration number and t max represents the maximum iteration number.)

图2:功率预测比较测试图Figure 2: Power prediction comparison test diagram

图3:每日电量预测对比Figure 3: Daily power forecast comparison

图4:BP和HBA-BP的预测误差Figure 4: Prediction errors of BP and HBA-BP

具体实施方式DETAILED DESCRIPTION

现结合实施例、附图对本发明作进一步描述:The present invention will now be further described with reference to the embodiments and the accompanying drawings:

实施例方法流程如图1所示:(其中,t表示当前迭代次数,tmax为最大迭代次数。)The method flow of the embodiment is shown in FIG1 : (where t represents the current iteration number, and t max represents the maximum iteration number.)

(1)准备和归一化数据并将其分为训练集和测试集。(1) Prepare and normalize the data and divide it into training and testing sets.

其中,yn(n=1,2,3)表示对应原始参数ym(m=1,2,3)的归一化参数数据(-1<yn<1)。y1、y2、y3为原始参数(y1为光照强度;y2为环境温度;y3为功率)。ym,min和ym,max分别是原始参数的下边界和上边界,然后将归一化参数数据随机分为两个组,即80%的训练数据和20%的测试数据。Where yn (n=1,2,3) represents the normalized parameter data corresponding to the original parameter ym (m=1,2,3) (-1< yn <1). y1 , y2 , y3 are the original parameters ( y1 is the light intensity; y2 is the ambient temperature; y3 is the power). ym,min and ym,max are the lower and upper boundaries of the original parameters, respectively. The normalized parameter data are then randomly divided into two groups, namely 80% of the training data and 20% of the test data.

(2)初始化参数(以下的参数指权重和偏置所构成的向量)(以下i表示第i个参数)。(2) Initialization parameters (the parameters below refer to the vector composed of weights and biases) (the i below represents the i-th parameter)

xi=lbi+rand×(ubi-lbi);rand∈[0,1] (2)x i =lb i +rand×(ub i -lb i ); rand∈[0,1] (2)

其中,ubi为参数的上边界,lbi为参数的下边界;rand是[0,1]内的随机值。Among them, ub i is the upper boundary of the parameter, lb i is the lower boundary of the parameter; rand is a random value in [0,1].

(3)对所有参数(权重和偏置)下的功率值进行评估并将最佳参数值(权重和偏置)保存到Tpos,即,均方误差最小时对应的权重和偏置就是最佳的参数。(3) Evaluate the power values under all parameters (weights and biases) and save the best parameter values (weights and biases) to T pos , that is, the weights and biases corresponding to the minimum mean square error are the best parameters.

其中,Fitnessi是第i个功率的均方误差(MSE),Pp和Pa分别表示PV系统输出功率的预测值和真实值。d是指第几个功率,M是功率值总数。Where Fitness i is the mean square error (MSE) of the ith power, P p and Pa represent the predicted value and true value of the PV system output power, respectively. d refers to the ith power, and M is the total number of power values.

(4)更新递减因子α并计算强度I。(4) Update the decrement factor α and calculate the intensity I.

其中,C为常数,取值为2,Ii表示参数集中度(这里的参数指权重和偏置所构成的向量),di表示参数与其他参数之间差的距离,α是时变参数。Among them, C is a constant with a value of 2, Ii represents the parameter concentration (the parameter here refers to the vector composed of weights and biases), di represents the distance between the parameter and other parameters, and α is a time-varying parameter.

(5)通过下式更新参数(权重和偏置)并返回到步骤(3)进行评估,与原来的Tpos进行比较,若xnew下的均方误差更小,则将xnew赋给Tpos(5) Update the parameters (weights and biases) by the following formula and return to step (3) for evaluation and comparison with the original T pos . If the mean square error under x new is smaller, x new is assigned to T pos .

当R<0.5时:When R<0.5:

xnew=xprey+βIFxprey+r1αdiF|cos(2πr2)×[1-cos(2πr3)]| (5a)x new =x prey +βIFx prey +r 1 αd i F|cos(2πr 2 )×[1-cos(2πr 3 )]| (5a)

当R≥0.5时:When R ≥ 0.5:

xnew=xprey+βIFxprey+r4αdiF (5b)x new =x prey +βIFx prey +r 4 αd i F (5b)

其中,xnew表示新的参数(权重和偏置)。求解最佳参数的能力可以定义为β≥1(默认=6)。R、r1、r2、r3和r4是介于0和1之间的独立随机数,xprey表示当前最好的参数。作为标志,F用于改变参数值更新的方向(BP的训练过程包括前向传播和反向传播),如下所示:Where x new represents the new parameters (weights and biases). The ability to find the best parameters can be defined as β ≥ 1 (default = 6). R, r 1 , r 2 , r 3 and r 4 are independent random numbers between 0 and 1, and x prey represents the current best parameters. As a flag, F is used to change the direction of parameter value update (the BP training process includes forward propagation and back propagation), as shown below:

(6)对Tpos内的权重和偏置进行训练。(6) Train the weights and biases within Tpos .

其中,Tpos表示最佳的那一组权重和偏置,Wt+1表示(t+1)次训练的权重,所定义的学习率lr也称为步长。Loss是训练中期望与预测值差异的度量,Wt表示t次训练的权重。Where T pos represents the best set of weights and biases, W t+1 represents the weights of (t+1) training times, and the defined learning rate lr is also called the step size. Loss is a measure of the difference between the expected and predicted values in training, and W t represents the weights of t training times.

(7)将以上训练得到的权重和偏置带入下式后,进行模拟和预测,并将预测值Yp输出与y3进行比较。(7) After substituting the weights and biases obtained from the above training into the following formula, simulation and prediction are performed, and the predicted value Yp output is compared with y3 .

其中,wij和bj是输入层到隐含层节点的权重和偏置参数。wjk和bk表示从隐藏层节点到输出层节点的权重和偏置,Yp表示预测值,即,预测的功率。是隐含层中节点的激活函数,为输出层节点的激活函数,m为输出层节点数,n是输入层的节点数,i是输入层的网络节点,j是隐藏层的网络节点,k是输出层的网络节点。Among them, w ij and b j are the weights and bias parameters from the input layer to the hidden layer nodes. w jk and b k represent the weights and biases from the hidden layer nodes to the output layer nodes, and Yp represents the predicted value, that is, the predicted power. is the activation function of the nodes in the hidden layer, is the activation function of the output layer nodes, m is the number of output layer nodes, n is the number of input layer nodes, i is the network node of the input layer, j is the network node of the hidden layer, and k is the network node of the output layer.

实施实例中In the implementation example

(1)参数设置:(1) Parameter settings:

为了清楚地证明所提出的网络优化的科学性和可靠性,分别利用400组数据对BP神经网络和HBA-BP神经网络进行训练。剩余的100组数据作为测试集来验证两种算法的性能。In order to clearly demonstrate the scientificity and reliability of the proposed network optimization, 400 sets of data were used to train the BP neural network and the HBA-BP neural network respectively. The remaining 100 sets of data were used as test sets to verify the performance of the two algorithms.

表1.参数设置表Table 1. Parameter setting table

参数parameter 数值Numeric 参数parameter 数值Numeric 输入层Input Layer 11 数据集大小Dataset size 3030 输出层节点Output layer nodes 11 最大迭代次数Maximum number of iterations 100100 隐藏层Hidden Layer 11 数据集的维度Dimensions of the dataset 1717 隐藏层节点Hidden layer nodes 44 数据设置Data settings 500500 输出层Output Layer 11 学习率Learning Rate 0.10.1 输出层节点Output layer nodes 11 训练次数Number of training sessions 100100

(2)以小时平均太阳辐照度和环境温度为输入,每小时发电量为输出期望时,预测结果及整体误差如图2,测试HBA-BP模型的功率预测结果与实际发电量一起呈现。表明HBA-BP模型的预测性能优于BP模型。(2) When the hourly average solar irradiance and ambient temperature are used as input and the hourly power generation is the output expectation, the prediction results and overall error are shown in Figure 2. The power prediction results of the HBA-BP model are presented together with the actual power generation. This shows that the prediction performance of the HBA-BP model is better than that of the BP model.

(3)为了获得更明显的BP和HBA-BP的性能,24小时预测结果如图3;(3) In order to obtain more obvious performance of BP and HBA-BP, the 24-hour prediction results are shown in Figure 3;

如图3所示HBA-BP和BP模型的每日功率预测结果与实际发电量一起呈现。HBA-BP的预测比BP更接近实际值,这表明HBA-BP模型的预测性能优于BP模型。即预测的结果将更加精确。As shown in Figure 3, the daily power forecast results of the HBA-BP and BP models are presented together with the actual power generation. The prediction of HBA-BP is closer to the actual value than that of BP, which shows that the prediction performance of the HBA-BP model is better than that of the BP model. That is, the predicted results will be more accurate.

(4)在图4中比较了BP模型和HBA-BP模型的预测误差。BP的预测误差明显高于HBA-BP的预测误差,所以说HBA-BP表现出比BP神经网络预测模型更好的非线性拟合能力。(4) The prediction errors of the BP model and the HBA-BP model are compared in Figure 4. The prediction error of BP is significantly higher than that of HBA-BP, so HBA-BP exhibits better nonlinear fitting ability than the BP neural network prediction model.

(5)为了更准确有效地证实HBBA-BP预测模型的优越性,应用了平均绝对误差(MAE)和均方根误差(RMSE)来评估HBA-BP预测模型的性能。(5) In order to more accurately and effectively verify the superiority of the HBBA-BP prediction model, the mean absolute error (MAE) and root mean square error (RMSE) were applied to evaluate the performance of the HBA-BP prediction model.

对BP神经网络预测模型和HBA-BP预测模型进行的定量评价如表2所示。The quantitative evaluation of the BP neural network prediction model and the HBA-BP prediction model is shown in Table 2.

表2.HBA-BP预测模型与BP预测模型的性能比较Table 2. Performance comparison between HBA-BP prediction model and BP prediction model

性能指标项Performance indicators BP模型BP Model HBA-BP模型HBA-BP model 均方误差(MSE)Mean Square Error (MSE) 305.15*10-6 305.15*10 -6 5.585*10-6 5.585*10 -6 平均绝对误差(MAE)Mean Absolute Error (MAE) 1.8461.846 0.2640.264 均方根误差(RMSE)Root mean square error (RMSE) 0.001750.00175 0.0002360.000236

结果表明,BP预测模型中引入HBA后,三个指标都下降的比较大。RMSE的值从0.00175惊人地下降到0.000236,下降了7.5倍,这体现了HBA-BP预测模型优越的预测性能和准确性,且在实际应用中将发挥更加优异的效果。The results show that after the introduction of HBA into the BP prediction model, the three indicators all dropped significantly. The RMSE value dropped dramatically from 0.00175 to 0.000236, a decrease of 7.5 times, which reflects the superior prediction performance and accuracy of the HBA-BP prediction model, and will play a more excellent role in practical applications.

针对BP神经网络的性能受到随机权重和偏置的影响,我们提出的一种基于蜜獾算法和增强型反向传播神经网络的光伏发电预测模型,用来对权值和偏置进行优化,以得到最优的效果,从而提高神经网络的预测性能,即提高其预测的精准度。通过优化后的各项指标的仿真结果表明,HBA-BP神经网络的预测精度相对于BP预测模型有较大的提升,展现出了优异的预测效果,这极大提高了对PV系统控制的实时性和精确性要求。In view of the fact that the performance of BP neural network is affected by random weights and biases, we proposed a photovoltaic power generation prediction model based on honey badger algorithm and enhanced back propagation neural network to optimize weights and biases to obtain the best effect, thereby improving the prediction performance of neural network, that is, improving its prediction accuracy. The simulation results of various indicators after optimization show that the prediction accuracy of HBA-BP neural network is greatly improved compared with BP prediction model, showing excellent prediction effect, which greatly improves the real-time and accuracy requirements for PV system control.

Claims (4)

1.一种基于神经网络和蜜罐优化的光伏功率预测方法,其特征在于步骤如下:1. A photovoltaic power prediction method based on neural network and honeypot optimization, characterized by the following steps: 步骤1:对三类原始数据分别进行归一化处理,三类原始数据包括光照强度y1、环境温度y2和功率y3,得到三类原始数据归一化后的参数数据ynStep 1: normalize three types of original data respectively, the three types of original data include light intensity y 1 , ambient temperature y 2 and power y 3 , and obtain parameter data yn after normalization of the three types of original data; 其中,yn(n=1,2,3)表示对应原始数据ym(m=1,2,3)的归一化数据(-1<yn<1);ym,min和ym,max分别是三类对应原始数据的下边界和上边界;Wherein, yn (n=1, 2, 3) represents the normalized data (-1< yn <1) corresponding to the original data ym (m=1, 2, 3); ym,min and ym,max are the lower and upper boundaries of the three categories of corresponding original data respectively; 将归一化后的每类数据,随机的分为两个组为训练数据和测试数据;After normalization, each type of data is randomly divided into two groups: training data and test data; 步骤2:对BP神经网络初始化参数,参数定义为权重和偏置所构成的向量:Step 2: Initialize the parameters of the BP neural network. The parameters are defined as a vector consisting of weights and biases: xi=lbi+rand×(ubi-lbi);rand∈[0,1]x i =lb i +rand×(ub i -lb i ); rand∈[0, 1] 其中,ubi为参数的上边界,lbi为参数的下边界;rand是[0,1]内的随机值,i表示第i个参数;Where ub i is the upper boundary of the parameter, lb i is the lower boundary of the parameter; rand is a random value in [0, 1], and i represents the i-th parameter; 将三类训练数据输入BP神经网络,BP神经网络输出与参数对应的功率值;The three types of training data are input into the BP neural network, and the BP neural network outputs the power value corresponding to the parameter; 步骤3:对所有参数下的功率值进行评估:Step 3: Evaluate the power values under all parameters: 最小均方误差为最佳参数值即对应权重和偏置所构成的向量保存到TposThe minimum mean square error is the optimal parameter value, that is, the vector consisting of the corresponding weight and bias is saved in T pos ; 步骤4:计算强度I即参数集中度:Step 4: Calculate the intensity I, i.e. the parameter concentration: 其中:取值为2,Ii表示参数集中度,di表示参数与其他参数之间差的距离;Among them: the value is 2, I i represents the parameter concentration, and d i represents the distance between the parameter and other parameters; 更新递减因子α: Update the decrement factor α: 其中:t表示当前迭代次数,C为常数,tmax为最大迭代次数;Where: t represents the current number of iterations, C is a constant, and t max is the maximum number of iterations; 步骤5:更新参数xnew,返回步骤3;Step 5: Update the parameter x new and return to step 3; 所述参数xnew的计算为:The parameter x new is calculated as: 当R<0.5时:When R<0.5: xnew=xprey+βIFxprey+r1αdiF|cos(2πr2)×[1-cos(2πr3)]|x new =x prey +βIFx prey +r 1 αd i F|cos(2πr 2 )×[1-cos(2πr 3 )]| 当R≥0.5时:When R ≥ 0.5: xnew=xprey+βIFxprey+r4αdiFx new =x prey +βIFx prey +r 4 αd i F 其中,xnew表示新的参数,求解最佳参数的能力定义为β≥1,R、r1、r2、r3和r4是介于0和1之间的独立随机数,xprey表示当前最好的参数;Where x new represents the new parameters, the ability to solve the best parameters is defined as β ≥ 1, R, r 1 , r 2 , r 3 and r 4 are independent random numbers between 0 and 1, and x prey represents the current best parameters; 所述F用于改变参数值更新的方向:The F is used to change the direction of parameter value update: 步骤6:对Tpos内的权重和偏置进行训练:Step 6: Train the weights and biases in Tpos : 其中,Tpos表示最佳的那一组权重和偏置,Wt+1表示(t+1)次训练的权重,所定义的学习率lr也称为步长;Loss是训练中期望与预测值差异的度量,Wt表示t次训练的权重;Where T pos represents the best set of weights and biases, W t+1 represents the weight of (t+1) training times, and the defined learning rate lr is also called the step size; Loss is a measure of the difference between the expected and predicted values in training, and W t represents the weight of t training times; 步骤7:将以上训练得到的权重和偏置带入下式,输出预测值YpStep 7: Substitute the weights and biases obtained from the above training into the following formula and output the predicted value Y p : 其中,wij和bj是输入层到隐含层节点的权重和偏置参数;wjk和bk表示从隐藏层节点到输出层节点的权重和偏置,Yp表示预测值,即,预测的功率;是隐含层中节点的激活函数,为输出层节点的激活函数,m为输出层节点数,n是输入层的节点数,i是输入层的网络节点,j是隐藏层的网络节点,k是输出层的网络节点。Among them, w ij and b j are the weights and bias parameters from the input layer to the hidden layer nodes; w jk and b k represent the weights and biases from the hidden layer nodes to the output layer nodes, and Yp represents the predicted value, that is, the predicted power; is the activation function of the nodes in the hidden layer, is the activation function of the output layer nodes, m is the number of output layer nodes, n is the number of input layer nodes, i is the network node of the input layer, j is the network node of the hidden layer, and k is the network node of the output layer. 2.根据权利要求1所述基于神经网络和蜜罐优化的光伏功率预测方法,其特征在于:所述两个组数据中训练数据为80%,测试数据为20%。2. The photovoltaic power prediction method based on neural network and honeypot optimization according to claim 1 is characterized in that: the training data accounts for 80% and the test data accounts for 20% of the two groups of data. 3.根据权利要求1所述基于神经网络和蜜罐优化的光伏功率预测方法,其特征在于:所述常数C取值为2。3. According to the photovoltaic power prediction method based on neural network and honeypot optimization in claim 1, it is characterized in that the constant C is 2. 4.根据权利要求1所述基于神经网络和蜜罐优化的光伏功率预测方法,其特征在于:4. The photovoltaic power prediction method based on neural network and honeypot optimization according to claim 1 is characterized in that: 所述β默认=6。The default value of β=6.
CN202211645456.4A 2022-12-16 2022-12-16 Photovoltaic power prediction method based on neural network and honeypot optimization Active CN116451824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211645456.4A CN116451824B (en) 2022-12-16 2022-12-16 Photovoltaic power prediction method based on neural network and honeypot optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211645456.4A CN116451824B (en) 2022-12-16 2022-12-16 Photovoltaic power prediction method based on neural network and honeypot optimization

Publications (2)

Publication Number Publication Date
CN116451824A CN116451824A (en) 2023-07-18
CN116451824B true CN116451824B (en) 2024-08-20

Family

ID=87134425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211645456.4A Active CN116451824B (en) 2022-12-16 2022-12-16 Photovoltaic power prediction method based on neural network and honeypot optimization

Country Status (1)

Country Link
CN (1) CN116451824B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149883A (en) * 2020-09-07 2020-12-29 南京邮电大学 Photovoltaic power prediction method based on FWA-BP neural network
CN113469426A (en) * 2021-06-23 2021-10-01 国网山东省电力公司东营供电公司 Photovoltaic output power prediction method and system based on improved BP neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3543917B1 (en) * 2018-03-19 2024-01-03 SRI International Inc. Dynamic adaptation of deep neural networks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149883A (en) * 2020-09-07 2020-12-29 南京邮电大学 Photovoltaic power prediction method based on FWA-BP neural network
CN113469426A (en) * 2021-06-23 2021-10-01 国网山东省电力公司东营供电公司 Photovoltaic output power prediction method and system based on improved BP neural network

Also Published As

Publication number Publication date
CN116451824A (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN104636801B (en) A kind of prediction transmission line of electricity audible noise method based on Optimized BP Neural Network
CN102567636B (en) High-precision wind electric field power interval forecasting method based on relevance vector machine
CN111563611A (en) Cloud data center renewable energy space-time prediction method for orientation graph convolutional network
CN103218674A (en) Method for predicating output power of photovoltaic power generation system based on BP (Back Propagation) neural network model
CN112330487B (en) A short-term power prediction method for photovoltaic power generation
CN104484833A (en) Photovoltaic power generation output power tracking algorithm based on genetics algorithm improved RBF-BP neural network
CN108280545A (en) A kind of photovoltaic power prediction technique based on K mean cluster neural network
CN109948845A (en) A Long-Short-Term Memory Neural Network Prediction Method for Distribution Network Load
CN116894384B (en) A method and system for spatiotemporal prediction of wind speed of multiple wind turbines
CN108694484A (en) A kind of photovoltaic power generation power prediction method
Chen et al. Research on short-term load forecasting of new-type power system based on GCN-LSTM considering multiple influencing factors
CN106779177A (en) Multiresolution wavelet neutral net electricity demand forecasting method based on particle group optimizing
CN115275991A (en) Active power distribution network operation situation prediction method based on IEMD-TA-LSTM model
CN117973644B (en) A distributed photovoltaic power virtual collection method considering reference power station optimization
CN110264012A (en) Renewable energy power combination prediction technique and system based on empirical mode decomposition
CN108876013A (en) One kind being based on best similar day and Elman neural fusion photovoltaic plant short term power prediction technique
CN117132132A (en) Photovoltaic power generation power prediction method based on meteorological data
CN107871157B (en) Data prediction method, system and related device based on BP and PSO
He et al. Short-term power load forecasting based on self-adapting PSO-BP neural network model
CN116451824B (en) Photovoltaic power prediction method based on neural network and honeypot optimization
Xu et al. Short-term electricity consumption forecasting method for residential users based on cluster classification and backpropagation neural network
CN104361399A (en) Solar irradiation intensity minute-scale predication method
CN110807508A (en) Prediction method of bus peak load taking into account the influence of complex weather
CN116579479B (en) Wind farm power ultra-short-term prediction method, system, computer and storage medium
CN117520900A (en) Multi-factor precipitation level prediction method based on DQN_Multi-BiGRU and multi-head ProbSparse self-attention

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
GR01 Patent grant
GR01 Patent grant