Low-voltage transformer area theoretical line loss rate calculation method considering electric energy quality factor

By evaluating the correlation of various parameters in the low-voltage distribution network, selecting the optimal dimension and using the random forest algorithm optimized by particle swarm algorithm, the problem of insufficient theoretical line loss rate calculation in the low-voltage distribution network is solved, and higher calculation accuracy and efficiency are achieved.

CN119623674AInactive Publication Date: 2025-03-14SICHUAN UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510157489.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In low-voltage distribution networks, there are difficulties in calculating the theoretical line loss rate considering the power quality factors, resulting in inaccurate calculations.

Method used

By obtaining structural parameters, operating parameters and power quality parameters, the correlation between each characteristic parameter relative to the theoretical line loss rate is evaluated, the optimal dimension is selected for dimensionality reduction processing, and the theoretical line loss rate is calculated using a random forest algorithm optimized by the particle swarm algorithm.

Benefits of technology

The accuracy of theoretical line loss rate calculation is improved, the complexity of data processing and computing power consumption is reduced, and the reliability and efficiency of calculation is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623674A_ABST
    Figure CN119623674A_ABST
Patent Text Reader

Abstract

The invention provides a low-voltage transformer area theoretical line loss rate calculation method considering an electric energy quality factor, and relates to the technical field of theoretical line loss rate calculation, and the method comprises the steps: obtaining characteristic parameters, the types of the characteristic parameters comprise a structure parameter, an operation parameter and an electric energy quality parameter; respectively obtaining the correlation degree of each characteristic parameter relative to the theoretical line loss rate; the optimal dimension is selected to carry out dimension reduction processing on the feature parameters, effective feature parameters are obtained, and the effective feature parameters are used for calculating the theoretical line loss rate; and theoretical line loss rate calculation is carried out through a random forest algorithm optimized by using a particle swarm algorithm. The method has the advantage of higher calculation precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of theoretical line loss rate calculation, and in particular to a method for calculating the theoretical line loss rate of a low-voltage transformer area taking power quality factors into consideration. Background Art

[0002] In the electric power industry, the main energy losses come from the loss of electric energy during the sending, transmission and distribution process. Most of the electric energy losses come from the low-voltage distribution network, accounting for about 50% to 60% of the total electric energy loss. This energy loss is called line loss. Reducing line loss has become a major issue in the electric power industry.

[0003] Line loss is divided into theoretical line loss rate and statistical line loss. The theoretical line loss rate is the line loss calculated according to the parameters of transmission, distribution and transformation equipment and load current during the transmission of electric energy. It is the inevitable power loss of various components of the power grid. Accurate calculation of the theoretical line loss rate is the basis of line loss analysis. Through the calculation of the theoretical line loss rate, we can figure out the composition and distribution of power grid losses and find out the areas with abnormal line losses. The theoretical line loss rate not only provides a basis for formulating loss reduction measures, provides a reference for measuring whether the line loss in the substation is abnormal, but also provides guidance and suggestions for distribution network planning. With the gradual improvement of the new power system, new energy has become an increasingly high-proportioned form of energy used in the power grid. In the context of a large number of clean energy and power electronic equipment connected to the power grid, the power grid presents a "double high" characteristic, the harmonic component in the power grid increases, and the power quality decreases. Power quality problems will cause a lot of additional line losses, mainly due to three-phase imbalance, harmonics, low power factor (low voltage), etc. Among them, the energy loss caused by three-phase imbalance is large. The three-phase imbalance causes a large unbalanced current to flow through the neutral line, which will cause a lot of additional losses on the neutral line. In addition, three-phase imbalance can lead to excessive current on some phase lines, which will also generate additional line losses. However, the low-voltage distribution network is large in scale and has a complex and diverse topology. It is difficult to accurately calculate the theoretical line loss rate caused by power quality issues.

[0004] Therefore, considering the influence of power quality factors, selecting more appropriate characteristic parameters and their dimensions to achieve more accurate calculation of the theoretical line loss rate has become a problem to be solved in the line loss analysis of low-voltage distribution networks. Summary of the invention

