A voltage sag classification method based on ensemble classifier

Through the voltage drop classification method based on an integrated classifier, the problem of low accuracy of voltage drop classification in the prior art is solved, especially in the case of uneven sample size, and the stability and accuracy of classification are improved.

CN115238767BActive Publication Date: 2025-06-06GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210688031.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2025-06-06
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

The existing voltage drop classification method has low accuracy and has failed to effectively solve the problem of three types of unbalanced quantity: voltage drop short circuit fault, transformer turn-off, and motor start-up, resulting in a low classification accuracy rate of the model in the measured data.

Method used

The voltage drop classification method based on the integrated classifier is adopted to construct a training sample set by obtaining the voltage drop data and the corresponding drop type labels, train it on the basic classifier, and calculate the classification accuracy and total classification accuracy of each drop type label. According to the uneven sample number, the classifier weights of the basic classifier in all classifiers are calculated, and the initial weights of the training samples are updated, and the individual classifiers are finally integrated into strong classifiers for classification processing.

Benefits of technology

It improves the stability and accuracy of voltage drop classification, effectively solving the problem of low classification accuracy caused by uneven sample number.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115238767B_ABST
    Figure CN115238767B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power grid data processing, and discloses a voltage sag classification method based on an integrated classifier. The method constructs a training sample set by acquiring voltage sag data and corresponding sag type labels, inputs the training sample set into a basic classifier for training, obtains a classification result, calculates the classification accuracy of each sag type label and the total classification accuracy, considers the imbalance of the number of voltage sag samples, calculates the classifier weight of the basic classifier in all classifiers, updates the initial weights of the training samples corresponding to the sag type labels of different sample numbers according to a preset weight update rule, assigns updated weights to the corresponding training samples, integrates the classifiers into a strong classifier according to the corresponding classifier weights, and uses the strong classifier to classify the voltage sag data, thereby improving the stability and accuracy of the classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid data processing, and in particular to a voltage sag classification method based on an integrated classifier. Background Art

[0002] Existing voltage sag classification methods generally rely on manually extracting thresholds and classifying according to the typical features of different types of voltage sags, but this type of method has low accuracy. Therefore, in the prior art, machine learning methods are used instead of manual feature extraction through algorithms such as GAN networks and neural networks. However, this type of method does not take into account the imbalance between the number of short-circuit faults, transformer switching, and motor start-ups of voltage sags. Short-circuit faults account for a larger proportion in the power grid, while transformer switching and motor start-ups account for fewer. Conventional training methods cannot enhance the features of sag types with a small number of samples, resulting in a low classification accuracy of the model in measured data. Summary of the invention

[0003] The present invention provides a voltage sag classification method based on an integrated classifier, which solves the technical problem of low accuracy in voltage sag classification.

[0004] In view of this, a first aspect of the present invention provides a voltage sag classification method based on an integrated classifier, comprising the following steps:

[0005] S1. Acquire voltage sag data and corresponding sag type labels, construct a training sample set with the voltage sag data and the corresponding sag type labels, and assign an initial weight to each training sample in the training sample set;

[0006] S2, inputting the training sample set into the basic classifier for training, obtaining the classification result, and calculating the classification accuracy of each temporary drop type label and the total classification accuracy;

[0007] S3, obtaining the number of samples under different temporary drop type labels to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy, and calculating the classifier weight of the basic classifier in all classifiers;

[0008] S4, obtaining the number of samples corresponding to the temporary drop type label, updating the initial weights of the training samples corresponding to the temporary drop type labels with different sample numbers according to the preset weight update rule, obtaining the updated weight corresponding to each training sample, and assigning the updated weight to the corresponding training sample;

[0009] S5, repeat steps S2 to S5 until all classifiers are iteratively updated, and integrate each classifier into a strong classifier according to the corresponding classifier weights;

[0010] S6. Input the voltage sag data into the strong classifier for classification processing to obtain a corresponding voltage sag type label.

[0011] Preferably, step S1 specifically includes:

[0012] The voltage sag data is obtained, and the effective value of the voltage sag data is calculated by the following formula 1:

[0013]

[0014] In formula 1, U(K) represents the effective value of voltage, K represents the total sequence number of sampling points, k represents the counting sign of sampling points, and N T is the number of sampling points per cycle, v represents the sampling speed;

[0015] The effective value is constructed into an effective value sample set through the following matrix:

