An electronic voltage transformer error prediction method and system based on XGBoost model

Through the error prediction method based on the XGBoost model, combined with electrical, product and environmental characteristic data, the model is dynamically adjusted to adapt to changes in operating conditions, and the problem that traditional methods cannot reflect the dynamic error changes in equipment in real time is solved, achieving efficient and real-time error prediction.

CN119884957BActive Publication Date: 2025-05-16国网福建省电力有限公司营销服务中心 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510351973.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-05-16
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The traditional electronic voltage transformer error prediction method cannot reflect the dynamic error changes of the equipment in complex operating environments in real time, resulting in insufficient error prediction accuracy.

Method used

The error prediction method based on the XGBoost model is adopted, and the error prediction data is calculated by collecting electrical characteristics, product characteristics and environmental characteristics data, and the XGBoost model is lightweighted and the model is dynamically adjusted to adapt to changes in operating conditions.

Benefits of technology

It significantly reduces the computational complexity, improves the training and inference efficiency of the model, can quickly respond to dynamic changes in the power system, meets application scenarios with high real-time requirements, and improves the accuracy and stability of error prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884957B_ABST
    Figure CN119884957B_ABST
Patent Text Reader

Abstract

The present invention relates to an electronic voltage transformer error prediction method and system based on an XGBoost model, and belongs to the technical field of voltage electronic voltage transformer error prediction. The method comprises the following steps: collecting electrical characteristics, product characteristics and environmental characteristics data of the electronic voltage transformer, and calculating the voltage ratio difference data at a preset time interval. The characteristic data and the ratio difference data are divided into a training set and a test set, and the XGBoost model is trained using the training set. The feature performance score of each feature in each tree of the XGBoost model is calculated in sequence, and the first K features with larger scores for each tree are recorded, and a lightweight XGBoost model is constructed according to the above features. The test set is input into the lightweight XGBoost model, and the weight factor used in calculating the feature performance score is dynamically adjusted according to the prediction result of the test set. The present invention significantly reduces the computational complexity of the model through feature screening, improves the training and reasoning efficiency, and maintains a high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an electronic voltage transformer error prediction method and system based on an XGBoost model, belonging to the technical field of voltage electronic voltage transformer error prediction. Background Art

[0002] As an advanced power system measurement device, Electronic Voltage Transformer (EVT) is widely used in smart substations to measure high voltage signals and convert them into low voltage signals for use by protection devices, metering equipment and monitoring systems. With the rapid development of smart grids, higher requirements are placed on the accuracy and reliability of electronic voltage transformers. However, due to its complex working environment and changing operating conditions, electronic voltage transformers may have errors in actual operation. These errors may be caused by various factors such as electrical characteristics (such as current, voltage, and grid frequency), product characteristics (such as laboratory basic errors and commissioning time), and environmental characteristics (such as temperature, humidity, magnetic field, and vibration).

[0003] Traditional error prediction methods are usually based on static calibration data under laboratory conditions, which cannot reflect the dynamic error changes of electronic voltage transformers in the actual operating environment in real time. For example, laboratory calibration cannot consider the impact of factors such as temperature changes, humidity changes, and electromagnetic interference in the operating environment on the error. When electronic voltage transformers are operating in smart substations, they will be affected by a variety of environmental factors, such as ambient temperature, humidity, space magnetic field, and operating environment vibration. Traditional methods are difficult to fully consider the comprehensive impact of these complex environmental factors on the error, resulting in insufficient error prediction accuracy.

[0004] The patent document with publication number "CN113297797A" discloses a method and device for evaluating the measurement error state of an electronic transformer based on XGBoost. This method uses the XGBoost model to evaluate the measurement error state of an electronic voltage transformer. Although XGBoost has high prediction accuracy, it may have problems such as high computational complexity, long model training and inference time in practical applications. Especially in power system scenarios with high real-time requirements, error evaluation mainly relies on static ratio difference and angle difference data, which are usually based on measurement results under laboratory conditions or fixed working conditions. Although environmental characteristic data has been introduced, it is not clear how to dynamically adjust the model to adapt to changes in operating conditions. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention proposes an electronic voltage transformer error prediction method and system based on the XGBoost model.

