Line loss rate prediction method based on gradient boosting tree
Through the linear loss rate prediction method based on the gradient enhancement tree, the problem of line loss management lag in the power system is solved, efficient line loss rate prediction and grid operation optimization are achieved, and the stability of power supply and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202411317272.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-03
AI Technical Summary
Line loss management in existing power systems relies on traditional manual analysis, resulting in management lag, and real-time and active line loss prediction cannot be achieved, affecting the operating efficiency of the power grid and the reliability of power supply.
The linear loss rate prediction method based on the gradient enhancement tree is adopted, and the power grid and meteorological historical data are extracted, data preprocessing and feature analysis are performed, and the gradient enhancement tree model is trained to achieve the prediction of the linear loss rate.
It improves the real-time and efficiency of line loss management, reduces operating costs, improves the stability of power grid operation and the reliability of power supply, and can timely adjust power grid strategies, optimize resource allocation, identify high-risk areas and take governance measures.
Smart Images

Figure CN119249099A_ABST
Abstract
Description
Background Art
[0002] As the application of electric energy becomes more and more extensive and the electricity consumption of the whole society continues to grow, it is becoming more and more important to improve the management level and utilization rate of electric energy. However, in the process of power production and transmission, due to the inherent loss of equipment (i.e. iron loss and copper loss), unreasonable planning of the power grid, asynchronous construction of the power grid, etc., a large amount of electric energy is lost in vain, resulting in a huge waste of resources.
[0003] In the current practice of power system line loss management, power supply companies generally rely on traditional manual analysis and troubleshooting methods. Although this method can identify key nodes to a certain extent and take corresponding measures to reduce line losses, it inevitably brings management lags due to its reliance on post-event data analysis, resulting in line loss management often becoming a remedial measure. This lag not only affects the efficiency and effectiveness of line loss management, but also limits the improvement of the power grid operation level. Therefore, it is urgent to develop a line loss rate prediction method based on time series characteristics. This method should be able to predict the line loss rate in advance, realize the advanced control of line losses, improve the real-time and active nature of line loss management, optimize the operation efficiency of the power grid, reduce operating costs, improve the reliability and stability of power supply, and provide power users with better power services. Summary of the invention
[0004] The main purpose of the present invention is to provide a line loss rate prediction method based on a gradient boosting tree to effectively solve the above-mentioned problems mentioned in the background technology.
[0005] The technical solution of the present invention is as follows:
[0006] A line loss rate prediction method based on gradient boosting tree is proposed. The method includes the following steps:
[0007] S1, extract the historical data of the power grid system and the meteorological platform within the predetermined time, and output the historical time series feature data according to the synchronous mixing of the time series;
[0008] S2, preprocessing the historical time series feature data in order by data cleaning, outlier removal, data normalization, and data allocation, and outputting the preprocessed data;
[0009] S3, extracting statistical features within the window of preprocessed data, and sequentially performing hysteresis feature analysis, periodic feature analysis, and trend feature analysis;
[0010] S4. Input the historical time series feature data into the gradient boosting tree model for training, obtain the line loss rate prediction model and perform line loss rate prediction.
[0011] A further improvement of the present invention is that the historical data in S1 includes historical power grid operation data, historical meteorological status data, and historical line loss rate data; the historical power grid operation data includes head-end voltage data, active power data, reactive power data, state grid input data, and state grid power sales data; the historical meteorological status data includes temperature data, humidity data, and weather phenomenon data.
[0012] A further improvement of the present invention is that S2 comprises the following specific steps:
[0013] S21. Clean the historical time series feature data and delete abnormal data;
[0014] S22. Scale the historical time series feature data to the interval [0,1] by a normalization algorithm. The normalization formula is specifically: Where c is the historical time series feature data, C is the feature data transformed by the normalization algorithm, min(c) is the minimum value in the historical time series feature data set, max(c) is the maximum value in the historical time series feature data set, and the feature data set transformed by the normalization algorithm is output;
[0015] S23, the feature data set transformed by the normalization algorithm is divided into a feature set X and a line loss rate label set Y, and the training set (X) and the line loss rate label set (Y) are divided into a training set (X) and a line loss rate label set (Y) according to a ratio of 9:1. train ,Y train ) and validation set (X test ,Y test ).
[0016] A further improvement of the present invention is that the statistical features within the window of S3 include a maximum value within the window, a minimum value within the window, and a standard deviation within the window.
[0017] A further improvement of the present invention is that the specific content of the hysteresis feature analysis of the preprocessed data in S3 is: extracting a feature data set of the time series {x[1], x[2], ..., x[N]} lagged by one time point {x[0], x[1], ..., x[N-1]}.
[0018] A further improvement of the present invention is that the specific content of the periodic feature analysis of the pre-processed data in S3 is: performing Fourier transform on the pre-processed data to extract frequency domain related features, and the discrete Fourier transform formula is: Where N is the time length, x[n] is the time series, X[k] is the complex number representation in the frequency domain, k is the frequency index, and i is the imaginary unit.
[0019] A further improvement of the present invention is that the specific content of the trend analysis of the pre-processed data in S3 is: using wavelet transform to analyze the variation law of the pre-processed data on different time scales, and the wavelet transform formula is: Among them, f(t) is the time series data, a is the scale parameter, b is the time shift parameter, ψ is the wavelet function, ψ * is the complex conjugate of the wavelet function.
[0020] A further improvement of the present invention is that S4 comprises the following specific steps:
[0021] S41. Define the objective function Among them, L(θ) is the overall objective function, is the loss function of a single sample, is the regularization term, T is the number of leaf nodes in the tree, γ is the regularization coefficient of the number of leaf nodes, λ is the regularization coefficient of the sum of squares of leaf node weights, ω j is the weight of the jth leaf node;
[0022] S42. According to the gradient boosting update rule, the loss function is minimized by gradually adding trees. The prediction value of the model is the sum of the prediction values of all trees. The specific formula is as follows: in, is the predicted value after the tth iteration, f k (x i ) is the k-th tree for sample x i The predicted value of each tree is fitted by minimizing the negative gradient of the current loss function. The specific formula of the negative gradient of the loss function is as follows: Fit a new tree f t To predict the negative gradient, the specific formula is: Update the model's predictions Among them, η is the learning rate.
[0023] A further improvement of the present invention is that the step S4 further includes: using the mean absolute percentage error as a basis for judging the prediction effect, and the formula of the mean absolute percentage error is as follows: n is the number of samples, y i is the ith actual value, is the i-th predicted value.
[0024] The technical effects of the present invention are as follows:
[0025] A line loss rate prediction method based on a gradient boosting tree is constructed, which has the advantages of high prediction accuracy and fast convergence speed. It provides an efficient and reliable solution for the prediction of line loss rate, which not only solves the problem of poor real-time performance in traditional line loss management, but also brings significant improvements to the power system. The accuracy of its prediction results enables power supply companies to adjust the operation strategy of the power grid in a timely manner, optimize the allocation of power resources, and thus improve the efficiency of energy utilization. At the same time, the present invention can also provide important data support for power grid planning, helping companies to make more scientific and reasonable decisions when designing and upgrading power grids. In terms of operation management, the present invention can assist managers to monitor the operating status of the power grid in real time, promptly discover and deal with potential line loss problems, and ensure the stable operation of the power grid. In addition, the present invention also helps companies identify high-risk areas for line loss, which is conducive to companies taking targeted measures to manage, reduce line loss rates, and reduce energy losses. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0027] Figure 1 It is a flow chart of a line loss rate prediction method based on a gradient boosting tree according to the present invention;
[0028] Figure 2 The figure is a schematic diagram for comparing the predicted value and actual value of the line loss rate of a certain feeder line in a line loss rate prediction method based on a gradient boosting tree of the present invention. DETAILED DESCRIPTION
[0029] The present invention aims to propose a line loss rate prediction method based on a gradient boosting tree, which extracts historical data within a predetermined time from the power grid system and the meteorological platform, and outputs historical time series feature data according to time series synchronization mixing; performs preprocessing operations of data cleaning, outlier deletion, data normalization, and data allocation on the historical time series feature data in sequence, and outputs preprocessed data; extracts statistical features within the window of the preprocessed data, and performs hysteresis feature analysis, periodic feature analysis, and trend feature analysis in sequence; inputs the historical time series feature data into a gradient boosting tree model for training, obtains a line loss rate prediction model, and performs line loss rate prediction. It has the advantages of high prediction accuracy and fast convergence speed, and provides an efficient and reliable solution for the prediction of line loss rate, which not only solves the problem of poor real-time performance in traditional line loss management, but also brings significant improvements to the power system.
[0030] Embodiment 1:
[0031] This embodiment proposes a line loss rate prediction method based on a gradient boosting tree, such as Figure 1 As shown, the specific steps include:
[0032] S1, extract the historical data of the power grid system and the meteorological platform within the predetermined time, and output the historical time series feature data according to the synchronous mixing of the time series;
[0033] S2, preprocessing the historical time series feature data in order by data cleaning, outlier removal, data normalization, and data allocation, and outputting the preprocessed data;
[0034] S3, extracting statistical features within the window of preprocessed data, and sequentially performing hysteresis feature analysis, periodic feature analysis, and trend feature analysis;
[0035] S4. Input the historical time series feature data into the gradient boosting tree model for training, obtain the line loss rate prediction model and perform line loss rate prediction.
[0036] In this embodiment, the historical data in S1 includes historical power grid operation data, historical meteorological status data, and historical line loss rate data; the historical power grid operation data includes head-end voltage data, active power data, reactive power data, state grid input data, and state grid power sales data; the historical meteorological status data includes temperature data, humidity data, and weather phenomenon data.
[0037] In this embodiment, S2 includes the following specific steps:
[0038] S21. Clean the historical time series feature data and delete abnormal data;
[0039] S22. Scale the historical time series feature data to the interval [0,1] by a normalization algorithm. The normalization formula is specifically: Where c is the historical time series feature data, C is the feature data transformed by the normalization algorithm, min(c) is the minimum value in the historical time series feature data set, max(c) is the maximum value in the historical time series feature data set, and the feature data set transformed by the normalization algorithm is output;
[0040] S23, the feature data set transformed by the normalization algorithm is divided into a feature set X and a line loss rate label set Y, and the training set (X) and the line loss rate label set (Y) are divided into a training set (X) and a line loss rate label set (Y) according to a ratio of 9:1. train ,Y train ) and validation set (X test ,Y test ).
[0041] In this embodiment, the statistical features within the window of S3 include the maximum value within the window, the minimum value within the window, and the standard deviation within the window.
[0042] In this embodiment, the specific content of the hysteresis feature analysis of the pre-processed data in S3 is: extracting a feature data set of the time series {x[1], x[2], ..., x[N]} lagged by one time point {x[0], x[1], ..., x[N-1]}.
[0043] In this embodiment, the specific content of performing periodic feature analysis on the pre-processed data in S3 is: performing Fourier transform on the pre-processed data to extract frequency domain related features, and the discrete Fourier transform formula is: Where N is the time length, x[n] is the time series, X[k] is the complex number representation in the frequency domain, k is the frequency index, and i is the imaginary unit.
[0044] In this embodiment, the specific content of the trend analysis of the pre-processed data in S3 is: using wavelet transform to analyze the variation pattern of the pre-processed data on different time scales, and the wavelet transform formula is: Among them, f(t) is the time series data, a is the scale parameter, b is the time shift parameter, ψ is the wavelet function, ψ * is the complex conjugate of the wavelet function.
[0045] In this embodiment, S4 includes the following specific steps:
[0046] S41. Define the objective function Among them, L(θ) is the overall objective function, is the loss function of a single sample, is the regularization term, T is the number of leaf nodes in the tree, γ is the regularization coefficient of the number of leaf nodes, λ is the regularization coefficient of the sum of squares of leaf node weights, ω j is the weight of the jth leaf node;
[0047] S42. According to the gradient boosting update rule, the loss function is minimized by gradually adding trees. The prediction value of the model is the sum of the prediction values of all trees. The specific formula is as follows: in, is the predicted value after the tth iteration, f k (x i ) is the k-th tree for sample x i The predicted value of each tree is fitted by minimizing the negative gradient of the current loss function. The specific formula of the negative gradient of the loss function is as follows: Fit a new tree f t To predict the negative gradient, the specific formula is: Update the model's predictions Among them, η is the learning rate.
[0048] In this embodiment, S4 further includes: using the mean absolute percentage error as a basis for judging the prediction effect, and the formula of the mean absolute percentage error is as follows: n is the number of samples, y i is the ith actual value, is the i-th predicted value.
[0049] In this example, the experiment selected 24,174 sets of time section data from 35 feeders in a certain county from January 1, 2021 to May 30, 2024 as model samples. Among them, 10% of the data samples were randomly selected as the validation set, and the other 90% of the samples were used as the training set. The mean absolute percentage error (SMAPE) was used to evaluate the model performance, and the formula is as follows: Taking a feeder as an example, the comparison between the predicted value and the actual value of the line loss rate is as follows: Figure 2 shown.
[0050] Embodiment 2:
[0051] This embodiment provides an electronic device, including: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-mentioned line loss rate prediction method based on the gradient boosting tree by calling the computer program stored in the memory.
[0052] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) and one or more memories, wherein the memory stores at least one computer program, and the computer program is loaded and executed by the processor to implement a line loss rate prediction method based on a gradient boosting tree provided in the above method embodiment. The electronic device may also include other components for implementing the functions of the device, for example, the electronic device may also have components such as a wired or wireless network interface and an input and output interface for data input and output. This embodiment will not be described in detail here.
[0053] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), and it can also be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0054] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0055] The present invention is described with reference to flowcharts and block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process or block in the flowchart and block diagram, as well as the combination of processes and blocks in the flowchart or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts. Figure 1 Process or multiple processes and boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 Process or multiple processes and boxes Figure 1 The steps for the functions specified in one or more boxes.
[0057] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A line loss rate prediction method based on gradient boosting tree, characterized by: The specific steps include: S1, extract the historical data of the power grid system and the meteorological platform within the predetermined time, and output the historical time series feature data according to the synchronous mixing of the time series; S2, preprocessing the historical time series feature data in order by data cleaning, outlier removal, data normalization, and data allocation, and outputting the preprocessed data; S3, extracting statistical features within the window of preprocessed data, and sequentially performing hysteresis feature analysis, periodic feature analysis, and trend feature analysis; S4. Input the historical time series feature data into the gradient boosting tree model for training, obtain the line loss rate prediction model and perform line loss rate prediction.
2. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The historical data in S1 includes historical power grid operation data, historical meteorological status data, and historical line loss rate data; the historical power grid operation data includes head-end voltage data, active power data, reactive power data, state grid input data, and state grid power sales data; the historical meteorological status data includes temperature data, humidity data, and weather phenomenon data.
3. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The S2 comprises the following specific steps: S21. Clean the historical time series feature data and delete abnormal data; S22. Scale the historical time series feature data to the interval [0,1] by a normalization algorithm. The normalization formula is specifically: Where c is the historical time series feature data, C is the feature data transformed by the normalization algorithm, min(c) is the minimum value in the historical time series feature data set, max(c) is the maximum value in the historical time series feature data set, and the feature data set transformed by the normalization algorithm is output; S23, the feature data set transformed by the normalization algorithm is divided into a feature set X and a line loss rate label set Y, and the training set (X) and the line loss rate label set (Y) are divided into a training set (X) and a line loss rate label set (Y) according to a ratio of 9:
1. train ,Y train ) and validation set (X test ,Y test ).
4. The line loss rate prediction method based on gradient boosting tree according to claim 2 is characterized in that: The statistical features within the window of S3 include the maximum value within the window, the minimum value within the window, and the standard deviation within the window.
5. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The specific content of the hysteresis feature analysis of the pre-processed data in S3 is: extracting the feature data set of the time series {x[1], x[2], ..., x[N]} lagged by one time point {x[0], x[1], ..., x[N-1]}.
6. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The specific content of performing periodic feature analysis on the pre-processed data in S3 is: performing Fourier transform on the pre-processed data to extract frequency domain related features. The discrete Fourier transform formula is: Where N is the time length, x[n] is the time series, X[k] is the complex number representation in the frequency domain, k is the frequency index, and i is the imaginary unit.
7. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The specific content of the trend analysis of the pre-processed data in S3 is: using wavelet transform to analyze the variation law of the pre-processed data on different time scales. The wavelet transform formula is: Among them, f(t) is the time series data, a is the scale parameter, b is the time shift parameter, ψ is the wavelet function, ψ * is the complex conjugate of the wavelet function.
8. The line loss rate prediction method based on gradient boosting tree according to claim 1, characterized in that: The S4 comprises the following specific steps: S41. Define the objective function Among them, L(θ) is the overall objective function, is the loss function of a single sample, is the regularization term, T is the number of leaf nodes in the tree, γ is the regularization coefficient of the number of leaf nodes, λ is the regularization coefficient of the sum of squares of leaf node weights, ω j is the weight of the jth leaf node; S42. According to the gradient boosting update rule, the loss function is minimized by gradually adding trees. The prediction value of the model is the sum of the prediction values of all trees. The specific formula is as follows: in, is the predicted value after the tth iteration, f k (x i ) is the k-th tree for sample x i The predicted value of each tree is fitted by minimizing the negative gradient of the current loss function. The specific formula of the negative gradient of the loss function is as follows: Fit a new tree f t To predict the negative gradient, the specific formula is: Update the model's predictions Among them, η is the learning rate.
9. The line loss rate prediction method based on gradient boosting tree according to claim 8, characterized in that: The step S4 further includes: using the mean absolute percentage error as a basis for judging the prediction effect, and the formula of the mean absolute percentage error is as follows: n is the number of samples, y i is the ith actual value, is the i-th predicted value.
Citation Information
Cited By
Partial pressure line loss rate prediction method and system based on random forest
CN121146126A
Line loss analysis monitoring method and system based on big data
CN121744136A