[0016] S={s 1 (U 1 (1),U 1 (2),...,U 1 (n)),...,s N (U N (1),U N (2),...U N (m))} Formula 2

[0017] In formula 2, S represents the effective value sample set, s 1 ,…,s N Respectively represent the 1st, ..., Nth voltage sag, U 1 (1),U 1 (2),...,U 1 (n) represents the effective value of each sampling point corresponding to the first voltage sag, U N (1),U N (2),...,U N (m) represents the effective value of each sampling point corresponding to the Nth voltage sag;

[0018] Obtaining a voltage sag type corresponding to the voltage sag data, recorded as a voltage sag type label, wherein the voltage sag type label includes a short circuit fault type, a transformer switching type, and an induction motor starting type;

[0019] The voltage sag data and the corresponding sag type labels are used to construct a training sample set, and an initial weight of ω is assigned to each training sample in the training sample set. 1,1 =ω 1,2 =... =ω 1,N =1 / N.

[0020] Preferably, step S2 specifically includes:

[0021] The training sample set is input into the basic classifier for training, and the temporary drop type label is output. The classification accuracy of each temporary drop type label and the total classification accuracy are calculated by the following formula:

[0022]

[0023] In formula 3, y 1 Represents the total classification accuracy, P 1 , P 2 , P 3 are the classification accuracy corresponding to the three types of temporary drop type labels, ω 1,j ,ω 1,m ,ω 1,n They are the weight proportions corresponding to the three types of temporary drop labels, N 1 、N 2 、N 3 are the number of samples corresponding to the three types of temporary drop type labels, N is the total number of samples, P is i , P j , P m , P n Both are correct classification binary values. If the temporary drop type label of the sample in the classification result is consistent with the preset label, the correct classification binary value is 1, otherwise the correct classification binary value is 0.

[0024] Preferably, step S3 specifically includes:

[0025] The number of samples under different temporary drop type labels is obtained to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy. The classifier weight of the basic classifier in all classifiers is calculated by the following formula 4:

[0026]

[0027] In formula 4, α 1 represents the classifier weight of the basic classifier in all classifiers, min(N 1 ,N 2 ,N 3 ) represents the number of samples of the temporary drop type label with the minimum number of samples, P j / m / n Indicates the classification accuracy corresponding to the temporary drop type label with the minimum number of samples, (j~N 1 ,m~N 2 ,n~N 3 ) represents the corresponding relationship between the number of samples and the classification accuracy.

[0028] Preferably, step S4 specifically includes:

[0029] The basic weight is calculated by the following formula 5:

[0030]

[0031] In formula 5, ω 2,i represents the basic weight, ω 1,i represents the initial weight, li represents the label of the ith voltage sag data, G 1 (s i ) represents the classification result of the basic classifier for the i-th sample;

[0032] The number of samples corresponding to the temporary drop type label is obtained, and the initial weights of the training samples corresponding to the temporary drop type labels with different sample numbers are updated through the following formulas 6 to 8 to obtain the updated weight corresponding to each training sample:

[0033] The updated weight of the training sample with the temporary drop type label with the largest number of samples is calculated by the following formula 6:

[0034]

[0035] The updated weight of the training sample with the temporary drop type label with the least number of samples is calculated by the following formula 7:

[0036] ω 2-min,i '=2×ω 2,i (i∈min(N 1 ,N 2 ,N 3 )) Formula 7

[0037] The update weights of the training samples with the temporary drop type label with a medium number of samples are calculated by the following formula 8:

[0038] ω 2-mid,i '=ω 2,i (i∈mid(N 1 ,N 2 ,N 3 )) Formula 8

[0039] Assign corresponding update weights to corresponding training samples.

[0040] Preferably, the step of integrating the classifiers into a strong classifier according to the corresponding classifier weights specifically includes:

[0041] The following formula 9 is used to integrate each classifier according to the corresponding classifier weight to form a strong classifier:

[0042] H(s)=sign|∑α m G m (s)|(m=1,2,...,M) Formula 9

[0043] In Formula 9, H(s) represents a strong classifier, sign is a sign function, and α m represents the classifier weight of the mth classifier, G m (s) represents the m-th classifier.

[0044] It can be seen from the above technical solutions that the present invention has the following advantages:

