Identification and Correction Method of Bad Load Data Based on Kernel Density Function and Cluster Analysis
Through the methods of kernel density function and cluster analysis, the problem of processing historical bad data in load identification is solved, the accurate correction of load data is achieved, and the scientific scheduling of power systems and the rational development of new energy power grids are supported.
Patent Information
- Application Number
- CN202310165422.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-02-24
AI Technical Summary
The load identification methods in the existing technology cannot effectively accommodate the load forecasting and load data identification problems, and cannot accurately process historical bad data and find alternative values.
A method based on kernel density function and cluster analysis is adopted. By selecting the endpoints and extreme points of the local load curve, a Gaussian kernel density function is constructed, the global and local window width values are calculated, the kernel smooth fitting curve is established, and clustering correction of the bad load data is performed.
Accurately identify and correct anomalies in load data, provide scientific data to support power system dispatch and operation plans, improve data collection accuracy, and guide new energy power grid dispatch and maintenance plans.
Smart Images

Figure CN116383614B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy power systems, and in particular to a method for identifying and correcting bad load data based on kernel density function and cluster analysis. Background Art
[0002] With the development of the electric power industry, modern power systems have evolved into the era of large grids, large generating units, and ultra-high voltage, placing higher demands on the quality of the wide-area data collected and transmitted. Load curve data refers to the energy loss recorded by measuring instruments at the power transmitter and user terminals over a certain time interval. Load curve data is the "heartbeat chart" of the power system and a crucial data foundation for various power system analyses and applications. Two key features of smart grids—system self-healing under interference events and interactivity for user-side demand management—require load data. Effective load data plays a critical supporting role in the operation and management of smart grids. Therefore, analysis of load curve data will greatly improve the applicability of daily power system operations and management, system analysis, system visualization, system reliability, grid energy conservation, and planning.
[0003] From the perspective of current research on identifying bad load data in power systems, most efforts are focused on finding breakthroughs in the methods themselves or in improving them. In fact, bad data in power system load curve data can be viewed as singularities or irregular mutation points in the time series, and the characteristic patterns of the load curves reveal the research direction for bad data identification methods. With the rise of time series research, some time-series-based methods commonly used in load forecasting, such as the ARMA method, have been applied to identifying abnormal load data. However, the load forecasting problem differs from the load data identification problem considered here. In power system load forecasting, historical load is used to predict the load at a specific point in the future. In the load identification problem, historical load is used to detect bad data at a specific point in the past and find a suitable replacement value. In other words, load forecasting relies on all historical data, while load identification requires processing bad historical data and finding replacement values for them, making the two problems incompatible. Summary of the Invention
[0004] An embodiment of the present invention provides a method for identifying and correcting bad load data based on kernel density function and cluster analysis, so as to at least solve the technical problem in the related art that existing load identification needs to process historical bad data and find their replacement values, and cannot well accommodate the two types of problems.
[0005] According to one aspect of an embodiment of the present invention, a method for identifying and correcting bad load data based on kernel density function and cluster analysis is provided, comprising the following steps:
[0006] Select the characteristic points of load data according to the endpoints and extreme points of the local load curve, and construct the Gaussian kernel density function and kernel density estimation formula based on the characteristic points;
[0007] According to the least squares cross validation algorithm based on ISE, the global optimal window width value is approximately obtained when the asymptotic integral mean square error of the kernel density estimation formula is zero.
[0008] Calculate the local window width value and the kernel density function estimation formula taking into account multiple window width parameters based on the global optimal window width value and adaptive principle;
[0009] The kernel smooth fitting curve is calculated based on the Gaussian kernel density function, the global optimal window width value and the local window width value. The confidence interval is constructed based on the kernel smooth fitting curve to identify the bad load data.
[0010] Cluster correction is performed on load curves that are identified to have bad load data.
[0011] Optionally, the main steps for identifying and correcting bad load data are as follows:
[0012] The Gaussian kernel density function K(x) is:
[0013]
[0014] The kernel density estimation formula f h (x) is:
[0015]
[0016] Where x is the load data point on the curve, x i is the i-th load data point on the curve, h is the window width, and n is the number of sample points.
[0017] Optionally, according to a least squares cross validation algorithm based on ISE, approximately solving the global optimal window width value when the first-order partial derivative of the asymptotic integrated mean square error of the kernel density estimation formula with respect to the window width is zero includes:
[0018] Sort the load data point samples from small to large and divide them into two groups according to the parity of the sample numbers;
[0019] Determine the quantiles of the two groups of samples, and take the difference between the two groups of samples to get the sample interval quantile;
[0020] The probability density function is set to normal distribution, the partial derivative of the window width in the asymptotic integrated mean square error of the kernel density estimation formula is calculated, and the first-order derivative is set to zero. The global optimal window width value for accurately estimating the probability of the bimodal shape is calculated.
[0021] Optionally, according to the global optimal window width h opt Calculate the local window width λ with the adaptive principlei (i=1,2,3,...,n) and the kernel density function estimation formula taking into account multiple window width parameters, including:
[0022] A kernel parameter is set for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain the noise distribution function estimate.
[0023]
[0024] Where h is the fixed window width, λ i is the local window width of the i-th local window, and n is the number of sample data points;
[0025] The global optimal window width h opt Substitute the fixed window width into equation (3) and solve the local window width value λ according to the adaptive principle i (i=1,2,3,...,n):
[0026]
[0027] The local window width λ i (i=1,2,3,...,n) and the global optimal window width h opt Substituting into formula (3) we can obtain the kernel density function estimation formula taking into account multiple window widths.
[0028] Optionally, a kernel smooth fitting curve is calculated according to the Gaussian kernel density function, the global optimal window width value, and the local window width, and a confidence interval is constructed according to the kernel smooth fitting curve to identify the load data, including:
[0029] The Nadaraya-Watson density estimation method is used, based on the Gaussian kernel density function and the global optimal window width h opt and the local window width λ i (i=1,2,3,...,n) establish the control matrix of the kernel density smoothing method, the control matrix is:
[0030]
[0031] Where W i (x j ) represents the corresponding estimate x j The data value at time t i The weight of the observation value at time ;
[0032] Calculate the kernel smooth fitting curve based on the control matrix and load sample point vector
[0033]
[0034] Where, is the control matrix, y is the sample point vector;
[0035] The confidence interval is constructed according to the kernel smooth fitting curve and the requirements to identify the load data.
[0036] Optionally, clustering correction of load curves identified as having bad load data includes: hierarchically clustering the load curves identified as having bad load data with other curves, finding the load values corresponding to all similar load curves at the time when the bad load data is located, taking the mean of all load values as the correction value, and correcting the load curves of the bad load data according to the correction value.
[0037] Optionally, performing cluster correction on the load curve identified to have bad load data includes:
[0038] Mark the load curve where the bad load is located and calculate the Euclidean distance D between any two load curves:
[0039]
[0040] Where, represents the load curve a i =[a1,a2...a n ] to load curve b i =[b1,b2...b n ]’s Euclidean distance D;
[0041] Based on the calculated Euclidean distance, the linkage function is used to define the similarity between load curves;
[0042] Based on the similarity information between load curves, the cophenetic function is used to evaluate the classification information of the curve set;
[0043] Use the cluster function to create clusters based on the classification information and determine other load curves that belong to the same category as the curve containing the bad load data;
[0044] At the moment of bad load data, find the load value corresponding to the load curve of the same type and take the average as the correction value:
[0045]
[0046] Where, X r is the corrected afterload value, X t is the load value at the corresponding moment of other load curves of the same type as the bad load data, and n is the number of load curves of the same type.
[0047] Optionally, solving the global optimal window width value includes:
[0048] The data points X1, X2, X3, ..., X on each load curve n As samples, sort them from small to large and give them sequence number X S1 ,X S2 ,X S3 ,...,X Sn , group the samples into group1 and group2,
[0049] When the sample size n is an even number,
[0050] The element in gropu1 is X S1 ,X S2 ,X S3 ,...,X Sn / 2-1 ,X Sn / 2 ,
[0051] The element in group2 is X Sn / 2+1 ,X Sn / 2+2 ,X Sn / 2+3 ,...,X Sn-1 ,X Sn ;
[0052] When the sample size n is an odd number,
[0053] The element in group1 is X S1 ,X S2 ,X S3 ,...,X Sn+1 / 2-1 ,X Sn+1 / 2 ,
[0054] The element in group2 is X Sn+1 / 2 ,X Sn+1 / 2+1 ,X Sn+1 / 2+2 ,...,X Sn-1 ,X Sn ;
[0055] Determine the quantiles Q1 and Q2 of the sample groups group1 and group2, and determine the interval quantile IQR. The interval quantile IQR is:
[0056] IQR=Q2-Q1 (9)
[0057] According to the least squares cross-validation algorithm based on ISE, the first-order partial derivative of the asymptotic integrated mean square error of the kernel density estimation formula with respect to the window width is set to zero, and the smaller one of equations (10) and (11) is selected as the global optimal window width value h opt ;
[0058] h AMSE =1.06σn -1 / 5 (10)
[0059] hAMSE =1.06(IQR / 1.34)n -1 / 5 =0.791IQRn -1 / 5 (11)
[0060] Where n is the number of sample data points, σ is the standard deviation of the sample data point X, and h AMSE The global optimal window width h is obtained by using the principle of minimum integral error opt .
[0061] Optionally, find the local window width λ i The main steps (i=1,2,3,...,n) are as follows:
[0062] 1) Set a kernel parameter for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain an estimate of the noise distribution function.
[0063]
[0064] Where h is the fixed window width, λ i is the local window width, n is the number of sample data points;
[0065] 2) The global optimal window width h is obtained opt Substitute the fixed window width h into equation (12) and solve the local window width λ according to the adaptive principle. i (i=1,2,3,...,n):
[0066]
[0067] 3) The local window width value λ obtained i (i=1,2,3,...,n) and the global optimal window width h opt Substituting into formula (12) we can get the kernel density function estimation formula taking into account multiple window widths:
[0068]
[0069] Compared with the existing technology, the present invention has the following beneficial effects:
[0070] The identification method of the present invention accurately restores the changing characteristics of the first section of the load curve, and proposes a method for identifying and correcting bad load data based on kernel density function and cluster analysis, which accurately identifies and corrects anomalies in load data, thereby providing scientific data support for the coordinated formulation of power system scheduling and operation plans.
[0071] The evaluation method of the present invention can guide the rational development of the power system, solve the problems brought by large units to the power system, and perform identification and correction on the load side through a method based on kernel density function and cluster analysis, which is more instructive for the formulation of grid scheduling and maintenance plans for access to new energy power sources.
[0072] The present invention has subjective factors in the selection of kernel density function feature points, including redundant information and other issues. By taking the load curve curvature information and chord length information into consideration in the selection process, and combining it with the adaptive feature point selection method, it also has certain reference value for actual data identification.
[0073] The present invention is applicable to the data correctness verification and correction work of major power grids. It constructs a kernel smooth fitting curve through the kernel density function to provide a reference for abnormal data identification. The method fully considers the characteristics of load volatility and randomness in the system, improves the accuracy of collected data, and lays the foundation for guiding the rational development of new energy and ensuring the safe and stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0075] Figure 1 This is a flow chart of a method for identifying and correcting bad load data based on kernel density function and cluster analysis;
[0076] Figure 2 This is the identification effect diagram of multiple window width parameters based on kernel density function;
[0077] Figure 3 This is a local identification effect diagram based on multiple window width parameters of kernel density function;
[0078] Figure 4 It is a flow chart of clustering correction of bad load data;
[0079] Figure 5 It is the cluster distribution diagram of bad load data after clustering;
[0080] Figure 6 This is a diagram showing the clustering correction effect of bad load data. DETAILED DESCRIPTION
[0081] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0082] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0083] Example 1
[0084] like Figures 1-4 As shown in FIG, a method for identifying and correcting bad load data based on kernel density function and cluster analysis mainly includes the following steps:
[0085] Step S1: Select the load characteristic data points according to the endpoints and extreme points of the local load curve, construct the Gaussian kernel density function K(x) based on the characteristic points, and obtain the kernel density estimation formula f h (x).
[0086] As an optional embodiment, the Gaussian kernel density function K(x) and the kernel density estimation formula f h The formulas of (x) are shown in Equation 1 and Equation 2 respectively.
[0087]
[0088]
[0089] Where x is the load data point on the curve, h is the window width, also known as bandwidth or smoothing parameter, and n is the number of sample points.
[0090] Step S2: According to the least squares cross validation algorithm based on ISE, the global optimal window width h is approximately solved when the asymptotic integral mean square error of the kernel density estimation formula is zero. opt .
[0091] As an optional embodiment, the main steps of step S2 are as follows:
[0092] Step S21: sort the load data point samples from small to large, and divide them into two groups, group 1 and group 2, according to the parity of the sample numbers;
[0093] Step S22: Determine the sample quantiles Q1 and Q2 of group 1 and group 2, and take the difference between them to obtain the sample interval quantile IQR.
[0094] Step S23, set the probability density function f(x) to be normal distribution, and estimate the kernel density f hCalculate the partial derivative of the window width h in the asymptotic integrated mean square error of (x), and set the first-order derivative to zero, and calculate the global optimal window width h for accurate estimation of the probability of the bimodal shape opt ;
[0095] Step S3: According to the global optimal window width h opt With the adaptive principle, calculate the local window width λ i (i=1,2,3,...,n), and establish a kernel density function estimation formula taking into account multiple window widths.
[0096] As an optional embodiment, the main steps of step S3 are as follows:
[0097] Step S31: Set a kernel parameter for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain the noise distribution function estimate. The formula is shown in formula (3).
[0098]
[0099] Where h is the fixed window width, λ i is the local window width of the i-th local window, and n is the number of sample data points.
[0100] Step S32: set the global optimal window width h opt Substituting into formula (3), the local window width value λ is solved according to the adaptive principle i (i=1,2,3,...,n), and its formula is shown in formula (4).
[0101]
[0102] Step S33: Set the local window width λ i (i=1,2,3,...,n) and the global optimal window width h opt Substituting into formula 3, we can get the kernel density function estimation formula taking into account multiple window widths;
[0103] Step S4: According to the Gaussian kernel density function and the global optimal window width h opt , local window width λ i (i=1,2,3,...,n) calculate the kernel smooth fitting curve and identify the bad load data.
[0104] As an optional embodiment, the main steps of step S4 are as follows:
[0105] Step S41: Using the Nadaraya-Watson density estimation method, based on the Gaussian kernel density function and the global optimal window width h opt and the local window width λ i(i=1,2,3,...,n) establishes the control matrix of the kernel density smoothing method. The formula of the control matrix is shown in formula (5).
[0106]
[0107] Where W i (x j ) represents the corresponding estimate x j The data value at time t i The weight of the observation value at time .
[0108] Step S42: Calculate the kernel smooth fitting curve based on the control matrix and the load sample point vector, as shown in formula (6).
[0109]
[0110] Where, is the control matrix, and y is the sample point vector.
[0111] Step S43: Construct a confidence interval based on the kernel smooth fitting curve and the requirements to identify the load data.
[0112] Step S5: performing cluster correction on the load curves identified to have bad load data.
[0113] Specifically, clustering correction of load curves identified to have bad load data includes: hierarchically clustering the load curves identified to have bad load data with other curves, finding the load values corresponding to all similar load curves at the time when the bad load data is located, taking the mean of all load values as the correction value, and correcting the load curves of the bad load data according to the correction value.
[0114] As an optional embodiment, the main steps of step S5 are as follows:
[0115] Step S51: Mark the load curve where the bad load is located, and calculate the Euclidean distance between any two load curves. The formula is shown in formula (7).
[0116]
[0117] Where a represents the load curve i =[a1,a2...a n ] to load curve b i =[b1,b2...b n ]’s Euclidean distance D.
[0118] Step S52: using a linkage function to define the similarity between the load curves based on the Euclidean distance between the daily load curves;
[0119] Step S53: using a cophenetic function to evaluate the curve set classification information based on the similarity information;
[0120] Step S54: Create clusters using the cluster function based on the classification information, and determine other load curves that belong to the same category as the load curve containing the bad load data;
[0121] Step S55: Find the load values corresponding to all similar load curves at the time of the bad load data, and take their average as the correction value, as shown in Formula 8.
[0122]
[0123] Where, X r is the corrected afterload value, X t is the load value at the corresponding moment of other load curves of the same type as the bad load data, and n is the number of load curves of the same type.
[0124] As an optional embodiment, in step S2, the global optimal window width value h is solved opt The main steps are as follows:
[0125] 1) The data points X1, X2, X3, ..., X on each load curve n Sort from smallest to largest and give the sequence number X after completion S1 ,X S2 ,X S3 ,...,X Sn , determine the sample groups group1 and group2, and discuss the following two cases:
[0126] When the sample size n is an even number,
[0127] The element in gropu1 is X S1 ,X S2 ,X S3 ,...,X Sn / 2-1 ,X Sn / 2 ,
[0128] The element in group2 is X Sn / 2+1 ,X Sn / 2+2 ,X Sn / 2+3 ,...,X Sn-1 ,X Sn ;
[0129] When the sample size n is an odd number,
[0130] The element in group1 is X S1 ,X S2 ,X S3 ,...,X Sn+1 / 2-1,X Sn+1 / 2 ,
[0131] The element in group2 is X Sn+1 / 2 ,X Sn+1 / 2+1 ,X Sn+1 / 2+2 ,...,X Sn-1 ,X Sn ;
[0132] 2) Determine the quantiles Q1 and Q2 for sample groups group 1 and group 2, and the interval quantile IQR. The formula is shown in Equation 1.
[0133] IQR=Q2-Q1 (9)
[0134] 3) According to the least squares cross validation algorithm based on ISE, the first-order partial derivative of the asymptotic integrated mean square error of the kernel density estimation formula with respect to the window width is set to zero, and the smaller one of equations (10) and (11) is selected as the global optimal window width value h opt .
[0135] h AMSE =1.06σn -1 / 5 (10)
[0136] h AMSE =1.06(IQR / 1.34)n -1 / 5 =0.791IQRn -1 / 5 (11)
[0137] Where n is the number of sample data points, σ is the standard deviation of the sample data point X, and h AMSE The global optimal window width h is obtained by using the principle of minimum integral error opt .
[0138] As an optional embodiment, in step S3, the local window width value λ is obtained i The main steps (i=1,2,3,...,n) are as follows:
[0139] 1) Set a kernel parameter for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain an estimate of the noise distribution function. The formula is shown in formula (12).
[0140]
[0141] Where h is the fixed window width, λ i is the local window width, and n is the number of sample data points.
[0142] 2) The global optimal window width h is obtained optSubstituting the fixed window width h into equation (12), the local window width λ is solved according to the adaptive principle. i (i=1,2,3,...,n), and its formula is shown in formula (13).
[0143]
[0144] 3) The local window width value λ obtained i (i=1,2,3,...,n) and the global optimal window width h opt Substituting into equation (12) yields the kernel density function estimation formula taking into account multiple window widths, which is shown in equation (14).
[0145]
[0146] As an optional embodiment, in step S43, a confidence interval is constructed based on the fitting curve to identify the load data, and the formula is shown in formula (15).
[0147] [f h (x i )-Z 1-α / 2 *s i {pred},f h (x i )+Z 1-α / 2 *s i {pred}] (15)
[0148] Where s i {pred} is the predicted standard deviation of the fitted value, Z 1-α / 2 represents the 100*(1-α)% percentile of the standard normal distribution. Formula (15) can be used to identify bad load data outside the confidence interval.
[0149] Example 2
[0150] The present invention provides a detailed experimental description of a method for identifying and correcting bad load data based on kernel density function and cluster analysis, so that those skilled in the art can better understand the present invention.
[0151] The method comprises the following steps:
[0152] Step S1: Select characteristic points of load data based on the endpoints and extreme points of the local load curve, and construct a Gaussian kernel density function and kernel density estimation formula based on the characteristic points. The monthly active power data (in kW) of the low-voltage side of the No. 1 transformer at the Jinjiayan station in a certain city from January 1 to January 30, 2008 is used as a sample, and the load data sampling interval is 1 hour.
[0153] Step S2: According to the least squares cross validation algorithm based on ISE, the global optimal window width value h is approximately solved when the asymptotic integral mean square error of the kernel density estimation formula is zero with respect to the first-order partial derivative of the window width. opt The samples are sorted from small to large, divided into two groups according to the parity of the sample number, and finally the global optimal window width is calculated.
[0154] Step S3: According to the global optimal window width h opt Solve the local window width λ with the adaptive principle i (i=1,2,3,...,n), and obtain the kernel density function estimation formula taking into account multiple window width parameters. Set a kernel parameter for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as the estimate of the noise distribution function to obtain the noise distribution function estimate;
[0155] Step S4: Based on the Gaussian kernel density function and the global optimal window width h opt With the local window width λ i (i=1,2,3,...,n) establish the control matrix of the kernel density smoothing method, calculate the kernel smoothing fitting curve according to the Nadaraya-Watson density estimation method, construct the confidence interval according to the fitting curve, and identify the load data. opt Substituting the fixed window width into Equation 1, the local window width λ is solved according to the adaptive principle. i (i=1,2,3,...,n), the local window width λ i (i=1,2,3,...,n) and the global optimal window width h opt Substituting into formula 3, we can get the kernel density function estimation formula taking into account multiple window widths. The identification effect is as follows Figure 2 、 3 shown.
[0156] Step S5: Hierarchically cluster the load curve with bad load data with other curves, find out the load values corresponding to all similar load curves at the time when the bad load data is located, and take their mean as the correction value. Mark the load curve where the bad load is located, calculate the Euclidean distance between any two load curves, and use the cophenetic function to evaluate the classification information of the curve set based on the similarity information; use the cluster function to create clusters based on the classification information, and determine other load curves that belong to the same category as the load curve where the bad load data is located; find out the load values corresponding to all similar load curves at the time when the bad load data is located, and take their mean as the correction value. The cluster distribution of the bad load data after clustering is as follows: Figure 5 As shown in the figure, the clustering correction effect of bad load data is as follows Figure 6 shown.
[0157] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for identifying and correcting bad load data based on kernel density function and cluster analysis, characterized in that: The following steps are involved: Select the characteristic points of load data according to the endpoints and extreme points of the local load curve, and construct the Gaussian kernel density function and kernel density estimation formula based on the characteristic points; According to the least squares cross validation algorithm based on ISE, the global optimal window width value is approximately obtained when the asymptotic integral mean square error of the kernel density estimation formula is zero. Calculate the local window width value and the kernel density function estimation formula taking into account multiple window width parameters based on the global optimal window width value and adaptive principle; The kernel smooth fitting curve is calculated based on the Gaussian kernel density function, the global optimal window width value and the local window width value. The confidence interval is constructed based on the kernel smooth fitting curve to identify the bad load data. Perform cluster correction on load curves that are identified to have bad load data; The main steps to identify and correct bad load data are as follows: The Gaussian kernel density function for: (1) The kernel density estimation formula for: (2) Where, x is the load data point on the curve, x i is the i-th load data point on the curve, h is the window width, n is the number of sample points; According to the global optimal window width Calculate the local window width value with the adaptive principle And the kernel density function estimation formula taking into account multiple window width parameters, including: A kernel parameter is set for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain the noise distribution function estimate. : (3) Where, is a fixed window width value, is the local window width of the i-th local window, is the number of sample data points; The global optimal window width Substitute into formula (3) and solve the local window width value according to the adaptive principle : (4) The local window width And the global optimal window width Substituting into formula (3) we can obtain the kernel density function estimation formula taking into account multiple window widths.
2. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 1, characterized in that: According to the least squares cross validation algorithm based on ISE, the global optimal window width value when the asymptotic integrated mean square error of the kernel density estimation formula is approximately zero with respect to the window width is approximately zero, including: Sort the load data point samples from small to large and divide them into two groups according to the parity of the sample numbers; Determine the quantiles of the two groups of samples, and make the difference between the two groups of samples to get the sample interval quantile; The probability density function is set to normal distribution, the partial derivative of the window width in the asymptotic integrated mean square error of the kernel density estimation formula is calculated, and the first-order derivative is set to zero. The global optimal window width value for accurately estimating the probability of the bimodal shape is calculated.
3. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 1, characterized in that: The kernel smooth fitting curve is calculated based on the Gaussian kernel density function, the global optimal window width value and the local window width. The confidence interval is constructed based on the kernel smooth fitting curve to identify the load data, including: The Nadaraya-Watson density estimation method is used, based on the Gaussian kernel density function and the global optimal window width. and local window width Establish the control matrix of the kernel density smoothing method. The control matrix is: (5) Where, Represents the corresponding estimate The data value at time The weight of the observation value at time ; Calculate the kernel smooth fitting curve based on the control matrix and load sample point vector : (6) Where, is the control matrix, is the sample point vector; The confidence interval is constructed according to the kernel smooth fitting curve and the requirements to identify the load data.
4. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 1, characterized in that: Clustering correction of load curves identified as having bad load data includes: hierarchically clustering the load curves identified as having bad load data with other curves, finding the load values corresponding to all similar load curves at the time when the bad load data is located, taking the mean of all load values as the correction value, and correcting the load curves of the bad load data according to the correction value.
5. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 4, characterized in that: Cluster correction of load curves with identified bad load data includes: Mark the load curve where the bad load is located and calculate the Euclidean distance D between any two load curves: (7) Where, represents the load curve To the load curve The Euclidean distance D of Based on the calculated Euclidean distance, the linkage function is used to define the similarity between load curves; Based on the similarity information between load curves, the cophenetic function is used to evaluate the classification information of the curve set; Use the cluster function to create clusters based on the classification information and determine other load curves that belong to the same category as the curve containing the bad load data; At the moment of bad load data, find the load value corresponding to the load curve of the same type and take the average as the correction value: (8) Where, is the corrected afterload value, is the load value at the corresponding moment of other load curves in the category where the bad load data belongs. is the number of load curves of the same type.
6. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 1, characterized in that: Solving the global optimal window width value includes: The data points on each load curve As samples, sort them from small to large and give them sequence numbers after sorting , group the samples into group1 and group2, When the sample size n is an even number, The elements in gropu1 are , The elements in group2 are ; When the sample size n is an odd number, The elements in group1 are , The elements in group2 are ; Determine the quantiles of sample groups group1 and group2 and , determine the interval quantile IQR, the interval quantile IQR is: (9) According to the least squares cross-validation algorithm based on ISE, the first-order partial derivative of the asymptotic integrated mean square error of the kernel density estimation formula with respect to the window width is set to zero, and the smaller one of equations (10) and (11) is selected as the global optimal window width value. ; (10) (11) Where, is the number of sample data points, is the sample data point The standard deviation of The global optimal window width is obtained by using the principle of minimum integral error .
7. The method for identifying and correcting bad load data based on kernel density function and cluster analysis according to claim 1, characterized in that: Calculate the local window width The main steps are as follows: 1) Set a kernel parameter for each load data point to obtain a point estimate of the empirical distribution. The cumulative sum of the kernel function is used as an estimate of the noise distribution function to obtain an estimate of the noise distribution function. : (12) Where, is a fixed window width value, is the local window width, is the number of sample data points; 2) The global optimal window width value obtained Substitute into formula (12) to fix the window width value In the adaptive principle, the local window width is solved : (13) 3) The local window width value obtained and the global optimal window width Substituting into formula (12) we can get the kernel density function estimation formula taking into account multiple window widths: (14)。