Transmission section limit power calculation based on improved-inspired bat algorithm

The transmission section in the interconnected power grid may expand the blackout accident. It is helpful for the dispatching department to adjust operational mode in time to avoid large area blackout incidents by quickly searching the key transmission section and calculating the limit transmission power of the section. A power flow transfer ratio C is proposed in the paper, which can effectively improve the selection accuracy and speed of the K value. A correction mechanism is proposed to select the K value, which can improve the search efficiency of power transmission section based on the K shortest path algorithm. A calculation model of the ultimate transmission power of transmission sections is constructed. The improved bat-inspired algorithm is proposed to solve the model. The calculation results based on IEEE39 bus test system verify the effectiveness of this method.


Introduction
In response to environmental pollution and energy shortages, renewable energy, represented by photovoltaic and wind power, is widely used in power systems .However, as renewable energy sources are connected to the grid on a large scale, their own random and intermittent characteristics can cause complex and variable grid operation.Random faults and planned maintenance are superimposed on each other, causing the topology of the grid to change constantly.The grid operation mode is more flexible and changeable, which makes the margin of safe operation of the grid shrink, and easily triggers regional chain failures.Therefore, the dispatcher should take the grid transmission section as a key link in the safety monitoring and analysis, through fast and accurate search of the grid transmission section, and through the calculation of the section limit transmission power to accurately grasp the grid operation boundary, to ensure the safe and stable operation of the grid [1][2][3].
In this paper, the research is based on the K shortest path, and the accurate selection of K values is achieved after using the correction method, thus realising a fast and accurate search of transmission cross sections.This paper constructs a mathematical model of the limiting transmitted power of key transmission cross-sections based on the optimal tide.The active tide transmitted by the line on the section is used as the objective function and the improved bat algorithm is used to optimise the calculation under safe operating constraints, so that the ultimate transmission power of the transmission section can be calculated quickly and accurately.This ensures that the dispatcher is aware of the grid operating boundaries and makes timely adjustments according to the transmitted power.

Transmission section definition
According to the circuit principle, if that a transmission section consists of lines n(n=1,2,…,u,…,v); when line v is disconnected by a fault, the remaining lines in the section other than v will be affected by the transfer of its active tide, whereas the line u is affected by the disconnection of line v, the amount of change in active tide is expressed in the following equation: ) Where: P v represents the active power flow before the fault disconnection of line v. ΔP u is the power flow change of line u affected by active power flow transfer after line v is disconnected.η v-u represents the power flow transfer factor between line u and line v after line v is disconnected.
Transmission section definition: For an overloaded branch, the set of all branches of power flow transfer factor η>η 0 in the network is called the transmission section of the overload branch.η 0 can be set according to actual requirements, and its range is generally 0.2 ~ 0.3.
After the overload branch trip, the branch with the electrical distance close to the overload branch will be greatly affected by the power flow transfer.In contrast, the branch with the distance is less affected [11].How finding out the tidal transfer factor of the large circuit becomes the key to determining the transmission cross-section.

K shortest path method
The K shortest path is an extension of the shortest path search problem, and there are many algorithms [4][5][6][7][8][9].However, the algorithms in the reference were slightly complex and inefficient, so this paper adopts the K shortest path search algorithm of nearest neighbour nodes [12].The first thing that can be determined is that the sub-shortest path must be a node near the shortest path.On this basis, the K shortest path from source point v i to v j can be solved.The specific steps of the algorithm are as follows.
1) Queue Length is used to store different paths, and the queue is sorted in ascending order, so L k can be used to represent the K th shortest path from the source point to the vertex.Use an array Next to store the nearest neighbour nodes that are different from the shortest path node.
2) Dijkstra algorithm is adopted to work out the shortest path L 1 , then put L 1 into Length.Note that k is one.
3) The optimised K value is obtained by the correction method K value selection method.4) Take out Lk from Length and do the following for each node v t of the path except v j .In the last step, we need to find all nodes v s near v t that is not on path L k .If v s is not in the array Next, it is regarded as a new neighbour node and added to Next.Meanwhile, the Dijkstra algorithm calculates the shortest path of Lk through the neighbour node and marks the shortest path as path Temp.If vs is already in the Next, use the Dijkstra algorithm calculate the shortest path to truncate Lk at v s .Add Temp to queue Length, ascending order, then update K.All the values of L k that we get at the end of the loop are the K shortest paths.

