CN113486601A - Feeder voltage calculation method and device based on CPSO-BP optimization model - Google Patents

Feeder voltage calculation method and device based on CPSO-BP optimization model Download PDF

Info

Publication number
CN113486601A
CN113486601A CN202111045558.8A CN202111045558A CN113486601A CN 113486601 A CN113486601 A CN 113486601A CN 202111045558 A CN202111045558 A CN 202111045558A CN 113486601 A CN113486601 A CN 113486601A
Authority
CN
China
Prior art keywords
cpso
neural network
particles
optimal
particle
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.)
Granted
Application number
CN202111045558.8A
Other languages
Chinese (zh)
Other versions
CN113486601B (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.)
Wuhan Energy Efficiency Evaluation Co Ltd Of State Grid Electric Power Research Institute
State Grid Corp of China SGCC
Electric Power Research Institute of State Grid Jiangxi Electric Power Co Ltd
State Grid Electric Power Research Institute
Original Assignee
Wuhan Energy Efficiency Evaluation Co Ltd Of State Grid Electric Power Research Institute
State Grid Corp of China SGCC
Electric Power Research Institute of State Grid Jiangxi Electric Power Co Ltd
State Grid Electric Power Research Institute
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 Wuhan Energy Efficiency Evaluation Co Ltd Of State Grid Electric Power Research Institute, State Grid Corp of China SGCC, Electric Power Research Institute of State Grid Jiangxi Electric Power Co Ltd, State Grid Electric Power Research Institute filed Critical Wuhan Energy Efficiency Evaluation Co Ltd Of State Grid Electric Power Research Institute
Priority to CN202111045558.8A priority Critical patent/CN113486601B/en
Publication of CN113486601A publication Critical patent/CN113486601A/en
Application granted granted Critical
Publication of CN113486601B publication Critical patent/CN113486601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • 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/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • 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)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Power Engineering (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention discloses a feeder voltage calculation method and a feeder voltage calculation device based on a CPSO-BP optimization model, wherein the method comprises the following steps: step 1, determining the number of neurons of each layer of a neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line; step 2, optimizing the initial weight and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model; and 3, responding to the acquired operation data of the power distribution network, and calculating the feeder line voltage of the power distribution network based on the CPSO-BP optimization model. The traditional BP neural network is optimized by adopting a two-stage improved particle swarm algorithm, the calculation precision of the rural power distribution network feeder voltage can be improved, so that whether the rural power distribution network feeder voltage is out of limit or not is accurately judged, the operation safety factor of a power grid and the economic benefit of the power grid are improved, the risk of the rural power distribution network with the joint access of a multi-energy-supply system in operation can be quickly adjusted, and the defects of the rural power distribution network are accurately analyzed.

Description

Feeder voltage calculation method and device based on CPSO-BP optimization model
Technical Field
The invention belongs to the technical field of feeder voltage calculation, and particularly relates to a feeder voltage calculation method and device based on a CPSO-BP optimization model.
Background
With the promotion of the national and rural joyful strategy, the demand for cold, heat, electricity and other energy sources is rapidly increased, but with the large-scale development of a large amount of distributed energy sources such as photovoltaic, small hydropower and geothermal resources in rural areas and the large-scale access of a power grid, the problems of low development and utilization rate of clean energy, insufficient local absorption capacity, power reversal caused by the large-scale access of various distributed power supplies, over-limit of feeder voltage of a rural power distribution network and the like gradually emerge. In order to solve the problem of voltage line crossing of the rural power distribution network, one method is to calculate a feeder voltage value and judge whether the feeder voltage crosses the line or not so as to take a corresponding operation strategy in advance and avoid the risk of voltage line crossing of the feeder of the power distribution network.
The feeder voltage calculation of the distribution network is generally divided into two methods, the first method needs to measure the line current and the line resistance according to a voltage calculation formula; the second method requires measuring the power and line resistance of each line node, but both methods are not easy to calculate because line resistance is generally difficult to obtain.
Therefore, a feeder voltage calculation method based on a CPSO-BP optimization model is urgently needed to calculate feeder voltages of rural power distribution networks with various distributed power supply accesses and complex structures.
Disclosure of Invention
The invention provides a feeder voltage calculation method based on a CPSO-BP optimization model, which is used for solving at least one of the technical problems.
In a first aspect, the present invention provides a feeder voltage calculation method based on a CPSO-BP optimization model, including: step 1, determining the number of neurons of each layer of a neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line; step 2, optimizing the initial weight and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model, wherein the specific steps of optimizing the initial weight and the initial threshold value of the BP neural network model are as follows: step 2.1: determining a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters; step 2.2: setting particle swarm parameters and randomly generating particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm within a preset range, inputting the inertia weight and the nonlinear inertia weight of the particle swarm, initializing the state of the particle swarm, and randomly generating an initial population; step 2.3: calculating a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population; step 2.4: searching the position of the chaotic optimal particle: searching for the obtained optimal particles by using a chaotic formula chaotic particle swarm optimization algorithm; step 2.5: updating the particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds; step 2.6: judging whether the optimizing condition is reached: if the particle swarm algorithm iterates to the optimal position, an optimal value is output, the optimal value is transmitted to the BP neural network model, and if not, the step 2.3 is returned to continue to carry out iterative calculation of the chaotic particle swarm algorithm; and 3, responding to the acquired operation data of the power distribution network, and calculating the feeder line voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder line voltage of the power distribution network.
In a second aspect, the present invention provides a feeder voltage calculation apparatus based on a CPSO-BP optimization model, including: the establishing module is configured to determine the number of neurons of each layer of the neural network and a neural network training function, and establish a BP neural network model for calculating the voltage of the feeder line; an optimization module configured to optimize the initial weight and the initial threshold of the BP neural network model, so as to construct a CPSO-BP optimization model, wherein the optimization module includes: a first setting unit configured to determine a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters; a second setting unit configured to set the particle swarm parameters and randomly generate a particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm within a preset range, inputting the inertia weight and the nonlinear inertia weight of the particle swarm, initializing the state of the particle swarm, and randomly generating an initial population; a calculation unit configured to calculate a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population; a search unit configured to search for a position of the chaotic optimal particle: searching for the obtained optimal particles by using a chaotic formula chaotic particle swarm optimization algorithm; an update unit configured to update a particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds; a judging unit configured to judge whether the optimizing condition is reached: if the particle swarm algorithm iterates to the optimal position, outputting an optimal value, transmitting the optimal value to the BP neural network model, and otherwise, continuously performing iterative computation of the chaotic particle swarm algorithm; and the calculating module is configured to respond to the acquired operation data of the power distribution network and calculate the feeder line voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder line voltage of the power distribution network.
In a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the CPSO-BP optimization model-based feeder voltage calculation method of any embodiment of the present invention.
In a fourth aspect, the present invention also provides a computer-readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the steps of the CPSO-BP optimization model-based feeder voltage calculation method of any of the embodiments of the present invention.
According to the feeder voltage calculation method and device based on the CPSO-BP optimization model, the traditional BP neural network is optimized by adopting a two-stage improved particle swarm algorithm, the calculation precision of the feeder voltage of the rural power distribution network can be improved, so that whether the feeder voltage of the rural power distribution network is out of limit or not is accurately judged, and the operation safety factor of a power grid and the economic benefit of the power grid are further improved. By quickly and accurately calculating the theoretical feeder voltage, the risk of the rural power distribution network which is jointly accessed by the multi-energy-supply system during operation can be quickly adjusted, the defects of the rural power distribution network can be accurately analyzed, whether the operation of the power grid is economic or not and whether the operation of the power grid is safe and stable or not can be judged, effective measures for regulating and controlling the voltage can be found, and the safety and the economical efficiency of the operation of the power grid can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a feeder voltage calculation method based on a CPSO-BP optimization model according to an embodiment of the present invention;
FIG. 2 is a comparison graph of voltage prediction results of a BP neural network model, an IPSO-BP optimization model and a CPSO-BP optimization model provided in an embodiment of the present invention;
FIG. 3 is a fitting graph of voltage prediction results based on a BP neural network model according to an embodiment of the present invention;
FIG. 4 is a voltage prediction result fitting graph based on the IPSO-BP optimization model according to an embodiment of the present invention;
FIG. 5 is a fitting graph of voltage prediction results based on the CPSO-BP optimization model according to an embodiment of the present invention;
fig. 6 is a block diagram of a feeder voltage calculating apparatus based on a CPSO-BP optimization model according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a feeder voltage calculation method based on a CPSO-BP optimization model according to the present application is shown.
As shown in fig. 1, the feeder voltage calculation method based on the CPSO-BP optimization model includes:
step 1, determining the number of neurons of each layer of a neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line.
In this embodiment, in the process of designing the BP neural network model, the initial weight, the activation function, the number of neurons in each layer, the number of hidden layer layers of the network, the number of nodes in the input and output layers, and the like should be fully considered.
(1) Determination of the activation function: the Sigmoid function is selected as the activation function for the output node.
(2) Determination of the number of hidden layers: a means of increasing neuron size is employed. The following equation is a relationship between the number of input layer neurons and the number of hidden layer neurons:
Figure 398535DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 882606DEST_PATH_IMAGE002
in order to imply the number of layer neurons,
Figure 7557DEST_PATH_IMAGE003
and
Figure 944289DEST_PATH_IMAGE004
the number of input layer neurons and the number of output layer neurons,
Figure 586623DEST_PATH_IMAGE005
typically taking a constant between 1 and 10.
(3) Initializing weight and threshold: generally, random numbers between [ -1, 1 ] are taken for initialization weight and threshold, the initialization weight and the threshold are realized by an init function in MATLAB, and the initialization weight and the threshold are automatically called when a BP neural network is established.
(4) Selection of the training function: the trainlm function is selected as the training function.
And 2, optimizing the initial weight value and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model.
In this embodiment, the specific steps of optimizing the initial weight and the initial threshold value of the BP neural network model are as follows:
determining a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters;
setting particle swarm parameters and randomly generating particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm in a preset range, inputting a particle swarm inertial weight and a nonlinear inertial weight, initializing a particle swarm state, and randomly generating an initial swarm, wherein the calculation expression of the nonlinear inertial weight is as follows:
Figure 659621DEST_PATH_IMAGE006
in the formula (I), wherein,
Figure 955474DEST_PATH_IMAGE007
is the maximum weight of the weight to be given,
Figure 520447DEST_PATH_IMAGE008
in order to be the minimum weight, the weight is,
Figure 294368DEST_PATH_IMAGE009
for the current number of iterations,
Figure 773539DEST_PATH_IMAGE010
is the maximum iteration number;
calculating a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population;
searching the position of the chaotic optimal particle: searching for the obtained optimal particles by utilizing a chaotic formula chaotic particle swarm optimization algorithm, wherein the chaotic formula is as follows:
Figure 381238DEST_PATH_IMAGE011
Figure 292562DEST_PATH_IMAGE012
Figure 870174DEST_PATH_IMAGE013
wherein the content of the first and second substances,
Figure 183344DEST_PATH_IMAGE014
Figure 961944DEST_PATH_IMAGE015
are respectively the first
Figure 360564DEST_PATH_IMAGE016
Maximum position and number of optimal particle at sub-iteration
Figure 741867DEST_PATH_IMAGE016
The minimum position of the optimal particle at the time of the sub-iteration,
Figure 784909DEST_PATH_IMAGE017
is as followskThe mapped value of the sub-iteration optimal particle,
Figure 859044DEST_PATH_IMAGE018
is as follows
Figure 479382DEST_PATH_IMAGE019
The mapped value of the sub-iteration optimal particle,
Figure 539742DEST_PATH_IMAGE020
is as follows
Figure 564854DEST_PATH_IMAGE016
The position of the optimal particle at the time of the sub-iteration,
Figure 544311DEST_PATH_IMAGE021
is a mapping value of the current solution which is better than the original solution after chaos,
Figure 58469DEST_PATH_IMAGE022
is the range of positions of the particles,
Figure 781574DEST_PATH_IMAGE023
in order to control the parameters of the device,
Figure 658264DEST_PATH_IMAGE024
is a new solution;
updating the particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds;
judging whether the optimizing condition is reached: and if the particle swarm algorithm iterates to the optimal position, outputting an optimal value, transmitting the optimal value to the BP neural network model, and otherwise, returning to the step 2.3 to continue the iterative computation of the chaotic particle swarm algorithm.
And 3, responding to the acquired operation data of the power distribution network, and calculating the feeder line voltage of the power distribution network based on the CPSO-BP optimization model.
In the embodiment, after the operation data of the power distribution network is obtained, the operation data is based on the normalization functionPreprocessing the running data, wherein the expression of the normalization function is as follows:
Figure 74201DEST_PATH_IMAGE025
in the formula (I), wherein,
Figure 810076DEST_PATH_IMAGE026
is the value of the sample data and is,
Figure 71293DEST_PATH_IMAGE027
the processed data values are normalized for the sample data,
Figure 68068DEST_PATH_IMAGE028
for the maximum value of a certain data in the operational data,
Figure 530274DEST_PATH_IMAGE029
is the minimum value of a certain data in the operation data.
Inputting active power and reactive power of a distributed controllable power source in the power distribution network after pretreatment into a CPSO-BP optimization model, and outputting the voltage of a feeder line of the power distribution network by the CPSO-BP optimization model, wherein the expression of calculating the voltage of the feeder line of the power distribution network based on the CPSO-BP optimization model is as follows:
Figure 612499DEST_PATH_IMAGE030
in the formula (I), wherein,
Figure 940057DEST_PATH_IMAGE031
for feeder line feeder voltages of distributed power access points,
Figure 666704DEST_PATH_IMAGE032
is the voltage at the head end of the feed line,
Figure 158865DEST_PATH_IMAGE033
for the voltage drop between the head end of the feeder line to the distributed power access point,
Figure 728387DEST_PATH_IMAGE034
is the active power at the head end of the feed line,
Figure 596986DEST_PATH_IMAGE035
is the reactive power of the head end of the feed line,
Figure 443719DEST_PATH_IMAGE036
Figure 372361DEST_PATH_IMAGE037
respectively, the resistance between the head end of the feeder line to the distributed power access point and the reactance between the head end of the feeder line to the distributed power access point.
In conclusion, the traditional BP neural network is optimized by adopting a nonlinear inertia weight and chaos modified two-stage improved particle swarm algorithm, so that the calculation precision of the rural power distribution network feeder voltage can be improved, whether the rural power distribution network feeder voltage is out of limit or not is accurately judged, and the operation safety factor of a power grid and the economic benefit of the power grid are improved. By quickly and accurately calculating the theoretical feeder voltage, the risk of the rural power distribution network which is jointly accessed by the multi-energy-supply system during operation can be quickly adjusted, the defects of the rural power distribution network can be accurately analyzed, whether the operation of the power grid is economic or not and whether the operation of the power grid is safe and stable or not can be judged, effective measures for regulating and controlling the voltage can be found, and the safety and the economical efficiency of the operation of the power grid can be improved.
In a comparative example, an inertia weight is added into an original particle swarm algorithm to form a standard particle swarm algorithm, then a nonlinear inertia weight formula is introduced according to the characteristics of a particle swarm, the maximum inertia weight and the minimum inertia weight are set, and the initial weight and the initial threshold value of a BP neural network model are optimized by using the particle swarm algorithm with improved weight, so that a feeder voltage calculation model, namely an IPSO-BP optimization model, of the BP neural network optimized by the particle swarm algorithm with improved weight is constructed.
And respectively calculating, analyzing and comparing the rural distribution network feeder line voltage based on a BP neural network model, an IPSO-BP optimization model and a CPSO-BP optimization model.
Specifically, for the BP neural network model, the Matlab neural network toolbox divides a data set into three parts, namely Training (Training), verification (Validation) and testing (Test), wherein the proportion of the three parts is 60%, 20% and 20% respectively. After training the BP neural network model and verifying the data set, the test data set is imported into the trained neural network model, the voltage of the feed line is obtained through calculation of the neural network, and a comparison graph of a predicted value and an actual value and a prediction result fitting graph are drawn, as shown in fig. 2 and 3.
For the IPSO-BP optimization model and the CPSO-BP optimization model, after the IPSO-BP optimization model and the CPSO-BP optimization model are trained and the data set is verified, test data are introduced into the trained IPSO-BP optimization model and the trained CPSO-BP optimization model, and a comparison graph and a prediction fitting graph of a prediction calculation result are drawn, which are respectively shown in FIG. 2, FIG. 4 and FIG. 5. By observing the result fitting graph of the BP model and the IPSO-BP and CPSO-BP models and analyzing the comparison graph of each prediction model to the voltage prediction result, the fitting value (R) of the CPSO-BP optimization model and the IPSO-BP optimization model test sample is obviously improved compared with that of the BP neural network model; the fitting value (R) of the CPSO-BP optimization model test sample is slightly improved compared with the IPSO-BP optimization model.
Therefore, the BP neural network model optimized based on the two-stage improved particle swarm optimization is verified to be improved to a certain extent in the precision of feeder line voltage calculation.
Referring to fig. 6, a block diagram of a feeder voltage calculating apparatus based on a CPSO-BP optimization model according to the present application is shown.
As shown in fig. 6, the feeder voltage calculating apparatus 200 includes a establishing module 210, an optimizing module 220, and a calculating module 230.
The establishing module 210 is configured to determine the number of neurons and a neural network training function of each layer of the neural network, and establish a BP neural network model for calculating a feeder line voltage; an optimizing module 220 configured to optimize the initial weight and the initial threshold of the BP neural network model, so as to construct a CPSO-BP optimizing model, wherein the optimizing module 220 includes: a first setting unit configured to determine a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters; a second setting unit configured to set the particle swarm parameters and randomly generate a particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm within a preset range, inputting the inertia weight and the nonlinear inertia weight of the particle swarm, initializing the state of the particle swarm, and randomly generating an initial population; a calculation unit configured to calculate a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population; a search unit configured to search for a position of the chaotic optimal particle: searching for the obtained optimal particles by using a chaotic formula chaotic particle swarm optimization algorithm; an update unit configured to update a particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds; a judging unit configured to judge whether the optimizing condition is reached: if the particle swarm algorithm iterates to the optimal position, outputting an optimal value, transmitting the optimal value to the BP neural network model, and otherwise, continuously performing iterative computation of the chaotic particle swarm algorithm; the calculating module 230 is configured to calculate, in response to obtaining operation data of the power distribution network, a feeder voltage of the power distribution network based on the CPSO-BP optimization model, where an input of the CPSO-BP optimization model is an active power and a reactive power of a distributed controllable power source in the power distribution network, and an output of the CPSO-BP optimization model is the feeder voltage of the power distribution network.
It should be understood that the modules recited in fig. 6 correspond to various steps in the method described with reference to fig. 1. Thus, the operations and features described above for the method and the corresponding technical effects are also applicable to the modules in fig. 6, and are not described again here.
In other embodiments, an embodiment of the present invention further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions may execute the CPSO-BP optimization model-based feeder voltage calculation method in any of the above method embodiments;
as one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions configured to:
determining the number of neurons of each layer of the neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line;
optimizing the initial weight value and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model;
and responding to the acquired operation data of the power distribution network, and calculating the feeder voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder voltage of the power distribution network.
The computer-readable storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of a CPSO-BP optimization model-based feeder voltage calculation device, and the like. Further, the computer-readable storage medium may include high speed random access memory, and may also include memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the computer readable storage medium optionally includes memory located remotely from the processor, and these remote memories may be connected over a network to a CPSO-BP optimization model-based feeder voltage calculation device. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, the electronic device includes: a processor 310 and a memory 320. The electronic device may further include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330, and the output device 340 may be connected by a bus or other means, as exemplified by the bus connection in fig. 7. The memory 320 is the computer-readable storage medium described above. The processor 310 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions and modules stored in the memory 320, namely, implementing the feeder voltage calculation method based on the CPSO-BP optimization model of the above method embodiments. The input device 330 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the feeder voltage calculation device based on the CPSO-BP optimization model. The output device 340 may include a display device such as a display screen.
The electronic device can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
As an embodiment, the electronic device is applied to a feeder voltage calculation apparatus based on a CPSO-BP optimization model, and is used for a client, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to:
determining the number of neurons of each layer of the neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line;
optimizing the initial weight value and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model;
and responding to the acquired operation data of the power distribution network, and calculating the feeder voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder voltage of the power distribution network.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A feeder line voltage calculation method based on a CPSO-BP optimization model is characterized by comprising the following steps:
step 1, determining the number of neurons of each layer of a neural network and a neural network training function, and establishing a BP neural network model for calculating the voltage of a feeder line;
step 2, optimizing the initial weight and the initial threshold value of the BP neural network model so as to construct a CPSO-BP optimization model, wherein the specific steps of optimizing the initial weight and the initial threshold value of the BP neural network model are as follows:
step 2.1: determining a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters;
step 2.2: setting particle swarm parameters and randomly generating particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm within a preset range, inputting the inertia weight and the nonlinear inertia weight of the particle swarm, initializing the state of the particle swarm, and randomly generating an initial population;
step 2.3: calculating a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population;
step 2.4: searching the position of the chaotic optimal particle: searching for the obtained optimal particles by using a chaotic formula chaotic particle swarm optimization algorithm;
step 2.5: updating the particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds;
step 2.6: judging whether the optimizing condition is reached: if the particle swarm algorithm iterates to the optimal position, an optimal value is output, the optimal value is transmitted to the BP neural network model, and if not, the step 2.3 is returned to continue to carry out iterative calculation of the chaotic particle swarm algorithm;
and 3, responding to the acquired operation data of the power distribution network, and calculating the feeder line voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder line voltage of the power distribution network.
2. A method as claimed in claim 1, wherein in step 2.2, the non-linear inertial weight is calculated as:
Figure 397183DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 479408DEST_PATH_IMAGE002
is the maximum weight of the weight to be given,
Figure 544316DEST_PATH_IMAGE003
in order to be the minimum weight, the weight is,
Figure 270964DEST_PATH_IMAGE004
for the current number of iterations,
Figure 28704DEST_PATH_IMAGE005
is the maximum number of iterations.
3. A feeder voltage calculation method based on a CPSO-BP optimization model according to claim 1, wherein in step 2.4, the chaos formula is as follows:
Figure 332646DEST_PATH_IMAGE006
Figure 201245DEST_PATH_IMAGE007
Figure 313558DEST_PATH_IMAGE008
wherein the content of the first and second substances,
Figure 997128DEST_PATH_IMAGE009
Figure 53946DEST_PATH_IMAGE010
are respectively the first
Figure 336023DEST_PATH_IMAGE011
Maximum position and number of optimal particle at sub-iteration
Figure 161896DEST_PATH_IMAGE011
The minimum position of the optimal particle at the time of the sub-iteration,
Figure 995860DEST_PATH_IMAGE012
is as followskThe mapped value of the sub-iteration optimal particle,
Figure 680919DEST_PATH_IMAGE013
is as follows
Figure 891321DEST_PATH_IMAGE014
The mapped value of the sub-iteration optimal particle,
Figure 837280DEST_PATH_IMAGE015
is as follows
Figure 983091DEST_PATH_IMAGE011
The position of the optimal particle at the time of the sub-iteration,
Figure 14500DEST_PATH_IMAGE016
is a mapping value of the current solution which is better than the original solution after chaos,
Figure 763014DEST_PATH_IMAGE017
is the range of positions of the particles,
Figure 704425DEST_PATH_IMAGE018
in order to control the parameters of the device,
Figure 883121DEST_PATH_IMAGE019
is a new solution.
4. A CPSO-BP optimization model-based feeder line voltage calculation method according to claim 1, wherein in step 3, after obtaining operation data of the power distribution network, the method further comprises: preprocessing the operation data based on a normalization function, wherein the expression of the normalization function is as follows:
Figure 136248DEST_PATH_IMAGE020
in the formula (I), the compound is shown in the specification,
Figure 829397DEST_PATH_IMAGE021
is the value of the sample data and is,
Figure 749949DEST_PATH_IMAGE022
the processed data values are normalized for the sample data,
Figure 237562DEST_PATH_IMAGE023
for the maximum value of a certain data in the operational data,
Figure 977985DEST_PATH_IMAGE024
is the minimum value of a certain data in the operation data.
5. The method of claim 1, wherein in step 3, the expression for calculating the feeder voltage of the distribution network based on the CPSO-BP optimization model is as follows:
Figure 333880DEST_PATH_IMAGE025
in the formula (I), the compound is shown in the specification,
Figure 984304DEST_PATH_IMAGE026
for feeder line feeder voltages of distributed power access points,
Figure 767452DEST_PATH_IMAGE027
is the voltage at the head end of the feed line,
Figure 995171DEST_PATH_IMAGE028
for the voltage drop between the head end of the feeder line to the distributed power access point,
Figure 30123DEST_PATH_IMAGE029
is the active power at the head end of the feed line,
Figure 394108DEST_PATH_IMAGE030
is the reactive power of the head end of the feed line,
Figure 489103DEST_PATH_IMAGE031
Figure 201189DEST_PATH_IMAGE032
respectively, the resistance between the head end of the feeder line to the distributed power access point and the reactance between the head end of the feeder line to the distributed power access point.
6. A feeder voltage calculation device based on a CPSO-BP optimization model is characterized by comprising:
the establishing module is configured to determine the number of neurons of each layer of the neural network and a neural network training function, and establish a BP neural network model for calculating the voltage of the feeder line;
an optimization module configured to optimize the initial weight and the initial threshold of the BP neural network model, so as to construct a CPSO-BP optimization model, wherein the optimization module includes:
a first setting unit configured to determine a neural network structure: setting the number of hidden layers of a neural network, determining an input layer and a hidden layer activation function, normalizing sample data and setting network parameters;
a second setting unit configured to set the particle swarm parameters and randomly generate a particle swarm: setting a particle swarm size parameter, a particle length parameter and a learning factor parameter, setting the position and the speed of a particle swarm within a preset range, inputting the inertia weight and the nonlinear inertia weight of the particle swarm, initializing the state of the particle swarm, and randomly generating an initial population;
a calculation unit configured to calculate a particle fitness value: taking the average relative error between the predicted value and the measured value of the feeder line voltage as a fitness function of the particles, taking the current position of the particles as the optimal fitness value pbest of the particles, comparing the optimal fitness values of all the particles, and selecting the optimal fitness value gpest of the population;
a search unit configured to search for a position of the chaotic optimal particle: searching for the obtained optimal particles by using a chaotic formula chaotic particle swarm optimization algorithm;
an update unit configured to update a particle state: updating the positions and the speeds of the particles, checking whether the states of the particles are out of bounds, taking an upper bound if the states of the particles are out of bounds, and taking a lower bound if the states of the particles are out of bounds;
a judging unit configured to judge whether the optimizing condition is reached: if the particle swarm algorithm iterates to the optimal position, outputting an optimal value, transmitting the optimal value to the BP neural network model, and otherwise, continuously performing iterative computation of the chaotic particle swarm algorithm;
and the calculating module is configured to respond to the acquired operation data of the power distribution network and calculate the feeder line voltage of the power distribution network based on the CPSO-BP optimization model, wherein the input of the CPSO-BP optimization model is the active power and the reactive power of a distributed controllable power supply in the power distribution network, and the output of the CPSO-BP optimization model is the feeder line voltage of the power distribution network.
7. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1 to 5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 5.
CN202111045558.8A 2021-09-07 2021-09-07 Feeder voltage calculation method and device based on CPSO-BP optimization model Active CN113486601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111045558.8A CN113486601B (en) 2021-09-07 2021-09-07 Feeder voltage calculation method and device based on CPSO-BP optimization model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111045558.8A CN113486601B (en) 2021-09-07 2021-09-07 Feeder voltage calculation method and device based on CPSO-BP optimization model

Publications (2)

Publication Number Publication Date
CN113486601A true CN113486601A (en) 2021-10-08
CN113486601B CN113486601B (en) 2021-12-31

Family

ID=77946502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111045558.8A Active CN113486601B (en) 2021-09-07 2021-09-07 Feeder voltage calculation method and device based on CPSO-BP optimization model

Country Status (1)

Country Link
CN (1) CN113486601B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2482417A2 (en) * 2011-01-27 2012-08-01 General Electric Company Systems, Methods, and Apparatus for Accelerating Volt/VAR Load Flow Optimization
CN104158198A (en) * 2013-05-15 2014-11-19 株式会社日立制作所 Optimization trend control apparatus and method for power distribution network
CN104200096A (en) * 2014-08-29 2014-12-10 中国南方电网有限责任公司超高压输电公司昆明局 Lightning arrester grading ring optimization method based on differential evolutionary algorithm and BP neural network
CN106920008A (en) * 2017-02-28 2017-07-04 山东大学 A kind of wind power forecasting method based on Modified particle swarm optimization BP neural network
CN107547457A (en) * 2017-09-15 2018-01-05 重庆大学 A kind of approach for blind channel equalization based on Modified particle swarm optimization BP neural network
CN108734202A (en) * 2018-04-27 2018-11-02 西安工程大学 A kind of Fault Diagnosis for HV Circuit Breakers method based on improved BP
CN111859780A (en) * 2020-06-08 2020-10-30 中国电力科学研究院有限公司 Micro-grid operation optimization method and system
US20210210957A1 (en) * 2019-11-22 2021-07-08 Battelle Memorial Institute Using distributed power electronics-based devices to improve the voltage and frequency stability of distribution systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2482417A2 (en) * 2011-01-27 2012-08-01 General Electric Company Systems, Methods, and Apparatus for Accelerating Volt/VAR Load Flow Optimization
CN104158198A (en) * 2013-05-15 2014-11-19 株式会社日立制作所 Optimization trend control apparatus and method for power distribution network
CN104200096A (en) * 2014-08-29 2014-12-10 中国南方电网有限责任公司超高压输电公司昆明局 Lightning arrester grading ring optimization method based on differential evolutionary algorithm and BP neural network
CN106920008A (en) * 2017-02-28 2017-07-04 山东大学 A kind of wind power forecasting method based on Modified particle swarm optimization BP neural network
CN107547457A (en) * 2017-09-15 2018-01-05 重庆大学 A kind of approach for blind channel equalization based on Modified particle swarm optimization BP neural network
CN108734202A (en) * 2018-04-27 2018-11-02 西安工程大学 A kind of Fault Diagnosis for HV Circuit Breakers method based on improved BP
US20210210957A1 (en) * 2019-11-22 2021-07-08 Battelle Memorial Institute Using distributed power electronics-based devices to improve the voltage and frequency stability of distribution systems
CN111859780A (en) * 2020-06-08 2020-10-30 中国电力科学研究院有限公司 Micro-grid operation optimization method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TONG ZHONG-ZHENG等: "Study on Unbalanced Power Flow In Distribution Network with Distributed Generators of Power Grid", 《IEEE》 *
公茂法等: "基于混沌优化粒子群BP神经网络的电力变压器故障诊断", 《电测与仪表》 *
夏韬等: "基于CPSO-BP算法的水下机器人神经网络辨识", 《机械与电子》 *

Also Published As

Publication number Publication date
CN113486601B (en) 2021-12-31

Similar Documents

Publication Publication Date Title
CN111416797A (en) Intrusion detection method for optimizing regularization extreme learning machine by improving longicorn herd algorithm
WO2021004318A1 (en) Resource data processing method and apparatus, computer device and storage medium
US20110173145A1 (en) Classification of a document according to a weighted search tree created by genetic algorithms
CN116450486B (en) Modeling method, device, equipment and medium for nodes in multi-element heterogeneous computing system
CN114302418A (en) Method and device for detecting network element equipment performance and computer readable medium
CN113872788A (en) Database configuration parameter adjusting method, device and storage medium
CN116245033A (en) Artificial intelligent driven power system analysis method and intelligent software platform
CN112800683A (en) System short-circuit current level evaluation method and system based on convolutional neural network
CN112784418A (en) Information processing method and device, server and user equipment
CN112784998A (en) Data processing method and device and computing equipment
CN113240217A (en) Photovoltaic power generation prediction method and device based on integrated prediction model
CN116756575B (en) Non-invasive load decomposition method based on BGAIN-DD network
CN112287605B (en) Power flow checking method based on graph convolution network acceleration
CN113486601B (en) Feeder voltage calculation method and device based on CPSO-BP optimization model
US20210150371A1 (en) Automatic multi-objective hardware optimization for processing of deep learning networks
CN113158589A (en) Simulation model calibration method and device of battery management system
CN114692859A (en) Data processing method and device, computing equipment and test simplification equipment
CN116050250A (en) Power grid digital twin model modeling method and device based on hybrid driving model
CN115207921A (en) Position optimization method and system for photovoltaic access power distribution network
CN114580534A (en) Industrial data anomaly detection method and device, electronic equipment and storage medium
CN113779871A (en) Electric heating coupling system scheduling method and device, electronic equipment and storage medium thereof
KR20220061835A (en) Apparatus and method for hardware acceleration
CN113809789A (en) Power control method, energy router, power control system and storage medium
CN111612159A (en) Feature importance measuring method, device and readable storage medium
CN110796297B (en) Electric power system structure optimization method based on balance degree variance and reliability

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