Active power distribution network flexible resource collaborative planning method based on improved CS algorithm
By combining the improved cuckoo search algorithm with the particle swarm optimization algorithm, a two-layer optimization model for the distribution network is constructed to optimize the configuration of distributed power sources and energy storage. This solves the problem of coordinated optimization of flexible resource planning and operation of the distribution network under a high proportion of new energy access, realizes the dynamic coupling of equipment capacity configuration and economic dispatch, and improves the solution efficiency and stability.
Patent Information
- Application Number
- CN202510952728.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-17
Smart Images

Figure CN120806254A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power distribution network planning, in particular to a kind of active power distribution network flexible resource collaborative planning technology based on improved CS hybrid algorithm. BACKGROUND
[0002] With high penetration of renewable energy in distribution network, the traditional one-way flow operation mode faces severe challenges such as voltage fluctuation, line overload and insufficient new energy accommodation capacity. The intermittency and volatility of distributed power sources exacerbate the uncertainty of system operation, while existing planning methods are mostly limited to single resource optimization, such as network reconfiguration or energy storage configuration, lacking of multi-dimensional collaborative regulation of "source-grid-load-storage", resulting in fragmentation of planning scheme in technical economy, flexibility and reliability. Current research, for example, the article "New Power System Generation Planning Considering Source-Grid-Load-Storage Collaborative Optimization Operation under Double Carbon Target" establishes a new power system generation planning mathematical model considering source-grid-load-storage collaborative optimization operation, although it concerns the static configuration of energy storage, but ignores the collaborative potential of load side response and network dynamic adaptation; Some models introduce carbon constraints or multi-stage planning, but do not build a closed-loop feedback mechanism between planning and operation, making it difficult to achieve dynamic supply and demand balance, and easy to cause investment redundancy or operation risk. In this context, there is an urgent need for an active planning method that takes into account the long-term investment economy and short-term operation flexibility to support the efficient and low-carbon transformation of new power systems under the "double carbon" target.
[0003] Based on this, the present application proposes an active distribution network flexible resource collaborative planning method based on improved cuckoo search algorithm. However, the high-dimensional nonlinear characteristics of the double-layer model pose higher requirements for algorithm solving - in current solving algorithms, for example, the article "Research and Application Progress of Cuckoo Search Algorithm" points out the defects of cuckoo search algorithm, which leads to fluctuation of convergence speed due to fixed step size, while traditional particle swarm optimization algorithm is prone to local optimum, both of which are difficult to balance the efficiency of global exploration and local development. Therefore, when using algorithm to solve complex distribution network planning problems, it is of great significance to improve the solving efficiency and stability of high-dimensional problems, and to realize the dynamic coupling of device capacity configuration and economic dispatch. SUMMARY
[0004] The purpose of the present application is to solve the technical problem of collaborative optimization of flexible resource planning and operation of distribution network under high proportion of new energy access, thereby the present application is proposed.
[0005] The technical scheme adopted by the present application is: An active distribution network flexible resource collaborative planning method based on improved CS algorithm, comprising the following steps: Step 1: Constructing a double-layer optimization model of planning and operation integrated active distribution network, the upper model of which takes the minimum annual comprehensive economic cost as the goal to optimize the site selection and capacity of distributed power and energy storage; the lower model of which takes the minimum network loss and the maximum new energy consumption as the goal to generate economic dispatch strategy based on typical day scenario; Step 2: Improving the cuckoo search algorithm to solve the double-layer optimization model of planning and operation integrated active distribution network and obtain the optimal planning scheme.
[0006] The double-layer optimization model of planning and operation integrated active distribution network comprises: The planning layer decides the rated capacity and connection position of the distributed power generation system, the rated power, energy capacity and connection position of the energy storage, and ensures the optimization of system configuration; The running layer determines the optimal daily operation strategy of various controllable components under typical scenarios according to the scheme provided by the planning layer, takes the minimum network loss and the maximum new energy consumption as the goal, and provides feedback information to the planning layer to adjust the planning scheme.
[0007] The objective function of the planning layer is to minimize the annual comprehensive economic cost of the distribution network; the annual comprehensive economic cost includes the annualized investment cost, the operation and maintenance cost of each controllable component, and the power purchase cost of the distribution network, and the objective function of the planning layer is as follows: (1); (2); (3); (4); (5); Wherein, , , represent the source-grid-storage controllable component annualized investment cost, controllable component operation and maintenance cost, and power purchase cost in the annual comprehensive cost of the distribution network; is the annualized value conversion coefficient; is the equipment operation life; r is the discount rate; is the unit power cost of distributed new energy; , are the unit energy cost and unit power cost of energy storage respectively; , are the distributed new energy and energy storage annual operation cost conversion coefficients respectively; is the number of operating days in a year; is the t interaction power between the feeder and the superior grid within the period, a positive value indicates that it flows to the feeder, and a negative value indicates that it flows to the superior grid; is the corresponding transaction electricity price; 、 Photovoltaic and wind power t The active power output of the time period, 、 are their on-grid electricity prices respectively.
[0008] The constraints at the planning layer include the capacity limits of the controllable components to be planned. The specific constraint expressions are as follows: (6); (7); (8); (9); in and They represent the lower limit and upper limit of the rated active power of distributed renewable energy respectively; and They represent the lower and upper limits of the rated charge and discharge power of the energy storage system respectively; and Respectively represent the lower and upper limits of the rated capacity of the energy storage system; and They represent the lower and upper limits of the rated duration of the energy storage system respectively.
[0009] The objective function of the operation layer is to minimize network losses and maximize new energy consumption. The specific objective function is as follows: (10); (11); in, T Indicates the total number of time periods in the optimization cycle, and the value is 24; For each branch of ADN t Total network loss during the time period; represents the total load power of ADN during period t; Represents the set of all branches in the distribution network; Indicates the branch in time period t The square of the current amplitude; Indicates a branch resistance.
[0010] The operation of the distribution network should take into account the physical constraints of the power flow, including meeting the tie line power constraints. The specific constraint expressions are as follows: (12); Where, represents the power transmitted by the public tie line in the active distribution network during period t; and They represent the maximum power and minimum power of the tie line respectively.
[0011] The operation of the distribution network should also consider the physical constraints of power flow, including ensuring that the voltage at each node and the line current are within a safe range. The model is given by the following formula: (13); (14); here, Indicates the probability that the conditions in the brackets are true; Representation node The square of the voltage amplitude at time t; and Node The minimum and maximum allowable voltage values, is the probability of node voltage violation, and Branch The minimum and maximum allowable current values.
[0012] In order to reduce the computational complexity, the DistFlow formula is used to describe the flow relationship, as shown below: (15); (16); (17); (18); in, and represent the square of the voltage amplitude of nodes i and j at time t, and Represent the line resistance and reactance from node i to j, and Respectively represent branches Active and reactive power at time t; Represents the square of the branch current.
[0013] Step 2 is as follows: To solve the two-level planning model for active distribution networks that considers the coordinated configuration of multiple flexible resources, a suitable optimization algorithm must be selected, given the high-dimensional nonlinear characteristics of the problem and the complexity of the two-level structure. The Cuckoo Search (CS) algorithm is optimized and combined with the Particle Swarm Optimization (PSO) algorithm to iteratively solve the two-level planning model for active distribution networks that integrates planning and operation established in Step 1, ultimately obtaining the optimal planning solution. The specific approach includes: Firstly, the model solving variables are defined; the active distribution network bi-level optimization model of planning and operation integration is composed of the upper layer planning and the lower layer operation; The upper layer model takes the minimum annual comprehensive economic cost of the active distribution network as the objective function, and the optimization variables involved include: the installed capacity of the distributed power on each candidate access node , the rated charge and discharge power of the energy storage device , the energy capacity , and the configuration and location variables of various devices, representing whether the corresponding device is installed at the i-th node; The lower layer model takes the minimum operation cost of the distribution network and the maximum renewable energy output as the objective function, and the optimization variables involved include: the charge and discharge power scheduling value of the energy storage device at each period, the node voltage amplitude, the current limit value and the branch power flow.
[0014] In step 2, the improved cuckoo search CS algorithm includes the following steps: First, use the particle swarm optimization algorithm to preliminarily solve the model described in step 1, generate an initial population randomly, and in each iteration, evaluate and dynamically update the particles by comparing the fitness function. After the iteration of the particle swarm optimization algorithm is completed, a group of particles is obtained, each particle representing a possible resource configuration scheme, i.e. a possible solution to the model described in step 1; Then, select the better solution as the initial nest site of the cuckoo search algorithm, and use the cuckoo search algorithm to carry out more in-depth global search in the neighborhood range of this solution to find a better nest site, i.e. a better solution; Continuously repeat the above steps until the optimal solution is found or the preset iteration number is reached, and the final result is the solution to the model described in step 1; Step 2-1) uses the particle swarm optimization algorithm to preliminarily solve the model described in step 1; First, the objective function and the constraint conditions of the distribution network planning model described in step 1, including the system topology, capacity limit, operation mode, are taken as inputs, and the input data is preprocessed; then the optimization algorithm parameters are set, including the population size, the maximum iteration number, the inertia weight and the acceleration factor; an initial population is randomly generated, and each particle individual is a complete resource configuration scheme, including the installed capacity of the distributed power , the rated charge and discharge power of the energy storage device , the energy capacity , and the configuration and location variables of various devices; Step 2-2) performs fitness calculation; the fitness value of the particle reflects the quality of the solution, i.e. the quality of the planning scheme to be generated; The fitness value of each solution is calculated by calculating the objective function value and weighting it according to the weight, and compared, which measures the pros and cons of different schemes under the satisfaction of various constraints, that is, its performance in reducing the comprehensive cost of the system and improving the new energy consumption target, and the solution with high fitness is the better scheme, and iterative calculation is performed; in each iteration, the algorithm takes the position and speed of the solution with the highest fitness as the current global optimal solution, and continuously adjusts other solutions through the position and speed updating mechanism, so that the solutions converge to a better direction, until the optimal solution is found or the preset number of iterations is reached, so as to output the final optimal planning scheme; Since the model described in step 1 contains both planning and running double objective functions, it is considered to unify multiple objectives into a single objective function suitable for algorithm solving; the linear weighting method is used to construct the fitness function, and the analytic hierarchy process is used to determine the weight of each objective function; the fitness function constructed is as follows: (19); The planning layer objective function includes annualized investment cost, operation and maintenance cost of each controllable component, and power purchase cost of the distribution network. The running layer objective function includes network loss and new energy consumption capacity. and The weight set by the analytic hierarchy process reflects the difference in emphasis between long-term investment and daily operation of the system. Step 2-3) Update the position and speed of the particle; after calculating the fitness of each particle, in each iteration, record the historical best solution of the particle individual and the current best solution of the population Replace the inferior solution according to the speed and position updating formula of the particle, and update the speed and position of the particle, so that the solution quickly converges to a better direction, and find better solutions round by round; the speed and position updating method of the particle is as follows: (20); and respectively represent the position and speed of the particle in iteration in dimensional space; is the inertia weight; and are acceleration factors; is a random number in the range of [0, 1], and are the historical best solution of the particle individual and the best solution of the population, respectively; Step 2-4) determining whether the termination condition is met; when the number of iterations reaches the preset maximum value, or the change of the optimal fitness value of the population is less than the set convergence threshold for consecutive times, i.e. the global optimal solution is found, the optimization process is terminated; if the condition is met, the result is input into the cuckoo search algorithm for further calculation; otherwise, return to step 2-2) to re-calculate the fitness value of the particle swarm optimization algorithm and continue the iterative optimization; Step 2-5) based on the result obtained by the particle swarm optimization algorithm, further solving the model described in step 1 using the improved cuckoo search algorithm CS; the cuckoo search algorithm learns the parasitism and hatching process of the cuckoo nest, and simulates the cuckoo's nest stealing behavior by randomly selecting and replacing part of the solution, while introducing the Lévy flight strategy to broaden the search space; however, when applying the cuckoo search algorithm to solve the double-layer planning model of the active distribution network, there are problems such as being easy to fall into local optimal solution and low search efficiency; therefore, by improving the step factor of the cuckoo search algorithm and combining it with the particle swarm algorithm, the global search ability and convergence speed are improved; The result obtained by the particle swarm optimization algorithm is used as the initial bird nest of the improved cuckoo search algorithm; each bird nest represents a possible resource allocation scheme; the improved cuckoo search algorithm is used to conduct a more in-depth global search in the neighborhood range of this solution to find a better nest position, i.e. a better solution; the above steps are repeatedly performed until the optimal solution is found or the preset number of iterations is reached, and the final result is the global optimal solution of the model described in step 1, and the optimal planning scheme is output; the specific description is as follows: Step 2-5-1) initializing the basic parameters of the cuckoo search algorithm, including the number of bird nests, the discovery probability, the maximum number of iterations, and generating the initial positions of the bird nests in a random manner; the position of the first bird nest is set as , , , wherein d is the dimension of the problem to be solved; the fitness value of each bird nest is calculated, compared and updated, and the initial optimal fitness function value is obtained; the fitness value is the same as that in the above step; the current bird nest position is updated, and the calculation formula for updating the bird nest is as follows: (21) , , wherein represents the position of the i-th bird nest in the t-th generation; each particle bird nest is a complete resource allocation scheme, including the installed capacity of the distributed power source , the rated charge and discharge power of the energy storage device , the energy capacity, and the configuration and location variables of various devices; , , the new position of the offspring is obtained by adjusting the fitness between the position of the current nest and the global optimal position, so that the solution does not converge to the global optimal solution; denotes a step factor, which controls the size of the step and in turn controls the search range of the solution; is a Lévy flight random search function, is the related index of Lévy flight, which generates the probability distribution of flight step, enhances the randomness of the search process, and avoids falling into local optimal solution; Lévy flight is a kind of random walk, which is characterized by the probability distribution of step length, that is, the probability of taking a large step during random walk is relatively high, which helps to explore a wider search space, and its calculation formula is as follows: (22); denotes the distribution of Lévy flight, where is the related index of Lévy flight distribution, denotes a heavy-tailed power-law distribution function, denotes a random number generated in the range of [-1, 1]; However, the traditional cuckoo search algorithm relies heavily on Lévy flight, which can easily lead to slow convergence speed; in order to avoid excessive exploration caused by too large step length of Lévy flight, the step factor of cuckoo search algorithm is improved; in the optimization process, the step factor will be dynamically adjusted according to the distance between the current nest and the optimal nest; the calculation formula of the step factor after optimization is as follows: (23); is the improved step factor, denotes the position of the current largest nest, denotes the position of the current smallest nest; The step factor is dynamically adjusted, and the farthest flight is optimized; when the cuckoo's egg is found and abandoned by other birds, the cuckoo will choose to fly farther and lay eggs in a safer place to improve the survival rate of offspring; this optimization method is called farthest flight distance optimization; dynamic adjustment of step length helps to strengthen search diversity in the early stage and avoid premature convergence; gradually shrink the step length in the later stage to improve precision and provide a basis for subsequent individual disturbance and group diversity maintenance; based on this, in order to further enhance the adaptability of cuckoo search algorithm at different stages, dynamic step length optimization is introduced, and the calculation formula of the step factor is as follows: (24); Step length factor representing the optimization of the farthest flight distance; by calculating the distance between the nests, the step length factor can be dynamically adjusted to avoid slow convergence or skipping the optimal solution due to fixed step length; Step 2-5-2) Perform algorithm iteration and update the nest position; select the better nest position and compare it with the fitness value of the last generation of nests; replace the inferior solution; update the nest position by Lévy flight to find a better solution; During the algorithm iteration process, the position of each nest will be adjusted with the update of the calculated fitness value; sort all nests after each generation calculation by fitness; record the individual historical optimal position The global optimal position of the current population ; At the same time, replace the inferior solution in the population to ensure that the high-quality solution is retained and passed on in the population; Step 2-5-3) Convergence condition judgment; determine whether the current iteration meets the stopping condition; when the iteration number reaches the preset maximum value, or the change of the optimal fitness value of the population is lower than the set convergence threshold for several times in a row, terminate the optimization process and output the global optimal solution; if the condition is met, exit the loop; otherwise, return to step 2-6) and repeat the fitness calculation to continue the iteration optimization; Step 2-5-4) Output the global optimal solution; after optimization, output the final global optimal solution, i.e. the optimal resource allocation scheme of the model described in step 1, including the installed capacity of distributed power , the rated charge and discharge power of energy storage equipment , the energy capacity , and the configuration and site selection variables of various equipment, meeting the economic and feasibility requirements.
[0015] The application also proposes an improved cuckoo search CS algorithm for solving a double-layer planning model with a double-layer structure and obtaining an optimal planning scheme; the double-layer planning model with a double-layer structure includes / does not limit the planning-operation double-layer model of the power grid; Overall, the algorithm first uses the particle swarm optimization algorithm to preliminarily solve the double-layer planning model; in each round of iteration, the particles are evaluated and dynamically updated by comparing the fitness function; after the particle swarm optimization algorithm iteration is completed, a group of particles is obtained, each particle representing a possible scheme, i.e. a possible solution of the double-layer planning model; Then, select the better solution as the initial nest position of the cuckoo search algorithm; use the cuckoo search algorithm to conduct a more in-depth global search in the neighborhood range of this solution to find a better nest position, i.e. a better solution; Repeat the above steps until the optimal solution is found or the preset iteration number is reached; the final result is the solution of the double-layer planning model.
[0016] Specifically, the following steps are included: Step 1: using a particle swarm optimization algorithm to solve the model initially; Step 2: fitness calculation; the fitness value of a particle reflects the pros and cons of the solution, that is, the pros and cons of a to-be-generated scheme; Step 3: update the position and speed of the particle; after calculating the fitness of each particle, record the historical best solution of the particle individual in each iteration the current best solution of the population , replace the inferior solution according to the position and speed updating formula of the particle, and update the position and speed of the particle iteratively, so that the solution converges to a better direction quickly, and a better solution is found round by round; Step 4: judge whether the termination condition is met; Step 5: output the global optimal solution; after optimization, the final global optimal solution, that is, the optimal scheme of the model, is output.
[0017] In step 1, the objective function and constraint conditions of the model described in step 1 are input first, and the input data is preprocessed; then the optimization algorithm parameters are set, including population size, maximum iteration number, inertia weight and acceleration factor; the initial population is randomly generated, and each particle individual is a complete scheme; In step 2, the fitness value of each solution is calculated by calculating the objective function value and weighting the sum according to the weight, and the fitness values are compared to measure the pros and cons of different schemes under the condition of meeting various constraints. The solution with high fitness is a better scheme, and iterative calculation is performed; in each iteration, the algorithm takes the position and speed of the solution with the highest fitness as the current global optimal solution, and continuously adjusts other solutions through the position and speed updating mechanism, so that the solution converges to a better direction. Until the optimal solution is found or the preset iteration number is reached, the final optimal scheme is output; For the model containing planning and running double objective functions, consider converting the multi-objective into a single objective function suitable for algorithm solving; use linear weighting method to construct fitness function, and use analytic hierarchy process to determine the weight of each objective function; the fitness function constructed is as follows: (19); is the planning layer objective function; is the running layer objective function; and is the weight set by the analytic hierarchy process; In step 3, the position and speed updating method of the particle is as follows: (20); and respectively represent the position and velocity of the particle in dimensional space at the th iteration; is the inertia weight; and is the acceleration factor; is a random number in the range of [0, 1], and are the individual best solution and the population best solution of the particle respectively; In step 4, when the number of iterations reaches the preset maximum value, or the change of the population optimal fitness value is lower than the set convergence threshold for consecutive times, the global optimal solution is found, and the optimization process is terminated; if the conditions are met, the loop of the PSO algorithm is exited, and the result is input into the cuckoo search algorithm for further calculation; otherwise, the fitness calculation of the particle swarm optimization algorithm is returned to step 2 to continue the iteration optimization; In step 5, Based on the result obtained by the particle swarm optimization algorithm, the improved cuckoo search algorithm CS is used to further solve the model described in step 1; the cuckoo search algorithm learns the parasitism and hatching process of the cuckoo nest, and simulates the nest stealing behavior of the cuckoo by randomly selecting and replacing part of the solution, while introducing the Lévy flight strategy to broaden the search space; However, when applying the cuckoo search algorithm to solve the model, there are problems such as easy to fall into local optimal solution and low search efficiency; Therefore, by improving the step factor of the cuckoo search algorithm and combining it with the particle swarm algorithm, the global search ability and convergence speed are improved; The result output by the particle swarm optimization algorithm is used as the initial bird nest of the improved cuckoo search algorithm; each bird nest represents a possible solution; the improved cuckoo search algorithm is used to carry out a more in-depth global search in the neighborhood range of this solution to find a better nest position, i.e. a better solution; the above steps are repeatedly performed until the optimal solution is found or the preset number of iterations is reached, and the final result is the global optimal solution of the model described in step 1, and the optimal planning scheme is output; The step 5 specifically includes the following steps: Step 5-1) Initialize the basic parameters of the cuckoo search algorithm, including the number of bird nests, the discovery probability, the maximum number of iterations, and generate the initial position of the bird nest in a random way; the position of the first bird nest is set as , is the dimension of the problem to be solved; calculate, compare and update the fitness value of each bird nest, and get the initial optimal fitness function value; the fitness value is the same as the above step; update the current bird nest position, and the calculation formula of the bird nest update is as follows: (21); indicates the position of the bird nest at the t-th generation, each particle bird nest is a complete scheme; denotes the new position of the bird nest at the t-th generation, which is obtained by adjusting the fitness between the current nest position and the global optimal position, so that the solution does not converge to the global optimal solution; denotes the new position of the bird nest at the t-th generation, which is obtained by adjusting the fitness between the current nest position and the global optimal position, so that the solution does not converge to the global optimal solution; denotes the new position of the bird nest at the t-th generation, which is obtained by adjusting the fitness between the current nest position and the global optimal position, so that the solution does not converge to the global optimal solution; denotes the step factor, which controls the size of the step and in turn controls the search range of the solution; is a Lévy flight random search function, is the related index of Lévy flight, which generates the probability distribution of flight step length, enhances the randomness of the search process, and avoids falling into local optimal solution; Lévy flight is a kind of random walk, which is characterized by the probability distribution of step length showing heavy-tailed characteristics, that is, the probability of taking a large step during random walk is relatively high, which helps to explore a wider search space, and its calculation formula is as follows: (22); denotes the distribution of Lévy flight, where is the related index of Lévy flight distribution, denotes the heavy-tailed power law distribution function, denotes a random number generated in the range of [-1, 1]; However, the traditional cuckoo search algorithm relies heavily on Lévy flight, which can easily lead to slow convergence speed; in order to avoid excessive exploration caused by too large step length of Lévy flight, the step factor of cuckoo search algorithm is improved; in the optimization process, the step factor will be dynamically adjusted according to the distance between the current bird nest and the optimal bird nest; the calculation formula of the step factor after optimization is as follows: (23); is the improved step factor, denotes the position of the current largest nest, denotes the position of the current smallest nest; The step factor is dynamically adjusted, and the farthest flight is optimized; when the cuckoo's egg is found and abandoned by other birds, the cuckoo will choose to fly a longer distance and lay eggs in a safer place to improve the survival rate of the offspring; this optimization method is called farthest flight distance optimization; dynamic adjustment of step length helps to strengthen search diversity in the early stage and avoid premature convergence; gradually shrink the step length in the later stage to improve the accuracy and provide a basis for subsequent individual disturbance and group diversity maintenance; based on this, in order to further enhance the adaptability of cuckoo search algorithm at different stages, dynamic step length optimization is introduced, and the calculation formula of the step factor is as follows: (twenty four); Indicates the step size factor for optimizing the maximum flight distance. By calculating the distance between bird nests, the step size factor can be dynamically adjusted to prevent the algorithm from converging too slowly or skipping the optimal solution due to a fixed step size. Step 2-5-2) Iterate the algorithm and update the nest location; select a better nest location, compare it with the fitness value of the previous generation of nests, replace the inferior solution, and update the nest location through Lévy flight to find a better solution; During the algorithm iteration process, the position of each bird's nest will be adjusted as the calculated fitness value is updated. All bird's nests calculated in each generation will be ranked by fitness, and the individual historical optimal position will be recorded. The global optimal position of the current population ; At the same time, replace the inferior solutions in the population to ensure that the high-quality solutions are retained and transmitted in the population; Step 2-5-3) Convergence condition determination: Determine whether the current iteration meets the stopping condition. When the number of iterations reaches the preset maximum value, or the change in the optimal fitness value of the group is lower than the set convergence threshold for several consecutive times, terminate the optimization process and output the global optimal solution. If the condition is met, exit the loop; otherwise, return to step 2-6) to repeat the fitness calculation and continue iterative optimization. Step 2-5-4) Output the global optimal solution; after the optimization is completed, output the final global optimal solution, that is, the optimal solution of the model; The said plans include resource allocation plans and planning plans; The model includes a planning-operation two-layer model of the power grid; Compared with the prior art, the present invention has the following technical effects: 1) This invention utilizes a hierarchical coordination mechanism between the planning and operation layers. The planning layer optimizes the long-term configuration of distributed power sources and energy storage, while the operation layer ensures real-time operational safety based on dynamic scheduling strategies and probabilistic constraints. Through iterative feedback, the two layers achieve collaborative optimization of investment and scheduling, addressing the compatibility issues of traditional planning's static models with dynamic scenarios. 2) The improved cuckoo search algorithm of this invention combines the local search capability of particle swarm optimization with the global exploration characteristics of cuckoo search. It optimizes the search efficiency of the solution space through dynamic step size adjustment and Lévy flight strategy, and improves the solution stability under complex constraints of the two-layer model. 3) This invention balances technical economy and operational robustness through the coordinated configuration of multiple resources, providing a feasible planning scheme for the grid connection of a high proportion of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention will be further described below with reference to the accompanying drawings and examples: Figure 1Flowchart of the present application; Figure 2 Flowchart of the improved cuckoo search algorithm of the present application; Figure 3 Topology diagram of the active distribution network flexible resource collaborative planning result based on the improved cuckoo search algorithm of the present application embodiment in IEEE-33 node; Figure 4 Convergence curve comparison diagram of the improved cuckoo search algorithm and the traditional algorithm in the present application embodiment; Figure 5 Topology diagram of the active distribution network flexible resource collaborative planning result based on the improved cuckoo search algorithm of the present application embodiment in IEEE-69 node. DETAILED DESCRIPTION
[0019] An active distribution network flexible resource collaborative planning method based on an improved cuckoo search (CS) algorithm, and the specific steps are as follows: Step 1: Construct a planning and operation integrated active distribution network double-layer optimization model, the upper model of the model takes the minimum annual comprehensive economic cost as the target, and optimizes the site selection and capacity of the distributed power supply and the energy storage; the lower model is based on a typical day scene, takes the minimum network loss and the maximum new energy consumption as the target, and generates an economic dispatching strategy; Step 2: Improve the cuckoo search algorithm, and solve the planning and operation integrated active distribution network double-layer optimization model to obtain an optimal planning scheme.
[0020] The planning and operation integrated active distribution network double-layer optimization model comprises: The planning layer determines the rated capacity and connection position of the distributed power generation system, the rated power, energy capacity and connection position of the energy storage, and ensures the optimization of system configuration; The running layer determines the optimal operation strategy of various controllable components in a typical scene according to the scheme provided by the planning layer, takes the minimum network loss and the maximum new energy consumption as the target, and provides feedback information to the planning layer, and then adjusts the planning scheme.
[0021] The objective function of the planning layer is to minimize the annual comprehensive economic cost of the distribution network. The annual comprehensive economic cost includes the annualized investment cost, the operation and maintenance cost of each controllable component, and the power purchase cost of the distribution network, and the objective function of the planning layer is as follows: (1); (2); (3); (4); (5); wherein, 、 、 respectively represent the annual investment cost of source-grid-storage controllable components, the operation and maintenance cost of controllable components, and the electricity purchase cost in the annual comprehensive cost of the distribution network; is the annual value conversion coefficient; is the equipment operation life; r is the discount rate; is the unit power cost of distributed new energy; 、 respectively represent the unit energy cost and the unit power cost of energy storage; 、 respectively represent the annual operation and maintenance cost conversion coefficients of distributed new energy and energy storage; is the number of operating days in a year; is t the interaction power between the feeder and the superior grid in the time period, a positive value indicates that it flows to the feeder, and a negative value indicates that it flows to the superior grid; is the corresponding transaction price; 、 respectively represent the active power output of photovoltaic and wind power in t the time period, 、 respectively represent the on-grid price thereof.
[0022] The constraint conditions of the planning layer include the capacity limit of the controllable components to be planned, and the expressions of the specific constraints are as follows: (6); (7); (8); (9); wherein and respectively represent the lower limit and the upper limit of the rated active power of distributed new energy; and respectively represent the lower limit and the upper limit of the rated charge-discharge power of the energy storage system; and respectively represent the lower limit and the upper limit of the rated capacity of the energy storage system; and respectively represent the lower limit and the upper limit of the rated duration of the energy storage system.
[0023] The objective function of the operation layer is to minimize the network loss and maximize the new energy consumption, and the specific objective function is as follows: (10); (11); wherein,T Indicates the total number of time periods in the optimization cycle, and the value is 24; For each branch of ADN t Total network loss during the time period; represents the total load power of ADN during period t; Represents the set of all branches in the distribution network; Indicates the branch in time period t The square of the current amplitude; Indicates a branch resistance.
[0024] The operation of the distribution network should take into account the physical constraints of the power flow, including meeting the tie line power constraints. The specific constraint expressions are as follows: (12); Where, represents the power transmitted by the public tie line in the active distribution network during period t; and They represent the maximum power and minimum power of the tie line respectively.
[0025] The operation of the distribution network should take into account the physical constraints of the power flow, including ensuring that the voltage at each node and the line current are within a safe range. The model is given by the following formula: (13); (14); here, Indicates the probability that the conditions in the brackets are true; Representation node The square of the voltage amplitude at time t; and Node The minimum and maximum allowable voltage values, is the probability of node voltage violation. and Branch The minimum and maximum allowable current values.
[0026] In order to reduce the computational complexity, the DistFlow formula is used to describe the flow relationship, as shown below: (15); (16); (17); (18); in, and respectively represent the voltage amplitude square of nodes i and j at time t, and respectively represent the line resistance and reactance of nodes i to j, and respectively represent the active and reactive power of branch at time t; represent the square of branch current.
[0027] The step 2 is specifically: in order to solve the active power distribution network double-layer planning model considering the collaborative configuration of multiple flexible resources, considering the high-dimensional nonlinear characteristics of the problem and the complexity of the double-layer structure, a suitable optimization algorithm needs to be selected for solving. The cuckoo search (CS) algorithm is optimized in the application, and is combined with the particle swarm optimization (PSO) algorithm, the planning and operation integrated active power distribution network double-layer planning model established in step 1 is solved through iteration, and finally the optimal planning scheme is obtained.
[0028] Firstly, the model solving variables are determined; the planning and operation integrated active power distribution network double-layer optimization model is composed of an upper layer planning and a lower layer operation; The upper layer model takes the minimum annual comprehensive economic cost of the active power distribution network as the objective function, and the optimization variables involved include: the installed capacity of the distributed power supply on each candidate access node , the rated charge and discharge power of the energy storage device , the energy capacity , and the configuration and location variables of various devices, representing whether the corresponding device is installed on the i th node; The lower layer model takes the minimum operation cost of the power distribution network and the maximum renewable energy output as the objective function, and the optimization variables involved include: the charge and discharge power scheduling value of the energy storage device in each period, the node voltage amplitude, the current limit and the branch power flow.
[0029] In the step 2, the improved cuckoo search (CS) algorithm includes the following steps: firstly, the particle swarm optimization algorithm is used to preliminarily solve the model in step 1, through randomly generating an initial population, in each round of iteration, the particles are evaluated and dynamically updated by comparing the fitness function, after the iteration of the particle swarm optimization algorithm is completed, a group of particles are obtained, each particle represents a possible resource configuration scheme, that is, a possible solution of the model in step 1. Subsequently, the solution with better performance is selected as the initial nest site of the cuckoo search algorithm, and the cuckoo search algorithm is used to carry out a more in-depth global search in the neighborhood range of the solution, to find a better nest site, that is, a better solution. The above steps are repeatedly performed until the optimal solution is found or the preset iteration number is reached, and finally the result is the solution of the model in step 1.
[0030] Step 2-1) uses the particle swarm optimization algorithm to preliminarily solve the model in step 1.
[0031] First, the objective function and constraint conditions of the power grid planning model described in step 1 are taken as input, including system topology, capacity limit, operation mode, etc., and the input data is preprocessed. Then set the optimization algorithm parameters, including population size, maximum iteration number, inertia weight and acceleration factor, etc.; randomly generate the initial population, each particle individual is a complete resource configuration scheme, including the installed capacity of distributed power , the rated charge and discharge power of energy storage devices , energy capacity , and the configuration and location variables of various devices.
[0032] Step 2-2) Calculate fitness. The fitness value of the particle reflects the pros and cons of the solution, that is, the good or bad of a generated planning scheme.
[0033] By calculating the objective function value and weighting it according to the weight, the fitness value of each solution is calculated and compared to measure the pros and cons of different schemes under various constraint conditions, that is, its performance in reducing system comprehensive cost and improving new energy consumption, etc. The solution with high fitness is a better scheme, and iterative calculation is performed. In each iteration, the algorithm takes the position and speed of the solution with the highest fitness as the current global optimal solution, and continuously adjusts other solutions through position and speed updating mechanism to make the solutions converge to a better direction. Until the optimal solution is found or the preset iteration number is reached, the final optimal planning scheme is output.
[0034] Since the model described in step 1 contains planning and operation dual objective functions, it is considered to unify the multi-objective into a single objective function suitable for algorithm solving. Linear weighting method is used to construct fitness function, and analytic hierarchy process is used to determine the weight of each objective function. The fitness function constructed is as follows: (19); The planning layer objective function includes annualized investment cost, operation and maintenance cost of each controllable component, and power purchase cost of distribution network; The running layer objective function includes network loss and new energy consumption capacity; and The weight set by the analytic hierarchy process reflects the difference in emphasis of the system on long-term investment and daily operation; Step 2-3) Update the position and speed of the particle. After calculating the fitness of each particle, in each iteration, record the historical best solution of the particle individual and the current best solution of the population , the inferior solution is replaced by the velocity and position update formula, and the velocity and position of the particle are updated iteratively, so that the solution converges quickly to a better direction, and a better solution is found round by round. The velocity and position update method of the particle is as follows: (20); and respectively represent the position and velocity of the particle in the iteration in the dimensional space; is the inertia weight; and are acceleration factors; is a random number in the range of [0, 1], and are the historical best solution of the particle individual and the population best solution, respectively.
[0035] Step 2-4) Determine whether the termination condition is met. When the number of iterations reaches the preset maximum value, or the change of the population optimal fitness value is lower than the set convergence threshold for several times in a row, that is, the global optimal solution is found, the optimization process is terminated. If the condition is met, the result is input into the cuckoo search algorithm for further calculation; otherwise, return to step 2-2) to re-calculate the fitness of the particle swarm optimization algorithm and continue the iterative optimization.
[0036] Step 2-5) Based on the result obtained by the particle swarm optimization algorithm, the cuckoo search algorithm (CS) is used to further solve the model described in step 1. The cuckoo search algorithm learns the parasitism and hatching process of the cuckoo nest, and replaces part of the solution by random selection to simulate the nest stealing behavior of the cuckoo, while introducing the Lévy flight strategy to broaden the search space. However, when applying the cuckoo search algorithm to solve the double-layer planning model of active distribution network, there are problems such as easy to fall into local optimal solution and low search efficiency. Therefore, the step length factor of the cuckoo search algorithm is improved, and it is combined with the particle swarm algorithm to improve the global search ability and convergence speed.
[0037] The result output by the particle swarm optimization algorithm is used as the initial bird nest of the cuckoo search algorithm. Each bird nest represents a possible resource allocation scheme. The cuckoo search algorithm is used to carry out a more in-depth global search in the neighborhood range of this solution, to find a better nest site, that is, a better solution. The above steps are repeated until the optimal solution is found or the preset number of iterations is reached, and the final result is the global optimal solution of the model described in step 1, and the optimal planning scheme is output. The specific description is as follows: Step 2-5-1) Initialize the basic parameters of the cuckoo search algorithm, including the number of bird nests, the discovery probability, the maximum number of iterations, and generate the initial position of the bird nest in a random way. The first The location of the bird's nest is set to , is the dimension of the problem to be solved. Calculate, compare, and update the fitness value of each bird's nest, and obtain the initial optimal fitness function value. The fitness value is the same as the above steps. Update the current bird's nest position. The calculation formula for the nest update is as follows: (twenty one); Indicates the The position of the nest in the tth generation, each particle nest is a complete set of resource configuration solutions, including the installed capacity of distributed power generation , Rated charge and discharge power of energy storage equipment , energy capacity , and configuration and site selection variables for various types of equipment; Indicates the A bird's nest in The new position of the generation is obtained by adjusting the fitness between the current nest position and the global optimal position, so that the solution continues to converge to the global optimal solution; Represents the step size factor, which controls the size of the step size and thus controls the search range of the solution; is the Lévy flight random search function, The probability distribution of flight step length is generated for the correlation index of Lévy flight, which enhances the randomness of the search process and avoids falling into the local optimal solution.
[0038] Lévy flight is a random walk characterized by a heavy-tailed probability distribution of step lengths, meaning that the probability of taking large steps during a random walk is relatively high, helping the algorithm explore a wider search space. The calculation formula is as follows: (twenty two); represents the distribution of Lévy flights, where is the correlation index of the Lévy flight distribution, represents the heavy-tailed power-law distribution function, Represents a random number generated in the range [-1,1].
[0039] However, the traditional cuckoo search algorithm relies heavily on Lévy flights, which can easily slow convergence. To prevent Lévy flights from overexploring due to excessive step sizes, the cuckoo search algorithm is improved by optimizing its step size factor. During the optimization process, the step size factor is dynamically adjusted based on the distance between the current nest and the optimal nest. The formula for calculating the optimized step size factor is as follows: (twenty three); To improve the step factor, Indicates the position of the current largest nest, Indicates the position of the current smallest nest.
[0040] Dynamic adjustment of step factor, farthest flight optimization. When the cuckoo's egg is found and abandoned by other birds, the cuckoo will choose to fly farther and lay eggs in a safer place to improve the survival rate of offspring. This optimization method is called farthest flight distance optimization. Dynamic adjustment of step size helps to strengthen search diversity in the early stage and avoid premature convergence; gradually shrink the step size in the later stage to improve accuracy and provide a basis for subsequent individual disturbance and population diversity maintenance. Based on this, in order to further enhance the adaptability of the cuckoo search algorithm at different stages, the invention introduces dynamic step optimization, and the step factor calculation formula is as follows: (24); Indicates the step factor of the farthest flight distance optimization. By calculating the distance between the nests, the step factor can be dynamically adjusted to avoid slow convergence or skipping the optimal solution due to fixed step size.
[0041] Step 2-5-2) Iteration of the algorithm, updating the position of the nest. Select the better nest position and compare it with the fitness value of the last generation nest. Replace the inferior solution and update the nest position through Lévy flight to find a better solution.
[0042] During the iteration process of the algorithm, the position of each nest will be adjusted with the update of the calculated fitness value. Sort the fitness of all nests after each generation calculation, and record the individual historical optimal position And the global optimal position of the current population ; At the same time, replace the inferior solution in the population to ensure that the high-quality solution is retained and passed in the population.
[0043] Step 2-5-3) Convergence condition judgment. Determine whether the current iteration meets the stopping condition. When the number of iterations reaches the preset maximum value, or the change of the optimal fitness value of the population is lower than the set convergence threshold for several times in a row, terminate the optimization process and output the global optimal solution. If the condition is met, exit the loop; otherwise, return to step 2-6) and repeat the fitness calculation to continue iteration optimization.
[0044] Step 2-5-4) Output the global optimal solution. After optimization, output the final global optimal solution, which is the optimal resource allocation scheme of the model described in step 1, including the installed capacity of distributed power , the rated charge and discharge power of energy storage equipment , energy capacity , and the configuration and location variables of various equipment, meeting the requirements of economy and feasibility.
[0045] Embodiment: Figure 1 The flowchart of the active power distribution network flexible resource collaborative planning method based on the improved cuckoo search algorithm. Figure 2 The flowchart of the improved cuckoo search algorithm. Figure 3 The topology diagram of the active power distribution network flexible resource collaborative planning result based on the improved cuckoo search algorithm in the IEEE-33 node, and the IEEE-33 node system is used for example verification. In the example, the service life of the distributed photovoltaic system, the wind turbine generator set and the energy storage system is set to 10 years, and the parameter configuration is that the distributed photovoltaic single machine capacity is 150 kW, a total of 2 units are deployed, and the total installed capacity reaches 300 kW; the wind turbine generator set single machine capacity is 300 kW, and 1 unit is installed; and the energy storage device is configured with 2 units. Figure 4 The comparison chart of the improved cuckoo search algorithm and the traditional algorithm convergence curve in the embodiment of the application. Figure 5 The topology diagram of the active power distribution network flexible resource collaborative planning result based on the improved cuckoo search algorithm in the IEEE-69 node in the embodiment of the application, and 3 wind turbine generators, 3 photovoltaic generators and 2 energy storage systems are connected in parallel.
[0046] The active power distribution network double-layer planning effect considering the collaborative configuration of multiple flexible resources is as shown in Figure 3 and Figure 5 The method is verified in the IEEE-33 node and the IEEE-69 node test system. The results show that the improved CS algorithm effectively optimizes the wind-light-storage collaborative configuration, wherein the planning layer optimizes the equipment capacity layout, and the running layer ensures the safety margin of node voltage and line current through probability constraint, effectively reduces the network loss and suppresses the voltage fluctuation, and realizes the significant improvement of technical economy and operation reliability. The planning effects of the improved CS algorithm, the traditional CS algorithm and the traditional CS algorithm in the IEEE-33 node test system are compared. The index comparison results are shown in Table 1.
[0047] Table 1 Comparison results of planning of improved CS algorithm and other algorithms
[0048] The improved cuckoo search algorithm considers the global search efficiency and local fine adjustment in the solving process, and ensures the dynamic adaptation of the planning scheme and real-time scheduling. The results show that the method can balance the investment economy, operation flexibility and system robustness in the high penetration scenario of new energy, and provides a feasible solution for collaborative planning of multiple types of energy.
[0049] The method comprises: constructing a double-layer optimization model of active power distribution network of planning and operation integration, the upper layer planning layer taking the minimum annual comprehensive economic cost as the target, optimizing the site selection and capacity of distributed power and energy storage, covering investment cost, operation and maintenance cost and power purchase cost; the lower layer operation layer taking the minimum network loss and the maximum new energy consumption as the target, generating energy storage charging and discharging strategy and power flow scheduling scheme, and guaranteeing node voltage and line current safety margin through probability constraint, constructing a planning-operation closed-loop model of multi-resource coordination; and the double-layer planning model is iteratively solved by using an improved cuckoo search algorithm. The improved cuckoo search algorithm dynamically adjusts the Lévy flight step factor, optimizes the global exploration ability by calculating the distance between the farthest nest and the nearest nest in the population, and avoids premature convergence. The improved cuckoo search algorithm is combined with the particle swarm optimization algorithm to improve the solution efficiency and stability of high-dimensional nonlinear model; the double-layer multi-objective is converted into a fitness function by using a linear weighting method, the algorithm iteratively converges to the global optimal solution, and the optimal scheme is obtained.
Claims
1. A method for collaborative planning of flexible resources in active distribution networks based on an improved CS algorithm, characterized in that: The following steps are involved: Step 1: Construct a two-layer optimization model for active distribution networks that integrates planning and operation. The upper layer of the model optimizes the location and sizing of distributed generation and energy storage with the goal of minimizing the annual comprehensive economic cost. The lower-level model generates an economic dispatch strategy based on typical daily scenarios, with the goal of minimizing grid losses and maximizing renewable energy consumption. Step 2: Improve the cuckoo search algorithm to solve the two-layer optimization model of active distribution network integrating planning and operation to obtain the optimal planning scheme.
2. The method according to claim 1, characterized in that The active distribution network two-layer optimization model integrating planning and operation includes: The planning layer determines the rated capacity and connection location of the distributed generation system, the rated power, energy capacity, and connection location of the energy storage, ensuring the optimization of the system configuration; Based on the solutions provided by the planning layer, the operation layer determines the optimal daily operation strategies for various controllable components under typical scenarios, with the goal of minimizing network losses and maximizing new energy consumption. It also provides feedback information to the planning layer and adjusts the planning scheme.
3. The method according to claim 2, characterized in that The objective function of the planning layer is to minimize the annual comprehensive economic cost of the distribution network. The annual comprehensive economic cost includes the annualized investment cost, the operation and maintenance costs of each controllable component, and the power purchase cost of the distribution network. The specific objective function of the planning layer is as follows: (1); (2); (3); (4); (5); in, 、 、 They represent the annual investment cost of source-grid-storage controllable components, the operation and maintenance cost of controllable components, and the electricity purchase cost in the annual comprehensive cost of the distribution network. is the annualized value conversion factor; The operating life of the equipment; r is the discount rate; is the unit electricity cost of distributed renewable energy; 、 are the unit energy cost and unit electricity cost of energy storage, respectively; 、 are the annual operation and maintenance cost conversion coefficients for distributed renewable energy and energy storage, respectively; is the number of operating days in a year; for t The interaction power between the feeder and the upper grid during the time period. A positive value indicates that the power flows to the feeder, and a negative value indicates that the power flows to the upper grid. is the corresponding transaction electricity price; 、 Photovoltaic and wind power t The active power output of the time period, 、 are their on-grid electricity prices respectively.
4. The method according to claim 3, characterized in that The constraints at the planning layer include the capacity limits of the controllable components to be planned. The specific constraint expressions are as follows: (6); (7); (8); (9); in and They represent the lower limit and upper limit of the rated active power of distributed renewable energy respectively; and They represent the lower and upper limits of the rated charge and discharge power of the energy storage system respectively; and Respectively represent the lower and upper limits of the rated capacity of the energy storage system; and They represent the lower and upper limits of the rated duration of the energy storage system respectively.
5. The method according to claim 2, characterized in that The objective function of the operation layer is to minimize network losses and maximize new energy consumption. The specific objective function is as follows: (10); (11); in, T Indicates the total number of time periods in the optimization cycle, and the value is 24; For each branch of ADN t Total network loss during the time period; represents the total load power of ADN during period t; Represents the set of all branches in the distribution network; Indicates the branch in time period t The square of the current amplitude; Indicates a branch resistance.
6. The method according to claim 5, characterized in that The operation of the distribution network should take into account the physical constraints of the power flow, including meeting the tie line power constraints. The specific constraint expressions are as follows: (12); Where, represents the power transmitted by the public tie line in the active distribution network during period t; and They represent the maximum power and minimum power of the tie line respectively.
7. The method according to claim 5, characterized in that The operation of the distribution network should also consider the physical constraints of power flow, including ensuring that the voltage at each node and the line current are within a safe range. The model is given by the following formula: (13); (14); here, Indicates the probability that the conditions in the brackets are true; Representation node The square of the voltage amplitude at time t; and Node The minimum and maximum allowable voltage values, is the probability of node voltage violation, and Branch The minimum and maximum allowable current values.
8. The method according to any one of claims 1 to 7, characterized in that In order to reduce the computational complexity, the DistFlow formula is used to describe the flow relationship, as shown below: (15); (16); (17); (18); in, and represent the square of the voltage amplitude of nodes i and j at time t, and Represent the line resistance and reactance from node i to j, and Respectively represent branches Active and reactive power at time t; Represents the square of the branch current.
9. The method according to any one of claims 1 to 7, characterized in that Specifically, step 2 includes the following steps: in order to solve the two-level planning model of the active distribution network that considers the coordinated configuration of multiple flexible resources, a suitable optimization algorithm needs to be selected to solve the problem, taking into account the high-dimensional nonlinear characteristics of the problem and the complexity of the two-level structure; the cuckoo search CS algorithm is optimized and combined with the particle swarm optimization PSO algorithm to iteratively solve the two-level planning model of the active distribution network that integrates planning and operation established in step 1, and finally obtain the optimal planning solution; Specific practices include: First, the variables to be solved in the model are clarified; the two-layer optimization model of active distribution network with integrated planning and operation consists of upper-layer planning and lower-layer operation; The upper model takes the minimum annual comprehensive economic cost of the active distribution network as the objective function, and the optimization variables involved include: the installed capacity of distributed generation at each candidate access node; , Rated charge and discharge power of energy storage equipment , energy capacity , and the configuration location variables of various types of equipment, representing whether the corresponding device is installed on the i-th node; The lower-level model takes minimizing the operating cost of the distribution network and maximizing the output of renewable energy as its objective function. The optimization variables involved include: the charging and discharging power scheduling value of the energy storage device in each time period, the node voltage amplitude, the current limit, and the branch flow.
10. The method according to claim 9, characterized in that In step 2, the improved cuckoo search CS algorithm includes the following steps: First, the particle swarm optimization algorithm is used to preliminarily solve the model described in step 1. The initial population is randomly generated. In each iteration, the particles are evaluated and dynamically updated by comparing the fitness function. After the particle swarm optimization algorithm is iterated, a group of particles is obtained. Each particle represents a possible resource allocation scheme, that is, a possible solution to the model described in step 1. Then, the solution with better performance is selected as the initial nest position of the cuckoo search algorithm. The cuckoo search algorithm is used to conduct a deeper global search in the neighborhood of this solution to find a better nest position, that is, a better solution. Repeat the above steps until the optimal solution is found or the preset number of iterations is reached. The final result is the solution of the model described in step 1. Step 2-1) Use the particle swarm optimization algorithm to preliminarily solve the model described in step 1; First, the objective function and constraints of the distribution network planning model described in step 1, including system topology, capacity limit, and operation mode, are used as input, and the input data is preprocessed. Then, the optimization algorithm parameters are set, including population size, maximum number of iterations, inertia weight, and acceleration factor. The initial population is randomly generated, and each particle individual is a complete set of resource allocation plans, including the installed capacity of distributed power generation. , Rated charge and discharge power of energy storage equipment , energy capacity , and configuration and site selection variables for various types of equipment; Step 2-2) Calculate the fitness of the particle; the fitness value of the particle reflects the quality of the solution, that is, the quality of the planning scheme to be generated; By calculating the objective function value and performing a weighted summation based on the weight, the fitness value of each solution is calculated and compared to measure the degree to which different solutions meet various constraints, that is, their performance in reducing the overall system cost and improving the goal of new energy consumption. The solution with higher fitness is the better solution, and iterative calculation is performed. In each round of iteration, the algorithm takes the position and speed of the solution with the highest fitness as the current global optimal solution, and continuously adjusts other solutions through the position and speed update mechanism to make the solution converge in a better direction until the optimal solution is found or the preset number of iterations is reached, thereby outputting the final optimal planning solution. Since the model described in step 1 contains dual objective functions of planning and operation, it is considered to convert the multiple objectives into a single objective function suitable for algorithm solution; the fitness function is constructed using the linear weighting method, and the hierarchical analysis method is used to determine the weight of each objective function; the constructed fitness function is as follows: (19); is the planning layer objective function, including the annualized investment cost, the operation and maintenance cost of each controllable component, and the power purchase cost of the distribution network; is the objective function of the operation layer, including network loss and new energy absorption capacity; and The weights are set by the analytic hierarchy process, reflecting the system's emphasis on long-term investment and daily operations; Step 2-3) Update the position and velocity of the particle; after calculating the fitness of each particle, record the historical best solution of the particle individual in each iteration. and the current best solution of the population , replace the inferior solution according to the particle speed and position update formula, and update the particle speed and position iteratively to make the solution converge quickly to a better direction, and find a better solution round by round; the particle speed and position update method is as follows: (20); and Represents particles in At the iteration Position and velocity in dimensional space; is the inertia weight; and is the acceleration factor; is a random number in the range [0,1], and are the historical best solution of individual particles and the best solution of the population respectively; Step 2-4) Determine whether the termination condition is met; when the number of iterations reaches the preset maximum value, or the change in the swarm's optimal fitness value is lower than the set convergence threshold for several consecutive times, that is, when the global optimal solution is found, the optimization process is terminated; if the condition is met, the PSO algorithm loop is exited and the result is input into the cuckoo search algorithm for further calculation; otherwise, return to step 2-2) and recalculate the fitness of the particle swarm optimization algorithm to continue iterative optimization; Steps 2-5) Based on the results obtained by the particle swarm optimization algorithm, the improved cuckoo search algorithm (CS) is used to further solve the model described in step 1. The cuckoo search algorithm learns the cuckoo's nest parasitism and incubation process, simulates the cuckoo's nest-stealing behavior by randomly selecting and replacing partial solutions, and introduces the Lévy flight strategy to broaden the search space. However, when using the cuckoo search algorithm to solve the active distribution network two-level programming model, it is prone to falling into local optimal solutions and has low search efficiency. Therefore, by improving the step size factor of the cuckoo search algorithm and combining it with the particle swarm optimization algorithm, the global search capability and convergence speed are improved. The output of the particle swarm optimization algorithm is used as the initial nest of the improved cuckoo search algorithm. Each nest represents a possible resource allocation solution. The improved cuckoo search algorithm is used to conduct a deeper global search in the neighborhood of this solution to find a better nest location, that is, a better solution. The above steps are repeated until the optimal solution is found or the preset number of iterations is reached. The final result is the global optimal solution of the model described in step 1, and the optimal planning solution is output. The specific description is as follows: Step 2-5-1) Initialize the basic parameters of the cuckoo search algorithm, including the number of bird nests, the probability of discovery, the maximum number of iterations, and generate the initial position of the bird nest in a random manner; The location of the bird's nest is set to , is the dimension of the problem to be solved; calculate, compare and update the fitness value of each bird's nest, and obtain the initial optimal fitness function value; the fitness value is the same as the above steps; update the current bird's nest position, and the calculation formula for the bird's nest update is as follows: (21); Indicates the The position of the nest in the tth generation, each particle nest is a complete set of resource configuration solutions, including the installed capacity of distributed power generation , Rated charge and discharge power of energy storage equipment , energy capacity , and configuration and site selection variables for various types of equipment; Indicates the A bird's nest in The new position of the generation is obtained by adjusting the fitness between the current nest position and the global optimal position, so that the solution continues to converge to the global optimal solution; Represents the step size factor, which controls the size of the step size and thus controls the search range of the solution; is the Lévy flight random search function, Generate a probability distribution of flight step length for the Lévy flight correlation index to enhance the randomness of the search process and avoid falling into local optimal solutions; Lévy flight is a random walk characterized by a heavy-tailed probability distribution of step lengths, meaning that the probability of taking large steps during a random walk is relatively high, helping the algorithm explore a wider search space. The calculation formula is as follows: (22); represents the distribution of Lévy flights, where is the correlation index of the Lévy flight distribution, represents the heavy-tailed power-law distribution function, Indicates a random number generated in the range [-1,1]; However, the traditional cuckoo search algorithm relies heavily on Lévy flights, which can easily slow down convergence. To avoid excessive exploration caused by excessive step sizes in Lévy flights, the cuckoo search algorithm is improved by optimizing its step size factor. During the optimization process, the step size factor is dynamically adjusted based on the distance between the current nest and the optimal nest. The calculation formula for the optimized step size factor is as follows: (23); is the improved step size factor, Indicates the location of the current largest nest, Indicates the location of the current smallest nest; The step size factor is dynamically adjusted to optimize the maximum flight distance. When a cuckoo's eggs are discovered and abandoned by other birds, the cuckoo will choose to fly a longer distance and lay eggs in a safer location to increase the survival rate of its offspring. This optimization method is called maximum flight distance optimization. Dynamic adjustment of the step size helps to enhance search diversity in the early stages and avoid premature maturation. In the later stages, the step size is gradually reduced to improve accuracy, providing a foundation for subsequent individual perturbations and maintaining group diversity. Based on this, to further enhance the adaptability of the cuckoo search algorithm at different stages, dynamic step size optimization is introduced, and the step size factor calculation formula is modified as follows: (24); Indicates the step size factor for optimizing the maximum flight distance. By calculating the distance between bird nests, the step size factor can be dynamically adjusted to prevent the algorithm from converging too slowly or skipping the optimal solution due to a fixed step size. Step 2-5-2) Iterate the algorithm and update the nest location; select a better nest location, compare it with the fitness value of the previous generation of nests, replace the inferior solution, and update the nest location through Lévy flight to find a better solution; During the algorithm iteration process, the position of each bird's nest will be adjusted as the calculated fitness value is updated. All bird's nests calculated in each generation will be ranked by fitness, and the individual historical optimal position will be recorded. The global optimal position of the current population ; At the same time, replace the inferior solutions in the population to ensure that the high-quality solutions are retained and transmitted in the population; Step 2-5-3) Convergence condition determination: Determine whether the current iteration meets the stopping condition. When the number of iterations reaches the preset maximum value, or the change in the optimal fitness value of the group is lower than the set convergence threshold for several consecutive times, terminate the optimization process and output the global optimal solution. If the condition is met, exit the loop; otherwise, return to step 2-6) to repeat the fitness calculation and continue iterative optimization. Step 2-5-4) Output the global optimal solution; after the optimization is completed, output the final global optimal solution, that is, the optimal resource allocation plan of the model described in step 1, including the installed capacity of distributed power generation , Rated charge and discharge power of energy storage equipment , energy capacity , as well as the configuration and site selection variables of various types of equipment to meet the economic and feasibility requirements.
Citation Information
Patent Citations
A method for multi-objective evaluation of active distribution network power supply capability
CN109214593A
Dynamic cuckoo search algorithm
CN109800849A
Streaming media server load balancing method and system, computer equipment and terminal
CN113141317A
Multi-target operation optimization method for combined cooling heating and power comprehensive energy system
CN119151056A
ADN source-load-storage collaborative double-layer optimization configuration method considering demand response
CN119787510A
Cited By
Distributed power supply deployment method and system based on risk assessment
CN121279836A