[0005] The purpose of the present invention is to provide a method for calculating the theoretical line loss rate of a low-voltage transformer area taking into account power quality factors, so as to achieve a more accurate calculation of the theoretical line loss rate.

[0006] The present invention is achieved through the following technical solutions: A method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors comprises the following steps: Acquiring characteristic parameters, wherein the types of the characteristic parameters include structural parameters, operating parameters and power quality parameters; Respectively obtaining the correlation degree of each characteristic parameter with respect to the theoretical line loss rate; Selecting the best dimension to perform dimension reduction processing on the characteristic parameters to obtain effective characteristic parameters, and the effective characteristic parameters are used to calculate the theoretical line loss rate; The theoretical line loss rate is calculated using the random forest algorithm optimized by the particle swarm algorithm.

[0007] Preferably, the structural parameters include wire model, line length and power supply radius.

[0008] Preferably, the operating parameters include voltage, current, active power, reactive power and power factor.

[0009] Preferably, the power quality parameters include three-phase unbalance, total harmonic distortion and power factor.

[0010] Preferably, the method for respectively obtaining the correlation between each characteristic parameter and the theoretical line loss rate is: Collecting a plurality of theoretical line loss rates and corresponding characteristic parameters; A reference series is formed based on the theoretical line loss rate, and a comparison series is formed based on the characteristic parameters: ; ; in, is the reference sequence, for Middle elements, , is the total number of theoretical line loss rates, Representative The first characteristic parameter Compare the series, is the total number of characteristic parameters, for Middle elements; Perform data normalization: ; ; in, After data normalization , After data normalization , and They are The mean and standard deviation of and They are The mean and standard deviation of Calculate the correlation coefficient: ; ; in, For the said The comparison sequence is compared with the reference sequence at The correlation coefficient of the elements, is the resolution coefficient, , Representative request The minimum value in Representative request The minimum value in Representative request The maximum value in Representative request The maximum value in ; Calculate the correlation: ; in, It is the Compare the association of series.

[0011] Preferably, the method of selecting the best dimension to perform dimensionality reduction processing on the feature parameters is: Sort the correlations of all the comparison series from large to small, and select the first The characteristic parameters corresponding to the comparison sequence are taken as valid characteristic parameters; exist Verification is performed under different values, and multiple groups of samples are taken to obtain the mean square error of the predicted value of the theoretical line loss rate: ; in, Representatives in The mean square error under the value, represent Value The predicted value of the theoretical line loss rate under the group sample, Respectively represent The actual theoretical line loss rate value under the group sample, is the total number of samples; Get The minimum value of The value is the optimal dimension.

[0012] Preferably, the method of using the particle swarm algorithm to optimize the random forest algorithm is: S1: Define initialization particles: Each particle represents a parameter combination of the random forest, including the number of trees, maximum tree depth, minimum sample split number, and maximum feature number; randomly generate the initial parameter combination and search speed of each particle, define the individual optimal value and the global optimal value: obtain the individual optimal parameter combination pi of each particle and its corresponding fitness value; obtain the global optimal parameter combination g and fitness value in the group; S2: Perform fitness evaluation: Use the mean square error of the validation set of the random forest model as the fitness function, train the random forest model for each particle and calculate the fitness; S3: Update the particle's velocity and position; S4: Update the optimal position: compare the fitness of the current particle with its historical optimal value. If the current one is better, replace it and update the individual parameter combination pi; compare the fitness values ​​of all current particles, find the global optimal parameter combination g and update it to get the global fitness value; S5: Perform convergence judgment according to the convergence condition. If the convergence condition is met, stop the optimization; otherwise, return to step S2 for iteration.

[0013] Preferably, the method for updating the speed and position of the particle is: ; ; in, and Represents particles In the Generation and the first The position of the generation, Representative particles In the The speed of generation, and are the maximum and minimum functions respectively, is the maximum value of speed.

[0014] Preferably, the convergence condition includes: The number of iterations reaches the preset iteration limit, or the global fitness value is less than the set threshold.