[0006] The technical solution of the present invention is as follows:

[0007] On the one hand, the present invention provides an electronic voltage transformer error prediction method based on an XGBoost model, comprising the following steps:

[0008] Collecting electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency;

[0009] Calculating the voltage difference data of the electronic voltage transformer at a preset time interval;

[0010] The electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data are divided into training set and test set, and the training set is used to train the gradient boosting decision tree model XGBoost;

[0011] By calculating the feature performance score of the electrical feature data, product feature data or environmental feature data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical feature data, product feature data or environmental feature data corresponding to the first K feature performance scores according to a preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost;

[0012] The test set is input into the lightweight gradient boosting decision tree model XGBoost, and the weight factor of the feature performance score is adjusted according to the prediction results of the test set;

[0013] The lightweight gradient boosting decision tree model XGBoost is used to predict the error of electronic voltage transformer.

[0014] As a preferred implementation, the product characteristic data include laboratory basic error and commissioning time, and the environmental characteristic data include ambient temperature, ambient humidity, magnetic field in the smart substation space, and vibration of the electronic voltage transformer operating environment.

[0015] As a preferred embodiment, the calculation method of the ratio difference data is:

[0016] ;

[0017] in, Indicates the ratio difference data at any time in the preset time interval, Indicates the rated transformation ratio of the electronic voltage transformer. Indicates the measured true value of the secondary voltage of the electronic voltage transformer at that moment. Indicates the primary side voltage value of the electronic voltage transformer at that moment.

[0018] As a preferred implementation, the training steps of the gradient boosting decision tree model XGBoost are:

[0019] S1. Let the feature data in the training set be X, and the difference data be ;

[0020] S2, feature data X and difference data Input the first decision tree of the gradient boosting decision tree model XGBoost to get the first difference prediction result ;

[0021] S3, feature data X and difference data And the first difference prediction result The residual is input into the second decision tree of the gradient boosting decision tree model XGBoost to obtain the second difference prediction result ;

[0022] S4, the first ratio difference prediction result To the T-1th difference prediction result The sum is used as the sub-prediction result, and the feature data X and the difference data The residual of the sum prediction result is input into the Tth decision tree of the gradient boosting decision tree model XGBoost to obtain the Tth difference prediction result , specifically expressed as:

[0023] ;

[0024] in, represents the Tth decision tree, Represents the sub-prediction result;

[0025] S5. If T is less than the preset maximum execution number, execute step S4, otherwise execute step S6;

[0026] S6, the first ratio difference prediction result To the Tth ratio difference prediction result Splicing as the final prediction result ;

[0027] The objective function of the gradient boosting decision tree model XGBoost is expressed as:

[0028] ;

[0029] in, represents the mean square error function, represents the number of samples in the training set, represents the i-th difference data, represents the i-th difference prediction result, Represents the objective function.

[0030] As a preferred implementation, the method for calculating the feature performance score is:

[0031] ;

[0032] in, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The feature performance score of the t-th decision tree is: Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The number of splits at each level in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the gain values ​​of each layer in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the number of data involved in each layer of the t-th decision tree when it is used for splitting, Represents the depth weighted feature splitting times index, represents the depth weighted feature gain index, represents the depth-weighted feature coverage metric, represents the tth decision tree The weight of the layer, , , represents the weight factor;

[0033] ;

[0034] in, Represents the depth of the t-th decision tree.

[0035] As a preferred implementation, the weight factor is obtained by the following method:

[0036] ;

[0037] in, represents the parameter value that minimizes the function value. Represents the objective function of the lightweight gradient boosting decision tree model XGBoost, Represents the weight factor value function.

[0038] As a preferred implementation, the objective function of the lightweight gradient boosting decision tree model XGBoost should take into account the complexity of the tree during training, that is, the objective function of the lightweight gradient boosting decision tree model XGBoost is expressed as:

[0039] ;

[0040] in, represents the i-th prediction result of the lightweight gradient boosting decision tree model XGBoost, Represents the complexity of the t-th decision tree.

