Voltage stabilization method for optimizing gradient elevator based on multi-strategy grey wolf algorithm
Through the voltage stabilization method of optimizing the gradient elevator based on the multi-strategy Gray Wolf algorithm, the voltage stability problem of power supply systems in rural areas is solved, and accurate prediction and voltage stabilization of future voltages are achieved, ensuring the stability and safety of power supply.
Patent Information
- Application Number
- CN202411965140.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
AI Technical Summary
Rural areas face multiple problems between voltage stability of power supply system and power supply and electricity demand in the process of promoting electric heating equipment, which affects the quality of power supply and threatens the lives and property safety of residents.
The voltage stabilization method based on the multi-strategy gray wolf algorithm is adopted to optimize the gradient elevator model, and the multi-strategy gray wolf algorithm is used to optimize the gradient elevator model to predict future voltage, realize voltage stabilization, and ensure the stability of power supply in rural areas.
It improves the accuracy of voltage prediction and the reliability of voltage regulation, ensures the stability of power supply in rural areas, and provides reliable algorithm support for accurate control for household voltage regulation devices.
Smart Images

Figure BDA0005218163920000041 
Figure BDA0005218163920000042
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of live working, and in particular to a voltage stabilization method based on a multi-strategy grey wolf algorithm to optimize a gradient boosting machine. Background Art
[0002] In the process of promoting electric heating equipment, rural areas are faced with multiple problems such as voltage stability of the power supply system and the relationship between power supply and power demand. These problems not only affect the quality of power supply, but may also pose a threat to the safety of residents' lives and property. At the same time, efforts are being made to upgrade and transform rural power grids, and batches of rural power grid transformation projects are being launched to accelerate the construction of power grid infrastructure and build a safe, reliable, economically reasonable, and durable rural power grid. Therefore, a voltage stabilization method is used to ensure the stability of power supply in rural areas. Summary of the invention
[0003] The present invention provides a voltage stabilization method based on multi-strategy grey wolf algorithm to optimize the gradient boosting machine. By optimizing the gradient boosting machine model with multi-strategy grey wolf algorithm, the future voltage is predicted, voltage stabilization is achieved, and the stability of power supply in rural areas is ensured.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A voltage stabilization method based on multi-strategy grey wolf algorithm to optimize gradient boosting machine includes the following steps:
[0006] S1. Set the parameters of the gray wolf optimization algorithm, initialize the positions of the gray wolf population, and use these positions as candidate values of the parameters of the gradient boosting model;
[0007] S2. Use the training data set to train the gradient boosting machine model and evaluate the fitness of the gradient boosting machine model;
[0008] S3. According to the fitness results of the evaluation, the multi-strategy grey wolf algorithm is used to optimize the gradient boosting machine model;
[0009] S4, check whether the optimal solution of the gradient boosting machine model meets the termination condition. If the termination condition is met, output the optimal gradient boosting machine model parameters; otherwise, return to step S2 to continue iteration;
[0010] S5. Use the optimal gradient boosting machine model parameters to train the training data set to obtain the final model, and use the test data set to evaluate the performance of the final model;
[0011] S6. Multi-strategy Grey Wolf Algorithm optimizes the gradient boosting machine model to collect voltage, current and power factor in real time and predict future voltage.
[0012] Furthermore, the method for constructing the gradient boosting machine model includes the following steps:
[0013] (1) Initial model: a constant value is used as the prediction model, denoted as F0(x);
[0014] (2) Gradually improve the model: At each step m, use the decision tree model h m (x) Correct the error of the previous step;
[0015] (3) Calculate the residual: Calculate the current model F m-1 The difference between (x) and the actual target value, i.e. the residual, is denoted as r i :
[0016] r i =y i -F m-1 (x i ) (1)
[0017] Among them, y i is the target value of the ith sample, x i is the eigenvalue of the i-th sample;
[0018] (4) Fitting model: Use the residual to fit the model h m (x) is fitted to obtain a new model h m1 (x);
[0019] (5) Update the model: Update the new model h m1 (x) Add to an existing model:
[0020] F m (x) = F m-1 (x)+γh m1 (x) (2)
[0021] Among them, γ is the learning rate, which controls the contribution of each tree to the final model;
[0022] (6) Repeat steps: Repeat steps (3) to (5) until the model reaches the predetermined number of trees or the error reaches the set standard.
[0023] Furthermore, the multi-strategy grey wolf algorithm comprises the following steps:
[0024] (1) Initialize the group;
[0025] (2) Determine the top three best gray wolves as the optimal solution Alpha, the second-best solution Beta, and the third-best solution Delta. When dealing with multi-objective optimization problems, a non-dominated sorting or multi-objective selection strategy is used to determine the leader;
[0026] (3) Calculate the distance between the current gray wolf and Alpha, Beta, and Delta, and introduce the Chebyshev distance method to optimize the distance calculation. These distances are used to simulate the relative positions between the migrant wolf and the wolf leader, deputy, and military advisor. According to the positions of Alpha, Beta, and Delta, update the position of each migrant wolf X;
[0027] (4) Determine the final solution.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1) By training the decision tree model and combining it with the gradient boosting machine model, the overall prediction performance is improved;
[0030] 2) Based on the Grey Wolf Optimization Algorithm, a variety of strategies are introduced to improve the performance of the optimization algorithm, and the effective gradient boosting machine is optimized to ensure its stability and adaptability;
[0031] 3) The gradient boosting machine model optimized by the multi-strategy Grey Wolf algorithm can collect data such as voltage, current, and power factor in real time, predict future voltage, and achieve voltage stabilization, providing reliable algorithm support for the precise control of household voltage stabilization devices in rural areas. DETAILED DESCRIPTION
[0032] The specific embodiments of the present invention are further described below:
[0033] The present invention provides a voltage stabilization method based on a multi-strategy grey wolf algorithm to optimize a gradient boosting machine, comprising the following steps:
[0034] S1, initialization: set the parameters of the gray wolf optimization algorithm, such as population size, maximum number of iterations, etc., and initialize the positions of the gray wolf population, which will be used as candidate values of the parameters of the gradient boosting model;
[0035] S2. Evaluate fitness: Use the training data set to train the gradient boosting machine model, and evaluate the fitness of each individual gray wolf based on the performance on the validation data set. The fitness function can be selected according to the specific task, such as classification accuracy, regression error, etc.
[0036] S3. Update the gray wolf population: Update the position of the gray wolf population according to the result of the fitness function, and adopt improved strategies in the multi-strategy gray wolf algorithm, such as adjusting control parameters, introducing new search strategies, and improving the leader update mechanism, to optimize the position of the gray wolf population.
[0037] S4, check termination conditions: check whether the maximum number of iterations is reached or other termination conditions are met. If the termination conditions are met, output the optimal gradient boosting machine model parameters; otherwise, return to step S2 to continue iterating.
[0038] S5. Train the final model:
[0039] The training data set is trained using the optimal gradient boosting machine model parameters to obtain the final model, and the performance of the final model is evaluated using the test data set.
[0040] The multi-strategy grey wolf algorithm comprises the following steps:
[0041] 1) Initialize the group:
[0042] (1) Generate an initial population: Randomly generate a population of N search agent gray wolves, each of which represents a possible solution in the solution space;
[0043] (2) Initialization parameters: set the number of algorithm iterations, the number of search agents, etc.
[0044] 2) Determine Alpha, Beta and Delta:
[0045] (1) Evaluate fitness: Calculate the fitness of each search agent gray wolf;
[0046] (2) Leader selection: According to fitness, the top three best gray wolves are selected as the optimal solution Alpha, the second-best solution Beta, and the third-best solution Delta. When dealing with multi-objective optimization problems, non-dominated sorting or other multi-objective selection strategies are used to determine the leader.
[0047] 3) Iterative optimization process: For each iteration: update the position of each worker X according to the positions of Alpha, Beta and Delta;
[0048] (1) This step is to calculate the distance between the current gray wolf and Alpha, Beta, and Delta; the distance calculation is optimized by introducing the Chebyshev distance method; these distances are used to simulate the relative positions between the working wolf and the wolf leader, deputy, and military advisor. The distance calculation formula is as follows:
[0049]
[0050] Among them, X α , X β , X δ They represent the positions of Alpha, Beta, and Delta respectively. X is the current position of the working wolf. C1, C2, and C3 are random coefficient vectors used to simulate the randomness of the gray wolf's movement near its prey. This randomness simulates the possible uncertainty and changing behavior of the gray wolf pack when tracking its prey. The value of C is randomly generated between 0 and 2, which helps to explore different areas of the solution space and prevent the algorithm from falling into a local optimal solution too early.
[0051] (2) Position update: The position update of the migrant wolf is based on its distance from Alpha, Beta, and Delta. This update simulates the gray wolf's estimation of the prey's position and corresponding movement during the hunting process. The formula for position update is as follows:
[0052]
[0053] Here, X new is the new position of the gray wolf. A1, A2, and A3 are another set of dynamic coefficients, which determine the intensity and direction of the gray wolf's movement toward the prey. The values of these coefficients affect the tightness of the gray wolf's encirclement of the prey, thereby affecting the exploratory nature (exploring new areas) and exploitative nature (using known areas) of the search behavior. A starts from 2 and gradually decreases to 0 during the iteration process. This reduction process simulates the behavior of the gray wolf pack gradually approaching the prey during the hunting process. When the value of A is close to 0, the gray wolf pack is more inclined to search the surrounding area in detail to find the optimal solution; when the value of A is large, the gray wolf pack may conduct a more extensive search in the solution space.
[0054] (3) Update the positions of Alpha, Beta, and Delta;
[0055] After each iteration, the current best few gray wolves are retained as elite individuals, and their positions are used as one of the candidate solutions in the next round of iteration to accelerate the convergence process of the algorithm. After the working wolves update their position results, the best three working wolves are evaluated to become the new Alpha, Beta and Delta respectively.
[0056] 4) Optimal solution: There are many ways to determine the final solution. For example, after reaching the maximum number of iterations, the solution represented by Alpha is considered to be the best solution. You can also consider the decisions of the wolf leader, deputy and military comprehensively, that is,
[0057]
[0058] The Gradient Boosting Machines (GBM) is an ensemble learning algorithm mainly used for regression and classification problems. It essentially trains a series of simple models, such as decision trees, and then combines these models to improve the overall prediction performance.
[0059] Building a gradient boosting machine model includes the following steps:
[0060] (1) Initial model: First, we use a simple model, where a constant value is used as the prediction model, denoted as F0(x).
[0061] (2) Gradually improve the model: At each step m, we use the new model h m (x) to correct the error of the previous step.
[0062] (3) Calculate the residual: Calculate the current model F m-1 The difference (residual) between (x) and the actual target value is denoted by r i :
[0063] r i =y i -F m-1 (x i ) (6)
[0064] Among them, y i is the target value of the ith sample, x i is the eigenvalue of the i-th sample.
[0065] (4) Fitting a new model: Use the residuals to fit this model h m (x), and get the new model h m1 (x), that is, h m1 (x) predict the residual as much as possible.
[0066] (5) Update the model; add the new model to the existing model:
[0067] Fm ( x)=F m- 1(x)+γh m1 (x) (7)
[0068] Where γ is the learning rate, which controls how much each tree contributes to the final model.
[0069] (6) Repeating steps: Repeat steps (3) to (5) until the model reaches a predetermined number of trees (i.e., the number of iterations) or the error reaches a certain standard.
[0070] The above embodiments are implemented based on the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the above embodiments. The methods used in the above embodiments are conventional methods unless otherwise specified.
Claims
1. A voltage stabilization method based on multi-strategy grey wolf algorithm to optimize gradient boosting machine, characterized in that: The steps include: S1. Set the parameters of the gray wolf optimization algorithm, initialize the positions of the gray wolf population, and use these positions as candidate values of the parameters of the gradient boosting model; S2. Use the training data set to train the gradient boosting machine model and evaluate the fitness of the gradient boosting machine model; S3. According to the fitness results of the evaluation, the multi-strategy grey wolf algorithm is used to optimize the gradient boosting machine model; S4, check whether the optimal solution of the gradient boosting machine model meets the termination condition. If the termination condition is met, output the optimal gradient boosting machine model parameters; otherwise, return to step S2 to continue iteration; S5. Use the optimal gradient boosting machine model parameters to train the training data set to obtain the final model, and use the test data set to evaluate the performance of the final model; S6. Multi-strategy Grey Wolf Algorithm optimizes the gradient boosting machine model to collect voltage, current and power factor in real time and predict future voltage.
2. According to claim 1, a voltage stabilization method based on multi-strategy gray wolf algorithm to optimize the gradient boosting machine is characterized in that: The method for constructing the gradient boosting machine model comprises the following steps: (1) Initial model: a constant value is used as the prediction model, denoted as F0(x); (2) Gradually improve the model: At each step m, use the decision tree model h m (x) Correct the error of the previous step; (3) Calculate the residual: Calculate the current model F m-1 The difference between (x) and the actual target value, i.e. the residual, is denoted as r i : r i =y i -F m-1 (x i ) (1) Among them, y i is the target value of the ith sample, x i is the eigenvalue of the i-th sample; (4) Fitting model: Use the residual to fit the model h m (x) is fitted to obtain a new model h m1 (x); (5) Update the model: Update the new model h m1 (x) Add to an existing model: F m (x)=F m-1 (x)+γh m1 (x) (2) Among them, γ is the learning rate, which controls the contribution of each tree to the final model; (6) Repeat steps: Repeat steps (3) to (5) until the model reaches the predetermined number of trees or the error reaches the set standard.
3. According to claim 1, a voltage stabilization method based on multi-strategy gray wolf algorithm to optimize the gradient boosting machine is characterized in that: The multi-strategy grey wolf algorithm comprises the following steps: (1) Initialize the group; (2) Determine the top three best gray wolves as the optimal solution Alpha, the second-best solution Beta, and the third-best solution Delta. When dealing with multi-objective optimization problems, a non-dominated sorting or multi-objective selection strategy is used to determine the leader; (3) Calculate the distance between the current gray wolf and Alpha, Beta, and Delta, and introduce the Chebyshev distance method to optimize the distance calculation. These distances are used to simulate the relative positions between the migrant wolf and the wolf leader, deputy, and military advisor. According to the positions of Alpha, Beta, and Delta, update the position of each migrant wolf X; (4) Determine the final solution.