Power distribution network closed-loop power supply switching key influence factor evaluation method
By using LASSO regression and an improved XGBoost model, combined with a hierarchical control strategy, the problems of characteristic redundancy and poor control targeting in the traditional distribution network loop transfer assessment are solved, achieving precise control of the loop current and improving the safety and stability of the distribution network.
Patent Information
- Application Number
- CN202610137071.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-19
AI Technical Summary
Traditional methods for assessing the impact factors of power supply in distribution networks are ill-suited to complex scenarios involving multiple coupled factors. This results in biased assessments, insufficient model accuracy, and weak targeting of control measures, potentially leading to safety hazards such as voltage fluctuations and equipment overload.
We employ a LASSO regression model for feature dimensionality reduction, combined with an improved XGBoost model, and generate sample data through parametric scanning and Latin hypercube sampling to construct a closed-loop simulation model of the distribution network. This model monitors the closed-loop current in real time and executes a graded control strategy, quantifies the weights of key influencing factors, and prioritizes them.
It enables precise control of loop current, improves the safety, stability and economy of the distribution network, ensures the timeliness and flexibility of loop operation, and reduces equipment loss and power supply fluctuations.
Smart Images

Figure CN122066152A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distribution network loop operation planning technology, specifically involving a method for evaluating key influencing factors of distribution network loop power transfer. Background Technology
[0002] As a crucial link connecting power sources and users in the power system, the safe and stable operation of the distribution network directly affects the reliability and continuity of power supply. Loop-connected power transfer, an important operation in distribution network operation, enables uninterrupted power supply during fault repair and load transfer scenarios, reducing outage time and economic losses. It has become one of the core means to improve the flexibility and reliability of distribution network power supply. During loop-connected power transfer, the magnitude and stability of the loop current are key factors determining operational safety. It is influenced by a variety of complex factors that are interconnected and interact, forming a high-dimensional, nonlinear relationship. With the continuous expansion of distribution network scale, increasingly complex topology, and a continuously increasing proportion of renewable energy integration, the influencing factors of loop-connected power transfer are becoming increasingly diverse. Accurately identifying key influencing factors and achieving effective control has become an important issue in ensuring the safe and efficient operation of the distribution network, and also presents an urgent need for related technological research.
[0003] Traditional methods for assessing the impact factors of closed-loop power transfer in distribution networks often rely on empirical judgment or simple linear models, making it difficult to cope with complex scenarios involving multiple coupled factors. Some methods only analyze a few single factors, ignoring the interactions between factors, resulting in one-sided assessment results that cannot fully reflect the actual operating status. Other methods fail to effectively screen high-dimensional influencing factors, leading to excessive redundant information, insufficient model accuracy, and low computational efficiency, making it difficult to meet the needs of real-time assessment and control. At the same time, traditional control strategies often adopt a uniform operating mode, lacking quantitative differentiation of the priority of influencing factors, resulting in weak targeted control measures and frequent over- or under-control situations. This not only fails to effectively control the closed-loop current but may also cause new safety hazards such as voltage fluctuations and equipment overload, affecting the stable operation of the distribution network and making it difficult to adapt to the complex and ever-changing operating requirements of modern distribution networks. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a method for evaluating key influencing factors of closed-loop power supply in distribution networks. This method achieves precise control of closed-loop current through real-time monitoring and dynamic execution of control measures. This method solves the problems of feature redundancy, insufficient model accuracy and poor control targeting in traditional evaluation, effectively improves the safety, stability and economy of closed-loop power supply in distribution networks, and has wide application value.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for evaluating key influencing factors of closed-loop power supply in a distribution network includes the following steps: S1: Build a closed-loop simulation model of the distribution network, analyze the initial influencing factors affecting the closed-loop current, and generate multiple sets of sample data through parametric scanning and Latin hypercube sampling, which are divided into training set and test set according to the proportion. S2: Preprocess the initial influencing factors to obtain their high-dimensional features; S3: The LASSO regression model is used to reduce the dimensionality of the preprocessed high-dimensional features. The optimal regularization parameter of the LASSO regression model is determined by cross-validation, and key influencing factors are screened. S4: Based on the selected key influencing factors, an improved XGBoost model is constructed, the model hyperparameters are optimized through grid search, and the model accuracy is evaluated using multiple metrics. S5: Based on the feature importance results output by the improved XGBoost model, the weights of each key influencing factor are quantified and the priority ranking is determined. Based on the priority ranking, a hierarchical control strategy is formulated. The loop current and related parameters are monitored in real time through the distribution network dispatching system, and control measures are initiated and executed according to preset conditions.
[0006] In S1, the distribution network loop simulation model is built using MATLAB / Simulink. Specifically, it includes: creating a new Simulink model file, adding buses, transformers, feeder lines, and load components from the power system library, entering the impedance, length, and capacity parameters of each component, connecting each component according to the actual topology of the distribution network, setting the simulation solver and step size, and then running the model to complete the topology verification.
[0007] In S1, the initial influencing factors include: voltage phase angle differences between buses, power grid topology, differences in the magnitude of comprehensive load, equipment performance, ambient temperature and humidity, electromagnetic interference, network load, user-end equipment, impedance in loops, amplitude deviation of bus voltage, and differences in comprehensive load distribution.
[0008] In S1, the specific process of generating multiple sets of sample data based on the established distribution network loop simulation model through parametric scanning and Latin hypercube sampling is as follows: S1.1: Parametric scanning includes simultaneously solving the closed-loop current based on the electrical equations corresponding to Kirchhoff's laws for five core variables: bus voltage amplitude, voltage phase angle, loop impedance, combined load value, and combined load distribution. The core solution formula is: (1); In equation (1), For loop current, The equivalent voltage difference between the two busbars at the loop closing point. The total resistance of the loop is... For the total reactance of the loop, Total susceptance of the loop; Then, the combination of variable parameters is adjusted in batches using computer-automated scripts, and the closed-loop current response data corresponding to each set of parameter combinations is recorded synchronously. S1.2: Latin hypercube sampling, first determine the total sample size. Divide the interval (0,1) into equal parts. Divide the data into equidistant segments, and randomly select a value from each segment. The data is transformed into sample data that conforms to the operating characteristics of the distribution network through a standard normal distribution mapping. The mapping formula is as follows: (2); (3); In equations (2) and (3), It is the inverse cumulative distribution function of the standard normal distribution. For a standard normally distributed variable, Sample data for distribution network operating parameters. This is the actual operating average value of this parameter. This is the actual operating standard deviation of this parameter; The sample order is then shuffled, and a hash mapping algorithm is used to calculate the hash value of each sample data. The hash value calculation formula is: mod (4); In equation (4), This is the hash weight coefficient. For each dimension of the sample data, The length of the hash table; Samples with duplicate hash values are removed to complete the deduplication process, ensuring that the samples cover different operating scenarios of the power distribution network, and finally forming multiple sets of complete sample data.
[0009] S2, data preprocessing includes standardization and normalization. The calculation formula for standardization is: (5); In equation (5), The data for influencing factors have been standardized. The raw data for a single influencing factor. The arithmetic mean of all the original data for the influencing factors. The standard deviation of all original data for the influencing factors is required to be calculated by traversing all sample data of the influencing factors. and Then, the data for each original influencing factor were transformed one by one; The formula for normalization is: (6); In equation (6), The data has been normalized. The data for influencing factors have been standardized. The minimum value among the standardized data of influencing factors. The maximum value among the standardized data of influencing factors is determined by traversing all the standardized data. and Then, each standardized data point is transformed one by one, so that all data of the influencing factors are finally mapped to the interval [0, 1].
[0010] In the S3, LASSO feature dimensionality reduction, the LASSO regression model expression is: (7); In equation (7), The training set sample number. , For the first The closed-loop current value of each sample. For the regression constant term, For the first The regression coefficients of the initial influencing factors, , For the first The first sample Data after processing of the initial influencing factors For random disturbance terms, It is the total number of initial influencing factors; The parameter estimation formula for LASSO regression is:
[0011] The constraints are:
[0012] In equations (8) and (9), For regularization penalty terms, For penalty items The estimated values of the regression coefficients, It is a vector of regression coefficients. It represents the total number of initial influencing factors.
[0013] In the S3 LASSO feature dimensionality reduction process, the optimal regularization parameter is determined through cross-validation, and key influencing factors are screened. The specific steps are as follows: S3.1: Divide the preprocessed training set data into 10 equal-sized subsets according to the 10-fold cross-validation rule. Each subset contains the same proportion of samples from different running scenarios. S3.2: Each time, select 9 out of 10 subsets as cross-training subsets and the remaining 1 as cross-validation subset. Input the cross-training subsets into the LASSO regression model and take values sequentially within the search range of the regularization parameter t according to the preset step size to train the LASSO regression model under the corresponding parameters. The mean squared error (MSE) is used to calculate the model prediction error for each parameter. The calculation formula is as follows: (10); In equation (10), This represents the number of samples in the cross-validation subset. For the cross-validation subset The true value of the closed-loop current for each sample. The current regularization parameter The predicted values of the model; S3.3: Repeat the above training and error calculation process, using each subset as a cross-validation subset in turn, for a total of 10 times; calculate the value of each regularization parameter. The average of the corresponding 10 prediction errors with standard deviation The calculation formulas are as follows: (11); (12); In equations (11) and (12), For the first The prediction error of the cross-validation; the standard deviation is selected. The smallest parameter is used as the optimal regularization parameter. ; S3.4: Optimal regularization parameters Substituting the values into the LASSO regression parameter estimation formula and considering the constraints, the regression coefficients corresponding to all initial influencing factors are solved using the coordinate descent method. ( ) Set the absolute value of the regression coefficient to be less than a preset threshold. ( Redundant factors were identified and removed, while those with non-zero regression coefficients were retained as key influencing factors. like Then remove the first one. One initial influencing factor; like Then retain the first one. The initial influencing factors are considered as key influencing factors.
[0014] Optimal regularization parameters When substituting into the LASSO regression parameter estimation formula, the following constraints are applied: ; in This refers to the sequence number of the initial influencing factor; This represents the total number of initial influencing factors; For the first The regression coefficients corresponding to the initial influencing factors; The optimal regularization parameter; The regression coefficients corresponding to all initial influencing factors were obtained using the coordinate descent method. The specific process is as follows: By fixing the first For all coefficients except the first one, optimize each coefficient one by one and iterate until convergence. For LASSO regression, the first... coefficients The update is performed according to the following steps: Calculate the inner product : ; Calculate the sum of squares : ; Update according to soft threshold rules : ; in: This refers to the sequence number of the initial influencing factor; For the first The regression coefficients corresponding to the initial influencing factors; The optimal regularization parameter; The index of the training set sample; For the first In the nth sample Data of the initial influencing factors after preprocessing; For the first The closed-loop current value of each sample; For the regression constant term; To exclude the first The serial numbers of the factors other than the initial influencing factors; For the first The regression coefficients corresponding to the initial influencing factors; For the first In the nth sample Data of the initial influencing factors after preprocessing; For the first The inner product corresponding to each initial influencing factor; For the first The sum of squares corresponding to each initial influencing factor; for The sign function, when The time value is ,when The time value is ,when The time value is ; This is a function to find the maximum value. Repeat the above steps to iterate through all of them. The corresponding coefficients are calculated until the change in all coefficients is less than the preset convergence threshold, thus obtaining the regression coefficients for all initial influencing factors. ; In S4, the objective function of the improved XGBoost model in the improved XGBoost modeling optimization is:
[0015] In equation (13), Let be the objective function. The total number of samples, Let the mean squared error loss function be . For the first The true value of the closed-loop current for each sample. For the first Predicted closed-loop current values for each sample. For the total number of decision trees, For the first The regularization term for each decision tree is expressed as follows:
[0016] In equation (14), For the first The function of a decision tree To minimize the loss required for splitting, reduce the parameters. Let be the number of leaf nodes in the k-th decision tree. The L2 regularization coefficient is... For the first The first decision tree The weight values of each leaf node; The objective function is approximated and optimized using a second-order Taylor expansion, with the expansion formula as follows:
[0017] In equation (15): Top bid Let the i-th iteration be the i-th iteration. iteration For the front decision trees for the first The cumulative predicted value of each sample. For the first decision trees for the first The output value of each sample It is the mean squared error loss function. Representing the The true value of the closed-loop current corresponding to each sample. Representative before decision trees for the first The cumulative predicted value of each sample. For the loss function in The first derivative at that point, For the loss function in The second derivative at that point, For the first Regularization terms for each decision tree; loss function in The first derivative at The calculation formula is:
[0018] loss function in Second derivative at The calculation formula is:
[0019] No. The first decision tree The weight values of each leaf node The calculation formula is:
[0020] In equation (19) To be allocated to the A sample set of leaf nodes .
[0021] In S4, the grid search adopts a full permutation traversal method, trains the corresponding improved XGBoost model for each hyperparameter combination, evaluates the model performance through various evaluation methods, and selects the hyperparameter combination with the best performance. Furthermore, the hyperparameter range of the grid search method is as follows: number of trees is 50-200, maximum tree depth is 3-10, learning rate is 0.01-0.5, minimum sample weight of leaf nodes is 1-5, L2 regularization coefficient is 0.1-5.0, and minimum loss reduction parameter required for splitting is 0-2.0. Generating hyperparameter combinations: Suppose there are m hyperparameters to be configured. Let ki (i=1,2,…,m) be the number of possible values for the i-th hyperparameter. Generate all hyperparameter combinations using permutations. The total number of combinations N is the product of the number of values for each hyperparameter, as shown in the formula: (20); Internal subset division: The training set is divided into an internal training subset and an internal validation subset in a 7:3 ratio to ensure that the proportion of distribution network operation scenarios in the two subsets is consistent with that in the original training set. Model training and error calculation: For each hyperparameter combination, the improved XGBoost model is trained using the selected key influencing factors as input features and the internal training subset. The model is iterated according to a preset number of training iterations, and the iteration terminates when the root mean square error of the internal validation subset does not decrease for 50 consecutive rounds.
[0022] The model accuracy is evaluated using multiple metrics, specifically the following four performance metrics of the improved XGBoost model calculated on the test set: Mean absolute percentage error:
[0023] Mean absolute error:
[0024] Maximum error:
[0025] Fit coefficients:
[0026] In equations (21), (22), (23), and (24), The arithmetic mean of the true values of the closed-loop current for all samples. RMS reflects the overall deviation between the predicted and actual values, MAPE reflects the relative error, and MAE reflects the mean absolute deviation between the predicted and actual values. Reflecting the extreme deviation between predicted and actual values, This reflects the model's ability to interpret real data. It is the total number of samples. It is the first The true value of the closed-loop current for each sample. It is the first Predicted closed-loop current values for each sample; In step S5, quantifying the weights of each key influencing factor and determining their priority ranking specifically includes: obtaining the feature importance score output by the improved XGBoost model, which represents the contribution of each key influencing factor to the model's prediction of the closed-loop current; normalizing the feature importance score; and calculating the weight value of each key influencing factor. The calculation formula is: (16); In equation (16), For the first Characteristic importance scores of key influencing factors The total number of key influencing factors. It is the sum of the characteristic importance scores of all key influencing factors; Based on the calculated weight values All key influencing factors are sorted from largest to smallest to obtain a priority list; Factors with the highest weight are classified as the top 20% of influencing factors, the next 30% as medium priority, the next 30% as second-highest priority, and the last 20% as lowest priority.
[0027] The control measures are initiated and executed according to preset conditions, specifically including: the preset threshold for initiating control is the real-time monitored closed-loop current value. The current continuously exceeds the rated current of the relevant electrical equipment at the loop closure point. 1.1 times, which satisfies the condition:
[0028] When the aforementioned control threshold condition is met, the distribution network dispatching system automatically initiates control measures targeting the highest priority key influencing factors according to the priority ranking list. After each level of control measure is executed, the loop current value is re-monitored at fixed monitoring intervals, and it is determined that: if the loop current value drops to the range of 0.8 to 1.1 times the rated current of the equipment and remains stable within this range for more than 3 seconds, the entire control process is terminated; if this stability condition is still not met, the control measures of the next priority level are automatically initiated, and so on, until the current stabilizes or all preset control measures are completed.
[0029] Furthermore, the highest priority flexible loop closing device has a response time of ≤50ms and a phase angle adjustment range of -5° to +5°; The impedance adjustment range of the medium-priority adjustable current-limiting reactor is 5-10Ω, with an adjustment step of 0.5Ω. The connection point is located on the feeder line within 1km on both sides of the loop connection point. The accuracy of the second-highest priority load redistribution is ≤5%, the user-end voltage deviation during the transfer process is ≤±7%, and the frequency deviation is ≤±0.2Hz; The lowest priority bus voltage amplitude difference control target is ±5%, the capacity of a single parallel capacitor bank is 100-500kvar, the main transformer tap adjustment step size is ±1.25%, and the adjustment sequence is capacitor switching first, followed by tap adjustment.
[0030] The main beneficial effects of this invention are as follows: I. This invention constructs a systematic evaluation system for key influencing factors of closed-loop power supply in distribution networks by integrating LASSO regression and an improved XGBoost algorithm. First, the regularization properties of LASSO regression are used to accurately screen high-dimensional initial influencing factors, eliminating redundant features and focusing on core key factors, providing high-quality input for subsequent modeling. Then, the objective function and hyperparameter configuration are optimized by improving the XGBoost model, and multiple performance evaluation indicators are combined to comprehensively improve the model's prediction accuracy and stability, achieving accurate quantification and weight ranking of factors influencing closed-loop current. This algorithmic fusion mode not only solves the problems of high feature dimensionality and large interference from redundant information in traditional evaluation methods, but also overcomes the shortcomings of insufficient generalization ability of single models, making the evaluation of influencing factors more targeted and reliable, and providing solid data support and technical guarantee for the precise control of closed-loop power supply in distribution networks.
[0031] Second, this invention constructs a comprehensive sample dataset covering different operating scenarios through simulation modeling and scientific sampling methods. Combined with standardized and normalized data preprocessing procedures, it ensures data quality and consistency. Based on the feature importance results output by the model, it formulates hierarchical control strategies and matches differentiated control measures according to priority. Through real-time monitoring and dynamic adjustment mechanisms, it achieves efficient control of loop current. This whole-process optimization design from data construction to strategy execution not only ensures the comprehensiveness and accuracy of influencing factor evaluation, but also improves the timeliness and flexibility of loop power transfer control in the distribution network, effectively reducing the risk of loop operation, reducing equipment loss and power supply fluctuations, and ensuring the safety, stability and economy of distribution network operation. Attached Figure Description
[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 Flowchart of the evaluation method for key influencing factors of power supply loop switching in distribution network; Figure 2 This is a simulation topology diagram of the distribution network loop in this embodiment; Figure 3 This is a correlation analysis diagram of the factors affecting the closed-loop current of the distribution network in this embodiment; Figure 4 This is a comparison chart of the accuracy evaluation metrics for the improved XGBoost model in this embodiment. Detailed Implementation
[0033] Example 1: This embodiment, considering the actual operation and maintenance needs of the mainstream application voltage level of 10kV distribution network and loop-connected power supply, uses LASSO regression and an improved XGBoost algorithm to evaluate key influencing factors and implement tiered control, aiming to improve the success rate of loop-connected operations and power supply reliability. Figure 1 As shown, a method for evaluating key influencing factors of power distribution network loop switching includes the following steps: S1: Build a closed-loop simulation model of the distribution network, analyze the initial influencing factors affecting the closed-loop current, and generate multiple sets of sample data through parametric scanning and Latin hypercube sampling, which are divided into training set and test set according to the proportion. S2: Preprocess the initial influencing factors to obtain their high-dimensional features; S3: The LASSO regression model is used to reduce the dimensionality of the preprocessed high-dimensional features. The optimal regularization parameter of the LASSO regression model is determined by cross-validation, and key influencing factors are screened. S4: Based on the selected key influencing factors, an improved XGBoost model is constructed, the model hyperparameters are optimized through grid search, and the model accuracy is evaluated using multiple metrics. S5: Based on the feature importance results output by the improved XGBoost model, the weights of each key influencing factor are quantified and the priority ranking is determined. Based on the priority ranking, a hierarchical control strategy is formulated. The loop current and related parameters are monitored in real time through the distribution network dispatching system, and control measures are initiated and executed according to preset conditions.
[0034] In S1, the distribution network loop simulation model is built using MATLAB / Simulink. Specifically, this includes: creating a new Simulink model file; adding buses, transformers, feeder lines, and load components from the power system library; inputting the impedance, length, and capacity parameters of each component; connecting the components according to the actual distribution network topology; setting the simulation solver and step size; and running the model to complete topology verification. Figure 2 As shown.
[0035] In S1, the initial influencing factors include: voltage phase angle differences between buses, power grid topology, differences in the magnitude of comprehensive load, equipment performance, ambient temperature and humidity, electromagnetic interference, network load, user-end equipment, impedance in loops, amplitude deviation of bus voltage, and differences in comprehensive load distribution.
[0036] In S1, the specific process of generating multiple sets of sample data based on the established distribution network loop simulation model through parametric scanning and Latin hypercube sampling is as follows: S1.1: Parametric scanning includes simultaneously solving the closed-loop current based on the electrical equations corresponding to Kirchhoff's laws for five core variables: 10kV bus voltage amplitude, voltage phase angle, loop impedance, comprehensive load value, and comprehensive load distribution. The core solution formula is: (1); In equation (1), For loop current, The equivalent voltage difference between the two busbars at the loop closing point. The total resistance of the loop is... For the total reactance of the loop, Total susceptance of the loop; Then, the combination of variable parameters is adjusted in batches using computer-automated scripts, and the closed-loop current response data corresponding to each set of parameter combinations is recorded synchronously. S1.2: Latin hypercube sampling, first determine the total sample size. Divide the interval (0,1) into equal parts. Divide the data into equidistant segments, and randomly select a value from each segment. The data is transformed into sample data that conforms to the operating characteristics of the distribution network through a standard normal distribution mapping. The mapping formula is as follows: (2); (3); In equations (2) and (3), It is the inverse cumulative distribution function of the standard normal distribution. For a standard normally distributed variable, Sample data for distribution network operating parameters. This is the actual operating average value of this parameter. This is the actual operating standard deviation of this parameter; The sample order is then shuffled, and a hash mapping algorithm is used to calculate the hash value of each sample data. The hash value calculation formula is: mod (4); In equation (4), This is the hash weight coefficient. For each dimension of the sample data, The length of the hash table; Samples with duplicate hash values are removed to complete the deduplication process, ensuring that the samples cover different operating scenarios of the power distribution network, and finally forming multiple sets of complete sample data.
[0037] S2, data preprocessing includes standardization and normalization. The calculation formula for standardization is: (5); In equation (5), The data for influencing factors have been standardized. The raw data for a single influencing factor. The arithmetic mean of all the original data for the influencing factors. The standard deviation of all original data for the influencing factors is required to be calculated by traversing all sample data of the influencing factors. and Then, the data for each original influencing factor were transformed one by one; The formula for normalization is: (6); In equation (6), The data has been normalized. The data for influencing factors have been standardized. The minimum value among the standardized data of influencing factors. The maximum value among the standardized data of influencing factors is determined by traversing all the standardized data. and Then, each standardized data point is transformed one by one, so that all data of the influencing factors are finally mapped to the interval [0, 1].
[0038] In the S3, LASSO feature dimensionality reduction, the LASSO regression model expression is: (7); In equation (7), The training set sample number. , For the first The closed-loop current value of each sample. For the regression constant term, For the first The regression coefficients of the initial influencing factors, , For the first The first sample Data after processing of the initial influencing factors For random disturbance terms, It is the total number of initial influencing factors; The parameter estimation formula for LASSO regression is:
[0039] The constraints are:
[0040] In equations (8) and (9), For regularization penalty terms, For penalty items The estimated values of the regression coefficients, It is a vector of regression coefficients. It represents the total number of initial influencing factors.
[0041] In the S3 LASSO feature dimensionality reduction process, the optimal regularization parameter is determined through cross-validation, and key influencing factors are screened. The specific steps are as follows: S3.1: Divide the preprocessed training set data into 10 equal-sized subsets according to the 10-fold cross-validation rule. Each subset contains the same proportion of samples from different running scenarios. S3.2: Each time, select 9 out of 10 subsets as cross-training subsets and the remaining 1 as cross-validation subset. Input the cross-training subsets into the LASSO regression model and take values in the search range of regularization parameter t [0.001, 1.0] with a step size of 0.001 to train the LASSO regression model under the corresponding parameters. The mean squared error (MSE) is used to calculate the model prediction error for each parameter. The calculation formula is as follows: (10); In equation (10), This represents the number of samples in the cross-validation subset. For the cross-validation subset The true value of the closed-loop current for each sample. The current regularization parameter The predicted values of the model; S3.3: Repeat the above training and error calculation process, using each subset as a cross-validation subset in turn, for a total of 10 times; calculate the value of each regularization parameter. The average of the corresponding 10 prediction errors with standard deviation The calculation formulas are as follows: (11); (12); In the formula, For the first The prediction error of the cross-validation; the standard deviation is selected. The smallest parameter is used as the optimal regularization parameter. ; S3.4: Optimal regularization parameters Substituting the values into the LASSO regression parameter estimation formula and considering the constraints, the regression coefficients corresponding to all initial influencing factors are solved using the coordinate descent method. ( ) Set the absolute value of the regression coefficient to be less than The factors that are redundant features are eliminated, and the features with non-zero regression coefficients are retained as key influencing factors. like Then remove the first one. One initial influencing factor; like Then retain the first one. One initial influencing factor is considered as a key influencing factor; Optimal regularization parameters When substituting into the LASSO regression parameter estimation formula, the following constraints are applied: ; in This refers to the sequence number of the initial influencing factor; This represents the total number of initial influencing factors; For the first The regression coefficients corresponding to the initial influencing factors; The optimal regularization parameter; The regression coefficients corresponding to all initial influencing factors were obtained using the coordinate descent method. The specific process is as follows: By fixing the first For all coefficients except the first one, optimize each coefficient one by one and iterate until convergence. For LASSO regression, the first... coefficients The update is performed according to the following steps: Calculate the inner product : ; Calculate the sum of squares : ; Update according to soft threshold rules : ; in: This refers to the sequence number of the initial influencing factor; For the first The regression coefficients corresponding to the initial influencing factors; The optimal regularization parameter; The index of the training set sample; For the first In the nth sample Data of the initial influencing factors after preprocessing; For the first The closed-loop current value of each sample; For the regression constant term; To exclude the first The serial numbers of the factors other than the initial influencing factors; For the first The regression coefficients corresponding to the initial influencing factors; For the first In the nth sample Data of the initial influencing factors after preprocessing; For the first The inner product corresponding to each initial influencing factor; For the first The sum of squares corresponding to each initial influencing factor; for The sign function, when The time value is ,when The time value is ,when The time value is ; This is a function to find the maximum value. Repeat the above steps to iterate through all of them. The corresponding coefficients are calculated until the change in all coefficients is less than the preset convergence threshold, thus obtaining the regression coefficients for all initial influencing factors. ; Ultimately, five key influencing factors were identified: 10kV bus voltage phase angle difference, power grid topology, differences in overall load size, loop impedance, and bus voltage amplitude difference. Figure 3 As shown.
[0042] In S4, the objective function of the improved XGBoost model in the improved XGBoost modeling optimization is:
[0043] In equation (13), Let be the objective function. The total number of samples, Let the mean squared error loss function be . For the first The true value of the closed-loop current for each sample. For the first Predicted closed-loop current values for each sample. For the total number of decision trees, For the first The regularization term for each decision tree is expressed as follows:
[0044] In equation (14), For the first The function of a decision tree To minimize the loss required for splitting, reduce the parameters. Let be the number of leaf nodes in the k-th decision tree. The L2 regularization coefficient is... For the first The first decision tree The weight values of each leaf node; The objective function is approximated and optimized using a second-order Taylor expansion, with the expansion formula as follows:
[0045] In equation (15): Top bid Let the i-th iteration be the i-th iteration. iteration For the front decision trees for the first The cumulative predicted value of each sample. For the first decision trees for the first The output value of each sample It is the mean squared error loss function. Representing the The true value of the closed-loop current corresponding to each sample. Representative before decision trees for the first The cumulative predicted value of each sample. For the loss function in The first derivative at that point, For the loss function in The second derivative at that point, For the first Regularization terms for each decision tree; loss function in The first derivative at The calculation formula is:
[0046] loss function in Second derivative at The calculation formula is:
[0047] No. The first decision tree The weight values of each leaf node The calculation formula is:
[0048] In formula (13) To be allocated to the A sample set of leaf nodes .
[0049] In S4, the grid search adopts a full permutation traversal method, trains the corresponding improved XGBoost model for each hyperparameter combination, evaluates the model performance through various evaluation methods, and selects the hyperparameter combination with the best performance. Furthermore, the hyperparameter range of the grid search method is as follows: number of trees is 50-200, maximum tree depth is 3-10, learning rate is 0.01-0.5, minimum sample weight of leaf nodes is 1-5, L2 regularization coefficient is 0.1-5.0, and minimum loss reduction parameter required for splitting is 0-2.0. Furthermore, the number of trees is set to four discrete values: 50, 100, 150, and 200; the maximum tree depth is set to four discrete values: 3, 5, 7, and 10; the learning rate is set to five discrete values: 0.01, 0.05, 0.1, 0.3, and 0.5; the minimum sample weight of the leaf nodes is set to four discrete values: 1, 2, 3, and 5; the L2 regularization coefficient is set to four discrete values: 0.1, 1.0, 3.0, and 5.0; and the minimum loss reduction parameter required for splitting is set to four discrete values: 0, 0.5, 1.0, and 2.0.
[0050] Generate hyperparameter combinations: Assume there exists The first hyperparameter to be configured will be the first... The number of selectable values for each hyperparameter is denoted as . The total number of hyperparameter combinations is generated using a full permutation method. The product of the number of values for each hyperparameter is given by the following formula: (20); Internal subset division: The training set is divided into an internal training subset and an internal validation subset in a 7:3 ratio to ensure that the proportion of distribution network operation scenarios in the two subsets is consistent with that in the original training set. Model training and error calculation: For each hyperparameter combination, the improved XGBoost model is trained using the selected key influencing factors as input features and the internal training subset. The number of training iterations is set to 500, and the iteration termination condition is that the root mean square error of the internal validation subset does not decrease for 50 consecutive rounds.
[0051] Optimal hyperparameter selection: Let the set of hyperparameter combinations be... Each combination The corresponding root mean square error is The final hyperparameter configuration is as follows: (30); That is, after traversing all hyperparameter combinations, the total error values are compared, and the hyperparameter combination with the smallest error value is selected as the final hyperparameter configuration of the improved XGBoost model.
[0052] The model accuracy is evaluated using multiple metrics, specifically the following four performance metrics of the improved XGBoost model calculated on the test set: Mean absolute percentage error:
[0053] Mean absolute error:
[0054] Maximum error:
[0055] Fit coefficients:
[0056] In equations (21), (22), (23), and (24), The arithmetic mean of the true values of the closed-loop current for all samples. RMSE reflects the overall deviation between the predicted and actual values, MAPE reflects the relative error, and MAE reflects the mean absolute deviation between the predicted and actual values. Reflecting the extreme deviation between predicted and actual values, This reflects the model's ability to interpret real data. It is the total number of samples. It is the first The true value of the closed-loop current for each sample. It is the first The predicted closed-loop current value for each sample, such as Figure 4 As shown; Quantification and priority ranking of key influencing factors: Extract the sum of information gain of each key influencing factor in all decision tree splits from the trained improved XGBoost model.
[0057] Furthermore, suppose the improved XGBoost model includes A decision tree for a key influencing factor , No. The information gain of this factor when a tree splits is: ( (26); The sum of the information gain of this key influencing factor in all decision tree splitting processes is: (27); Using the sum of information gains as the original value of feature importance, assume that there exists The first key influencing factor, The original values of the characteristic importance of each factor are: First, calculate the sum of the original values of the characteristic importance of all key influencing factors, using the following formula: (28); Then, the raw values of individual key influencing factors Divide by the sum Divide by the sum The weighted contribution value of this factor is obtained by the following formula: (29); Map the weighted contribution values to the interval [0, 1].
[0058] Key influencing factors are sorted in descending order of their weight contribution value to determine priority levels. Among them, a weight contribution value ≥ 0.3 is the highest priority, 0.15-0.3 is the second highest priority, 0.1-0.15 is the medium priority, and < 0.1 is the lowest priority, ensuring that the weight contribution value of each key influencing factor corresponds one-to-one with its priority.
[0059] In this embodiment, step S5, quantifying the weights of each key influencing factor and determining their priority ranking, specifically includes: obtaining the feature importance score output by the improved XGBoost model, where the score represents the contribution of each key influencing factor to the model's prediction of the closed-loop current; normalizing the feature importance score; and calculating the weight value of each key influencing factor. The calculation formula is: (16); In equation (16), For the first Characteristic importance scores of key influencing factors The total number of key influencing factors. It is the sum of the characteristic importance scores of all key influencing factors; Based on the calculated weight values All key influencing factors are sorted from largest to smallest to obtain a priority list; Factors with the highest weight are classified as the top 20% of influencing factors, the next 30% as medium priority, the next 30% as second-highest priority, and the last 20% as lowest priority.
[0060] The control measures are initiated and executed according to preset conditions, specifically including: the preset threshold for initiating control is the real-time monitored closed-loop current value. The current continuously exceeds the rated current of the relevant electrical equipment at the loop closure point. 1.1 times, which satisfies the condition:
[0061] When the aforementioned control threshold condition is met, the distribution network dispatching system automatically initiates control measures targeting the highest priority key influencing factors according to the priority ranking list. After each level of control measure is executed, the loop current value is re-monitored at fixed monitoring intervals, and it is determined that: if the loop current value drops to the range of 0.8 to 1.1 times the rated current of the equipment and remains stable within this range for more than 3 seconds, the entire control process is terminated; if this stability condition is still not met, the control measures of the next priority level are automatically initiated, and so on, until the current stabilizes or all preset control measures are completed.
[0062] Furthermore, the highest priority flexible loop closing device has a response time of ≤50ms and a phase angle adjustment range of -5° to +5°; The impedance adjustment range of the medium-priority adjustable current-limiting reactor is 5-10Ω, with an adjustment step of 0.5Ω. The connection point is located on the feeder line within 1km on both sides of the loop connection point. The accuracy of the second-highest priority load redistribution is ≤5%, the user-end voltage deviation during the transfer process is ≤±7%, and the frequency deviation is ≤±0.2Hz; The lowest priority bus voltage amplitude difference control target is ±5%, the capacity of a single parallel capacitor bank is 100-500kvar, the main transformer tap adjustment step size is ±1.25%, and the adjustment sequence is capacitor switching first, followed by tap adjustment.
[0063] This embodiment constructs a two-stage hybrid model by integrating LASSO regression and an improved XGBoost algorithm, achieving high-precision and interpretable quantitative assessment of key influencing factors of loop current. This overcomes the limitations of traditional methods in analyzing the complex effects of multi-factor coupling. The proposed data-driven hierarchical control strategy significantly improves the safety and efficiency of loop operation through multi-level collaborative control, effectively enhancing the power supply stability of the distribution network. The digital twin model of distribution network loop operation built on the MATLAB / Simulink platform, combined with parametric scanning and a large-scale sample library generated by tens of thousands of simulations, gives the model strong generalization ability, providing a comprehensive and reliable theoretical basis and decision support for the planning of actual distribution network loop operation.
Claims
1. A method for evaluating key influencing factors of power distribution network loop switching, characterized in that... Includes the following steps: S1: Build a closed-loop simulation model of the distribution network, analyze the initial influencing factors affecting the closed-loop current, and generate multiple sets of sample data through parametric scanning and Latin hypercube sampling, which are divided into training set and test set according to the proportion. S2: Preprocess the initial influencing factors to obtain their high-dimensional features; S3: The LASSO regression model is used to reduce the dimensionality of the preprocessed high-dimensional features. The optimal regularization parameter of the LASSO regression model is determined by cross-validation, and key influencing factors are screened. S4: Based on the selected key influencing factors, an improved XGBoost model is constructed, the model hyperparameters are optimized through grid search, and the model accuracy is evaluated using multiple metrics. S5: Based on the feature importance results output by the improved XGBoost model, the weights of each key influencing factor are quantified and the priority ranking is determined. Based on the priority ranking, a hierarchical control strategy is formulated. The loop current and related parameters are monitored in real time through the distribution network dispatching system, and control measures are initiated and executed according to preset conditions.
2. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In S1, the initial influencing factors include: voltage phase angle differences between buses, power grid topology, differences in the magnitude of comprehensive load, equipment performance, ambient temperature and humidity, electromagnetic interference, network load, user-end equipment, impedance in loops, amplitude deviation of bus voltage, and differences in comprehensive load distribution.
3. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In S1, the specific process of generating multiple sets of sample data based on the established distribution network loop simulation model through parametric scanning and Latin hypercube sampling is as follows: S1.1: Parametric scanning includes simultaneously solving the closed-loop current based on the electrical equations corresponding to Kirchhoff's laws for five core variables: bus voltage amplitude, voltage phase angle, loop impedance, combined load value, and combined load distribution. The core solution formula is: (1); In equation (1), For loop current, The equivalent voltage difference between the two busbars at the loop closing point. The total resistance of the loop is... For the total reactance of the loop, Total susceptance of the loop; Then, the combination of variable parameters is adjusted in batches using computer-automated scripts, and the closed-loop current response data corresponding to each set of parameter combinations is recorded synchronously. S1.2: Latin hypercube sampling, first determine the total sample size. Divide the interval (0,1) into equal parts. Divide the data into equidistant segments, and randomly select a value from each segment. The data is transformed into sample data that conforms to the operating characteristics of the distribution network through a standard normal distribution mapping. The mapping formula is as follows: (2); (3); In equations (2) and (3), It is the inverse cumulative distribution function of the standard normal distribution. For a standard normally distributed variable, Sample data for distribution network operating parameters. This is the actual operating average value of this parameter. This is the actual operating standard deviation of this parameter; The sample order is then shuffled, and a hash mapping algorithm is used to calculate the hash value of each sample data. The hash value calculation formula is: against (4); In equation (4), This is the hash weight coefficient. For each dimension of the sample data, The length of the hash table; Samples with duplicate hash values are removed to complete the deduplication process, ensuring that the samples cover different operating scenarios of the power distribution network, and finally forming multiple sets of complete sample data.
4. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: S2, data preprocessing includes standardization and normalization. The calculation formula for standardization is: (5); In equation (5), The data for influencing factors have been standardized. The raw data for a single influencing factor. The arithmetic mean of all the original data for the influencing factors. The standard deviation of all original data for the influencing factors is required to be calculated by traversing all sample data of the influencing factors. and Then, the data for each original influencing factor were transformed one by one; The formula for normalization is: (6); In equation (6), The data has been normalized. The data for influencing factors have been standardized. The minimum value among the standardized data of influencing factors. The maximum value among the standardized data of influencing factors is determined by traversing all the standardized data. and Then, each standardized data point is transformed one by one, so that all data of the influencing factors are finally mapped to the interval [0, 1].
5. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In the S3, LASSO feature dimensionality reduction, the LASSO regression model expression is: (7); In equation (7), The training set sample number. , For the first The closed-loop current value of each sample. For the regression constant term, For the first The regression coefficients of the initial influencing factors, , For the first The first sample Data after processing of the initial influencing factors For random disturbance terms, It is the total number of initial influencing factors; The parameter estimation formula for LASSO regression is: The constraints are: In equations (8) and (9), For regularization penalty terms, For penalty items The estimated values of the regression coefficients, It is a vector of regression coefficients. It represents the total number of initial influencing factors.
6. The method for evaluating key influencing factors of power distribution network loop switching according to claim 5, characterized in that: In the S3 LASSO feature dimensionality reduction process, the optimal regularization parameter is determined through cross-validation, and key influencing factors are screened. The specific steps are as follows: S3.1: Divide the preprocessed training set data into 10 equal-sized subsets according to the 10-fold cross-validation rule. Each subset contains the same proportion of samples from different running scenarios. S3.2: Each time, select 9 out of 10 subsets as cross-training subsets and the remaining 1 as cross-validation subset. Input the cross-training subsets into the LASSO regression model and take values sequentially within the search range of the regularization parameter t according to the preset step size to train the LASSO regression model under the corresponding parameters. The mean squared error (MSE) is used to calculate the model prediction error for each parameter. The calculation formula is as follows: (10); In equation (10), This represents the number of samples in the cross-validation subset. For the cross-validation subset The true value of the closed-loop current for each sample. The current regularization parameter The predicted values of the model; S3.3: Repeat the above training and error calculation process, using each subset as a cross-validation subset in turn, for a total of 10 times; calculate the value of each regularization parameter. The average of the corresponding 10 prediction errors with standard deviation The calculation formulas are as follows: (11); (12); In equations (11) and (12), For the first The prediction error of the cross-validation; the standard deviation is selected. The smallest parameter is used as the optimal regularization parameter. ; S3.4: Optimal regularization parameters Substituting the values into the LASSO regression parameter estimation formula and considering the constraints, the regression coefficients corresponding to all initial influencing factors are solved using the coordinate descent method. ( The absolute value of the regression coefficient is set to be less than a preset threshold. ( Redundant factors were identified and removed, while those with non-zero regression coefficients were retained as key influencing factors. like Then remove the first one. One initial influencing factor; like Then retain the first one. The initial influencing factors are considered as key influencing factors.
7. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In S4, the objective function of the improved XGBoost model in the improved XGBoost modeling optimization is: In equation (13), Let be the objective function. The total number of samples, Let the mean squared error loss function be . For the first The true value of the closed-loop current for each sample. For the first Predicted closed-loop current values for each sample. For the total number of decision trees, For the first The regularization term for each decision tree is expressed as follows: In equation (14), For the first The function of a decision tree To minimize the loss required for splitting, reduce the parameters. Let be the number of leaf nodes in the k-th decision tree. The L2 regularization coefficient is... For the first The first decision tree The weight values of each leaf node; The objective function is approximated and optimized using a second-order Taylor expansion, with the expansion formula as follows: In equation (15): Top bid Let the i-th iteration be the i-th iteration. iteration For the front decision trees for the first The cumulative predicted value of each sample. For the first decision trees for the first The output value of each sample It is the mean squared error loss function. Representing the The true value of the closed-loop current corresponding to each sample. Representative before decision trees for the first The cumulative predicted value of each sample. For the loss function in The first derivative at that point, For the loss function in The second derivative at that point, For the first The regularization term of a decision tree.
8. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In S4, the grid search adopts a full permutation traversal method, trains the corresponding improved XGBoost model for each hyperparameter combination, evaluates the model performance through various evaluation methods, and selects the hyperparameter combination with the best performance.
9. The method for evaluating key influencing factors of power distribution network loop switching according to claim 1, characterized in that: In step S5, quantifying the weights of each key influencing factor and determining their priority ranking specifically includes: obtaining the feature importance score output by the improved XGBoost model, which represents the contribution of each key influencing factor to the model's prediction of the closed-loop current; normalizing the feature importance score; and calculating the weight value of each key influencing factor. The calculation formula is: (16); In equation (16), For the first Characteristic importance scores of key influencing factors The total number of key influencing factors. It is the sum of the characteristic importance scores of all key influencing factors; Based on the calculated weight values All key influencing factors are sorted from largest to smallest to obtain a priority list; Factors with the highest weight are classified as the top 20% of influencing factors, the next 30% as medium priority, the next 30% as second-highest priority, and the last 20% as lowest priority.
10. The method for evaluating key influencing factors of power distribution network loop switching according to claim 9, characterized in that: The control measures are initiated and executed according to preset conditions, specifically including: the preset threshold for initiating control is the real-time monitored closed-loop current value. The current continuously exceeds the rated current of the relevant electrical equipment at the loop closure point. 1.1 times, which satisfies the condition: When the aforementioned control threshold condition is met, the distribution network dispatching system automatically initiates control measures targeting the highest priority key influencing factors according to the priority ranking list. After each level of control measure is executed, the loop current value is re-monitored at fixed monitoring intervals, and it is determined that: if the loop current value drops to the range of 0.8 to 1.1 times the rated current of the equipment and remains stable within this range for more than 3 seconds, the entire control process is terminated; if this stability condition is still not met, the control measures of the next priority level are automatically initiated, and so on, until the current stabilizes or all preset control measures are completed.