Selection of K value based on correction method
As long as the value of K is large enough, the K shortest path must contain all branches, but this will inevitably prolong the search time.If the value of K is too small, the transmission section cannot contain all branches that meet the conditions.Therefore, selecting the K value is very important when using the K shortest path to search the transmission section.Both the traditional empirical method and the power flow transfer coefficient optimisation method have the problems of poor accuracy and poor fitness, so a new K value selection method is needed to raise the upper limit of the K shortest path.
As for selecting the K value, use the correction method in this paper.Use multiple corrections calculate the power flow transfer ratio C, which can effectively improve the selection accuracy and fitness of the K value.The correction method is described below.
1) Firstly, select the K value randomly.However, select a smaller K value according to the grid structure, which will shorten the time consuming and improve the subsequent search efficiency.

NESP-2023
Journal of Physics: Conference Series 2592 (2023) 012082 IOP Publishing doi:10.1088/1742-6596/2592/1/0120823 2) After the K shortest paths are obtained according to the K value selected in the first step, the power flow transfer ratio C is calculated between the K-1 shortest path and the K shortest path.If the difference of C is small, and the power flow transfer factor of the K shortest path is still greater than C. The K value can be added by one, and the K shortest path is recalculated.
3) Through multiple comparison corrections, the current K value can be considered as the optimal K value until the C value is tremendous, and the absolute value of the power flow transfer factor of the shortest path K is far less than η 0 .

Definition and mathematical model of transmission limit of the section
Transmission limit of the section calculation refers to the online calculation of the maximum transmission capacity of two regional intermittent surface lines under the current grid operation state, with no overload, node voltage crossing limit, and satisfying the safety constraints.The ultimate transmission power mathematical model is a nonlinear and continuous optimisation problem.Based on OPF, this paper constructs a mathematical model of transmission limit of the section under static safe operation.When solving the ultimate transmission limit of a certain section, the optimisation objective is to maximise the transmission limit of the section, and its objective function is: Where P ij is the active power of line L ij along the specified power flow direction (from power supply zone to power receiving zone).S Ω is the set of lines in a section.The negative value of limiting transmission power is taken as a minimum problem.The static safety equation constraint is the power flow equation constraint, as shown in Equation ( 4).Inequality constraints are shown in Equation ( 5), which are active and reactive power output constraints of adjustable generator sets, node voltage amplitude constraints, and line static operation constraints.The equation constraint is: Where P Gi and Q Gi represent the active power and reactive power of node i, respectively; P Li and Q Li represent the active power and reactive power of node I; V i is the voltage amplitude of node i, G ij , B ij , and θ ij are the conductance, susceptance, and phase Angle difference between nodes i and j, respectively.The inequality constraint is: Where S G represents the set of adjustable active generator sets; S R represents the set of adjustable reactive generator sets; S N represents the set of nodes; S L represents the set of lines.
The load growth model adopted in this paper is the regional proportional load growth mode [10].On the premise that the change of network loss is ignored, the change of the active power output of the generators in the power transmission area is equal to the change of the active power of the load nodes in the power receiving area: ( 5 ) When the increment of total active loads in the receiving area is ∆P L , the variation rule of active and reactive power of load nodes in the receiving area is: Where ∆P Li is the increment of active load of each node in the power receiving area; P Li is the initial active power of load node i in the receiving area; P L is the sum of the initial active power of load nodes in the receiving area; φ i is the increasing power factor Angle of the load node i, and a constant power factor is adopted.

Improved bat-inspired optimisation algorithm
Bat algorithm has good optimisation ability, but because it uses a random method to generate the initial population, the population diversity is poor.It is easy to become premature and falls into optimal local value.IBA was thus used to update the position of the bat population by introducing backward learning, increasing the inverse solution, i.e. increasing the diversity of the population and making the population less likely to fall into a local optimum.The Lagrangian interpolation method was also introduced to model the polynomial, which accelerated the convergence speed and improved the local search ability.The improved bat calculation increases the population diversity and balances the global search and local exploration ability of bats, making them less likely to fall into local optima and enhancing the performance of the algorithm.
In this paper, the control variables are determined as the active output of the generating units in the transmission area and the corresponding voltage amplitude of the generator nodes, except for the balancing units.The control variables represent the location of individual unit information:

[ , , , ]
T ji jn ji jn According to Equation (4), individuals calculate the power flow in the iterative process.Use the penalty function method deal with the individuals whose related variables do not satisfy the inequality constraint equation (5).The Lagrangian interpolation method has a neat and compact structure, which is convenient for theoretical analysis, so this paper uses the Lagrangian model in n-dimensional decision space to model the information location of individual units.The formula is as follows: 0 ( ) ( ) Where: f i is the objective function value.li (x) is the Lagrangian polynomial.This paper introduces the concept of reverse learning and applies it to bat algorithm.P (x 1 ,x 2 ,⋯,x n ) is regarded as the bat position, and the objective function of the original bat position and the reverse solution are compared.If the objective function value of the reverse solution is better than that of the original bat position, the position of the reverse solution is used to replace the original bat position, otherwise, the original bat position is continued to learn.
Reverse learning is defined as follows: then the inverse solution of x i is: With the help of the formula, the pulse frequency f, the loudness A and the emission frequency R can be updated as follows: Where: U avg is the average adaptation value of all individuals in the population; U best is the best individual in the current population.The update of f 1 depends on the average adaptation value of the current population.The current number of iterations and the weights occupied by both are the constants α and γ, respectively; f min is a constant used to set and control the minimum value of f 1 .The update process of f 2 is the opposite of f 1 , and is calculated by setting the sum of the C w .
Where f max is the upper limit of the pulse frequency, since the update of pulse frequencies f 1 and f 2 depends on the current number of iterations and the average adaptation value of the population.The loudness A and the firing frequency R can change adaptively according to the algorithm's optimisation search process.
Therefore, the adaptation values of all individual units are calculated by updating the individual unit speed and individual unit position according to the formula as follows: (14) Where: v i is the random velocity at the current position.The inertia weight ω can affect the local and global optimal-seeking ability of the unit; U * is the current optimal solution of individual unit I; U g * is the optimal solution of the current population (i.e., the global optimal unit solution); r 1 and r 2 are uniform random numbers in the range of (0,1); µ is the weight coefficient, which is used to constrain the iteration step of the individual unit.The value of µ is in the range of (0,1]. To determine whether the individual unit performs a local search operation, if the condition is satisfied, the local search is performed according to the formula, and the adaptation value is calculated.When the evaluation index t<0.4,the individual unit i position is updated as: * ( ) Where: evaluation index t=k/k max , k max is the maximum number of iterations, then k∈(0,1]; A is the average loudness of all current units; s is the ratio of the distance between the upper and lower boundaries of the feasible solution domain to the number of units; δ∈[-1,1] is a random vector.Judgment is made on whether individual units are subjected to the mutation operation.If the condition is satisfied, the mutation is performed, then the adaptation value is calculated to update the individual unit location parameters and the global optimal unit solution.Judgment is made on whether to terminate the condition, and if it is satisfied, the limit transmission power value and the optimal unit solution are output for that transmission section.

General flow of the algorithm
Use the K shortest path selected by the correction method search key transmission sections.Use IBA to calculate the ultimate transmission limit of the section.The specific steps are as follows.
1) Use the correction method select the K value, and an optimal K value suitable for the current situation will be obtained after the repeated cyclic operation.
2) Use the Dijkstra algorithm calculate the shortest path.
3) After the shortest path is obtained, the nearest neighbour nodes are selected based on the shortest path, and the K shortest path algorithm is used to find the sub-short path.
4) Through the search of the K shortest path, the K shortest path satisfying the condition of K value is obtained to determine the transmission section.
5) Use IBA algorithm formula to update the individual unit and its parameters.6) Continuously optimise unit parameters through local search.7) By searching the solution set direction of the global optimal unit information location, the global optimal solution and transmission limit of the section are obtained.

Analysis of algorithms
The IEEE39 bus system as shown in Fig. 1 is used to verify the effectiveness of the proposed method.

