Distributed photovoltaic classification frequency regulation method and device, and terminal

By constructing cluster partitioning indicators for distributed photovoltaic power and an improved K-means algorithm, combined with anomaly detection and frequency band decomposition analysis, refined regulation of distributed photovoltaic power was achieved, solving the problems of regulation lag and equipment loss, and improving the economic efficiency and security of power grid operation.

CN122203243APending Publication Date: 2026-06-12STATE GRID HEBEI ELECTRIC POWER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID HEBEI ELECTRIC POWER CO LTD
Filing Date
2025-10-30
Publication Date
2026-06-12

Smart Images

  • Figure CN122203243A_ABST
    Figure CN122203243A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of distributed photovoltaic participation in grid frequency control, and particularly relates to a distributed photovoltaic classification frequency regulation method, device and terminal. The method comprises the following steps: constructing two sets of cluster division indexes of instantaneous backup capacity ratio and control mode of distributed photovoltaic; performing cluster division on the distributed photovoltaic based on the two sets of cluster division indexes, and obtaining a clustering result according to the size of frequency regulation backup capacity; calculating the total amount of frequency regulation of the distributed photovoltaic corresponding to each clustering result; decomposing the grid frequency fluctuation signal according to the grid frequency fluctuation; calculating the total amount of frequency regulation resources required by the grid for the distributed photovoltaic; and according to the clustering result, the decomposition frequency band, the total amount of frequency regulation and the total amount of frequency regulation resources, controlling the distributed photovoltaic to participate in the grid frequency regulation according to the same proportion of the clustering categories. The present application can solve the problem of regulation lag in centralized regulation, and the problem of increased equipment wear and reduced operation economy caused by the regulation strategy of the full participation mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed photovoltaic (PV) grid frequency control technology, and in particular to a method, device and terminal for classified frequency regulation of distributed PV. Background Technology

[0002] With the rapid growth of distributed photovoltaic installed capacity, its output is significantly affected by sunlight and weather, exhibiting significant randomness and intermittency. This leads to a substantial decrease in the inertial response capability of traditional synchronous generator sets in the power system, a reduction in system frequency regulation margin, and a significant increase in frequency fluctuation amplitude and frequency. Especially in islanded operation or weak grid connection scenarios, it is very easy to trigger frequency over-limit protection, threatening the safe and stable operation of the power grid.

[0003] Current technical solutions for photovoltaic (PV) participation in grid frequency regulation mostly focus on centralized PV power plants, allocating frequency regulation tasks through a unified dispatch center. For distributed PV, response levels are often classified based on inverter capacity, grid connection node location, or static characteristics, and action strategies are formulated in conjunction with local frequency change rates. In cluster analysis, the traditional K-means algorithm is a commonly used tool for classification, while basic filtering and decomposition methods are mostly used for frequency fluctuation signal processing.

[0004] However, existing technologies have obvious limitations: First, centralized control logic is difficult to adapt to the characteristics of distributed photovoltaics, which are characterized by "numerous points, wide coverage, and strong equipment heterogeneity", and control is prone to lag; Second, the control strategies are mostly "full participation" mode, which still triggers a large number of distributed photovoltaic actions under small load disturbances, increasing equipment losses and reducing operating economy. Summary of the Invention

[0005] This invention provides a distributed photovoltaic classification frequency regulation method, device, and terminal to solve the problem of regulation lag in centralized regulation and the problem of increased equipment loss and reduced operating economy caused by the full participation mode regulation strategy.

[0006] In a first aspect, embodiments of the present invention provide a distributed photovoltaic classification frequency regulation method, comprising: Two sets of cluster division indicators were constructed: instantaneous reserve capacity ratio and control method for distributed photovoltaic power. Based on the two sets of cluster partitioning indicators, the improved K-means algorithm is used to partition the distributed photovoltaic system into clusters, and the clustering results based on the frequency regulation reserve capacity are obtained according to the obtained cluster partitioning results. Calculate the total frequency modulation amount of the distributed photovoltaic system corresponding to each of the clustering results; Based on the power grid frequency fluctuation, the power grid frequency fluctuation signal is decomposed to obtain the decomposed frequency band; Calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power. Based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources, distributed photovoltaic power generation is controlled to participate in grid frequency regulation in proportion to the clustering categories.

[0007] In one possible implementation, the cluster partitioning index for the instantaneous reserve capacity ratio of distributed photovoltaic power includes: Obtain the maximum output of each distributed photovoltaic unit in the photovoltaic power station and the first output power of the distributed photovoltaic unit at the corresponding moment before participating in the first frequency regulation; Based on the maximum output and the first output power, determine the dynamic reserve capacity of each distributed photovoltaic unit; The instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined based on the dynamic reserve capacity and the first output power.

[0008] In one possible implementation, determining the dynamic reserve capacity of each distributed photovoltaic unit based on the maximum output and the first output power includes: according to Determine the dynamic reserve capacity of each distributed photovoltaic unit; in, Indicates the first Dynamic reserve capacity of distributed photovoltaic power in Taiwan. Indicates the first The maximum output of Taiwan's distributed photovoltaic system Indicates the first The first output power of the distributed photovoltaic system; Based on the dynamic reserve capacity and the first output power, the instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined, including: according to Determine the instantaneous standby capacity ratio for each distributed photovoltaic unit; in, Indicates the first The instantaneous backup capacity ratio of distributed photovoltaic power generation in Taiwan.

[0009] In one possible implementation, based on the two sets of cluster partitioning indices, an improved K-means algorithm is used to partition the distributed photovoltaic system into clusters, including: The two sets of cluster partitioning indicators constitute a data point set, and each data point includes the first... The instantaneous standby capacity ratio and corresponding control methods of distributed photovoltaic systems; An anomaly detection model is constructed by cascading an isolated forest model and a KNN model, and the anomaly detection model is used to detect data points in all data point sets to obtain an anomaly data point set. Based on the set of data points and the set of abnormal data points, a set of normal data points is obtained; The whale algorithm is used to process the set of normal data points to obtain the initial cluster centers; Based on the initial cluster centers, the K-means clustering algorithm is used to cluster the normal data points in the set of normal data points to obtain the initial clustering result. Based on the initial clustering results, the abnormal data points in the set of abnormal data points are added to the nearest cluster to obtain the final clustering results.

