A Predictive Analysis Method for Metering Equipment Operation Performance Based on Local Weighted Partial Least Squares

By combining local weighted partial least squares and K-Means clustering algorithm, the nonlinear and dynamic characteristics of metering equipment in the power environment are solved, and high-precision prediction of the operating performance of metering equipment is achieved.

CN114357870BActive Publication Date: 2026-05-26STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT
Filing Date
2021-12-22
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional partial least squares algorithms are difficult to effectively handle nonlinear and dynamic characteristics in power environments, resulting in insufficient model prediction accuracy and stability.

Method used

A local weighted partial least squares method combined with the K-Means clustering algorithm is used to cluster and model the operating data of metering equipment in the power environment. Sub-models are built using the local weighted partial least squares method, and weighted integration is performed based on the distance of data points to the centroid to achieve nonlinear and real-time prediction.

Benefits of technology

It improves the prediction accuracy and stability of metering equipment operation performance, enabling it to better adapt to the stage characteristics under climatic factors and achieve high-precision performance prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357870B_ABST
    Figure CN114357870B_ABST
Patent Text Reader

Abstract

This application discloses a method for predicting and analyzing the operational performance of metering equipment based on locally weighted partial least squares (LSS). The method includes: acquiring and preprocessing the historical operational dataset of the metering equipment to be predicted, dividing the dataset into training and testing sets; using the K-Means clustering algorithm to cluster the training set into several sub-training sets and calculating the centroid of each sub-training set; evaluating the prediction accuracy and performance of the model; acquiring operational data, combining the operational data with each sub-training set, using the locally weighted partial least squares modeling algorithm to build a sub-model for each sub-training set, and obtaining the predicted acquisition success rate value corresponding to the operational data under each sub-model; and calculating the final predicted acquisition success rate value corresponding to the operational data point by weighting the sub-model prediction values ​​based on the distance from the operational data point to the centroid of each sub-training set. This invention has high prediction accuracy and can be effectively applied to the prediction and analysis of the operational performance of metering equipment under climatic factors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of soft measurement modeling technology in the power environment, and relates to a method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares. Background Technology

[0002] Partial Least Squares (PLS) is a second-generation regression modeling algorithm that integrates multiple linear regression (MLR), principal component analysis (PCA), and canonical correlation analysis (CCA). It can simultaneously perform regression modeling, data structure simplification, and correlation analysis between variables.

[0003] PLS has advantages such as simplicity, robustness, low computational cost, high prediction accuracy, and ease of qualitative interpretation, making it suitable for modeling data in industrial processes that are high-dimensional, highly nonlinear, heavily coupled between variables, and subject to noise. However, PLS is essentially still a linear, static modeling method.

[0004] In power environments, most problems are nonlinear and involve phased characteristics. Directly using traditional PLS models cannot guarantee the prediction accuracy and stability of the model. Therefore, it is necessary to select appropriate modeling and optimization algorithms based on the actual conditions of the power environment to improve the model's ability to handle nonlinear problems and enhance its dynamic characteristics. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this application provides a method for predicting and analyzing the operating performance of metering equipment based on locally weighted partial least squares, which can achieve nonlinear and real-time prediction with high accuracy.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares includes the following steps:

[0008] Step 1: Obtain the historical operation dataset of the metering equipment to be predicted and preprocess the dataset. Divide the dataset into a training set and a test set. The training set is used to train the model, and the test set is used to test the prediction accuracy of the obtained model.

[0009] Step 2: Use the K-Means clustering algorithm to cluster the training set into several sub-training sets, and calculate the centroid of each sub-training set;

[0010] Step 3: Combine the test set with each sub-training set, use the local weighted partial least squares modeling algorithm to model a sub-model for each sub-training set, and obtain the predicted acquisition success rate value of the test set under each sub-model;

