A real-time prediction method, medium and system for transformer top oil temperature
Through the method of combining K-means clustering and NLSF, a real-time measurement model of the top oil temperature of the distribution transformer is established, which solves the problems of low accuracy and high cost of top oil temperature prediction in the existing technology, and achieves high-precision and low-cost prediction. Top oil temperature prediction improves the reliability of power supply in the distribution network.
Patent Information
- Application Number
- CN202210826740.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-07-14
AI Technical Summary
It is difficult to achieve real-time prediction of the top oil temperature of the distribution transformer with low cost and high prediction accuracy using existing technology, and the installation and maintenance costs are high, which affects the reliability of the power supply of the distribution network.
Using a combination of K-means clustering algorithm and nonlinear least squares fitting method (NLSF), by obtaining historical top oil temperature data and electrical data, perform data classification and fitting modeling, and establish a specific model of power distribution for a specific region. The real-time calculation model of the top oil temperature of the transformer is used to predict the top oil temperature of other transformers of the same model.
It reduces the cost of obtaining a large number of top oil temperature data of distribution transformers, achieves accurate prediction of top oil temperature, and controls the error within 5°C, improving the reliability of power supply in the distribution network.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the technical field of power systems, and in particular to a method, medium and system for real-time prediction of top oil temperature of a transformer. Background Art
[0002] The safe and reliable operation of distribution transformers is the basis for ensuring stable power supply in distribution networks. In addition to uncontrollable factors such as power failures or force majeure factors such as meteorological disasters, distribution transformers often have excessively high internal temperatures due to overload or heavy loads, which leads to a reduction in service life and even direct damage to the transformer. Therefore, real-time monitoring and prediction of the thermal state of distribution transformers is one of the important means to improve the reliability of power supply in distribution networks. The thermal state of distribution network transformers can be reflected by their internal hot spot temperature or top oil temperature. Due to the limitations of measurement technology, accurate measurement of hot spot temperature is still difficult to achieve. However, the top oil temperature of distribution network transformers is highly correlated with the hot spot temperature. The internal hot spot temperature of distribution network transformers can be inferred by measuring the top oil temperature, or the thermal state of distribution transformers can be directly monitored or predicted in real time by the top oil temperature value.
[0003] In current research, the prediction of the top oil temperature of distribution transformers is based on a large amount of existing historical data of top oil temperature or historical hourly meteorological data around the distribution transformers. Considering that the number of transformers in the distribution network area ranges from dozens to hundreds or thousands, if a top oil temperature measurement device and an ambient temperature measurement device are installed on each distribution transformer, the installation and maintenance cost is too high and therefore difficult to implement in practice. Summary of the invention
[0004] The technical problem to be solved by the present invention is: in view of the problems existing in the prior art, the present invention provides a real-time prediction method, medium and system for the top oil temperature of a transformer with low cost and high prediction accuracy.
[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0006] A method for real-time prediction of transformer top oil temperature comprises the following steps:
[0007] Step S1: obtaining historical top oil temperature data of a selected test transformer in a selected area, as well as electrical data and daily meteorological data at the same time as the historical top oil temperature data, and dividing them into training set data and test set data;
[0008] Step S2: scoring and assigning values to the non-digital attribute parts of the meteorological data collected from all data, and converting the non-digital attributes of the non-digital meteorological data into digital attributes;
[0009] Step S3: According to the meteorological data attributes, the K-means clustering algorithm is used to classify the training set data by date, and the cluster number with the highest Calinski-Harabaz Index value is taken as the optimal cluster number for the date, and the cluster center of each cluster in the K-means clustering algorithm is saved, and the data is classified by date according to the optimal cluster number, and a date classification label is added to the data;
[0010] Step S4: combining the date classification data determined in step S3 with the data with date classification labels, classifying the data according to the hourly periods of the day to which they belong, and reclassifying the data according to the hourly periods on the basis of the date classification, and adding hourly period classification labels to the data;
[0011] Step S5: Combine the date classification labels and hourly classification labels added in step S3 and step S4, group the data with the same two labels together, use the NLSF method to fit and model each group of data, compare the error between the calculated value of the fitting model and the true value, and select the best number of hourly classifications according to the error;
[0012] Step S6: Data with the same date classification label and hourly classification label are divided into the same group, and each group of data is fitted and modeled using the NLSF method, and each group of models obtained is stored. The input of the model is electrical data, and the output is the top oil temperature data at the same time;
[0013] Step S7: Combine the digitized meteorological data attributes of the test set data in step S1 and step S2 with the cluster center of each cluster classified by the K-means clustering algorithm in step S3, calculate the Euclidean distance between the test set meteorological data and each cluster center, and the one with the smallest distance is the date classification of the test set data. Repeat this step to add date labels to all the data in the test set;
[0014] Step S8: combining the best number of classifications for small segments obtained in step S5 with the grouping result in step S6, adding small segment classification labels to the test set data;
[0015] Step S9: Combine the model fitted by group in step S6 with the test set data grouped in step S7, classify the test set data into the groups in step S6 according to the date classification label and the hourly classification label, input the test set data into the model in the corresponding group, and output the top oil temperature prediction value of the test set data.
[0016] Preferably, the specific process of step S2 is:
[0017] Step S21: Replace the weather attributes in all data according to the following table:
[0018]
[0019] Step S22: convert the above values as follows:
[0020] S′=S×ζ (3)
[0021] Among them, S represents the original weather score value, ζ represents the seasonal influence factor, which is 4-6 in summer and 1-3 in winter, and S′ is the weather score value after considering the influence of the balanced weather score in the clustering process;
[0022] Step S23: For the score value of the weather on that day from A to B, consider it according to formula (4):
[0023]
[0024] Among them, T A With T B are the duration of weather A and weather B in the case of weather A turning into B, in hours h, S′ A With S′ B are the weather score values of weather A and weather B after conversion in step S22, and S″ is the weather score value on the date when weather A turns into B.
[0025] Preferably, the specific steps of step S3 are as follows:
[0026] Step S31: Determine the number of categories k of the K-means clustering method and initialize the category cluster center points;
[0027] Step S32: Calculate the distance between the meteorological attribute of each date and the cluster center point according to formula (5), and assign each date to the cluster center point with the closest distance to it, and form k categories accordingly:
[0028]
[0029] Among them, L ij is the Euclidean distance between the meteorological data of the i-th date and the j-th cluster center, m is the meteorological attribute dimension, x ik is the k-th dimension data in the meteorological data of the i-th date, x jk is the k-th dimension data of the j-th cluster center;
[0030] Step S33: Calculate the average value of all data in each class and use it as the new cluster center;
[0031] Step S34: According to the calculation result of formula (6), if the limiting condition is met or the swing is very small, the clustering is completed, otherwise, repeat steps S32 and S33;
[0032]
[0033] In the formula, E is the convergence index, m i C i The cluster center of the class, x q C i Samples in the class;
[0034] Step S35: Combined with the clustering result in step S34, the index for evaluating the clustering effect is calculated according to formula (7):
[0035]
[0036] Among them, CHI(k) is the Calinski-Harabaz Index value when the number of clusters is k, B k is the covariance matrix between categories, W k is the covariance matrix of the data within the category, and tr is the trace of the matrix; that is, the larger the CHI, the larger the covariance between categories and the smaller the covariance within the category, so the cluster number k with a higher CHI value is better;
[0037] Step S36: Let k be 2 to 8, take the k with the highest CHI as the determined date cluster number, and cluster the training set data according to meteorological attributes using the K-means clustering algorithm based on this k value, add date classification labels to the training set data, and save the cluster center.
[0038] Preferably, the specific steps of step S4 are as follows:
[0039] Step S41: Determine the number of categories c for reclassifying data by hourly segment;
[0040] Step S42: The corresponding hour number is The hour time period label is set to 1, and the hour number is The hour label is defined as 2, and so on. The hourly time period label is defined as c;
[0041] Step S43: Combined with the data classified by date in step S3, the data is further classified by hourly period, and hourly period labels are added to the data;
[0042] Step S4: Using the traversal method, the data is divided into subcategories according to the hourly period on the basis of the data being divided into major categories according to date.
[0043] Preferably, the specific process of step S5 is:
[0044] Step S51: combining the training data that has been classified into major categories by date and minor categories by hourly segment in step S4, grouping the data with the same date classification label and hourly classification label into one group;
[0045] Step S52: For each group of data, set the data of each group to be {(x 1 ,y 1 ),(x 2 ,y 2 ),…,(x N ,y N )}, where x i is a D-dimensional vector representing the input electrical data, that is, x i =[x i1 ,x i2 ,…,x iD ], and fit the model for each set of data according to NLSF. The principle is to minimize the square error. The optimization problem is expressed as shown in formula (8):
[0046]
[0047] Among them, δ+ω T x n is the model hyperplane expression, δ is a constant term, ω T x n is the cumulative form of the linear sum of the independent variables;
[0048] make The optimization problem expressed by formula (8) is simplified to:
[0049]
[0050] in
[0051]
[0052] y=[y 1 ,y 2 ,…,y N ] (11)
[0053] right Taking the derivative and setting it equal to 0 gives:
[0054]
[0055] This is the model solution obtained by fitting each set of data;
[0056] Step S53: in each group, the predicted value of the top oil temperature output by the model solution is compared with the actual value of the top oil temperature in the training set to obtain the percentage of sample points with an error exceeding 5°C;
[0057] Step S54: Repeat clustering the date n times using the K-means clustering algorithm, combine the n clustering results to this step, and calculate the average value of the proportion of sample points with errors exceeding 5°C in the n results;
[0058] Step S55: Take the hourly segment classification number as 2, 3, 4, 6, 12, 24, obtain the average value of the proportion of sample points with errors exceeding 5°C in the corresponding six n results, and take the hourly segment classification number corresponding to the lowest value as the optimal hourly segment classification number.
[0059] Preferably, the specific process of step S6 is:
[0060] Step S61: combining the optimal date classification number determined in step S4 with the training set data after adding the date classification label and the optimal hour segment classification number determined in step S5, reclassifying the data according to the optimal hour segment classification number, and adding the hour segment classification label to the training set data;
[0061] Step S62: grouping the training set data with the same date classification label and hour segment classification label into one group;
[0062] Step S63: Perform model fitting on each set of data, and store the fitted top layer oil temperature calculation model.
[0063] Preferably, the specific process of step S7 is:
[0064] Step S71: Combine the k cluster centers retained in step S36 and calculate the distance between the test set data and each cluster center according to formula (5);
[0065] Step S72: For the test set data, classify them according to the cluster center with the closest distance, and add the same date classification label as that of the class.
[0066] Preferably, the specific steps of step S9 are as follows:
[0067] Step S91: combining the test set data to which the date classification labels and the hourly segment classification labels have been added in steps S7 and S8 with the groups determined according to the labels in step S6, the test set data are classified into the groups determined in step S6 according to the labels;
[0068] Step S92: input the grouped test set electrical data into the fitted model stored in the group, and output the corresponding top oil temperature of the distribution transformer;
[0069] Step S93: The top oil temperature value obtained from the test set is continuously converted into a training set in combination with electrical data to obtain new electrical data. This step is repeated to obtain a large amount of historical data on the top oil temperature of distribution transformers.
[0070] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are executed.
[0071] The present invention further discloses a real-time prediction system for the top oil temperature of a transformer, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is run by the processor, the steps of the method described above are executed.
[0072] Compared with the prior art, the advantages of the present invention are:
[0073] The present invention selects a representative transformer of the same type in the same area and installs a top layer oil temperature measuring device for it to obtain the historical data of the top layer oil temperature. The electrical data at the corresponding time is combined with the easily obtained daily meteorological data to establish a real-time measurement model of the top layer oil temperature of the distribution transformer based on the electrical data for the distribution transformer of a specific type in the specific area. The model is used to obtain the top layer oil temperature data of other distribution transformers of the same type in the area, so as to reduce the cost of obtaining a large amount of top layer oil temperature data of distribution transformers. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a flow chart of the prediction method of the present invention in an embodiment.
[0075] Figure 2 It is a framework diagram of the top oil temperature calculation model of the distribution transformer based on K-means and NLSF proposed in the present invention.
[0076] Figure 3 It is a correlation analysis diagram between the electrical data of the distribution transformer and the top oil temperature in the example of the present invention.
[0077] Figure 4 This is a curve diagram showing the change of CHI value with k value when the K-means clustering algorithm is used to cluster data by date in an example of the present invention.
[0078] Figure 5 This is a curve chart showing how the average value of the percentage of errors exceeding 5°C changes with the number of hourly segment classifications for a fixed k value in an example of the present invention.
[0079] Figure 6 This is a curve chart showing how the average value of the percentage of errors exceeding 5°C changes with the k value when the number of classifications in the small time segment is fixed in the example of the present invention.
[0080] Figure 7 It is a graph of the error of the test set in the comparative test of whether the date and hour segment are classified or not in the embodiment of the present invention. DETAILED DESCRIPTION
[0081] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0082] like Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a method for real-time prediction of transformer top oil temperature, which specifically includes the following steps:
[0083] Step S1: First, a transformer of a specific model is selected in a specific area for which a large amount of historical data of the top oil temperature of distribution transformers is to be obtained, a transformer is selected as a test transformer, a top oil temperature measuring device is installed for it, and a certain amount of historical top oil temperature data and electrical data and daily meteorological data at the same time are collected. In order to verify the feasibility of the method proposed in the present invention, the top oil temperature data 30 days before the day to be measured is taken as the training set data, and the data on the day to be measured is taken as the test set data;
[0084] Step S2: scoring and assigning values to the non-digital attribute parts of the meteorological data collected from all data, and converting the non-digital attributes of the non-digital meteorological data into digital attributes;
[0085] Step S3: According to the meteorological data attributes, the K-means clustering algorithm is used to classify the training set data by date. The number of clusters is traversed from 2 to 8. The cluster number with the highest Calinski-Harabaz Index value is taken as the optimal cluster number for the date. The cluster center of each cluster in the K-means clustering algorithm is saved, and the data is classified by date according to the optimal cluster number, and date classification labels are added to the data;
[0086] Step S4: combining the date classification number determined in step S3 with the data with the date classification label, classify the data according to the hour period of the day, and use 2, 3, 4, 6, 12, and 24 as the hour period classification numbers to group the 24 hours of the day. On the basis of the date classification, reclassify the data according to the hour period, and add the hour period classification label to the data;
[0087] Step S5: Combine the date classification labels and hourly classification labels added in step S3 and step S4, group the data with the same two labels together, use the NLSF method to fit and model each group of data, compare the errors between the calculated values of the fitting model and the true values, and take the hourly classification number with the lowest average value of the number of times the error exceeds 5°C in 100 cycles as the best hourly classification number;
[0088] Step S6: data with the same date classification label and hourly classification label are divided into the same group, and each group of data is fitted and modeled using the NLSF method, and each group of models obtained is stored. The input of the model is electrical data, and the output is the top oil temperature data at the same time;
[0089] Step S7: Combine the digitized meteorological data attributes of the test set data in step S1 and step S2 with the cluster center of each cluster classified by the K-means clustering algorithm in step S3, calculate the Euclidean distance between the test set meteorological data and each cluster center, and the one with the smallest distance is the date classification of the test set data. Repeat this step to add date labels to all the data in the test set;
[0090] Step S8: combining the best number of classifications for small segments obtained in step S5 with the grouping result in step S5, adding small segment classification labels to the test set data;
[0091] Step S9: Combine the model fitted by group in step S6 with the test set data grouped in step S7, classify the test set data into the group in step S5 according to the date classification label and the hourly classification label, input the test set data into the model in the corresponding group, output the top oil temperature measurement value of the test set data, and successively input more electrical data to obtain more corresponding top oil temperature historical data for the prediction research of the top oil temperature.
[0092] The present invention selects a representative transformer of the same type in the same area and installs a top oil temperature measuring device for it to obtain the historical data of the top oil temperature. The electrical data at the corresponding time is combined with the easily obtained daily meteorological data to establish a real-time calculation model for the top oil temperature of the distribution transformer based on the electrical data for the distribution transformer of a specific type in a specific area. The model is used to obtain the top oil temperature data of other distribution transformers of the same type in the area, so as to reduce the cost of obtaining a large amount of top oil temperature data of distribution transformers.
[0093] In a specific embodiment, the specific description of step S1 is as follows:
[0094] The top oil temperature measurement method proposed in the present invention believes that the top oil temperature calculation model based on electrical data and meteorological data for the same type of distribution transformers in the same area at the same time should be the same. Under the premise that a large amount of top oil temperature historical data is required for top oil temperature prediction research, in order to solve the high cost problem of installing top oil temperature measurement devices for all distribution transformers, a certain type of distribution transformer in the area is selected as a sample, and a top oil temperature measurement device is installed for it to obtain top oil temperature data. After establishing a model by combining electrical data and meteorological data, the model is applied to the real-time measurement of the top oil temperature of other distribution transformers of the same type in the area, and a large amount of top oil temperature historical data is obtained to achieve the purpose of saving costs for top oil temperature prediction research.
[0095] The electrical data and top oil temperature data of 30 days before the top oil temperature is to be tested are used as training set samples, and the electrical data and top oil temperature data of the day of the top oil temperature to be tested are used as test set samples, which are expressed as follows:
[0096]
[0097]
[0098] Among them, Train is the training sample set, Test is the test sample set, α i is the electrical data vector of the i-th group in the training set, a i is the label of the i-th sample in the training set, i.e., the measured top oil temperature of the distribution transformer, β i is the electrical data vector of the i-th group in the test set, b i is the label of the i-th sample in the training set, Num_Train is the total number of samples in the training set, and Num_Test is the number of samples in the test set.
[0099] In addition, the data of 30 days before the test day are selected as training data because the climate of the previous 30 days is similar to that of the test day, which avoids the interference of data from dates with large climate differences on model fitting, thereby increasing the model error; and the training set data should not be too small, otherwise it will lead to too little data volume and the model will not be able to fit the relationship between input and output.
[0100] In a specific embodiment, the specific steps and description of step S2 are as follows:
[0101] Meteorological data contains a certain amount of non-digital attributes, which cannot be used in clustering algorithms. Such attributes should be converted so that they can be applied to clustering algorithms. The following uses weather as an example to illustrate:
[0102] Step S21: The weather conditions of the day directly affect many meteorological attributes, and also directly affect the impact of meteorological conditions on the top oil temperature of the distribution transformer. Generally speaking, it is believed that sunny days have lower humidity, higher temperature, and lower wind speed, which have a positive impact on the top oil temperature of the distribution transformer, while rainy days have a negative impact on it. Based on this, the weather attributes in all data are replaced according to the following table:
[0103]
[0104] Step S22: To prevent the temperature value or other attribute value from being significantly higher or lower than the above replacement value, which may weaken or strengthen the influence of the weather attribute value during the clustering process, the above value is converted as follows:
[0105] S′=S×ζ (3)
[0106] Among them, S represents the original weather score value, ζ represents the seasonal influence factor, which is 4-6 in summer and 1-3 in winter, and S′ is the weather score value after considering the influence of the balanced weather score in the clustering process.
[0107] Step S23: For the score value of the weather on that day from A to B, consider it according to formula (4):
[0108]
[0109] Among them, T A With T B are the duration of weather A and weather B in the case of weather A turning into B, in hours h, S′ A With S′ B are the weather score values of weather A and weather B after conversion in step S22, and S″ is the weather score value on the date when weather A turns into B.
[0110] Step S2 mainly takes the weather conditions as an example to provide a method for digitizing the non-digitalized part of the date weather attributes. The remaining non-digitalized attributes can refer to this method to digitize the meteorological attributes.
[0111] In a specific embodiment, the specific steps of step S3 are as follows:
[0112] In order to reduce the model error caused by the different patterns between the electrical data and the top oil temperature data due to the different climate between days, the data are classified and processed by date. The specific process is as follows:
[0113] Step S31: Determine the number of categories k of the K-means clustering method and initialize the category cluster center points;
[0114] Step S32: Calculate the distance between the meteorological attribute of each date and the cluster center point according to formula (5), and assign each date to the cluster center point with the closest distance to it, and form k categories accordingly:
[0115]
[0116] Among them, L ij is the Euclidean distance between the meteorological data of the i-th date and the j-th cluster center, m is the meteorological attribute dimension, x ik is the k-th dimension data in the meteorological data of the i-th date, x jk is the k-th dimension data of the j-th cluster center;
[0117] Step S33: Calculate the average value of all data in each class and use it as the new cluster center;
[0118] Step S34: According to the calculation result of formula (6), if the limiting condition is met or the swing is very small, the clustering is completed, otherwise, repeat steps S32 and S33;
[0119]
[0120] In the formula, E is the convergence index, m i C i The cluster center of the class, x q C i Samples in the class;
[0121] Step S35: Combined with the clustering result in step S34, the index for evaluating the clustering effect is calculated according to formula (7):
[0122]
[0123] Among them, CHI(k) is the Calinski-Harabaz Index value when the number of clusters is k, B k is the covariance matrix between categories, W k is the covariance matrix of the data within the category, and tr is the trace of the matrix. That is, if the CHI is larger, the covariance between categories is larger, and the covariance within the category is smaller, so the cluster number k with a higher CHI value is better;
[0124] Step S36: Let k be 2 to 8, repeat the above process, take the k with the highest CHI as the determined date cluster number, and cluster the training set data according to meteorological attributes using the K-means clustering algorithm based on this k value, add date classification labels to the training set data, and save the cluster centers.
[0125] Step S3 mainly combines the digitized meteorological attributes obtained in step S2, uses the traversal method, and takes the Calinski-Harabaz Index as an indicator to find the optimal k value in the K-means clustering method, that is, to find the optimal number of classifications for the training set data date.
[0126] In a specific embodiment, in step S4, in order to reduce the model error caused by the different rules between the electrical data and the top oil temperature data caused by the large daily temperature difference between day and night, the data is classified and processed according to the hour period of the day, specifically:
[0127] Step S41: Determine the number of categories c for reclassifying data by hourly segment;
[0128] Step S42: The corresponding hour number is The hour time period label is set to 1, and the hour number is The hour label is defined as 2, and so on. The hourly time period label is defined as c;
[0129] Step S43: Combined with the data classified by date in step S3, the data is further classified by hourly period, and hourly period labels are added to the data;
[0130] Step S4 mainly adopts a traversal method. On the basis of the data being classified into major categories according to date, the data is further classified into minor categories according to the hourly period.
[0131] In a specific embodiment, the specific steps of step S5 are as follows:
[0132] Step S51: combining the training data that has been classified into major categories by date and minor categories by hourly segment in step S4, grouping the data with the same date classification label and hourly classification label into one group;
[0133] Step S52: For each group of data, set the data of each group to be {(x 1 ,y 1 ),(x 2 ,y 2 ),…,(x N ,y N )}, where x i is a D-dimensional vector representing the input electrical data, that is, x i =[x i1 ,x i2 ,…,x iD ], and fit the model for each set of data according to NLSF. The principle is to minimize the square error. The optimization problem can be expressed as shown in formula (8):
[0134]
[0135] Among them, δ+ω T x n is the model hyperplane expression, δ is a constant term, ω T x n is the cumulative form of the linear sum of the independent variables.
[0136] make The optimization problem expressed by formula (8) can be simplified as follows:
[0137]
[0138] in
[0139]
[0140] y=[y 1 ,y 2 ,…,y N ] (11)
[0141] right Taking the derivative and setting it equal to 0 gives:
[0142]
[0143] This is the model solution obtained by fitting each set of data;
[0144] Step S53: In each group, the model solution is used to output the calculated value of the top oil temperature, which is compared with the actual value of the top oil temperature in the training set to obtain the percentage of sample points with an error exceeding 5°C;
[0145] Step S54: To avoid errors caused by different results of the K-means clustering algorithm, the date is clustered 100 times using the K-means clustering algorithm, and the 100 clustering results are combined to this step to calculate the average value of the proportion of sample points with errors exceeding 5°C in the 100 results;
[0146] Step S55: Take the hourly segment classification number as 2, 3, 4, 6, 12, 24, repeat steps S4 and S5, obtain the corresponding six 100 results, the average value of the proportion of sample points with an error exceeding 5°C, and take the hourly segment classification number corresponding to the lowest value as the optimal hourly segment classification number.
[0147] Step S5 mainly uses a traversal method to reclassify the data according to the hourly segment based on the premise of determining the date classification, and determines the optimal number of hourly segment classifications based on the average value of the proportion of sample points with an error exceeding 5°C after 100 cycles.
[0148] In a specific embodiment, the specific steps of step S6 are as follows:
[0149] Step S61: combining the optimal date classification number determined in step S4 and the training set data after adding the date classification label and the optimal hour segment classification number determined in step S5, reclassifying the data according to the optimal hour segment classification number, and adding the hour segment classification label to the training set data by the method of step S42;
[0150] Step S62: grouping the training set data with the same date classification label and hour segment classification label into one group;
[0151] Step S63: performing model fitting on each set of data according to the method of step S52, and storing the fitted top layer oil temperature calculation model;
[0152] Step S6 mainly combines the best classification result parameters obtained in steps S4 and S5 to classify and reclassify the training set, and adds date classification labels and hourly classification labels to the training set data. After grouping by labels, model fitting is performed to obtain and store the top oil temperature measurement model of the distribution transformer based on electrical data for different dates and different hourly periods.
[0153] The real-time calculation model for the top oil temperature of the distribution transformer proposed in the present invention can greatly reduce the cost of installing a measuring device to collect historical data on the top oil temperature of the distribution transformer by sharing the model with the same type of distribution transformers in the same region, and can control the real-time prediction error of the top oil temperature to be within 5°C.
[0154] In a specific embodiment, the specific steps of step S7 are as follows:
[0155] Step S71: Combine the k cluster centers retained in step S36 and calculate the distance between the test set data and each cluster center according to formula (5);
[0156] Step S72: For the test set data, classify them according to the cluster center with the closest distance, and add the same date classification label as that of the class.
[0157] Step S7 uses the results of the above steps to add date classification labels to the test set data.
[0158] In a specific embodiment, the specific steps of step S9 are as follows:
[0159] Step S91: combining the test set data to which the date classification labels and the hourly segment classification labels have been added in steps S7 and S8 with the groups determined according to the labels in step S6, the test set data are classified into the groups determined in step S6 according to the labels;
[0160] Step S92: input the grouped test set electrical data into the fitted model stored in the group, and output the corresponding top oil temperature of the distribution transformer;
[0161] Step S93: The top oil temperature value obtained from the test set is continuously converted into a training set in combination with electrical data, new electrical data is obtained, and the steps of the invention are continuously repeated to obtain a large amount of historical data on the top oil temperature of distribution transformers for use in top oil temperature prediction research.
[0162] The present invention establishes a real-time prediction method for the top oil temperature of a distribution transformer based on K-means and nonlinear least squares fitting (NLSF). On the basis of obtaining the top oil temperature history data of a transformer of a specific model in a specific area, the electrical data at the corresponding time and the daily meteorological data, the NLSF is combined to construct a model for estimating the top oil temperature at the same time from the electrical quantities of the distribution transformer. Considering that the regularity between the electrical data and the top oil temperature may be related to the weather conditions and the time of dawn and dusk, before the data fitting modeling is performed, the K-means clustering method and the traversal method are first used to classify the data according to the date and the hourly period, and the date label and the hourly period label are added to the data. The method proposed by combining the same date label and the hourly period label classifies the date to which the distribution transformer data belongs according to the historical meteorological data of the area, and on this basis, the hourly period to which the distribution transformer data belongs is classified, thereby continuously improving the calculation accuracy of the top oil temperature calculation model. This method solves the problem that a large amount of historical data on top oil temperature of distribution transformers required for top oil temperature prediction cannot be obtained in engineering practice, and greatly reduces the cost of installing measurement devices required to collect historical data for predicting top oil temperature of distribution transformers in engineering practice.
[0163] The effectiveness of the present invention is described in detail below with actual cases:
[0164] The data obtained in this embodiment are the electrical data and meteorological data of a certain model of distribution transformer in a certain area of Hunan from September 1, 2021 to October 22, 2021. The electrical data include three-phase voltage, three-phase current, active power, reactive power and apparent power, and the meteorological data include daily maximum temperature, minimum temperature and weather.
[0165] The last 10% of the data is used as the test set, and the first 30 days of each test day in the test set are the corresponding training sets.
[0166] Figure 3 In order to analyze the correlation between the top oil temperature and various electrical data indicators, Figure 3 It can be seen that the top oil temperature of the distribution transformer has a high correlation with the A-phase current value and the total reactive power value Q. Therefore, the present invention determines the A-phase current of the distribution transformer and the total instantaneous reactive power at the same moment as the input electrical data, and outputs the top oil temperature value at the same moment.
[0167] After all meteorological data attributes are digitized, the K-means clustering algorithm is used to cluster all dates involved in the data according to meteorological attributes. The k value ranges from 2 to 8, and the CHI value is calculated respectively. The CHI value changes with the k value as shown in the following figure: Figure 4 As shown by Figure 4It can be seen that in this example, the clustering effect is better when k is 3, that is, in this example, all data are divided into 3 categories according to meteorological attributes, which is more effective.
[0168] In practical engineering applications, the top oil temperature measurement should first ensure that the error is not too large, otherwise the measurement loses its meaning. Based on this, the index is established according to formula (13):
[0169]
[0170] Among them, P Over_5 is the percentage of test set errors exceeding 5°C, It is the number of times the error exceeds 5°C in the test set.
[0171] Let k = 3 remain unchanged, and traverse the number of hourly segment classifications from 2, 3, 4, 6, 12 and 24, and calculate P in 100 clustering cycles respectively. Over_5 The average value of Figure 5 As shown by Figure 5 It can be seen that when the data is further divided into three categories according to the hourly periods shown, the calculation results can have a lower P Over_5 The fitting model has more engineering significance.
[0172] The above results show that for both date classification and hourly segment classification, the effect of top oil temperature measurement first gets better and then worse with the increase of the number of classifications. This is because when the number of classifications is small, the data in the same group covers a wider range of dates and hourly segments, and the functional relationship between the electrical data and the top oil temperature is different for data with large differences in dates and hourly segments, such as the relationship between the two in hot weather is different from the relationship between the two in cold weather, the relationship between the two during the day is different from the relationship between the two at night, etc., which leads to the unclear functional relationship between the two in data covering a wide range of dates and hourly segments, which in turn causes poor fitting effect and large error of the top oil temperature measurement model; and when the number of classifications is large, although the group classification is more refined, the relationship between the electrical data and the top oil temperature of each group of data is relatively clearer, but the hesitation of too many groupings leads to a small amount of data in each group, resulting in under-fitting of the model, resulting in the relationship between the two not being fully represented, thereby reducing the effect of top oil temperature measurement.
[0173] To further verify that the grouping effect when the number of date classifications is 3 makes the prediction of top oil temperature better, the number of hourly classifications is kept unchanged at 3, and the k value is traversed from 2 to 8. The top oil temperature process of the test set is recalculated, and the P in 100 clustering cycles is calculated. Over_5 The average value of k is shown in the curve Figure 6 As shown by Figure 6 It can be seen that when k = 3, P Over_5 The average value of is the lowest, which further confirms the correctness of the method proposed in the present invention.
[0174] In order to more comprehensively verify the rationality of the method proposed in the present invention, the following indicators are established to evaluate the measurement effect:
[0175]
[0176]
[0177] Among them, RMSE is the root mean square error, MAE is the mean absolute error, y i is the true value, is the calculated value.
[0178] Similarly, the average values of the above two indicators in 100 clustering cycles are still used to evaluate the measurement effect. When k=3 and the number of hourly classifications changes, the indicators are shown in the following table:
[0179]
[0180]
[0181] When the number of hourly segment classifications = 3 and the k value changes, the indicators are as shown in the following table:
[0182]
[0183] It can be seen from the above two tables that when k = 3 and the number of hourly segment classifications = 3, the average RMSE and MAE values in 100 cycles are not necessarily the lowest, but are generally very close to the lowest values. From the perspective of actual engineering, if the measurement error can be controlled within a certain range, such as within 5°C, it can be instructive for the real-time operating status of the distribution transformer or the operation warning of the distribution network transformer. Therefore, as long as the RMSE and MAE values are kept at a low level, the actual requirements of the project can be met. Of course, lower binary values will be better, but if only the k value or the hourly segment classification value is changed to reduce a very small RMSE or MAE value, it will increase P Over_5 The gain is not worth the loss, because the increase in P Over_5 The value change obviously increases the probability of operating risk caused by inaccurate measurement. Therefore, from a more comprehensive perspective, the method proposed in the present invention is scientific and effective.
[0184] To verify that the date classification and hourly segment classification are effective, the hourly segment classification numbers are 3 and 1, and the date classification numbers are 3 and 1. A total of four groups of tests are conducted to measure the top oil temperature in the test set. The error curve is shown in the figure below. Figure 7 As shown, it can be seen that classifying the date and the hour segment can significantly reduce the estimation error of the top oil temperature estimation model.
[0185] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A real-time prediction method for transformer top oil temperature, characterized in that: Includes steps: Step S1: obtaining historical top oil temperature data of a selected test transformer in a selected area, as well as electrical data and daily meteorological data at the same time as the historical top oil temperature data, and dividing them into training set data and test set data; Step S2: scoring and assigning values to the non-digital attribute parts of the meteorological data collected from all data, and converting the non-digital attributes of the non-digital meteorological data into digital attributes; Step S3: According to the meteorological data attributes, the K-means clustering algorithm is used to classify the training set data by date, and the cluster number with the highest Calinski-Harabaz Index value is taken as the optimal cluster number for the date, and the cluster center of each cluster in the K-means clustering algorithm is saved, and the data is classified by date according to the optimal cluster number, and a date classification label is added to the data; Step S4: combining the date classification data determined in step S3 with the data with date classification labels, classifying the data according to the hourly periods of the day to which they belong, and reclassifying the data according to the hourly periods on the basis of the date classification, and adding hourly period classification labels to the data; Step S5: Combine the date classification labels and hourly classification labels added in step S3 and step S4, group the data with the same two labels together, use the NLSF method to fit and model each group of data, compare the error between the calculated value of the fitting model and the true value, and select the best number of hourly classifications according to the error; Step S6: Data with the same date classification label and hourly classification label are divided into the same group, and each group of data is fitted and modeled using the NLSF method, and each group of models obtained is stored. The input of the model is electrical data, and the output is the top oil temperature data at the same time; Step S7: Combine the digitized meteorological data attributes of the test set data in step S1 and step S2 with the cluster center of each cluster classified by the K-means clustering algorithm in step S3, calculate the Euclidean distance between the test set meteorological data and each cluster center, and the one with the smallest distance is the date classification of the test set data. Repeat this step to add date labels to all the data in the test set; Step S8: combining the best number of classifications for small segments obtained in step S5 with the grouping result in step S6, adding small segment classification labels to the test set data; Step S9: Combine the model fitted by group in step S6 with the test set data grouped in step S7, classify the test set data into the groups in step S6 according to the date classification label and the hourly classification label, input the test set data into the model in the corresponding group, and output the top oil temperature prediction value of the test set data.
2. The real-time prediction method for transformer top oil temperature according to claim 1 is characterized in that: The specific process of step S2 is: Step S21: Replace the weather attributes in all data according to the following table: Step S22: convert the above values as follows: S′=S×ζ (3) Among them, S represents the original weather score value, ζ represents the seasonal influence factor, which is 4-6 in summer and 1-3 in winter, and S′ is the weather score value after considering the influence of the balanced weather score in the clustering process; Step S23: For the score value of the weather on that day from A to B, consider it according to formula (4): Among them, T A With T B are the duration of weather A and weather B in the case of weather A turning into B, in hours h, S′ A With S′ B are the weather score values of weather A and weather B after conversion in step S22, and S″ is the weather score value on the date when weather A changes to B.
3. The real-time prediction method for transformer top oil temperature according to claim 2 is characterized in that: The specific steps of step S3 are as follows: Step S31: Determine the number of categories k of the K-means clustering method and initialize the category cluster center points; Step S32: Calculate the distance between the meteorological attribute of each date and the cluster center point according to formula (5), and assign each date to the cluster center point with the closest distance to it, and form k categories accordingly: Among them, L ij is the Euclidean distance between the meteorological data of the i-th date and the j-th cluster center, m is the meteorological attribute dimension, x ik is the k-th dimension data in the meteorological data of the i-th date, x jk is the k-th dimension data of the j-th cluster center; Step S33: Calculate the average value of all data in each class and use it as the new cluster center; Step S34: According to the calculation result of formula (6), if the limiting condition is met or the swing is very small, the clustering is completed, otherwise, repeat steps S32 and S33; In the formula, E is the convergence index, m i C i The cluster center of the class, x q C i Samples in the class; Step S35: Combined with the clustering result in step S34, the index for evaluating the clustering effect is calculated according to formula (7): Among them, CHI(k) is the Calinski-Harabaz Index value when the number of clusters is k, B k is the covariance matrix between categories, W k is the covariance matrix of the data within the category, and tr is the trace of the matrix; that is, the larger the CHI, the larger the covariance between categories and the smaller the covariance within the category, so the cluster number k with a higher CHI value is better; Step S36: Let k be 2 to 8, take the k with the highest CHI as the determined date cluster number, and cluster the training set data according to meteorological attributes using the K-means clustering algorithm based on this k value, add date classification labels to the training set data, and save the cluster center.
4. The real-time prediction method for transformer top oil temperature according to claim 3 is characterized in that: The specific steps of step S4 are as follows: Step S41: Determine the number of categories c for reclassifying data by hourly segment; Step S42: The corresponding hour number is The hour time period label is set to 1, and the hour number is The hour label is defined as 2, and so on. The hourly time period label is defined as c; Step S43: Combined with the data classified by date in step S3, the data is further classified by hourly period, and hourly period labels are added to the data; Step S4: Using the traversal method, the data is divided into subcategories according to the hourly period on the basis of the data being divided into major categories according to date.
5. The real-time prediction method for transformer top oil temperature according to claim 4 is characterized in that: The specific process of step S5 is: Step S51: combining the training data that has been classified into major categories by date and minor categories by hourly segment in step S4, grouping the data with the same date classification label and hourly classification label into one group; Step S52: For each group of data, assume that each group of data is {(x1, y1), (x2, y2), ..., (x N ,y N )}, where x i is a D-dimensional vector representing the input electrical data, that is, x i =[x i1 ,x i2 ,…,x iD ], and fit the model for each set of data according to NLSF. The principle is to minimize the square error. The optimization problem is expressed as shown in formula (8): Among them, δ+ω T x n is the model hyperplane expression, δ is a constant term, ω T x n is the cumulative form of the linear sum of the independent variables; make The optimization problem expressed by formula (8) is simplified to: in y=[y1,y2,…,y N ] (11) right Taking the derivative and setting it equal to 0 gives: This is the model solution obtained by fitting each set of data; Step S53: in each group, the predicted value of the top oil temperature output by the model solution is compared with the actual value of the top oil temperature in the training set to obtain the percentage of sample points with an error exceeding 5°C; Step S54: Repeat clustering the date n times using the K-means clustering algorithm, combine the n clustering results to this step, and calculate the average value of the proportion of sample points with errors exceeding 5°C in the n results; Step S55: Take the hourly segment classification number as 2, 3, 4, 6, 12, 24, obtain the average value of the proportion of sample points with errors exceeding 5°C in the corresponding six n results, and take the hourly segment classification number corresponding to the lowest value as the optimal hourly segment classification number.
6. The method for real-time prediction of transformer top oil temperature according to claim 5, characterized in that: The specific process of step S6 is: Step S61: combining the optimal date classification number determined in step S4 with the training set data after adding the date classification label and the optimal hour segment classification number determined in step S5, reclassifying the data according to the optimal hour segment classification number, and adding the hour segment classification label to the training set data; Step S62: grouping the training set data with the same date classification label and hour segment classification label into one group; Step S63: Perform model fitting on each set of data, and store the fitted top layer oil temperature calculation model.
7. The real-time prediction method for transformer top oil temperature according to claim 6 is characterized in that: The specific process of step S7 is: Step S71: Combine the k cluster centers retained in step S36 and calculate the distance between the test set data and each cluster center according to formula (5); Step S72: For the test set data, classify it according to the cluster center with the closest distance, and add the same date classification label as that of the class.
8. The method for real-time prediction of transformer top oil temperature according to claim 7, characterized in that: The specific steps of step S9 are as follows: Step S91: combining the test set data to which the date classification labels and the hourly segment classification labels have been added in steps S7 and S8 with the groups determined according to the labels in step S6, the test set data are classified into the groups determined in step S6 according to the labels; Step S92: input the grouped test set electrical data into the fitted model stored in the group, and output the corresponding top oil temperature of the distribution transformer; Step S93: The top oil temperature value obtained from the test set is continuously converted into a training set in combination with electrical data to obtain new electrical data. This step is continuously repeated to obtain a large amount of historical data on the top oil temperature of distribution transformers.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program executes the steps of the method according to any one of claims 1 to 8 when executed by a processor.
10. A real-time prediction system for top oil temperature of a transformer, comprising a memory and a processor, wherein a computer program is stored in the memory, characterized in that: The computer program executes the steps of the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Method and system for forecasting top oil temperature of transformer
CN108664682A
Order grading method and device based on artificial intelligence, equipment and storage medium
CN112948592A
Short-term prediction method and prediction system for top oil temperature of distribution transformer
CN114065649A
