A method, device, and medium for adjusting resource aggregation based on a CPO algorithm
By combining the CPO algorithm and the K-means algorithm, the voltage stability and power supply reliability issues after distributed photovoltaics are connected to the distribution network are solved, the reasonable resource scheduling and voltage distribution optimization of the distribution network are achieved, and the safety and stability of the power grid are improved.
Patent Information
- Application Number
- CN202411858093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-17
AI Technical Summary
After distributed photovoltaics are connected to the distribution network, the active power fluctuations in the network will intensify, the voltage stability will decrease, the power supply reliability will decline, and the distributed resources will be difficult to effectively regulate, resulting in the power system stability problem not being effectively solved.
An adjustable resource aggregation method based on the CPO algorithm is adopted. The voltage weakness is calculated by obtaining the distribution network flow data. The initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm. Dynamic clustering is performed based on the electrical distance. The K-means algorithm is combined for clustering to optimize the grid resource scheduling.
It achieves reasonable clustering of distribution networks, improves the understanding of grid voltage distribution, and enhances the safety, stability and power supply reliability of the grid.
Smart Images

Figure CN119850364B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power distribution network, and particularly relates to a method and device for aggregating adjustable resources considering voltage weak points, equipment and medium. BACKGROUND
[0002] Massive distributed photovoltaic access to power distribution network. On the one hand, due to the randomness and volatility of distributed resource output, the active power fluctuation in the network is intensified, the voltage stability is reduced, and the power supply reliability is decreased, and a series of problems. On the other hand, due to the dispersion of distributed resources and the characteristics of some being difficult to control, it is impossible to effectively control the distributed resources in the power distribution network.
[0003] In recent years, global blackouts have occurred frequently, indicating that the stability problem of the current power system has not been well solved. The cause of these accidents is often that the weak point in the power system is damaged by external disturbance, and then a chain of fault reactions is triggered, so how to consider the voltage weak point and aggregate the adjustable resources of the entire power distribution network to enhance the reliability of the entire power system is a difficult problem to be solved.
[0004] The information disclosed in this BACKGROUND section is only intended to enhance the understanding of the general background of the application, and should not be considered as recognition or implicit acknowledgment in any form that this information constitutes prior art known to those skilled in the art. SUMMARY
[0005] The present application provides a method and device for aggregating adjustable resources based on CPO algorithm, thereby effectively solving the problems in the background art.
[0006] In order to achieve the above purpose, the technical solution adopted by the present application is: a method for aggregating adjustable resources based on CPO algorithm, comprising the following steps:
[0007] Obtain power distribution network power flow data, and calculate the comprehensive voltage weakness of the power distribution network according to the power flow data;
[0008] According to the comprehensive voltage weakness, use the Crown-Hoar optimization algorithm (CPO) to select the initial optimal cluster number and select the highest voltage weakness as the initial cluster center;
[0009] The initial optimal cluster number and the initial cluster center are clustered using the K-means clustering algorithm, and the power distribution network is dynamically clustered using electrical distance as the distance.
[0010] Further, the comprehensive voltage weakness S ij The calculation method is:
[0011] S ij = L ij ·Bij ;
[0012] wherein, L ij is the distribution network voltage weakness index, B ij is the distribution network line betweenness.
[0013] Further, the distribution network voltage weakness index calculation method is:
[0014]
[0015] wherein, i and j are nodes at both ends of the line ij; U i and U j are voltage values corresponding to nodes i and j, P j is the active power of node j, Q j is the reactive power of node j, R ij represents the resistance of the line ij, X ij represents the reactance of the line ij; L ij The larger the value is, the worse the voltage stability of the branch is, and the weaker the voltage is.
[0016] Further, the distribution network line betweenness calculation method is:
[0017]
[0018] wherein: L N is the total number of branches of the distribution network; N ij is the number of times the line is passed through by the bus node to each load node; α ij is the percentage of load loss of the distribution network when the line with nodes i and j is disconnected, relative to the total load; β ij represents the priority of the load behind the line, represented by a weight value.
[0019] Further, the weight of the priority β ij of the load behind the line is obtained by the analytic hierarchy process, and the higher the priority of the load behind the line is, the larger the weight value is. When there are multiple levels of loads behind the line, β ij takes the weight value corresponding to the highest priority load.
[0020] Further, the initial optimal cluster number is selected by using the Crown-Hoare Optimizer (CPO) algorithm, including the following steps:
[0021] The first visual defense strategy of the CPO algorithm is simulated, and a new candidate value far away from the current solution is generated by random exploration of the search space;
[0022] The second sound defense mechanism using the CPO algorithm improves the current best cluster center number, and performs local search or fine-tuning around the best candidate value to optimize the clustering effect.
[0023] The exploration is repeatedly performed, and the exploration mechanism gradually shifts from global search to local search to find the optimal or approximately optimal cluster center number.
[0024] Further, the new candidate value generated away from the current solution through random exploration of the search space comprises:
[0025]
[0026] In the formula, is the optimal solution of the cluster center number, is the ith candidate value in the search space, is a vector generated between the current CPO and a randomly selected CPO from the population, representing the position of the predator at iteration t, τ1 is a random number based on a normal distribution, and τ2 is a random value in the interval [0, 1];
[0027] The mathematical formula of generating is as follows:
[0028]
[0029] In the formula: r is a random number between [1, N].
[0030] Further, the second sound defense mechanism using the CPO algorithm improves the current best cluster center number, and comprises:
[0031]
[0032] In the formula: r1 and r2 are two random integers between [1, N], τ3 is a random value generated between 0 and 1, is a binary vector containing 0 and 1 generated randomly to cover all possible probabilities.
[0033] Further, the dynamic clustering of the distribution network based on the electrical distance as the distance measure comprises:
[0034] The power flow equation of the electrical distance is:
[0035]
[0036] In the formula: is the Jacobian matrix, ΔU and Δθ are the correction amounts of node voltage magnitude and phase angle respectively, U is the voltage diagonal matrix, ΔP and ΔQ are the change amounts of node injected active and reactive power respectively;
[0037] wherein:
[0038] ΔU=(HJ -1 L-N) -1 ΔP+(JH -1 N-L)ΔQ;
[0039] When ΔP, ΔQ are 0 respectively, that is, the active or reactive power of the node is unchanged, the following is obtained:
[0040]
[0041] In the formula, S VP , S VQ are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively;
[0042] The electrical distance l of node i and node j based on power sensitivity ij The expression is as follows:
[0043]
[0044] In the formula, d ij represents the influence degree of the power change of node j on node i, d ij is smaller, the electrical distance between the two nodes is smaller, and the power change of node j has greater influence on node i; S i represents the active voltage sensitivity of node i, S ij represents the active voltage sensitivity of node j on node i, S i represents the reactive voltage sensitivity of node i, and S ij represents the reactive voltage sensitivity of node j on node i;
[0045] The target function of the power distribution network aggregation is as follows:
[0046]
[0047] In the formula, d represents the electrical distance between node j and the aggregation center ε i , n c represents the number of cluster division, and n i represents the number of samples in the cluster i.
[0048] The application also includes an adjustable resource aggregation device based on the CPO algorithm, which uses the method described above, and the device includes:
[0049] A weakness calculation unit is configured to acquire power flow data of the power distribution network, and calculate comprehensive voltage weakness of the power distribution network according to the power flow data;
[0050] An initialization unit is configured to select an initial optimal cluster number by using a Crowned Guinea Pig Optimizer (CPO) algorithm according to the comprehensive voltage weakness, and select the highest voltage weakness as an initial cluster center;
[0051] The clustering unit is configured to cluster the initial optimal cluster number and initial cluster center using a K-means clustering algorithm, and to dynamically cluster the power distribution network by taking an electrical distance as a measurement distance.
[0052] The application further comprises a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method as described above when executing the computer program.
[0053] The application further comprises a storage medium, which stores a computer program executable on the processor and implementing the method as described above.
[0054] The application has the following beneficial effects: the power distribution network comprehensive voltage weakness is calculated through power flow data, the initial optimal cluster number is selected through a CPO algorithm, and the highest voltage weakness is selected as the initial cluster center; the initial optimal cluster number and the initial cluster center are clustered using a K-means clustering algorithm, and the power distribution network is dynamically clustered by taking an electrical distance as a measurement distance; and the branches of the power distribution network are reasonably clustered. This is helpful for better understanding of the voltage distribution of the power distribution network and provides a strong guarantee for the safe and stable operation of the power grid. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0056] Figure 1 It is a flow chart of the method in embodiment 1.
[0057] Figure 2 It is a structural schematic diagram of the device in embodiment 1.
[0058] Figure 3 It is a flow chart of the power distribution network aggregation method in embodiment 2.
[0059] Figure 4 It is an improved IEEE33 node power distribution network diagram in embodiment 2.
[0060] Figure 5 It is the comprehensive voltage weakness of each node 12 at the moment in embodiment 2.
[0061] Figure 6 It is a structural schematic diagram of the computer device of the present application. DETAILED DESCRIPTION
[0062] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application.
[0063] Embodiment 1
[0064] As shown in the figure: a tunable resource aggregation method based on CPO algorithm, comprising the following steps: Figure 1 Obtaining power distribution network power flow data, and calculating comprehensive voltage weakness of the power distribution network according to the power flow data;
[0065] According to the comprehensive voltage weakness, selecting an initial optimal cluster number by using the CPO algorithm of the Crown-Hoare Optimizer, and selecting the highest voltage weakness as an initial cluster center;
[0066] Using the K-means clustering algorithm to cluster the initial optimal cluster number and the initial cluster center, and dynamically clustering the power distribution network by taking electrical distance as a distance measure.
[0067] By calculating the comprehensive voltage weakness of the power distribution network through the power flow data, selecting an initial optimal cluster number by using the CPO algorithm of the Crown-Hoare Optimizer, and selecting the highest voltage weakness as an initial cluster center; using the K-means clustering algorithm to cluster the initial optimal cluster number and the initial cluster center, and dynamically clustering the power distribution network by taking electrical distance as a distance measure; realizing the reasonable clustering of each branch of the power distribution network. It is helpful to better understand the voltage distribution of the power distribution network, and provides a strong guarantee for the safe and stable operation of the power grid.
[0068] In this embodiment, the comprehensive voltage weakness S ij is calculated as follows:
[0069] S ij = L ij · B ij ;
[0070] In the formula, L ij is a voltage weakness index of the power distribution network, and B ij is a line betweenness of the power distribution network.
[0071] The calculation method of the voltage weakness index of the power distribution network is as follows:
[0072]
[0073]
[0074] In the formula, i and j are nodes at both ends of the line ij; U i and U j are voltage values corresponding to nodes i and j, P j is the active power of node j, and Q j The reactive power of the j node, R ij represents the resistance of the line ij, X ij represents the reactance of the line ij; L ij The greater the value, the worse the voltage stability of the branch, and the weaker the voltage.
[0075] The distribution network line betweenness calculation method is:
[0076]
[0077] In the formula, L N is the total number of branches of the distribution network; N ij is the number of times the line is passed through by the bus node to each load node; alpha ij is the line with i and j as nodes, the percentage of the load loss of the distribution network to the total load; beta ij represents the priority of the load behind the line, expressed by a weight value.
[0078] In the formula, the priority beta ij of the load behind the line is obtained by the analytic hierarchy process, the higher the priority of the load behind the line, the greater the weight value, and when there are multiple levels of loads behind the line, beta ij takes the weight value corresponding to the highest priority load.
[0079] As a preferred embodiment of the above embodiment, the initial optimal cluster number is selected by using the Crown-Hoarse Porcupine Optimizer (CPO) algorithm, including the following steps:
[0080] The first visual defense strategy of the CPO algorithm is simulated, and new candidate values far away from the current solution are generated by random exploration of the search space;
[0081] The second sound defense mechanism of the CPO algorithm is used to improve the current best cluster center number, and local search or fine tuning is performed near the best candidate value to optimize the clustering effect;
[0082] The exploration is repeatedly performed, and the exploration mechanism gradually changes from global search to local search to find the optimal or approximately optimal cluster center number.
[0083] In this embodiment, new candidate values far away from the current solution are generated by random exploration of the search space, including:
[0084]
[0085] In the formula, is the optimal solution of the cluster center number, is the ith candidate value in the search space, is the vector generated between the current Haoguan pig CP and the CP randomly selected from the population, represents the position of the predator at iteration t, τ1 is a random number based on a normal distribution, and τ2 is a random value in the interval [0, 1];
[0086] The mathematical formula of generating is as follows:
[0087]
[0088] Wherein: r is a random number between [1, N].
[0089] The second sound defense mechanism mechanism using the CPO algorithm improves the current best cluster center number, including:
[0090]
[0091] Wherein: r1 and r2 are two random integers between [1, N], τ3 is a random value generated between 0 and 1, is a binary vector containing 0 and 1 randomly generated to cover all possible probabilities.
[0092] Wherein, the power distribution network is dynamically clustered by measuring the distance with the electrical distance, including:
[0093] The power flow equation of the electrical distance is:
[0094]
[0095] Wherein: is the Jacobian matrix, ΔU and Δθ are the correction amounts of node voltage magnitude and phase angle respectively, U is the voltage diagonal matrix, ΔP and ΔQ are the change amounts of node injected active and reactive power respectively;
[0096] Wherein:
[0097] ΔU=(HJ -1 L-N) -1 ΔP+(JH -1 N-L)ΔQ;
[0098] When ΔP and ΔQ are 0 respectively, that is, the node injected active or reactive power is unchanged, it is obtained:
[0099]
[0100] Wherein: S VP , S VQ are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively;
[0101] The electrical distance l ij between node i and node j based on power sensitivity is expressed as:
[0102]
[0103] wherein d ij represents the degree of influence of the power change of node j on node i, d ij is smaller, the electrical distance between the two nodes is smaller, and the power change of node j has a greater influence on node i; respectively represent the active voltage sensitivity of node i, the active voltage sensitivity of node j on node i, the reactive voltage sensitivity of node i, and the reactive voltage sensitivity of node j on node i;
[0104] The objective function of the power distribution network aggregation is:
[0105]
[0106] wherein: represents the electrical distance between node j and the aggregation center ε i , n c represents the number of cluster divisions, n i represents the number of samples in cluster i.
[0107] As shown in Figure 2 , the embodiment further includes an adjustable resource aggregation device based on the CPO algorithm, which uses the method described above. The device includes:
[0108] a weakness calculation unit configured to obtain power flow data of the power distribution network and calculate an integrated voltage weakness of the power distribution network according to the power flow data;
[0109] an initialization unit configured to select an initial optimal cluster number and select a highest voltage weakness as an initial cluster center by using a Crown-hoar optimizer (CPO) algorithm according to the integrated voltage weakness;
[0110] a clustering unit configured to perform clustering on the initial optimal cluster number and the initial cluster center by using a K-means clustering algorithm, and perform dynamic clustering on the power distribution network by taking the electrical distance as a metric distance.
[0111] Embodiment 2:
[0112] As shown in Figure 3 , the embodiment includes a low-voltage power distribution network adjustable resource aggregation method based on the CPO algorithm, which includes the following steps:
[0113] Step 1: Calculate an integrated voltage weakness of the power distribution network according to power flow data of the power distribution network. The integrated voltage weakness of the power distribution network can clearly and explicitly indicate the voltage weakness of each line in the power distribution network.
[0114] Step two: According to the comprehensive voltage weakness of the distribution network, the improved K-means algorithm is selected by the Crested Porcupine Optimizer (CPO), and the initial optimal cluster number is selected to facilitate the subsequent distribution network aggregation.
[0115] Step three: In the process of distribution network aggregation, the n lowest comprehensive voltage weakness is selected as the K-means aggregation center by the optimal cluster number n optimized by the Crested Porcupine Optimizer, and the distribution network is dynamically aggregated by the K-means algorithm with electrical distance as the distance measure.
[0116] In step one, the comprehensive voltage weakness of the power grid considers the distribution network voltage weakness index L ij and the distribution network line betweenness Bij:. Wherein: the distribution network voltage weakness index L ij The calculation method is as formula (12)
[0117]
[0118] In the formula: i, j are nodes at both ends of the line ij, and the arrow points to the direction of the branch power flow. Ui and Uj are the voltage values corresponding to nodes i and j, Pi+jQi and Pj+jQj are the injected power of nodes i and j, and Rij+jXij is the impedance of the line. L ij The larger the value, the worse the voltage stability of the branch, and the weaker the voltage.
[0119] The calculation method of the distribution network line betweenness Bij is as formula (13)
[0120]
[0121] In the formula: LN is the total number of branches of the distribution network; Nij is the number of times the bus node of the distribution network passes through the line to each load node; αij is the percentage of the load loss of the distribution network when the line with i and j as nodes is disconnected; βij represents the priority of the load behind the line, which is represented by a weight value. The size of the weight can be obtained by the analytic hierarchy process, and the higher the priority of the load carried by the line, the larger the weight value. When there are multiple levels of loads behind the line, βij takes the weight value corresponding to the highest priority load.
[0122] The calculation method of the comprehensive voltage weakness of the power grid in step one is as formula (14).
[0123] S ij =L ij ·B ij (14)
[0124] The greater the value of Sij, the more vulnerable the branch is in the distribution network, and the more likely it is to cause a cascading failure when a fault occurs.
[0125] In step two, the Crested Porcupine Optimizer (CPO) improves the K-means algorithm by selecting the initial optimal cluster number. The steps of the CPO algorithm are as follows:
[0126] First, simulate the first visual defense strategy of the Crested Porcupine by randomly exploring the search space to generate new candidate values far from the current solution. The generation formula for the cluster center number candidate value is as follows:
[0127]
[0128] In the formula: is the optimal solution of the cluster center number, is the ith candidate value in the search space, is a vector generated between the current CP (Crested Porcupine) and a randomly selected CP from the population, representing the position of the predator at iteration t, τ1 is a random number based on a normal distribution, and τ2 is a random value in the interval [0, 1]. The generation of is as follows:
[0129]
[0130] In the formula: r is a random number between [1, N].
[0131] Second, use the second sound defense mechanism of the CPO algorithm to further improve the current best cluster center number. Local search or fine-tuning can be performed near the best candidate value to optimize clustering. The improvement formula for the cluster center number candidate value is as follows:
[0132]
[0133] In the formula: r1 and r2 are two random integers between [1, N], τ3 is a random value generated between 0 and 1, is a randomly generated binary vector containing 0 and 1 to cover all possible probabilities.
[0134] Finally, repeat the exploration, and gradually change the exploration mechanism from global search to local search to find the optimal or near-optimal cluster center number.
[0135] In step three, the K-means algorithm is improved by the Crested Porcupine Optimizer to dynamically aggregate the distribution network using electrical distance as the distance measure. The calculation of electrical distance relies on the approximate voltage sensitivity, which is calculated using the Newton-Raphson method in polar coordinates, and the power flow equation is:
[0136]
[0137] Where: is the Jacobian matrix, ΔU and Δθ are the correction values of the node voltage magnitude and phase angle respectively, U is the voltage diagonal matrix, ΔP and ΔQ are the changes of the node injected active power and reactive power respectively. From formula (18), we can get:
[0138] ΔU=(HJ -1 LN) -1 ΔP+(JH -1 NL)ΔQ (19)
[0139] When ΔP and ΔQ are 0 respectively, that is, the active or reactive power injected into the node remains unchanged, we can obtain:
[0140]
[0141] Where: S VP 、S VQ They are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively.
[0142] The electrical distance lij between nodes i and j based on power sensitivity is expressed as:
[0143]
[0144] Where, d ij Indicates the degree of influence of the power change of node j on node i, d ij The smaller , the smaller the electrical distance between the two nodes, and the greater the impact of the power change of node j on node i; They represent the active voltage sensitivity of node i, the active voltage sensitivity of node j to node i, the reactive voltage sensitivity of node i, and the reactive voltage sensitivity of node j to node i respectively;
[0145] The objective function of distribution network aggregation is:
[0146]
[0147] Where: represents the electrical distance between node j and the aggregation center εi, n c Indicates the number of cluster divisions, n i represents the number of samples in cluster i.
[0148] The improved 33-node network is selected for example verification. The distribution network is as follows: Figure 4As shown, the distributed photovoltaic is accessed at nodes 4, 15, 17, 18 and 30, the switchable capacitor is accessed at node 5, the distributed energy storage is accessed at node 15, and the continuous reactive power compensation device is accessed at node 24. Among them, the switchable capacitor adopts the form of group switching, and in order to increase the service life of the CB, the number of switching actions of the CB is limited, and the constraint condition is:
[0149]
[0150] In the formula: represents the output of the CB accessed at node i at time t, represents the power size of the CB accessed at node i, represents the number of CB groups accessed at node i at time t, and the value is an integer, represents the maximum number of switching groups of the CB accessed at node i, and Z represents an integer set, is the maximum number of actions of the CB in one scheduling period. The constraint of the static reactive power compensator SVC can be represented as:
[0151]
[0152] In the formula: represents the output of the SVC accessed at node i at time t, represents the upper and lower limits of the output of the SVC accessed at node i. The on-load voltage regulation transformer OLTC adjusts in steps, and is consistent with the CB. The number of actions of the OLTC in one scheduling period is also limited, and the constraint is:
[0153]
[0154] In the formula: represents the transformation ratio of the OLTC accessed between nodes i and j at time t, represents the step of the OLTC accessed at nodes i and j at time t, and the value is an integer, is the adjustment step, represents the upper and lower limits of the step of the OLTC accessed, K0 is the initial step and takes 0.95, is the maximum number of actions of the OLTC in one scheduling period. The constraint of the distributed energy storage ESS can be represented as:
[0155]
[0156] In the formula: respectively represent the charging and discharging power of the energy storage connected at node i at time t, respectively represent the minimum and maximum values of the charging power of the energy storage at node i, respectively represent the minimum and maximum values of the discharging power of the energy storage at node i, respectively represent the energy storage charging and discharging efficiency at node i, respectively represent the energy storage charging and discharging efficiency at node i, respectively represent the energy storage charging and discharging efficiency at node i, respectively represent the energy storage charging and discharging efficiency at node i,
[0157]
[0158] Select a typical scenario at 12 noon, and calculate the comprehensive voltage weakness of each node with the minimum total network loss as the objective function. The calculation results are shown in Figure 5 . The loads of each node are all the same level. From Figure 5 , it can be obtained that nodes 9, 15, 24 and 27 are the four nodes with the highest voltage weakness, and these four nodes are selected as the aggregation centers. The aggregation results are shown in Table 1.
[0159] Table 1
[0160] Cluster 1 1、2、3、19、20、21、22、23、24、25 Cluster 2 4、5、6、7、26、27、28、29、30、31、32 Cluster 3 8、9、10、11、12 Cluster 4 13、14、15、16、17、18
[0161] In this embodiment, the distribution network line comprehensive voltage weakness is established based on the distribution network voltage weakness index and the distribution network line intermediate number. The K-means algorithm is optimized based on the CP0 (Crested Porcupine Optimizer) algorithm, the optimal cluster number is selected based on the first and second defense mechanisms of the Crested Porcupine, and the branch with the highest comprehensive voltage weakness is selected as the cluster center. Finally, the K-means algorithm is used to divide the clusters. Thus, the reasonable clustering of each branch of the distribution network is realized. This helps to better understand the voltage distribution of the distribution network and provides a strong guarantee for the safe and stable operation of the power grid.
[0162] Please refer to Figure 6 The computer device provided by the embodiment of the application has the structure shown in the structural schematic diagram of the computer device. The computer device 400 provided by the embodiment of the application comprises a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, the method described above is performed.
[0163] The embodiment of the application further provides a storage medium 430, and the storage medium 430 stores a computer program. When the computer program is run by the processor 410, the method described above is performed.
[0164] The storage medium 430 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic or optical disk.
[0165] In the description of the present application, the terms "first", "second", "third", etc. are used only to describe purposes and can not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. The meaning of "plurality" is two or more, unless otherwise explicitly specified and limited.
[0166] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting", "fixing" and the like should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integral; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0167] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in the present application and the features of different embodiments or examples without contradiction.
[0168] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions or steps, and alternative implementations are within the scope of the preferred embodiments of the application that are directed towards the functions performed by the steps, in which the order of steps can be rearranged, including substantially concurrently or in reversed order, without departing from the principles of the embodiments of the application disclosed herein.
[0169] Logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be embodied in computer-readable medium, which can be any device or apparatus that can store, communicate, propagate, or transport programming for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable medium can include any suitable medium such as, for example, the following: a data signal embodied in or transmitted by a carrier wave or other transport mechanism; a storage medium, such as any non-transitory medium that can be used to store programming, including a read only memory (ROM) and a random access memory (RAM); magnetic tape or other magnetic medium; optical medium, e.g., optical fiber and compact disc read only memory (CDROM); and the like.
[0170] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following techniques, which are well known in the art of making integrated circuits, can be used alone or in combination to implement the application: a discrete logic circuit having logic gates for implementing logic functions upon an application of data signals; an application specific integrated circuit having appropriate combinational logic gates; a programmable gate array (PGA) ; a field programmable gate array (FPGA) ; and the like.
[0171] Those skilled in the art can understand that all or part of the steps of the method carried out by the above-mentioned embodiments can be instructed by a program to complete the relevant hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0172] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application. Those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.
Claims
1. A method for adjusting resource aggregation based on CPO algorithm, characterized in that: The steps include: Obtaining power flow data of the distribution network, and calculating the comprehensive voltage weakness of the distribution network based on the power flow data; According to the comprehensive voltage vulnerability, the initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm, and the highest voltage vulnerability is selected as the initial cluster center; Clustering the initial optimal number of clusters and the initial cluster centers using a K-means clustering algorithm, and dynamically clustering the distribution network using electrical distance as a distance measurement; The comprehensive voltage weakness S ij The calculation method is: S ij =L ij ·B ij ; Where, L ij is the voltage weakness index of the distribution network, B ij is the betweenness of distribution network lines; The calculation method of the distribution network voltage weakness index is: Where i and j are the nodes at both ends of line ij; U i is the voltage value corresponding to node i, P j is the active power of node j, Q j is the reactive power of node j, R ij represents the resistance of line ij, X ij Represents the reactance of line ij; L ij The larger the value, the worse the voltage stability of the branch and the weaker the voltage; The calculation method of the distribution network line betweenness is: Where: L N is the total number of branches in the distribution network; N ij is the number of times the distribution network busbar node passes through the line to each load node; α ij The percentage of the load lost in the distribution network to the total load in order to disconnect the line with nodes i and j; β ij Indicates the priority of the load behind the line, expressed as a weight value; The priority β of the load behind the line ij The weight of β is obtained by the hierarchical analysis method. The higher the priority of the load carried by the line, the greater its weight value. When there are multiple levels of loads behind the line, β ij Take the weight value corresponding to the load with the highest priority; The method of selecting the initial optimal number of clusters using the Crown Porcupine Optimizer CPO algorithm further includes the following steps: The first visual defense strategy of the simulated CPO algorithm generates new candidate values far away from the current solution by randomly exploring the search space; The second sound defense mechanism using the CPO algorithm improves the current optimal number of cluster centers and performs local search or fine-tuning near the optimal candidate value to optimize the clustering effect; The exploration is performed repeatedly, and the exploration mechanism gradually shifts from global search to local search to find the optimal or near-optimal number of cluster centers.
2. The adjustable resource aggregation method based on the CPO algorithm according to claim 1, characterized in that: Generating new candidate values far from the current solution by randomly exploring the search space further includes: Where, is the optimal solution for the number of cluster centers, is the i-th candidate value in the search space, is a vector generated between the current CP of the crowned pig and a randomly selected CP from the population, representing the position of the predator at iteration t, τ1 is a random number based on the normal distribution, and τ2 is a random value in the interval [0,1]; generate The mathematical formula is as follows: Where: r is a random number between [1, N].
3. The adjustable resource aggregation method based on the CPO algorithm according to claim 2, characterized in that: The second sound defense mechanism using the CPO algorithm to improve the current optimal number of cluster centers further includes: Where: r1 and r2 are two random integers between [1, N], τ3 is a random value generated between 0 and 1, is a randomly generated binary vector containing 0s and 1s to cover all possible probabilities.
4. The adjustable resource aggregation method based on the CPO algorithm according to claim 1, characterized in that: The method of dynamically clustering the distribution network using electrical distance as a measurement distance further includes: The power flow equation for electrical distance is: Where: is the Jacobian matrix, ΔU and Δθ are the correction values of node voltage magnitude and phase angle respectively, U is the voltage diagonal matrix, ΔP and ΔQ are the changes of node injected active power and reactive power respectively; in: △U=(HJ -1 L-N) -1 △P+(JH -1 N-L)△Q; When ΔP and ΔQ are 0 respectively, that is, the active or reactive power injected by the node remains unchanged, we get: Where: S VP 、S VQ They are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively; The electrical distance l between nodes i and j based on power sensitivity ij The expression is: Where, d ij Indicates the degree of influence of the power change of node j on node i, d ij The smaller , the smaller the electrical distance between the two nodes, and the greater the impact of the power change of node j on node i; They represent the active voltage sensitivity of node i, the active voltage sensitivity of node j to node i, the reactive voltage sensitivity of node i, and the reactive voltage sensitivity of node j to node i respectively; The objective function of distribution network aggregation is: Where: Represents the relationship between node j and aggregation center ε i Electrical distance, n c Indicates the number of cluster divisions, n i represents the number of samples in cluster i.
5. An adjustable resource aggregation device based on the CPO algorithm, characterized in that: Using the method according to any one of claims 1 to 4, the device comprises: a vulnerability calculation unit, configured to obtain power flow data of the distribution network and calculate the comprehensive voltage vulnerability of the distribution network based on the power flow data; an initialization unit, configured to select an initial optimal number of clusters using a Crown Porcupine Optimizer (CPO) algorithm according to the comprehensive voltage vulnerability, and select the cluster with the highest voltage vulnerability as the initial cluster center; The clustering unit is used to cluster the initial optimal number of clusters and the initial cluster centers using a K-means clustering algorithm, and dynamically cluster the distribution network using electrical distance as a measurement distance.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Adjustable potential aggregation method for adjustable resources of power distribution network
CN112966717A
Photovoltaic short-term generation power combined prediction method, system, equipment and medium
CN118801343A