A method for reactive power optimization of substation based on particle swarm-genetic fusion algorithm
By combining particle swarm algorithm and genetic algorithm, the particle swarm-genetic fusion algorithm is used to solve the limitations of the calculation method of reactive power optimization scheduling in the substation, and the reactive power optimization effect with faster convergence and higher precision is achieved.
Patent Information
- Application Number
- CN202311826086.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2043-12-27
AI Technical Summary
The existing technology has limitations in the reactive power optimization scheduling in substations. A single method cannot achieve perfection. Each has its own unique advantages and defects. It is urgent to combine particle swarm algorithms and genetic algorithms to achieve better reactive power optimization. Effect.
The reactive optimization method of substations based on particle swarm-genetic fusion algorithm is adopted. By obtaining the electrical parameters and load data of the substation equipment, the population is initialized and iteratively optimized, combining the speed update of the particle swarm algorithm and the selection and cross-operation of the genetic algorithm. Achieve reactive optimization.
It achieves faster convergence speed and higher accuracy, can better optimize the reactive problems of substations, has significant engineering practical value and wide application prospects.
Smart Images

Figure CN117808151B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of reactive power optimization in power grids, and in particular to a reactive power optimization method for a substation based on a particle swarm-genetic fusion algorithm. Background Art
[0002] Substation voltage and reactive power optimization dispatch is an important measure to ensure voltage quality and reactive power balance and improve the reliability and economy of the power supply network by automatically adjusting the taps of the on-load transformer and the number of switching groups of parallel compensation capacitors.
[0003] Traditional computational methods for solving reactive power optimization scheduling problems in substations include linear programming (LP), nonlinear programming (NLP), dynamic programming (DP), etc. These methods have their own shortcomings and are gradually not recognized by the mainstream.
[0004] At present, the mainstream calculation methods for solving the reactive power optimization scheduling problem in substations include genetic algorithm (GA), simulated annealing (SA) algorithm, fuzzy optimization method and taboo search (TS) algorithm. These methods are more convenient, faster and more accurate than traditional methods for solving reactive power optimization scheduling problems. However, no single method can be perfect, and each has its own unique advantages and disadvantages.
[0005] Therefore, it is urgent to combine the particle swarm algorithm and the genetic algorithm to propose a substation reactive power optimization method based on the particle swarm-genetic fusion algorithm to achieve better reactive power optimization effect. Summary of the invention
[0006] The purpose of the present invention is to solve the above defects in the prior art and provide a substation reactive power optimization method based on particle swarm-genetic fusion algorithm.
[0007] The purpose of the present invention can be achieved by adopting the following technical solutions:
[0008] A method for optimizing reactive power of a substation based on a particle swarm-genetic fusion algorithm, the method comprising the following steps:
[0009] S1. Obtain electrical parameters of the substation equipment and load data for the next 24 hours, wherein the electrical parameters include the rated voltage value, frequency value, impedance value, initial transformation ratio of the transformer, adjustable gear of the transformer, initial number of capacitor groups, maximum number of capacitor groups, rated capacity of the transformer, maximum allowable gear adjustment times of the transformer group in one day, maximum allowable switching times of the capacitor group in one day, and reactive power compensation capacity of the capacitor group;
[0010] S2. Initialize the electrical parameters and establish the initial population. The process is as follows:
[0011] S201, define hour t=1, 2, 3, ..., 24;
[0012] S202, set the number of iterations iter to 1, and set the population size m;
[0013] S203, dividing the load data obtained in step S1 into 24 groups according to hour t;
[0014] S204, using the number of capacitor bank switching and transformer tap adjustment in the electrical parameters as control variables, discretizing and rounding the control variables as matrix elements to form a matrix, and using the matrix as particles;
[0015] S205. Establishing population G through particles t , G t The mathematical description is as follows:
[0016]
[0017] G t =[P i,t …P m,t ] T
[0018] Among them, P i,t is the i-th particle at hour t, and the population G t is a {N c ×m} matrix, m is the population size, N c is the number of control variables, p ij,t is the jth variable to be controlled in the i-th particle at hour t, i = 1, 2, ..., m, j = 1, 2, ..., N c ;
[0019] S3, the population G t Iterate and obtain the reactive power optimization result. The process is as follows:
[0020] S301, obtaining the current hour t, and according to the value of the hour t, obtaining the load data corresponding to the current hour t, and substituting it into the low-voltage side bus terminal of the substation;
[0021] S302: Substitute the particle into the fitness function FF, calculate the particle fitness, and obtain the optimal particle p at the hour t. t , the optimal population GB t and the global optimal particle A t ;
[0022] S303, sort the particles from small to large according to their fitness, perform grouping operations on the particles, obtain a basic population and a pioneering population, define the top 20% of the particles as the pioneering population, reduce the probability of the particles in the pioneering population being selected, give them a larger speed and then substitute them for update, define the remaining 80% of the particles as the basic population, and update them normally;
[0023] S304, substituting the number of iterations iter, and updating the inertia weight δ;
[0024] S305, substituting the particle and inertia weight δ into the speed update formula to update the particle speed and population;
[0025] S306, performing selection operation and crossover operation on particles;
[0026] S307, set constraints, and determine whether the particle has crossed the boundary according to the constraints: if it has crossed the boundary, punish the particle that has crossed the boundary; if it has not crossed the boundary, directly proceed to the next step;
[0027] S308, calculate the particle fitness and update the optimal particle and optimal population in the population: substitute the particle into the fitness function FF, update the optimal particle p in the population t , the optimal population GB t and the global optimal particle A t , the original population G t Update to population G′ t ;
[0028] S309, determine whether the current number of iterations reaches the maximum number of iterations: if not, record the number of iterations iter=iter+1, and return to step S302; if reached, end the current calculation and output the current optimal optimization target;
[0029] S310, determine whether the hour t is 24: if not, record hour t=t+1, and return to step S301; if satisfied, output active network loss, voltage offset, transformer tap adjustment times, and capacitor bank switching times as the final optimization result.
[0030] Furthermore, the process of establishing the constraint condition is as follows:
[0031] The particle P i,t The initial number of capacitor banks and initial transformer ratio corresponding to the control variables are substituted into the substation network topology structure to be optimized to perform power flow calculation constraints.
[0032] The power flow calculation determines the operating status of the entire substation based on the given initial number of capacitor groups, initial transformer ratio and network topology. The calculation results are used to prepare daily operating modes, active and reactive power adjustment plans and load adjustment plans to meet the thermal stability requirements of lines and transformers and voltage quality requirements. It is the basis for power system stability calculations and fault analysis.
[0033] Record the number of capacitor bank switching times KC in hour t t And the number of transformer shifts KQ t , substituting into the action number inequality constraint, the mathematical description is:
[0034]
[0035]
[0036] Among them, K Ct-1 and K Qt-1 is the number of capacitor bank switching and transformer shifting times in hour t-1, and K C0 and K Q0 Both are 0, M c M is the maximum allowable switching times of the capacitor bank in one day. q The maximum allowable number of gear adjustments for the transformer group in one day.
[0037] The number of capacitor bank switching and transformer shifting has limits. If the number of capacitor bank or transformer operations in one day exceeds the maximum allowed number, the service life of the capacitor bank or transformer will be reduced, and even accidents will occur. Therefore, the setting of the operation number inequality constraint can extend the service life of the substation equipment and ensure safe production in the substation.
[0038] Obtain the adjustable gear of the transformer and the reactive compensation capacity of the parallel capacitor in step S1, and substitute them into the limited inequality constraint, which is mathematically described as:
[0039] T qt,min ≤T qt ≤T qt,max , q=1,2,…,N1
[0040] Q kt,min ≤Q kt ≤Q kt,max , k=1,2,…,N2
[0041] Among them, T qt,min and T qt,max are the minimum and maximum values of the transformer gear respectively, Q kt,min and Q kt,max are the minimum and maximum values of the reactive power compensation capacity of the parallel capacitor, T qtis the current gear position of the qth transformer at hour t, N1 is the total number of transformers, Q kt is the reactive compensation capacity of the kth parallel capacitor at hour t, and N2 is the number of parallel capacitors.
[0042] The setting of the limited inequality constraint is used to control the transformer gear position during the gear adjustment operation of the transformer within the range of the minimum gear position and the maximum gear position of the transformer, and to control the reactive compensation capacity of the parallel capacitor within the range of the minimum value and the maximum value of the reactive compensation capacity.
[0043] Furthermore, the calculation method of the inertia weight δ is as follows:
[0044]
[0045] Among them, δ e ,δ s are the first and second constants given in advance for calculating the inertia weight δ, iter is the number of current iterations, and maxiter is the given maximum number of iterations.
[0046] The inertia weight can reflect the ability of particles to inherit the previous speed when the speed is updated, and a larger inertia weight is conducive to global search, while a smaller inertia weight is conducive to local search. At the same time, as the number of iterations increases, the solution of the speed update formula will be different, and a fixed inertia weight will lead to inconvenience in solving the problem. The setting of the inertia weight δ in this paper can, on the one hand, cooperate with particle grouping to balance global search and local search, and on the other hand, it can dynamically adapt to the solution of the speed update formula, so that particles can have a better optimization effect.
[0047] Furthermore, the update formula for updating particle velocity and population is as follows:
[0048] v′ i,t =δ·v i,t +c1·rand1·[B i,t -P i,t ]+c2·rand2·[p t -P i,t ]
[0049] P′ i,t =P i,t +v′ i,t
[0050] Among them, v i,t is the velocity of the ith particle at that hour t, v′ i,t is the updated speed, δ is the inertia weight, c1 and c2 are the first and second learning factors used to achieve speed update, rand1 and rand2 are two random numbers uniformly distributed between (0, 1), B i,tis the optimal population GB at that hour t t The particles in the t is the optimal particle at that hour t, P i,t is the ith particle at that hour t, P′ i,t is the updated i-th particle, and the updated particles form the updated population G′ t .
[0051] Speed update is a characteristic of the particle swarm algorithm, through which particles are updated and converged to a better solution based on the previous generation of particles.
[0052] Furthermore, the process of performing the selection operation and the crossover operation on the particles in step S306 is as follows:
[0053] The "last-place elimination" selection method is used for selection. After binary encoding of each particle, the top 10% of the elite population is removed, and the second-best 60% of the population is selected as parents by the tournament selection method. The remaining 30% of the population is randomly updated.
[0054] The basic population is cross-operated with the pioneering population, and the pioneering population is cross-operated with the pioneering population. The cross-operation adopts the random number method, which is mathematically described as:
[0055]
[0056] Among them, a represents a random number uniformly distributed between (0,1), P i,t is the ith particle at hour t, and m is the population size.
[0057] Selection and crossover operations are the characteristics of genetic algorithms. The new population generated by this operation can, on the one hand, significantly improve the convergence speed of the algorithm and make up for the shortcoming of the slow convergence speed of the particle swarm algorithm. On the other hand, combining the particle swarm algorithm can prevent the genetic algorithm from falling into the trap of local optimality during the iteration process and causing the "dead loop" phenomenon.
[0058] Furthermore, in step S307, the out-of-bounds particles are penalized, and the calculation formula of the penalty intensity is:
[0059]
[0060] Among them, Y is the penalty intensity for crossing the boundary, N is the number of variables subject to the constraint, and the penalty factor L is n is a large constant, λ n is the number of out-of-bounds times. If the nth variable subject to the constraint condition out-of-bounds occurs, its value is the absolute value of the difference between the boundary and the variable. If the nth variable does not out-of-bounds, its value is 0.
[0061] With the help of the setting of penalty intensity Y, the constraint problem is transformed into an unconstrained optimization problem, and then the solution of the original constraint problem is obtained by solving a series of unconstrained optimization problems. In the iterative process, the constraint conditions act like boundary fences. If the current solution is far away from the constraint conditions, that is, it does not cross the boundary, the penalty intensity is very small, otherwise the penalty intensity will be close to infinity. The penalty intensity Y imposes penalties on infeasible points, forcing the iteration points to approach the feasible domain.
[0062] Furthermore, the calculation formula of the fitness function FF is:
[0063] FF=F+Y
[0064] Among them, F is the objective function and Y is the penalty intensity;
[0065] The optimal solution of the fitness function is the same as the optimal solution of the objective function. When the objective function is constrained and out of bounds, the constraint condition is considered, and the penalty intensity is obtained. Therefore, the fitness function is constructed by adding the objective function and the penalty intensity.
[0066] The calculation formula of the objective function is:
[0067] F=min(ω1f1+ω2f2)
[0068] Wherein, ω1 and ω2 are the weights of the optimization function of active network loss and the weight of the optimization function of voltage quality, respectively, and ω1+ω2=1, ω1>ω2, and the present invention uses the current value minus the minimum value divided by the range to normalize the target;
[0069] f1 is the optimization function of active network loss, and its calculation formula is:
[0070]
[0071] Among them, N r is the total number of branches of the substation network topology to be optimized, G a,b is the conductance of the branch r between nodes a and b, U a , U b are the voltages at nodes a and b, respectively, a ,θ b are the phase angles of nodes a and b respectively;
[0072] f2 is the optimization function of voltage quality, and its calculation formula is:
[0073]
[0074] Among them, N1 is the total number of transformers, U g and U g,set are the voltage on the low-voltage side of the transformer bus and its expected value respectively.
[0075] The objective function is to optimize the active network loss and voltage quality, and to minimize the active network loss while taking into account that the voltage offset is small enough, that is, the voltage quality is good enough, so as to achieve better reactive power optimization effect.
[0076] Compared with the prior art, the present invention has the following advantages and effects:
[0077] (1) The present invention discloses a substation reactive power optimization method based on a particle swarm-genetic fusion algorithm, which is a scientific and easy-to-implement multi-objective reactive power optimization method in a power system, has fast convergence speed and high precision, is widely applicable to substation equipment, has significant engineering practical value, and has broad application prospects.
[0078] (2) Compared with the existing methods, the present invention covers more objective functions and adds more constraints; compared with the existing methods, the present invention integrates the selection and crossover in the genetic algorithm into the particle swarm algorithm, which well combines the advantages of both and can maintain a faster convergence speed and higher convergence accuracy.
[0079] (3) The present invention proposes a new method for calculating the inertia weight in the fitness calculation of a particle swarm, which reduces the calculation time in the iterative process, improves the calculation results, and can obtain better reactive power optimization effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0081] Figure 1 It is a flow chart of a substation reactive power optimization method based on a particle swarm-genetic fusion algorithm disclosed by the present invention;
[0082] Figure 2 is a topological structure diagram of an embodiment of the present invention;
[0083] Figure 3 Schematic diagram of voltage offset at different iteration times in an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0085] Example
[0086] like Figure 1 As shown, this embodiment discloses a substation reactive power optimization method based on particle swarm-genetic fusion algorithm.
[0087] Objective function:
[0088] F=min(ω1f1+ω2f2)
[0089]
[0090]
[0091] For this embodiment, the weights ω1 and ω2 of the two optimization functions are set to 0.85 and 0.15, and the population size m is set to 50.
[0092] The substation reactive power optimization method comprises the following steps:
[0093] S1. Obtain the electrical parameters of the substation equipment and the load data for the next 24 hours.
[0094] The topological structure of the transformer in this embodiment is as follows: Figure 2 The electrical parameters include the rated voltage value, frequency value, impedance value, initial transformation ratio of the transformer, adjustable gear of the transformer, initial number of capacitor banks, maximum number of capacitor banks, rated capacity of the transformer, maximum allowable gear adjustment times of the transformer bank in one day, maximum allowable switching times of the capacitor bank in one day, and reactive compensation capacity of the capacitor bank.
[0095] In this embodiment, the transformer parameters are rated voltage 110kV / 38.5kV, short-circuit voltage percentage Uk%=10.5, rated capacity 63MVA, transformer tap position 110±4×1.5% / 38.5kV, and maximum number of transformer operations per day M. q =24, the maximum number of operations per day of the capacitor bank M c =24.
[0096] Table 1 gives the electrical parameters (part) required for step S1, and Table 2 gives the load data of step S1.
[0097] Table 1. Electrical parameters (partial)
[0098]
[0099] Table 2. Load table (unit: Mw)
[0100] <![CDATA[P1=32]]> <![CDATA[P2=28]]> <![CDATA[P3=26]]> <![CDATA[P4=26.4]]> <![CDATA[P5=27.8]]> <![CDATA[P6=33]]> <![CDATA[P7=38]]> <![CDATA[P8=46]]> <![CDATA[P9=53]]> <![CDATA[P 10 =56]]> <![CDATA[P 11 =52]]> <![CDATA[P 12 =48]]> <![CDATA[P 13 =47]]> <![CDATA[P 14 =49]]> <![CDATA[P 15 =53]]> <![CDATA[P 16 =58]]> <![CDATA[P 17 =64]]> <![CDATA[P 18 =60]]> <![CDATA[P 19 =59.5]]> <![CDATA[P 20 =57]]> <![CDATA[P 21 =50]]> <![CDATA[P 22 =44]]> <![CDATA[P 23 =37]]> <![CDATA[P 24 =32.4]]>
[0101] S2. Initialize the electrical parameters and establish the initial population.
[0102] Set the number of iterations to 1, determine the reference voltage, input the electrical parameters in Table 1 and the load in Table 2 as initial values into the program, and establish the population G t , G t The mathematical description is as follows:
[0103]
[0104] G t =[P i,t …P m,t ] T
[0105] S3, the population G t Iterate and obtain the reactive power optimization result. The process is as follows:
[0106] First, obtain the value of the current hour t and set the load P t Access Figure 2 at the load end.
[0107] Next, based on the initial population generated in S2, the particle P i,t Substitute the initial number of capacitor banks and initial transformer ratio corresponding to the control variables into the following equation: Figure 2 In the topology shown, the power flow is solved and the active network losses and voltage offset of the network are calculated.
[0108] Then, calculate the particle fitness and obtain the optimal particle p at that hour t t , the optimal population GB t and the global optimal particle A t The calculation formula of the fitness function FF is:
[0109] FF=F+Y
[0110] Among them, F is the objective function and Y is the penalty intensity.
[0111] Next, the fitness of the particles is sorted from small to large, and the initial population is grouped by selecting the first 20% of the particles as pioneering particles and the last 80% of the particles as basic particles.
[0112] Then, different inertia weights are assigned to particles depending on whether they are pioneering particles. For basic particles, a constant is given as the inertia weight of the particle; for pioneering particles, the calculation method of the inertia weight δ for each iteration is as follows:
[0113]
[0114] Next, after determining the inertia weights of various particles, substitute the particles and inertia weights δ into the velocity update formula to update the particle velocity and population. The update formula is as follows:
[0115] v′ i,t =δ·v i,t +c1·rand1·[B i,t -P i,t ]+c2·rand2·[p t -P i,t ]
[0116] P′ i,t =P i,t +v′ i,t
[0117] Then, the newly generated population is selected: the "last-place elimination" selection method is used. The "last-place elimination" selection method is to select the top 10% of the elite population, which will directly enter the next generation; for the second-best 60% of the population, the tournament selection method is used to compete between the two, and the one with the lowest fitness wins, and the winner will enter the next generation; the last 30% of the population is randomly updated.
[0118] Next, the newly generated population is crossovered: for each particle in the basic population, it is only crossovered with particles in the pioneering population to achieve the purpose of inheriting the excellent traits of the pioneering population; and for the pioneering population, the population will crossover within the population to imitate the breeding process and select better quality particles. The above crossover operation is mathematically described as:
[0119]
[0120] Here, a represents a random number uniformly distributed between (0,1).
[0121] Then, it is determined whether the particle has crossed the boundary. It is determined whether the particle has crossed the boundary based on the constraint conditions: if it has crossed the boundary, the particle that has crossed the boundary is punished; if it has not crossed the boundary, it goes directly to the next step. A penalty strength Y is imposed on each particle that has crossed the boundary, and the obtained Y is added to the objective function F to obtain the fitness function FF. The calculation formula of the penalty strength Y is:
[0122]
[0123] Next, the newly obtained population G′ t With the original population G t Compare: Determine the optimal particle p′ in the new population t Is it better than the global optimal particle A? t If so, the global optimal particle A t Replace with the newly obtained population G′t Optimal particle p′ t ; If not, do not perform operations on the global optimal particle A t . Determine whether the optimal particle p′ t in the newly obtained population G′ t is superior to the optimal particle p t in the original population G t . If so, replace the optimal particle p t with the optimal particle p′ t of the newly obtained population G′ t ; If not, do not perform operations on the optimal particle p t . Count the iteration number iter = iter + 1.
[0124] Then determine whether the current iteration number iter is greater than the set maximum iteration number maxiter: If iter > maxiter, record the optimization results within hour t, count hour t = t + 1. At the same time, determine whether t > 24. If t > 24, output a total of 24 groups of optimization results from t = 1 to 24; If t < 24, return to step S3; If iter < maxiter, do not change the value of hour t, and repeat step S3.
[0125] In this embodiment, the reference voltage of the high - voltage side of the transformer is taken as 110 kV, and the reference voltage of the low - voltage side is taken as 35 kV; Control Figure 2 the two power supply voltages, the transformer turns ratio, and the number of capacitor banks put into operation in; The inertia weight of the basic population is set to 0.783, and the first constant δ e used to calculate the inertia weight δ is 0.2, and the second constant δ s is 0.9; For the penalty factor L n of out - of - bound particles, considering that the harm caused by the out - of - bound of the switching times on the same day is less than that of the out - of - bound of voltage and reactive power output, so when the number of transformer tap - changing times and the number of capacitor bank switching times are out of bounds, the corresponding penalty factor L n is set to 30, and when the voltage and reactive power output are out of bounds, the corresponding penalty factor L n is set to 50; Figure 3 shows the voltage offset under different iteration numbers. Table 3 shows the number of transformer tap - changing times and the number of capacitor bank switching times under different iteration numbers compared with the traditional nine - zone diagram strategy.
[0126] Table 3. Optimization result table under different iteration numbers
[0127] Transformer gear shifting times Capacitor bank switching times 50 iterations 9 15 40 iterations 10 15 30 iterations 12 16 20 iterations 15 19 Nine-area chart strategy 15 24
[0128] In order to verify the advantages of the present invention over the particle swarm and genetic algorithm alone, Table 4 shows the transformer ratio adjustment times and capacitor bank switching times when the number of iterations is 40. Table 5 shows the optimization results of the objective functions of the three algorithms.
[0129] Table 4. Optimization results of different algorithms
[0130]
[0131]
[0132] Table 5. Optimization value table of objective function
[0133]
[0134] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for reactive power optimization of substation based on particle swarm-genetic fusion algorithm, characterized in that: The substation reactive power optimization method comprises the following steps: S1. Obtain electrical parameters of the substation equipment and load data for the next 24 hours, wherein the electrical parameters include the rated voltage value, frequency value, impedance value, initial transformation ratio of the transformer, adjustable gear of the transformer, initial number of capacitor groups, maximum number of capacitor groups, rated capacity of the transformer, maximum allowable gear adjustment times of the transformer group in one day, maximum allowable switching times of the capacitor group in one day, and reactive power compensation capacity of the capacitor group; S2. Initialize the electrical parameters and establish the initial population. The process is as follows: S201, define hour t=1, 2, 3, ..., 24; S202, set the number of iterations iter to 1, and set the population size m; S203, dividing the load data obtained in step S1 into 24 groups according to hour t; S204, using the number of capacitor bank switching and transformer tap adjustment in the electrical parameters as control variables, discretizing and rounding the control variables as matrix elements to form a matrix, and using the matrix as particles; S205. Establishing a population through particles , The mathematical description is as follows: in, is the i-th particle at hour t, and the population is a }, m is the population size, To control the number of variables, is the jth variable to be controlled in the i-th particle at hour t, i=1,2,…,m, j=1,2,…, ; S3. Population Iterate and obtain the reactive power optimization result. The process is as follows: S301, obtaining the current hour t, and according to the value of the hour t, obtaining the load data corresponding to the current hour t, and substituting it into the low-voltage side bus terminal of the substation; S302: Substitute the particle into the fitness function FF, calculate the particle fitness, and obtain the optimal particle p at the hour t. t , the optimal population GB t and the global optimal particle A t ; S303, sort the particles from small to large according to their fitness, perform grouping operations on the particles, obtain a basic population and a pioneering population, define the top 20% of the particles as the pioneering population, reduce the probability of the particles in the pioneering population being selected, give them a larger speed and then substitute them for update, define the remaining 80% of the particles as the basic population, and update them normally; S304, substitute the number of iterations iter, and update the inertia weight ; The inertia weight The calculation method is as follows: in, , is a pre-given inertia weight The first and second constants of , iter is the number of current iterations, and maxiter is the given maximum number of iterations; S305. Particles and inertia weights Substitute into the velocity update formula to update the particle velocity and population; S306, performing selection and crossover operations on particles, the process is as follows: The "last-place elimination" selection method is used for selection. After binary encoding of each particle, the top 10% of the elite population is removed, and the second-best 60% of the population is selected as parents by the tournament selection method. The remaining 30% of the population is randomly updated. The basic population is cross-operated with the pioneering population, and the pioneering population is cross-operated with the pioneering population. The cross-operation adopts the random number method, which is mathematically described as: in, represents a random number uniformly distributed between (0,1). is the i-th particle at hour t, and m is the population size; S307, set constraints, and determine whether the particle has crossed the boundary according to the constraints: if it has crossed the boundary, punish the particle that has crossed the boundary; if it has not crossed the boundary, directly proceed to the next step; S308, calculate the particle fitness and update the optimal particle and optimal population in the population: substitute the particle into the fitness function FF, update the optimal particle p in the population t , the optimal population GB t and the global optimal particle A t , the original population Update to population ; S309, determine whether the current number of iterations has reached the maximum number of iterations: if not, record the number of iterations iter=iter+1, and return to step S302; if reached, end the current calculation and output the current optimal optimization target; S310, determine whether the hour t is 24: if not, record hour t=t+1, and return to step S301; if satisfied, output active network loss, voltage offset, transformer tap adjustment times, and capacitor bank switching times as the final optimization result.
2. A method for optimizing reactive power of a substation based on a particle swarm-genetic fusion algorithm according to claim 1, characterized in that: The process of setting up the constraints is as follows: The particles Substitute the initial number of capacitor banks and initial transformer ratio corresponding to the control variables into the substation network topology structure to be optimized, and perform power flow calculation constraints; Record the number of capacitor bank switching times KC in hour t t And the number of transformer shifts KQ t , substituting into the action number inequality constraint, the mathematical description is: in, and is the number of capacitor bank switching times and transformer shift times in hour t-1, and and Both are 0, M c M is the maximum allowable switching times of the capacitor bank in one day. q The maximum number of times the transformer group can be adjusted in one day; Obtain the adjustable gear of the transformer and the reactive compensation capacity of the parallel capacitor in step S1, and substitute them into the limited inequality constraint, which is mathematically described as: in, and are the minimum and maximum values of the transformer gear respectively. and are the minimum and maximum values of the reactive power compensation capacity of the parallel capacitor, is the current gear position of the qth transformer at hour t, N1 is the total number of transformers, Q kt is the reactive compensation capacity of the kth parallel capacitor at hour t, and N2 is the number of parallel capacitors.
3. The method for optimizing reactive power of a substation based on a particle swarm-genetic fusion algorithm according to claim 2 is characterized in that: The update formula for particle velocity and population is as follows: in, is the velocity of the ith particle at that hour t, is the updated speed, is the inertia weight, c1 and c2 are the first and second learning factors for speed update, rand1 and rand2 are two random numbers uniformly distributed between (0, 1), is the optimal population GB at that hour t t The particles in the t is the optimal particle at that hour t, is the ith particle at that hour t, is the updated i-th particle, and the updated population is composed of the updated particles .
4. The method for optimizing reactive power of a substation based on a particle swarm-genetic fusion algorithm according to claim 3 is characterized in that: In step S307, the out-of-bounds particles are penalized, and the penalty intensity is calculated as follows: Among them, Y is the intensity of the penalty for crossing the boundary, is the number of variables subject to constraints, is a large constant, is the number of out-of-bounds times. If the nth variable subject to the constraint condition out-of-bounds occurs, its value is the absolute value of the difference between the boundary and the variable. If the nth variable does not out-of-bounds, its value is 0.
5. The method for optimizing reactive power of a substation based on a particle swarm-genetic fusion algorithm according to claim 1, characterized in that: The calculation formula of the fitness function FF is: Among them, F is the objective function and Y is the penalty intensity; The calculation formula of the objective function is: in, are the weights of the optimization function of active network loss and the weights of the optimization function of voltage quality, respectively, and , , the present invention uses the current value minus the minimum value divided by the range to normalize the target; is the optimization function of active network loss, and its calculation formula is: Among them, N r is the total number of branches of the substation network topology to be optimized, G a,b is the conductance of the branch r between nodes a and b, U a , U b are the voltages at nodes a and b respectively, , are the phase angles of nodes a and b respectively; is the optimization function of voltage quality, and its calculation formula is: Among them, N1 is the total number of transformers, and are the voltage on the low-voltage side of the transformer bus and its expected value respectively.