[0041] On the other hand, the present invention also provides an electronic voltage transformer error prediction system based on an XGBoost model, comprising:

[0042] Data acquisition module: collects electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency;

[0043] Data preparation module: calculates the voltage difference data of the electronic voltage transformer at a preset time interval;

[0044] Model training module: divide the electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data into training set and test set, and use the training set to train the gradient boosting decision tree model XGBoost;

[0045] Model lightweight module: by calculating the characteristic performance score of the electrical characteristic data, product characteristic data or environmental characteristic data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical characteristic data, product characteristic data or environmental characteristic data corresponding to the first K characteristic performance scores according to the preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost;

[0046] Model testing module: input the test set into the lightweight gradient boosting decision tree model XGBoost, and adjust the weight factor of the feature performance score according to the prediction results of the test set;

[0047] Error prediction module: Use the lightweight gradient boosting decision tree model XGBoost to predict the error of the electronic voltage transformer.

[0048] The present invention has the following beneficial effects:

[0049] The present invention realizes the lightweighting of the XGBoost model by calculating the feature performance score and retaining important features. The lightweight model significantly reduces the computational complexity while maintaining a high prediction accuracy, and improves the training and reasoning efficiency of the model. The lightweight model can quickly respond to dynamic changes in the power system and meet application scenarios with high real-time requirements, such as real-time monitoring and error prediction in smart substations. By calculating the difference data of electrical characteristic data within a preset time interval, the error changes of the electronic voltage transformer in actual operation can be reflected in real time. This dynamic prediction mechanism enables the model to adapt to complex operating environments and working conditions. In the prediction process, the prediction results of the training set and the test set are compared for accuracy evaluation. If the preset accuracy threshold is exceeded, the lightweight processing is performed again. This adaptive optimization mechanism ensures the stability and accuracy of the model under different operating conditions. Not only electrical characteristics (such as current, voltage, and grid frequency) are considered, but also product characteristics (such as laboratory basic error, commissioning time) and environmental characteristics (such as temperature, humidity, magnetic field, and vibration) are combined. This comprehensive feature fusion can more accurately reflect the error state of the electronic voltage transformer. By calculating the performance score of the feature in the XGBoost model, the importance of each feature can be quantitatively evaluated, and key features can be retained based on the score. This feature optimization mechanism improves the generalization ability and prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 The present invention is a flowchart for implementing the method. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] It should be understood that the step numbers used in this article are only for the convenience of description and are not intended to limit the order in which the steps are executed.

[0053] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0054] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0055] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0056] Embodiment 1:

[0057] See also Figure 1 The present invention provides an electronic voltage transformer error prediction method based on an XGBoost model, comprising the following steps:

[0058] Collecting electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency;

[0059] Calculating the voltage difference data of the electronic voltage transformer at a preset time interval;

[0060] The electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data are divided into training set and test set (the training set and test set are divided in a ratio of 7:3, with 70% for the training set and 30% for the test set), and the training set is used to train the gradient boosting decision tree model XGBoost;

[0061] By calculating the feature performance score of the electrical feature data, product feature data or environmental feature data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical feature data, product feature data or environmental feature data corresponding to the first K feature performance scores according to a preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost, thereby achieving lightweighting of the gradient boosting decision tree model XGBoost;

[0062] In this embodiment, the value of K is 6, that is, after calculating the characteristic performance scores of the electrical characteristic data, product characteristic data or environmental characteristic data, only the Tth decision tree is retained, and the electrical characteristic data, product characteristic data or environmental characteristic data corresponding to the top 6 characteristic performance scores are ranked from high to low, and the remaining 3 electrical characteristic data, product characteristic data or environmental characteristic data are discarded in the Tth decision tree; there are a total of 9 features of the characteristic performance scores that need to be calculated for the electrical characteristic data, product characteristic data or environmental characteristic data, namely current, voltage, grid frequency, laboratory basic error, commissioning time, ambient temperature, ambient humidity, smart substation space magnetic field or electronic voltage transformer operating environment vibration.

[0063] The test set is input into the lightweight gradient boosting decision tree model XGBoost, and the weight factor of the feature performance score is adjusted according to the prediction results of the test set;