[0010] In one possible implementation, an anomaly detection model is constructed by cascading an isolated forest model with a KNN model, and this anomaly detection model is used to detect all data points to obtain a set of anomalous data points, including: An isolated forest model was used to detect all data points, resulting in an initial set of outlier data points. Calculate the information entropy-weighted normalized distance between each initial abnormal data point in the initial abnormal data point set and other points; Determine the sum of the K minimum distances among all distances corresponding to the current initial outlier data point, and compare this sum with a preset threshold; K is a positive integer; If this sum is greater than the preset threshold, then the current initial abnormal data point is determined to be an abnormal data point; Based on the above method for determining abnormal data points, all abnormal data points in the initial abnormal data point set are determined to obtain the abnormal data point set.

[0011] In one possible implementation, calculating the total frequency regulation of the distributed photovoltaic system corresponding to each of the clustering results includes: according to Calculate the total frequency modulation amount of the distributed photovoltaic system corresponding to each of the clustering results; in, This indicates the number of distributed photovoltaic (PV) units in the first category in the clustering results. The first category of distributed PV units refers to those with an instantaneous reserve capacity ratio greater than or equal to 30%. This indicates the number of second-category distributed photovoltaic (PV) systems in the clustering results. The second-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than or equal to 10% and less than 30%. This indicates the number of third-category distributed photovoltaic (PV) systems in the clustering results. The third-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than 10%. This represents the total frequency regulation of the first type of distributed photovoltaic power. This indicates the maximum output of the first type of distributed photovoltaic power. This represents the first output power of the first type of distributed photovoltaic power. This indicates the total frequency regulation of the second type of distributed photovoltaic power. This indicates the maximum output of the second type of distributed photovoltaic power. This represents the first output power of the second type of distributed photovoltaic power. This indicates the total frequency regulation of the third type of distributed photovoltaic power. This indicates the maximum output of the third type of distributed photovoltaic power. This represents the first output power of the third type of distributed photovoltaic power. This represents the total number of distributed photovoltaic systems. This indicates the dynamic reserve capacity of distributed photovoltaic systems.

[0012] In one possible implementation, the decomposed frequency band includes , and ,in Indicates low-frequency fluctuations. Indicates mid-frequency fluctuations. Indicates high-frequency fluctuations; Based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources, distributed photovoltaic power generation participates in grid frequency regulation in proportion to the clustering categories, including: When the decomposition frequency band is At that time, the third type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to... and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have been activated; Indicates the total amount of frequency modulation resources; When the decomposition frequency band is At that time, the second type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to and The comparison results determine whether the first type of distributed photovoltaic and the third type of distributed photovoltaic are activated; When the decomposition frequency band is At that time, the first type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to and The comparison results determine whether the second type of distributed photovoltaic and the third type of distributed photovoltaic are activated.

[0013] In one possible implementation, the basis and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the first type of distributed photovoltaic nor the second type of distributed photovoltaic is started; when Greater than Then the second type of distributed photovoltaic power generation will be activated; when Greater than and The sum of these amounts will initiate the first type of distributed photovoltaic power generation. According to and The comparison results determine whether the first type of distributed photovoltaic and the third type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the first type of distributed photovoltaic power nor the third type of distributed photovoltaic power is activated, then neither will start; when Greater than Then the first type of distributed photovoltaic system will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation. according to and The comparison results determine whether the second type of distributed photovoltaic and the third type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the second type of distributed photovoltaic nor the third type of distributed photovoltaic is activated; when Greater than Then the second type of distributed photovoltaic power generation will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation.

[0014] Secondly, embodiments of the present invention provide a distributed photovoltaic classification frequency regulation device, comprising: The module is used to construct two sets of cluster partitioning indicators for distributed photovoltaic systems: instantaneous standby capacity ratio and control method. The clustering analysis module is used to perform clustering of the distributed photovoltaic system based on the two sets of clustering indicators and an improved K-means algorithm. Based on the obtained clustering results, clustering results are obtained according to the size of the frequency regulation reserve capacity. The calculation module is used to calculate the total frequency modulation amount of the distributed photovoltaic corresponding to each of the clustering results; The calculation module is also used to decompose the power grid frequency fluctuation signal according to the power grid frequency fluctuation to obtain the decomposed frequency band; The calculation module is also used to calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power. The control module is used to control distributed photovoltaic power generation to participate in grid frequency regulation in proportion to the clustering categories, based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources.

[0015] Thirdly, embodiments of the present invention provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the distributed photovoltaic classification frequency regulation method as described in the first aspect or any possible implementation thereof.

[0016] This invention provides a method, device, and terminal for frequency regulation of distributed photovoltaic (PV) systems. It constructs two sets of clustering indicators for distributed PV: instantaneous reserve capacity ratio and control mode. Based on these indicators, an improved K-means algorithm is used to cluster the distributed PV systems. The clustering results are then used to obtain clustering results categorized by frequency regulation reserve capacity. The total frequency regulation capacity of the distributed PV systems corresponding to each clustering result is calculated. The grid frequency fluctuation signal is decomposed into decomposed frequency bands based on grid frequency fluctuations. The total frequency regulation resources required by the grid for distributed PV are calculated. Finally, based on the clustering results, decomposed frequency bands, total frequency regulation capacity, and total frequency regulation resources, distributed PV systems are controlled to participate in grid frequency regulation proportionally according to the clustering category. This allows for different regulation of the distributed PV systems corresponding to the clustering results under different grid frequency bands, based on the comparison of the total frequency regulation capacity and total frequency regulation resources. This achieves refined regulation of distributed PV systems, avoiding frequent operation of all distributed PV systems under minor grid disturbances, and improving the economic efficiency and security of grid operation. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the implementation of the distributed photovoltaic classification frequency regulation method provided in this embodiment of the invention. Figure 2 This is a flowchart illustrating the implementation of the cluster partitioning method provided in this embodiment of the invention. Figure 3 This is a schematic diagram of the cluster partitioning process provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the process for obtaining a set of abnormal data points provided in an embodiment of the present invention; Figure 5This is a schematic diagram of the processing flow of the whale algorithm provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the power grid frequency regulation process provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the IEEE 33-node system provided in an embodiment of the present invention; Figure 8 This is a comparison diagram of the dynamic frequency response of the power grid after load disturbance under different distributed photovoltaic frequency regulation strategies provided in the embodiments of the present invention; Figure 9 This is a schematic diagram of the structure of the distributed photovoltaic classification frequency regulation device provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation

[0019] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0021] Figure 1 A flowchart illustrating the implementation of a distributed photovoltaic classification frequency regulation method according to an embodiment of the present invention is described in detail below: Step 101: Construct two sets of cluster division indicators for distributed photovoltaic power: instantaneous standby capacity ratio and control mode.

[0022] In one embodiment, the cluster partitioning index for the instantaneous reserve capacity ratio of distributed photovoltaic power may include: Obtain the maximum output of each distributed photovoltaic (PV) unit in the PV power plant and the first output power of the distributed PV unit at the corresponding moment before participating in the first frequency regulation; determine the dynamic reserve capacity of each distributed PV unit based on the maximum output and the first output power; determine the instantaneous reserve capacity ratio of each distributed PV unit based on the dynamic reserve capacity and the first output power.

[0023] Before obtaining the maximum output of each distributed photovoltaic unit in the photovoltaic power plant, the active power regulation range of the distributed photovoltaic system can be constructed, i.e. ,in, This represents the active power of distributed photovoltaic systems. Indicates the first The maximum output of each distributed photovoltaic (PV) unit. The maximum output of each distributed PV unit is obtained within its active power regulation range.

[0024] Optional, according to Determine the dynamic reserve capacity of each distributed photovoltaic unit; in, Indicates the first Dynamic reserve capacity of distributed photovoltaic power in Taiwan. Indicates the first The maximum output of Taiwan's distributed photovoltaic system Indicates the first The first output power of the distributed photovoltaic system; Optionally, the instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined based on the dynamic reserve capacity and the first output power, including: according to Determine the instantaneous standby capacity ratio for each distributed photovoltaic unit; in, Indicates the first The instantaneous backup capacity ratio of distributed photovoltaic power generation in Taiwan.

[0025] Each distributed photovoltaic power station within the divided cluster has the same photovoltaic inverter control method, including: constant reactive power control strategy, constant power factor control strategy, control strategy based on photovoltaic active power output, and control strategy based on grid connection point voltage amplitude.

[0026] Step 102: Based on two sets of cluster partitioning indicators, the improved K-means algorithm is used to partition the distributed photovoltaic system into clusters. The clustering results obtained are then used to determine the clustering results based on the size of the frequency regulation reserve capacity.

[0027] In this step, before clustering, an outlier detection method combining Isolation Forest and K-Nearest Neighbors is used to detect outliers on two sets of cluster partitioning metrics. For normal data points, the whale algorithm is used to generate optimal initial cluster centers, which are then used for clustering. Finally, the detected outliers are assigned to the processed clusters. The combination of Isolation Forest and K-Nearest Neighbors filters out outliers to avoid interfering with the cluster center iteration, while the whale algorithm selects the optimal initial cluster centers to ensure the clustering results are not distorted.

[0028] In one embodiment, such as Figure 2 , Figure 3 As shown, based on two sets of cluster partitioning indicators, the improved K-means algorithm is used to partition distributed photovoltaic clusters, which may include the following steps: Step 201: Divide the two groups of clusters into a set of data points based on the indexes. Each data point includes the first... The instantaneous standby capacity ratio and corresponding control methods of distributed photovoltaic systems.

[0029] Optionally, the control methods included in the data point set are quantized values ​​of the control methods. For example, the control methods of the inverter can be converted into numerical variables through encoding, such as using dummy variable encoding: constant reactive power control is recorded as 1, constant power factor control is recorded as 2, etc., so that they can participate in subsequent distance calculations.

[0030] Step 202: Construct an anomaly detection model by cascading an isolated forest model and a KNN model, and use the anomaly detection model to detect data points in all data point sets to obtain an anomaly data point set.

[0031] Optionally, this step may include: An isolated forest model is used to detect all data points, resulting in an initial set of outlier data points. The information entropy-weighted normalized distance between each initial outlier data point and other points in the initial outlier data point set is calculated. The sum of the K smallest distances (K is a positive integer) corresponding to the current initial outlier data point is determined and compared with a preset threshold. If the sum is greater than the preset threshold, the current initial outlier data point is determined as an outlier data point. All outlier data points in the initial outlier data point set are determined using the above method, resulting in an outlier data point set.

[0032] like Figure 4 In the flowchart illustrating the process of obtaining the set of outlier data points, the Isolation Forest model first standardizes the data points in the set when detecting all data points. Then, it extracts features from the data points to obtain a feature set. Multiple isolated trees are then constructed to form an isolated forest. The Isolation Forest is used to filter out the set of potential outlier data points, which is the initial set of outlier data points. , This indicates the number of initial abnormal data points in the initial abnormal data point set.

[0033] A KNN model is trained using a set of data points. The trained KNN model is then used to predict each initial outlier in the initial outlier set. Simultaneously, the information entropy-weighted normalized distance between each initial outlier and other points is calculated. Finally, the prediction and distance results are combined to obtain the final set of outlier data points. , This indicates the number of abnormal data points in the set of abnormal data points. Hollow circles and dashed circles can be used to distinguish between normal and abnormal data points; for example, normal data points are identified by hollow circles, and abnormal data points by dashed circles.

[0034] Optionally, in this embodiment, an improved information entropy-weighted normalized distance calculation is used instead of the traditional Euclidean distance. The specific process is as follows: Calculate the entropy of each feature: ; in, This represents the information entropy of the calculated features. Indicates the first The probability of each feature Indicates the number of features.

[0035] The normalized distance, weighted by the information entropy of each initial outlier data point and other points, is: ; in, For data points, Represents the normalized distance weighted by information entropy. Indicates the first The weights of each feature, Representing data points In the The values ​​taken on each feature dimension Representing data points In the The values ​​can be taken in each feature dimension.

[0036] Step 203: Based on the set of data points and the set of abnormal data points, obtain the set of normal data points.

[0037] By removing the abnormal data points from the data point set, you can obtain the normal data points.

[0038] Step 204: The whale algorithm is used to process the normal data point set to obtain the initial cluster centers.