[0015] The technical solution of the present invention has at least the following advantages and beneficial effects: The present invention takes the influence of power quality into consideration and uses power quality parameters as characteristic values ​​affecting line loss. On this basis, the calculation accuracy of the theoretical line loss rate can be greatly improved. The present invention achieves dimensionality reduction from high dimension to low dimension by evaluating the correlation between various influencing factors and the theoretical line loss rate, which helps to improve data processing efficiency and save computing resources in the calculation process; The present invention searches for the best dimension in the dimensionality reduction process, ensuring that the theoretical line loss rate calculation has high accuracy under the premise of efficient processing; The present invention optimizes the random forest algorithm by using a particle swarm algorithm, thereby further reducing errors and improving calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic flow chart of a method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors provided in Example 1 of the present invention; Figure 2 A mean square error graph corresponding to each dimension under each algorithm provided in Example 1 of the present invention; Figure 3 A schematic diagram of the predicted value, actual value and relative error of each sample on the test set of the random forest algorithm provided in Example 1 of the present invention; Figure 4 A schematic diagram of the predicted value, actual value and relative error of each sample on the test set of the BP neural network provided in Example 1 of the present invention; Figure 5 The calculation results provided in Example 1 of the present invention do not take power quality into consideration. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0018] Example 1 This embodiment provides a method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors. Figure 1 , including the following steps: Acquiring characteristic parameters, wherein the types of the characteristic parameters include structural parameters, operating parameters and power quality parameters; Respectively obtaining the correlation degree of each characteristic parameter with respect to the theoretical line loss rate; Selecting the best dimension to perform dimension reduction processing on the characteristic parameters to obtain effective characteristic parameters, and the effective characteristic parameters are used to calculate the theoretical line loss rate; The theoretical line loss rate is calculated using the random forest algorithm optimized by the particle swarm algorithm.

[0019] In the case of increasingly complex topological structures of low-voltage substations and a large number of terminals, the method of calculating the theoretical line loss rate based on building a physical model is difficult to establish an accurate physical model, and the calculation of the theoretical line loss rate is often not accurate enough, and the line loss caused by power quality is not considered. In the prior art, the calculation method of the theoretical line loss rate of low-voltage substations based on artificial intelligence does not consider the power quality factor. Under the current new power system with "double high" characteristics, the power quality problem of low-voltage substations is becoming more and more serious, especially the three-phase imbalance problem. It is difficult to achieve accurate calculation without considering the power quality factor. In addition, there are many factors that affect the theoretical line loss rate. Most of the prior art selects several easy-to-obtain feature indicators based on human experience, lacking quantitative determination standards and explanations for why these feature indicators are selected and how many dimensions of feature indicators are selected. Therefore, this embodiment selects multi-dimensional feature parameters, comprehensively considers the parameters affecting the line loss, and selects appropriate dimensions for dimensionality reduction on this basis, taking into account the reliability, accuracy and calculation efficiency of evaluating the line loss rate.

[0020] First, the structural parameters preferably include conductor model, line length and power supply radius, which mainly reflect the structure and distribution of the power grid.

[0021] Because line resistance is one of the main causes of power grid line loss. When current passes through a conductor, resistance causes energy loss, which manifests as heat, and line loss P is proportional to the square of current I: , where R is the resistance, and the resistance of the wire is: , is the conductor resistivity, L and S are the conductor length and cross-sectional area respectively. Therefore, the conductor model, line length and power supply radius can reflect the resistance of the conductor. The line length directly affects the line loss. The longer the line, the higher the line loss. The power supply radius refers to the farthest distance from the transformer or distribution station to the surrounding power supply. The larger the power supply radius, the longer the line length in the power supply area, and the corresponding line loss will also increase.

