Disclosure of Invention
The invention provides a low-voltage transformer area topology identification method based on constrained multi-objective optimization, which aims to: on the basis of not increasing hardware cost, the low-voltage area topology identification with high accuracy and high adaptability is realized through a software method.
The technical scheme of the invention is as follows:
a low-voltage transformer area topology identification method based on constrained multi-objective optimization comprises the following steps:
s1: preprocessing the electric quantity data;
s2: performing initial topological feasibility calculation to obtain a next-level topological structure set of the distribution area general table;
s3: constructing a constraint and multi-objective function model;
s4: forming an initial population according to the initial topological feasibility;
s5: and optimizing the constraint and multi-objective function model by using a genetic algorithm to obtain a low-voltage transformer area topological structure.
Further, the genetic algorithm of step S5 specifically includes the following steps:
s51: constructing a coding and decoding function;
s52: constructing a penalty function;
s53: constructing a fitness function, setting the iteration times to be zero, and randomly selecting one individual from the current population as a history optimal individual;
s54: calculating individual model values according to the constraint and multi-target function model, processing the individual model values through the penalty 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 the current optimal solution, and turning to the step S56; otherwise, individual selection is carried out to form a new population;
s55: crossing and varying individuals in the population to generate a new population, adding one to the iteration number, and returning to the step S54;
s56: and analyzing the current optimal solution, and constructing a topological structure by using a decoding function.
Further, in step S52, the penalty function is:
wherein, H (T)i) Discriminant factor for constraint, f' (T)i) Is the function value after being processed by the penalty function, L' (T)i) The model is constructed according to the conservation relation of electric quantity, x is the satisfaction degree of individual constraint, and c is a penalty factor;
where n is L' (T) satisfying the constraint in the individuali) N is all L' (T) in the individuali) A is a constant.
Further, the interleaving method in step S55 is:
s551-1: each individual in the population generates a first random number of [0, 1], if the first random number is smaller than the cross probability P1, the first random number participates in pairwise crossing according to the steps S551-2 to S551-5 to generate a new individual;
s551-2: taking two individuals participating in crossing as parent individuals, and calculating a function f' (T) corresponding to the coding information in the individualsi) To obtain the optimal f' (T) for each of the two parent individualsi);
S551-3: newly building a hollow individual as a new individual, and randomly defining the number of codes in each layer in the new individual codes;
s551-4: performing crossing on two parent individuals according to levels, randomly extracting codes from the two parent individuals to fill the codes into a new individual, and if the extracted codes are the optimal f' (T) of the individuali) Inserting the lower nodes into the new individual together corresponding to the upper nodes in the coded information;
s551-5: and (4) carrying out conflict detection on the new individual, if a conflict exists, using the random code in the parent individual to correspondingly replace the conflict code part in the new individual, and if no conflict exists, indicating that the crossing is finished, and determining the code of the new individual.
Further, in step S55, the mutation method includes:
s552-1: generating a second random number of [0, 1] for each individual in the population, and if the second random number is less than the variation probability P2, executing step S552-2;
s552-2: calculating a function f' (T) corresponding to the encoded information in the individuali) Randomly generating a positive integer p, and selecting 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;
s552-3: at f' (T)i) Randomly selecting two coding positions from the corresponding coding information;
s552-4: carrying out variation on the first coded value according to the second coded value according to a set rule;
s552-5: and judging whether the individual has conflict or border crossing, if so, randomly selecting a second coding position again, returning to the step S552-4, and if not, indicating that the mutation is finished to form a new individual.
Further, the method for performing individual selection to form a new population in step S54 includes: firstly, newly building a new population with M individuals, randomly extracting M individuals from the current population in a release place for comparison, putting the individual with the highest fitness into the new population, and repeating the extraction operation in the release place until the number of the individuals of the new population reaches M;
then, replacing the individuals with the worst fitness in the new population by using the historical optimal individuals;
finally, the new population is used instead of the current population.
Further, in step S2, the initial topological feasibility calculation method includes:
firstly, constructing a loss function model according to an electric quantity conservation relation:
s.t.0≤aj≤1+εj,j=1,2,...,n
εj≥0
wherein
Yi=a1(X1)i+a2(X2)i+...+an(Xn)i
i 1, 2.. m denotes the time of the electrical quantity, j 1, 2.. n denotes the index of the device participating in the regression, DiActual quantity of electricity, Y, for a table-block summaryiFor the next node power sum, (X)j)iIs the electric quantity of the subordinate node, C is a constant, epsilonjFor line loss compensation, a1,a2,...,anThe topological relation coefficients of the upper and lower levels are obtained;
and then, constructing a plurality of initial points to perform gradient descent optimization, traversing all local optimal solutions, and obtaining a next-level topological structure set of the distribution area general table for constructing an initial population of the genetic algorithm.
Further, in step S3, the constraint and multi-objective function model is:
min{L'((T1)a),L'((T2)a),...,L'((Tk)a)}
wherein, L' (a) is a model constructed according to the conservation relation of electric quantity, T1,...,TkThe coded information contained for an individual, L' ((T)1)a) Model for a table section summary, L' ((T)2)a),...,L'((Tk)a) Is a model of a lower node, where i is 1,2Upper level electric quantityRepresenting the electrical quantity of an upper node in a model, thetaLower level of electric quantityRepresenting the power of the lower nodes in the model.
Further, the method for forming the initial population in step S4 includes: sequencing and numbering all equipment under a low-voltage transformer area, and maintaining a mapping list of the equipment and the numbers; traversing the next-level topological structure set obtained in the step S2, and obtaining a device corresponding number through a mapping list; and writing the number into the individual genotype according to a rule, generating the rest part in a random mode, writing the rest part into the individual genotype, and forming an initial population after traversing is finished.
Further, the preprocessing of the power data in step S1 includes one or more of the following:
a. the method comprises the steps that electric quantity data of all equipment in a station area within a plurality of days are adopted, the electric quantity data in non-power-consumption time periods and low-load time periods are deleted, and if the processed data quantity is not larger than the number of the equipment in the station area participating in the topology, the value taking time period of the electric quantity data is increased, so that the number of the electric quantity data is larger than the number of the equipment in the station area participating in the topology;
b. if the difference between 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 standardizes the electricity data.
Compared with the prior art, the invention has the following beneficial effects:
(1) the method comprises the steps of constructing a constraint and multi-objective function model according to the electricity conservation relation of the low-voltage transformer area and the incremental relation of line loss, optimizing by using a genetic algorithm, analyzing an optimal solution to obtain a transformer area topological relation, and compared with a similarity analysis software identification method, the method can better process co-linearity and improve the accuracy and adaptability of low-voltage transformer area topological identification;
(2) compared with the identification method by utilizing the carrier communication technology and the identification method by adding the hardware transmitting circuit, the method does not need to add hardware, has low implementation cost and more energy conservation, and does not cause impact on a power grid.
Detailed Description
The technical scheme of the invention is explained in detail in the following with the accompanying drawings:
as shown in fig. 1, it can be obtained through accumulation of electrical quantity data of each node on the distribution side of the distribution side of the distribution side. The method utilizes the power conservation relation and combines the increasing relation that the line loss at the lower end of the transformer area is larger than that at the upper end of the transformer area to realize the constrained multi-objective optimized transformer area topology identification.
A low-voltage transformer area topology identification method based on constrained multi-objective optimization comprises the following steps:
s1: preprocessing the electric quantity data, wherein the preprocessing comprises one or more of the following steps:
a. and (3) deleting the electricity quantity data in the non-electricity-consumption period and the low-load period by adopting a 15-minute electricity quantity curve of all the devices under the station area within 3-5 days (the judgment standard is that more than 8 continuous electricity quantity values on the curve are close to 0), and if the processed data quantity is not more than the number of the devices participating in the topology, increasing the value-taking period of the electricity quantity data to enable the number of the electricity quantity data to be more than the number of the devices participating in the topology.
b. Merging serial equipment under the station area, such as: the master meter at the wire inlet of the transformer, the switch at the wire outlet of the power distribution room and the switch at the wire inlet of the branch box. The judging method comprises the following steps: if the difference of each corresponding numerical 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 using moving weighted averageMissing values in the electrical quantity data, notes
z
jThe valid curve time value is, j is the data time, and L is the size of the moving window. And filling the missing value by adding and averaging L effective time values near the missing value, wherein L can be between 8 and 12 by considering the power utilization habit of a low-voltage user.
d. The unified dimension standardizes the electricity data.
S2: and performing initial topological feasibility calculation to obtain a next-stage topological structure set of the distribution area general table.
Specifically, according to the conservation of electric quantity, the electric quantity of the summary table node is equal to the sum of the electric quantities of the subordinate equipment nodes connected with the summary table node, and accordingly, an electric quantity equation of the distribution room summary table and other equipment is constructed:
Yi=a1(X1)i+a2(X2)i+...+an(Xn)i
constructing a loss function model according to the electric quantity conservation relation:
s.t.0≤aj≤1+εj,j=1,2,...,n
εj≥0
wherein, i is 1,2, and is m represents the moment of electric quantity, and j is 1,2, and is n represents the subscript of the equipment participating in regression, and all the equipment in the default station zone participates in regression; diActual quantity of electricity, Y, for a table-block summaryiFor the next node power sum, (X)j)iIs the electric quantity of the subordinate node, C is a constant, epsilonjFor line loss compensation, the sum of the lower-level electric quantities resulting from line loss compensation and the electric quantity less than the total electric quantity, a1,a2,...,anThe topological relation coefficient of the upper and lower levels is obtained through regression.
Since the topological relation has multiple collinearity, that is, the total power of the table is equal to the sum of the powers of the connected subordinate nodes, and the power of the subordinate node is also equal to the sum of the powers of the subordinate nodes, the total table has multiple linear tables, as shown in fig. 2.
And constructing a plurality of initial points to perform gradient descent optimization, traversing all local optimal solutions, and obtaining a next-stage topological structure set of the station area general table, wherein the sets are called initial topological feasibility and are used for constructing an initial population of a genetic algorithm.
S3: and (5) constructing a constraint and multi-objective function model.
Specifically, according to the conservation of electric quantity, the electric quantity of the non-end node in the topology structure is equal to the sum of the electric quantities of the lower-level nodes, and the nodes in the set obtained in step S2 also satisfy the electric quantity equation; according to the incremental loss, the line loss at the tail end of the line loss of the branch line is larger than that at the upper end, and a constraint and multi-objective function model is constructed according to the line loss:
min{L'((T1)a),L'((T2)a),...,L'((Tk)a)}
wherein, L' (a) is a model constructed according to the conservation relation of electric quantity, T1,...,TkThe encoded information contained for an individual includes encoded information of the node itself and its subordinate nodes, as shown in fig. 3. L' ((T)1)a) Model for a table section summary, L' ((T)2)a),...,L'((Tk)a) Is a model of a lower node, the specific number of the models is related to the coding information of the genetic algorithm individuals, and each individual in the population corresponds to a group of models L' ((T)1)a),...,L'((Tk)a) By analyzing the individual code information, T can be convertediMapping to the corresponding function L' ((T)ia). ) The entire coded information that an individual contains, i.e. a set of L' ((T)1)a),...,L'((Tk)a) Because each individual code information in the population is different, the corresponding function quantity and parameters are different; (T)i)aIs the number of devices participating in the model, and is also the coding information T contained by the individualiDetermine, in a similar manner, when (T)i)aAll approach 1, the exact upper and lower level relationships are indicated.
1,2, m represents the time of the electric quantity, theta
Upper level electric quantityRepresenting the electrical quantity of an upper node in a model, theta
Lower level of electric quantityRepresenting the power of the lower nodes in the model,
and the constraint condition is a constraint condition of the model, the line loss is increased progressively according to the line loss, and the tail end line loss is greater than the upper end line loss, namely the electric quantity of the lower-level node and the electric quantity of the upper-level node are less than or equal to each other.
S4: and forming an initial population according to the initial topological feasibility.
Specifically, the number of individuals in the population is encoded, and in consideration of execution efficiency, the genotype of the individual is expressed by using a sequence number vector with a variable length, as shown in fig. 4, and the size of a station area with 10 branches, 60 meter boxes and 300 households is supported. The encoding rule is as follows: 0 is a sequence number divider, two 0 are upper and lower layer dividers, and redundant 0 in the vector are merged 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}
Numbering all devices (intelligent switches, tail end sensing and electric energy meters) in a low-voltage transformer area from 1 according to device addresses in an ordering mode, and maintaining a mapping list of the devices and the numbers; as shown in fig. 5, traversing the next-level topology structure set obtained in step S2, and obtaining the device corresponding number through the mapping list; and writing the number into the individual genotype according to a rule, generating the rest part in a random mode (random structure and random sequence number) and writing the rest part into the individual genotype, and completing the construction of the initial population after traversing.
S5: and optimizing the constraint and multi-objective function model by using a genetic algorithm to obtain a low-voltage transformer area topological structure.
The genetic algorithm specifically comprises the following steps:
s51: and constructing a coding and decoding function for completing the conversion of the individual genotype and the phenotype, converting the sequence number vector into a tree-stored topological structure, and outputting an optimal solution when the algorithm is completed.
S52: and constructing a penalty function for obtaining a model value of the punished individual.
Specifically, regression yields L' ((T)i)a) Coefficient (T) ofi)aAfter rounding off (T)i)aObtaining L' ((T)i)a) The function value of (a); judging whether the constraint condition is satisfied, adjusting the function value according to the condition that the constraint condition is satisfied by a penalty function, and recording the processed function value as f' (T)i) (ii) a F' (T) is used because the multi-target optimal solutions in the topology are mutually non-dominant solutionsi) The sum of (a) and (b) is used as a model value f of the individual. The formula is:
wherein, H (T)
i) Discriminant factor for constraint, f' (T)
i) Is the function value after being processed by the penalty function, L' (T)
i) For the model constructed according to the conservation relation of electric quantity,
is a penalty item, c is a penalty factor, and x is the satisfaction degree of individual constraint;
where n is L' (T) satisfying the constraint in the individuali) N is all L' (T) in the individuali) A is a constant. X is more than 0 and less than 1, x is close to 1 to indicate that the individual satisfies the constraint to a high degree, and x is close to 0 to indicate that the individual satisfies the constraint to a low degree.
The model is optimized with a penalty function, as in fig. 6. Because of the minimum value, it is equivalent to decrease f' (T) satisfying the constraint when the overall satisfaction degree x is not less than 0.5i) When the overall satisfaction degree x < 0.5, f' (T) satisfying the constraint is increasedi) The value of (c), which is the case of (r) in FIG. 6, is part of the implementation of the direct penalty of the constraint; f' (T) not satisfying the constraint is increased regardless of the value of xi) The value of (d), i.e., the case of (c) in FIG. 6, is used to reduce the f' (T) when crossing and mutation occur in the subsequent genetic algorithmi) Ranking of the ordering is performed.
S53: and constructing a fitness function, setting the number of iterations to zero, and randomly selecting one individual from the current population as a history optimal individual.
Specifically, the fitness is calculated by linearly transforming the objective function:
fdegree of adaptability=fmax-f+εk
fDegree of suitabilityIs a fitness function, f is an objective function, fmaxIs the maximum value of the individual objective function, fmax-f converting the minimum value to a maximum value, avoiding the occurrence of negatives. k is an iteration index, and epsilon belongs to [0, 1]]For tail terms, to avoid the occurrence of 0, with epsilonkDecreasing with increasing k, for optimizing the generalized search diversity of genetic selection at the beginning of the iteration and the local search convergence at the end of the iteration.
S54: calculating individual model values according to the constraint and multi-target function model, processing the individual model values through the penalty 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 the current optimal solution, and turning to the step S56; otherwise, individual selection is carried out to form a new population.
The method for forming the new population by individual selection comprises the following steps:
firstly, newly building a new population with the number of M (M is 30), randomly extracting M (M is 3) individuals from the current population in a release manner for comparison, putting the individual with the highest fitness into the new population, and repeating the extraction operation in the release manner until the number of the individuals of the new population reaches M;
then, replacing the individuals with the worst fitness in the new population by using the historical optimal individuals;
finally, the new population is used instead of the current population.
S55: and (5) crossing and mutating the 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 comprises the following steps:
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 cross probability P1 (the set value of the cross probability P1 is 0.9), participating in pairwise crossing according to the steps S551-2 to S551-5 to generate a new individual;
s551-2: taking two individuals participating in crossing as parent individuals, and calculating a function f' (T) corresponding to the coding information in the individualsi) To obtain the optimal f' (T) for each of the two parent individualsi);
S551-3: newly building a hollow individual as a new individual, and randomly defining the number of codes in each layer in the new individual codes;
s551-4: performing crossing on two parent individuals according to levels, randomly extracting codes from the two parent individuals to fill the codes into a new individual, and if the extracted codes are the optimal f' (T) of the individuali) The upper node in the system inserts the lower nodes into a new individual;
s551-5: and (4) carrying out conflict detection on the new individual, if a conflict exists, using the random code in the parent individual to correspondingly replace the conflict code part in the new individual, and if no conflict exists, indicating that the cross is finished, namely, finishing the coding of the new individual.
The mutation method comprises the following steps:
s552-1: generating a second random number of [0, 1] for each individual in the population, and if the second random number is less than the variation probability P2 (the set value of the variation probability P2 is 0.05), executing the next step;
s552-2: calculating a function f' (T) corresponding to the encoded information in the individuali) Randomly generating a positive integer p (p is less than or equal to 3), and selecting the first p minimum function values f' (T)i). Because the code used by the individual is the serial number for ordering the equipment address, the probability that the equipment addresses are adjacent to each other under the same branch is higher, and p selected function values f' (T) are obtainedi) Performing multipoint adjacent value variation according to steps S552-3 to S552-5;
s552-3: at optimum f' (T)i) Randomly selecting two coding positions from the corresponding coding information;
s552-4: mutating the first encoded value to the second encoded value plus one;
s552-5: and judging whether the individual has conflict or border crossing, if so, randomly selecting a second coding position again, returning to the step S552-4, and if not, indicating that the mutation is finished to form a new individual.
And (4) forming a new population by the new individuals after the crossing and mutation are completed.
S56: analyzing the current optimal solution, restoring the combined serial equipment, determining the upper and lower levels according to the historical electric quantity, and constructing a complete topology of a low-voltage transformer area, a branch box area, a meter box area and an electric meter area by using a decoding function to output a topological structure.
The method is suitable for the field of 200V/380V low-voltage power distribution, achieves station area topology identification through station area intelligent equipment electric quantity collection and accumulation and combining a terminal side edge station area topology constraint multi-objective optimization algorithm, and mainly comprises the steps of preprocessing station area electric quantity data, calculating initial topology feasibility, constructing a constraint and multi-objective function model, optimizing by using a genetic algorithm and the like. The model is constructed by utilizing the electricity conservation equality relation of the low-voltage transformer area and the incremental relation of the line loss, the genetic algorithm model is utilized for optimization after the model is constructed, the optimal solution is obtained through data analysis, the optimal solution is further analyzed, the complete topological relation of the low-voltage transformer area is obtained, and the accuracy is high.