Small current grounding fault line selection method based on SCGSSA-XGBoost
Through the small current grounding fault line selection method based on SCGSSA-XGBoost, the XGBoost fault diagnosis model is constructed and the parameters are optimized, which solves the problem of poor universality of the wire selection method of the small current grounding system, and achieves higher fault recognition accuracy and versatility.
Patent Information
- Application Number
- CN202411622926.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing small current grounding system wire selection methods are poor in versatility and are difficult to effectively deal with all fault types, resulting in missed or missed selection.
Using the small current ground fault line selection method based on SCGSSA-XGBoost, the XGBoost fault diagnosis model is constructed, and the model parameters are optimized using the sparrow search algorithm to improve the accuracy and robustness of fault diagnosis.
It improves the accuracy and versatility of wire selection of small current ground faults, enhances the ability to identify all fault types, and improves the efficiency and accuracy of data processing.
Smart Images

Figure CN119269968A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid fault detection, and in particular to a low-current ground fault line selection method based on SCGSSA-XGBoost. Background Art
[0002] Low-current grounding systems are widely used in distribution networks that require high power supply reliability and have complex, widely distributed lines. This is particularly true in medium-voltage distribution systems (generally in the 3kV to 66kV voltage range). These systems are commonly used in rural and urban power grids, as well as in the distribution networks of some industrial and mining enterprises. Currently, distribution networks have strict requirements for power supply continuity. While low-current grounding systems do not require immediate power interruption in the event of a single-phase fault, they do require accurate identification of the faulty feeder and rapid troubleshooting, which is crucial for ensuring safe system operation and improving power supply reliability.
[0003] Because the fault current in a low-current system during a single-phase ground fault is small, it is susceptible to interference from various factors. Furthermore, the fault signal performance varies significantly under different operating conditions, and different interference factors have varying impacts on the fault characteristics, easily leading to misselection or omission. Therefore, accurately and quickly selecting the faulty feeder is challenging. Currently, commonly used methods for selecting the feeder for low-current grounding systems lack versatility and are unable to effectively address all fault types. Therefore, a more versatile and accurate method for selecting the feeder for low-current grounding faults is urgently needed to enable rapid and accurate fault selection.
[0004] In view of this, this application is hereby filed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is that the commonly used line selection methods for small current grounding systems have poor versatility and are difficult to effectively handle all fault types. The purpose is to provide a small current grounding fault line selection method based on SCGSSA-XGBoost. By building a small current grounding fault diagnosis model based on the XGBoost algorithm, it is used for small current grounding system line selection, which has better classification and recognition effects and effectively improves the accuracy of model prediction.
[0006] The present invention is achieved through the following technical solutions:
[0007] A low-current ground fault line selection method based on SCGSSA-XGBoost includes the following steps:
[0008] S1, obtain a data set. The data set input is the characteristic values of the voltage signal and current signal of the small current grounding system. The data set output is the line fault type and is divided into a training set and a test set.
[0009] S2, build an XGBoost fault diagnosis model, optimize the parameters of the XGBoost fault diagnosis model according to the training set, and obtain the optimal SCGSSA-XGBoost fault diagnosis model;
[0010] S3, test the optimal SCGSSA-XGBoost fault diagnosis model using the test set;
[0011] In step S4, the voltage and current signals of the low-current grounding system to be tested are collected and input into the optimal SCGSSA-XGBoost fault diagnosis model obtained in step S2. The line fault type is obtained as the output to complete the fault line selection.
[0012] In a specific embodiment, in step S1, a fixed-length window is used to divide the current signal and voltage signal of each collected low-current grounding system into multiple data samples; and the corresponding state transition one-hot code is used as a label to construct a low-current grounding fault sample.
[0013] In a specific embodiment, in step S1, the voltage signal and current signal obtained are as follows:
[0014] The fault scenario consists of three phases and four lines, totaling 12 conditions. For each condition, eight sets of voltage and current signals were collected, both in normal and fault states. The data was grouped using a moving window, and the fault data was labeled. The output was modified to one-hot encoding, in accordance with the data format used for model training.
[0015] In a specific embodiment, 80% of the original data after feature extraction in step S1 is randomly divided into a training set, and 20% is randomly divided into a test set.
[0016] In a specific embodiment, in step S2, an XGBoost fault diagnosis model is constructed, and the parameters of the XGBoost fault diagnosis model are optimized using the SCGSSA algorithm based on the training set to obtain the optimal SCGSSA-XGBoost fault diagnosis model. The specific steps are as follows:
[0017] S201, initializing the sparrow search algorithm and setting the sparrow model parameters;
[0018] S202, setting the XGBoost model and the parameter range to be optimized, and initializing the sparrow population;
[0019] S203, calculating the fitness value of each sparrow based on the obtained sparrow population;
[0020] S204, sorting the obtained fitness values and locating the current global best position;
[0021] S205, updating the individual positions of sparrows in various groups;
[0022] S206, iterating the above process continuously, using the root mean square error as the fitness function, until a stopping condition is met, that is, a preset maximum number of iterations is reached or the model error is less than a preset minimum error, and then outputting the parameters corresponding to the optimal sparrow position;
[0023] S207, substituting the iterated hyperparameters into the XGBoost model to obtain the optimal SCGSSA-XGBoost fault diagnosis model after training.
[0024] In a specific embodiment, in step S201, the sparrow search algorithm is initialized as follows:
[0025]
[0026] Where Z represents a population of n sparrows, each sparrow represents a parameter configuration, d is the dimension of the variable to be optimized, and the sparrow fitness is expressed as:
[0027]
[0028] Where, Φ Z The value of each row represents the fitness of an individual.
[0029] In a specific embodiment, in step S201, the sparrow model parameters are set as follows: the population size n, the maximum number of iterations Iter max , discoverer proportion PD, scout proportion SD, warning threshold R2, safety threshold ST.
[0030] In a specific embodiment, in step S202, the XGBoost algorithm principle is as follows:
[0031] (1) In the data set DATA={(X i ,Y i )}, use the results of each tree to fit the previous tree, where X i is the feature vector of the i-th sample, Y i is the corresponding true value. The prediction results of the first t trees for sample i are:
[0032]
[0033] Where x i is the input data, f t (x i ) is the t-th tree pair x i The predicted value of is the prediction result of t-1 trees for sample i.
[0034] (2) The objective function of XGBoost consists of the model error and the regularization term. The specific formula is as follows:
[0035]
[0036] Where, Ω(f k ) is the model complexity, is the model loss function, T is the number of leaf nodes, γ is the coefficient that controls the complexity of leaf nodes, and w j is the leaf node weight, and λ is the regularization parameter.
[0037] In a specific embodiment, in step S202, the parameters to be optimized of the XGBoost model are set as follows: the learning rate (learning_rate), the number of decision trees (n_estimators), the depth of the tree construction (max_depth), the sampling rate of the random sampling training samples (subsample), the feature sampling rate when generating the tree (colsample_bytree), the L2 regularization term parameter (reg_lambda), and the minimum leaf node weight (min_child_weight).
[0038] In a specific embodiment, in step S202, the sparrow population is initialized using a reverse learning method that integrates the refraction principle, as follows:
[0039] (1) Randomly initialize N sparrow positions z in the optimization range [l,u] i,j as the initial population position;
[0040] (2) Generate a refractive reverse population The specific formula is as follows:
[0041]
[0042] k=h / h *
[0043] Where z i,j is the position of the i-th sparrow in the population in the j-dimensional space (i=1,2,...,d;j=1,2,...,n), z i,j The refraction reverse position, l j 、u j are the minimum and maximum values of the jth dimension of the search space, respectively, k is the scaling factor, h and h * are the lengths corresponding to the incident and refracted light respectively;
[0044] (3) Merge the initial population and the reverse population, sort them according to the rise and fall of fitness values, and select the first n sparrow individuals with the highest fitness values as the initial population;
[0045] Select RMSE as the function to calculate fitness, the formula is:
[0046]
[0047] Where N is the input sample size; y i and are the actual and predicted values of the samples, respectively.
[0048] In a specific embodiment, in step S205, the individual positions of the sparrows in the various groups are updated as follows:
[0049] (1) Introduce the SCA sine-cosine algorithm to update the discoverer's position. The formula is as follows:
[0050]
[0051] Where, is the j-th dimension position of the i-th individual, t is the current iteration number, Iter max is the maximum number of iterations, ω is the nonlinear weight factor introduced to adjust the dependence of the population individual position update on the individual information at this time, is the step search factor, η is the adjustment coefficient, r2∈[0,2π] is a random number that determines the moving distance of the sparrow, r3∈[0,2π] is a random number that controls the influence of the optimal individual on the next position of the sparrow, R2∈[0,1] and ST∈[0.5,1] represent the alarm value and warning threshold;
[0052] (2) Introduce Cauchy-Gauss mutation to update the follower position:
[0053]
[0054] Where z best is the optimal individual in the population, σ 2 represents the standard deviation of the Cauchy-Gaussian mutation strategy, cauchy(0,σ 2 ) is a random variable that satisfies the Cauchy distribution, Gauss(0,σ 2 ) is a random variable that satisfies the Gaussian distribution, and λ1 and λ2 are dynamic parameters that are adaptively adjusted with the number of iterations.
[0055] (2) Update the scout's location as follows:
[0056]
[0057] Where z bestis the current global optimal value, β is a random number drawn from a normal distribution, M is a random number in [0,1], and the constant ε is introduced to prevent the denominator from being 0. is the fitness value of the i-th sparrow, and are the current optimal and worst fitness values.
[0058] In a specific embodiment, in step S4, the optimal SCGSSA-XGBoost fault diagnosis model is used to select the line for the small current grounding fault, the voltage signal and current signal of the small current grounding system to be tested are input, and the line fault type is obtained by the optimal SCGSSA-XGBoost fault diagnosis model.
[0059] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0060] 1. The embodiment of the present invention provides a line selection method for small-current grounding faults based on SCGSSA-XGBoost. This method uses classification rules based on an extreme gradient boosting tree to integrate multiple line selection methods. It has high accuracy and robustness, solving the problems of single-phase grounding line selection difficulties in small-current grounding systems and the difficulty of accurate judgment with a single line selection method.
[0061] 2. An embodiment of the present invention provides a low-current grounding fault line selection method based on SCGSSA-XGBoost. This method builds a low-current grounding fault diagnosis model based on the XGBoost algorithm for line selection in low-current grounding systems. The XGBoost algorithm demonstrates superior classification and recognition performance in this area, with fast training speed. By increasing the number of classification trees through successive iterations, the prediction accuracy of the integrated model is effectively improved.
[0062] 3. An embodiment of the present invention provides a low-current ground fault line selection method based on SCGSSA-XGBoost. By introducing the SCGSSA sparrow search algorithm, the simulation parameters are optimized by simulating the behaviors of sparrows in nature, such as foraging and avoiding predators. The parameters of the XGBoost fault diagnosis model are tuned, which overcomes the shortcomings of the XGBoost algorithm in terms of complex parameter tuning. Compared with other intelligent swarm algorithms, the method has the characteristics of strong optimization ability, fast convergence speed, and excellent stability.
[0063] 4. An embodiment of the present invention provides a low-current ground fault line selection method based on SCGSSA-XGBoost. This method combines refraction reverse learning and sine and cosine sums to improve the SCGSSA sparrow algorithm, thereby improving the solution accuracy of the sparrow search algorithm. In addition, it combines a hybrid mutation strategy of Cauchy and Gaussian distributions to enhance the algorithm's ability to maintain population diversity and resist stagnation, helping the algorithm to escape local optimality, reducing the probability of premature convergence in the late search stage, and improving global search and optimization capabilities.
[0064] 5. The embodiment of the present invention provides a small current grounding fault line selection method based on SCGSSA-XGBoost, which improves the versatility for all small current grounding fault types and the high-precision fault identification capability, greatly improving the efficiency and accuracy of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without making any creative efforts.
[0066] Figure 1 Flowchart of the SCGSSA-XGBoost model provided by an embodiment of the present invention;
[0067] Figure 2 A diagram showing the training principle of the XGBoost extreme gradient boosting tree algorithm model constructed for an embodiment of the present invention;
[0068] Figure 3 A schematic diagram of the principle of optimizing the hyperparameters using the SCGSSA algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with examples and drawings. The exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention.
[0070] In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that these specific details are not necessarily required to practice the present invention. In other embodiments, well-known structures are not specifically described to avoid obscuring the present invention.
[0071] Throughout this specification, references to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment of the present invention. Therefore, appearances of the phrases "one embodiment," "an embodiment," "an example," or "an example" in various places throughout this specification are not necessarily all referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in one or more embodiments or examples in any suitable combinations and / or subcombinations. Furthermore, it will be understood by those of ordinary skill in the art that the figures provided herein are for illustrative purposes only and are not necessarily drawn to scale. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0072] In the description of the present invention, the terms "front", "back", "left", "right", "up", "down", "vertical", "horizontal", "high", "low", "inside", "outside", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the scope of protection of the present invention.
[0073] Example 1
[0074] like Figure 1 As shown, an embodiment of the present invention provides a low-current ground fault line selection method based on SCGSSA-XGBoost, comprising the following steps:
[0075] S1, obtain a data set. The data set input is the characteristic values of the voltage signal and current signal of the small current grounding system. The data set output is the line fault type and is divided into a training set and a test set.
[0076] S2, build an XGBoost fault diagnosis model, optimize the parameters of the XGBoost fault diagnosis model according to the training set, and obtain the optimal SCGSSA-XGBoost fault diagnosis model;
[0077] S3, test the optimal SCGSSA-XGBoost fault diagnosis model using the test set;
[0078] In step S4, the voltage and current signals of the low-current grounding system to be tested are collected and input into the optimal SCGSSA-XGBoost fault diagnosis model obtained in step S2. The line fault type is obtained as the output to complete the fault line selection.
[0079] In a specific embodiment, in step S1, a fixed-length window is used to divide the current signal and voltage signal of each collected low-current grounding system into multiple data samples; and the corresponding state transition one-hot code is used as a label to construct a low-current grounding fault sample.
[0080] In a specific embodiment, in step S1, the voltage signal and current signal obtained are as follows:
[0081] The fault condition consists of three phases and four lines, totaling 12 conditions. 440ms of data are collected for each condition, including 200ms for normal condition and 240ms for fault condition. The sampling rate is 1000Hz. The collected voltage signals include U0, U a ,U b ,U c , the collected current signals include line1, line2, line3, line4, a total of 8 groups of signals.
[0082] Set the window size to 20ms, concatenate the continuous 20ms data into a new data, and the window movement step is 1ms, moving from time T0 to time T n-20 At this moment, the grouped data is:
[0083]
[0084] The data is labeled. The grouped data contains many time points, so they are uniformly labeled according to the label of time T0. For data that crosses the fault point, data with a fault time of more than 30% is marked as faulty, otherwise it is marked as normal.
[0085] For the four-line status judgment scenario, the dataset outputs five line fault types: normal, line one fault, line two fault, line three fault, and line four fault. Based on the data format for model training, the data is modified to one-hot encoding. The encoding specifications are shown in Table 1.
[0086] Table 1
[0087] Fault type One-hot encoding normal {1,0,0,0,0} Line 1 failure {0,1,0,0,0} Line 2 fault {0,0,1,0,0} Line three fault {0,0,0,1,0} Line 4 fault {0,0,0,0,1}
[0088] In a specific embodiment, the original data after feature extraction in step S1 totals 5280 pieces, 80% of which are randomly divided into a training set and 20% are randomly divided into a test set.
[0089] In a specific embodiment, in step S2, an XGBoost fault diagnosis model is constructed, and the parameters of the XGBoost fault diagnosis model are optimized using the SCGSSA algorithm based on the training set to obtain the optimal SCGSSA-XGBoost fault diagnosis model. The specific steps are as follows:
[0090] S201, initializing the sparrow search algorithm and setting the sparrow model parameters;
[0091] S202, setting the XGBoost model and the parameter range to be optimized, and initializing the sparrow population;
[0092] S203, calculating the fitness value of each sparrow based on the obtained sparrow population;
[0093] S204, sorting the obtained fitness values and locating the current global best position;
[0094] S205, updating the individual positions of sparrows in various groups;
[0095] S206, iterating the above process continuously, using the root mean square error as the fitness function, until a stopping condition is met, that is, a preset maximum number of iterations is reached or the model error is less than a preset minimum error, and then outputting the parameters corresponding to the optimal sparrow position;
[0096] S207, substituting the iterated hyperparameters into the XGBoost model to obtain the optimal SCGSSA-XGBoost fault diagnosis model after training.
[0097] In a specific embodiment, in step S201, the sparrow search algorithm is initialized as follows:
[0098]
[0099] Where Z represents a population of n sparrows, each sparrow represents a parameter configuration, d is the dimension of the variable to be optimized, and the sparrow fitness is expressed as:
[0100]
[0101] Where, Φ Z The value of each row represents the fitness of an individual.
[0102] In a specific embodiment, in step S201, the sparrow model parameters are set as follows: the population size n, the maximum number of iterations Iter max , discoverer proportion PD, scout proportion SD, warning threshold R2, safety threshold ST.
[0103] In a specific embodiment, in step S202, the XGBoost algorithm principle is as follows:
[0104] (1) In the data set DATA={(X i ,Y i )}, use the results of each tree to fit the previous tree, where X i is the feature vector of the i-th sample, Y i is the corresponding true value. The prediction results of the first t trees for sample i are:
[0105]
[0106] Where x i is the input data, f t (x i ) is the t-th tree pair x i The predicted value of is the prediction result of t-1 trees for sample i.
[0107] (2) The objective function of XGBoost consists of the model error and the regularization term. The specific formula is as follows:
[0108]
[0109] Where, Ω(f k ) is the model complexity, is the model loss function, T is the number of leaf nodes, γ is the coefficient that controls the complexity of leaf nodes, and w j is the leaf node weight, and λ is the regularization parameter.
[0110] In a specific embodiment, in step S202, the parameters to be optimized of the XGBoost model are set as follows: the learning rate (learning_rate), the number of decision trees (n_estimators), the depth of the tree construction (max_depth), the sampling rate of the random sampling training samples (subsample), the feature sampling rate when generating the tree (colsample_bytree), the L2 regularization term parameter (reg_lambda), and the minimum leaf node weight (min_child_weight).
[0111] In a specific embodiment, in step S202, the sparrow population is initialized using a reverse learning method that integrates the refraction principle, as follows:
[0112] (1) Randomly initialize N sparrow positions z in the optimization range [l,u] i,j as the initial population position;
[0113] (2) Generate a refractive reverse population The specific formula is as follows:
[0114]
[0115] k=h / h *
[0116] Where z i,j is the position of the i-th sparrow in the population in the j-dimensional space (i=1,2,...,d;j=1,2,...,n), z i,j The refraction reverse position, l j 、u j are the minimum and maximum values of the jth dimension of the search space, respectively, k is the scaling factor, h and h * are the lengths corresponding to the incident and refracted light respectively;
[0117] (3) Merge the initial population and the reverse population, sort them according to the rise and fall of fitness values, and select the first n sparrow individuals with the highest fitness values as the initial population;
[0118] Select RMSE as the function to calculate fitness, the formula is:
[0119]
[0120] Where N is the input sample size; y i and are the actual and predicted values of the samples, respectively.
[0121] In a specific embodiment, in step S205, the individual positions of the sparrows in the various groups are updated as follows:
[0122] (1) Introduce the SCA sine-cosine algorithm to update the discoverer's position. The formula is as follows:
[0123]
[0124]
[0125] Where, is the j-th dimension position of the i-th individual, t is the current iteration number, Iter max is the maximum number of iterations, ω is the nonlinear weight factor introduced to adjust the dependence of the population individual position update on the individual information at this time, is the step search factor, η is the adjustment coefficient, r2∈[0,2π] is a random number that determines the moving distance of the sparrow, r3∈[0,2π] is a random number that controls the influence of the optimal individual on the next position of the sparrow, R2∈[0,1] and ST∈[0.5,1] represent the alarm value and warning threshold;
[0126] (2) Introduce Cauchy-Gauss mutation to update the follower position:
[0127]
[0128] Where z best is the optimal individual in the population, σ 2 represents the standard deviation of the Cauchy-Gaussian mutation strategy, cauchy(0,σ 2 ) is a random variable that satisfies the Cauchy distribution, Gauss(0,σ 2 ) is a random variable that satisfies the Gaussian distribution, and λ1 and λ2 are dynamic parameters that are adaptively adjusted with the number of iterations.
[0129] (2) Update the scout's location as follows:
[0130]
[0131] Where z best is the current global optimal value, β is a random number drawn from a normal distribution, M is a random number in [0,1], and the constant ε is introduced to prevent the denominator from being 0. is the fitness value of the i-th sparrow, and are the current optimal and worst fitness values.
[0132] In a specific embodiment, in step S4, the optimal SCGSSA-XGBoost fault diagnosis model is used to select the line for the small current grounding fault, the voltage signal and current signal of the small current grounding system to be tested are input, and the line fault type is obtained by the optimal SCGSSA-XGBoost fault diagnosis model.
[0133] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A small current ground fault line selection method based on SCGSSA-XGBoost, characterized in that: The steps include: S1, obtaining a data set, the input of which is the characteristic values of the voltage signal and current signal of the small current grounding system, the output of which is the line fault type, and is divided into a training set and a test set; S2, build an XGBoost fault diagnosis model, optimize the parameters of the XGBoost fault diagnosis model according to the training set, and obtain the optimal SCGSSA-XGBoost fault diagnosis model; S3, testing the optimal SCGSSA-XGBoost fault diagnosis model using the test set; S4, collect the voltage signal and current signal of the small current grounding system to be tested, input them into the optimal SCGSSA-XGBoost fault diagnosis model obtained in step S2, output the line fault type, and complete the fault line selection.
2. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 1 is characterized in that: In step S1, a fixed-length window is used to divide the current signal and voltage signal of each collected small current grounding system into multiple data samples; and the corresponding state transition One-hot encoding is used as a label to construct a small current grounding fault sample.
3. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 1 is characterized in that: In step S2, the parameters of the XGBoost fault diagnosis model are optimized using the SCGSSA algorithm to obtain the optimal SCGSSA-XGBoost fault diagnosis model. The specific steps are as follows: S201, initializing the sparrow search algorithm and setting the sparrow model parameters; S202, setting the XGBoost model and the parameter range to be optimized, and initializing the sparrow population; S203, calculating the fitness value of each sparrow according to the obtained sparrow population; S204, sorting the obtained fitness values and locating the current global best position; S205, update the individual positions of sparrows in various groups; S206, the above process is iterated continuously until the stop condition is met, and the parameters corresponding to the optimal sparrow position can be output; S207, substitute the iterated hyperparameters into the XGBoost model to obtain the optimal SCGSSA-XGBoost fault diagnosis model after training.
4. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 3 is characterized in that: In step S201, the sparrow search algorithm is initialized, as follows: In the formula, Z represents a population of n sparrows, each sparrow represents a parameter configuration, d is the dimension of the variable to be optimized, and the sparrow fitness is expressed as: In the formula, Φ Z The value of each row represents the fitness of an individual.
5. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 3 is characterized in that: In step S201, the sparrow model parameters are set as follows: the population size n, the maximum number of iterations Iter max , discoverer proportion PD, scout proportion SD, warning threshold R2, safety threshold ST.
6. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 3 is characterized in that: In step S202, the parameters to be optimized of the XGBoost model are set as follows: learning rate, number of decision trees, depth of tree construction, sampling rate of randomly sampled training samples, feature sampling rate when generating trees, L2 regularization term parameters, and determining the minimum leaf node weight.
7. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 3 is characterized in that: In step S202, the sparrow population is initialized using a reverse learning method that integrates the refraction principle. The specific formula is as follows: k=h / h * In the formula, z i,j is the position of the i-th sparrow in the population in the j-dimensional space (i=1,2,...,d; j=1,2,...,n), For z i,j The refraction reverse position, l j 、u j are the minimum and maximum values of the jth dimension of the search space, respectively, k is the scaling factor, h and h * are the lengths of the incident and refracted light rays respectively.
8. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 5, characterized in that: In step S205, the SCA sine-cosine algorithm is introduced to update the finder position, and the formula is as follows: In the formula, is the j-dimensional position of the ith individual, t is the current iteration number, Iter max The maximum number of iterations, ω is the nonlinear weight factor introduced to adjust the dependence of the population individual position update on the individual information at this time, is the step search factor, η is the adjustment coefficient, r2∈[0,2π] is a random number that determines the moving distance of the sparrow, r3∈[0,2π] is a random number that controls the influence of the optimal individual on the next position of the sparrow, R2∈[0,1] and ST∈[0.5,1] represent the alarm value and warning threshold.
9. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 5, characterized in that: In step S205, the Cauchy-Gaussian mutation is introduced to update the follower position: In the formula, z best is the optimal individual in the population, σ 2 represents the standard deviation of the Cauchy-Gaussian mutation strategy, cauchy(0,σ 2 ) is a random variable that satisfies the Cauchy distribution, Gauss(0,σ 2 ) is a random variable that satisfies Gaussian distribution, and λ1 and λ2 are dynamic parameters that are adaptively adjusted with the number of iterations.
10. The method for selecting a small current ground fault line based on SCGSSA-XGBoost according to claim 5, characterized in that: In step S205, the scout position is updated as follows: In the formula, z best is the current global optimal value, β is a random number drawn from a normal distribution, M is a random number in [0,1], and the constant ε is introduced to prevent the denominator from being 0. is the fitness value of the i-th sparrow, and are the current optimal and worst fitness values.
Citation Information
Patent Citations
Single-phase fault identification and classification method for low-voltage neutral ungrounded system
CN110991240A
Complementary recording method and system for missing data of Beidou short message
CN115278774A
Dynamic resource allocation method of big data processing framework based on SSA-XGboost algorithm
CN115794405A
Power system stabilizer parameter optimization method based on improved sparrow algorithm
CN115859599A
Model parameter optimization method and device based on improved sparrow search algorithm
CN116596021A