[0039] See Figure 5 The diagram shown illustrates the processing flow of the whale algorithm. First, the population positions are initialized, and the position of each individual is represented by a vector: ;in, Indicates the first Only whales Location at any given moment , Indicates the boundary of the search space. A function that generates uniformly distributed random numbers in the interval [0,1]. Each call returns a random value between 0 and 1.

[0040] Calculate the fitness function value of the whale population. The fitness function is selected based on the specific objective function of the actual problem. The sum of squared errors or the sum of squared squares within the cluster can be used as the fitness value; a lower fitness value indicates a more superior individual.

[0041] The iteration terminates when the fitness function value is satisfied, outputting the current whale individual's position, with each whale individual's position corresponding to a cluster center. If the termination condition is not satisfied, the current clustering error is calculated based on the loss function, and the positions of all whale individuals in the population are updated. The fitness function value is then recalculated based on the updated whale individual positions until the termination condition is satisfied, at which point the iteration ends.

[0042] Optionally, whales adjust their position and speed based on their current fitness, simulating the cooperative behavior of a whale pod and individual search behavior, and update their position and speed accordingly: ; in, It is the first Only whales Location at any given moment It is the step size of the spiral update. It is a vector representing the direction from the current position to the global optimal position.

[0043] Adjust some control parameters in the whale algorithm process: ; in, It is a random number. It is a linearly decreasing coefficient that decreases with the number of iterations.

[0044] Step 205: Based on the initial cluster centers, use the K-means clustering algorithm to cluster the normal data points in the normal data point set to obtain the initial clustering results.

[0045] The initial cluster centers are broadcast to all nodes. Then, the normal data points in the normal data point set are partitioned, and the normal data points are assigned to the nearest cluster. The new cluster centers are calculated and updated. Then, it is determined whether the algorithm has converged. If it has not converged, the previous step is returned, the data is reallocated to the nearest cluster and the cluster centers are updated, and the iteration is repeated until the algorithm converges. Finally, the clustering results are output.

[0046] Step 206: Based on the initial clustering results, add the outlier data points in the outlier data point set to the nearest cluster to obtain the final clustering results.

[0047] Calculate the distance from each outlier in the set of outlier data points to the center of each cluster, and add the outlier data points to the cluster with the smallest distance, thus obtaining the final clustering result.

[0048] Based on the above clustering results, three clustering results are obtained according to the size of the frequency regulation reserve capacity, and are defined as follows: This is the first type of clustering result, indicating high standby capacity. This is the result of the second type of clustering, representing the medium reserve capacity; This is the third type of clustering result, indicating low standby capacity.

[0049] Step 103: Calculate the total frequency regulation of distributed photovoltaic power corresponding to each clustering result.

[0050] In one embodiment, calculating the total frequency modulation amount of distributed photovoltaic power corresponding to each clustering result includes: according to Calculate the total frequency modulation amount of distributed photovoltaic power corresponding to each clustering result; in, This indicates the number of distributed photovoltaic (PV) units in the first category in the clustering results. The first category of distributed PV units refers to those with an instantaneous reserve capacity ratio greater than or equal to 30%. This indicates the number of second-category distributed photovoltaic (PV) systems in the clustering results. The second-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than or equal to 10% and less than 30%. This indicates the number of third-category distributed photovoltaic (PV) systems in the clustering results. The third-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than 10%. This represents the total frequency regulation of the first type of distributed photovoltaic power. This indicates the maximum output of the first type of distributed photovoltaic power. This represents the first output power of the first type of distributed photovoltaic power. This indicates the total frequency regulation of the second type of distributed photovoltaic power. This indicates the maximum output of the second type of distributed photovoltaic power. This represents the first output power of the second type of distributed photovoltaic power. This indicates the total frequency regulation of the third type of distributed photovoltaic power. This indicates the maximum output of the third type of distributed photovoltaic power. This represents the first output power of the third type of distributed photovoltaic power. This represents the total number of distributed photovoltaic systems. This indicates the dynamic reserve capacity of distributed photovoltaic systems.

[0051] Step 104: Decompose the power grid frequency fluctuation signal according to the power grid frequency fluctuation to obtain the decomposed frequency band.

[0052] The Fourier decomposition method is used to decompose the power grid frequency fluctuation signal into three components: high, medium, and low frequency fluctuations. The specific steps are as follows: (1) The power grid frequency is obtained by measuring with a digital frequency meter. ; (2) Eliminate measurement noise of the power grid frequency by using low-pass filtering; (3) The preprocessed power grid frequency signal Perform a Fast Fourier Transform to obtain the spectrum: ; in, This represents the obtained spectrum, where N is the number of sampling points.

[0053] (4) Based on step (3), define the frequency band according to the characteristics of power grid frequency fluctuation. The low-frequency fluctuation range is 0.01 Hz ~ 0.1 Hz, denoted as . The intermediate frequency fluctuation range is 0.1Hz to 1Hz, denoted as... High-frequency fluctuations range from 1Hz to 10Hz or higher, denoted as... .

[0054] Step 105: Calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power generation.

[0055] This step may include: (1) Ignoring grid losses, calculating the grid load change as follows: ; in, This represents the change in grid load. This represents the total change in power output of a photovoltaic power station at a certain moment, i.e., the total frequency regulation resources required by the power grid for distributed photovoltaic power stations at that time. This represents the change in the output power of a conventional generator set.

[0056] (2) The power change of a conventional unit is calculated as follows: ; in, This represents the power variation of a conventional generator set. This refers to the static characteristic coefficient of a conventional generator set's power frequency. This represents the change in power grid frequency.

[0057] In summary, we can obtain .

[0058] Step 106: Based on the clustering results, decomposed frequency bands, total frequency regulation amount, and total frequency regulation resources, control distributed photovoltaic power generation to participate in grid frequency regulation in proportion to the clustering categories.