[0022] On the other hand, the operating parameters include voltage, current, active power, reactive power and power factor. This type of parameters changes with the operating status of the power grid and reflects the actual operating status of the power grid. Flow is one of the most direct factors affecting the line loss of the power grid. Line loss is mainly manifested through resistance loss and is proportional to the square of the current. This means that an increase in current will cause a sharp increase in line loss. Therefore, under the same active power, one way to reduce the current is to increase the transmission voltage. And the active power loss of the circuit through the line According to the voltage V, active power P and reactive power, it is obtained as follows: . Increasing the transmission voltage of the power grid can reduce the current during unit power transmission, thereby reducing line losses; active power refers to the power that actually does work in the power grid. The size of active power directly affects the size of the current on the transmission line. An increase in active power will lead to an increase in line losses; reactive power plays an important role in maintaining voltage stability and the ability to transmit electrical energy in the power grid, and its presence will increase line losses. The power factor is the ratio of active power to apparent power, reflecting the efficiency of the power system in using electrical energy. A low power factor means a large reactive power, resulting in inefficient power transmission. When transmitting the same load, a larger current will be generated, resulting in more line losses.

[0023] In addition, the power quality parameters include three-phase imbalance, total harmonic distortion and power factor. This type of parameters mainly reflects the additional line loss caused by power quality problems, and power quality problems are particularly serious in low-voltage areas. Three-phase imbalance refers to the unequal voltage or current of each phase in a three-phase power system, resulting in system imbalance. This imbalance will cause additional current to flow through the neutral line, increasing losses in the power system. Especially in low-voltage areas, the imbalance problem is serious, and the line loss caused by three-phase imbalance has become a part that cannot be ignored. In actual low-voltage power grids, the line loss caused by harmonics is very small, and the total harmonic distortion is difficult to measure, so the load type is directly used instead of the total harmonic distortion as the characteristic parameter.

[0024] It can be seen from the above parameters that there are many factors that affect the theoretical line loss rate, but some relevant features can be found from the theoretical line loss rate calculation method. If you want to accurately calculate the theoretical line loss rate, you should take into account all factors that affect the theoretical line loss rate as much as possible, and establish a complete set of characteristic parameter evaluation index system as the input of the model. However, if artificial intelligence methods such as neural networks have too many dimensions of input, their models will be very complex, difficult to train, and prone to overfitting. Therefore, it is necessary to select several electrical characteristic parameters that have the greatest impact on the theoretical line loss rate, eliminate unnecessary feature quantities, and compress the dimensions of the feature quantities. Therefore, this embodiment uses the correlation between the characteristic parameters and the theoretical line loss rate to find more critical parameters, and finds the most appropriate dimensionality reduction standard to achieve more accurate feature selection, which can better adapt to the model and reduce computing power consumption, and can also ensure the accuracy of the calculation.

[0025] In this embodiment, the method for respectively obtaining the correlation between each characteristic parameter and the theoretical line loss rate is: Collecting a plurality of theoretical line loss rates and corresponding characteristic parameters; A reference series is formed based on the theoretical line loss rate, and a comparison series is formed based on the characteristic parameters: ; ; in, is the reference sequence, for Middle elements, , is the total number of theoretical line loss rates, Representative The first characteristic parameter Compare the series, is the total number of characteristic parameters, for Middle elements; Converting data of different dimensions or magnitudes to the same standard makes it easier to compare and analyze, so data normalization is required: ; ; in, After data normalization , After data normalization , and They are The mean and standard deviation of and They are The mean and standard deviation of This embodiment uses the absolute difference and the preset resolution coefficient to calculate the correlation coefficient. The correlation coefficient can reflect the similarity between the reference sequence and the comparison sequence. The larger the value, the higher the similarity and the stronger the correlation. The method for calculating the correlation coefficient is: ; ; in, For the said The comparison sequence is compared with the reference sequence at The correlation coefficient of the elements, is the resolution coefficient, , Representative request The minimum value in Representative request The minimum value in Representative request The maximum value in Representative request The maximum value in ; Used to adjust the sensitivity of the correlation coefficient, the commonly used value is 0.5.

[0026] Calculate the average correlation coefficient of each comparison series. For each comparison series, average the correlation coefficient between it and the reference series to obtain the average correlation coefficient of the comparison series, and use this to calculate the correlation degree: ; in, It is the Compare the association of series.