[0011] Step 4: Weight the prediction results of each sub-model according to the distance from the sample data points in the test set to the centroid of each sub-training set, integrate them to obtain the final acquisition success rate prediction value, and evaluate the prediction accuracy and performance of the model by combining it with the real acquisition success rate data in the test set.

[0012] Step 5: Acquire a new set of operational data in real time, combine the operational data with each sub-training set, use the local weighted partial least squares modeling algorithm to model a sub-model for each sub-training set, and obtain the predicted acquisition success rate value corresponding to the operational data under each sub-model. Then, calculate the final predicted acquisition success rate value corresponding to the operational data point by weighting the sub-model prediction value according to the distance from the operational data point to the centroid of each sub-training set, thereby realizing the predictive analysis of the operating performance of the metering equipment.

[0013] The present invention further includes the following preferred embodiments:

[0014] Preferably, in step 1, the historical operation dataset of the metering equipment is: a dataset showing how the historical data collection success rate of the metering equipment to be predicted changes with climatic factors;

[0015] The dataset includes the daily data collection success rate of the metering device to be predicted over the past three years, as well as the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation within the area of ​​the metering station over the past three years.

[0016] Preferably, in the dataset, the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation are used as independent variables, and the daily collection success rate is processed as the collection failure rate 100*(100%-y) after removing the percentage sign and used as the dependent variable. Then, the dataset is divided into training set and test set according to a 7:3 ratio.

[0017] Preferably, in step 2, the range of the number of clusters k is set to [1, 10]. The optimal number of clusters k for the training set is determined by combining Elbow and WCSS methods, and the training set is clustered into k sub-training sets.

[0018] Preferably, in step 2, the centroid of the sub-training set r is the arithmetic mean of each dimension of all sample data points in the sub-training set, r = 1, 2, ..., k, where k is the number of sub-training sets.

[0019] Preferably, in the locally weighted partial least squares modeling algorithm, it is assumed that the matrix of independent variables in a certain sub-training set is X∈R. N*M The dependent variable matrix is ​​Y∈R N*L The nth independent variable input and dependent variable output of the sub-training set are represented as follows:

[0020] x n =[x n1,x n2 ,…,x nM ] T (1)

[0021] y n =[y n1 ,y n2 ,…,y nL ] T (2)

[0022] In the formula: N represents the number of input and output samples, i.e. the number of samples in the sub-training set, M represents the dimension of the input variables of the sub-model, and L represents the dimension of the output variables of the sub-model;

[0023] When it is necessary to input x to the qth independent variable in the test set q The corresponding dependent variable output y q When making predictions;

[0024] First, we need to calculate the qth independent variable input x in the test set. q The nth independent variable input x in the training set n Similarity between (n = 0, 1, ..., N);

[0025] Then, the q-th independent variable input x in the test set is determined based on the similarity magnitude. q The weight values ​​of each independent variable are determined, and finally, the predicted value is output.

[0026] Preferably, step 3 specifically includes the following steps:

[0027] 1) Determine the number K of principal components in the independent variable, and set the initial value K = 1;

[0028] 2) Calculate the similarity matrix and determine the similar samples w. n :

[0029] Ω=diag{w1,w2,…,w N} (3)

[0030] In the formula: diag(·) represents taking the diagonal matrix;

[0031] 3) Data preprocessing: Process the independent variable inputs in the sub-training set, the dependent variable outputs in the training set, and the q-th independent variable inputs in the test set respectively, and calculate X respectively. k Y k and x q,k .

[0032]

[0033]

[0034]

[0035]

[0036]

[0037] In the formula, I N ∈R N It is a column vector consisting entirely of 1s;

[0038] 4) Let the output of the q-th dependent variable in the test set be... That is, the original dependent variable prediction value corresponding to the qth independent variable in the test set under the sub-training set;

[0039] 5) Calculate the k-th principal component of the sub-training set X:

[0040] t k =X k w k (11)

