Method for predicting user-transformer relation of active low-voltage distribution network
Through VDM decomposition and PSR-BiLSTM network combined with SSA algorithm optimization, the problem of inefficient data processing in household-change relationship prediction is solved, efficient and accurate prediction results are achieved, and the need for multi-model establishment is avoided.
Patent Information
- Application Number
- CN202410922325.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-22
AI Technical Summary
The prior art requires processing multiple standardized data and building multiple models in the process of household change relationship prediction, resulting in inefficient data processing.
VDM decomposition is used to obtain subsequences, construct the phase space matrix of subsequences, and predict it through the PSR-BiLSTM network, and optimize network parameters with SSA algorithm to reduce the model establishment and training time.
It improves the efficiency and prediction accuracy of data processing, avoids the influence of data missing, outliers and noise, and significantly reduces the cost of data processing.
Smart Images

Figure CN119005383A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grids, and in particular to a method for predicting household-transformer relationships in an active low-voltage distribution network. Background Art
[0002] The method for predicting the relationship between users and transformers in active low-voltage distribution networks refers to the prediction of the relationship between users and transformers based on real-time operation data, historical data, and user electricity consumption behavior of the low-voltage distribution network through data analysis, model construction, and algorithm optimization. This method can discover potential problems in the relationship between users and transformers in advance, and provide decision support for the planning and operation and maintenance of the distribution network. It is of great significance to improve the operation and maintenance management efficiency of the distribution network, reduce line losses, and optimize power supply services.
[0003] Traditional prediction methods for the relationship between households and transformers in active low-voltage distribution networks can be summarized into three categories: a. Data analysis-based methods that rely on historical electricity consumption data and statistical models, analyze past electricity consumption behaviors and power supply relationships to predict future trends, but they have high requirements on data quality, and the prediction results will be affected by data missing, noise or outliers, which will lead to a decrease in prediction accuracy; b. Model-based methods that understand the relationship between households and transformers in active low-voltage distribution networks through physical models and detection data, and then predict user electricity consumption behaviors and power supply relationships, but this method has high modeling complexity and computational cost, which is not conducive to large-scale promotion and use; c. A hybrid method that combines the advantages of data analysis and model methods, can discover potential laws in a large amount of historical data, and combines physical models to improve accuracy, but this hybrid method requires sufficient historical data, and the model is highly complex and has poor interpretability. Although it combines the advantages of data analysis and model methods, it also has their disadvantages.
[0004] Chinese patent, publication number: CN 112308459A, publication date: February 2, 2021, discloses a method and device for identifying power grid household-to-electricity transformer relationships, and electronic equipment, including: obtaining multiple basic features that affect power grid household-to-electricity transformer relationships; processing the data of multiple basic features to obtain multiple standardized data; constructing multiple household-to-electricity transformer relationship identification models based on multiple standardized data; using multiple model evaluation indicators to select a target relationship identification model from multiple household-to-electricity transformer relationship identification models; using the target relationship identification model to determine normal household-to-electricity transformer relationships and abnormal household-to-electricity transformer relationships. However, in the process of processing household-to-electricity transformer relationship data, the invention not only needs to process multiple standardized data, but also needs to construct multiple household-to-electricity transformer relationship identification models, which makes the data processing process complicated and large. Summary of the invention
[0005] The purpose of the present invention is to solve the problem of low data processing efficiency caused by the need to process multiple standardized data and build multiple household transformer relationship recognition models in the process of household transformer relationship prediction in the prior art; a household transformer relationship prediction method for an active low-voltage distribution network is proposed, by performing VDM decomposition on the acquired active low-voltage household transformer relationship data to obtain a subsequence, and using PSR to build a phase space matrix of the subsequence to obtain a training set and a verification set required for training a BiLSTM network, and finally input a test set for prediction in a PSR-BiLSTM network, and before prediction, the PSR and BiLSTM network are optimized in combination with an SSA algorithm to obtain a PSR-BiLSTM network. The present invention overcomes the problem of low data processing efficiency caused by the need to process multiple standardized data and build multiple household transformer relationship recognition models in the process of household transformer relationship data prediction.
[0006] In a first aspect, a technical solution provided in an embodiment of the present invention is a method for predicting the relationship between household transformers in an active low-voltage distribution network, comprising the following steps: S1. Obtain the active low-voltage distribution network household transformer relationship data to obtain the original data set; S2, perform VMD decomposition on the original data set to obtain subsequences; S3, use PSR to construct the phase space matrix of the subsequence and divide it into training set, validation set and test set; S4, training the BiLSTM network based on the training set and the validation set; S5. Based on the test set and SSA algorithm, the PSR and the trained BiLSTM network are evaluated to obtain and output the optimal parameter combination; S6. Use the test set as the input of the PSR-BiLSTM network, and combine the optimal parameter combination to output the prediction result of the optimal subsequence; S7. Accumulate the prediction results of all optimal subsequences to obtain the target prediction result.
[0007] In this solution, VDM is used to decompose the original data, which eliminates the influence of missing values, abnormal values and noise in the original data on the data itself, making the original data more complete and clean as a whole, and decomposing the original data into multiple subsequences containing the characteristics of the original data, so that the internal change law and change trend can be observed using a small amount of original data; at the same time, in order to avoid the loss of original data information and retain the characteristics of the original data, the phase space matrix of the subsequence is constructed based on the subsequence obtained by VDM decomposition, and the phase space matrix of the subsequence retains the dynamic characteristics and internal structure of the subsequence, so that the key information of the subsequence can be retained; in addition, the BiLSTM network is trained based on the phase space matrix of the subsequence, and the BiLSTM network can learn the long-term dependency of the original data contained in the subsequence and capture the past and future of the original data, which is a key step in data prediction; and in the training process of the BiLSTM network, the SSA algorithm is used to evaluate the PSR and the trained BiLSTM network to obtain the optimal parameter combination, which can not only obtain the PSR-BiLSTM network with the best performance, but also enhance the generalization ability of the PSR-BiLSTM network, and reduce the training time and data processing cost of the PSR-BiLSTM network.
[0008] Preferably, in S2, the specific process of performing VMD decomposition on the original data set to obtain subsequences is: S21, input the original data set, and use Hilbert transform to calculate the analytical signal of the modal function to obtain the one-sided spectrum of the modal function; S22, performing aliasing calculation based on the one-sided spectrum and the center angular frequency of the modal function to obtain the fundamental frequency band of the modal function; S23, constructing a variational model based on the fundamental frequency band of the modal function, and solving the optimal solution of the variational model to decompose the original data into multiple initial subsequences; S24, screening the initial subsequence to obtain a subsequence.
[0009] In this scheme, after inputting the original data set, the analytical signal of the modal function is calculated using the Hilbert transform to obtain the one-sided spectrum of the modal function, eliminating the negative frequency components in the analytical signal and effectively improving the accuracy and efficiency of signal processing; and the basic frequency band of the modal function is obtained by performing aliasing calculation based on the one-sided spectrum and the central angular frequency of the modal function, accurately estimating the frequency of the mode and improving the accuracy of signal decomposition; finally, the original data is decomposed into initial subsequences by solving the optimal solution of the variational model, which further improves the accuracy of signal decomposition. Furthermore, a set of perfect subsequences is obtained by screening out incomplete subsequences, thereby achieving the effect of improving data quality and data analysis efficiency.
[0010] Preferably, in S23, the specific process of constructing a variational model based on the fundamental frequency band of the modal function and solving the optimal solution of the variational model to decompose the original data into multiple initial subsequences is: S231. Establish a constrained variational model based on the fundamental frequency band of the modal function combined with the Gaussian smoothing method; S232. Constructing an unconstrained variational model based on a constrained variational model; S233. The optimal solution is calculated based on the unconstrained variational model combined with the alternating direction multiplier method, and the original data is decomposed into multiple initial subsequences.
[0011] In this scheme, a constrained variational model is established based on the fundamental frequency band of the modal function combined with the Gaussian smoothing method, which can accurately estimate and separate the components of the fundamental frequency band, and retain its main characteristics while removing the noise and interference in the fundamental frequency band; then, an unconstrained variational model is constructed based on the constrained variational model. By reducing the constraints, the flexibility of the model is improved to explore a wider solution space, improve the generalization ability and improve the efficiency of the solution, greatly enhance the performance of the model, and reduce the complexity of the model by reducing the constraints to achieve the effect of simplifying the model construction; finally, the optimal solution is calculated based on the unconstrained variational model combined with the alternating direction multiplier method, and the original data is decomposed into multiple initial subsequences. Since the alternating direction multiplier method itself has good convergence performance, it can decompose and simplify the problem and solve multiple simplified sub-problems at the same time, achieving the effect of significantly improving data calculation efficiency.
[0012] Preferably, in S3, the specific process of constructing the phase space matrix of the subsequence using PSR and dividing it into a training set, a validation set and a test set is: S31, input the subsequence, and select the delay time and embedding dimension of PSR; S32, based on the delay time and embedding dimension of PSR, the subsequence data is converted into a spatial point set and the phase space is constructed; S33, mapping the subsequence data into the phase space to obtain a multidimensional space point set, and reconstructing the phase space; S34. Divide the multidimensional space point set into a training set, a validation set and a test set.
[0013] In this scheme, selecting the delay time and embedding dimension of PSR helps to reduce unnecessary information in the subsequence, effectively avoids information redundancy in the subsequence, and improves the accuracy of the data in the output training set, validation set, and test set.
[0014] Preferably, in S4, the specific process of training the BiLSTM network based on the training set and the validation set is as follows: S41, standardizing the acquired training set to obtain a standard training set; S42. Define and configure the architecture and parameters of the BiLSTM network; S43. Train the BiLSTM network based on the standard training set, and use the parameters on the validation set to tune the parameters in the BiLSTM network.
[0015] In this scheme, standardizing the training set can simplify the data processing flow during BiLSTM network training, so that the BiLSTM network can focus more on learning the actual patterns and relationships in the data during training, effectively improving the performance of the BiLSTM network; secondly, by observing the changes in the performance of the BiLSTM network on the validation set, the BiLSTM network parameters are optimized and adjusted, which effectively avoids overfitting and underfitting of the BiLSTM network while improving the generalization ability of the BiLSTM network; finally, the BiLSTM network trained through the above steps has the ability to accurately predict the future trend of subsequence changes, and achieves the effect of optimizing decision making based on the prediction ability.
[0016] Preferably, in S41, the acquired training set is standardized to obtain a specific process of a standard training set as follows: The subsequences in the training set are converted into vector form and padded or truncated to obtain a standard training set.
[0017] In this scheme, the subsequences in the training set are converted into vector form and padded or truncated so that the subsequences in the training set have the same length and the same form, which facilitates batch processing and parallel calculation of the subsequences, significantly improving the data processing efficiency of the BiLSTM network.
[0018] Preferably, in S5, the specific process of evaluating the PSR and the trained BiLSTM network based on the test set combined with the SSA algorithm to obtain and output the optimal parameter combination is: S51, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S52, input the standard test set into the PSR and the trained BiLSTM network, and use the parameters in the PSR and the trained BiLSTM network as the sparrow individuals to form a population; S53, calculating the fitness of each individual in the sparrow population and the proportion of discoverers and joiners in the population; S54, selecting individuals with high fitness in the population as discoverers according to the proportion of discoverers in the population, and updating the positions of the discoverers according to the discoverer position update formula; S55, selecting an individual in the population whose fitness is close to that of the discoverer as a joiner according to the proportion of joiners in the population, and updating the position of the joiner according to the position update formula of the joiner; S56, randomly selecting an individual in the population as a sentinel, and updating the position of the sentinel according to the sentinel position update formula; S57, repeating steps S53-S56 until the optimal sparrow position is output when the preset stop condition is met, that is, the optimal parameter combination is output.
[0019] In this scheme, the discoverer, as the individual who finds the best food source in the population, has the ability of global search and can find the best solution in the global range; the joiner, as the follower of the discoverer, has the ability of local search and can find possible good solutions around the discoverer; the sentinel is randomly selected from the discoverers and joiners and moves randomly to expand the area explored by the population, and then explore potential new solutions, effectively avoiding the SSA algorithm from falling into the situation of local optimal solution.
[0020] Preferably, in S6, the specific process of using the test set as the input of the PSR-BiLSTM network and combining the optimal parameter combination to output the prediction result of the optimal subsequence is: S61, introducing the optimal parameter combination into PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network; S62. Predict the test set based on the optimal PSR-BiLSTM network, find the prediction result of the optimal subsequence and output it.
[0021] In this scheme, the optimal parameter combination is introduced into PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network, which can not only reduce the cost of PSR-BiLSTM network in processing input data and improve the accuracy of PSR-BiLSTM network prediction, but also enhance the generalization ability of PSR-BiLSTM network.
[0022] Preferably, in S61, the specific process of introducing the optimal parameter combination into the PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network is: S611, introducing the PSR optimal parameters in the optimal parameter combination into the phase space matrix of PSR to reconstruct the active low-voltage distribution network household transformer relationship data; S612, introducing the optimal parameters of the BiLSTM network in the optimal parameter combination into the BiLSTM network and combining it with the reconstructed phase space matrix training to obtain the optimal PSR-BiLSTM network.
[0023] In this scheme, the phase space matrix of the active low-voltage distribution network household-transformer relationship data is reconstructed, which further reduces the impact of missing data values, outliers and noise on the prediction results, making the prediction results of the PSR-BiLSTM network more accurate.
[0024] Preferably, in S62, the specific process of predicting the test set based on the optimal PSR-BiLSTM network, finding the prediction result of the optimal subsequence and outputting it is: S621, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S622, input the standard test set into the optimal PSR-BiLSTM network for prediction, and obtain the prediction results of each subsequence; S623, calculate the performance indicators of the subsequence, and update the optimal PSR-BiLSTM network parameters according to the performance indicators of the subsequence; the performance indicators include: root mean square error, mean absolute error and mean absolute ratio error; S624. Repeat S622-S623 until the prediction result of the optimal subsequence is found and output.
[0025] In this solution, by repeatedly executing S622-S623 and calculating the performance index of the subsequence to determine the prediction result of the optimal subsequence, the accuracy of the subsequence prediction result is greatly improved.
[0026] The present invention has at least the following substantial effects: The present invention proposes a method for predicting the relationship between household transformers in an active low-voltage distribution network. The method comprises: obtaining the household transformer relationship data of the active low-voltage distribution network and performing VMD decomposition on the household transformer relationship data to obtain a subsequence, eliminating the influence of missing values, abnormal values and noise in the original data, making the original data more complete and clean as a whole, and at the same time, the decomposed subsequence retains the characteristics of the household transformer relationship data of the active low-voltage distribution network; then, using PSR to construct a phase space matrix of the subsequence and training a BiLSTM network, based on which the characteristics of the household transformer relationship data of the active low-voltage distribution network are retained, and then the phase space matrix of the subsequence retains the dynamic characteristics and internal structure of the household transformer relationship data of the active low-voltage distribution network, so that the phase space matrix of the subsequence retains the dynamic characteristics and internal structure of the household transformer relationship data of the active low-voltage distribution network, so that the phase space matrix of the subsequence can be used to predict the relationship between household transformers in the active low-voltage distribution network. In the training process of the network, a small amount of active low-voltage distribution network user-transformer relationship data can be used to observe the internal change rules and trends of the data; finally, based on the SSA algorithm, the optimal parameter combination of PSR and the trained BiLSTM network is found, and the optimal parameter combination is introduced into the PSR and BiLSTM networks to obtain the PSR-BiLSTM network to predict the active low-voltage distribution network user-transformer relationship data and obtain the target prediction result. Since the optimal parameter combination needs to be used to optimize the PSR and BiLSTM networks in the prediction process, only one PSR-BiLSTM network is used in the process of predicting data, which avoids the establishment of a large number of models and significantly improves the efficiency of data processing.
[0027] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.
[0029] Figure 1 It is a flow chart of a method for predicting the relationship between household transformers in an active low-voltage distribution network according to the present invention; Figure 2 It is a flow chart of the SSA algorithm in a method for predicting the relationship between household transformers in an active low-voltage distribution network according to the present invention; Figure 3 This is a result diagram of VMD decomposition of raw data in a method for predicting the relationship between household transformers in an active low-voltage distribution network according to the present invention. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0031] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0032] Embodiment 1: like Figure 1-3 As shown, this embodiment provides a method for predicting the relationship between household transformers in an active low-voltage distribution network, comprising the following steps: S1. Obtain the active low-voltage distribution network household transformer relationship data to obtain the original data set.
[0033] In this embodiment, the active low-voltage distribution network household transformer relationship data is first obtained, and then imported into an Excel file to obtain the original data set, which provides strong support for the subsequent generation of the model.
[0034] S2. Perform VMD decomposition on the original data set to obtain subsequences.
[0035] In one embodiment, in order to improve the accuracy of the original data, this embodiment adopts a signal analysis solution, which specifically includes the following steps: S21, input the original data set, and use Hilbert transform to calculate the analytical signal of the modal function to obtain the one-sided spectrum of the modal function; S22, performing aliasing calculation based on the one-sided spectrum and the center angular frequency of the modal function to obtain the fundamental frequency band of the modal function; S23, constructing a variational model based on the fundamental frequency band of the modal function, and solving the optimal solution of the variational model to decompose the original data into multiple initial subsequences; In one embodiment, in order to decompose the original data into subsequences, a variational model scheme is adopted, which specifically includes the following steps: S231, establishing a variational model with constraints based on the fundamental frequency band of the modal function combined with the Gaussian smoothing method; S232. Constructing an unconstrained variational model based on a constrained variational model; S233. The optimal solution is calculated based on the unconstrained variational model combined with the alternating direction multiplier method, and the original data is decomposed into multiple initial subsequences.
[0036] In this embodiment, a Gaussian smoothing method is used to establish a constrained variational model. Assuming that the original signal f is decomposed into K IMF components, the corresponding constrained variational model expression is: In the formula, {u k}={u1,u2,...,u K} are the K IMF components obtained by decomposition, {ω k}={ω1,ω2,...,ω K} is the frequency center of each component, is the one-sided frequency, is the exponential term of the center angular frequency; Next, the constrained variational model is converted into an unconstrained variational model by using the quadratic penalty factor α and the Lagrangian multiplication operator λ(t), where α is responsible for ensuring the accuracy of signal reconstruction and λ(t) is responsible for maintaining the execution strength of the constraints. Accordingly, the expanded Lagrangian expression is shown as follows: Finally, the optimal solution is calculated based on the unconstrained variational model combined with the alternating direction multiplier method, and the original data f is decomposed into K IMF components, as follows: Using Fourier equidistant transformation Transform to the frequency domain: Use ω-ω k Instead, its non-negative frequency interval integral form is: At this point, the solution to the quadratic optimization problem is: According to the same process as above, the update method of the center frequency can be calculated: In the above formula, is the current remaining amount The Wiener filter, is the center of gravity of the power spectrum of the current mode function; Perform Fourier transform and get its real part as {u k (t)}; The updating method of the Lagrange multiplication operator λ(t) is:
[0037] S24, screening the initial subsequence to obtain a subsequence.
[0038] In this embodiment, the VMD method is used to decompose the active low-voltage distribution network user-to-user relationship data into a limited bandwidth modal function, that is, a modal function with bandwidth restrictions; the VMD can decompose a multi-component signal into multiple single-component amplitude-modulated and frequency-modulated signals at one time. The method mainly obtains K estimated center angular frequencies ω by initializing the limited bandwidth parameter α and the center angular frequency. k ; Then, the alternating direction multiplier method is used to update each modal function and its center frequency, and each mode is demodulated to the corresponding baseband. The ultimate goal is to minimize the sum of the estimated bandwidths of each mode; The main process of calculating the modal bandwidth is as follows: The analytical signal of the modal function is calculated using Hilbert transform, and the obtained one-sided spectrum is: Among them, δ(t) is the unit pulse function, u k (t) is the mode function, is the convolution kernel, j is the imaginary unit; After obtaining the one-sided spectrum, the one-sided spectrum of each modal signal is multiplied by the exponential term of the corresponding central angular frequency and then aliased to obtain the fundamental frequency band corresponding to each modal function: in, is the unilateral frequency, ω k is the center angular frequency, is the exponential term of the center angular frequency; Then, a variational model is constructed according to the fundamental frequency band of the modal function, and the optimal solution of the variational model is solved. The original data is decomposed into a series of subsequences and the residual subsequences are removed to obtain the following: Figure 3 There are 8 subsequences from IMF1 to IMF8 shown.
[0039] S3. Use PSR to construct the phase space matrix of the subsequence and divide it into training set, validation set and test set.
[0040] In one embodiment, in order to make the subsequence more suitable for the needs of subsequent steps, this embodiment adopts a PSR solution, which specifically includes the following steps: S31, input the subsequence, and select the delay time and embedding dimension of PSR; S32, based on the delay time and embedding dimension of PSR, the subsequence data is converted into a spatial point set and the phase space is constructed; S33, mapping the subsequence data into the phase space to obtain a multidimensional space point set, and reconstructing the phase space; S34. Divide the multidimensional space point set into a training set, a validation set and a test set.
[0041] In this embodiment, the PSR needs to select appropriate delay time and embedding dimension to reconstruct the phase space; wherein the delay time refers to the time interval between data points, and the embedding dimension refers to the dimension of constructing the phase space; then, according to the selected delay time and embedding dimension, the subsequence is converted into a point set in the phase space to construct the phase space, and the coordinates of each point in the phase space are composed of a number of continuous data points in the subsequence; when the phase space is constructed, the subsequence is mapped to the phase space to obtain a multidimensional space point set to reconstruct the phase space, and this multidimensional space point set retains the characteristics and structure of the subsequence, and fully reflects the change rules and trends within the subsequence; finally, the point set is divided into a training set, a validation set, and a test set according to the ratio of 60% for training set, 20% for validation set, and 20% for test set.
[0042] S4. Train the BiLSTM network based on the training set and the validation set.
[0043] In one embodiment, in order to train the BiLSTM network and perform preliminary tuning, this embodiment adopts a training set and a validation set solution, which specifically includes the following steps: S41, standardizing the acquired training set to obtain a standard training set; In one embodiment, in order to improve the data processing efficiency of the BiLSTM network, this embodiment adopts a standardized solution, which specifically includes: The subsequences in the training set are converted into vector form and padded or truncated to obtain a standard training set.
[0044] In this embodiment, the input subsequence is first converted into an embedded representation, and then the embedding layer of the BiLSTM network is used to convert the subsequence stored in the text form in Excel into a continuous vector form to facilitate the processing of the BiLSTM network; secondly, the input subsequence is padded or truncated so that all input subsequences have the same length, thereby facilitating the BiLSTM network to perform batch processing and parallel calculation on the subsequences, effectively improving the data processing efficiency of the BiLSTM network.
[0045] S42. Define and configure the architecture and parameters of the BiLSTM network; S43. Train the BiLSTM network based on the standard training set, and use the parameters on the validation set to tune the parameters in the BiLSTM network.
[0046] In this embodiment, the BiLSTM network is a bidirectional long short-term memory network composed of a forward LSTM and a backward LSTM, which can simultaneously consider the past and future information of the input sequence. It introduces two independent LSTM layers, one responsible for forward propagation and the other responsible for backward propagation, at each time step in the sequence, thereby realizing bidirectional modeling of the sequence; the definition and configuration of the architecture and parameters of the BiLSTM network include: determining the number of LSTM units that can determine the complexity and representation ability of the network and the dimension of the hidden layer that can determine the size of the output dimension of the LSTM unit, specifying the length of the input sequence and the model depth representing the number of LSTM layer stacks, configuring the regularization technology Dropout that can prevent overfitting, and selecting an appropriate activation function, the activation function is as follows: f(x)=max(0,x); Among them, f(x) represents the output of the activation function, x represents the input value, and max(0,x) represents taking the larger value between the input value and zero; after configuring the BiLSTM network, use the training set obtained in the previous steps to train it, and use the validation set combined with back propagation and Adam optimizer to update the BiLSTM network parameters during the training process. When the BiLSTM network is initially tuned, use the test set and evaluate the BiLSTM network after the initial tuning with the goal of minimizing the root mean square error RMSE to prevent the BiLSTM network from overfitting or underfitting.
[0047] S5. Based on the test set and SSA algorithm, the PSR and the trained BiLSTM network are evaluated to obtain and output the optimal parameter combination.
[0048] In one embodiment, in order to simultaneously optimize the parameters of the PSR and BiLSTM networks, this embodiment adopts the SSA algorithm solution, which specifically includes the following steps: S51, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S52, input the standard test set into the PSR and the trained BiLSTM network, and use the parameters in the PSR and the trained BiLSTM network as the sparrow individuals to form a population; S53, calculating the fitness of each individual in the sparrow population and the proportion of discoverers and joiners in the population; S54, selecting individuals with high fitness in the population as discoverers according to the proportion of discoverers in the population, and updating the positions of the discoverers according to the discoverer position update formula; S55, selecting an individual in the population whose fitness is close to that of the discoverer as a joiner according to the proportion of joiners in the population, and updating the position of the joiner according to the position update formula of the joiner; S56, randomly selecting an individual in the population as a sentinel, and updating the position of the sentinel according to the sentinel position update formula; S57, repeating steps S53-S56 until the optimal sparrow position is output when the preset stop condition is met, that is, the optimal parameter combination is output.
[0049] In this embodiment, the SSA algorithm is a global optimization algorithm inspired by the foraging and anti-predation behavior of sparrow groups and used to solve global optimization problems. The traditional SSA algorithm generally includes the following steps: x. Construct the sparrow individuals in the population to form a sparrow population. The specific construction is as follows: Assuming there are n sparrows in the population, the population composed of all sparrow individuals can be expressed as X = [x1, x2, ..., x n ] T , the fitness function corresponding to each sparrow individual is F = [f(x1),f(x2),…,f(x n )] T , specifically expressed as: In the formula, d represents the sequence x 1,1 ,x 1,2 ,…,x 1,d Dimensions; y. Set the discoverers, joiners and guards in the sparrow population, and update the individual positions of the discoverers, joiners and guards according to the corresponding position update formula; The finder represents the sparrow individual that currently finds the best food source, that is, the sparrow individual with the best fitness, and its position update formula is as follows: Where t represents the current iteration number, represents the position of the i-th sparrow in the j-th dimension in the t-th generation, α∈(0,1), iter max is the maximum number of iterations, R2 represents the alarm value, ST represents the safety threshold, Q is a random number that obeys the normal distribution, L is a 1×dim matrix of all 1s, and dim represents the dimension; the above-mentioned position update method of the discoverer can be briefly described as follows: when When R2≥ST, it means that there are no predators around the foraging area, and the discoverers can search for food extensively; when R2≥ST, it means that a predator appears, and all discoverers need to be sent to a safe area; The joiner represents the individual sparrow that has not found the food source, and will follow the behavior of the finder. The position update formula of the joiner is as follows: in, represents the position of the sparrow with the worst fitness in the tth generation, represents the position of the sparrow with the best fitness in the t+1th generation, A represents a 1×dim matrix, and each element in the matrix is randomly preset to 1 or -1. + =A T (AA T ) -1 ; The above joiner formula can be summarized as: When , it means that the fitness of the i-th joiner is low and it is not qualified to compete with the discoverer for food and needs to fly to other areas to find food. When the joiner will be in the optimal sparrow individual x P foraging nearby; The alerter is any individual in the population that is aware of the danger. They will randomly change their position. The position update formula is as follows: in, represents the global optimal position in the tth generation, β is the control step size of a normal distribution with mean 0 and variance 1, k∈[-1,1], ε is set to a constant to avoid the denominator being 0, and f i represents the fitness value of the current individual, f g represents the fitness value of the current global optimal sparrow individual, f w represents the fitness value of the current global difference sparrow individual; the above-mentioned position update formula of the sentinel can be briefly described as: when f i ≠f g When f i =f g When , it means that the individual sparrow is in the center of the population, and it will continue to approach nearby companions to stay away from the dangerous area; z. Determine whether the stopping condition is met, if so, output the optimal sparrow position, if not, execute step b; the stopping condition can be set to a fixed number of iterations, a threshold number of iterations at which the fitness evaluation is no longer improved, reaching a specific fitness value or other suitable statistical criteria; The above-mentioned traditional SSA algorithm has the advantages of comprehensive search mechanism and fast convergence speed, but it is easy to fall into local optimum. In order to improve the performance of the SSA algorithm, this application makes appropriate improvements to the traditional SSA algorithm, as follows: Improvements to the discoverer position update formula: In the traditional SSA algorithm, the flight distance of the finder is controlled by the standard normal distribution random number Q. However, the random number Q generated by the standard normal distribution makes the probability of the finder to evacuate the danger zone at a long distance low, which in turn affects the global search capability of the SSA algorithm. Based on this, in order to enable the finder to increase the probability of evacuating the danger zone by flying quickly to a farther location, the present application changes the random number Q to be generated by the Lagrangian distribution. The update formula of the finder is as follows: At the same time, the safety threshold ST is changed with the iteration time, so that the discoverer can search for food extensively in the early stage of the iteration and has a greater probability of escaping from the current position in the later stage of the iteration, so as to ensure the population diversity in the later stage of the iteration. The formula for generating the safety threshold ST is as follows: ST=1-t / iter max ; Improvements to the joiner position update formula: In the traditional SSA algorithm, the process of the joiner approaching the optimal sparrow individual is single, and food can only be searched on the single side of the optimal sparrow individual close to the joiner; this application combines the whale optimization algorithm, and updates the position of the joiner by spirally surrounding the optimal sparrow individual, so as to achieve the purpose of searching for food around the optimal sparrow individual. The update formula of the joiner is as follows: D'=|x' besl -x(t)| Where b is a constant that defines the shape of the logarithmic spiral; l is a random number in [-1,1]; At this time, the position update formulas of the discoverer and the joiner have been improved, and the vigilant still uses the traditional formula. However, the population selection ratio of the joiner and the discoverer is a complicated process, and the selection of the joiner and the discoverer ratio also affects the search efficiency of the algorithm. Therefore, in this application, the selection ratio of the discoverer is improved to an adaptive population structure strategy, and its formula is as follows: P 加 =1-P Among them, P is the proportion of discoverers in the t generation in the population, P 加 is the proportion of the population occupied by the t-generation joiners, Pmax and Pmin are the upper and lower limits of the proportion of discoverers, and P will increase from Pmin to Pmax with the change of iterations; At this point, the SSA algorithm is improved, as shown in Figure 2 The figure shows the specific process of the improved SSA algorithm to update the parameters of the PSR and BiLSTM networks and find the optimal parameter combination.
[0050] S6. Use the test set as the input of the PSR-BiLSTM network and combine the optimal parameter combination to output the prediction result of the optimal subsequence.
[0051] In one embodiment, in order to improve the performance of the PSR-BiLSTM network, this embodiment adopts an optimal parameter solution, specifically including: S61, introducing the optimal parameter combination into the PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network; in one embodiment, in order to improve the accuracy of the PSR-BiLSTM network parameter update, this embodiment adopts a gradual update scheme, which specifically includes: S611, introducing the PSR optimal parameters in the optimal parameter combination into the phase space matrix of PSR to reconstruct the active low-voltage distribution network household transformer relationship data; S612, introducing the optimal parameters of the BiLSTM network in the optimal parameter combination into the BiLSTM network and combining it with the reconstructed phase space matrix training to obtain the optimal PSR-BiLSTM network.
[0052] In this embodiment, the optimal parameter combination obtained in the above steps is imported, specifically including the optimal embedding dimension of PSR, the delay time and the optimal network configuration of the BiLSTM network, so as to obtain the optimal PSR and the optimal BiLSTM network, and use the optimal PSR to process the user-transformer relationship data of the active low-voltage distribution network to obtain a new training data set, and finally use the new training data set to train the BiLSTM network. After the training is completed, the optimal PSR and the optimal BiLSTM network are sorted to obtain the optimal PSR-BiLSTM network.
[0053] S62. Predict the test set based on the optimal PSR-BiLSTM network, find the prediction result of the optimal subsequence and output it.
[0054] In one embodiment, in order to find the prediction result of the optimal subsequence, this embodiment adopts a performance indicator solution, which specifically includes: S621, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S622, input the standard test set into the optimal PSR-BiLSTM network for prediction, and obtain the prediction results of each subsequence; S623, calculate the performance indicators of the subsequence, and update the optimal PSR-BiLSTM network parameters according to the performance indicators of the subsequence; the performance indicators include: root mean square error, mean absolute error and mean absolute ratio error; S624. Repeat S622-S623 until the prediction result of the optimal subsequence is found and output.
[0055] In this embodiment, the standard test set obtained after the standardization process is input into the optimal PSR-BiLSTM network to obtain the prediction result of each subsequence, and then the root mean square error RMSE, mean absolute error MAE and mean absolute proportional error MAPE of the subsequence are calculated based on the prediction result of the subsequence as the performance index. Specifically, the prediction result of a group of subsequences with the smallest values of the root mean square error RMSE, mean absolute error MAE and mean absolute proportional error MAPE is selected as the prediction result of the optimal subsequence. The specific calculation formula of the performance index is as follows: Root mean square error Mean absolute proportional error Mean absolute error Among them, X i Represents the true value of the i-th sample point; represents the predicted value of the i-th sample point; N represents the number of sample points; Represents the average value of all true values; finally, according to the performance indicator calculation results, the optimal PSR-BiLSTM network parameters are further updated, and S622-S623 are repeatedly executed until the stopping condition is reached, and the prediction result of the optimal subsequence is output; the stopping condition is a preset number of iterations.
[0056] S7. Accumulate the prediction results of all optimal subsequences to obtain the target prediction result.
[0057] In this embodiment, the specific accumulation formula for accumulating the prediction results of the optimal subsequence to obtain the target prediction result is as follows: Among them, Z is the target prediction result, Z i is the prediction result of the optimal subsequence, and m is the number of prediction results of the optimal subsequence output in the previous step.
[0058] This embodiment has at least the following technical effects: The present embodiment provides a method for predicting the relationship between users and transformers in an active low-voltage distribution network. The method comprises: obtaining the relationship data between users and transformers in an active low-voltage distribution network and performing VMD decomposition on the relationship data to obtain a subsequence, thereby eliminating the influence of missing values, abnormal values and noise in the original data, making the original data more complete and clean as a whole, and at the same time, the decomposed subsequence retains the characteristics of the relationship data between users and transformers in the active low-voltage distribution network; then, the phase space matrix of the subsequence is constructed by using PSR and a BiLSTM network is trained, and the characteristics of the relationship data between users and transformers in an active low-voltage distribution network are retained based on the subsequence, and then the phase space matrix of the subsequence retains the dynamic characteristics and internal structure of the relationship data between users and transformers in an active low-voltage distribution network, so that a small amount of the relationship data between users and transformers in an active low-voltage distribution network can be used in the training process of the BiLSTM network to observe the internal change law and trend of the data; finally, the PS is found based on the improved SSA algorithm. The optimal parameter combination of R and the trained BiLSTM network is obtained, and the optimal parameter combination is introduced into the PSR and BiLSTM network to obtain the PSR-BiLSTM network to predict the active low-voltage distribution network user-transformer relationship data, and the prediction result of the subsequence is obtained, and the root mean square error RMSE, the mean absolute error MAE and the mean absolute proportional error MAPE of the subsequence prediction result are calculated as performance indicators to determine whether the result of this prediction is the prediction result of the optimal subsequence, until the set stop condition is met, the prediction result of the optimal subsequence is output, and the target prediction result is obtained by cumulative calculation. Since the optimal parameter combination needs to be used to optimize the PSR and BiLSTM networks in the prediction process, only one PSR-BiLSTM network is used in the process of predicting data, which avoids the establishment of a large number of models and significantly improves the efficiency of data processing.
[0059] The above specific embodiments are preferred embodiments of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the present specific embodiments. All equivalent changes made in accordance with the shape, structure, and method of the present invention are within the protection scope of the present invention.
Claims
1. A method for predicting the relationship between household transformers in an active low-voltage distribution network, characterized in that: The method comprises the following steps: S1. Obtain the active low-voltage distribution network household transformer relationship data to obtain the original data set; S2, perform VMD decomposition on the original data set to obtain subsequences; S3, use PSR to construct the phase space matrix of the subsequence and divide it into training set, validation set and test set; S4, training the BiLSTM network based on the training set and the validation set; S5. Based on the test set and SSA algorithm, the PSR and the trained BiLSTM network are evaluated to obtain and output the optimal parameter combination; S6. Use the test set as the input of the PSR-BiLSTM network and output the prediction result of the optimal subsequence by combining the optimal parameter combination; S7. Accumulate the prediction results of all optimal subsequences to obtain the target prediction result.
2. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 1 is characterized in that: In S2, the specific process of performing VMD decomposition on the original data set to obtain subsequences is as follows: S21, input the original data set, and use Hilbert transform to calculate the analytical signal of the modal function to obtain the one-sided spectrum of the modal function; S22, performing aliasing calculation based on the one-sided spectrum and the center angular frequency of the modal function to obtain the fundamental frequency band of the modal function; S23, constructing a variational model based on the fundamental frequency band of the modal function, and solving the optimal solution of the variational model to decompose the original data into multiple initial subsequences; S24, screening the initial subsequence to obtain a subsequence.
3. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 2 is characterized in that: In S23, the specific process of constructing a variational model based on the fundamental frequency band of the modal function and solving the optimal solution of the variational model to decompose the original data into multiple initial subsequences is: S231. Establish a constrained variational model based on the fundamental frequency band of the modal function combined with the Gaussian smoothing method; S232. Constructing an unconstrained variational model based on a constrained variational model; S233. The optimal solution is calculated based on the unconstrained variational model combined with the alternating direction multiplier method, and the original data is decomposed into multiple initial subsequences.
4. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 1 is characterized in that: In S3, the specific process of using PSR to construct the phase space matrix of the subsequence and dividing it into a training set, a validation set and a test set is as follows: S31, input the subsequence, and select the delay time and embedding dimension of PSR; S32, based on the delay time and embedding dimension of PSR, the subsequence data is converted into a spatial point set and the phase space is constructed; S33, mapping the subsequence data into the phase space to obtain a multidimensional space point set, and reconstructing the phase space; S34. Divide the multidimensional space point set into a training set, a validation set and a test set.
5. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 1 is characterized in that: In S4, the specific process of training the BiLSTM network based on the training set and the validation set is: S41, standardizing the acquired training set to obtain a standard training set; S42. Define and configure the architecture and parameters of the BiLSTM network; S43. Train the BiLSTM network based on the standard training set, and use the parameters on the validation set to tune the parameters in the BiLSTM network.
6. A method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 5, characterized in that: In S41, the acquired training set is standardized to obtain a specific process of a standard training set: The subsequences in the training set are converted into vector form and padded or truncated to obtain a standard training set.
7. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 1, characterized in that: In S5, the specific process of evaluating the PSR and the trained BiLSTM network based on the test set combined with the SSA algorithm to obtain and output the optimal parameter combination is: S51, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S52, input the standard test set into the PSR and the trained BiLSTM network, and use the parameters in the PSR and the trained BiLSTM network as the sparrow individuals to form a population; S53, calculating the fitness of each individual in the sparrow population and the proportion of discoverers and joiners in the population; S54, selecting individuals with high fitness in the population as discoverers according to the proportion of discoverers in the population, and updating the positions of the discoverers according to the discoverer position update formula; S55, selecting an individual in the population whose fitness is close to that of the discoverer as a joiner according to the proportion of joiners in the population, and updating the position of the joiner according to the position update formula of the joiner; S56, randomly selecting an individual in the population as a sentinel, and updating the position of the sentinel according to a position update formula of the sentinel; S57, repeating steps S53-S56 until the optimal sparrow position is output when the preset stop condition is met, that is, the optimal parameter combination is output.
8. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 1, characterized in that: In S6, the specific process of using the test set as the input of the PSR-BiLSTM network and combining the optimal parameter combination to output the prediction result of the optimal subsequence is: S61, introducing the optimal parameter combination into PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network; S62. Predict the test set based on the optimal PSR-BiLSTM network, find the prediction result of the optimal subsequence and output it.
9. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 8, characterized in that: In S61, the specific process of introducing the optimal parameter combination into the PSR and the trained BiLSTM network to obtain the optimal PSR-BiLSTM network is: S611, introducing the PSR optimal parameters in the optimal parameter combination into the phase space matrix of PSR to reconstruct the active low-voltage distribution network household transformer relationship data; S612, introducing the optimal parameters of the BiLSTM network in the optimal parameter combination into the BiLSTM network and combining it with the reconstructed phase space matrix training to obtain the optimal PSR-BiLSTM network.
10. The method for predicting the relationship between household transformers in an active low-voltage distribution network according to claim 8, characterized in that: In S62, the specific process of predicting the test set based on the optimal PSR-BiLSTM network, finding the prediction result of the optimal subsequence and outputting it is as follows: S621, converting the subsequences in the test set into vector form and padding or truncating the subsequences to obtain a standard test set; S622, input the standard test set into the optimal PSR-BiLSTM network for prediction, and obtain the prediction result of each subsequence; S623, calculating the performance indicators of the subsequence, and updating the optimal PSR-BiLSTM network parameters according to the performance indicators of the subsequence; the performance indicators include: root mean square error, mean absolute error and mean absolute ratio error; S624. Repeat S622-S623 until the prediction result of the optimal subsequence is found and output.
Citation Information
Patent Citations
Power grid user-transformer relationship identification method and identification device, and electronic equipment
CN112308459A
