Power data management planning method based on source network load storage coordination interaction
By constructing the power data clustering sample space, screening the abnormal risk clustering cluster and calculating the clustering weight, the problem that the kmeans algorithm is prone to fall into local optimal solutions is solved, and more accurate power data clustering and prediction are achieved.
Patent Information
- Application Number
- CN202510369124.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the power data management planning method based on the kmeans clustering algorithm is prone to fall into local optimal solutions, resulting in inaccurate clustering results, affecting prediction accuracy and efficiency.
The power data clustering sample space is constructed, the local optimal risk degree is obtained through one-dimensional clustering, the abnormal risk clustering clustering clusters are screened, the cluster weight of data points is calculated, and the power data prediction is used to predict power data using the ARIMA prediction model.
It improves the accuracy of power data clustering, avoids local optimal solutions, obtains more accurate clustering results and prediction effects, and improves the accuracy and efficiency of power data management planning.
Smart Images

Figure CN120258434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power data processing, and particularly relates to a power data management planning method based on the coordinated interaction of power sources, grids, loads, and energy storage systems. Background Art
[0002] The coordinated interaction of power sources, grids, loads, and energy storage systems is a new strategy for optimizing the operation of power systems, aiming to achieve efficient coordinated interaction among power sources (power generation), grids (transmission and distribution), loads (user demands), and energy storage systems. This method can balance energy supply and demand, improve system reliability, reduce operating costs, and promote the effective utilization of new energy. By predicting power supply and user demands, analyzing the power quantity relationship between power generation and power consumption demands, and managing the power supply and demand balance in the power system.
[0003] The prior art usually can use the kmeans clustering algorithm to fit the historical data of each day, obtain the predicted power generation and power consumption demands in each time period of each day, and thus conduct management planning according to the predicted data.
[0004] However, the existing distributed power generation data and user demands are greatly affected by external environmental factors. When there are small clusters in the clustering data, the kmeans clustering is prone to fall into a local optimal solution, resulting in inaccurate clustering results, poor fitting effects, affecting the prediction results, and further leading to a decline in the accuracy and efficiency of power data management planning. Summary of the Invention
[0005] In order to solve the technical problem that the power data has strong randomness and is prone to fall into a local optimal solution when using kmeans clustering for clustering, the purpose of the present invention is to provide a power data management planning method based on the coordinated interaction of power sources, grids, loads, and energy storage systems, and the specific technical solutions adopted are as follows:
[0006] An embodiment of the present invention provides a power data management planning method based on the coordinated interaction of power sources, grids, loads, and energy storage systems, and the method includes:
[0007] Obtain the power data of each day in history and construct a historical power data set; construct a power data clustering sample space based on the historical power data set;
[0008] Cluster the power data at the same moment of each day in history respectively to obtain one-dimensional clustering clusters corresponding to each moment; obtain the first local optimal risk degree of the one-dimensional clustering clusters according to the data points in the one-dimensional clustering clusters; screen the one-dimensional clustering clusters according to the first local optimal risk degree to obtain abnormal risk clustering clusters;
[0009] Use the data points in one abnormal risk clustering cluster and the abnormal risk clustering clusters at the moments adjacent to the moment corresponding to this abnormal risk clustering cluster to calculate the second local optimal risk degree of this data point;
[0010] Obtain the clustering weight of the data points in the abnormal risk clustering cluster according to the second local optimal risk degree of the data points in the abnormal risk clustering cluster and the first local optimal risk degree corresponding to the abnormal risk clustering cluster;
[0011] Cluster within the power data clustering sample space based on the clustering weights of the data points in the abnormal risk clustering cluster to obtain a clustering result; use the clustering result to predict the power data.
[0012] Preferably, constructing a power data clustering sample space based on the historical power data set includes:
[0013] Project the time series data of each day in the historical power data set onto the same two-dimensional plane coordinate system, where the horizontal axis of the coordinate system is the time series and the vertical axis is the power data, and the time series on the horizontal axis is only each moment within a day; use the elbow method to obtain the clustering k value of the point set; divide the historical power data set projected onto the two-dimensional plane coordinate system into k rectangular areas of the same shape and area in the horizontal axis direction according to the obtained clustering k value, and within each rectangular area, obtain the minimum circumscribed rectangle of the point set within the area, and select the centroid of the minimum circumscribed rectangle as the initial clustering center to obtain the power data clustering sample space.
[0014] Preferably, clustering the power data at the same moment of each day in history respectively to obtain one-dimensional clustering clusters corresponding to each moment, including:
[0015] Obtain all the data points corresponding to a moment in the power data clustering sample space to form a single sequence, denoted as a one-dimensional data sequence; obtain the one-dimensional clustering k value and the one-dimensional clustering center, and cluster the one-dimensional data sequence according to the one-dimensional clustering k value and the one-dimensional clustering center to obtain the one-dimensional clustering cluster corresponding to that moment; and then obtain the one-dimensional clustering clusters corresponding to each moment.
[0016] Preferably, the calculation formula for the first local optimal risk degree is:
[0017]
[0018] Among them, R c represents the first local optimal risk degree of the c-th one-dimensional clustering cluster among all the one-dimensional clustering clusters corresponding to all moments; n c represents the number of data points in the c-th one-dimensional clustering cluster; represents the average value of the distances between the i-th data point in the c-th one-dimensional clustering cluster and the two adjacent data points in the one-dimensional clustering cluster; max c and min c represent the values of the data points with the largest and smallest values in the c-th one-dimensional clustering cluster respectively; N crepresents the number of one-dimensional clustering clusters corresponding to the moment corresponding to the c-th one-dimensional clustering cluster; exp[] represents the exponential function with the natural constant as the base.
[0019] Preferably, screening the one-dimensional clustering clusters according to the first local optimal risk degree to obtain abnormal risk clustering clusters, including:
[0020] Set a screening threshold, and the one-dimensional clustering clusters with the first local optimal risk degree greater than or equal to the screening threshold are abnormal risk clustering clusters.
[0021] Preferably, the method for obtaining the second local optimal risk degree is specifically:
[0022] For a data point in an abnormal risk clustering cluster, calculate the distance between the data point and the cluster center of the abnormal risk clustering cluster at the left adjacent moment corresponding to the moment of the abnormal risk clustering cluster where the data point is located. The abnormal risk clustering cluster at the left adjacent moment corresponding to the minimum distance is the left adjacent clustering cluster; calculate the distance between the data point and the cluster center of the abnormal risk clustering cluster at the right adjacent moment corresponding to the moment of the abnormal risk clustering cluster where the data point is located. The abnormal risk clustering cluster at the right adjacent moment corresponding to the minimum distance is the right adjacent clustering cluster; calculate the second local optimal risk degree of the data point according to the data point in the abnormal risk clustering cluster and its left adjacent clustering cluster and right adjacent clustering cluster.
[0023] Preferably, calculating the second local optimal risk degree of the data point according to the data point in the abnormal risk clustering cluster and its left adjacent clustering cluster and right adjacent clustering cluster, including:
[0024] Respectively obtain the number of data points in the left adjacent clustering cluster and the right adjacent clustering cluster of the data point in the abnormal risk clustering cluster, and construct a calculation formula for the second local optimal risk degree based on the number of the data points; the calculation formula is:
[0025]
[0026] where, W q represents the second local optimal risk degree of the q-th data point in all abnormal risk clustering clusters; s l represents the distance between the cluster center of the left adjacent clustering cluster of the q-th data point and the q-th data point; s r represents the distance between the cluster center of the right adjacent clustering cluster of the q-th data point and the q-th data point; n l represents the number of data points in the left adjacent clustering cluster of the q-th data point; n r represents the number of data points in the right adjacent clustering cluster of the q-th data point; n p represents the preset number of data points closest to the q-th data point in the power data clustering sample space; sj Denote the distance between the j-th data point among the preset number of data points closest to the q-th data point in the power data clustering sample space and the q-th data point in all abnormal risk clustering clusters; exp() represents the exponential function with the natural constant as the base; norm() represents the normalization operation.
[0027] Preferably, obtaining the clustering weights of the data points in the abnormal risk clustering clusters includes:
[0028] Calculating the average value of half of the values of the first local optimal risk degree of the abnormal risk clustering cluster where the data point is located and the second local optimal risk degree corresponding to the data point, and subtracting the preset value from the average value to obtain the clustering weight of the data point.
[0029] Preferably, using the clustering result to predict power data includes:
[0030] Obtain each clustering cluster in the clustering result, denoted as a two-dimensional clustering cluster; connect the clustering centers of all two-dimensional clustering clusters from left to right in the horizontal axis direction in the two-dimensional space to obtain a fitted time series curve; use the ARIMA prediction model to predict the fitted time series curve to obtain the power data at the next moment.
[0031] The embodiments of the present invention have at least the following beneficial effects: The embodiments of the present invention construct a power data clustering sample space, perform one-dimensional clustering to obtain one-dimensional clustering clusters, and then obtain the first local optimal risk degree of the one-dimensional clustering clusters and the abnormal risk clustering clusters. Then, analyze the abnormal risk clustering clusters to obtain the second local optimal risk degree of the data points in the abnormal risk clustering clusters. Obtain the clustering weights of the data points in the abnormal risk clustering clusters according to the second local optimal risk degree of the data points in the abnormal risk clustering clusters and the first local optimal risk degree corresponding to the abnormal risk clustering clusters. Then, weight the data points using the clustering weights, and then perform clustering in the power data clustering sample space so that the data points that are prone to local optimality obtain smaller weights, and the relatively normal data points obtain larger weights. Thus, the clustering is not easily trapped in local optimality, and a more accurate clustering result is obtained. Then, predict the power data based on the better clustering result. The centers of the clustering clusters in the clustering result have strong representativeness for the surrounding data. Thus, the fitted curve can better reflect the comprehensive prediction of historical power data. Description of the Drawings
[0032] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0033] Figure 1 This is a flowchart of a method for power data management planning based on the coordinated interaction of power sources, grids, loads, and energy storage provided by an embodiment of the present invention. Detailed implementation manners
[0034] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details a method for power data management planning based on the coordinated interaction of power sources, grids, loads, and energy storage proposed according to the present invention, including its specific implementation manners, structures, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0036] The following specifically describes the specific solution of a method for power data management planning based on the coordinated interaction of power sources, grids, loads, and energy storage provided by the present invention with reference to the accompanying drawings.
[0037] Embodiment:
[0038] The main application scenario of the present invention is as follows: When using the kmeans algorithm to process power data (power generation data at the power generation end and power consumption data at the user end), due to distributed power generation, the total power generation at the power generation end has strong randomness, and the power demand at the user end also has strong randomness due to user behavior. Therefore, it is easy to fall into a local optimal solution during the clustering process, resulting in the clustering center not being able to represent the overall level of this part of the data, and the accuracy of the fitting curve of the clustering center is sometimes high and sometimes low, and the stability of power data management allocation is poor.
[0039] Please refer to Figure 1 , which shows a flowchart of a method for power data management planning based on the coordinated interaction of power sources, grids, loads, and energy storage provided by an embodiment of the present invention. The method includes the following steps:
[0040] Step S1, obtain the power data of each day in history, construct a historical power data set; construct a power data clustering sample space based on the historical power data set.
[0041] In the process of power grid management, power data is the key basis for subsequent analysis and also crucial for subsequent power planning management. Further, the power data is either power generation data or power consumption data. Both types of data are power data and need to be processed separately in the embodiments of the present invention, and are collectively referred to as power data in the embodiments of the present invention. Among them, the power generation data is the power generation amount of the distributed power generation end of the power grid collected by a power sensor, and the power generation amounts at each moment are transmitted and summarized in a terminal. The power consumption data is the power consumption amount collected at each moment at the power consumption end, which is collected by a sensor, and at the same time, the power consumption amounts at each moment of the user end node are transmitted and summarized in the terminal.
[0042] In the terminal, the power generation amount data at each moment of each day is stored in a separate sequence respectively, and a power generation sequence can be obtained. The power consumption amount data at each moment of each day is stored in a separate sequence respectively, and a power consumption sequence can be obtained. The power generation sequence and the power consumption sequence are collectively referred to as power data. When collecting the power generation sequence and the power consumption sequence of each day, a cycle from 0:00 to 24:00 of each day is used to construct the power generation sequence and the power consumption sequence of each day respectively. The data collection frequencies are the same, which is 10Hz. Implementers can adjust the collection data cycle and frequency according to actual situations.
[0043] Thus, the power data of each day in history can be obtained. The power data of each day is the power generation and consumption sequence or the power consumption sequence of each day. In the embodiments of the present invention, the power data of Z days is obtained to form a historical power data set. Preferably, the value of Z in the embodiments of the present invention is 30.
[0044] Further, the time series data of each day in the historical power data set is projected onto the same two-dimensional plane coordinate system. The horizontal axis of the coordinate system is the time series, and the vertical axis is the power data. Among them, the time series on the horizontal axis is only each moment within a day.
[0045] Then, obtain the initial conditions of kmeans clustering for the two-dimensional plane coordinate point set, including the k value and the initial clustering centers. Use the elbow method to obtain the clustering k value of the point set. At the same time, in order to ensure that the extension trend of the finally obtained fitting curve conforms to the extension trend of the time series curve of each day, the arrangement of the clustering centers needs to be horizontal. Therefore, after obtaining the clustering k value, divide the two-dimensional coordinate point set. The historical power data set projected onto the two-dimensional plane coordinate system is evenly divided into k rectangular areas with the same shape and area in the horizontal axis direction. Then, within each rectangular area, obtain the minimum bounding rectangle of the point set within the area, and select the centroid of the minimum bounding rectangle as the initial clustering center. Thus, a power data clustering sample space obtained by superimposing the time series data of multiple days is obtained. In this power data clustering sample space, the distribution relationship of historical power data can be analyzed more completely.
[0046] Step S2: Cluster the power data at the same moment on each day in history separately to obtain one-dimensional clustering clusters corresponding to each moment; obtain the first local optimal risk level of the one-dimensional clustering cluster according to the data points in the one-dimensional clustering cluster; screen the one-dimensional clustering cluster according to the first local optimal risk level to obtain an abnormal risk clustering cluster.
[0047] Since the change of power data has a certain randomness and the kmeans clustering may fall into a local optimal solution, it is necessary to judge whether there is a possibility of falling into a local optimal solution at the data point according to the neighborhood space distribution of the data points.
[0048] This solution uses the kmeans clustering algorithm. By obtaining the clustering center and fitting the data in the surrounding neighborhood, that is, representing the overall data distribution around by the clustering center point. In the multi-day historical time series data, there are similar data distributions at different time nodes. For example, at the distributed power generation end, the power generation data is relatively high from noon to afternoon because of the high light intensity. However, due to the influence of weather such as cloudy days covering some areas from time to time, the data from noon to afternoon on some days at the power generation end may be concentrated in another lower part. During the clustering process, the clustering center may be affected by this part of the data and fall into a local optimum, and the fitting effect can only represent a small part of the data aggregation and cannot represent the overall data distribution trend of this period. At the same time, the same problem also exists at the user end. Most users' electricity consumption habits remain basically unchanged, but there are a small number of users who, due to their own additional needs such as family gatherings and continuous use of cooking equipment, may have small clustered point clusters at some moments, and the clustering center is at risk of falling into a local optimum during the clustering process. Eventually, the fitting effect of some data is inaccurate.
[0049] Because the power data point set in the power data clustering sample space is composed of the time series data of multiple days, the data points are all distributed on the corresponding time series scales. Perform one-dimensional clustering on the corresponding data points at each time series scale and analyze the cluster distribution after clustering. If there are clusters with tight internal data and a small range, there is a greater possibility of becoming a risk of falling into a local optimum.
[0050] Specifically, obtain all the data points corresponding to a moment in the power data clustering sample space to form a single sequence, denoted as a one-dimensional data sequence, that is, the power data at the same moment on each day in history forms a one-dimensional data sequence. Therefore, each moment on the horizontal axis in the two-dimensional plane coordinate system will have a corresponding one-dimensional data sequence. It should be noted that the data in the one-dimensional data sequence is arranged in ascending order on the vertical axis.
[0051] Further, perform kmeans clustering on the one-dimensional data sequences corresponding to each moment, where the one-dimensional clustering k value is obtained by the elbow method and the one-dimensional clustering centers are randomly set. Compared with two-dimensional clustering, the structure of one-dimensional clustering data is simple, and the distribution of data points only changes along one axis. Therefore, it is easier to find clusters for division. Thus, clustering the power data at the same moment of each day in history respectively can obtain the one-dimensional clustering clusters corresponding to each moment, and the clustering clusters corresponding to each moment may be one or more.
[0052] After obtaining the one-dimensional clustering results of the data on the vertical axis corresponding to each moment, construct a local optimal risk assessment model for the one-dimensional clustering clusters. The smaller the interval between data within the one-dimensional clustering cluster and the smaller the range of the one-dimensional clustering cluster, the more closely distributed the corresponding one-dimensional clustering cluster is, and the greater the risk that the data at this point has for the two-dimensional clustering center to fall into a local optimum; at the same time, in the vertical axis data corresponding to the time scale, the fewer the number of overall one-dimensional clustering cluster divisions, the greater the proportion of the impact on the corresponding one-dimensional clustering cluster, and the greater the corresponding risk level.
[0053] Further, obtain the first local optimal risk degree of the one-dimensional clustering cluster according to the data points in the one-dimensional clustering cluster, and its calculation formula is:
[0054]
[0055] where, R c represents the first local optimal risk degree of the c-th one-dimensional clustering cluster among all one-dimensional clustering clusters corresponding to each moment; n c represents the number of data points in the c-th one-dimensional clustering cluster; represents the mean of the distances between the i-th data point in the c-th one-dimensional clustering cluster and the two adjacent data points in the one-dimensional clustering cluster; max c and min c represent the values of the data points with the largest and smallest values in the c-th one-dimensional clustering cluster respectively; N c represents the number of one-dimensional clustering clusters corresponding to the moment corresponding to the c-th one-dimensional clustering cluster.
[0056] In the calculation formula of the first local optimal risk degree, represents the mean of the distances between the i-th data point in the c-th one-dimensional clustering cluster and the two adjacent data points in the one-dimensional clustering cluster, which can represent the degree of tightness at the i-th data point. Thus, is the mean of the cumulative sum of the tightness of all points in the cluster. The smaller this value, the more closely concentrated the distribution of most data in the c-th cluster, and the greater the local optimal risk degree; max c and min c can represent the upper and lower boundaries of the c-th one-dimensional clustering cluster respectively, (max c -minc ) represents the difference between the upper and lower boundary values, representing the range of the c-th one-dimensional clustering cluster. The smaller this difference is, the smaller the range of the corresponding one-dimensional clustering cluster, the closer the clustering cluster is distributed, and the greater the degree of local optimal risk; N c represents the number of one-dimensional clustering clusters corresponding to the moment when the one-dimensional clustering cluster is located. The fewer the number, the greater the influence degree of the c-th one-dimensional clustering cluster on the vertical axis at the corresponding moment, and it is easier to affect the clustering center during the clustering process and make it fall into local optimality. Further, the inverse proportional normalization exp[] is used to limit the overall value within the range of [0, 1], where exp[] represents the exponential function with the natural constant as the base.
[0057] Thus, the first local optimal risk degree of each one-dimensional clustering cluster can be obtained. Further, the one-dimensional clustering clusters are screened according to the first local optimal risk degree. Specifically, a screening threshold is set. Preferably, in the embodiments of the present invention, the screening threshold is 0.6, and the implementer can adjust it according to the actual situation. If the first local optimal risk degree of the one-dimensional clustering cluster is greater than or equal to the screening threshold, then the one-dimensional clustering cluster is an abnormal risk clustering cluster, and the greater the possibility that the data at this point falls into local optimality.
[0058] Step S3, using the data points in an abnormal risk clustering cluster and the abnormal risk clustering clusters at the moments adjacent to the moment corresponding to this abnormal risk clustering cluster to calculate the second local optimal risk degree of this data point.
[0059] The distribution of all data points in the abnormal risk clustering cluster is different. Further, the neighborhood distribution characteristics of each data point in the abnormal risk clustering cluster with local optimal risk are analyzed here. A single high-density small cluster cannot represent the risk degree of the local area. Therefore, it is necessary to analyze the distribution characteristics between multiple abnormal risk clustering clusters in the adjacent areas, and further combine the distribution of the neighborhood data points at the data point to obtain the second local optimal risk degree of the data point.
[0060] Specifically, using the data points in an abnormal risk clustering cluster and the abnormal risk clustering clusters at the moments adjacent to the moment corresponding to this abnormal risk clustering cluster to calculate the second local optimal risk degree of this data point.
[0061] For a data point in an abnormal risk clustering cluster, calculate the distance between the data point and the cluster center of the abnormal risk clustering cluster at the left adjacent time corresponding to the time of the abnormal risk clustering cluster where the data point is located. The abnormal risk clustering cluster at the left adjacent time corresponding to the minimum distance is the left adjacent clustering cluster; calculate the distance between the data point and the cluster center of the abnormal risk clustering cluster at the right adjacent time corresponding to the time of the abnormal risk clustering cluster where the data point is located. The abnormal risk clustering cluster at the right adjacent time corresponding to the minimum distance is the right adjacent clustering cluster; thus, the left adjacent clustering cluster and the right adjacent clustering cluster of each data point in the abnormal risk clustering cluster can be obtained; furthermore, based on the data points in the abnormal risk clustering cluster and the left adjacent clustering cluster and the right adjacent clustering cluster of the data point, calculate the second local optimal risk degree of the data point.
[0062] Further, respectively obtain the number of data points in the left adjacent clustering cluster and the right adjacent clustering cluster of the data points in the abnormal risk clustering cluster, and construct a calculation formula for the second local optimal risk degree based on the number of the data points. The calculation formula is:
[0063]
[0064] where, W q represents the second local optimal risk degree of the q-th data point in all abnormal risk clustering clusters; s l represents the distance between the cluster center of the left adjacent clustering cluster of the q-th data point and the q-th data point; s r represents the distance between the cluster center of the right adjacent clustering cluster of the q-th data point and the q-th data point; n l represents the number of data points in the left adjacent clustering cluster of the q-th data point; n r represents the number of data points in the right adjacent clustering cluster of the q-th data point; n p represents the preset number of data points in the power data clustering sample space that are closest to the q-th data point; s j represents the distance between the j-th data point among the preset number of data points in the power data clustering sample space that are closest to the q-th data point and the q-th data point in all abnormal risk clustering clusters; exp() represents the exponential function with the natural constant as the base; norm() represents the normalization operation.
[0065] In the above calculation formula, the closer the distances between the left adjacent clustering cluster and the right adjacent clustering cluster and the q-th data point are, and the more data points there are in the left adjacent clustering cluster and the right adjacent clustering cluster, the larger the possible range of the local risk at the q-th data point is, and the stronger the local optimal risk degree of the q-th data point is. The sum of the distances between the preset number of data points closest to the q-th data point in the power data clustering sample space and the q-th data point. The smaller this sum of distances, the more likely it is to form an aggregated two-dimensional point cluster in the adjacent space of the q-th data point, and the more likely it is to fall into a local optimal solution during the two-dimensional space clustering process. The stronger the local optimal risk degree corresponding to the q-th data point, so inverse proportional normalization is adopted for it; preferably, the value of the preset number is 10.
[0066] Thus, the second local optimal risk degree of each data point in all abnormal risk clustering clusters can be obtained.
[0067] Step S4, obtain the clustering weights of the data points in the abnormal risk clustering clusters according to the second local optimal risk degree of the data points in the abnormal risk clustering clusters and the first local optimal risk degree corresponding to the abnormal risk clustering clusters.
[0068] Specifically, during the clustering process in the power data clustering sample space, the greater the first local optimal risk degree of the abnormal risk clustering cluster where the data point is located and the second local optimal risk degree of the data point itself, the greater the possibility of its local optimality, so the corresponding clustering weight is smaller. Specifically, obtain the first local optimal risk degree of the abnormal risk clustering cluster where the data point is located and the second local optimal risk degree corresponding to the data point, calculate the average value of half of the values of the first local optimal risk degree of the abnormal risk clustering cluster where the data point is located and the second local optimal risk degree corresponding to the data point, and subtract the preset value from the average value to obtain the clustering weight of the data point. Its specific calculation formula is:
[0069]
[0070] Among them, represents the clustering weight of the q-th data point in all abnormal risk clustering clusters; R q represents the first local optimal risk degree of the abnormal risk clustering cluster where the q-th data point is located; W q represents the second local optimal risk degree of the q-th data point; 1 represents the preset value. Thus, the clustering weights of each data point in all abnormal risk clustering clusters can be obtained for subsequent clustering in the power data clustering sample space.
[0071] Step S5, perform clustering in the power data clustering sample space based on the clustering weights of the data points in the abnormal risk clustering clusters to obtain a clustering result; use the clustering result to predict the power data.
[0072] After obtaining the clustering weights of the data points in the abnormal risk clustering cluster in step S4, during the two-dimensional kmeans clustering process of the power data clustering sample space, when calculating the Euclidean distance from the clustering center to the data point and when calculating the iterative generated point of the clustering center, use this weight to modify the distance weight or fitting weight of the q-th data point, reduce the influence on the clustering center, and prevent the clustering from falling into the local optimum affected by this point.
[0073] Thus, the clustering of the historical power data set in the power data clustering sample space can be obtained. In the obtained clustering results, the risk of falling into the local optimum caused by random data fluctuations is avoided for each cluster center. The fitting effect of the obtained cluster center on the surrounding overall data is more accurate and can better reflect the general trend change of the actual power consumption.
[0074] After obtaining a better clustering result by adding the clustering weight, record the clustering clusters in the clustering result as two-dimensional clustering clusters, and obtain the clustering centers of each two-dimensional clustering cluster. In the two-dimensional space, connect the clustering centers of all two-dimensional clustering clusters from left to right in the horizontal axis direction to obtain the fitted time series curve. Since each two-dimensional clustering cluster represents a set of surrounding similar data, the center point of the two-dimensional clustering cluster can better represent the overall data distribution and trend of each fitted part. Two fitted time series curves can be obtained respectively for the power consumption data and the power generation data, which are collectively referred to as power data.
[0075] Use the ARIMA prediction model to predict the fitted time series curve to obtain the power data at the next moment. For the predicted power consumption, if the power generation is greater than the power consumption, adjust the grid power to the energy storage system; if the power consumption is greater than the power generation, adjust the power in the energy storage system to the grid and transmit it to the user side.
[0076] In summary, this solution obtains the clustering weights of adaptive data points based on the distribution change characteristics of local power data, performs clustering according to the adaptive clustering distance, obtains more accurate clustering results, thereby obtaining an ideal historical data fitting curve as the prediction curve to realize the management and planning of power data.
[0077] It should be noted that the above sequence of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. In addition, the above specific embodiments of this specification have been described. Also, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0078] Each embodiment in this specification is described in a progressive manner. The same or similar parts between each embodiment can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
[0079] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A power data management planning method based on the coordinated interaction of the source, grid, load, and storage, characterized in that The method includes: Obtaining the power data of each day in history to construct a historical power data set; constructing a power data clustering sample space based on the historical power data set; Clustering the power data at the same moment of each day in history respectively to obtain one-dimensional clustering clusters corresponding to each moment; obtaining the first local optimal risk degree of the one-dimensional clustering cluster according to the data points in the one-dimensional clustering cluster; screening the one-dimensional clustering cluster according to the first local optimal risk degree to obtain an abnormal risk clustering cluster; Using the data points in an abnormal risk clustering cluster and the abnormal risk clustering clusters at the moments adjacent to the moment corresponding to this abnormal risk clustering cluster to calculate the second local optimal risk degree of this data point; Obtaining the clustering weight of the data points in the abnormal risk clustering cluster according to the second local optimal risk degree of the data points in the abnormal risk clustering cluster and the first local optimal risk degree corresponding to the abnormal risk clustering cluster; Performing clustering within the power data clustering sample space based on the clustering weights of the data points in the abnormal risk clustering cluster to obtain a clustering result; using the clustering result to predict the power data.
2. The power data management planning method based on coordinated interaction of source, grid, load and energy storage according to claim 1, characterized in that The constructing of the power data clustering sample space based on the historical power data set includes: Projecting the time series data of each day in the historical power data set onto the same two-dimensional plane coordinate system, where the horizontal axis of the coordinate system is the time series and the vertical axis is the power data, and the time series on the horizontal axis is only each moment within a day; obtaining the clustering k value of the point set using the elbow method; evenly dividing the historical power data set projected onto the two-dimensional plane coordinate system into k rectangular regions with the same shape and area in the horizontal axis direction according to the obtained clustering k value, and within each rectangular region, obtaining the minimum bounding rectangle of the point set within the region, and selecting the centroid of the minimum bounding rectangle as the initial clustering center to obtain the power data clustering sample space.
3. The power data management planning method based on the coordinated interaction of source, grid, load and energy storage according to claim 1, characterized in that, The clustering of the power data at the same moment of each day in history respectively to obtain one-dimensional clustering clusters corresponding to each moment includes: Obtaining all the data points corresponding to a moment in the power data clustering sample space to form a separate sequence, denoted as a one-dimensional data sequence; obtaining the one-dimensional clustering k value and the one-dimensional clustering center, and clustering the one-dimensional data sequence according to the one-dimensional clustering k value and the one-dimensional clustering center to obtain the one-dimensional clustering cluster corresponding to this moment; and then obtaining the one-dimensional clustering clusters corresponding to each moment.
4. The power data management planning method based on coordinated interaction of source, grid, load and storage according to claim 1, characterized in that, The calculation formula for the first local optimal risk degree is: Among them, R c represents the first local optimal risk degree of the c-th one-dimensional clustering cluster in the one-dimensional clustering clusters corresponding to all moments; n c represents the number of data points in the c-th one-dimensional clustering cluster; represents the mean of the distances between the i-th data point in the c-th one-dimensional clustering cluster and the two adjacent data points in the one-dimensional clustering cluster; max c and min c respectively represent the values of the data points with the largest and smallest values in the c-th one-dimensional clustering cluster; N c represents the number of one-dimensional clustering clusters corresponding to the moment corresponding to the c-th one-dimensional clustering cluster; exp[] represents the exponential function with the natural constant as the base.
5. The power data management planning method based on the coordinated interaction of the source, grid, load and storage according to claim 1, wherein, The screening of the one-dimensional clustering cluster according to the first local optimal risk degree to obtain an abnormal risk clustering cluster includes: Setting a screening threshold, and the one-dimensional clustering cluster with the first local optimal risk degree greater than or equal to the screening threshold is an abnormal risk clustering cluster.
6. The power data management planning method based on coordinated interaction of source-network-load-storage according to claim 1, characterized in that The method for obtaining the second local optimal risk degree is specifically: For the data points in an abnormal risk clustering cluster, calculate the distance between this data point and the cluster center of the abnormal risk clustering cluster at the left adjacent moment of the moment corresponding to this abnormal risk clustering cluster where this data point is located, and the abnormal risk clustering cluster at the left adjacent moment corresponding to the minimum distance is the left adjacent clustering cluster; Calculate the distance between the data point and the cluster center of the abnormal risk cluster at the adjacent moment on the right side of the moment corresponding to the abnormal risk cluster where the data point is located. The abnormal risk cluster at the adjacent moment on the right side corresponding to the minimum distance is the adjacent cluster on the right side. Calculate the second local optimal risk degree of the data point according to the data points in the abnormal risk cluster, the adjacent cluster on the left side, and the adjacent cluster on the right side of the data point.
7. The power data management planning method based on coordinated interaction of source-network-load-storage according to claim 6, characterized in that The calculating the second local optimal risk degree of the data point according to the data points in the abnormal risk cluster, the adjacent cluster on the left side, and the adjacent cluster on the right side of the data point includes: Obtain the number of data points in the adjacent cluster on the left side and the adjacent cluster on the right side of the data point in the abnormal risk cluster respectively, and construct a calculation formula for the second local optimal risk degree based on the number of the data points. The calculation formula is: Among them, W q represents the second local optimal risk level of the q-th data point in all abnormal risk clustering clusters; s l represents the distance between the cluster center of the left adjacent clustering cluster of the q-th data point and the q-th data point; s r represents the distance between the cluster center of the right adjacent clustering cluster of the q-th data point and the q-th data point; n l represents the number of data points in the left adjacent clustering cluster of the q-th data point; n r represents the number of data points in the right adjacent clustering cluster of the q-th data point; n p represents the preset number of data points closest to the q-th data point in the power data clustering sample space; s j represents the distance between the j-th data point among the preset number of data points closest to the q-th data point in the power data clustering sample space and the q-th data point in all abnormal risk clustering clusters; exp() represents the exponential function with the natural constant as the base; norm() represents the normalization operation.
8. The power data management planning method based on the coordinated interaction of the source, grid, load, and energy storage according to claim 1, wherein The obtaining the clustering weight of the data point in the abnormal risk cluster includes: Obtain the average value of half of the values of the first local optimal risk degree of the abnormal risk cluster where the data point is located and the second local optimal risk degree corresponding to the data point, and subtract the preset value from the average value to obtain the clustering weight of the data point.
9. The power data management planning method based on the coordinated interaction of the source, grid, load and storage according to claim 1, characterized in that The predicting the power data by using the clustering result includes: Obtain each cluster in the clustering result, denoted as a two-dimensional cluster; connect the cluster centers of all two-dimensional clusters from left to right in the horizontal axis direction in the two-dimensional space to obtain a fitted time series curve; use the ARIMA prediction model to predict the fitted time series curve to obtain the power data at the next moment.
Citation Information
Cited By
Industrial sensor electromagnetic sensitivity self-adaptive calibration system
CN121363973A
Industrial sensor electromagnetic sensitivity self-adapting calibration system
CN121363973B