Adjustable resource aggregation method and device based on CPO algorithm, equipment and medium
Through the adjustable resource aggregation method based on the CPO algorithm, dynamic clustering of distribution network resources is solved, and the voltage stability and power supply reliability problems caused by distributed photovoltaic access are achieved, and the reasonable aggregation of distribution network resources and the improvement of grid stability are achieved.
Patent Information
- Application Number
- CN202411858093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-17
AI Technical Summary
The distributed photovoltaic access to the distribution network has led to an intensified power fluctuation in the network, reduced voltage stability, decreased power supply reliability, and difficult to effectively regulate distributed resources, resulting in the problem of stability of the power system not being effectively solved.
The adjustable resource aggregation method based on the CPO algorithm is adopted. By obtaining the distribution network current data, the comprehensive voltage weakness is calculated, the initial optimal number of clusters and the highest voltage weakness are selected as the initial cluster center, and dynamic clustering is used using the K-means clustering algorithm to achieve reasonable aggregation of distribution network resources.
Through dynamic clustering, reasonable clustering of each branch of the distribution network is achieved, understanding of the voltage distribution of the power grid is improved, and a strong guarantee for the safe and stable operation of the power grid is provided.
Smart Images

Figure CN119850364A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power distribution networks, and in particular to an adjustable resource aggregation method, device, equipment and medium taking into account voltage weak points. Background Art
[0002] Massive distributed photovoltaics are connected to the distribution network. On the one hand, due to the randomness and volatility of the output of distributed resources, a series of problems such as increased active power fluctuations in the network, reduced voltage stability, and reduced power supply reliability have occurred. On the other hand, due to the dispersion of distributed resources and the difficulty of regulating some of them, it is impossible to effectively regulate the distributed resources in the distribution network.
[0003] In recent years, large-scale power outages have occurred frequently around the world, 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 points in the power system are damaged by external disturbances, which in turn triggers a chain reaction of failures. Therefore, how to aggregate the adjustable resources of the entire distribution network to enhance the reliability of the entire power system while considering the voltage weak points is a difficult problem that needs to be solved urgently.
[0004] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0005] The present invention provides an adjustable resource aggregation method, device, equipment and medium based on a CPO algorithm, thereby effectively solving the problems in the background technology.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: an adjustable resource aggregation method based on the CPO algorithm, comprising the following steps:
[0007] Acquiring power flow data of the distribution network, and calculating the comprehensive voltage weakness of the distribution network according to the power flow data;
[0008] According to the comprehensive voltage weakness, the initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm, and the highest voltage weakness is selected as the initial cluster center;
[0009] The initial optimal number of clusters and the initial cluster centers are clustered using a K-means clustering algorithm, and the distribution network is dynamically clustered using electrical distance as a measurement distance.
[0010] Furthermore, the comprehensive voltage weakness S ij The calculation method is:
[0011] S ij =L ij ·Bij ;
[0012] Where, L ij is the voltage weakness index of the distribution network, B ij is the number of distribution network lines.
[0013] Furthermore, the distribution network voltage weakness index is calculated as follows:
[0014]
[0015] Where i and j are the nodes at both ends of line ij; U i and U j is the voltage value 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 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.
[0016] Furthermore, the calculation method of the distribution network line betweenness is:
[0017]
[0018] Where: L N is the total number of branches in the distribution network; N ij is the number of times the line passes from the distribution network bus node to each load node; α ij The percentage of the load lost in the distribution network to the total load is the percentage of the load lost in the distribution network to disconnect the line with nodes i and j; ij Indicates the priority of the load behind the line, expressed as a weight value.
[0019] Furthermore, the priority β of the load behind the line ij The weight of β is obtained through 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.
[0020] Furthermore, the method of selecting the initial optimal number of clusters using the crown porcupine optimizer CPO algorithm comprises the following steps:
[0021] The first visual defense strategy that simulates the CPO algorithm generates new candidate values far away from the current solution by randomly exploring the search space;
[0022] 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;
[0023] The exploration is performed repeatedly, and the exploration mechanism gradually shifts from global search to local search to find the optimal or nearly optimal number of cluster centers.
[0024] Furthermore, generating new candidate values far from the current solution by randomly exploring the search space includes:
[0025]
[0026] In the formula, 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 crown pig CP and a randomly selected CP from the population, representing the position of the predator at iteration t, τ 1 is a random number based on normal distribution, τ 2 is a random value in the interval [0,1];
[0027] generate The mathematical formula is as follows:
[0028]
[0029] Where: r is a random number between [1, N].
[0030] Furthermore, the second sound defense mechanism using the CPO algorithm improves the current optimal number of cluster centers, including:
[0031]
[0032] 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.
[0033] Furthermore, the dynamically clustering the distribution network using the electrical distance as the measurement distance includes:
[0034] The power flow equation for electrical distance is:
[0035]
[0036] 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 and reactive power respectively;
[0037] in:
[0038] ΔU=(HJ -1 LN) -1 ΔP+(JH -1 NL)ΔQ;
[0039] When ΔP and ΔQ are 0 respectively, that is, the active or reactive power injected by the node remains unchanged, we get:
[0040]
[0041] Where: S VP , S VQ They are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively;
[0042] Electrical distance l between nodes i and j based on power sensitivity ij The expression is:
[0043]
[0044] Where, d ij Indicates the impact of the power change of node j on node i, d ij The smaller it is, the smaller the electrical distance between the two nodes is, and the greater the impact of the power change of node j on node i is; 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;
[0045] The objective function of distribution network aggregation is:
[0046]
[0047] 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.
[0048] The present invention also includes an adjustable resource aggregation device based on the CPO algorithm, using the above method, the device includes:
[0049] A weakness calculation unit, used to obtain power flow data of the distribution network and calculate the comprehensive voltage weakness of the distribution network according to the power flow data;
[0050] An initialization unit, configured to select an initial optimal number of clusters according to the comprehensive voltage weakness using a crown porcupine optimizer (CPO) algorithm, and select the highest voltage weakness as the initial cluster center;
[0051] 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.
[0052] The present invention also includes a computer device, including 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 described above is implemented.
[0053] The present invention also includes a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0054] The beneficial effects of the present invention are as follows: the comprehensive voltage weakness of the distribution network is calculated through the flow data, the initial optimal number of clusters is selected through the crown porcupine optimizer CPO algorithm, and the highest voltage weakness is selected as the initial cluster center; the initial optimal number of clusters and the initial cluster center are clustered using the K-means clustering algorithm, and the distribution network is dynamically clustered using the electrical distance as the measurement distance; and the reasonable clustering of each branch of the distribution network is achieved. It is helpful to better understand the voltage distribution of the distribution network and provide a strong guarantee for the safe and stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 is a flow chart of the method in Example 1;
[0057] Figure 2 It is a structural schematic diagram of the device in Example 1;
[0058] Figure 3 This is a flow chart of the distribution network aggregation method in Example 2;
[0059] Figure 4 The improved IEEE33 node power distribution network diagram in Example 2;
[0060] Figure 5 is the comprehensive voltage weakness of each node 12 at the moment in Example 2;
[0061] Figure 6 It is a structural schematic diagram of the computer device of the present invention. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0063] Embodiment 1:
[0064] like Figure 1 As shown: An adjustable resource aggregation method based on the CPO algorithm includes the following steps:
[0065] Obtain power flow data of the distribution network, and calculate the comprehensive voltage weakness of the distribution network based on the power flow data;
[0066] According to the comprehensive voltage weakness, the initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm, and the highest voltage weakness is selected as the initial cluster center;
[0067] The K-means clustering algorithm is used to cluster the initial optimal number of clusters and the initial cluster centers, and the distribution network is dynamically clustered using electrical distance as the measurement distance.
[0068] The comprehensive voltage weakness of the distribution network is calculated through the flow data, the initial optimal number of clusters is selected through the crown porcupine optimizer CPO algorithm, and the highest voltage weakness is selected as the initial cluster center; the initial optimal number of clusters and the initial cluster center are clustered using the K-means clustering algorithm, and the distribution network is dynamically clustered using the electrical distance as the measurement distance; and the reasonable clustering of each branch of the distribution network is achieved. This helps to better understand the voltage distribution of the distribution network and provide a strong guarantee for the safe and stable operation of the power grid.
[0069] In this embodiment, the comprehensive voltage weakness S ij The calculation method is:
[0070] S ij =L ij ·B ij ;
[0071] Where, L ij is the voltage weakness index of the distribution network, B ij is the number of distribution network lines.
[0072] The calculation method of the distribution network voltage weakness index is:
[0073]
[0074] Where i and j are the nodes at both ends of line ij; U i and U j is the voltage value corresponding to nodes i and j, P jis 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.
[0075] The calculation method of the distribution network line betweenness is:
[0076]
[0077] Where: L N is the total number of branches in the distribution network; N ij is the number of times the line passes from the distribution network bus node to each load node; α ij The percentage of the load lost in the distribution network to the total load is the percentage of the load lost in the distribution network to disconnect the line with nodes i and j; ij Indicates the priority of the load behind the line, expressed as a weight value.
[0078] Among them, the priority of the load behind the line β ij The weight of β is obtained through 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.
[0079] As a preferred embodiment of the above, the initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm, including the following steps:
[0080] The first visual defense strategy that simulates the CPO algorithm generates new candidate values far away from the current solution by randomly exploring the search space;
[0081] 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;
[0082] The exploration is performed repeatedly, and the exploration mechanism gradually shifts from global search to local search to find the optimal or nearly optimal number of cluster centers.
[0083] In this embodiment, new candidate values far from the current solution are generated by randomly exploring the search space, including:
[0084]
[0085] In the formula, 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 crown pig CP and a randomly selected CP from the population, representing the position of the predator at iteration t, τ 1 is a random number based on normal distribution, τ 2 is a random value in the interval [0,1];
[0086] generate The mathematical formula is as follows:
[0087]
[0088] Where: r is a random number between [1, N].
[0089] The second sound defense mechanism using the CPO algorithm improves the current optimal number of cluster centers, including:
[0090]
[0091] 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.
[0092] Among them, the distribution network is dynamically clustered using electrical distance as the measurement distance, including:
[0093] The power flow equation for electrical distance is:
[0094]
[0095] 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 and reactive power respectively;
[0096] in:
[0097] ΔU=(HJ -1 LN) -1 ΔP+(JH -1 NL)ΔQ;
[0098] When ΔP and ΔQ are 0 respectively, that is, the active or reactive power injected by the node remains unchanged, we get:
[0099]
[0100] Where: S VP , S VQ They are the approximate active voltage sensitivity matrix and the approximate reactive voltage sensitivity matrix respectively;
[0101] Electrical distance l between nodes i and j based on power sensitivity ij The expression is:
[0102]
[0103] Where, d ij Indicates the impact of the power change of node j on node i, d ij The smaller it is, the smaller the electrical distance between the two nodes is, and the greater the impact of the power change of node j on node i is; 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;
[0104] The objective function of distribution network aggregation is:
[0105]
[0106] 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.
[0107] like Figure 2 As shown, this embodiment also includes an adjustable resource aggregation device based on the CPO algorithm, using the above method, the device includes:
[0108] A weakness calculation unit is used to obtain power flow data of the distribution network and calculate the comprehensive voltage weakness of the distribution network according to the power flow data;
[0109] An initialization unit, used to select the initial optimal number of clusters according to the comprehensive voltage weakness using the crown porcupine optimizer CPO algorithm, and select the highest voltage weakness as the initial cluster center;
[0110] The clustering unit is used to cluster the initial optimal number of clusters and the initial cluster centers using the K-means clustering algorithm, and dynamically cluster the distribution network using the electrical distance as the measurement distance.
[0111] Embodiment 2:
[0112] like Figure 3 As shown, this embodiment includes a method for aggregating adjustable resources of a low-voltage distribution network based on a CPO algorithm, comprising the following steps:
[0113] Step 1: Calculate the comprehensive voltage weakness of the distribution network based on the power flow data of the distribution network. The comprehensive voltage weakness of the distribution network can clearly determine the voltage weakness of each line in the distribution network;
[0114] Step 2: According to the comprehensive voltage weakness of the distribution network, the Crested Porcupine Optimizer (CPO) is selected to improve the K-means algorithm, and the initial optimal number of clusters is selected to facilitate the subsequent distribution network aggregation.
[0115] Step 3: In the distribution network aggregation process, the optimal number of clusters n is optimized by the crown porcupine optimizer, and the n lowest comprehensive voltage weaknesses are selected as K-means aggregation centers. The distribution network is dynamically aggregated using the electrical distance as the measurement distance through the K-means algorithm.
[0116] In step 1, the comprehensive voltage weakness of the power grid considers the voltage weakness index L of the distribution network ij And the distribution network line number Bij:. Among them: the distribution network voltage weakness index L ij The calculation method is as shown in formula (12)
[0117]
[0118] Where: i and j are the nodes at both ends of line ij, and the arrows point to the power flow direction of the branch. Ui and Uj are the voltage values corresponding to nodes i and j, Pi+jQi and Pj+jQj are the injected powers of nodes i and j, respectively, 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 follows:
[0120]
[0121] Where: LN is the total number of branches in the distribution network; Nij is the number of times the line passes from the distribution network bus node to each load node; αij is the percentage of the load lost in the distribution network when the line with nodes i and j is disconnected; βij represents the priority of the load behind the line, expressed as a weight value. The size of the weight can be obtained through 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 takes the weight value corresponding to the load with the highest priority.
[0122] The calculation method of the comprehensive voltage weakness of the power grid in step 1 is as shown in formula (14).
[0123] S ij =L ij ·B ij (14)
[0124] In the formula: The larger the value of Sij is, the more vulnerable this branch is in the distribution network. When a fault occurs, it is more likely to cause a cascading failure of the system.
[0125] In step 2, the Crested Porcupine Optimizer (CPO) improves the K-means algorithm and selects the initial optimal number of clusters. The steps of the CPO algorithm are:
[0126] First, we simulate the first visual defense strategy of the crested porcupine and generate new candidate values far away from the current solution by randomly exploring the search space. The generation formula for the candidate value of the number of cluster centers is as follows:
[0127]
[0128] 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 (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 a normal distribution, and τ2 is a random value in the interval [0,1]. The mathematical formula is as follows:
[0129]
[0130] Where: r is a random number between [1, N].
[0131] Secondly, the second sound defense mechanism of the CPO algorithm is used to further improve the current optimal number of cluster centers. Local search or fine-tuning can be performed near the optimal candidate value to optimize the clustering effect. The improved formula for the candidate value of the number of cluster centers is as follows:
[0132]
[0133] 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.
[0134] Finally, the exploration is repeated, and the exploration mechanism gradually shifts from global search to local search to find the optimal or approximately optimal number of cluster centers.
[0135] Step 3: Improve the K-means algorithm through the crown porcupine optimizer and dynamically aggregate the distribution network using electrical distance as the measurement distance. The calculation of electrical distance relies on approximate voltage sensitivity, which is calculated with the help of the Newton method in polar coordinates. The power flow equation is:
[0136]
[0137] 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 active and reactive power injected into the node 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 by the node remains unchanged, we can get:
[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 impact of the power change of node j on node i, d ij The smaller it is, the smaller the electrical distance between the two nodes is, and the greater the impact of the power change of node j on node i is; 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. Figure 4As shown, distributed photovoltaics are connected at nodes 4, 15, 17, 18, and 30, switchable capacitors are connected at node 5, distributed energy storage is connected at node 15, and continuous reactive power compensation devices are connected at node 24. Among them, switchable capacitors are switched in groups, and in order to increase the service life of CB, there is a certain number of switching actions, and the constraints are:
[0149]
[0150] Where: represents the output of the CB connected to node i at time t, represents the power of a single group of CBs connected to node i, Indicates the number of CB groups that node i accesses at time t, and the value is an integer. represents the maximum number of CB switching groups connected to node i, Z represents an integer set, is the maximum number of actions in one dispatching cycle of CB. Static VAR compensator SVC is a continuous VAR compensation device, and its constraints can be expressed as:
[0151]
[0152] Where: represents the output of the SVC connected to node i at time t, It represents the upper and lower limits of the output of the SVC connected to node i. The on-load tap-changing transformer OLTC is adjusted in gears, which is consistent with CB. There is also a certain limit on the number of actions of OLTC in a scheduling cycle. The constraint is:
[0153]
[0154] Where: represents the transformation ratio of the OLTC connected between nodes i and j at time t, Indicates the OLTC gear position that nodes i and j access at time t, and the value is an integer. To adjust the step size, Indicates the upper and lower limits of the gear for OLTC access, K0 is the initial gear, which is 0.95. is the maximum number of actions in one OLTC dispatch cycle. The distributed energy storage ESS constraint can be expressed as:
[0155]
[0156] Where: They represent the charging and discharging power of the energy storage connected to node i at time t, They represent the minimum and maximum values of the energy storage charging power at node i, respectively. They represent the minimum and maximum values of the energy storage discharge power at node i, respectively. denote the energy storage charging and discharging efficiency at node i, respectively, represents the energy storage charge connected to node i at time t, Δt represents the time granularity of day-ahead scheduling, They represent the minimum and maximum energy storage charge of node i respectively. They represent the energy storage charging and discharging flags at node i at time t, respectively. 0 and 1 represent stop and start, respectively, and the two satisfy the mutually exclusive constraint:
[0157]
[0158] Select a typical scenario at 12 noon, and take the minimum total network loss as the objective function to calculate the comprehensive voltage weakness of each node. The calculation results are as follows: Figure 5 As shown in Figure 2. The loads of each node are of the same level. Figure 5 It can be seen that nodes 9, 15, 24, and 27 are the four points with the highest voltage weakness, and these four nodes are selected as 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] This embodiment establishes the comprehensive voltage weakness of the distribution network lines based on the distribution network voltage weakness index and the distribution network line betweenness. It is proposed to optimize the K-means algorithm based on the CP0 (Crested Porcupine Optimizer) algorithm, and select the optimal number of clusters based on the first and second defense mechanisms of the crested porcupine, and select the branch with the highest comprehensive voltage weakness as the cluster center. Finally, the K-means algorithm is used to divide the clusters. Thereby achieving reasonable clustering of each branch of the distribution network. This helps to better understand the voltage distribution of the distribution network and provide a strong guarantee for the safe and stable operation of the power grid.
[0162] See also Figure 6 A computer device 400 provided in an embodiment of the present application includes: a processor 410 and a memory 420, wherein the memory 420 stores a computer program executable by the processor 410, and when the computer program is executed by the processor 410, the above method is executed.
[0163] The embodiment of the present application further provides a storage medium 430 on which a computer program is stored. When the computer program is run by the processor 410, the above method is executed.
[0164] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device 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 red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0165] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.
[0166] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0167] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0168] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0169] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0170] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0171] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0172] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. An adjustable resource aggregation method based on CPO algorithm, characterized in that: The steps include: Acquiring power flow data of the distribution network, and calculating the comprehensive voltage weakness of the distribution network according to the power flow data; According to the comprehensive voltage weakness, the initial optimal number of clusters is selected using the Crown Porcupine Optimizer CPO algorithm, and the highest voltage weakness is selected as the initial cluster center; The initial optimal number of clusters and the initial cluster centers are clustered using a K-means clustering algorithm, and the distribution network is dynamically clustered using electrical distance as a measurement distance.
2. The adjustable resource aggregation method based on the CPO algorithm according to claim 1 is characterized in that: 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 number of distribution network lines.
3. The adjustable resource aggregation method based on the CPO algorithm according to claim 2 is characterized in that: The calculation method of the distribution network voltage weakness index is: In the formula, i and j are the nodes at both ends of line ij respectively; 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.
4. The adjustable resource aggregation method based on the CPO algorithm according to claim 2 is characterized in that: 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 line is passed from the distribution network bus node to each load node; α ij To disconnect the line with nodes i and j, the percentage of the load lost in the distribution network to the total load; β ij Indicates the priority of the load behind the line, expressed as a weight value.
5. The adjustable resource aggregation method based on the CPO algorithm according to claim 4 is characterized in that: The priority of the load behind the line β ij The weight of β is obtained through 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.
6. The adjustable resource aggregation method based on the CPO algorithm according to claim 1 is characterized in that: 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 that simulates the 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 nearly optimal number of cluster centers.
7. The adjustable resource aggregation method based on the CPO algorithm according to claim 6 is characterized in that: The generating of new candidate values far from the current solution by randomly exploring the search space further comprises: In the formula, 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 crown pig CP 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]; generate The mathematical formula is as follows: Where: r is a random number between [1, N].
8. The adjustable resource aggregation method based on the CPO algorithm according to claim 7 is characterized in that: The second sound defense mechanism using the CPO algorithm improves the current optimal number of cluster centers, further comprising: 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.
9. 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 and reactive power respectively; in: ΔU=(HJ -1 LN) -1 ΔP+(JH -1 NL)Δ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; 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 it is, the smaller the electrical distance between the two nodes is, and the greater the impact of the power change of node j on node i is; 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.
10. An adjustable resource aggregation device based on CPO algorithm, characterized in that: Using the method according to any one of claims 1 to 9, the device comprises: A weakness calculation unit, used to obtain power flow data of the distribution network and calculate the comprehensive voltage weakness of the distribution network according to the power flow data; An initialization unit, configured to select an initial optimal number of clusters according to the comprehensive voltage weakness using a crown porcupine optimizer (CPO) algorithm, and select the highest voltage weakness 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.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.
12. 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 9 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