Differential evolution optimization-based Lasso electric energy quality index prediction model

A differential evolution optimized Lasso regression model addresses the challenges of distributed photovoltaic integration by accurately predicting electrical quality indicators, enhancing grid stability and user electricity quality through dynamic parameter adjustment.

CN120317484APending Publication Date: 2025-07-15ANSHAN POWER SUPPLY COMPANY OF STATE GRID LIAONING ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510294787.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

The integration of high penetrations of distributed photovoltaic systems in power grids leads to issues such as elevated network point voltages, intermittent power fluctuations, and adverse effects on electrical quality indicators like harmonics, voltage flicker, and three-phase imbalance, posing risks to grid stability and user electricity quality.

Method used

A differential evolution optimized Lasso regression model is developed to predict electrical quality indicators, using differential evolution to optimize Lasso regression parameters for accurate prediction, enabling timely corrective measures.

Benefits of technology

The model enhances prediction accuracy and robustness, allowing for proactive identification and mitigation of potential electrical quality issues, ensuring grid stability and user electricity quality by dynamically adjusting to power fluctuations and harmonics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005309675300000024
    Figure BDA0005309675300000024
  • Figure BDA0005309675300000031
    Figure BDA0005309675300000031
  • Figure BDA0005309675300000054
    Figure BDA0005309675300000054
Patent Text Reader

Abstract

The invention relates to the technical field of hot-line work, in particular to a Lasso electric energy quality index prediction model based on differential evolution optimization, which comprises the steps of collecting electric energy index data, preprocessing the data, constructing a feature matrix and a target variable matrix, and constructing a Lasso regression electric energy quality index prediction model. A Lasso regression power quality index prediction model is optimized through a differential evolution algorithm, prediction is carried out through Lasso regression model parameters optimized through the differential evolution algorithm, the optimized model is applied to a verification set and a test set, the prediction accuracy and stability of the model are evaluated, the prediction model is adjusted according to the prediction result and according to the actual operation condition, and the power quality index prediction accuracy is improved. Integrating the optimized prediction model into an actual photovoltaic cluster power station; according to the method, each electric energy quality index is accurately predicted, and a worker can take corresponding countermeasures through the predicted various electric energy quality indexes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of live working, and particularly relates to a Lasso power quality index prediction model optimized based on differential evolution. Background Art

[0002] Due to a large number of distributed photovoltaics being connected to the end of the distribution network line, the voltage at the grid connection point is lifted during the high-output period, directly affecting the power consumption quality of surrounding users, and even causing the distributed photovoltaics to disconnect from the grid due to excessive voltage at the grid connection point; the power generation power in the high-penetration area of distributed photovoltaics fluctuates greatly intermittently due to weather conditions, and the large fluctuations in photovoltaic output may cause a large jump in the voltage of the 10 kV bus; thirdly, due to the increase in the proportion of power electronics in the high-penetration area of distributed photovoltaics, it has an adverse impact on power quality indicators such as harmonics, voltage flicker, and three-phase imbalance. Summary of the Invention

[0003] The present invention provides a Lasso power quality index prediction model optimized based on differential evolution. By optimizing the regularization parameter of the Lasso regression algorithm through the differential evolution algorithm, an optimal power quality prediction model is obtained to accurately predict various power quality indicators. Through the predicted various power quality indicators, staff can take corresponding countermeasures.

[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0005] A Lasso power quality index prediction model optimized based on differential evolution includes the following steps:

[0006] S1. Collect power quality index data, preprocess the data, and construct a feature matrix and a target variable matrix:

[0007] S2. Construct a Lasso regression power quality index prediction model:

[0008]

[0009] Wherein, Y is a target variable vector, including voltage base change rate, current base change rate, flicker, and frequency target variables; β is a model coefficient vector; is the sum of the squares of the errors between the model prediction value and the actual value; α∥β∥1 is the sum of the L1 norms of the model coefficient vector β;