[0045] The present invention constructs a training sample set by acquiring voltage sag data and corresponding sag type labels, inputs the training sample set into a basic classifier for training, obtains classification results, calculates the classification accuracy of each sag type label and the total classification accuracy, considers the imbalance in the number of voltage sag samples, calculates the classifier weights of the basic classifier in all classifiers, updates the initial weights of the training samples corresponding to sag type labels with different sample numbers according to a preset weight update rule, assigns updated weights to corresponding training samples, integrates each classifier into a strong classifier according to the corresponding classifier weights, and uses the strong classifier to classify the voltage sag data, thereby improving the stability and accuracy of the classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a voltage sag classification method based on an integrated classifier provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.

[0048] For easier understanding, see Figure 1 The present invention provides a voltage sag classification method based on an integrated classifier, comprising the following steps:

[0049] S1. Obtain voltage sag data and corresponding sag type labels, construct a training sample set with the voltage sag data and the corresponding sag type labels, and assign an initial weight to each training sample in the training sample set;

[0050] Among them, each sample has the same weight during the initial training.

[0051] S2. Input the training sample set into the basic classifier for training, obtain the classification result, and calculate the classification accuracy of each temporary drop type label and the total classification accuracy;

[0052] The basic classifier in this embodiment adopts a decision tree classifier.

[0053] S3, obtaining the number of samples under different temporary drop type labels to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy, and calculating the classifier weight of the basic classifier in all classifiers;

[0054] It can be understood that, since the number of voltage sag samples is unbalanced, the classifier weights that take the voltage sag samples into consideration are unbalanced.

[0055] S4, obtaining the number of samples corresponding to the temporary drop type label, updating the initial weights of the training samples corresponding to the temporary drop type labels with different sample numbers according to the preset weight update rule, obtaining the updated weight corresponding to each training sample, and assigning the updated weight to the corresponding training sample;

[0056] S5, repeat steps S2 to S5 until all classifiers are iteratively updated, and integrate each classifier into a strong classifier according to the corresponding classifier weights;

[0057] S6. Input the voltage sag data into a strong classifier for classification processing to obtain a corresponding sag type label.

[0058] It should be noted that the present embodiment provides a voltage sag classification method based on an integrated classifier, which obtains voltage sag data and corresponding sag type labels to construct a training sample set, inputs the training sample set into a basic classifier for training, obtains classification results, calculates the classification accuracy of each sag type label and the total classification accuracy, considers the imbalance in the number of voltage sag samples, calculates the classifier weights of the basic classifier in all classifiers, and updates the initial weights of the training samples corresponding to sag type labels with different sample numbers according to a preset weight update rule, assigns updated weights to the corresponding training samples, integrates each classifier into a strong classifier according to the corresponding classifier weights, and uses the strong classifier to classify the voltage sag data, thereby improving the stability and accuracy of the classification.

[0059] In a specific embodiment, step S1 specifically includes:

[0060] S101, obtaining voltage sag data, and calculating the effective value of the voltage sag data by the following formula 1:

[0061]

[0062] In formula 1, U(K) represents the effective value of voltage, K represents the total sequence number of sampling points, k represents the counting sign of sampling points, and N T is the number of sampling points per cycle, v represents the sampling speed;

[0063] Among them, the voltage sag data recorded by the power quality monitoring platform is the instantaneous value of the voltage, so Formula 1 is needed to convert the instantaneous value of the voltage into an effective value.

[0064] S102, constructing the effective value sample set by the following matrix:

[0065] S={s 1 (U 1 (1),U 1 (2),...,U 1 (n)),...,s N (U N (1),U N (2),...U N (m))} Formula 2

[0066] In formula 2, S represents the effective value sample set, s 1 ,…,s N Respectively represent the 1st, ..., Nth voltage sag, U 1 (1),U 1 (2),...,U 1 (n) represents the effective value of each sampling point corresponding to the first voltage sag, U N (1),U N (2),...,U N (m) represents the effective value of each sampling point corresponding to the Nth voltage sag;

[0067] S103, obtaining a voltage sag type corresponding to the voltage sag data, and recording it as a voltage sag type label, where the voltage sag type label includes a short circuit fault type, a transformer switching type, and an induction motor starting type;

[0068] The sag type is preset and has a mapping relationship with the voltage sag data.

[0069] S104: construct a training sample set using the voltage sag data and the corresponding sag type labels, and assign an initial weight of ω to each training sample in the training sample set. 1,1 =ω 1,2 =... =ω 1,N =1 / N.