[0027] Next, dimensionality reduction is required. During the dimensionality reduction process, some information will be lost, which is useful for the subsequent calculation of the theoretical line loss rate. Therefore, finding an optimal dimension that can retain most of the useful information while simplifying the model and training process is a key issue in the dimensionality reduction strategy.

[0028] As a preferred solution of this embodiment, the method of selecting the best dimension to perform dimensionality reduction processing on the feature parameters is preferably: Sort the correlations of all the comparison series from large to small, and select the first The characteristic parameters corresponding to the comparison sequence are taken as valid characteristic parameters; exist Verification is performed under different values, and multiple groups of samples are taken to obtain the mean square error of the predicted value of the theoretical line loss rate: ; in, Representatives in The mean square error under the value, represent Value The predicted value of the theoretical line loss rate under the group sample, Respectively represent The actual theoretical line loss rate value under the group sample, is the total number of samples; In actual verification, the impact of different dimensions on model performance can be evaluated through cross-validation to select the optimal dimension configuration. For each dimension, several feature indicators with the largest grey correlation can be selected, and 5-fold cross-validation can be adopted to calculate the mean square error of the machine learning algorithm in each dimension, and the mean square error value in each dimension can be recorded.

[0029] Get The minimum value of value This is the best dimension. The characteristic parameters corresponding to the comparison series are taken as effective characteristic parameters.

[0030] Finally, the data that has been previously reduced in dimension and selected for the best dimension can be input into the random forest algorithm for training. 80% of the data can be used as a training set and 20% of the data can be used as a test set. Its performance on the test set can be evaluated to obtain the performance of the random forest algorithm in calculating the theoretical line loss rate of unknown substations. This embodiment chooses to use the particle swarm optimization algorithm to optimize the random forest algorithm. Particle swarm optimization is a swarm intelligence algorithm that is suitable for global optimization problems. Therefore, it can be used to find the best hyperparameter configuration in the random forest algorithm, thereby improving the prediction accuracy of the model, reducing overfitting and improving computational efficiency. The method of using the particle swarm algorithm to optimize the random forest algorithm is: S1: Define initialization particles: Each particle represents a parameter combination of the random forest, including the number of trees, maximum tree depth, minimum sample split number, and maximum feature number; randomly generate the initial parameter combination and search speed of each particle, define the individual optimal value and the global optimal value: obtain the individual optimal parameter combination pi of each particle and its corresponding fitness value; obtain the global optimal parameter combination g and fitness value in the group; S2: Perform fitness evaluation: Use the mean square error of the validation set of the random forest model as the fitness function, train the random forest model for each particle and calculate the fitness; S3: Update the particle's velocity and position; S4: Update the optimal position: compare the fitness of the current particle with its historical optimal value. If the current one is better, replace it and update the individual parameter combination pi; compare the fitness values ​​of all current particles, find the global optimal parameter combination g and update it to get the global fitness value; S5: Perform convergence judgment according to the convergence condition. If the convergence condition is met, stop the optimization; otherwise, return to step S2 for iteration.

[0031] Furthermore, the method for updating the speed and position of the particle is: ; ; in, and Represents particles In the Generation and the first The position of the generation, Representative particles In the The speed of generation, and are the maximum and minimum functions respectively, is the maximum value of speed.

[0032] Finally, the convergence conditions include: The number of iterations reaches the preset iteration limit, or the global fitness value is less than the set threshold.

[0033] Based on the above scheme, some important parameters of the random forest algorithm can be optimized by the particle swarm algorithm, such as the number of decision trees in the random forest and the maximum depth.

[0034] The final prediction result is obtained by combining the prediction results of each decision tree and weighting them. The weights can be updated periodically. In particular, the weights can be updated in the particle swarm algorithm or adjusted by real-time supervision error. For example, the average error between the output result and the true value of each decision tree in the first two cycles and the adjustment of the weight in the previous cycle can be obtained respectively, and then the weights are determined. The first two cycles are called the first cycle and the second cycle respectively. The end of the first cycle is the time point when the weight adjustment is made in the previous cycle. The end of the second cycle is the current time point, and the weight adjustment needs to be made again. The method can be as follows: Get the average error of each decision tree in the first cycle , Representative The average error of the trees in the first cycle; Get the average error of each decision tree in the second cycle , Representative The average error of the trees in the second cycle; Get the weight adjustment percentage of each decision tree at the end of the first cycle and weight , and Representative table The weight adjustment percentage and weight of each tree at the end of the first cycle; is the percentage change compared to before adjustment, . To adjust to The previous weight.