[0041] In the formula, w k yes The eigenvector corresponding to the largest eigenvalue;

[0042] w k The calculation method is as follows:

[0043] 6) Calculate the k-th load vector p of the sub-training set X. k and regression coefficient vector q k :

[0044]

[0045]

[0046] 7) Calculate the q-th independent variable input x in the test set. q The kth principal component t q,k :

[0047]

[0048] 8) Let the output of the q-th dependent variable in the test set be y. q =y q +t q,k q k That is, after modeling the sub-training set, the q-th independent variable from the test set is input into x. q Substitute the values ​​into the calculation to obtain the predicted output value of the q-th dependent variable in the test set;

[0049] 9) If k = K, then end the calculation; otherwise, let:

[0050]

[0051]

[0052] x q,k+1 =x q,k -t q,k p k (18)

[0053] 10) Let k = k + 1, and go to step 5).

[0054] Preferably, in step 2), similarity samples w are determined based on Euclidean distance. n Specifically:

[0055]

[0056]

[0057] Preferably, step 4, which involves weighting the prediction results of each sub-model based on the distance from the sample data points in the test set to the centroid of each sub-training set, and then integrating them to obtain the final predicted acquisition success rate, specifically includes the following steps:

[0058] Step 4.1: Calculate the qth independent variable input x in the test set. q The centroid x of the sub-training set r r,z The Euclidean distance between them, r = 1, 2, ..., k, where k represents the number of sub-training sets;

[0059] The formula for calculating Euclidean distance is:

[0060]

[0061] Step 4.2: Input x based on the independent variable in the test set q The weights corresponding to the prediction results of each sub-model are obtained by Euclidean distance between the centroids of each sub-training set and the prediction results of each sub-model. The final prediction result is obtained by weighting the prediction results of each sub-model.

[0062] Preferably, the weight calculation formula in step 4.2 is:

[0063]

[0064] Where p(x) r ,x q ) represents the q-th independent variable input x in the test set. q Substitute the values ​​into each sub-model to calculate the predicted value y. q At that time, the weights corresponding to the prediction results of each sub-model are calculated based on the Euclidean distance;

[0065] d r (xr,z ,x q ) represents the q-th independent variable input x in the test set. q The distance between the centroid of the r-th sub-training set;

[0066] The input x represents the qth independent variable in the test set. q The sum of distances to the centroids of all sub-training sets.

[0067] Preferably, in step 4.2, the final prediction result is obtained by weighting the prediction results of each sub-model:

[0068]

[0069] Among them, y r,q Input x for the q-th independent variable in the test set q The sub-model predictions calculated by the sub-training set r are input; k represents the number of sub-training sets; Y q The ensemble prediction is the weighted ensemble of the predictions from each sub-model for the q-th independent variable in the test set.

[0070] The beneficial effects achieved by this application are:

[0071] This invention addresses the phased characteristics of metering equipment operation performance under climatic factors. It uses K-Means clustering to process the dataset and employs locally weighted partial least squares to model the nonlinear and real-time nature of metering equipment operation performance under climatic factors. The algorithm has high prediction accuracy and can be effectively applied to the prediction and analysis of metering equipment operation performance under climatic factors.

[0072] 1. This invention uses Locally Weighted Partial Least Squares (LWPLS) as the basic modeling algorithm, which can analyze nonlinear problems in the power environment.

[0073] 2. This invention employs a K-Means clustering modeling analysis and then ensemble calculation method, which can perform better predictive analysis on data with stage characteristics in the power environment.

[0074] 3. The K-Means clustering algorithm combined with local weighted partial least squares method is used to effectively improve the prediction accuracy of the land model. Attached Figure Description

[0075] Figure 1 This is a flowchart of the metering equipment operation performance prediction and analysis method based on local weighted partial least squares of the present invention;

[0076] Figure 2 Predictions for the test set are modeled using LWPLS based on K-Means clustering;