Key transmission cross-section identification based on correction method K value selection of the K shortest path algorithm
Suppose the branch l 5-6 is overloaded and removed, two eligible shortest paths, P1(5-8-7-6) and P2(5-4-14-13-10-11-6), are obtained according to the selection of K values of the correction method.Detailed simulation results are shown in Table 1, and the transmission cross-section can be determined as S1(7-6,4-14,14-13,13-10) by judging the currents in the first two shortest paths.Table 1.Simulation results of IEEE39 bus system under l Suppose the method of reference [13] is searched.In that case, the branches l 4-14 , l 14-13 , and l 13-10 on the 2nd shortest path will be missed.The method of reference [13] will contain a large number of additional branches beyond these two shortest paths, which is caused by the poor adaptability of the algorithm.The fixed K value will make the shortest path search produce the problem of omission or multiple selections, so the correction method to select the K value realises the dynamic selection of the K value, which makes the shortest path search results more accurate and adaptable.
According to the theoretical calculation results, it is found that the absolute value of the tidal transfer factor of all branches on the path is greater than η 0 .The analysis also finds that excluding these branches, the largest absolute value of tidal transfer factor is only 0.054, which occurs on branch l 4-3 of path P3.The simulation results show that all the branches with larger tidal transfer factors caused by overload removal of branch l 5-6 are included in transmission section S1.The simulation results proves the correctness and effectiveness of the method in this paper.

Transmission limit of the section calculation based on improved-inspired bat algorithm
Assume that branch l 3-18 is overloaded and removed, forming a section S2 with l 1-2 , l 3-4 , and l 15-16 as the line collection.Calculate the limit transmission power of section S2 after removing l 3-18 by using IBA.The calculated values of the optimal adjustment, the ultimate transmission power of the generator set and the balance set in the power transmission zone are given in the Table 2.By setting the parameters of IBA and setting the active output of generators 30, 33, 34, 35, 36, 37, 38 along with the voltage magnitude of corresponding units as the control variable X, the active power of the load of node 1, 4, 7, 8, 9, 12, 15, 31, 39 in the receiving area changes according to equation ( 15) and ( 16).Generator 31 is the balancing unit.The theoretical analysis indicates that all the generating units in the transmission area have reached the upper limit of active power output, the load node output of the receiving area also increases accordingly.The limit transmission power of the transmission section after getting branch l 3-18 disconnected is the maximum, but the theory and optimisation results do not match.Analysis of the result indicates that although the active power of generators 30 and 34 has not reached its limit boundary, the apparent power of section lines l 15-16 is 596.44 MVA, which is close to its apparent power limit boundary (600 MVA).The apparent power of other section lines l 2-3 is 495.78MVA, close to its apparent power limit boundary (500 MVA).The above phenomenon shows that before the active power of all generators in the power transmission area reaches the limit boundary, the limit of static operation power in section lines l 15-16 and l 2-3 prevents the active power of generators 30 and 34 from achieving its limit boundary.This shows that using IBA calculate the limit transmission power of the transmission crosssection is in line with the actual grid operation boundary requirements.
The convergence curve of the transmission limit of the section by IBA is shown in Fig. 2. Compared with the traditional bat-inspired algorithm, the IBA converges faster.At the same time, the global search and local exploration ability of the IBA is strong, which is not easy to fall into the local optimum.The IBA can quickly converge to the solution set of global optimal unit information location, with strong algorithm performance and good search performance, which proves the accuracy and high efficiency of IBA in the calculation of transmission limit of the section.

Analysis of algorithms
Random faults and planned power outages make the grid operation mode complex and variable, and transmission cross sections change frequently.The large-scale connection of renewable energy sources such as photovoltaic and wind power to the grid, as well as the year-on-year increase in customer load, can cause frequent fluctuations in the power transmitted between the transmission and receiving areas.Therefore, online fast identification of transmission cross-sections and accurate calculation of the limit transmission power of cross-sections are of great significance for online dispatching decisions of power systems.This paper proposes a K value correction method based on the tidal transfer coefficient ratio C to select the K shortest path transmission cross section search method, which effectively improves the problem of poor adaptability of K values selected by empirical method and poor accuracy of cross section search, and enhances the upper limit of the K shortest path search.The method achieves a significantly higher calculation speed and more accurate section search for transmission cross-sections.The optimization model of ultimate transmission power is constructed by IBA, and the ultimate transmission limit of the section can be calculated more accurately and quickly.

Fig. 1 .
Fig. 1.The schematic diagram of the IEEE39 bus system

Table 2 .
Calculation results in optimal motor adjustment and ultimate transmission power