[0010] S3. Optimize the Lasso regression power quality index prediction model by the differential evolution algorithm;

[0011] S4. Use the Lasso regression model parameters optimized by the differential evolution algorithm for prediction, apply the optimized model to the validation set and the test set, and evaluate its prediction accuracy and stability;

[0012] S5. Adjust the prediction model according to the prediction results to conform to the actual operation situation, and integrate the optimized prediction model into the actual photovoltaic cluster power station.

[0013] Furthermore, the optimization process of the Lasso regression power quality index prediction model regression adopts the coordinate descent method, and the specific steps are as follows:

[0014] S2.1. Initialization: Randomly initialize the coefficient vector β;

[0015] S2.2. Loop update: For each feature j, that is, the coefficient β j , while fixing other coefficients β -j , update β j ;

[0016] S2.3. Update coefficients:

[0017] (1) Calculate the gradient of the objective function with respect to β j :

[0018]

[0019] where X j is the j-th column of the feature matrix X, n is the number of samples, is the transpose of X j , and T represents the transpose;

[0020] (2) Update β j using the soft-threshold operation:

[0021]

[0022] where soft-threshold is the soft-threshold operation;

[0023] where the soft-threshold function is defined as:

[0024]

[0025] where z is the gradient value of the current coefficient;

[0026] S2.4. Iterative convergence: Repeat steps S2.2 and S2.3 until the change in the coefficient vector β is less than the preset threshold or the maximum number of iterations is reached.

[0027] Furthermore, the specific steps of step S3 are as follows:

[0028] S3.1. Randomly generate a set of initial Lasso regression hyperparameters α to form an initial population;

[0029] S3.2. Define the fitness function;

[0030] S3.3. Randomly select three other different individuals for each individual in the population to generate a difference vector v i :

[0031] v i = x r1 + F(x r2 - x r3 )(5)

[0032] where v i is the mutation vector of the i-th individual, used to generate a trial individual; x r1 is the base vector, an individual randomly selected from the current population; (x r2 - x r3 ) is the difference vector, reflecting the difference between two random individuals and used to introduce perturbations; F is the scaling factor, with a value between 0 and 2;

[0033] S3.4. Perform a crossover operation on the difference vector and the original individual to generate a trial individual u i,j :

[0034]

[0035] where x i,j is the value of the j-th parameter of the original individual in the i-th individual, which is the individual parameter in the current population; CR is the crossover concept, with a value between 0 and 1; j rand is a randomly selected parameter dimension to ensure that at least one parameter of the trial individual comes from the mutation variable during the crossover operation;

[0036] S3.5. Compare the trial individual u i with the original individual x i and select the individual with a better fitness function value as a member of the next generation population:

[0037]

[0038] S3.6. Repeat steps 3.3 - 3.5 to gradually optimize the individual parameter α in the population;

[0039] S3.7. After several iterations, select the individual parameter α with the lowest fitness function value as the optimal hyperparameter.

[0040] Furthermore, the power quality indicators include voltage base change rate, current base change rate, voltage flicker, and frequency.

[0041] Compared with the prior art, the beneficial effects of the present invention are:

[0042] Optimize the regularization parameter of the Lasso regression algorithm through the differential evolution algorithm to obtain an optimal power quality prediction model, accurately predict various power quality indicators. Through the predicted various power quality indicators, staff can take corresponding countermeasures to solve problems such as the power consumption quality of users, large fluctuations in the 10 kV bus voltage, harmonics, voltage flicker, and other serious changes in power quality indicators.

[0043] Dynamically optimize the regularization parameter α of the Lasso regression through the differential evolution algorithm, overcome the local optimal limitations of traditional cross-validation or grid search, and achieve global optimal matching of hyperparameters, thereby enhancing the generalization ability and prediction accuracy of the model; the L1 regularization of the Lasso regression naturally has feature sparsity. Combining the precise regulation of α by the differential evolution algorithm, it can adaptively screen key features (such as photovoltaic output, light intensity, time series, etc.) strongly related to power quality indicators, effectively reduce noise interference, and improve the robustness of the model.