[0077] Figure 3 WCSS diagram for K-Means clustering;

[0078] Figure 4 This is a graph showing the prediction results modeled using PLS in the example.

[0079] Figure 5 This is a prediction result diagram of LWPLS modeling based on K-Means clustering in an embodiment of the present invention. Detailed Implementation

[0080] The present application will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be construed as limiting the scope of protection of the present application.

[0081] like Figure 1 and 2 As shown, the metering equipment operation performance prediction and analysis method based on local weighted partial least squares of the present invention includes the following steps:

[0082] Step 1: Obtain the historical operation dataset of the metering equipment to be predicted and preprocess the dataset. Divide the dataset into a training set and a test set. The training set is used to train the model, and the test set is used to test the prediction accuracy of the obtained model.

[0083] In specific implementation, the historical operation dataset of the metering equipment is: a dataset showing how the historical data acquisition success rate of the metering equipment to be predicted changes with climatic factors;

[0084] The dataset includes the daily data collection success rate of a certain concentrator (i.e., the metering device to be predicted) under a certain substation area over the past three years, as well as the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation within the substation area over the past three years.

[0085] The dataset was preprocessed as follows: the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation were used as independent variables, and the daily collection success rate was processed into the collection failure rate of 100*(100%-y) after removing the percentage sign and used as the dependent variable. Then, the dataset was divided into training set and test set in a 7:3 ratio.

[0086] Step 2: Use the K-Means clustering algorithm to cluster the training set into k sub-training sets, and determine the centroid of each sub-training set;

[0087] In practice, the centroid of the sub-training set r is the arithmetic mean of each dimension of all sample data points in the sub-training set, where r = 1, 2, ..., k.

[0088] The optimal number of clusters k is set to [1, 10], and the Elbow and WCSS methods are used to determine the optimal number of clusters k for the training set.

[0089] Because clustering results cannot be visualized for datasets exceeding three dimensions, the performance of K-means clustering is quantified using the Within-Cluster Sum of Squares (WCSS). For a clustering strategy that clusters into k clusters, lower WCSS indicates a more compact cluster structure, while higher WCSS indicates a looser cluster structure. WCSS will inevitably decrease as the number of clusters k increases. Furthermore, combining the principle of the elbow rule, for data with a certain degree of discriminative power, the Within-Cluster Sum of Squares (WCSS) will be greatly improved when a certain critical point k is reached, and then slowly decrease. This critical point k can be considered as a point with good clustering performance. Applying the above method to the K-means clustering process of the training set of this invention, the optimal number of clusters for this training set was determined to be 3.

[0090] WCSS simply calculates the intra-cluster distance, while Elbow is a subjective judgment method. Figure 3 It can be directly seen that the optimal number of clusters is 3.

[0091] Step 3: Combine the test set with each sub-training set, use the local weighted partial least squares modeling algorithm to model a sub-model for each sub-training set, and obtain the predicted acquisition success rate value of the test set under each sub-model;

[0092] In practice, the process of calculating the predicted value is the modeling process. Modeling is just a conceptual expression of it. At the same time, the locally weighted partial least squares method is an instant modeling algorithm that will consider the impact of new data on the model in real time. Therefore, there is no fixed model formula.

[0093] The modeling process involves inputting the independent variables into the algorithm to calculate the corresponding output of the dependent variable. By inputting the sub-training set and the test set into the formulas corresponding to the algorithm below, the predicted collection success rate of the test set can be obtained, which means the modeling is successful.

[0094] The following locally weighted partial least squares modeling algorithm is used to model each subset of training data:

[0095] Suppose that the matrix of independent variables in a certain sub-training set is X∈R N*M The dependent variable matrix is ​​Y∈R N*L The nth independent variable input and dependent variable output of the sub-training set are represented as follows:

[0096] x n =[xn1 ,x n2 ,…,x nM ] T (1)

[0097] y n =[y n1 ,y n2 ,…,y nL ] T (2)