[0070] In a specific embodiment, step S2 specifically includes:

[0071] S201, input the training sample set into the basic classifier for training, output the temporary drop type label, and calculate the classification accuracy of each temporary drop type label and the total classification accuracy by the following formula:

[0072]

[0073] In formula 3, y 1 Represents the total classification accuracy, P 1 , P 2 , P 3 are the classification accuracy corresponding to the three types of temporary drop type labels, ω 1,j ,ω 1,m ,ω 1,n They are the weight proportions corresponding to the three types of temporary drop labels, N 1 、N 2 、N 3 are the number of samples corresponding to the three types of temporary drop type labels, N is the total number of samples, P is i , P j , P m , P n Both are correct classification binary values. If the temporary drop type label of the sample in the classification result is consistent with the preset label, the correct classification binary value is 1, otherwise the correct classification binary value is 0.

[0074] It should be noted that this embodiment takes into account the imbalance in the number of samples of different voltage sag types, and calculates the classification accuracy of each voltage sag type label and the total classification accuracy.

[0075] In a specific embodiment, step S3 specifically includes:

[0076] S301, obtaining the number of samples under different temporary drop type labels to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy, and calculating the classifier weight of the basic classifier in all classifiers by the following formula 4:

[0077]

[0078] In formula 4, α 1 represents the classifier weight of the basic classifier in all classifiers, min(N 1 ,N 2 ,N 3 ) represents the number of samples of the temporary drop type label with the minimum number of samples, P j / m / n Indicates the classification accuracy corresponding to the temporary drop type label with the minimum number of samples, (j~N 1 ,m~N 2 ,n~N 3 ) represents the corresponding relationship between the number of samples and the classification accuracy.

[0079] In a specific embodiment, step S4 specifically includes:

[0080] S401, calculate the basic weight by the following formula 5:

[0081]

[0082] In formula 5, ω 2,i represents the basic weight, ω 1,i represents the initial weight, li represents the label of the ith voltage sag data, G 1 (s i ) represents the classification result of the basic classifier for the i-th sample;

[0083] S402, obtaining the number of samples corresponding to the temporary drop type label, and updating the initial weights of the training samples corresponding to the temporary drop type labels of different sample numbers by the following formulas 6 to 8 to obtain the updated weight corresponding to each training sample:

[0084] The updated weight of the training sample with the temporary drop type label with the largest number of samples is calculated by the following formula 6:

[0085]

[0086] The updated weight of the training sample with the temporary drop type label with the least number of samples is calculated by the following formula 7:

[0087] ω 2-min,i '=2×ω 2,i (i∈min(N 1 ,N 2 ,N 3 )) Formula 7

[0088] The update weights of the training samples with the temporary drop type label with a medium number of samples are calculated by the following formula 8:

[0089] ω 2-mid,i '=ω 2,i (i∈mid(N 1 ,N 2 ,N 3 )) Formula 8

[0090] S403: assign corresponding update weights to corresponding training samples.

[0091] It can be understood that the update weights of the sag type labels with different numbers of samples can be obtained through the above calculation, and the classification accuracy of the classifier is improved by taking into account the imbalance of the voltage sag samples.

[0092] In a specific embodiment, the step of integrating each classifier into a strong classifier according to the corresponding classifier weights specifically includes:

[0093] The following formula 9 is used to integrate each classifier according to the corresponding classifier weight to form a strong classifier:

[0094] H(s)=sign|∑α m G m(s)|(m=1,2,...,M) Formula 9

[0095] In Formula 9, H(s) represents a strong classifier, sign is a sign function, and α m represents the classifier weight of the mth classifier, G m (s) represents the m-th classifier.

[0096] 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.