[0035] Get the weight adjustment value that each decision tree needs to adjust again at the current time point , , Table The weight adjustment value of a tree at the current time point: ; ; in, is the intermediate parameter, exp is the natural exponential function, b is the number of decision trees, A is the total number of decision trees, It is an empirical coefficient, which can be 0.05-0.3; Finally, all Standardize all The sum of the two is 1, and new weights are obtained after standardization.

[0036] This embodiment combines the error change of each decision tree in two cycles with the previous adjustment percentage, based on Determine the new adjustment range , and then get a new weight. Based on the solution of this embodiment. The more the error becomes smaller, the greater the increase will be, which is more accurate and reliable than directly obtaining the weight based on the error's global proportion. For example, The value range is (-0.5, +0.5). If the error of the second cycle is reduced more than that of the first cycle, then The larger the value of The value of is larger and closer to 0.5, will be larger; when the error of the second cycle decreases less or even increases compared with the first cycle, The value will become negative, that is Will be smaller.

[0037] Based on the solution of this embodiment, in order to verify its effectiveness, MATLAB is used to build a variety of different station topologies for simulation.

[0038] A total of 100 samples were selected for the example, and each sample contained 13 independent variables and 1 dependent variable. In order to ensure the adequacy, representativeness, diversity and balance of the samples, the real topology provided by the power grid company was selected for construction when building the topology. These topologies include rural, urban, residential, commercial, industrial and other areas, as well as circular, linear, and ring-shaped topologies. When building the load, there are three types of three-phase unbalance, three-phase balance, harmonic interference, no harmonic interference, light load, heavy load and other situations, and the number of the above situations is similar. The characteristic evaluation index system of the 13 independent variables, namely the theoretical line loss rate, is shown in Table 1: Table 1 Sample independent variables

[0039] Then the above samples are standardized, and the correlation analysis of the characteristic parameters relative to the theoretical line loss rate is performed on the 13-dimensional input variables. The results are shown in Tables 2 and 3. The influencing factors in the tables represent the characteristic parameters: Table 2 Grey correlation of each influencing factor

[0040] Table 3 Grey correlation of each influencing factor

[0041] Through correlation analysis, the correlation between each influencing factor and the theoretical line loss rate was obtained. It can be seen that for this sample set, among the above 13 influencing factors, the most influential is reactive power, and the least influential is phase C voltage. The power quality factors considered - three-phase imbalance and load type, the correlation rankings are second and tenth respectively. For low-voltage areas, harmonic interference is not very serious, so the load type has a low impact on the theoretical line loss rate; and the three-phase imbalance problem produces a large additional line loss in the low-voltage area, so the three-phase imbalance has a great impact on the theoretical line loss rate.

[0042] After obtaining the correlation between each influencing factor and the theoretical line loss rate, the first n-dimensional data with the largest grey correlation degree are selected each time, and the theoretical line loss rate is calculated using the random forest algorithm. The average mean square error under n dimensions is evaluated using a 5-fold cross validation method. Let n gradually increase from 1 to 13, and record the average mean square error corresponding to each n value. The n value with the smallest mean square error is the optimal dimension.

[0043] Next, the LASSO linear regression model was used to analyze the correlation of each characteristic index. After obtaining the correlation of each characteristic index, the correlation ranking obtained by LASSO was used to select the best dimension, and the results of training the random forest algorithm using the data after each dimension were obtained. The mean square error corresponding to each dimension of the random forest algorithm trained after gray correlation dimensionality reduction, the BP neural network trained after gray correlation dimensionality reduction, and the random forest algorithm trained after LASSO linear regression dimensionality reduction were compared. The mean square error corresponding to each dimension under each algorithm is shown in the figure below. Figure 2 shown.