[0098] In the formula: N represents the number of input and output samples, i.e. the number of samples in the sub-training set; M represents the dimension of the input variables of the sub-model (in this invention, the independent variable dimension of the dataset is 5); and L represents the dimension of the output variables of the sub-model (in this invention, the dependent variable dimension of the dataset is 1).

[0099] When it is necessary to input x to the qth independent variable in the test set q The dependent variable output y corresponds to (i.e., the highest temperature, lowest temperature, average temperature, relative humidity, and precipitation, hereinafter the same). q (That is, removing the percentage of unsuccessful data collection, the same below) when making predictions;

[0100] First, we need to calculate the qth independent variable input x in the test set. q The nth independent variable input x in the training set n Similarity between (n = 0, 1, ..., N);

[0101] Then, the q-th independent variable input x in the test set is determined based on the similarity magnitude. q Each independent variable (i.e., the highest temperature x) q1 Minimum temperature x q2 Average temperature x q3 Relative humidity x q4 and precipitation x q5 The weights of the values ​​are then used to calculate the predicted values.

[0102] The steps of LWPLS in predicting the dependent variable output in the test set by combining the sub-training set are as follows: The sub-model is used to build the model and then used to predict the test set to obtain the corresponding predicted values.

[0103] 1) Determine the number of principal components. Assume that the number of principal components in the independent variables is K. In the LWPLS algorithm, the initial value is usually set to K=1.

[0104] 2) Calculate the similarity matrix:

[0105] Ω=diag{w1,w2,…,w N} (3)

[0106] In the formula: diag(·) represents taking the diagonal matrix;

[0107] Similar samples w n The choice is usually based on Euclidean distance, as shown below.

[0108]

[0109]

[0110] 3) Data preprocessing: Process the independent variable inputs in the sub-training set, the dependent variable outputs in the training set, and the q-th independent variable inputs in the test set respectively, and calculate X respectively. k Y k and x q,k .

[0111]

[0112]

[0113]

[0114]

[0115]

[0116] In the formula, I N ∈R N It is a column vector consisting entirely of 1s.

[0117] 4) Let the output of the q-th dependent variable in the test set be... That is, the predicted value of the original dependent variable corresponding to the qth independent variable in the test set under this sub-training set;

[0118] 5) Calculate the k-th principal component of the sub-training set X:

[0119] t k =X k w k (11)

[0120] In the formula, w k yes The eigenvector corresponding to the largest eigenvalue, then w k The calculation method is as follows:

[0121]

[0122] 6) Calculate the k-th loading vector and regression coefficient vector of the sub-training set X:

[0123]

[0124]

[0125] 7) Calculate the q-th independent variable input x in the test set. q The k-th principal component:

[0126]

[0127] 8) Let the output of the q-th dependent variable in the test set be y. q =y q +t q,k q k That is, after modeling the sub-training set, the q-th independent variable from the test set is input into x. q Substitute the values ​​into the calculation to obtain the predicted output value of the q-th dependent variable in the test set;

[0128] 9) If k = K, then end the calculation; otherwise, let:

[0129]

[0130]

[0131] x q,k+1 =x q,k -t q,k p k (18)

[0132] 10) Let k = k + 1, and go to step 5).

[0133] In this invention, the number of principal components is equal to the number of dependent variables, and the value of k ranges from [1,5].

[0134] Step 4: Weight the prediction results of each sub-model based on the distance from the sample data points in the test set to the centroid of each sub-training set, and integrate them to obtain the final predicted acquisition success rate. Combine this with the actual acquisition success rate data in the test set to calculate the coefficient of determination r. 2 The root mean square error (RMSE) is used to evaluate the prediction accuracy and performance of the model.

[0135] The step of weighting the prediction results of each sub-model based on the distance from the sample data points in the test set to the centroid of each sub-training set, and then integrating them to obtain the final predicted acquisition success rate, specifically includes the following steps:

[0136] Step 4.1: Calculate the qth independent variable input x in the test set. q The centroid x of the sub-training set r r,z The Euclidean distance between them, r = 1, 2, ..., k, is calculated using the following formula:

[0137]

[0138] x qThat is, a set of highest temperatures x q1 Minimum temperature x q2 Average temperature x q3 Relative humidity x q4 and precipitation x q5 .

[0139] Step 4.2: Input x based on the independent variable in the test set q The weights corresponding to the prediction results of each sub-model are obtained by Euclidean distance between the centroids of each sub-training set and the prediction results of each sub-model. The final prediction result is obtained by weighting the prediction results of each sub-model.

[0140] The weight calculation formula is as follows:

[0141]

[0142] Where p(x) r ,x q ) represents the q-th independent variable input x in the test set. q Substitute the values ​​into each sub-model to calculate the predicted value y. q At that time, the weights corresponding to the prediction results of each sub-model are calculated based on the Euclidean distance;

[0143] d r (x r,z ,x q ) represents the q-th independent variable input x in the test set. q The distance between the centroid of the r-th sub-training set;

[0144] The input x represents the qth independent variable in the test set. q The sum of distances to the centroids of all sub-training sets.

[0145] In step 4.2, the prediction results of each sub-model are weighted and calculated to obtain the final prediction result:

[0146]

[0147] Among them, y r,q Input x for the q-th independent variable in the test set q The sub-model predictions calculated by the sub-training set r are input; k represents the number of sub-training sets; Y q The ensemble prediction is the weighted ensemble of the predictions from each sub-model for the q-th independent variable in the test set.

[0148] After step 4, combining the actual data collection success rate data from the test set, the coefficient of determination r is calculated. 2Based on the root mean square error (RMSE), it can be seen that the prediction accuracy and performance of the model using the step 2 and 3K-Means+LWPLS method are significantly improved compared to the PLS scheme.

[0149] Figure 2 This is a flowchart of the prediction process for the test set formed in steps 1-4 of this invention, based on LWPLS modeling using K-Means clustering.

[0150] Step 5: Acquire a new set of operational data in real time (daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation). Combine the operational data with each sub-training set, and use the local weighted partial least squares modeling algorithm to build a sub-model for each sub-training set. Obtain the predicted acquisition success rate value corresponding to the operational data under each sub-model. Then, calculate the final predicted acquisition success rate value corresponding to the operational data point by weighting the predicted values ​​of the sub-model based on the distance from the operational data point to the centroid of each sub-training set, thereby realizing the predictive analysis of the operating performance of the metering equipment.

[0151] This invention addresses the phased characteristics of metering equipment operation performance under climatic factors. It uses K-Means clustering to process the dataset and employs locally weighted partial least squares to model the nonlinear and real-time nature of metering equipment operation performance under climatic factors. The algorithm has high prediction accuracy and can be effectively applied to the prediction and analysis of metering equipment operation performance under climatic factors.

[0152] The following examples demonstrate this:

[0153] The dataset used is a dataset showing the change in the success rate of data collection by metering equipment (concentrators) in a certain area of ​​Nanjing City over the past three years with climatic factors. The independent variables are the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation. The data collection failure rate (100*(1-y)) after removing the percentage sign is used as the dependent variable.

[0154] First, the dataset was analyzed using the original PLS modeling algorithm, and the analysis results are as follows: Figure 4 As shown, from Figure 4 Analysis reveals that the PLS modeling algorithm cannot effectively predict the success rate of metering equipment data collection under climatic factors. Therefore, this invention proposes a metering equipment operation performance prediction and analysis method based on local weighted partial least squares. In specific implementation, the original dataset is divided into a training set and a test set in a 7:3 ratio; the Elbow method is used to determine the number of clusters k suitable for the training set. Figure 3 It is known that the optimal number of clusters is k=3; the K-Means clustering algorithm is used to divide the training set into 3 subsets for performance prediction, and the prediction results are as follows. Figure 5 As shown. From Figure 5Analysis shows that using a combination of K-Means clustering and locally weighted partial least squares can effectively predict and analyze the success rate of data collection by geodetic equipment under the influence of climatic factors.