[0059] In one embodiment, the frequency band decomposition includes , and ,in Indicates low-frequency fluctuations. Indicates mid-frequency fluctuations. Indicates high-frequency fluctuations; like Figure 6 As shown, based on the clustering results, decomposed frequency bands, total frequency regulation amount, and total frequency regulation resources, the participation of distributed photovoltaic power in grid frequency regulation can be controlled proportionally according to the clustering categories. This can include: When the decomposition frequency band is This indicates that the power grid is experiencing frequent fluctuations in small loads, triggering the activation of the third type of distributed photovoltaic (PV) system to participate in frequency regulation. Corresponding distributed photovoltaic; and according to and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic should be started. Indicates the total amount of frequency modulation resources; When the decomposition frequency band is When this occurs, it indicates a significant load fluctuation in the power grid, triggering the activation of the second type of distributed photovoltaic (PV) system to participate in frequency regulation. Corresponding distributed photovoltaic; and according to and The comparison results determine whether the first type and the third type of distributed photovoltaic power generation should be activated; When the decomposition frequency band is When this occurs, it indicates a large load fluctuation in the power grid, triggering the first type of distributed photovoltaic (PV) system to participate in frequency regulation. Corresponding distributed photovoltaic; and according to and The comparison results determine whether the second and third types of distributed photovoltaic power generation should be activated.

[0060] Optional, according to and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have started, including: when Less than or equal to If neither the first nor the second type of distributed photovoltaic power generation starts, then neither will start; when Greater than Then the second type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will activate the first type of distributed photovoltaic system.

[0061] Figure 6 In the middle, during startup After the corresponding distributed photovoltaic system is installed, the following tests are conducted. Is it greater than If not, then Corresponding distributed photovoltaic and The corresponding distributed photovoltaic systems did not start, only The corresponding distributed photovoltaic operation; if Greater than Then start The corresponding distributed photovoltaic system, and further testing. Is it greater than ,like Then start The corresponding distributed photovoltaic system will maintain the operation of three types of distributed photovoltaic systems; otherwise, it will remain in operation. Corresponding distributed photovoltaic and The corresponding distributed photovoltaic operation.

[0062] Optional, according to and The comparison results determine whether the first type and the third type of distributed photovoltaic power generation should be activated, including: when Less than or equal to If neither the first type of distributed photovoltaic nor the third type of distributed photovoltaic is started; when Greater than Then the first type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation.

[0063] Figure 6 In the middle, during startup After the corresponding distributed photovoltaic system is operational, the monitoring... Is it greater than ,like Less than or equal to Then the other two types of distributed photovoltaic operation will not be started, only The corresponding distributed photovoltaic operation. If Greater than Then start The corresponding distributed photovoltaic system, and further testing. Is it greater than ,like Then start For the corresponding distributed photovoltaic systems, all three types of distributed photovoltaic systems should be kept operational; otherwise, they should not be activated. The corresponding distributed photovoltaic, maintain Corresponding distributed photovoltaic and The corresponding distributed photovoltaic operation.

[0064] Optional, according to and The comparison results determine whether the second and third types of distributed photovoltaic power generation should be activated, including: when Less than or equal to If neither the second nor the third type of distributed photovoltaic power generation is activated, then neither will be started; when Greater than Then the second type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation.

[0065] Figure 6 In the middle, during startup After the corresponding distributed photovoltaic system is operational, the monitoring... Is it greater than ,like Less than or equal to Then the other two types of distributed photovoltaic operation will not be started, only The corresponding distributed photovoltaic operation. If Greater than Then start The corresponding distributed photovoltaic system, and further testing. Is it greater than ,like Then start For the corresponding distributed photovoltaic systems, all three types of distributed photovoltaic systems should be kept operational; otherwise, they should not be activated. The corresponding distributed photovoltaic, maintain Corresponding distributed photovoltaic and The corresponding distributed photovoltaic operation.

[0066] The following will illustrate this with specific examples. Figure 7 The IEEE 33-node system shown was used for verification. Five distributed photovoltaic (PV) systems were installed at nodes 8, 10, 16, 21, and 33, respectively. The capacities of the five distributed PV systems are shown in Table 1. Simulations were performed and compared under different distributed PV frequency regulation strategies: CM1: Distributed PV systems did not participate in frequency regulation; CM2: Conventional frequency regulation strategy for distributed PV systems; CM3: The classified frequency regulation method for distributed PV systems proposed in this application. Figure 8 The diagram shows a comparison of the dynamic frequency response of the power grid after load disturbances under different distributed photovoltaic frequency regulation strategies.

[0067] Figure 8 In the graph, the horizontal axis represents time in seconds, covering the complete dynamic cycle of "load disturbance occurrence → frequency fluctuation → return to stability." The vertical axis represents the grid frequency in Hz, using the power system's rated frequency of 50Hz as the baseline. The permissible frequency fluctuation range (e.g., ±0.05Hz, conforming to grid frequency stability standards) is indicated to determine whether the frequency exceeds the limit. It can be seen that CM1 exhibits the most severe frequency fluctuations and the worst stability. CM2 is more stable than CM1 but still has significant shortcomings. CM3 demonstrates the best frequency stability and the best effect on improving grid frequency stability.

[0068] Table 1

[0069] This invention provides a distributed photovoltaic (PV) classification and frequency regulation method. It constructs two sets of clustering indicators for distributed PV: instantaneous reserve capacity ratio and control mode. Based on these indicators, an improved K-means algorithm is used to cluster the distributed PV. The resulting clustering results are then categorized by frequency regulation reserve capacity. The total frequency regulation capacity of the distributed PV corresponding to each cluster is calculated. The grid frequency fluctuation signal is decomposed into decomposed frequency bands. The total frequency regulation resources required by the grid for distributed PV are calculated. Finally, based on the clustering results, decomposed frequency bands, total frequency regulation capacity, and total frequency regulation resources, distributed PV is controlled to participate in grid frequency regulation proportionally according to the clustering category. This allows for different regulation of the distributed PV corresponding to the clustering results under different grid frequency bands, based on the comparison of total frequency regulation capacity and total frequency regulation resources. This achieves refined regulation of distributed PV, avoids frequent operation of all distributed PV under small grid disturbances, improves grid operation economy and security, and avoids regulation lag.

[0070] This invention constructs a distributed photovoltaic clustering based on the instantaneous reserve capacity ratio index, which solves the clustering index for distributed photovoltaic participation in grid frequency regulation.

[0071] This invention addresses the problem of the large number of nodes that need to be controlled in traditional distributed photovoltaic (PV) clusters. It employs K-means clustering analysis to solve the "curse of dimensionality" problem caused by excessively high state and control dimensions when controlling the frequency of distributed PV clusters. A cascaded Isolation Forest and K-Nearest Neighbors algorithm is introduced to detect outliers in the dataset, preventing interference from outliers on the cluster center iteration. A whale algorithm is introduced for initial cluster center selection, improving upon the problem of distorted clustering results caused by the random selection of initial cluster centers in the traditional K-means algorithm.