[0044] For the random forest algorithm, when the dimension is 11, the average mean square error is the smallest. Therefore, under this sample set, the best dimension is 11, that is, the first 11 influencing factors with the largest grey correlation are selected to form 11-dimensional data as the input data of the model. It can also be seen that the performance of each dimension obtained by using grey correlation dimensionality reduction is better than the result after dimensionality reduction using the LASSO linear regression model.

[0045] The above 11-dimensional data was used to train the random forest algorithm. 80% of the samples were selected as the training set, and the remaining 20% ​​of the samples were used as the test set to test the performance of the model on unknown data sets. Finally, a mean square error of 6.6*10-5 was achieved on the test set. Figure 3 The predicted value, actual value and relative error of each sample on the test set of the random forest algorithm are shown.

[0046] Depend on Figure 3It can be seen that the errors of the calculated theoretical line loss rate of the substation area are mostly at a low level, and the error distribution is shown in Table 4: Table 4 Error distribution of the station area

[0047] From the above results, we can see that the errors of 85% of the stations are below 20%, and only a few stations have errors greater than 20%. For these stations, we can verify the measured data to see if there are any data anomalies.

[0048] Depend on Figure 2 It can be seen that when the dimension is 6 dimensions, the BP neural network achieves the minimum mean square error. Therefore, the first 6 factors with the largest grey correlation degree are selected as the final feature indicators, and the input data of the BP neural network is a 6-dimensional sample. The BP neural network is trained using the above 6-dimensional samples. Similarly, 80% of the samples are selected as the training set, and the remaining 20% ​​of the samples are used as the test set to evaluate the performance of the BP neural network on an unknown data set. Finally, a mean square error of 1.24*10-4 was achieved on the test set. Figure 4 The predicted value, actual value and relative error of each sample on the test set of the BP neural network are shown.

[0049] Table 5 compares the calculation results using the random forest algorithm and the standard BP neural network algorithm, showing the differences in their mean square errors and error distributions.

[0050] Table 5 Error distribution comparison

[0051] It can be seen from Table 5 that after selecting the best dimensions for training and calculation, the random forest algorithm of this embodiment shows more accurate calculation ability. Using the random forest algorithm, there are 17 areas with an error of less than 20%, while there are only 14 areas calculated using the BP neural network. The random forest algorithm has a higher calculation accuracy than the BP neural network in this application scenario.

[0052] For low-voltage areas, power quality issues are significant, especially the three-phase imbalance phenomenon is serious. In the above verification experiment, the power quality factor is removed, that is, the two influencing factors of three-phase imbalance and load type are not considered, and the two influencing factors with the lowest correlation ranking are used instead. The same random forest algorithm is used to calculate the theoretical line loss rate. The calculation results are as follows: Figure 5 Table 6 compares the calculation results with and without considering power quality factors, showing the differences in their mean square errors and error distributions.

[0053] Table 6 Error distribution comparison

[0054] It can be seen from Table 6 that when the power quality factor is considered, there are 17 substations with an error less than 20%, while there are only 15 substations without considering the power quality factor. The calculation considering the power quality factor also obtains a smaller mean square error value.

[0055] In summary, the solution of this embodiment takes into account the power quality factor and uses the random forest algorithm optimized by the particle swarm algorithm to improve the accuracy of the theoretical line loss rate calculation of the low-voltage area.

[0056] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors, characterized in that: The following steps are involved: Acquiring characteristic parameters, wherein the types of the characteristic parameters include structural parameters, operating parameters and power quality parameters; Respectively obtaining the correlation degree of each characteristic parameter with respect to the theoretical line loss rate; Selecting the best dimension to perform dimension reduction processing on the characteristic parameters to obtain effective characteristic parameters, and the effective characteristic parameters are used to calculate the theoretical line loss rate; The theoretical line loss rate is calculated by using the random forest algorithm optimized by the particle swarm algorithm.

2. According to a method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors according to claim 1, it is characterized in that: The structural parameters include conductor model, line length and power supply radius.