[0097] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0099] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0100] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A voltage sag classification method based on integrated classifier, It is characterized in that The following steps are involved: S1. Acquire voltage sag data and corresponding sag type labels, construct a training sample set with the voltage sag data and the corresponding sag type labels, and assign an initial weight to each training sample in the training sample set; S2. Input the training sample set into the basic classifier for training to obtain classification results, and calculate the classification accuracy of each temporary drop type label and the total classification accuracy, including: The training sample set is input into the basic classifier for training, and the temporary drop type label is output. The classification accuracy of each temporary drop type label and the total classification accuracy are calculated by the following formula: ; In formula 3, represents the total classification accuracy, , , They are the classification accuracy rates corresponding to the three types of temporary drop type labels, represents the initial weight, , , They are the weight proportions corresponding to the three types of temporary drop type labels, , , are the number of samples corresponding to the three types of temporary drop type labels, N is the total number of samples, , , , All are classified correctly binary values. If the temporary drop type label of the sample in the classification result is consistent with the preset label, the classification correct binary value is 1, otherwise the classification correct binary value is 0; S3, obtaining the number of samples under different temporary drop type labels to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy, and calculating the classifier weight of the basic classifier in all classifiers; S4, obtaining the number of samples corresponding to the temporary drop type label, updating the initial weights of the training samples corresponding to the temporary drop type labels with different sample numbers according to the preset weight update rule, obtaining the updated weight corresponding to each training sample, and assigning the updated weight to the corresponding training sample; S5, repeat steps S2 to S5 until all classifiers are iteratively updated, and integrate each classifier into a strong classifier according to the corresponding classifier weights; S6. Input the voltage sag data into the strong classifier for classification processing to obtain a corresponding voltage sag type label.

2. The voltage sag classification method based on integrated classifier according to claim 1, It is characterized in that Step S1 specifically includes: The voltage sag data is obtained, and the effective value of the voltage sag data is calculated by the following formula 1: ; In formula 1, represents the effective value of voltage, K represents the total serial number of the sampling point, k represents the counting symbol of the sampling point, is the number of sampling points per cycle, v represents the sampling speed; The effective value is constructed into an effective value sample set through the following matrix: ; In Formula 2, S represents the effective value sample set, s 1 ,…,s N Respectively represent the 1st, ..., Nth voltage sag, U 1 (1),U 1 (2),...,U 1 (n) represents the effective value of each sampling point corresponding to the first voltage sag, U N (1),U N (2),...,U N (m) represents the effective value of each sampling point corresponding to the Nth voltage sag; Obtaining a voltage sag type corresponding to the voltage sag data, recorded as a voltage sag type label, wherein the voltage sag type label includes a short circuit fault type, a transformer switching type, and an induction motor starting type; The voltage sag data and the corresponding sag type labels are used to construct a training sample set, and an initial weight is assigned to each training sample in the training sample set: .

3. The voltage sag classification method based on integrated classifier according to claim 1, It is characterized in that Step S3 specifically includes: The number of samples under different temporary drop type labels is obtained to determine the temporary drop type label with the minimum number of samples and the corresponding classification accuracy. The classifier weight of the basic classifier in all classifiers is calculated by the following formula 4: ; In formula 4, represents the classifier weight of the basic classifier in all classifiers, That is, the number of samples of the temporary drop type label representing the minimum number of samples, Indicates the classification accuracy corresponding to the temporary drop type label with the minimum number of samples, It represents the corresponding relationship between the number of samples and the classification accuracy.

4. The voltage sag classification method based on integrated classifier according to claim 3, It is characterized in that Step S4 specifically includes: The basic weight is calculated by the following formula 5: ; In formula 5, represents the basic weight, l i Indicates the label of the i-th voltage sag data, Represents the classification result of the basic classifier for the i-th sample; Get the number of samples corresponding to the temporary drop type label, and update the initial weights of the training samples corresponding to the temporary drop type labels with different sample numbers through the following formulas 6 to 8 to obtain the updated weight corresponding to each training sample: The update weight of the training sample with the temporary drop type label with the largest number of samples is calculated by the following formula 6: ; The updated weight of the training sample with the temporary drop type label with the least number of samples is calculated by the following formula 7: ; The update weights of the training samples with the temporary drop type label with a medium number of samples are calculated by the following formula 8: ; Assign corresponding update weights to corresponding training samples.

5. The voltage sag classification method based on integrated classifier according to claim 4, It is characterized in that The step of integrating each classifier into a strong classifier according to the corresponding classifier weights specifically includes: The following formula 9 is used to integrate each classifier according to the corresponding classifier weight to form a strong classifier: ; In formula 9, H(s) represents a strong classifier, sign is a symbolic function, represents the classifier weight of the mth classifier, G m (s) represents the m-th classifier.

Citation Information

Patent Citations

  • Voltage sag reason recognition method based on EM algorithm and gradient boosting tree

    CN107979086A

  • Intelligent identification method for voltage sag

    CN109787219A