[0072] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0073] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0074] Figure 9 A schematic diagram of the distributed photovoltaic classification frequency regulation device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 9As shown, the distributed photovoltaic classification frequency regulation device 9 includes: a construction module 91, a cluster analysis module 92, a calculation module 93, and a control module 94.

[0075] Module 91 is used to construct two sets of cluster partitioning indicators for distributed photovoltaic systems: instantaneous standby capacity ratio and control mode. Cluster analysis module 92 is used to perform clustering of distributed photovoltaics based on two sets of clustering indicators and an improved K-means algorithm. Based on the obtained clustering results, clustering results are obtained according to the size of frequency regulation reserve capacity. Calculation module 93 is used to calculate the total frequency modulation amount of distributed photovoltaic power corresponding to each clustering result; The calculation module 93 is also used to decompose the power grid frequency fluctuation signal according to the power grid frequency fluctuation to obtain the decomposed frequency band; The calculation module 93 is also used to calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power. The control module 94 is used to control distributed photovoltaic power to participate in grid frequency regulation in proportion to the clustering category, based on the clustering results, decomposed frequency bands, total frequency regulation amount and total frequency regulation resources.

[0076] In one possible implementation, when constructing the cluster partitioning index for the instantaneous reserve capacity ratio of distributed photovoltaic power, module 91 is used for: Obtain the maximum output of each distributed photovoltaic unit in the photovoltaic power plant and the first output power of the distributed photovoltaic units at the corresponding moment before they participate in primary frequency regulation; The dynamic reserve capacity of each distributed photovoltaic unit is determined based on the maximum output and the first output power. The instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined based on the dynamic reserve capacity and the first output power.

[0077] In one possible implementation, when building module 91 determines the dynamic reserve capacity of each distributed photovoltaic unit based on the maximum output and the first output power, it is used for: according to Determine the dynamic reserve capacity of each distributed photovoltaic unit; in, Indicates the first Dynamic reserve capacity of distributed photovoltaic power in Taiwan. Indicates the first The maximum output of Taiwan's distributed photovoltaic system Indicates the first The first output power of the distributed photovoltaic system; When constructing module 91 determines the instantaneous reserve capacity ratio of each distributed photovoltaic unit based on the dynamic reserve capacity and the first output power, it is used for: according to Determine the instantaneous standby capacity ratio for each distributed photovoltaic unit; in, Indicates the first The instantaneous backup capacity ratio of distributed photovoltaic power generation in Taiwan.

[0078] In one possible implementation, the clustering analysis module 92, based on two sets of cluster partitioning indices, uses an improved K-means algorithm to partition distributed photovoltaic clusters for: The two sets of cluster partitioning indicators form a data point set, and each data point includes the first... The instantaneous standby capacity ratio and corresponding control methods of distributed photovoltaic systems; An anomaly detection model is constructed by cascading an isolated forest model with a KNN model, and the anomaly detection model is used to detect data points in all data point sets to obtain an anomaly data point set. Based on the set of data points and the set of abnormal data points, the set of normal data points is obtained; The whale algorithm is used to process the normal data point set to obtain the initial cluster centers; Based on the initial cluster centers, the K-means clustering algorithm is used to cluster the normal data points in the normal data point set to obtain the initial clustering results; Based on the initial clustering results, the outlier data points in the set of outlier data points are added to the nearest cluster to obtain the final clustering result.

[0079] In one possible implementation, the clustering analysis module 92 constructs an anomaly detection model using a concatenated Isolation Forest model and KNN, and uses this anomaly detection model to detect all data points. When obtaining the set of anomalous data points, it is used for: An isolated forest model was used to detect all data points, resulting in an initial set of outlier data points. Calculate the information entropy-weighted normalized distance between each initial outlier data point and other points in the initial outlier data point set; Determine the sum of the K minimum distances among all distances corresponding to the current initial outlier data point, and compare this sum with a preset threshold; K is a positive integer; If this sum is greater than the preset threshold, then the current initial abnormal data point is determined to be an abnormal data point; Based on the above method for identifying outlier data points, all outlier data points in the initial outlier data point set are determined, resulting in the outlier data point set.

[0080] In one possible implementation, when the calculation module 93 calculates the total frequency regulation of the distributed photovoltaic power corresponding to each clustering result, it is used for: according to Calculate the total frequency modulation amount of distributed photovoltaic power corresponding to each clustering result; in, This indicates the number of distributed photovoltaic (PV) units in the first category in the clustering results. The first category of distributed PV units refers to those with an instantaneous reserve capacity ratio greater than or equal to 30%. This indicates the number of second-category distributed photovoltaic (PV) systems in the clustering results. The second-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than or equal to 10% and less than 30%. This indicates the number of third-category distributed photovoltaic (PV) systems in the clustering results. The third-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than 10%. This represents the total frequency regulation of the first type of distributed photovoltaic power. This indicates the maximum output of the first type of distributed photovoltaic power. This represents the first output power of the first type of distributed photovoltaic power. This indicates the total frequency regulation of the second type of distributed photovoltaic power. This indicates the maximum output of the second type of distributed photovoltaic power. This represents the first output power of the second type of distributed photovoltaic power. This indicates the total frequency regulation of the third type of distributed photovoltaic power. This indicates the maximum output of the third type of distributed photovoltaic power. This represents the first output power of the third type of distributed photovoltaic power. This represents the total number of distributed photovoltaic systems. This indicates the dynamic reserve capacity of distributed photovoltaic systems.

[0081] In one possible implementation, the frequency band decomposition includes , and ,in Indicates low-frequency fluctuations. Indicates mid-frequency fluctuations. Indicates high-frequency fluctuations; Control module 94, based on clustering results, decomposed frequency bands, total frequency regulation amount, and total frequency regulation resources, proportionally controls distributed photovoltaic power generation to participate in grid frequency regulation according to cluster categories. This is used for: When the decomposition frequency band is At that time, the third type of distributed photovoltaic power will be activated to participate in frequency regulation, and at the same time, according to and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic should be started. Indicates the total amount of frequency modulation resources; When the decomposition frequency band is At that time, the second type of distributed photovoltaic power will be activated to participate in frequency regulation, and simultaneously according to... and The comparison results determine whether the first type and the third type of distributed photovoltaic power generation should be activated; When the decomposition frequency band is At that time, the first type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to and The comparison results determine whether the second and third types of distributed photovoltaic power generation should be activated.