[0064] The lightweight gradient boosting decision tree model XGBoost is used to predict the error of electronic voltage transformer.

[0065] By comparing the prediction error, training time, and prediction time of the XGBoost model, the lightweight XGBoost model proposed in this patent, and the XGBoost model that takes into account the complexity of the tree, the effectiveness of the method proposed in this patent is verified. The comparison results are shown in Table 1.

[0066] Table 1 Results comparison table

[0067]

[0068] As shown in Table 1, the XGBoost model has overfitting phenomenon; the XGBoost model considering the complexity of the tree has similar training time and prediction time compared with the XGBoost model, but the prediction error on the test set is low, which is an effective prediction model; the lightweight XGBoost model proposed in this patent can achieve consistent prediction errors with the XGBoost model considering the complexity of the tree, and its training time is longer, but the prediction time can be reduced to 18s. After the lightweight XGBoost model proposed in this patent is trained, it can calculate high-precision results faster when used for actual prediction.

[0069] As a preferred implementation, the product characteristic data include laboratory basic error and commissioning time, and the environmental characteristic data include ambient temperature, ambient humidity, magnetic field in the smart substation space, and vibration of the electronic voltage transformer operating environment.

[0070] As a preferred embodiment, the calculation method of the ratio difference data is:

[0071] ;

[0072] in, Indicates the ratio difference data at any time in the preset time interval, Indicates the rated transformation ratio of the electronic voltage transformer. Indicates the measured true value of the secondary voltage of the electronic voltage transformer at that moment. Indicates the primary side voltage value of the electronic voltage transformer at that moment.

[0073] As a preferred implementation, the training steps of the gradient boosting decision tree model XGBoost are:

[0074] S1. Let the feature data in the training set be X, and the difference data be ;

[0075] S2, feature data X and difference data Input the first decision tree of the gradient boosting decision tree model XGBoost to get the first difference prediction result ;

[0076] S3, feature data X and difference data And the first difference prediction result The residual is input into the second decision tree of the gradient boosting decision tree model XGBoost to obtain the second difference prediction result ;

[0077] S4, the first ratio difference prediction result To the T-1th difference prediction result The sum is used as the sub-prediction result, and the feature data X and the difference data The residual of the sum prediction result is input into the Tth decision tree of the gradient boosting decision tree model XGBoost to obtain the Tth difference prediction result , specifically expressed as:

[0078] ;

[0079] in, represents the Tth decision tree, Represents the sub-prediction result;

[0080] S5. If T is less than the preset maximum execution number, execute step S4, otherwise execute step S6;

[0081] S6, the first ratio difference prediction result To the Tth ratio difference prediction result Splicing as the final prediction result ;

[0082] The objective function of the gradient boosting decision tree model XGBoost is expressed as:

[0083] ;

[0084] in, represents the mean square error function, represents the number of samples in the training set, represents the i-th difference data, represents the i-th difference prediction result, Represents the objective function.

[0085] The value range of m in is [1, 9], which represents current, voltage, grid frequency, laboratory basic error, commissioning time, ambient temperature, ambient humidity, magnetic field in smart substation space or vibration of electronic voltage transformer operation environment; for example, when m is 1, it represents the current in the Tth decision tree, that is, Represents the feature performance score of the current in the Tth decision tree, and so on.

[0086] As a preferred implementation, the method for calculating the feature performance score is:

[0087] ;

[0088] in, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The feature performance score of the t-th decision tree is: Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The number of splits at each level in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the gain values ​​of each layer in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the number of data involved in each layer of the t-th decision tree when it is used for splitting, Represents the depth weighted feature splitting times index, represents the depth weighted feature gain index, represents the depth-weighted feature coverage metric, represents the tth decision tree The weight of the layer, , , represents the weight factor;

[0089] ;

[0090] in, Indicates the depth of the t-th decision tree. The deeper the depth, The smaller.

[0091] As a preferred implementation, the weight factor is obtained by the following method:

[0092] ;

