Method for improving grounding fault detection accuracy of high-voltage electric power metering device
By performing importance screening and polynomial matrix fitting on the non-adjustable parameters of the high-voltage power metering device, and combining the genetic algorithm to adjust the operating frequency of the signal source, the problem of low ground fault detection accuracy is solved and higher detection accuracy and stability are achieved. sex.
Patent Information
- Application Number
- CN202410854932.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-29
AI Technical Summary
The ground fault detection accuracy of high-voltage power metering devices in the existing technology is low, mainly because manual adjustment of the signal source operating frequency relies on professional knowledge and experience and lacks stability, resulting in large frequency deviations and affecting detection accuracy.
By defining the frequency of the current signal as an adjustable parameter, collecting non-adjustable parameters to form a fixed parameter set, using random forests to calculate parameter importance, eliminating parameters with less impact, constructing a polynomial matrix for fitting, and combining it with genetic algorithm to automatically adjust the signal source operating frequency to minimize the current signal deviation rate and improve detection accuracy.
Through importance screening and fitting relationship formulas, the working frequency of the current signal is accurately located, which significantly improves the accuracy of ground fault detection of high-voltage power metering devices, reduces the dependence on manual adjustment and frequency deviation, and improves the stability and stability of detection. accuracy.
Smart Images

Figure CN118861920A_ABST
Abstract
Description
Technical Field
[0001] The present invention specifically relates to a method for improving the accuracy of ground fault detection of a high-voltage power metering device, and belongs to the technical field of testing ground faults for electrical equipment (G01R31 / 52). Background Art
[0002] One way to perform fault diagnosis on a high-voltage power metering device is to use a current signal source for detection, that is, to apply a high-frequency current signal between the current incoming line loop and the current outgoing line loop of the high-voltage power metering device, and to determine whether a ground fault has occurred in the high-voltage power metering device by monitoring and analyzing the frequency of the high-frequency current signal. In the process of using a high-frequency current signal to perform ground fault detection on a high-voltage power metering device, factors such as the operating frequency of the current signal source, the magnitude of the line impedance failure of the high-voltage power metering device, and on-site shielding noise interference will affect the accuracy of ground fault detection, but among the above parameters, only the operating frequency of the current signal source is an adjustable parameter, and other factors such as the magnitude of the line impedance failure of the high-voltage power metering device and the on-site shielding noise interference are determined by the high-voltage power metering device and the on-site environment and are non-adjustable parameters.
[0003] Adjust the working frequency of the current signal source. At this time, under the influence of the above-mentioned unadjustable parameters, the signal deviation value of the current signal in the loop of the high-voltage power metering device will also change accordingly. When the working frequency of the current signal source is adjusted to minimize the signal deviation value of the current signal in the loop of the high-voltage power metering device, the accuracy of ground fault detection using the working frequency of the current signal source is the highest. Therefore, in the prior art, most of the working frequency of the signal source is manually adjusted by the change of the signal deviation value between the current incoming line loop and the outgoing line loop, and finally the working frequency of the signal source with the minimum deviation value is obtained, and the working frequency of the signal source is used to detect the ground fault of the high-voltage power metering device. However, the manual adjustment of the working frequency of the signal source is too dependent on professional knowledge and experience, and the stability is not enough, which sometimes leads to a large deviation between the working frequency of the ground fault detection signal source and the required working frequency, thereby making the ground fault detection accuracy of the high-voltage power metering device low. Summary of the invention
[0004] The technical problem to be solved by the present invention is: how to accurately determine the appropriate operating frequency of a ground fault detection signal source, thereby improving the ground fault detection accuracy of a high-voltage power metering device.
[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is: a method for improving the accuracy of ground fault detection of a high-voltage power metering device, comprising the following steps:
[0006] Step 1: Define the frequency of the current signal input to the high-voltage power metering device as an adjustable parameter f; define the non-adjustable parameter that affects the signal deviation rate of the current signal as a fixed parameter, and collect all the fixed parameters to form a fixed parameter set O, as shown in the following formula (1):
[0007] O={o1, o2, ..., o d} (1)
[0008] In formula (1), o1 is the first fixed parameter collected; o2 is the second fixed parameter collected; o d is the dth fixed parameter collected; d is a natural number greater than 2;
[0009] Randomly generate a data value of an adjustable parameter f as the first adjustable parameter data f 1 and a set of fixed parameter set O data sequences as the first fixed parameter data sequence O 1 ; Set the frequency to the first adjustable parameter data f 1 The current signal input is in accordance with the first fixed parameter data sequence O 1 In the high-voltage power metering device model set with fixed parameter data in , the frequency is obtained as the first adjustable parameter data f 1 The current signal in the first fixed parameter data sequence O 1 The first current signal deviation rate y under the influence of fixed parameter data in 1 , the f 1 , O 1 and 1 Collected to form a first current signal detection data sequence C1, said C1 is shown in the following formula (2):
[0010]
[0011] In formula (2) arrive They are respectively the data value randomly generated by the first fixed parameter to the data value randomly generated by the dth fixed parameter in O;
[0012] Repeat the above steps to obtain the second current signal detection data sequence C2 to the nth current signal detection data sequence C n ; Connect the C1 to the C n Collected together to form the first current signal detection sequence set C 1 , as shown in the following formula (3),
[0013]
[0014] Step 2: Detect sequence set C according to the first current signal 1The data in constructs a polynomial fixed parameter matrix X, as shown in the following formula (4):
[0015]
[0016] Substitute the polynomial key parameter matrix X into the following formula (5) to calculate the first parameter vector
[0017]
[0018] In formula (5), X T is the transpose of the polynomial key parameter matrix X; Y is the first current signal detection sequence set C 1 The matrix formed by all current signal deviation rates;
[0019] By focusing on the polynomial parameter matrix X and the parameter vector The first relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (6):
[0020]
[0021] Step 3: Real-time acquisition of d fixed parameters of the high-voltage power metering device that needs to perform ground fault detection, and substitute the real-time acquired data into the relationship obtained in step 2, construct an objective function with the minimum current signal deviation rate in the relationship as the optimization target, solve the objective function through a genetic algorithm, and obtain the target adjustable parameter data f that minimizes the current deviation rate * , the target adjustable parameter data f * As the operating frequency of the current signal input to the high-voltage power metering device and completing the ground fault detection of the high-voltage power metering device.
[0022] Furthermore, the step 1 further comprises the following steps:
[0023] Step 1.1: Calculate the first current signal detection sequence set C by the following formula (7): 1 The information gain Gain(C 1 ,o1),
[0024]
[0025] In formula (7), Gain(C 1 , o1) is the first current signal detection sequence set C 1 The information gain of the first fixed parameter o1 described in Ent(C 1 ) is the first current signal detection sequence set C1 k is the information entropy of the first current signal detection sequence set C 1 The output category of each current signal detection data sequence; c k is the first current signal detection sequence set C 1 The amount of data in the current signal detection data sequence with all output categories k; is the first current signal detection sequence set C 1 v represents the first current signal detection sequence set C 1 The first fixed parameter o1 is the number of features, v is a natural number greater than 1; is the first current signal detection sequence set C 1 The amount of data belonging to the vth feature in the first fixed parameter o1 data; The first current signal detection sequence set C 1 The first fixed parameter o1 in all current signal detection data sequences belongs to the vth feature and the amount of data with output category k;
[0026] Repeat the above steps to calculate the first current signal detection sequence set C in sequence. 1 The information gain Gain(C 1 ,o2) to the dth fixed parameter od information gain Gain(C 1 ,o d );
[0027] According to the first current signal detection sequence set C 1 For all data in the 1 ,o1)、Gain(C 1 ,o2) to the Gain (C 1 ,o d ) as the splitting attribute of the decision tree, and establish a first decision tree W1 according to the splitting attribute;
[0028] Step 1.2: Detect sequence set C from the first current signal 1 In the process, n replacement samplings are performed in sequence, the same data sequences in the sampling results are merged, and then the remaining data sequences after the merging are collected to form the second current signal detection sequence set C 2 Repeat the above steps to form a third current signal detection sequence set C 3 To the Tth current signal detection sequence set C T ;
[0029] According to the principle of step 1.1, the second current signal detection sequence set C 2 To the Tth current signal detection sequence set C T Establish the second decision tree W2 to the Tth decision tree W in sequence T ;
[0030] The first decision tree W1 to the Tth decision tree W T A total of T decision trees are collected to form a random forest W; the importance V(o) of the jth fixed parameter in the fixed parameter set O in the random forest W is calculated by the following formula (8): j ), wherein j is a natural number greater than or equal to 1 and less than or equal to d,
[0031]
[0032] In formula (8), T is the total number of decision trees in the random forest; n t is the amount of out-of-bag data of the t-th decision tree; Y i is the actual current signal deviation value of the i-th out-of-bag data; is the predicted value of the current signal deviation value of the i-th out-of-bag data by decision tree t; is the prediction result of the i-th decision tree for the i-th out-of-bag data after randomly exchanging the j-th dimension feature;
[0033] Repeat formula (8) to calculate the importance of all fixed parameters in the fixed parameter set O in turn, and sort the calculated importance from large to small to form a fixed parameter importance sequence, define the fixed parameters corresponding to the first A importances in the fixed parameter importance sequence as key fixed parameters, and collect the A key fixed parameters to form a key fixed parameter set O. A , as shown in the following formula (9),
[0034] O A ={o1′, o2′,...,o′ A} (9)
[0035] In formula (9), o1′ is the first important fixed parameter defined by the fixed parameter corresponding to the first importance in the fixed parameter importance sequence; o2′ is the second important fixed parameter defined by the fixed parameter corresponding to the second importance in the fixed parameter importance sequence; o′ A It is the Ath key fixed parameter formed by the fixed parameter definition corresponding to the Ath importance in the fixed parameter importance sequence;
[0036] Step 1.3: Fix the parameter set O according to the key points A The A key fixed parameters in the first current signal detection sequence set C 1The data in the first current signal detection sequence set C is screened and eliminated. 1 The data that does not belong to the A key fixed parameters are collected to form a current signal screening data set F, as shown in the following formula (10):
[0037]
[0038] In formula (10), F1 is the first current signal detection data sequence C1 after the key fixed parameter set O A A is the first current signal screening sequence after the A key fixed parameters are screened; F2 is the second current signal detection data sequence C2 after the key fixed parameter set O A A second current signal screening sequence after the A key fixed parameters are screened; F n is the nth current signal detection data sequence C n Through the key fixed parameter set O A The nth current signal screening sequence after A key fixed parameters are screened; is the first fixed parameter data sequence O 1 Through the key fixed parameter set O A The first key fixed parameter data sequence after the A key fixed parameters in are screened; is the second fixed parameter data sequence O 2 Through the key fixed parameter set O A A second key fixed parameter data sequence after the A key fixed parameters are screened; is the nth fixed parameter data sequence O n Through the key fixed parameter set O A The nth key fixed parameter data sequence after the A key fixed parameters are screened; ...arrive They are respectively ...arrive The data value after being screened by the A key fixed parameters; ...arrive They are respectively ...arrive The data value after being screened by the A key fixed parameters; ...arrive They are respectively ...arrive The data value after being filtered by the A key fixed parameters.
[0039] Furthermore, the step 2 further comprises the following steps:
[0040] Step 2.1: Set the first current signal detection sequence set C 1 The first adjustable parameter data f in 1 and the first fixed parameter data sequence O 1 Substitute into formula (6) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate The to the and the first current signal detection sequence set C 1 Substitute all the current signal deviation rates in the following formula (11) to calculate the fitting accuracy of the first relationship:
[0041]
[0042] If the fitting accuracy of the first relational expression is calculated to be greater than 0.5, the first relational expression is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued;
[0043] If the calculated fitting accuracy of the first relationship is less than 0.5, continue to perform the following step 2.2;
[0044] Step 2.2: Filter the data in the data set F according to the current signal to construct the polynomial key fixed parameter matrix X A , as shown in the following formula (12),
[0045]
[0046] The polynomial focus is fixed parameter matrix X A Substituting into the following formula (13), the second parameter vector is calculated
[0047]
[0048] In formula (13), X A T is the polynomial key fixed parameter matrix X A The transpose of
[0049] The parameter matrix X is fixed by polynomial focus A and the second parameter vector The second relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (14):
[0050]
[0051] The first adjustable parameter data f in the current signal screening data set F is 1 and the first fixed parameter data sequence O 1 Substitute into formula (14) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate The to the Substitute the current signal deviation rate of all the current signal in the current signal screening data set F into formula (11) to calculate the fitting accuracy of the second relational formula,
[0052] If the fitting accuracy of the second relational expression is greater than 0.5, the formula (14) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued;
[0053] If the fitting accuracy of the second relational expression is less than 0.5, the following equation (15) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued.
[0054]
[0055] In formula (15), w is the weight vector and b is the bias term; and are the optimal Lagrange multipliers corresponding to each vector, N s refers to the number of support vectors, that is and Vectors that are not all zero, y i The actual current signal deviation rate corresponding to each data in the sampling data set.
[0056] Further, the solution process of the genetic algorithm in step 3 is as follows:
[0057] Step 3.1: Based on the relationship between the current signal deviation rate and the adjustable parameter obtained in step 2, use it as the fitness function of the genetic algorithm in step 3. The purpose of the genetic algorithm is to minimize the fitness function value;
[0058] Step 3.2: Randomly generate N individuals, i.e., the value of the adjustable parameter f, as the initial population of the genetic algorithm, as shown in the following formula (16):
[0059] F=[f1,f2,…,f N ] (16);
[0060] Step 3.3: Use the roulette wheel selection strategy to perform the selection operation. The steps are as follows:
[0061] Step 3.3.1: Calculate the sum of the fitness values of all adjustable parameters in the current population, as shown in (17),
[0062]
[0063] In formula (17), f i is the value of the adjustable parameter in the population, fitness() is the fitness function, that is, the relationship between the current signal deviation rate obtained in step 2 and the adjustable parameter, N is the number of the population, that is, the generated adjustable parameter f i The number of values of ;
[0064] Step 3.3.2: For each adjustable parameter f i , calculate its selection probability p i , as shown in the following formula (18),
[0065]
[0066] In formula (18), S is the sum of the fitness of all adjustable parameters in the current population calculated in step 3.3.1;
[0067] Step 3.3.3: The cumulative probability of each adjustable parameter and its previous parameters is obtained by accumulating the selection probabilities, as shown in the following formula (19):
[0068]
[0069] Step 3.3.4: Generate a random number r1 between 0 and 1, start searching from C1, and find the first cumulative probability C i For individuals whose cumulative probability is greater than r1, the adjustable parameter of the cumulative probability cutoff is selected as a parent individual; repeat the above steps and select M parent individuals to generate the next generation of individuals, as shown in the following formula (20):
[0070]
[0071] Step 3.4: Use binary to represent the value of each adjustable parameter as the gene string of the parameter, and generate a random integer from 0 to the length of the gene string as the intersection position selected for each gene string; break the gene strings of the two parent individuals at the intersection to form two parts; then exchange the genes of the two parts to produce two new individuals;
[0072] Repeat the above steps M times, and select two parent individuals for crossover operation each time to generate a corresponding number of new individuals. The result of the crossover operation is shown in the following formula (21):
[0073]
[0074] Step 3.5: Set the mutation probability P according to the on-site situation mutation , for each newly generated adjustable parameter Randomly generate a probability value a i , if a i <P mutation , again generate a random number b that obeys a Gaussian distribution with a mean of 0 and a standard deviation of σ i , where the standard deviation σ is set according to experience in the specific scenario, the new adjustable parameter is added to the random number, and the operation is repeated to mutate all new individuals, as shown in the following formula (22):
[0075]
[0076] Step 3.6: According to the result of step 3.5, substitute the mutated adjustable parameters into the fitness function to replace the individuals with lower fitness function values in the initial population to form the next generation population. The updated population is shown in the following formula (23):
[0077] F new ={f1′,f2′,…,f N '} (twenty three);
[0078] Step 3.7: When the optimal fitness function value in the population basically stops changing, determine whether the conditions for stopping the search are met; after the termination conditions are met, select the individual with the lowest fitness function value from the final population, that is, make fitness(f i )The smallest adjustable parameter f i As the search result, the solution with the minimum decay rate value is obtained; the final search result can be expressed as f best .
[0079] The beneficial effect of the present invention is as follows: the present invention defines a number of non-adjustable parameters that affect the signal deviation rate of the current signal, calculates the importance through random forest, and sorts them from large to small according to the importance, selects the non-adjustable parameters corresponding to the first A importance as the key non-adjustable parameters, establishes a polynomial key feature matrix X through the data value of the key non-adjustable parameters and the frequency of the current signal, and calculates the parameter vector through the polynomial key feature matrix X By focusing on the polynomial parameter matrix X and the parameter vector The fitting is performed to obtain the relationship between the current signal deviation rate and the adjustable parameters and the key fixed parameters. Since the importance of many existing non-adjustable parameters is screened, the non-adjustable parameters that have a greater impact on the current signal deviation rate are selected as the key non-adjustable parameters, and other non-adjustable parameters with little impact are eliminated, so that the fitting effect is more accurate, and a more accurate relationship between the current signal deviation rate and the adjustable parameters and the key fixed parameters is obtained. The relationship is solved by a genetic algorithm to obtain the adjustable parameter with the smallest current signal deviation rate. The adjustable parameter is used as the operating frequency of the input high-voltage power metering device for grounding fault detection, which makes the accuracy of grounding fault detection higher. DETAILED DESCRIPTION
[0080] The following is a further description of a method for improving the accuracy of ground fault detection of a high-voltage power metering device according to the present invention in conjunction with a specific embodiment.
[0081] Embodiment 1
[0082] In this embodiment, a method for improving the ground fault detection accuracy of a high-voltage power metering device includes the following steps:
[0083] Step 1: Define the frequency of the current signal input to the high-voltage power metering device as an adjustable parameter f; define the non-adjustable parameter that affects the signal deviation rate of the current signal as a fixed parameter, and collect all the fixed parameters to form a fixed parameter set O, as shown in the following formula (1):
[0084] O={o1, o2, ..., o d}(1)
[0085] In formula (1), o1 is the first fixed parameter collected; o2 is the second fixed parameter collected; o d is the dth fixed parameter collected; d is a natural number greater than 2;
[0086] Randomly generate a data value of an adjustable parameter f as the first adjustable parameter data f 1 and a set of fixed parameter set O data sequences as the first fixed parameter data sequence O 1 ; Set the frequency to the first adjustable parameter data f 1 The current signal input is in accordance with the first fixed parameter data sequence O 1 In the high-voltage power metering device model set with fixed parameter data in , the frequency is obtained as the first adjustable parameter data f 1 The current signal in the first fixed parameter data sequence O 1 The first current signal deviation rate y under the influence of fixed parameter data in 1 , the f 1 , O1 and 1 Collected to form a first current signal detection data sequence C1, said C1 is shown in the following formula (2):
[0087]
[0088] In formula (2) arrive They are respectively the data value randomly generated by the first fixed parameter to the data value randomly generated by the dth fixed parameter in O;
[0089] Repeat the above steps to obtain the second current signal detection data sequence C2 to the nth current signal detection data sequence C n ; Connect the C1 to the C n Collected together to form the first current signal detection sequence set C 1 , as shown in the following formula (3),
[0090]
[0091] The first current signal detection sequence set C 1 Some of the data are shown in Table 1 below.
[0092]
[0093]
[0094] Table 1
[0095] Step 2: Detect sequence set C according to the first current signal 1 The data in constructs a polynomial fixed parameter matrix X, as shown in the following formula (4):
[0096]
[0097] Substitute the polynomial key parameter matrix X into the following formula (5) to calculate the first parameter vector
[0098]
[0099] In formula (5), X T is the transpose of the polynomial key parameter matrix X; Y is the first current signal detection sequence set C 1 The matrix formed by all current signal deviation rates;
[0100] By focusing on the polynomial parameter matrix X and the parameter vector The first relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (6):
[0101]
[0102] After the above data are polynomialized, the fitting parameter vector for:
[0103] [8.15737037e-01,5.58034628e-05,-5.80060163e-03,3.44104997e-02]
[0104] Calculate the coefficient of determination R of the model 2 The value is: 0.6644000960474498, which is greater than 0.5, so it enters the genetic algorithm module.
[0105] Step 3: Real-time acquisition of d fixed parameters of the high-voltage power metering device that needs to perform ground fault detection, and substitute the real-time acquired data into the relationship obtained in step 2, construct an objective function with the minimum current signal deviation rate in the relationship as the optimization target, solve the objective function through a genetic algorithm, and obtain the target adjustable parameter data f that minimizes the current deviation rate * , the target adjustable parameter data f * As the operating frequency of the current signal input to the high-voltage power metering device and completing the ground fault detection of the high-voltage power metering device.
[0106] The specific solution process of the genetic algorithm is as follows:
[0107] Step 3.1: According to the relationship between the current signal deviation rate and the adjustable parameters obtained in step 2, it is used as the fitness function of the genetic algorithm in step 3. The purpose of the genetic algorithm is to minimize the value of the fitness function.
[0108] Step 3.2: Randomly generate N individuals, that is, the value of the adjustable parameter f, as the initial population of the genetic algorithm, expressed as:
[0109] F=[f1,f2,…,f N ]#(16)
[0110] Step 3.3: Use the roulette wheel selection strategy to perform the selection operation. The steps are as follows:
[0111] Step 3.3.1: Calculate the sum of the fitness values of all adjustable parameters in the current population, expressed as:
[0112]
[0113] Among them, f iis the value of the adjustable parameter in the population, fitness() is the fitness function, that is, the relationship between the current signal deviation rate and the adjustable parameter obtained in step 2.2, N is the number of the population, that is, the generated adjustable parameter f i The number of values of ;
[0114] Step 3.3.2: For each adjustable parameter f i , calculate its selection probability p i , expressed as:
[0115]
[0116] Where S is the sum of the fitness of all adjustable parameters in the current population calculated in step 3.3.1.
[0117] Step 3.3.3: The cumulative probability of each adjustable parameter and its previous parameter is obtained by accumulating the selection probabilities, which are expressed as:
[0118]
[0119] Step 3.3.4: Generate a random number r1 between 0 and 1, start searching from C1, and find the first cumulative probability C i For individuals greater than r1, the adjustable parameter of the cumulative probability cutoff is selected as a parent individual. Repeat the above steps and select M parent individuals to generate the next generation of individuals. The result can be expressed as
[0120]
[0121] Step 3.4: Use binary to represent the value of each adjustable parameter as the gene string of the parameter, and generate a random integer from 0 to the length of the gene string as the intersection point position selected for each gene string. The gene strings of the two parent individuals are broken at the intersection to form two parts. Then the genes of the two parts are exchanged to produce two new individuals.
[0122] For example, suppose that parent individual 1 is The gene string is A1A2A3…A n , parent individual 2 is The gene string is B1B2B3…B n , where A1, ...A n , B1,…B n The values are all 0 or 1, A1A2A3…A n and B1B2B3…B n They are and The crossover point is k. After the crossover operation, the gene strings of the two new individuals are:
[0123] New individual 1: A1A2A3…A k B k+1 B k+2 …B n
[0124] New individual 2: B1B2B3…B k A k+1 A k+2 …A n
[0125] Repeat the above steps M times, and select two parent individuals for crossover operation each time to generate a corresponding number of new individuals. The result of the crossover operation is expressed as:
[0126]
[0127] Step 3.5: Set the mutation probability P according to the on-site situation mutation For each newly generated adjustable parameter Randomly generate a probability value a i If a i <P mutation , again generate a random number b that obeys a Gaussian distribution with a mean of 0 and a standard deviation of σ i , where the standard deviation σ is set according to experience in the specific scenario. Add the new adjustable parameter to the random number, repeat the operation, mutate all new individuals, and get:
[0128]
[0129] Step 3.6: According to the result of step 3.5, substitute the mutated adjustable parameters into the fitness function, replace the individuals with lower fitness function values in the initial population, and form the next generation population. The updated population is expressed as
[0130] F new ={f11′,f2′,…,f N ′}
[0131] Step 3.7: When the optimal fitness function value in the population basically stops changing, it is determined whether the conditions for stopping the search are met.
[0132] Step 3.8: After the termination condition is met, select the individual with the lowest fitness function value from the final population, that is, make fitness(f i )The smallest adjustable parameter f i As the search result, the solution with the minimum decay rate value is obtained. The final search result can be expressed as fbest .
[0133] Assume that a set of real-time collected data is shown in Table 2 below:
[0134] Current signal decay rate Current signal frequency Grid harmonic frequency Line impedance 50% 1200Hz 55Hz 0.001369
[0135] Table 2
[0136] The optimal current signal frequency obtained by using genetic algorithm is: 1000.2925432536813.
[0137] Embodiment 2
[0138] The method for improving the ground fault detection accuracy of the high-voltage power metering device in this embodiment is based on the first embodiment and further includes the following contents:
[0139] Step 1 also includes the following steps:
[0140] Step 1.1: Calculate the first current signal detection sequence set C by the following formula (7): 1 The information gain Gain(C 1 ,o1),
[0141]
[0142] In formula (7), Gain(C 1 , o1) is the first current signal detection sequence set C 1 The information gain of the first fixed parameter o1 described in ; Ent( C1 ) is the first current signal detection sequence set C 1 k is the information entropy of the first current signal detection sequence set C 1 The output category of each current signal detection data sequence; c k is the first current signal detection sequence set C 1 The amount of data in the current signal detection data sequence with all output categories k; is the first current signal detection sequence set C 1 v represents the first current signal detection sequence set C 1 The first fixed parameter o1 is the number of features, v is a natural number greater than 1; is the first current signal detection sequence set C 1 The amount of data belonging to the vth feature in the first fixed parameter o1 data; The first current signal detection sequence set C 1The first fixed parameter o1 in all current signal detection data sequences belongs to the vth feature and the amount of data with output category k;
[0143] Repeat the above steps to calculate the first current signal detection sequence set C in sequence. 1 The information gain Gain(C 1 ,o2) to the dth fixed parameter od information gain Gain(C 1 ,o d );
[0144] According to the first current signal detection sequence set C 1 For all data in the 1 ,o1)、Gain(C 1 ,o2) to the Gain (C 1 ,o d ) as the splitting attribute of the decision tree, and establish a first decision tree W1 according to the splitting attribute;
[0145] Step 1.2: Detect sequence set C from the first current signal 1 In the process, n replacement samplings are performed in sequence, the same data sequences in the sampling results are merged, and then the remaining data sequences after the merging are collected to form the second current signal detection sequence set C 2 Repeat the above steps to form a third current signal detection sequence set C 3 To the Tth current signal detection sequence set C T ;
[0146] According to the principle of step 1.1, the second current signal detection sequence set C 2 To the Tth current signal detection sequence set C T Establish the second decision tree W2 to the Tth decision tree W in sequence T ;
[0147] The first decision tree W1 to the Tth decision tree W T A total of T decision trees are collected to form a random forest W; the importance V(o) of the jth fixed parameter in the fixed parameter set O in the random forest W is calculated by the following formula (8): j ), wherein j is a natural number greater than or equal to 1 and less than or equal to d,
[0148]
[0149] In formula (8),
[0150] Repeat formula (8) to calculate the importance of all fixed parameters in the fixed parameter set O in turn, and sort the calculated importance from large to small to form a fixed parameter importance sequence, define the fixed parameters corresponding to the first A importances in the fixed parameter importance sequence as key fixed parameters, and collect the A key fixed parameters to form a key fixed parameter set O. A , as shown in the following formula (9),
[0151] O A ={o1′, o2′,...,o′ A} (9)
[0152] In formula (9), o1′ is the first important fixed parameter defined by the fixed parameter corresponding to the first importance in the fixed parameter importance sequence; o2′ is the second important fixed parameter defined by the fixed parameter corresponding to the second importance in the fixed parameter importance sequence; o′ A It is the Ath key fixed parameter formed by the fixed parameter definition corresponding to the Ath importance in the fixed parameter importance sequence;
[0153] Step 1.3: Fix the parameter set O according to the key points A The A key fixed parameters in the first current signal detection sequence set C 1 The data in the first current signal detection sequence set C is screened and eliminated. 1 The data that does not belong to the A key fixed parameters are collected to form a current signal screening data set F, as shown in the following formula (10):
[0154]
[0155] In formula (10), F1 is the first current signal detection data sequence C1 after the key fixed parameter set O A A is the first current signal screening sequence after the A key fixed parameters are screened; F2 is the second current signal detection data sequence C2 after the key fixed parameter set O A A second current signal screening sequence after the A key fixed parameters are screened; F n is the nth current signal detection data sequence C n Through the key fixed parameter set O A The nth current signal screening sequence after A key fixed parameters are screened; is the first fixed parameter data sequence O 1 Through the key fixed parameter set O A The first key fixed parameter data sequence after the A key fixed parameters in are screened; is the second fixed parameter data sequence O2 Through the key fixed parameter set O A A second key fixed parameter data sequence after the A key fixed parameters are screened; is the nth fixed parameter data sequence O n Through the key fixed parameter set O A The nth key fixed parameter data sequence after the A key fixed parameters are screened; ...arrive They are respectively ...arrive The data value after being screened by the A key fixed parameters; ...arrive They are respectively ...arrive The data value after being screened by the A key fixed parameters; ...arrive They are respectively ...arrive The data value after being filtered by the A key fixed parameters.
[0156] The data collected again is shown in Table 3 below:
[0157]
[0158] Table 3
[0159] The data in Table 3 are screened through steps 1.1 to 1.3, and the variables with the top 80% of influencing factors are retained as shown in Table 4.
[0160]
[0161]
[0162] Table 4
[0163] Step 2 also includes the following steps:
[0164] Step 2.1: Set the first current signal detection sequence set C 1 The first adjustable parameter data f in 1 and the first fixed parameter data sequence O 1 Substitute into formula (6) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate Will arrive and the first current signal detection sequence set C 1Substitute all the current signal deviation rates into the following formula (11) to calculate the fitting accuracy of the first relationship:
[0165]
[0166] If the fitting accuracy of the first relational expression is calculated to be greater than 0.5, the first relational expression is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued;
[0167] If the calculated fitting accuracy of the first relational expression is less than 0.5, continue to perform the following step 2.2;
[0168] Step 2.2: Filter the data in the data set F according to the current signal to construct the polynomial key fixed parameter matrix X A , as shown in the following formula (12),
[0169]
[0170] The polynomial focus is fixed parameter matrix X A Substituting into the following formula (13), the second parameter vector is calculated
[0171]
[0172] In formula (13), X A T is the polynomial key fixed parameter matrix X A The transpose of
[0173] The parameter matrix X is fixed by polynomial focus A and the second parameter vector The second relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (14):
[0174]
[0175] The first adjustable parameter data f in the current signal screening data set F is 1 and the first fixed parameter data sequence O 1 Substitute into formula (14) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate Will arrive Substitute all current signal deviation rates in the current signal screening data set F into formula (11) to calculate the fitting accuracy of the second relational formula:
[0176] If the fitting accuracy of the second relational expression is greater than 0.5, formula (14) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued;
[0177] If the fitting accuracy of the second relational expression is less than 0.5, the following equation (15) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued.
[0178]
[0179] In formula (15), w is the weight vector and b is the bias term; and are the optimal Lagrange multipliers corresponding to each vector, N s refers to the number of support vectors, that is and Vectors that are not all zero, y i The actual current signal deviation rate corresponding to each data in the sampling data set.
[0180] The fitting accuracy of the second relational expression obtained by applying the data in Table 4 to step 2.2 is: 0.3573674480600496<0.5. Therefore, formula (15) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued.
[0181] Assume that a set of real-time collected data is shown in Table 5:
[0182] Electromagnetic field strength Environmental noise Line noise Ambient humidity Transmission distance 139.24693876uT 21.52650939A 92.25447914dB 99.265074624% 135.09827686 m
[0183] Table 5
[0184] The optimal current signal frequency obtained by using genetic algorithm is: 4495.133493459765.
Claims
1. A method for improving the accuracy of ground fault detection of a high-voltage power metering device, characterized in that: The following steps are involved: Step 1: Define the frequency of the current signal input to the high-voltage power metering device as an adjustable parameter f; define the non-adjustable parameter that affects the signal deviation rate of the current signal as a fixed parameter, and collect all the fixed parameters to form a fixed parameter set O, as shown in the following formula (1): O={o1、o2、...、o d } (1) In formula (1), o1 is the first fixed parameter collected; o2 is the second fixed parameter collected; o d is the dth fixed parameter collected; d is a natural number greater than 2; Randomly generate a data value of an adjustable parameter f as the first adjustable parameter data f 1 and a set of fixed parameter set O data sequences as the first fixed parameter data sequence O 1 ; The frequency is the first adjustable parameter data f 1 The current signal input is in accordance with the first fixed parameter data sequence O 1 In the high-voltage power metering device model set with fixed parameter data in , the frequency is obtained as the first adjustable parameter data f 1 The current signal in the first fixed parameter data sequence O 1 The first current signal deviation rate y under the influence of fixed parameter data in 1 , the f 1 , O 1 and 1 Collected to form a first current signal detection data sequence C1, said C1 is shown in the following formula (2): In formula (2) arrive They are respectively the data value randomly generated by the first fixed parameter to the data value randomly generated by the dth fixed parameter in O; Repeat the above steps to obtain the second current signal detection data sequence C2 to the nth current signal detection data sequence C n ; Connect the C1 to the C n Collected together to form the first current signal detection sequence set C 1 , as shown in the following formula (3), Step 2: Detect sequence set C according to the first current signal 1 The data in constructs a polynomial fixed parameter matrix X, as shown in the following formula (4): Substitute the polynomial key parameter matrix X into the following formula (5) to calculate the first parameter vector In formula (5), X T is the transpose of the polynomial key parameter matrix X; Y is the first current signal detection sequence set C 1 The matrix formed by all current signal deviation rates; By focusing on the polynomial parameter matrix X and the parameter vector The first relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (6): Step 3: Real-time acquisition of d fixed parameters of the high-voltage power metering device that needs to perform ground fault detection, and substitute the real-time acquired data into the relationship obtained in step 2, construct an objective function with the minimum current signal deviation rate in the relationship as the optimization target, solve the objective function through a genetic algorithm, and obtain the target adjustable parameter data f that minimizes the current deviation rate * , the target adjustable parameter data f * As the operating frequency of the current signal input to the high-voltage power metering device and completing the ground fault detection of the high-voltage power metering device.
2. The method for improving the ground fault detection accuracy of a high-voltage power metering device according to claim 1, characterized in that: The step 1 also includes the following steps: Step 1.1: Calculate the first current signal detection sequence set C by the following formula (7): 1 The information gain Gain(C 1 ,o1), In formula (7), Gain(C 1 , o1) is the first current signal detection sequence set C 1 The information gain of the first fixed parameter o1 described in Ent(C 1 ) is the first current signal detection sequence set C 1 k is the information entropy of the first current signal detection sequence set C 1 The output category of each current signal detection data sequence; c k is the first current signal detection sequence set C 1 The amount of data in the current signal detection data sequence with all output categories k; is the first current signal detection sequence set C 1 v represents the first current signal detection sequence set C 1 The first fixed parameter o1 is the number of features, v is a natural number greater than 1; is the first current signal detection sequence set C 1 The amount of data belonging to the vth feature in the first fixed parameter o1 data; The first current signal detection sequence set C 1 The first fixed parameter o1 in all current signal detection data sequences belongs to the vth feature and the amount of data with output category k; Repeat the above steps to calculate the first current signal detection sequence set C in sequence. 1 The information gain Gain(C 1 ,o2) to the dth fixed parameter o d Information gain Gain (C 1 ,o d ); According to the first current signal detection sequence set C 1 For all data in the 1 ,o1)、Gain(C 1 ,o2) to the Gain (C 1 ,o d ) as the splitting attribute of the decision tree, and establish a first decision tree W1 according to the splitting attribute; Step 1.2: Detect sequence set C from the first current signal 1 In the process, n replacement samplings are performed in sequence, the same data sequences in the sampling results are merged, and then the remaining data sequences after the merging are collected to form the second current signal detection sequence set C 2 Repeat the above steps to form a third current signal detection sequence set C 3 To the Tth current signal detection sequence set C T ; According to the principle of step 1.1, the second current signal detection sequence set C 2 To the Tth current signal detection sequence set C T Establish the second decision tree W2 to the Tth decision tree W in sequence T ; The first decision tree W1 to the Tth decision tree W T A total of T decision trees are collected to form a random forest W; the importance V(o) of the jth fixed parameter in the fixed parameter set O in the random forest W is calculated by the following formula (8): j ), wherein j is a natural number greater than or equal to 1 and less than or equal to d, In formula (8), T is the total number of decision trees in the random forest; n t is the amount of out-of-bag data of the t-th decision tree; Y i is the actual current signal deviation value of the i-th out-of-bag data; is the predicted value of the current signal deviation value of the i-th out-of-bag data by decision tree t; is the prediction result of the i-th decision tree for the i-th out-of-bag data after randomly exchanging the j-th dimension feature; Repeat formula (8) to calculate the importance of all fixed parameters in the fixed parameter set O in turn, and sort the calculated importance from large to small to form a fixed parameter importance sequence, define the fixed parameters corresponding to the first A importances in the fixed parameter importance sequence as key fixed parameters, and collect the A key fixed parameters to form a key fixed parameter set O. A , as shown in the following formula (9), THE A ={o1′、o2′、...、o′ A } (9) In formula (9), o1′ is the first important fixed parameter defined by the fixed parameter corresponding to the first importance in the fixed parameter importance sequence; o2′ is the second important fixed parameter defined by the fixed parameter corresponding to the second importance in the fixed parameter importance sequence; o′ A It is the Ath key fixed parameter formed by the fixed parameter definition corresponding to the Ath importance in the fixed parameter importance sequence; Step 1.3: Fix the parameter set O according to the key points A The A key fixed parameters in the first current signal detection sequence set C 1 The data in the first current signal detection sequence set C is screened and eliminated. 1 The data that does not belong to the A key fixed parameters are collected to form a current signal screening data set F, as shown in the following formula (10): In formula (10), F1 is the first current signal detection data sequence C1 after the key fixed parameter set O A A is the first current signal screening sequence after the A key fixed parameters are screened; F2 is the second current signal detection data sequence C2 after the key fixed parameter set O A A second current signal screening sequence after the A key fixed parameters are screened; F n is the nth current signal detection data sequence C n Through the key fixed parameter set O A The nth current signal screening sequence after A key fixed parameters are screened; is the first fixed parameter data sequence O 1 Through the key fixed parameter set O A The first key fixed parameter data sequence after the A key fixed parameters in are screened; is the second fixed parameter data sequence O 2 Through the key fixed parameter set O A A second key fixed parameter data sequence after the A key fixed parameters are screened; is the nth fixed parameter data sequence O n Through the key fixed parameter set O A The nth key fixed parameter data sequence after the A key fixed parameters are screened; arrive They are respectively arrive The data value after being screened by the A key fixed parameters; arrive They are respectively arrive The data value after being screened by the A key fixed parameters; arrive They are respectively arrive The data value after being filtered by the A key fixed parameters.
3. The method for improving the ground fault detection accuracy of a high-voltage power metering device according to claim 2, characterized in that: The step 2 further comprises the following steps: Step 2.1: Set the first current signal detection sequence set C 1 The first adjustable parameter data f in 1 and the first fixed parameter data sequence O 1 Substitute into formula (6) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate The to the and the first current signal detection sequence set C 1 Substitute all the current signal deviation rates in the following formula (11) to calculate the fitting accuracy of the first relationship: If the fitting accuracy of the first relational expression is calculated to be greater than 0.5, the first relational expression is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued; If the calculated fitting accuracy of the first relationship is less than 0.5, continue to perform the following step 2.2; Step 2.2: Filter the data in the data set F according to the current signal to construct the polynomial key fixed parameter matrix X A , as shown in the following formula (12), The polynomial focus is fixed parameter matrix X A Substituting into the following formula (13), the second parameter vector is calculated In formula (13), X A T is the polynomial key fixed parameter matrix X A The transpose of The parameter matrix X is fixed by polynomial focus A and the second parameter vector The second relationship between the current signal deviation rate and the adjustable parameters and fixed parameters is obtained by fitting, as shown in the following equation (14): The first adjustable parameter data f in the current signal screening data set F is 1 and the first fixed parameter data sequence O 1 Substitute into formula (14) to calculate the first predicted current signal deviation rate Repeat the above steps to obtain the second predicted current signal deviation rate To the nth predicted current signal deviation rate The to the Substitute the current signal deviation rate of all the current signal in the current signal screening data set F into formula (11) to calculate the fitting accuracy of the second relational formula, If the fitting accuracy of the second relational expression is greater than 0.5, the formula (14) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued; If the fitting accuracy of the second relational expression is less than 0.5, the following equation (15) is used as the relational expression between the current signal deviation rate and the adjustable parameter, and step 3 is continued. In formula (15), w is the weight vector and b is the bias term; and are the optimal Lagrange multipliers corresponding to each vector, N s refers to the number of support vectors, that is and Vectors that are not all zero, y i The actual current signal deviation rate corresponding to each data in the sampling data set.
4. The method for improving the ground fault detection accuracy of a high-voltage power metering device according to any one of claims 1 to 3, characterized in that: The solution process of the genetic algorithm in step 3 is as follows: Step 3.1: Based on the relationship between the current signal deviation rate and the adjustable parameter obtained in step 2, use it as the fitness function of the genetic algorithm in step 3. The purpose of the genetic algorithm is to minimize the fitness function value; Step 3.2: Randomly generate N individuals, i.e., the value of the adjustable parameter f, as the initial population of the genetic algorithm, as shown in the following formula (16): F=[f1,f2,…,f N ] (16); Step 3.3: Use the roulette wheel selection strategy to perform the selection operation. The steps are as follows: Step 3.3.1: Calculate the sum of the fitness values of all adjustable parameters in the current population, as shown in (17), In formula (17), f i is the value of the adjustable parameter in the population, fitness() is the fitness function, that is, the relationship between the current signal deviation rate obtained in step 2 and the adjustable parameter, N is the number of the population, that is, the generated adjustable parameter f i The number of values of ; Step 3.3.2: For each adjustable parameter f i , calculate its selection probability p i , as shown in the following formula (18), In formula (18), S is the sum of the fitness of all adjustable parameters in the current population calculated in step 3.3.1; Step 3.3.3: The cumulative probability of each adjustable parameter and its previous parameters is obtained by accumulating the selection probabilities, as shown in the following formula (19): Step 3.3.4: Generate a random number r1 between 0 and 1, start searching from C1, and find the first cumulative probability C i For individuals whose cumulative probability is greater than r1, the adjustable parameter of the cumulative probability cutoff is selected as a parent individual; repeat the above steps and select M parent individuals to generate the next generation of individuals, as shown in the following formula (20): Step 3.4: Use binary to represent the value of each adjustable parameter as the gene string of the parameter, and generate a random integer from 0 to the length of the gene string as the intersection position selected for each gene string; break the gene strings of the two parent individuals at the intersection to form two parts; then exchange the genes of the two parts to produce two new individuals; Repeat the above steps M times, and select two parent individuals for crossover operation each time to generate a corresponding number of new individuals. The result of the crossover operation is shown in the following formula (21): Step 3.5: Set the mutation probability P according to the on-site situation mutation , for each newly generated adjustable parameter Randomly generate a probability value a i , if a i <P mutation , again generate a random number b that obeys a Gaussian distribution with a mean of 0 and a standard deviation of σ i , where the standard deviation σ is set according to experience in the specific scenario, the new adjustable parameter is added to the random number, and the operation is repeated to mutate all new individuals, as shown in the following formula (22): Step 3.6: According to the result of step 3.5, substitute the mutated adjustable parameters into the fitness function to replace the individuals with lower fitness function values in the initial population to form the next generation population. The updated population is shown in the following formula (23): F new ={f1′,f2′,…,f N ′} (23); Step 3.7: When the optimal fitness function value in the population basically stops changing, determine whether the conditions for stopping the search are met; after the termination conditions are met, select the individual with the lowest fitness function value from the final population, that is, make fitness(f i )The smallest adjustable parameter f i As the search result, the solution with the minimum decay rate value is obtained; the final search result can be expressed as f best .