[0082] In one possible implementation, the control module 94 according to and The comparison results, when determining whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have started, are used for: when Less than or equal to If neither the first nor the second type of distributed photovoltaic power generation starts, then neither will start; when Greater than Then the second type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will initiate the first type of distributed photovoltaic power generation. Control module 94 according to and The comparison results, when determining whether the first type and third type of distributed photovoltaic power generation should be activated, are used for: when Less than or equal to If neither the first type of distributed photovoltaic nor the third type of distributed photovoltaic is started; when Greater than Then the first type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation. Control module 94 according to and The comparison results, when determining whether the second and third types of distributed photovoltaic power generation should be activated, are used for: when Less than or equal to If neither the second nor the third type of distributed photovoltaic power generation is activated, then neither will be started; when Greater than Then the second type of distributed photovoltaic power will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation.

[0083] The above embodiments provide a distributed photovoltaic (PV) classification frequency regulation device. A construction module builds two sets of clustering indicators for distributed PV: the instantaneous reserve capacity ratio and the control method. Then, a clustering analysis module, based on these two sets of indicators, uses an improved K-means algorithm to cluster the distributed PV. The resulting clustering results are then divided according to the size of the frequency regulation reserve capacity. A calculation module calculates the total frequency regulation amount for each clustering result. The grid frequency fluctuation signal is decomposed into decomposed frequency bands based on grid frequency fluctuations. The total frequency regulation resources required by the grid for distributed PV are calculated. Finally, a control module, based on the clustering results, decomposed frequency bands, total frequency regulation amount, and total frequency regulation resources, controls the distributed PV to participate in grid frequency regulation proportionally according to the clustering category. This enables refined regulation of distributed PV, avoiding frequent operation of all distributed PV under small grid disturbances, and improving the economic efficiency and safety of grid operation. Furthermore, a distributed PV clustering based on the instantaneous reserve capacity ratio indicator is constructed, solving the clustering indicator problem for distributed PV participation in grid frequency regulation.

[0084] This invention addresses the problem of the large number of nodes that need to be controlled in traditional distributed photovoltaic (PV) clusters. It employs K-means clustering analysis to solve the "curse of dimensionality" problem caused by excessively high state and control dimensions when controlling the frequency of distributed PV clusters. A cascaded Isolation Forest and K-Nearest Neighbors algorithm is introduced to detect outliers in the dataset, preventing interference from outliers on the cluster center iteration. A whale algorithm is introduced for initial cluster center selection, improving upon the problem of distorted clustering results caused by the random selection of initial cluster centers in the traditional K-means algorithm.

[0085] Figure 10 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 10 As shown, the terminal 10 in this embodiment includes a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, it implements the steps described in the various embodiments of the distributed photovoltaic classification frequency regulation method, for example... Figure 1 Steps 101 to 106 are shown. Alternatively, when processor 100 executes computer program 102, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 9 The functions of each module / unit are shown.

[0086] For example, computer program 102 can be divided into one or more modules / units, one or more of which are stored in memory 101 and executed by processor 100 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 102 in terminal 10. For example, computer program 102 can be divided into... Figure 9 The modules / units shown are shown.

[0087] Terminal 10 may include, but is not limited to, processor 100 and memory 101. Those skilled in the art will understand that... Figure 10 This is merely an example of terminal 10 and does not constitute a limitation on terminal 10. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.

[0088] The processor 100 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0089] The memory 101 can be an internal storage unit of the terminal 10, such as a hard disk or RAM of the terminal 10. The memory 101 can also be an external storage device of the terminal 10, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal 10. Furthermore, the memory 101 can include both internal and external storage units of the terminal 10. The memory 101 is used to store computer programs and other programs and data required by the terminal. The memory 101 can also be used to temporarily store data that has been output or will be output.

[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0091] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0092] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0093] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0094] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0095] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0096] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described distributed photovoltaic classification frequency regulation method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0097] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for classifying and regulating the frequency of distributed photovoltaic systems, characterized in that, include: Two sets of cluster division indicators were constructed: instantaneous reserve capacity ratio and control method for distributed photovoltaic power. Based on the two sets of cluster partitioning indicators, the improved K-means algorithm is used to partition the distributed photovoltaic system into clusters, and the clustering results based on the frequency regulation reserve capacity are obtained according to the obtained cluster partitioning results. Calculate the total frequency modulation amount of the distributed photovoltaic system corresponding to each of the clustering results; Based on the power grid frequency fluctuation, the power grid frequency fluctuation signal is decomposed to obtain the decomposed frequency band; Calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power. Based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources, distributed photovoltaic power generation is controlled to participate in grid frequency regulation in proportion to the clustering categories.

2. The distributed photovoltaic classification frequency regulation method according to claim 1, characterized in that, The cluster partitioning index for the instantaneous reserve capacity ratio of distributed photovoltaic power includes: Obtain the maximum output of each distributed photovoltaic unit in the photovoltaic power station and the first output power of the distributed photovoltaic unit at the corresponding moment before participating in the first frequency regulation; Based on the maximum output and the first output power, determine the dynamic reserve capacity of each distributed photovoltaic unit; The instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined based on the dynamic reserve capacity and the first output power.

3. The distributed photovoltaic classification frequency regulation method according to claim 2, characterized in that, Based on the maximum output and the first output power, determine the dynamic reserve capacity of each distributed photovoltaic unit, including: according to Determine the dynamic reserve capacity of each distributed photovoltaic unit; in, Indicates the first Dynamic reserve capacity of distributed photovoltaic power in Taiwan. Indicates the first The maximum output of Taiwan's distributed photovoltaic system Indicates the first The first output power of the distributed photovoltaic system; Based on the dynamic reserve capacity and the first output power, the instantaneous reserve capacity ratio of each distributed photovoltaic unit is determined, including: according to Determine the instantaneous standby capacity ratio for each distributed photovoltaic unit; in, Indicates the first The instantaneous backup capacity ratio of distributed photovoltaic power generation in Taiwan.