[0093] in, represents the parameter value that minimizes the function value. Represents the objective function of the lightweight gradient boosting decision tree model XGBoost, Represents the weight factor value function, which records the , , Under the value of , the first K features selected from each tree in XGBoost represent the features with the largest score. The lightweight XGBoost model is based on Constructed.

[0094] As a preferred implementation, the objective function of the lightweight gradient boosting decision tree model XGBoost should take into account the complexity of the tree during training, that is, the objective function of the lightweight gradient boosting decision tree model XGBoost is expressed as:

[0095] ;

[0096] in, represents the i-th prediction result of the lightweight gradient boosting decision tree model XGBoost, represents the complexity of the tth decision tree, and T represents the number of decision trees.

[0097] Embodiment 2:

[0098] The present invention also provides an electronic voltage transformer error prediction system based on the XGBoost model, comprising:

[0099] Data acquisition module: collects electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency;

[0100] Data preparation module: calculates the voltage difference data of the electronic voltage transformer at a preset time interval;

[0101] Model training module: divide the electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data into training set and test set, and use the training set to train the gradient boosting decision tree model XGBoost;

[0102] Model lightweight module: by calculating the characteristic performance score of the electrical characteristic data, product characteristic data or environmental characteristic data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical characteristic data, product characteristic data or environmental characteristic data corresponding to the first K characteristic performance scores according to the preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost, thereby realizing the lightweight of the gradient boosting decision tree model XGBoost;

[0103] Model testing module: input the test set into the lightweight gradient boosting decision tree model XGBoost, and adjust the weight factor of the feature performance score according to the prediction results of the test set;

[0104] Error prediction module: Use the lightweight gradient boosting decision tree model XGBoost to predict the error of the electronic voltage transformer.

[0105] As a preferred implementation, the product characteristic data include laboratory basic error and commissioning time, and the environmental characteristic data include ambient temperature, ambient humidity, magnetic field in the smart substation space, and vibration of the electronic voltage transformer operating environment.

[0106] As a preferred implementation, the data preparation module calculates the difference data by:

[0107] ;

[0108] in, Indicates the ratio difference data at any time in the preset time interval, Indicates the rated transformation ratio of the electronic voltage transformer. Indicates the measured true value of the secondary voltage of the electronic voltage transformer at that moment. Indicates the primary side voltage value of the electronic voltage transformer at that moment.

[0109] As a preferred implementation, the model training module, the gradient boosting decision tree model XGBoost training steps are:

[0110] S1. Let the feature data in the training set be X, and the difference data be ;

[0111] S2, feature data X and difference data Input the first decision tree of the gradient boosting decision tree model XGBoost to get the first difference prediction result ;

[0112] S3, feature data X and difference data And the first difference prediction result The residual is input into the second decision tree of the gradient boosting decision tree model XGBoost to obtain the second difference prediction result ;

[0113] S4, the first ratio difference prediction result To the T-1th difference prediction result The sum is used as the sub-prediction result, and the feature data X and the difference data The residual of the sum prediction result is input into the Tth decision tree of the gradient boosting decision tree model XGBoost to obtain the Tth difference prediction result , specifically expressed as:

[0114] ;

[0115] in, represents the Tth decision tree, Represents the sub-prediction result;

[0116] S5. If T is less than the preset maximum execution number, execute step S4, otherwise execute step S6;

[0117] S6, the first ratio difference prediction result To the Tth ratio difference prediction result Splicing as the final prediction result ;

[0118] The objective function of the gradient boosting decision tree model XGBoost is expressed as:

[0119] ;

[0120] in, represents the mean square error function, represents the number of samples in the training set, represents the i-th difference data, represents the i-th difference prediction result, Represents the objective function.

[0121] As a preferred implementation, the method for calculating the feature performance score is:

[0122] ;

[0123] in, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The feature performance score of the t-th decision tree is: Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The number of splits at each level in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the gain values ​​of each layer in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the number of data involved in each layer of the t-th decision tree when it is used for splitting, Represents the depth weighted feature splitting times index, represents the depth weighted feature gain index, represents the depth-weighted feature coverage metric, represents the tth decision tree The weight of the layer, , , represents the weight factor;

[0124] ;

