Disclosure of Invention
The invention provides a low-voltage station topology identification method based on constraint multi-objective optimization, which aims at: on the basis of not increasing hardware cost, the low-voltage station topology identification with high accuracy and high adaptability is realized by a software method.
The technical scheme of the invention is as follows:
a low-voltage area topology identification method based on constraint multi-objective optimization comprises the following steps:
s1: preprocessing electric quantity data;
s2: performing initial topology feasibility calculation to obtain a next-stage topology structure set of a total table of the station area;
s3: constructing constraint and multi-objective function models;
s4: forming an initial population according to the initial topology feasibility;
s5: and optimizing the constraint and multi-objective function model by using a genetic algorithm to obtain the topological structure of the low-voltage transformer area.
Further, the genetic algorithm in step S5 specifically includes the following steps:
s51: constructing a coding and decoding function;
s52: constructing a punishment function;
s53: constructing an fitness function, setting the iteration times to zero, and randomly selecting an individual from the current population as a history optimal individual;
s54: calculating an individual model value according to the constraint and the multi-objective function model, processing the individual model value through the punishment function, sequentially calculating the fitness of individuals in the current population according to the fitness function, taking the individual with the highest fitness as an optimal solution, and replacing the historical optimal individual with the current optimal solution if the fitness of the current optimal solution is higher than that of the historical optimal individual; judging whether the iteration times reach a preset value, if so, outputting a current optimal solution, and turning to a step S56; otherwise, individual selection is carried out to form a new population;
s55: crossing and mutating individuals in the population to generate a new population, adding one to the iteration times, and returning to the step S54;
s56: and analyzing the current optimal solution, and constructing a topological structure by using a decoding function.
Further, the penalty function in step S52 is:
0<x<1
wherein H (T) i ) As a constrained discrimination factor, f' (T i ) L' (T) is the function value processed by the punishment function i ) The model is constructed according to the electric quantity conservation relation, x is the satisfaction degree of individual constraint, and c is a penalty factor;
where n is L' (T) satisfying constraints in the individual i ) N is the number of all L' (T) in the individual i ) A is a constant.
Further, the intersecting method in step S55 is as follows:
s551-1: generating a first random number of [0,1] by each individual in the population, and if the first random number is smaller than the crossover probability P1, participating in two-by-two crossover according to steps S551-2 to S551-5 to generate a new individual;
s551-2: two individuals participating in the crossover are taken as parent individuals, and a function f' (T) corresponding to the coding information in the individuals is calculated i ) To obtain the optimal f' (T) of each of the two parent individuals i );
S551-3: creating an empty individual as a new individual, and randomly defining the number of codes of each layer in the new individual codes;
s551-4: the two parent individuals are intersected in a hierarchical mode, codes are randomly extracted from the two parent individuals and filled into new individuals, and if the extracted codes are the optimal f' (T) of the individuals i ) Corresponding to the upper node in the coded information, inserting the lower node into a new individual;
s551-5: and performing conflict detection on the new individual, if the conflict exists, using random codes in the parent individual to correspondingly replace conflict code parts in the new individual, and if the conflict does not exist, performing cross completion, and determining the new individual codes.
Further, the mutation method in step S55 is as follows:
s552-1: generating a second random number of [0,1] by each individual in the population, and executing step S552-2 if the second random number is smaller than the variation probability P2;
s552-2: calculating a function f' (T) corresponding to the encoded information in the individual i ) Randomly generates a positive integer p, selects the first p optimal f' (T) i ) For the selected p function values f' (T i ) Performing mutation according to steps S552-3 to S552-5 respectively;
s552-3: at f' (T i ) Randomly selecting two coding positions from the corresponding coding information;
s552-4: the first code value is mutated according to the second code value according to a set rule;
s552-5: and judging whether the individuals have conflict or cross the boundary, if so, randomly selecting a second coding position again, returning to the step S552-4, and if not, indicating that the mutation is finished, and forming a new individual.
Further, in step S54, the method for selecting individuals to form a new population is as follows: firstly, creating a new population with the number of M, randomly extracting M individuals from the current population for comparison in a put-back way, putting the individuals with the highest fitness into the new population, and repeating the put-back extraction operation until the number of the individuals in the new population reaches M;
then, replacing the individuals with the worst fitness in the new population with the historic optimal individuals;
finally, the new population is used in place of the current population.
Further, the initial topology feasibility calculating method in step S2 is as follows:
firstly, constructing a loss function model according to the electric quantity conservation relation:
s.t.0≤a j ≤1+ε j ,j=1,2,...,n
ε j ≥0
wherein the method comprises the steps of
Y i =a 1 (X 1 ) i +a 2 (X 2 ) i +...+a n (X n ) i
i=1, 2..m represents the power moment, j=1, 2..n represents the equipment subscript involved in regression, D i Y being the actual electric quantity of the total table of the station area i Is the sum of the electric quantity of the lower nodes, (X) j ) i For the electric quantity of the subordinate nodeC is a constant, ε j To compensate line loss, a 1 ,a 2 ,...,a n Is the upper and lower topological relation coefficient;
then, constructing a plurality of initial points to perform gradient descent optimization, traversing all local optimal solutions, and obtaining a next topological structure set of the total table of the platform area, wherein the next topological structure set is used for constructing an initial population of a genetic algorithm.
Further, the constraint and multi-objective function model in step S3 is:
min{L'((T 1 ) a ),L'((T 2 ) a ),...,L'((T k ) a )}
wherein L' (a) is a model constructed according to the electric quantity conservation relation, T 1 ,...,T k For the coding information contained in the individual, L' ((T) 1 ) a ) L' ((T) as a model of the total table of the region 2 ) a ),...,L'((T k ) a ) I=1, 2, for a model of a lower node, m represents a power time, θ Superior electric quantity Represents the electric quantity of the upper node in a model, theta Lower level electric quantity Representing the power of the lower nodes in the model.
Further, the method for forming the initial population in step S4 is as follows: sequencing and numbering all devices in a low-voltage station area, and maintaining a mapping list of the devices and the numbers; traversing the next topological structure set obtained in the step S2, and obtaining the corresponding number of the equipment through a mapping list; the numbers are written into the individual genotypes according to rules, the rest parts are generated in a random mode and written into the individual genotypes, and the initial population is formed after the traversal is completed.
Further, the preprocessing of the electrical quantity data in step S1 includes one or more of the following:
a. adopting electric quantity data of all devices in a station for a plurality of days, deleting the electric quantity data of a non-power-consumption period and a low-load period, and if the processed data quantity is not more than the number of station devices participating in the topology, increasing the value period of the electric quantity data to ensure that the number of the electric quantity data is more than the number of station devices participating in the topology;
b. if the difference of the corresponding electric quantity data values of the two devices in the same time period is in a set range, judging that the two devices are serial devices, merging the serial devices, and recording the corresponding relation;
c. filling missing values in the electric quantity data by using a moving weighted average method;
d. the unified dimension normalizes the electrical quantity data.
Compared with the prior art, the invention has the following beneficial effects:
(1) Constructing a constraint and multi-objective function model according to the electric quantity conservation relation and the line loss increment relation of the low-voltage transformer area, optimizing by utilizing a genetic algorithm, and analyzing the optimal solution to obtain a transformer area topological relation;
(2) Compared with the carrier communication technology identification method and the hardware-added transmitting circuit identification method, the method does not need to add hardware, is low in implementation cost, saves more energy, and does not impact a power grid.
Detailed Description
The technical scheme of the invention is described in detail below with reference to the accompanying drawings:
as shown in fig. 1, it can be obtained through accumulation of electrical quantity data of each node at the power distribution side of the transformer area and analysis of the architecture of the transformer area, each branch outgoing line at the power distribution side of the transformer area corresponds to an incoming line of a lower branch box, each branch outgoing line corresponds to one or more incoming lines of a meter box at the lower end, and theoretically, the outgoing line electric quantity of the node at the upper layer in the same time period is equal to the incoming line electric quantity of each node at the lower end. The method utilizes the electric quantity conservation relation and combines the incremental relation that the line loss of the lower end of the platform area is larger than that of the upper end to realize the platform area topology identification of constraint multi-objective optimization.
A low-voltage area topology identification method based on constraint multi-objective optimization comprises the following steps:
s1: preprocessing the power data, including one or more of:
a. and deleting the power data of the non-power-consumption period and the low-load period (the judgment standard is that the power values of more than 8 continuous power values on the curve are close to 0) by adopting a 15-minute power curve of all the devices under the power supply area within 3-5 days, and if the processed data size is not more than the number of the power devices of the power supply area participating in the topology, increasing the value period of the power data to ensure that the number of the power data is more than the number of the power devices of the power supply area participating in the topology.
b. Merging serial devices under a bay, such as: the total surface of the incoming line of the transformer is connected with the switch of the outgoing line of the transformer, the switch of the outgoing line of the power distribution room and the switch of the incoming line of the branch box. The judging method comprises the following steps: if the difference of each corresponding value of the 15-minute electric quantity curves of the two devices is not more than 1%, judging that the two devices are serial devices, merging the serial devices, reserving one of the serial devices, and recording the corresponding relation;
c. filling missing values in charge data using a moving weighted average method, recordingz j For a valid curve time value, j is the data time and L is the size of the moving window. Filling the missing value by adding and averaging L effective time values near the missing value, wherein L can be between 8 and 12 in consideration of the electricity utilization habit of a low-voltage user.
d. The unified dimension normalizes the electrical quantity data.
S2: and carrying out initial topology feasibility calculation to obtain a next-stage topology structure set of the total table of the station area.
Specifically, according to conservation of electric quantity, the electric quantity of the total surface nodes is equal to the sum of electric quantities of the lower-level equipment nodes connected with the total surface nodes, and accordingly an electric quantity equation of the total surface of the area and other equipment is constructed:
Y i =a 1 (X 1 ) i +a 2 (X 2 ) i +...+a n (X n ) i
constructing a loss function model according to the electric quantity conservation relation:
s.t.0≤a j ≤1+ε j ,j=1,2,...,n
ε j ≥0
where i=1, 2..m represents the power moment, j=1, 2..n represents the equipment subscript to participate in the regression, and all equipment in the default zone participate in the regression; d (D) i Y being the actual electric quantity of the total table of the station area i Is the sum of the electric quantity of the lower nodes, (X) j ) i Is the electric quantity of the lower node, C is a constant, epsilon j For compensating the line loss, the lower electric quantity and the total electric quantity smaller than the total electric quantity caused by the line loss are compensated, a 1 ,a 2 ,...,a n And the upper and lower topological relation coefficients are obtained through regression.
Since there are multiple collinearity of the topological relation, that is, the total electric quantity is equal to the sum of the electric quantities of the connected lower nodes, the electric quantity of the lower nodes is also equal to the sum of the electric quantities of the lower nodes, and therefore, various linear tables exist in the total, as shown in fig. 2.
And constructing a plurality of initial points to perform gradient descent optimization, traversing all local optimal solutions to obtain a next topological structure set of a total table of the platform region, wherein the sets are called initial topological feasibility and are used for constructing an initial population of a genetic algorithm.
S3: and constructing constraint and multi-objective function models.
Specifically, according to conservation of electric quantity, the electric quantity of non-end nodes in the topological structure is equal to the sum of electric quantities of lower nodes, and the electric quantity equation is also satisfied by the nodes in the set obtained in the step S2; according to the progressive loss, the line loss at the tail end of the branch line loss is larger than that at the upper end, and a constraint and multi-objective function model is constructed according to the progressive loss:
min{L'((T 1 ) a ),L'((T 2 ) a ),...,L'((T k ) a )}
wherein L' (a) is a model constructed according to the electric quantity conservation relation, T 1 ,...,T k The encoded information contained for an individual includes the encoded information of the node itself and its lower nodes, as shown in fig. 3. L' ((T) 1 ) a ) L' ((T) as a model of the total table of the region 2 ) a ),...,L'((T k ) a ) The specific number of the models is related to the coding information of individuals in the genetic algorithm, and each individual in the population corresponds to a group of models L' ((T) 1 ) a ),...,L'((T k ) a ) By analyzing the individual code information, T can be calculated i Mapping to a corresponding function L' ((T) ia ). ) The whole coding information contained in the individual, i.e. a set of L' ((T) 1 ) a ),...,L'((T k ) a ) Because each individual code information in the population is different, the corresponding function number and parameters are different; (T) i ) a I.e. the number of devices participating in the model, also the encoded information T comprised by the individual i Confirm, in the same way, when (T i ) a When all the values are close to 1, the exact upper and lower relationships are expressed.
i=1, 2,..m represents the electric quantity moment, θ Superior electric quantity Represents the electric quantity of the upper node in a model, theta Lower level electric quantity Representing the power of the lower nodes in the model,and the terminal line loss is larger than the upper line loss, namely the lower node electric quantity and the upper node electric quantity are smaller than or equal to each other, according to the constraint condition of the model, and the line loss is increased.
S4: and forming an initial population according to the initial topology feasibility.
Specifically, the sequence number coding is performed on the population individuals, and the execution efficiency is considered, the genotypes of the individuals are represented by using sequence number vectors with variable lengths, as shown in fig. 4, and 10 branches, 60 table boxes and 300 user area sizes are supported. The coding rule is: 0 is a sequence number divider, two 0 are upper and lower layer dividers, and redundant 0 in the vector are combined by using a compact coding mode, such as:
individual 1= {33,0,0,7,0,9,0,15,0,0,45,0,78,55,0,123,124,125,126,0,150,151,0,..0, 0}
Sequencing and numbering all devices (intelligent switch, end sensing and electric energy meter) under a low-voltage station area according to the device address from 1, and maintaining a mapping list of the devices and the numbers; as shown in fig. 5, traversing the next topological structure set obtained in step S2, and obtaining the corresponding number of the device through the mapping list; the numbers are written into the individual genotypes according to rules, the rest part is generated by a random mode (random structure, random sequence number) and written into the individual genotypes, and the construction of the initial population is completed after the traversing is completed.
S5: and optimizing the constraint and multi-objective function model by using a genetic algorithm to obtain the topological structure of the low-voltage transformer area.
The genetic algorithm specifically comprises the following steps:
s51: and constructing a coding and decoding function, which is used for completing the conversion of the genotype and the phenotype of the individual, converting the sequence number vector into a topological structure stored in a tree, and outputting an optimal solution when the algorithm is completed.
S52: and constructing a punishment function for obtaining the model value of the punished individual.
Specifically, regression yields L' ((T) i ) a ) Coefficient (T) i ) a Back-up rounding (T) i ) a Obtaining L' ((T) i ) a ) Is a function value of (2); judging whether the constraint condition is satisfied, adjusting the function value according to the condition that the constraint condition is satisfied through a punishment function, and marking the processed function value as f' (T) i ) The method comprises the steps of carrying out a first treatment on the surface of the Since the multi-objective optimal solutions in the topology are non-dominant solutions to each other, f' (T) is used i ) And as a model value f of the individual. The formula is written as:
0<x<1
wherein H (T) i ) As a constrained discrimination factor, f' (T i ) L' (T) is the function value processed by the punishment function i ) For a model constructed according to the conservation of electricity,c is penalty factor, x is the satisfaction degree of individual constraint;
where n is L' (T) satisfying constraints in the individual i ) N is the number of all L' (T) in the individual i ) A is a constant. 0 < x < 1, x near 1 indicates that the individual has a high degree of satisfaction with the constraint, and x near 0 indicates that the individual has a low degree of satisfaction with the constraint.
The model is optimized with a penalty function, as in fig. 6. Since the minimum value is obtained, the f' (T) satisfying the constraint is reduced when the overall satisfaction degree x is equal to or greater than 0.5 i ) When the overall satisfaction degree x < 0.5, f' (T) satisfying the constraint is increased i ) I.e. in the case of (1) (2) in fig. 6, this is part of the implementation of the direct penalty of the constraint; regardless of the value of x, f' (T) that does not satisfy the constraint is increased i ) The values of (3) and (4) in FIG. 6, for reducing crossover and mutation times f' (T) in subsequent genetic algorithms i ) A ranking of the order is performed.
S53: and constructing an fitness function, setting the iteration times to zero, and randomly selecting an individual from the current population as a history optimal individual.
Specifically, the fitness is calculated by means of a linear transformation objective function:
f degree of fitness =f max -f+ε k
f Degree of applicability For the fitness function, f is the objective function, f max Is the maximum value of the individual objective function, f max -f converting the minimum value to the maximum value, avoiding the occurrence of negative numbers. k is an iteration index, ε [0,1]]Is the tail item for avoiding 0 occurrence while ε k Decreasing with increasing k for optimizing the broad search diversity of genetic selection in the early stages of the iteration and the local search convergence in the later stages of the iteration.
S54: calculating an individual model value according to the constraint and the multi-objective function model, processing the individual model value through the punishment function, sequentially calculating the fitness of individuals in the current population according to the fitness function, taking the individual with the highest fitness as an optimal solution, and replacing the historical optimal individual with the current optimal solution if the fitness of the current optimal solution is higher than that of the historical optimal individual; judging whether the iteration times reach a preset value, if so, outputting a current optimal solution, and turning to a step S56; otherwise, individual selection is carried out to form a new population.
The method for forming a new population by individual selection comprises the following steps:
firstly, creating a new population with the number of individuals M (M=30), randomly extracting M (m=3) individuals from the current population in a put-back way for comparison, putting the individuals with the highest fitness into the new population, and repeating the put-back way extraction operation until the number of the individuals of the new population reaches M;
then, replacing the individuals with the worst fitness in the new population with the historic optimal individuals;
finally, the new population is used in place of the current population.
S55: and (4) intersecting and mutating individuals in the population to generate a new population, adding one to the iteration number, and returning to the step S54.
Specifically, the crossing method is as follows:
s551-1: each individual in the population generates a first random number of [0,1], and if the first random number is smaller than the crossover probability P1 (the set value of the crossover probability P1 is 0.9), the steps S551-2 to S551-5 participate in two-by-two crossover to generate new individuals;
s551-2: two individuals participating in the crossover are taken as parent individuals, and a function f' (T) corresponding to the coding information in the individuals is calculated i ) To obtain the optimal f' (T) of each of the two parent individuals i );
S551-3: creating an empty individual as a new individual, and randomly defining the number of codes of each layer in the new individual codes;
s551-4: the two parent individuals are intersected in a hierarchical mode, codes are randomly extracted from the two parent individuals and filled into new individuals, and if the extracted codes are the optimal f' (T) of the individuals i ) The upper node of the new individual is inserted into the lower node of the new individual;
s551-5: and (3) performing conflict detection on the new individual, if the conflict exists, using random codes in the parent individual to correspondingly replace conflict code parts in the new individual, and if the conflict does not exist, indicating that the cross is completed, namely completing the coding of the new individual.
The mutation method comprises the following steps:
s552-1: each individual in the population generates a second random number of [0,1], and if the second random number is smaller than the variation probability P2 (the set value of the variation probability P2 is 0.05), the next step is executed;
s552-2: calculate the numberFunction f' (T) corresponding to encoded information in a volume i ) Randomly generates a positive integer p (p is less than or equal to 3), and selects the first p minimum function values f' (T) i ). Because the codes used by the individual are serial numbers for sorting the device addresses, the probability of the device addresses adjacent to the same branch line is high, and p function values f' (T) are selected i ) Performing multi-point adjacent value variation according to steps S552-3 to S552-5 respectively;
s552-3: at an optimum f' (T i ) Randomly selecting two coding positions from the corresponding coding information;
s552-4: mutating the first code value to a second code value plus one;
s552-5: and judging whether the individuals have conflict or cross the boundary, if so, randomly selecting a second coding position again, returning to the step S552-4, and if not, indicating that the mutation is finished, and forming a new individual.
And forming a new population by crossing and mutating the new individuals after finishing.
S56: analyzing the current optimal solution, restoring the combined serial equipment, determining the upper and lower stages according to the historical electric quantity, constructing the complete topology of the low-voltage transformer area of the transformer-branch box-meter box-ammeter by using a decoding function, and outputting a topological structure.
The method is suitable for the field of 200V/380V low-voltage power distribution, realizes the topological identification of the transformer area by collecting and accumulating the electric quantity of intelligent equipment of the transformer area and combining a terminal side edge transformer area topological constraint multi-objective optimization algorithm, and mainly comprises the steps of preprocessing the electric quantity data of the transformer area, calculating the initial topological feasibility, constructing a constraint and multi-objective function model, optimizing by using a genetic algorithm and the like. The construction of the model utilizes the electric quantity conservation equation relation and the line loss increment relation of the low-voltage station area, the genetic algorithm model is utilized for optimization after the model is constructed, the optimal solution is obtained through data analysis, and the complete topological relation of the low-voltage station area is obtained through further analysis of the optimal solution, so that the accuracy is high.