Disclosure of Invention
In order to solve the problem that the power distribution network with the real-time measurement information loss cannot be subjected to reactive power optimization by using the traditional optimization method, the invention provides a data-driven reactive power optimization method considering the real-time measurement information loss of the power distribution network, so that the reactive power optimization of the power distribution network under the condition of the real-time measurement information loss is realized. To achieve this object: the invention provides a data-driven reactive power optimization method considering the loss of real-time measurement information of a power distribution network, which comprises two stages of neural network training set construction before optimization, neural network training and application of a neural network during optimization, and comprises the following steps:
1) before actual optimization, collecting historical load data of a distribution network marketing system;
2) then, carrying out data preprocessing by using the data acquired in the step 1) to obtain a historical load database;
3) then, generating a corresponding time reactive power optimization strategy library by using an optimization algorithm aiming at historical load data;
4) then, taking historical load data of nodes capable of being measured in real time as a neural network input training set, and taking a reactive power optimization strategy at a corresponding moment as a neural network output training set to train the neural network;
5) when an optimization cycle begins, load information of nodes capable of being measured in real time is used as input of the neural network trained in the step 4), and output of the neural network is a reactive power optimization strategy at the current moment.
As a further improvement of the invention, in the step 1), the number of nodes of the power distribution network which can be measured in real time is NvThe number of nodes which cannot be measured in real time is NivAnd the total number of nodes of the power distribution network is N. The available distribution network marketing system can measure the historical active load data of the nodes in real time to be Pv=[P1,P2,…PNv]Historical reactive load data is Qv=[Q1,Q2,…QNv]. Historical active load data of nodes which cannot be measured in real time by the distribution network marketing system is Piv=[P1,P2,…PNiv]Historical reactive load data is Qiv=[Q1,Q2,…QNiv]. Then the total historical active load data PN=Pv∪PivHistorical reactive load data QN=Qv∪Qiv。
As a further improvement of the invention, the marketing system historical load data [ PN, QN ] acquired in the step 1) is utilized in the step 2) for preprocessing, so that the data quality is improved.
As a further improvement of the invention, the data preprocessing in the step 2) adopts the following method:
if PNTwo data P inml,nAnd Pmr,nData P with k deletions in betweenml+i,n(i ═ 1,2, 3 … k), the following equation is used:
Pml+i,n=Pml,n+(Pmr,n-Pml,n)/(k+1)×i(i=1,2,3...k)
if QNTwo data Q in (1)ml,nAnd Qmr,nData Q with k misses in betweenml+i,n(i ═ 1,2, 3 … k), the following equation is used:
Qml+i,n=Qml,n+(Qmr,n-Qml,n)/(k+1)×i(i=1,2,3...k)。
as a further improvement of the invention, in the step 3), by using the historical load data obtained in the step 2) and the topology of the power distribution network, a reactive power optimization strategy corresponding to the historical moment is obtained through a particle swarm algorithm;
the fitness function of the particle swarm is:
the constraint conditions are as follows:
the particle group velocity and position update formula is:
Vid=ωVid+C1random(0,1)(Pid-Xid)+C2random(0,1)(Pgd-Xid)
Xid=Xid+Vid
wherein VidDenotes the particle velocity, XidIndicating the position of the particle, PgdRepresenting the global optimum fitness, PidThe fitness of the particle is the fitness of the particle.
As a further improvement of the invention, the reactive power optimization strategy comprises but not only comprises the on-load tap changer gear TtapThe number of capacitor groups NcbPhotovoltaic reactive power output value QdgThese reactive power optimization strategies together form a strategy set S.
As a further improvement of the invention, the input part of the neural network training set in the step 4) is [ P ] obtained in the step 2)v,Qv]The output part is the strategy set S obtained in the step 3), and a reactive power optimization model for measuring the power distribution network with information missing in real time is obtained finally through training;
and (3) training by using a BP neural network, wherein the training process of the BP neural network comprises the following steps:
4.1) setting a learning rate and initializing each neuron weight w and a threshold, wherein the activation function f is a sigmoid function. Wherein, the weight between the ith neuron of the input layer and the h-th neuron of the hidden layer is v
ihThe weight between the h-th neuron of the hidden layer and the j-th neuron of the output layer is w
hj. Output layer jth neuron has a threshold value of
jThe h-th neuron of the hidden layer has a threshold value of
h. The h-th neuron in the hidden layer receives the input with the sum of
The j-th neuron of the output layer receives the input sum of
b
hThe output of the h neuron of the hidden layer;
4.2) training samples (x)
k,y
k) Computing the output of the neural network at that time
And the mean square error, and the specific calculation formula is as follows:
4.3) updating neural network related parameters v (including w)hj、θj、vih、γh) The formula used is: v ═ v + Δ v 4.4) the specific calculation formula is:
Δwhj=ηgjbh
Δθj=-ηgj
Δvih=ηehxi
Δγh=-ηeh
4.5) judging whether a convergence condition is reached, if not, returning to the step 3), and if so, indicating that the training is finished.
As a further improvement of the present invention, in the step 5), the collectable real-time measurement load information is used as an input of the neural network reactive power optimization model obtained by training in the step 4), and an output is a reactive power optimization strategy at the current optimization time.
Compared with the prior art, the invention has the beneficial effects that:
(1) information in the historical load data of the power distribution network is fully mined and utilized, and a big data and artificial intelligence method is used, so that a reactive power optimization strategy is more accurate and effective;
(2) the reactive power characteristic of photovoltaic is actively utilized, so that the flexibility of the reactive power optimization method of the power distribution network is improved;
(3) the constructed neural network has short operation time when being used after being trained, and meets the requirement of online application.
Detailed Description
The invention is described in further detail below with reference to the following detailed description and accompanying drawings:
the data-driven reactive power optimization method for considering the loss of the real-time measurement information of the power distribution network realizes reactive power optimization of the power distribution network when the real-time measurement information is lost, can meet the requirements of actual engineering, fully excavates the potential of historical data in the power distribution network, and provides a new approach for reactive power optimization of the power distribution network with the loss of the real-time measurement information at the present stage.
Example 1:
the following describes the embodiments of the present invention with reference to the accompanying drawings.
The embodiment provides a data-driven reactive power optimization method considering loss of real-time measurement information of a power distribution network, which can perform reactive power optimization on the power distribution network with load information nodes which cannot be acquired in real time at different moments, so as to achieve the purpose of minimizing network loss of the power distribution network.
As shown in fig. 1, the method comprises the following steps:
s1: an off-line training stage;
s2: and (5) an online optimization stage.
Wherein S1 comprises the steps of:
s1.1: collecting historical load data of a distribution network marketing system;
s1.2: carrying out data preprocessing by using the data acquired in the step S1.1 to obtain a historical load database;
s1.3: generating a corresponding time reactive power optimization strategy library by using an optimization algorithm aiming at historical load data;
s1.4: taking historical load data of nodes capable of being measured in real time as a neural network input training set, and taking a reactive power optimization strategy at a corresponding moment as a neural network output training set to be trained to obtain a neural network reactive power optimization module;
specifically, in step S1.1, the active historical load data P of each node may be obtainedNAnd reactive historical load data QN。
When the data in step S1.1 is processed in step S1.2, the data loss due to the sampling problem of the load data is mainly considered. If PNTwo data P inml,nAnd Pmr,nData P with k deletions in betweenml+i,n(i ═ 1,2, 3 … k), the data P is complemented as followsml+i,n(i=1,2,3…k):
Pml+i,n=Pml,n+(Pmr,n-Pml,n)/(k+1)×i(i=1,2,3...k)
For QNThe method described above may also be used for missing data.
The generation of the reactive power optimization strategy library in the step S1.3 mainly comprises the following steps:
s1.3.1, constructing a power distribution network structure model, wherein the specific method comprises the following steps:
acquiring the number N of nodes of the power distribution network, a node admittance matrix G and historical load data P of a node ii+jQi。
S1.3.2, establishing a reactive power optimization objective function and constraint conditions, specifically:
the objective function is:
in the formula PijRepresenting power flowing from node i to node j
The constraint conditions are as follows:
and
U irespectively representing the upper limit and the lower limit allowed by the voltage of the node i;
and
Q DGirespectively representing the upper limit and the lower limit of the DG reactive power output connected to the node i;
and
Q SVCirepresenting the upper and lower output limits of the static var compensator at the node i;
and
C irepresenting the upper and lower limits of the number of capacitor banks put into node i, respectively.
S1.3.3, solving a reactive power optimization strategy S under the conditions of S1.3.1 and S1.3.2 by using a particle swarm optimization:
s1.3.3.1 setting iteration times maxgen, the number sizepop of particles in the population, the particle velocity updating parameter c1c2 and the inertia weight wmax,wmin(ii) a Upper and lower bounds of constraint conditions, and upper and lower limits of particle velocity.
S1.3.3.2 the position and speed of the population particles are initialized and generated by random numbers.
S1.3.3.3 the fitness and particle position of the best particle in the population at that time, the particle velocity, and the fitness and position of the best particle in all cycles are obtained.
The fitness function of the particle swarm is the network loss:
s1.3.3.4, judging whether the difference between the fitness of the particle and the fitness of the optimal particle in all the cycles is less than the specified convergence value.
S1.3.3.5 if the convergence condition is satisfied then the loop is ended and if not, it is continued.
S1.3.3.6 updating the particle velocity and calculating the new position and fitness of each particle in the population, the particle velocity and position are updated using the following formula:
Vid=ωVid+C1random(0,1)(Pid-Xid)+C2random(0,1)(Pgd-Xid)
Xid=Xid+Vid
wherein VidDenotes the particle velocity, XidIndicating the position of the particle, PgdRepresenting the global optimum fitness, PidThe fitness of the particle is the fitness of the particle.
Go back to S1.3.3.3
The reactive power optimization strategy corresponding to each time point can be calculated through the method.
Step S1.4: the training to obtain the neural network reactive power optimization module mainly comprises the following steps:
preferably, the training is performed using a BP neural network.
Preferably, the reactive power optimization time is selected as each hour time.
P from step S1.2N、QNExtracting a real-time measurable load value P at an integral point moment iiv=[Pi1,Pi2,…PiNv]And Qiv=[Qi1,Qi2,…QiNv]Then x is ═ Pv,Qv]As an input part of a neural network training set, where PiNvAnd QiNvAnd the data of the active load and the reactive load of each node of the power distribution network at the integral point time i in history are shown.
Extracting from S1.3iNvAnd QiNvCorresponding y ═ SiAs part of the output of the neural network training set. Thus, a training set D { (x) is formed1,y1),(x2,y2),…(xm,ym)}xi∈R2Nv,yi∈RlWhile x is ═ x1,x2…,xm]y=[y1,y2…,ym]
In this embodiment, Nv is set to 20, m is set to 1000, l is set to 8, that is, there are 1000 samples, the number of neural network input neurons is 40, and the number of neural network output neurons is 8, which respectively represent the OLTC position, the reactive power output of 4 photovoltaics, the input number of 2 capacitor banks, and the reactive power output of 1 SVC. And the neural network hidden layer is set to layer 1.
And then training the neural network by using an error inverse propagation algorithm until the training reaches a convergence condition to obtain a neural network reactive power optimization module which can be used for carrying out reactive power optimization on the i moment, wherein the specific training process is as follows:
s1.4.1: setting learning rate and initializing each neuron weight w and a threshold theta, wherein an activation function f is a sigmoid function. Wherein, the weight between the ith neuron of the input layer and the h-th neuron of the hidden layer is v
ihThe weight between the h-th neuron of the hidden layer and the j-th neuron of the output layer is w
hj. The threshold value of the jth neuron of the output layer is theta
jThe threshold of the h-th neuron of the hidden layer is gamma
h. Implicit toThe h-th neuron of the layer receives the input sum of
The j-th neuron of the output layer receives the input sum of
b
hThe output of the h-th neuron of the hidden layer.
S1.4.2 training sample (x)
k,y
k) Computing the output of the neural network at that time
And the mean square error, and the specific calculation formula is as follows:
s1.4.3 updating neural network related parameters v (including w)hj、j、vih、h) The formula used is: v + Δ v
The specific calculation formula is as follows:
Δwhj=ηgjbh
Δθj=-ηgj
Δvih=ηehxi
Δγh=-ηeh
s1.4.4, judging whether the convergence condition is reached, if not, returning to step S1.4.3, if so, indicating that the training is finished, and obtaining the reactive power optimization module suitable for the integral point time i.
S1.4.5 the reactive power optimization module suitable for the integral time i epsilon [1,2, … 24] is obtained by the method described above.
S1.2: when the actual reactive power optimization is carried out, the active and reactive loads [ P ] of the measurable nodes are collectedv,Qv]As an input of the neural network, an output is a corresponding reactive power optimization strategy S, and a method for matching a specific reactive power optimization module with the power distribution network is shown in fig. 3.
In order to verify the effectiveness of the method, a classic IEEE33 node is modified, photovoltaic power generation and capacitors and SVC are added, and a new power distribution network is formed, as shown in figure 2. Wherein, the nodes which can collect the load data in real time are represented by solid lines, and the nodes which can not collect the load data in real time are represented by dotted lines. The photovoltaic nodes which can be used for participating in reactive power optimization are connected by solid lines, and the photovoltaic nodes which do not participate in reactive power optimization are connected by dotted lines, so that 20 real-time-acquirable load data nodes and 13 non-real-time-acquirable load data nodes are known. The capacity of 8 photovoltaic cells is 100kW, the SVC capacity is 50kVar, the capacity of each capacitor is 25kVar, the gear of a transformer splitting head is +/-8 gears, and the voltage adjustable range is 0.9-1.1. The equipment available for reactive power optimization in the system includes four observable photovoltaics, capacitor banks and an SVC. The inverter is used for controlling the photovoltaic to emit or absorb reactive power, so that the photovoltaic power factor is in the range of-0.9 to 0.9. Where the load and photovoltaic data are derived from some actual data.
After the training of the neural network is finished, 200 groups of data are taken as a test set of the neural network for testing, and errors between the output results of the neural network and the test samples shown in tables 1 and 2 can be obtained.
TABLE 1 relative error of neural network outputs
TABLE 2 absolute error of neural network output
Therefore, the reactive power optimization strategy output by the neural network is not greatly different from the reactive power optimization strategy obtained by particle swarm calculation, and the effect of the reactive power optimization strategy output by the neural network can be effectively ensured.
As can be seen from fig. 4 and 5, compared with the conventional method, the optimization effect of the method is very small and is obviously better than that of the method without optimization. However, it should be noted that the premise of the traditional particle swarm method is that the load of each node of the power distribution network can be measured in real time, so the method is an effective method under the background of the loss of real-time measurement information of the power distribution network.
Has the advantages that: the method provided by the invention can realize the reactive power optimization of the power distribution network under the condition that the load data of partial nodes of the power distribution network cannot be measured in real time. The method is convenient to implement, high in accuracy and high in operation speed, and can be effectively applied to actual engineering.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, but any modifications or equivalent variations made according to the technical spirit of the present invention are within the scope of the present invention as claimed.