4. The distributed photovoltaic classification frequency regulation method according to any one of claims 1-3, characterized in that, Based on the two sets of cluster partitioning indices, an improved K-means algorithm is used to partition the distributed photovoltaic systems into clusters, including: The two sets of cluster partitioning indicators constitute a data point set, and each data point includes the first... The instantaneous standby capacity ratio and corresponding control methods of distributed photovoltaic systems; An anomaly detection model is constructed by cascading an isolated forest model and a KNN model, and the anomaly detection model is used to detect data points in all data point sets to obtain an anomaly data point set. Based on the set of data points and the set of abnormal data points, a set of normal data points is obtained; The whale algorithm is used to process the set of normal data points to obtain the initial cluster centers; Based on the initial cluster centers, the K-means clustering algorithm is used to cluster the normal data points in the set of normal data points to obtain the initial clustering result. Based on the initial clustering results, the abnormal data points in the set of abnormal data points are added to the nearest cluster to obtain the final clustering results.

5. The distributed photovoltaic classification frequency regulation method according to claim 4, characterized in that, The anomaly detection model is constructed by cascading an isolated forest model and a KNN model, and then the anomaly detection model is used to detect all data points to obtain a set of anomalous data points, including: An isolated forest model was used to detect all data points, resulting in an initial set of outlier data points. Calculate the information entropy-weighted normalized distance between each initial abnormal data point in the initial abnormal data point set and other points; Determine the sum of the K minimum distances among all distances corresponding to the current initial outlier data point, and compare this sum with a preset threshold; K is a positive integer; If this sum is greater than the preset threshold, then the current initial abnormal data point is determined to be an abnormal data point; Based on the above method for determining abnormal data points, all abnormal data points in the initial abnormal data point set are determined to obtain the abnormal data point set.

6. The distributed photovoltaic classification frequency regulation method according to claim 5, characterized in that, Calculating the total frequency regulation of distributed photovoltaic power corresponding to each of the clustering results includes: according to Calculate the total frequency modulation amount of the distributed photovoltaic system corresponding to each of the clustering results; in, This indicates the number of distributed photovoltaic (PV) units in the first category in the clustering results. The first category of distributed PV units refers to those with an instantaneous reserve capacity ratio greater than or equal to 30%. This indicates the number of second-category distributed photovoltaic (PV) systems in the clustering results. The second-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than or equal to 10% and less than 30%. This indicates the number of third-category distributed photovoltaic (PV) systems in the clustering results. The third-category distributed PV systems are those with an instantaneous reserve capacity ratio greater than 10%. This represents the total frequency regulation of the first type of distributed photovoltaic power. This indicates the maximum output of the first type of distributed photovoltaic power. This represents the first output power of the first type of distributed photovoltaic power. This indicates the total frequency regulation of the second type of distributed photovoltaic power. This indicates the maximum output of the second type of distributed photovoltaic power. This represents the first output power of the second type of distributed photovoltaic power. This indicates the total frequency regulation of the third type of distributed photovoltaic power. This indicates the maximum output of the third type of distributed photovoltaic power. This represents the first output power of the third type of distributed photovoltaic power. This represents the total number of distributed photovoltaic systems. This indicates the dynamic reserve capacity of distributed photovoltaic systems.

7. The distributed photovoltaic classification frequency regulation method according to claim 6, characterized in that, The decomposed frequency band includes , and ,in Indicates low-frequency fluctuations. Indicates mid-frequency fluctuations. Indicates high-frequency fluctuations; Based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources, distributed photovoltaic power generation participates in grid frequency regulation in proportion to the clustering categories, including: When the decomposition frequency band is At that time, the third type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to... and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have been activated; Indicates the total amount of frequency modulation resources; When the decomposition frequency band is At that time, the second type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to and The comparison results determine whether the first type of distributed photovoltaic and the third type of distributed photovoltaic are activated; When the decomposition frequency band is At that time, the first type of distributed photovoltaic power is activated to participate in frequency regulation, and simultaneously according to and The comparison results determine whether the second type of distributed photovoltaic and the third type of distributed photovoltaic are activated.

8. The distributed photovoltaic classification frequency regulation method according to claim 7, characterized in that, According to and The comparison results determine whether the first type of distributed photovoltaic and the second type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the first type of distributed photovoltaic nor the second type of distributed photovoltaic is started; when Greater than Then the second type of distributed photovoltaic power generation will be activated; when Greater than and The sum of these amounts will initiate the first type of distributed photovoltaic power generation. According to and The comparison results determine whether the first type of distributed photovoltaic and the third type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the first type of distributed photovoltaic power nor the third type of distributed photovoltaic power is activated, then neither will start; when Greater than Then the first type of distributed photovoltaic system will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation. according to and The comparison results determine whether the second type of distributed photovoltaic and the third type of distributed photovoltaic have been activated, including: when Less than or equal to If neither the second type of distributed photovoltaic nor the third type of distributed photovoltaic is activated; when Greater than Then the second type of distributed photovoltaic power generation will be activated; when Greater than and The sum of these amounts will activate the third type of distributed photovoltaic power generation.

9. A distributed photovoltaic classification frequency regulation device, characterized in that, include: The module is used to construct two sets of cluster partitioning indicators for distributed photovoltaic systems: instantaneous standby capacity ratio and control method. The clustering analysis module is used to perform clustering of the distributed photovoltaic system based on the two sets of clustering indicators and an improved K-means algorithm. Based on the obtained clustering results, clustering results are obtained according to the size of the frequency regulation reserve capacity. The calculation module is used to calculate the total frequency modulation amount of the distributed photovoltaic corresponding to each of the clustering results; The calculation module is also used to decompose the power grid frequency fluctuation signal according to the power grid frequency fluctuation to obtain the decomposed frequency band; The calculation module is also used to calculate the total frequency regulation resources required by the power grid for distributed photovoltaic power. The control module is used to control distributed photovoltaic power generation to participate in grid frequency regulation in proportion to the clustering categories, based on the clustering results, the decomposed frequency bands, the total frequency regulation amount, and the total frequency regulation resources.

10. A terminal, comprising a memory and a processor, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the steps of the distributed photovoltaic classification frequency regulation method as described in any one of claims 1 to 7.