[0044] Aiming at the characteristics of intermittent output, frequent voltage fluctuations, and time-varying harmonic content in the high-penetration photovoltaic distribution network, this model uses a dynamic optimization mechanism to adaptively adjust parameters and feature weights, significantly improving the modeling ability for nonlinear and high-dimensional data. The differential evolution algorithm adopts a parallel search strategy. Compared with traditional heuristic algorithms (such as genetic algorithms and particle swarm optimization), it reduces the number of iterations while ensuring global search ability, supports online updating of model parameters, and meets the requirements of real-time monitoring and early warning of power quality. By accurately predicting key indicators such as the fundamental voltage distortion rate, flicker value, and frequency deviation, potential power quality problems (such as 10 kV bus voltage jump and harmonic overstandard) can be identified in advance, guiding maintenance personnel to adjust reactive power compensation devices, photovoltaic inverter control strategies, etc. in a timely manner, avoiding photovoltaic disconnection accidents, and ensuring the power consumption quality of users and the safe and stable operation of the distribution network. Specific implementation manner

[0045] The following further describes the specific implementation manner of the present invention:

[0046] A Lasso power quality index prediction model based on differential evolution optimization of the present invention ensures the accuracy of data such as photovoltaic output power, power consumption, time, light intensity, etc., and performs necessary cleaning and preprocessing, such as missing value processing, outlier detection, and standardization. A Lasso regression model is constructed, and then the Lasso regression is optimized by the differential evolution algorithm. The Lasso regression model parameters optimized by the differential evolution algorithm are used for prediction, and the prediction results are analyzed in detail to ensure that they conform to the actual operation situation, and the prediction model is adjusted to improve accuracy. The specific steps are as follows:

[0047] S1. Data preparation;

[0048] Collect and preprocess data: Ensure the accuracy of data such as photovoltaic output power, power consumption, time, light intensity, etc., and perform necessary cleaning and preprocessing, such as missing value handling, outlier detection, and standardization;

[0049] Construct a feature matrix: Convert features such as time and light intensity into numerical forms suitable for regression models, and construct a feature matrix X and a target variable matrix Y. Among them, Y contains target variables such as voltage base change rate, current base change rate, flicker, and frequency. Construct an n×m-dimensional target variable matrix Y, which contains power quality indicators such as voltage base change rate, current base change rate, voltage flicker value, and frequency. Each column corresponds to an independent target variable.

[0050] S2. Construct a Lasso regression model;

[0051] Initial construction of Lasso regression: Use the original feature matrix X and target variable matrix Y to construct a Lasso regression model. The Lasso regression model aims to select the most predictive features through regularization techniques;

[0052] Lasso regression is a linear regression method with L1 regularization. Its purpose is to simplify the model by penalizing the coefficients of the model while performing feature selection. Lasso regression can achieve a sparse model effect in some cases, that is, the coefficients of some features will be optimized to zero, thereby reducing the number of features;

[0053] Lasso regression power quality index prediction model:

[0054]

[0055] Among them, Y is the target variable vector, which contains target variables such as voltage base change rate, current base change rate, flicker, and frequency; β is the model coefficient vector; is the sum of the squares of the errors between the model prediction value and the actual value, which is the objective function of traditional linear regression. Using the squared error can make the optimization process more stable; α∥β∥1 is the sum of the L1 norms of the model coefficient vector β, that is, the sum of the absolute values of the coefficients; L1 regularization helps to sparse the model, that is, some coefficients can be optimized to zero, thereby achieving the effect of feature selection;

[0056] The optimization process of the Lasso regression power quality index prediction model adopts the coordinate descent method. The coordinate descent method is an iterative optimization algorithm that updates only one coefficient at a time while keeping other coefficients unchanged. The specific steps are as follows:

[0057] S2.1. Initialization: Randomly initialize the coefficient vector β;