[0125] in, Represents the depth of the t-th decision tree.

[0126] As a preferred implementation, the weight factor is obtained by the following method:

[0127] ;

[0128] in, represents the parameter value that minimizes the function value. Represents the objective function of the lightweight gradient boosting decision tree model XGBoost, Represents the weight factor value function.

[0129] As a preferred implementation, the objective function of the lightweight gradient boosting decision tree model XGBoost should take into account the complexity of the tree during training, that is, the objective function of the lightweight gradient boosting decision tree model XGBoost is expressed as:

[0130] ;

[0131] in, represents the i-th prediction result of the lightweight gradient boosting decision tree model XGBoost, Represents the complexity of the t-th decision tree.

[0132] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0133] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0136] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An electronic voltage transformer error prediction method based on XGBoost model, characterized in that: The following steps are involved: Collecting electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency; Calculating the voltage difference data of the electronic voltage transformer at a preset time interval; The electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data are divided into training set and test set, and the training set is used to train the gradient boosting decision tree model XGBoost; By calculating the feature performance score of the electrical feature data, product feature data or environmental feature data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical feature data, product feature data or environmental feature data corresponding to the first K feature performance scores according to a preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost; The test set is input into the lightweight gradient boosting decision tree model XGBoost, and the weight factor of the feature performance score is adjusted according to the prediction results of the test set; Use the lightweight gradient boosting decision tree model XGBoost to predict the error of electronic voltage transformer; Among them, the training steps of the gradient boosting decision tree model XGBoost are: S1. Let the feature data in the training set be X, and the difference data be ; S2, feature data X and difference data Input the first decision tree of the gradient boosting decision tree model XGBoost to get the first difference prediction result ; S3, feature data X and difference data And the first difference prediction result The residual is input into the second decision tree of the gradient boosting decision tree model XGBoost to obtain the second difference prediction result ; S4, the first ratio difference prediction result To the T-1th difference prediction result The sum is used as the sub-prediction result, and the feature data X and the difference data The residual of the sum prediction result is input into the Tth decision tree of the gradient boosting decision tree model XGBoost to obtain the Tth difference prediction result , specifically expressed as: ; in, represents the Tth decision tree, Represents the sub-prediction result; S5. If T is less than the preset maximum execution number, execute step S4, otherwise execute step S6; S6, the first ratio difference prediction result To the Tth ratio difference prediction result Splicing as the final prediction result ; The objective function of the gradient boosting decision tree model XGBoost is expressed as: ; in, represents the mean square error function, represents the number of training set samples, represents the i-th difference data, represents the i-th difference prediction result, Represents the objective function.

2. The electronic voltage transformer error prediction method based on the XGBoost model according to claim 1 is characterized in that: The product characteristic data include laboratory basic error and commissioning time, and the environmental characteristic data include ambient temperature, ambient humidity, magnetic field in the space of the smart substation, and vibration of the operating environment of the electronic voltage transformer.

3. The electronic voltage transformer error prediction method based on the XGBoost model according to claim 1 is characterized in that: The calculation method of the ratio difference data is: ; in, Indicates the ratio difference data at any time in the preset time interval, Indicates the rated transformation ratio of the electronic voltage transformer. Indicates the measured true value of the secondary voltage of the electronic voltage transformer at that moment. Indicates the primary side voltage value of the electronic voltage transformer at that moment.

4. The electronic voltage transformer error prediction method based on the XGBoost model according to claim 1 is characterized in that: The feature performance score is calculated as: ; in, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The feature performance score of the t-th decision tree is: Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The number of splits at each level in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the gain values ​​of each layer in the t-th decision tree, Indicates electrical characteristic data, product characteristic data, or environmental characteristic data The sum of the number of data involved in each layer of the t-th decision tree when it is used for splitting, Represents the depth weighted feature splitting times index, represents the depth weighted feature gain index, represents the depth-weighted feature coverage metric, represents the tth decision tree The weight of the layer, , , represents the weight factor; ; in, Represents the depth of the t-th decision tree.