[0155] Comparing the modeling performance of PLS ​​and the K-Means+LWPLS modeling scheme of this invention, the prediction results using PLS are as follows: Figure 4 As shown in Table 1, the modeling effects of the two modeling schemes are as follows.

[0156] Table 1

[0157] Modeling methods <![CDATA[r 2 ]]> RMSE MAE PLS 0.35153 1.18328 0.96144 K-Means+LWPLS 0.52648 1.01114 0.84207

[0158] As shown in Table 1, the coefficient of determination r of the K-Means+LWPLS scheme is... 2 The coefficient of determination r of the PLS scheme 2 The K-Means+LWPLS scheme shows a significant improvement in modeling performance compared to the PLS scheme, with the root mean square error (RMSE) being significantly lower.

[0159] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.

Claims

1. A method for predicting and analyzing the operating performance of metering equipment based on locally weighted partial least squares, characterized in that: The method includes the following steps: Step 1: Obtain the historical operation dataset of the metering equipment to be predicted and preprocess the dataset. Divide the dataset into a training set and a test set. The training set is used to train the model, and the test set is used to test the prediction accuracy of the obtained model. Step 2: Use the K-Means clustering algorithm to cluster the training set into several sub-training sets, and calculate the centroid of each sub-training set; Step 3: Combine the test set with each sub-training set, and use the locally weighted partial least squares modeling algorithm to model a sub-model for each sub-training set, obtaining the predicted acquisition success rate value for the test set under each sub-model; in the locally weighted partial least squares modeling algorithm, it is assumed that the matrix of independent variables in a certain sub-training set is... The dependent variable matrix is The nth independent variable input and dependent variable output of the sub-training set are represented as follows: = (1) = (2) In the formula: N represents the number of input and output samples, i.e. the number of samples in the sub-training set, M represents the dimension of the input variables of the sub-model, and L represents the dimension of the output variables of the sub-model; When input is needed for the q-th independent variable in the test set Corresponding dependent variable output When making a prediction, the first step is to calculate the q-th independent variable input in the test set. The nth independent variable input in the training set The similarity between the variables is calculated, n=0,1,…,N; then, the q-th independent variable input in the test set is determined based on the magnitude of the similarity. The weight values ​​of each independent variable are calculated, and finally the predicted value is output. Step 3 specifically includes the following steps: 1) Determine the number K of principal components in the independent variable, and set the initial value K = 1; 2) Calculate the similarity matrix to determine similar samples. : Ω=diag{ }(3) In the formula: diag(•) represents taking the diagonal matrix; 3) Data preprocessing: The independent variable inputs in the sub-training set, the dependent variable outputs in the training set, and the q-th independent variable input in the test set are processed separately, and calculations are performed accordingly. , and : In the formula, It is a column vector consisting entirely of 1s; 4) Let the output of the q-th dependent variable in the test set be... = , that is, the original dependent variable prediction value corresponding to the qth independent variable in the test set under the sub-training set; 5) Calculate the sub-training set The k-th principal component: = (11) In the formula, yes Ω Ω The eigenvector corresponding to the largest eigenvalue; The calculation method is as follows: = (12) 6) Calculate the sub-training set The kth load vector and regression coefficient vector : = (13) = (14) 7) Calculate the q-th independent variable input in the test set. The kth principal component : = (15) 8) Let the output of the q-th dependent variable in the test set be... = + That is, after modeling the sub-training set, the q-th independent variable from the test set is input. Substitute the values ​​into the calculation to obtain the predicted output value of the q-th dependent variable in the test set; 9) If k = If the result is positive, then the calculation ends; otherwise, let: = (16) = (17) = (18) 10) Let k = k + 1, and go to step 5). Step 4: Weight the prediction results of each sub-model according to the distance from the sample data points in the test set to the centroid of each sub-training set, integrate them to obtain the final acquisition success rate prediction value, and evaluate the prediction accuracy and performance of the model by combining it with the real acquisition success rate data in the test set. Step 5: Acquire a new set of operational data in real time, combine the operational data with each sub-training set, use the local weighted partial least squares modeling algorithm to model a sub-model for each sub-training set, and obtain the predicted acquisition success rate value corresponding to the operational data under each sub-model. Then, calculate the final predicted acquisition success rate value corresponding to the operational data point by weighting the sub-model prediction value according to the distance from the operational data point to the centroid of each sub-training set, thereby realizing the predictive analysis of the operating performance of the metering equipment.

2. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 1, characterized in that: In step 1, the historical operation dataset of the metering equipment is: a dataset showing how the historical data acquisition success rate of the metering equipment to be predicted changes with climatic factors; The dataset includes the daily data collection success rate of the metering device to be predicted over the past three years, as well as the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation within the area of ​​the metering station over the past three years.

3. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 2, characterized in that: In the dataset, the daily maximum temperature, daily minimum temperature, daily average temperature, daily relative humidity, and daily precipitation are used as independent variables. The daily collection success rate is processed as the collection failure rate after removing the percentage sign, which is then 100*(100%-y) and used as the dependent variable. The dataset is then divided into training and testing sets in a 7:3 ratio.

4. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 1 or 3, characterized in that: In step 2, the range of the number of clusters k is set to [1, 10]. The optimal number of clusters k for the training set is determined by combining Elbow and WCSS, and the training set is clustered into k sub-training sets.

5. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 1 or 3, characterized in that: In step 2, the centroid of the sub-training set r is the arithmetic mean of each dimension of all sample data points in the sub-training set, r=1,2,…,k, where k is the number of sub-training sets.

6. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 1, characterized in that: In step 2), similar samples are determined based on Euclidean distance. Specifically: =exp(- )(4) = (5)。 7. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 3, characterized in that: Step 4 involves weighting the prediction results of each sub-model based on the distance from the sample data points in the test set to the centroids of each sub-training set, and then integrating them to obtain the final predicted acquisition success rate. This specifically includes the following steps: Step 4.1: Calculate the qth set of independent variable inputs in the test set. centroid of the sub-training set r The Euclidean distance between them, r=1,2,..,k, where k represents the number of sub-training sets; The formula for calculating Euclidean distance is: = (19) Step 4.2: Input of independent variables based on the test set The weights corresponding to the prediction results of each sub-model are obtained by Euclidean distance between the centroids of each sub-training set and the prediction results of each sub-model. The final prediction result is obtained by weighting the prediction results of each sub-model.

8. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 7, characterized in that: The weight calculation formula described in step 4.2 is as follows: (20) in, This represents the q-th independent variable input in the test set. Substitute the values ​​into each sub-model to calculate the predicted values. At that time, the weights corresponding to the prediction results of each sub-model are calculated based on the Euclidean distance; This represents the q-th independent variable input in the test set. The distance between the centroid of the r-th sub-training set; This represents the q-th independent variable input in the test set. The sum of distances to the centroids of all sub-training sets.

9. The method for predicting and analyzing the operating performance of metering equipment based on local weighted partial least squares as described in claim 7, characterized in that: In step 4.2, the prediction results of each sub-model are weighted and calculated to obtain the final prediction result: (21) in, Input the q-th independent variable in the test set Substitute the sub-training set r with the sub-model prediction value calculated by the corresponding sub-model; k represents the number of sub-training sets. The ensemble prediction is the weighted ensemble of the predictions from each sub-model for the q-th independent variable in the test set.