[0058] S2.2. Loop update: For each feature j, that is, the coefficient β j, while fixing other coefficients β -j , update β j ;

[0059] S2.3. Coefficient update:

[0060] (1) Calculate the gradient of the objective function with respect to β j :

[0061]

[0062] where X j is the j-th column of the feature matrix X, n is the number of samples, is the transpose of X j , and T represents the transpose;

[0063] (2) Update β using the soft-thresholding operation j :

[0064]

[0065] where soft-threshold is the soft-thresholding operation;

[0066] The soft-threshold function is defined as:

[0067]

[0068] where z is the gradient value of the current coefficient;

[0069] S2.4. Iterative convergence: Repeat steps S2.2 and S2.3 until the change in the coefficient vector β is less than a preset threshold or the maximum number of iterations is reached.

[0070] S3. Optimize the Lasso regression power quality index prediction model using the differential evolution algorithm;

[0071] Differential Evolution Algorithm (DE). In the operation mechanism of the differential evolution algorithm, through the mutual cooperation and healthy competition among individuals within the population, a highly distinctive global search strategy is born. It adopts a real-number coding method, which has more advantages than other coding methods in dealing with some complex problems. Its mutation operation is designed based on the differential idea, which is simple and efficient. And it uses a "one-to-one" competitive survival strategy, which can effectively reduce the complexity and computational amount of operations in the evolutionary calculation process, and avoid problems such as low efficiency caused by complex operations. The differential evolution algorithm has a unique memory ability, which makes it like having an intelligent "navigation system" that can dynamically track the current search progress and situation during the search process. Based on the information obtained, it can flexibly and intelligently adjust its own search strategy. When facing an unknown and complex search space, it can change the exploration direction in a timely manner according to the paths already traveled and the clues discovered. With the synergistic effect of this memory ability and dynamic adjustment strategy, the differential evolution algorithm has a strong global convergence ability and shows high robustness in dealing with various complex optimization problems. Another major advantage of it is that it does not need to rely on specific feature information of the problem. Those complex optimization problems that are difficult or even impossible to solve using conventional mathematical programming methods may be solved by the differential evolution algorithm, providing a powerful tool and method for the optimization and solution of many complex systems. The following is the process of the differential optimization algorithm:

[0072] (1) Initialization

[0073] Initialization is to assign a value to each dimension of each individual in the population to achieve an initialization operation. Each individual is represented as follows:

[0074] x i,G (i = 1, 2,..., NP) (12)

[0075] where i represents the number of the individual in the population, G represents the generation number of evolution, and NP represents the population size;

[0076] In the differential evolution algorithm, it is assumed that all randomly initialized populations conform to a uniform distribution. Let the bounds of the parameter variables be Then

[0077] where is the lower bound (Lower Bound) of the jth parameter, that is, the minimum value allowed for this parameter; is the upper bound of the j-th parameter, that is, the maximum value allowed for this parameter; rand[0,1] represents generating a uniform real number between [0,1]. If the probability distribution of the solution can be known in advance, there is no need to generate uniformly. Instead, according to its distribution law, a solution covering more information can be generated, thereby improving the reconstruction effect;

[0078] (2) Mutation

[0079] After generating the initial population, the mutation operation is carried out. For each target x i,G (i = 1, 2,..., NP), the generation method of the mutation vector of the basic differential evolution algorithm is as follows:

[0080]

[0081] Among them, it is required that the randomly selected individual numbers r1, r2, and r3 are not the same as each other, and also not the same as the target vector number i. Therefore, the population size NP≥4 must be satisfied;

[0082] The mutation operator F∈[0,2] is a real constant factor that controls the scaling of the deviation variable;

[0083] (3) Crossover

[0084] In this step, the overall crossover of the mutation vector and the target vector is carried out. To increase the diversity of the interference parameter vector, the crossover operation is introduced, and the test vector becomes:

[0085]