3. A method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors according to claim 1, characterized in that: The operating parameters include voltage, current, active power, reactive power and power factor.

4. A method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors according to claim 1, characterized in that: The power quality parameters include three-phase unbalance, total harmonic distortion and power factor.

5. The method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors according to claim 1 is characterized in that: The method for respectively obtaining the correlation degree of each characteristic parameter with respect to the theoretical line loss rate is: Collecting a plurality of theoretical line loss rates and corresponding characteristic parameters; A reference series is formed based on the theoretical line loss rate, and a comparison series is formed based on the characteristic parameters: ; ; in, is the reference sequence, for Middle elements, , is the total number of theoretical line loss rates, Representative The first characteristic parameter Compare the series, is the total number of characteristic parameters, for Middle elements; Perform data normalization: ; ; in, After data normalization , After data normalization , and They are The mean and standard deviation of and They are The mean and standard deviation of Calculate the correlation coefficient: ; ; in, For the The comparison sequence is compared with the reference sequence at The correlation coefficient of the elements, is the resolution coefficient, , Representative request The minimum value in Representative request The minimum value in Representative request The maximum value in Representative request The maximum value in ; and Respectively represent the minimum and maximum values; Calculate the correlation: ; in, It is the Compare the association of series.

6. A method for calculating the theoretical line loss rate of a low voltage area considering power quality factors according to claim 5, characterized in that: The method of selecting the best dimension to perform dimension reduction processing on the feature parameters is: Sort the correlations of all the comparison series from large to small, and select the first The characteristic parameters corresponding to the comparison sequence are taken as valid characteristic parameters; exist Verification is performed under different values, and multiple groups of samples are taken to obtain the mean square error of the predicted value of the theoretical line loss rate: ; in, Representatives in The mean square error under the value, represent Value The predicted value of the theoretical line loss rate under the group sample, Respectively represent The actual theoretical line loss rate value under the group sample, is the total number of samples; Get The minimum value of The value is the optimal dimension.

7. The method for calculating the theoretical line loss rate of a low-voltage area considering power quality factors according to claim 1 is characterized in that: The method of using particle swarm optimization to optimize the random forest algorithm is: S1: Define initialization particles: Each particle represents a parameter combination of the random forest, including the number of trees, maximum tree depth, minimum sample split number, and maximum feature number; randomly generate the initial parameter combination and search speed of each particle, define the individual optimal value and the global optimal value: obtain the individual optimal parameter combination pi of each particle and its corresponding fitness value; obtain the global optimal parameter combination g and fitness value in the group; S2: Perform fitness evaluation: Use the mean square error of the validation set of the random forest model as the fitness function, train the random forest model for each particle and calculate the fitness; S3: Update the particle's velocity and position; S4: Update the optimal position: compare the fitness of the current particle with its historical optimal value. If the current one is better, replace it and update the individual parameter combination pi; compare the fitness values ​​of all current particles, find the global optimal parameter combination g and update it to get the global fitness value; S5: Perform convergence judgment according to the convergence condition. If the convergence condition is met, stop the optimization; otherwise, return to step S2 for iteration.

8. A method for calculating the theoretical line loss rate of a low voltage area considering power quality factors according to claim 7, characterized in that: The method for updating the velocity and position of particles is: ; ; in, and Represents particles In the Generation and the first The position of the generation, Representative particles In the The speed of generation, and are the maximum and minimum functions respectively, is the maximum value of speed.

9. A method for calculating the theoretical line loss rate of a low voltage area considering power quality factors according to claim 8, characterized in that: The convergence conditions include: The number of iterations reaches the preset iteration limit, or the global fitness value is less than the set threshold.

Citation Information

Patent Citations

  • Wireless sensor network optimization method based on improved binary particle swarm and application

    CN112887994A

  • Earth crust deformation time sequence simulation method based on particle swarm optimization random forest

    CN118332521A

  • Power distribution network line loss analysis method and device and storage medium

    CN118607978A

  • Method and device for calculating line loss of low-voltage transformer area, electronic equipment and medium

    CN119125667A