5. The electronic voltage transformer error prediction method based on the XGBoost model according to claim 4 is characterized in that: The weight factor is obtained as follows: ; in, represents the parameter value that minimizes the function value. Represents the objective function of the lightweight gradient boosting decision tree model XGBoost, Represents the weight factor value function.

6. The electronic voltage transformer error prediction method based on the XGBoost model according to claim 5 is characterized in that: The objective function of the lightweight gradient boosting decision tree model XGBoost should take into account the complexity of the tree during training. That is, the objective function of the lightweight gradient boosting decision tree model XGBoost is expressed as: ; in, represents the i-th prediction result of the lightweight gradient boosting decision tree model XGBoost, Represents the complexity of the t-th decision tree.

7. An electronic voltage transformer error prediction system based on XGBoost model, characterized in that: include: Data acquisition module: collects electrical characteristic data, product characteristic data and environmental characteristic data of the electronic voltage transformer, wherein the electrical characteristic data includes current, voltage and grid frequency; Data preparation module: calculates the voltage difference data of the electronic voltage transformer at a preset time interval; Model training module: divide the electrical characteristic data, product characteristic data, environmental characteristic data and ratio difference data into training set and test set, and use the training set to train the gradient boosting decision tree model XGBoost; Model lightweight module: by calculating the characteristic performance score of the electrical characteristic data, product characteristic data or environmental characteristic data in the Tth decision tree of the gradient boosting decision tree model XGBoost, and retaining the electrical characteristic data, product characteristic data or environmental characteristic data corresponding to the first K characteristic performance scores according to the preset number K, the gradient boosting decision tree model XGBoost is retrained to obtain a lightweight gradient boosting decision tree model XGBoost; Model testing module: input the test set into the lightweight gradient boosting decision tree model XGBoost, and adjust the weight factor of the feature performance score according to the prediction results of the test set; Error prediction module: Use the lightweight gradient boosting decision tree model XGBoost to predict the error of the electronic voltage transformer; Among them, the training steps of the gradient boosting decision tree model XGBoost are: S1. Let the feature data in the training set be X, and the difference data be ; S2, feature data X and difference data Input the first decision tree of the gradient boosting decision tree model XGBoost to get the first difference prediction result ; S3, feature data X and difference data And the first difference prediction result The residual is input into the second decision tree of the gradient boosting decision tree model XGBoost to obtain the second difference prediction result ; S4, the first ratio difference prediction result To the T-1th difference prediction result The sum is used as the sub-prediction result, and the feature data X and the difference data The residual of the sum prediction result is input into the Tth decision tree of the gradient boosting decision tree model XGBoost to obtain the Tth difference prediction result , specifically expressed as: ; in, represents the Tth decision tree, Represents the sub-prediction result; S5. If T is less than the preset maximum execution number, execute step S4, otherwise execute step S6; S6, the first ratio difference prediction result To the Tth ratio difference prediction result Splicing as the final prediction result ; The objective function of the gradient boosting decision tree model XGBoost is expressed as: ; in, represents the mean square error function, represents the number of samples in the training set, represents the i-th difference data, represents the i-th difference prediction result, Represents the objective function.

8. The electronic voltage transformer error prediction system based on the XGBoost model according to claim 7, characterized in that: The product characteristic data include laboratory basic error and commissioning time, and the environmental characteristic data include ambient temperature, ambient humidity, magnetic field in the space of the smart substation, and vibration of the operating environment of the electronic voltage transformer.

9. The electronic voltage transformer error prediction system based on the XGBoost model according to claim 7, characterized in that: In the data preparation module, the calculation method of the difference data is: ; in, Indicates the ratio difference data at any time in the preset time interval, Indicates the rated transformation ratio of the electronic voltage transformer. Indicates the measured true value of the secondary voltage of the electronic voltage transformer at that moment. Indicates the primary side voltage value of the electronic voltage transformer at that moment.

Citation Information

Patent Citations

  • Electronic transformer measurement error state evaluation method and device based on XGBoost

    CN113297797A

  • Random forest-based main transformer fault diagnosis method

    CN110287980A

  • Transformer fault diagnosis method for optimizing multi-granularity cascade forest model based on particle swarm algorithm

    CN112116058A