[0086] Among them, u i,G+1 represents the test vector of the i-th individual in the (G + 1)-th generation population; v ji,G+1 represents the candidate value generated by the mutation operation; x ji,G+1 represents the value of the G-th generation in the original population; randb(j) represents the uniformly random number generated in the j-th dimension; CR represents the crossover probability, which controls whether to adopt the mutation value; rnbr(i) represents a randomly selected dimension index for the i-th individual, ensuring that at least one dimension is crossed;

[0087] (4) Selection

[0088] After the above mutation and crossover operations, the differential evolution algorithm compares the trial vector with the target vector x in the current population according to the greedy criterion i,G In the next generation, if the target vector is better, the target vector is selected; if the trial vector is better, the trial vector is selected. It should be noted that the trial vector is only compared with the target vector on an individual basis, rather than all individuals in the existing population;

[0089] (5) Boundary condition handling

[0090] If, during the mutation process, we compile a solution outside the feasible region, which can be understood as the domain of the function variables, i.e.: or then wherein, or indicates that the value of the j-th dimension exceeds the domain is the lower bound of the j-th parameter (Lower Bound), i.e., the minimum value allowed for this parameter; is the upper bound of the j-th parameter (Upper Bound), i.e., the maximum value allowed for this parameter; rand[0,1] represents a random number uniformly distributed in [0,1]; NP represents the population size;

[0091] The differential algorithm has a simple structure, is easy to use, and has good reliability, efficiency, and robustness. For large-space, non-linear, and non-differentiable continuous problems, its solution rate is better than other evolutionary methods;

[0092] The Lasso power quality index prediction model optimized by differential evolution uses differential evolution to optimize the L1 regularization parameter in Lasso regression, and obtains the optimal model through continuous iteration. The specific steps are as follows:

[0093] S3.1. Initialize the population: Randomly generate a set of initial Lasso regression hyperparameters α to form an initial population;

[0094] S3.2. Fitness function: Define the fitness function, which is the mean square error MSE or other prediction error metrics of the model on the validation set;

[0095] S3.3. Generation of differential vectors: Randomly select three other different individuals for each individual in the population to generate a differential vector v i :

[0096] v i = x r1 + F(x r2 - x r3 ) (16)

[0097] wherein, v i is the mutation vector of the i-th individual, used to generate a trial individual; x r1 is the base vector, an individual randomly selected from the current population; (x r2 - x r3 ) is the differential vector, reflecting the difference between two random individuals, used to introduce perturbations; F is the scaling factor, with a value between 0 and 2;

[0098] S3.4. Perform a crossover operation on the differential vector and the original individual to generate a trial individual u i,j :

[0099]

[0100] where x i,j is the value of the j-th parameter of the i-th individual in the original individual, which is the individual parameter in the current population; CR is the crossover concept, with a value between 0 and 1; j rand is a randomly selected parameter dimension to ensure that at least one parameter of the trial individual comes from the mutation variable in the crossover operation;

[0101] S3.5. Selection: Compare the trial individual u i with the original individual x i and select the individual with a better fitness function value as a member of the next generation population:

[0102]

[0103] S3.6. Iteration: Repeat steps 3.3 - 3.5 to gradually optimize the individual parameter α in the population;

[0104] S3.7. Determine the optimal parameter: After several iterations, select the individual parameter α with the lowest fitness function value as the optimal hyperparameter.

[0105] S4. Prediction;

[0106] (1) Apply the optimal parameter: Use the parameters of the Lasso regression model optimized by the differential evolution algorithm for prediction;

[0107] (2) Model verification and testing: Apply the optimized model to the validation set and the test set to evaluate its prediction accuracy and stability, and ensure the effectiveness of the model.

[0108] S5. Result analysis and application;

[0109] (1) Result analysis: Conduct a detailed analysis of the prediction results to ensure that they conform to the actual operating conditions, and adjust the prediction model to improve accuracy.

[0110] (2) System integration and application: Integrate the optimized prediction model into the actual photovoltaic cluster power station for real-time monitoring and control, and further improve the stability and reliability of the system.

[0111] Through the above steps, the differential evolution algorithm can be effectively used to optimize the Lasso regression model to predict power quality indicators such as voltage base change rate, current base change rate, flicker, and frequency of the photovoltaic cluster power station. Based on the predicted power quality indicators, the staff can take corresponding countermeasures.

[0112] The above embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. However, the protection scope of the present invention is not limited to the above embodiments. The methods used in the above embodiments are all conventional methods unless otherwise specified.

Claims

1. A Lasso power quality index prediction model optimized based on differential evolution, characterized in that It includes the following steps: S1. Collect power quality index data, preprocess the data, and construct a feature matrix and a target variable matrix: S2. Construct a Lasso regression power quality index prediction model: Among them, Y is the target variable vector, including the voltage base change rate, current base change rate, flicker, and frequency target variable; β is the model coefficient vector; is the sum of the squares of the errors between the model prediction value and the actual value; α∥β∥1 is the sum of the L1 norms of the model coefficient vector β; S3. Optimize the Lasso regression power quality index prediction model using the differential evolution algorithm; S4. Use the parameters of the Lasso regression model optimized by the differential evolution algorithm for prediction, apply the optimized model to the validation set and the test set, and evaluate its prediction accuracy and stability; S5. Adjust the prediction model according to the prediction results to conform to the actual operation situation, and integrate the optimized prediction model into the actual photovoltaic cluster power station.

2. The Lasso power quality index prediction model based on differential evolution optimization according to claim 1, characterized in that, The optimization process of the Lasso regression power quality index prediction model adopts the coordinate descent method, and the specific steps are as follows: S2.

1. Initialization: Randomly initialize the coefficient vector β; S2.

2. Loop update: For each feature j, i.e., coefficient β j , while fixing other coefficients β -j , update β j ; S2.

3. Update the coefficient: (1) Calculate the gradient of the objective function with respect to β j : where X j is the j-th column of the feature matrix X, n is the number of samples, is X j transposed, and T denotes transpose; (2) Update β using a soft thresholding operation j : where soft-threshold is the soft-threshold operation; where the soft-threshold function is defined as: where z is the gradient value of the current coefficient; S2.

4. Iterative convergence: Repeat steps S2.2 and S2.3 until the change in the coefficient vector β is less than the preset threshold or the maximum number of iterations is reached.

3. A Lasso power quality index prediction model based on differential evolution optimization according to claim 1, characterized in that, The specific steps of step S3 are as follows: S3.

1. Randomly generate a set of initial Lasso regression hyperparameters α to form an initial population; S3.

2. Define the fitness function; S3.

3. Randomly select three other different individuals for each individual in the population to generate a differential vector v i : v i = x r1 + F(x r2 - x r3 ) (5) Among them, v i is the mutation vector of the i-th individual, which is used to generate the trial individual; x r1 is the base vector, an individual randomly selected from the current population; (x r2 - x r3 ) is the difference vector, which reflects the difference between two random individuals and is used to introduce perturbations; F is the scaling factor, and its value ranges from 0 to 2; S3.

4. Cross the difference vector with the original individual to generate a trial individual u i,j : where x i,j is the value of the j-th parameter of the i-th individual for the original individual, which is the individual parameter in the current population; CR is the crossover concept, with a value between 0 and 1; j rand is a randomly selected parameter dimension to ensure that at least one parameter of the trial individual comes from the mutation variable during the crossover operation; S3.

5. Compare the test individual u i with the original individual x i and select the individual with a better fitness function value as a member of the next generation population: S3.

6. Repeat steps 3.3 - 3.5 to gradually optimize the individual parameter α in the population; S3.

7. After several iterations, select the individual parameter α with the lowest fitness function value as the optimal hyperparameter.

4. A Lasso power quality index prediction model optimized based on differential evolution according to claim 1, characterized in that The power quality indexes include voltage base change rate, current base change rate, voltage flicker, and frequency.