Low-voltage active distribution area line loss rate prediction method and system based on improved gan

By improving the GAN model, constructing a generative adversarial network, and subdividing the generation strategy, the problem of insufficient sample data in the prediction of line loss rate of low-voltage active transformer areas was solved, and more accurate and stable line loss rate prediction was achieved.

CN120822672BActive Publication Date: 2026-02-13STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511332144.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-02-13
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing technologies lack sample data for predicting line loss rates in low-voltage active transformer areas, leading to inaccurate predictions. Traditional GAN ​​models struggle to handle the complexity and dynamic characteristics of time series data and lack effective methods for processing multivariate time series data with constraints.

Method used

An improved Generative Adversarial Network (GAN) is constructed, comprising a generator, a feature extractor, and a discriminator. Historical samples are collected through a sliding time window, and multiple generated sample sequences are generated using data constraints. The generation strategy is further subdivided into a first generation strategy and a second generation strategy, which respectively handle the data constraints of the initial time period and adjacent time periods, and extract multiple indicator features for discrimination.

Benefits of technology

It improves the accuracy and stability of line loss rate prediction, ensures consistency of generated samples over time series to avoid data homogenization, enhances the robustness and reliability of the network, and can more accurately capture the changing patterns of line loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822672B_ABST
    Figure CN120822672B_ABST
Patent Text Reader

Abstract

The application relates to a low-voltage active area line loss rate prediction method and system based on an improved GAN, and belongs to the technical field of data prediction. The method solves the problem that the line loss rate prediction is inaccurate due to the lack of sample data. The method comprises the following steps: constructing a historical sample sequence and putting the historical sample sequence into a historical sample set; constructing a generative adversarial network comprising a generator, a feature extractor and a discriminator; the generator obtains a plurality of generated sample sequences according to each historical sample sequence and a sample generation strategy; the feature extractor extracts real features and a plurality of generated features according to each historical sample sequence and the corresponding plurality of generated sample sequences; the discriminator discriminates between the real features and the generated features; the generated sample sequence corresponding to the generated features discriminated as true is obtained and put into the historical sample set; the line loss rate prediction model is obtained by training a time series neural network model with the prediction dataset constructed by the generated sample sequence and the rated capacity of the equipment, and then the line loss rate at the prediction time is obtained. The method realizes accurate prediction of the line loss rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data prediction, in particular to a low-voltage active transformer area line loss rate prediction method and system based on improved GAN. BACKGROUND

[0002] As an important part of the power system, the low-voltage active transformer area is characterized by the wide access of distributed power sources. However, the access of distributed power sources brings more uncertainty and randomness to the distribution system, and the source and load characteristics of the low-voltage active transformer area become more complex and variable, and the system operation mode becomes more complex, which makes the calculation and management method of line loss face new challenges. The low-voltage line loss is an important indicator for measuring the power supply efficiency and the quality of power grid operation, and it is directly related to the economic benefit and resource utilization efficiency of power supply enterprises. Therefore, how to efficiently and accurately use existing data to predict and control low-voltage line loss has become a problem to be solved.

[0003] At present, in the field of low-voltage line loss management, the commonly used technical means mainly include statistical analysis method, artificial neural network, support vector machine and other traditional machine learning algorithms. However, these methods are highly dependent on a large amount of high-quality historical data. In actual application, the data collection of low-voltage distribution network is limited by factors such as sensor layout and communication capability, and the data is often incomplete or noisy, and it is difficult to cover all possible operating conditions. Especially when there is a lack of data samples of abnormal grid operation (such as equipment failure, illegal electricity stealing, etc.), the line loss evaluation and prediction accuracy of the low-voltage active transformer area is reduced, which affects the effectiveness of decision-making.

[0004] Although the generative adversarial network (GAN) in the prior art has a wide application in sample expansion, it still faces many challenges when applied to low-voltage active transformer area line loss. First, the low-voltage active transformer area line loss sample is time series data, which has complex dynamic characteristics and time sequence dependence. The traditional GAN model mainly targets non-time series data, and it is difficult to effectively handle the complexity and dynamic characteristics of time series data. Secondly, the data of the low-voltage active transformer area covers the combination of transformer area power supply, power consumption and distributed power output and other electrical quantities, and there is a close constraint relationship between these electrical quantities. The traditional GAN model lacks an effective processing method for time series data with multiple variables and constraint relationships. SUMMARY

[0005] In view of the above analysis, the embodiments of the present application aim to provide a low-voltage active transformer area line loss rate prediction method and system based on improved GAN, to solve the problem of inaccurate line loss rate prediction due to the lack of sample data.

[0006] In one aspect, the embodiments of the present application provide a low-voltage active transformer area line loss rate prediction method based on improved GAN, comprising the following steps:

[0007] Collect historical operational data of low-voltage active transformer areas, construct historical samples for each time period, and form multiple historical sample sequences through a sliding time window, and put them into a historical sample set;

[0008] A generative adversarial network (GAN) consisting of a generator, a feature extractor, and a discriminator is constructed and trained using a historical sample set. The generator is used to obtain multiple generated sample sequences based on each historical sample sequence and the sample generation strategy. The feature extractor is used to extract real features and multiple generated features based on each historical sample sequence and its corresponding multiple generated sample sequences, respectively. The discriminator is used to distinguish between all real features and generated features.

[0009] After training, the generated sample sequences corresponding to the generated features that the discriminator judges to be true are obtained, put into the historical sample set, and together with the rated capacity of the equipment, a prediction dataset is constructed. The time-series neural network model is then trained to obtain the line loss rate prediction model.

[0010] The system collects operational data and equipment rated capacity for prediction, and uses a line loss rate prediction model to obtain the line loss rate at the prediction time.

[0011] Based on the further improvement of the above method, the generator is used to obtain multiple generated sample sequences according to each historical sample sequence and the sample generation strategy. It uses the historical samples of the first time period in each historical sample sequence to generate multiple initial samples for each time period in turn using the sample generation strategy. The valid samples that meet the data constraints of each time period are obtained as multiple generated samples for the corresponding time period, thus obtaining multiple generated sample sequences with the same time window length.

[0012] Based on further improvements to the above method, the data constraints include: initial time period data constraints, adjacent time period data constraints, adjacent time period change constraints, and effective sample quantity constraints; the sample generation strategies include: a first generation strategy and a second generation strategy; the first generation strategy is used to obtain multiple generated samples for the first time period that satisfy the initial time period data constraints and effective data quantity constraints based on the historical samples of the first time period in each historical sample sequence; the second generation strategy is used to iteratively obtain multiple generated samples for subsequent consecutive time periods that satisfy the adjacent time period data constraints, adjacent time period change constraints, and effective data quantity constraints based on each generated sample for the first time period, according to the time window length, to form multiple generated sample sequences.

[0013] Based on further improvements to the above method, the historical samples and generated samples for each time period include multiple operational data: distribution transformer load, distributed power grid output, charging load, and user routine load.

[0014] The first generation strategy executes the following steps:

[0015] According to each running data, a fluctuation value and a random number in the first period of each historical sample sequence, a corresponding generated data is obtained multiple times as a plurality of initial samples of the first period, from the plurality of initial samples of the first period, an effective sample satisfying an initial period data constraint is obtained, the first generation strategy is repeatedly executed until the effective sample of the first period satisfies an effective sample quantity constraint, and a plurality of generated samples of the first period is obtained.

[0016] Based on the further improvement of the above method, the second generation strategy performs the following steps:

[0017] Taking the first period as a current period, according to each generated data, a fluctuation value and a random number in each generated sample of the current period, a corresponding generated data of a next period is obtained respectively, initial samples of the next period corresponding to each generated sample of the current period are obtained, from which an effective sample satisfying an adjacent period data constraint and an adjacent period change constraint is obtained, when the effective sample does not satisfy an effective sample quantity constraint, the second generation strategy is repeatedly executed; otherwise, the obtained effective sample is taken as a generated sample of the next period, and the next period is taken as the current period again, and the second generation strategy is executed again until a plurality of generated samples of a plurality of continuous periods of the time window length is obtained, and a plurality of generated sample sequences is composed.

[0018] Based on the further improvement of the above method, according to each running data, a fluctuation value and a random number in the first period of each historical sample sequence, a corresponding generated data is obtained multiple times by adding a first random disturbance value to each running data multiple times, and the first random disturbance value is obtained by multiplying a random disturbance ratio and the corresponding running data;

[0019] According to each generated data, a fluctuation value and a random number in each generated sample of the current period, a corresponding generated data of a next period is obtained respectively by adding a second random disturbance value to each generated data in each generated sample, and the second random disturbance value is obtained by multiplying a random disturbance ratio and the generated data of the corresponding generated sample;

[0020] The random disturbance ratio is obtained according to the fluctuation value and the random number.

[0021] Based on the further improvement of the above method, the initial period data constraint is that the difference absolute value of the line loss rate of the initial sample of the first period and the line loss rate of the historical sample of the first period is not greater than a first threshold value;

[0022] The adjacent period data constraint is that the difference absolute value of the line loss rate of the initial sample of the adjacent period is not greater than the first threshold value;

[0023] The adjacent period change constraint is that the transformer area distribution variable load change value of the initial sample of the adjacent period is greater than the line loss change value.

[0024] The effective sample quantity constraint is that the number of effective samples is greater than or equal to a second threshold.

[0025] According to the further improvement of the above method, real features and generated features are extracted from each historical sample sequence and the corresponding multiple generated sample sequences, including:

[0026] According to the preset multiple indicators, features of each indicator of each running data are extracted from each historical sample sequence and spliced to obtain real features corresponding to each historical sample sequence; features of each indicator of each running data are extracted from each generated sample sequence and spliced to obtain generated features corresponding to each generated sample sequence.

[0027] According to the further improvement of the above method, the fluctuation value is a trainable parameter in the generator, and the fluctuation value is automatically updated and optimized through gradient descent in the generative adversarial network training process.

[0028] On the other hand, the embodiment of the present application provides a low-voltage active transformer area line loss rate prediction system based on an improved GAN, comprising:

[0029] A sample collection module is configured to collect historical operation data of a low-voltage active transformer area, construct historical samples of each period, and form multiple historical sample sequences through a sliding time window, and put them into a historical sample set.

[0030] A sample generation module is configured to construct a generative adversarial network including a generator, a feature extractor, and a discriminator, and train the same using the historical sample set; the generator is configured to obtain multiple generated sample sequences according to each historical sample sequence and a sample generation strategy; the feature extractor is configured to extract real features and multiple generated features according to each historical sample sequence and the corresponding multiple generated sample sequences; and the discriminator is configured to discriminate all real features and generated features.

[0031] A model training module is configured to, after training is completed, obtain generated sample sequences corresponding to generated features discriminated as true by the discriminator, put them into the historical sample set, construct a prediction data set together with device rated capacity, train a time series neural network model, and obtain a line loss rate prediction model.

[0032] A line loss rate prediction module is configured to collect operation data and device rated capacity for prediction, and obtain a line loss rate at a prediction time using the line loss rate prediction model.

[0033] Compared with the prior art, the present application can at least achieve one of the following beneficial effects:

[0034] 1. By improving the generator of the generative adversarial network, the generated samples are consistent with the historical samples in the continuity of the time sequence, and the quality of the generated samples in each period is guaranteed through data constraint screening, and the rationality of the generated samples is improved; a plurality of generated sample sequences are obtained by using each historical sample sequence, more data characteristics and mode changes are covered, data homogenization caused by a single generation path is avoided, the diversity of the samples is increased, the line loss rate prediction model is facilitated to learn more comprehensive district operation characteristics, the line loss rate prediction model can more accurately capture the law of line loss change, and therefore the prediction accuracy of the line loss rate is significantly improved.

[0035] 2. The sample generation strategy is divided into two, the first generation strategy focuses on the sample generation of the first period, and the initial period data constraint and the effective data quantity constraint are used to lay a good foundation for subsequent generation, so that the quality problem of the initial sample does not affect the whole sequence; the second generation strategy considers the adjacent period data constraint and the change constraint, and generates the sample in the subsequent period based on the high-quality sample in the first period, so as to ensure the rationality and continuity of the generated sample sequence in the time dimension, and make the whole time sequence data generated more real and reliable.

[0036] 3. The features of a plurality of indexes are extracted from the historical sample sequence and the generated sample sequence generated by the generator, so that the discriminator discriminates the comprehensive and implicit deep features in the sample, has stronger robustness when facing data with different distributions or noise interference, and improves the stability and reliability of the network.

[0037] In the present application, the above technical solutions can be combined with each other to realize more preferred combination schemes. Other features and advantages of the present application will be described in the subsequent specification, and some advantages will become apparent from the specification or will be understood by implementing the present application. The purpose and other advantages of the present application can be realized and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0038] The accompanying drawings are included to provide a further understanding of the application and are incorporated herein and constitute a part of the application.

[0039] Figure 1 A flowchart of a low-voltage active district line loss rate prediction method based on an improved GAN in embodiment 1 of the present application. DETAILED DESCRIPTION

[0040] The preferred embodiments of the present application will be specifically described below in conjunction with the drawings, wherein the drawings constitute a part of the present application and are used to illustrate the principles of the embodiments of the present application, but are not used to limit the scope of the present application.

[0041] Embodiment 1

[0042] One specific embodiment of the present application discloses a low-voltage active transformer area line loss rate prediction method based on improved GAN, as shown in the figure, comprising the following steps: Figure 1

[0043] S1, collect the historical operation data of the low-voltage active transformer area, construct the historical samples of each period and form a plurality of historical sample sequences through the sliding time window, and put them into the historical sample set.

[0044] It should be noted that the collected historical operation data of the low-voltage active transformer area includes: transformer area distribution transformer load, distributed power on-grid output, charging load and user regular load; wherein, the transformer area distribution transformer load is measured according to the metering cabinet beside the transformer area distribution transformer, the distributed power on-grid output is the output of the distributed power connected to the low-voltage transformer area to the power grid, which is measured according to the measurement table installed at the distributed power access point; the charging load is measured according to the measurement table installed at the electric vehicle charging pile access point; the user regular load is measured according to the household meter.

[0045] Collect the historical operation data of each measurement time and preprocess, such as standardization or normalization processing, and then perform time alignment, that is, obtain the transformer area distribution transformer load, distributed power on-grid output, charging load and user regular load of each same measurement time.

[0046] Further, according to the preset period length, each measurement time is divided, and according to the measurement values of the transformer area distribution transformer load, distributed power on-grid output, charging load and user regular load of each measurement time in each period, the average values of each are calculated as the values of each operation data in each period, and the historical samples of each period are obtained.

[0047] Further, according to the total number of periods in the preset time window and the sliding step, a plurality of historical samples of periods are sequentially formed into a historical sample sequence through a sliding time window, and put into the historical sample set.

[0048] S2, construct a generative adversarial network including a generator, a feature extractor and a discriminator, and train it using the historical sample set; the generator is used to obtain a plurality of generated sample sequences according to each historical sample sequence and sample generation strategy; the feature extractor is used to extract real features and a plurality of generated features according to each historical sample sequence and its corresponding plurality of generated sample sequences respectively; the discriminator is used to discriminate all real features and generated features.

[0049] S21, generator.

[0050] ​It should be noted that in the generative adversarial network constructed in this embodiment, the generator is not a neural network model, but a plurality of generated sample sequences are obtained by executing a sample generation strategy according to each historical sample sequence, which not only increases the number of data samples, but also improves the diversity of the samples.

[0051] Specifically, according to the historical sample in the first time period of each historical sample sequence, a plurality of initial samples of each time period are generated in turn by using a sample generation strategy, and the valid samples meeting the data constraints of each time period are obtained as a plurality of generated samples of the corresponding time period, and then a plurality of generated sample sequences with the same time window length are obtained.

[0052] Among them, the data constraints include: initial time period data constraints, adjacent time period data constraints, adjacent time period change constraints and effective sample quantity constraints; the sample generation strategy includes: first generation strategy and second generation strategy in turn. The first generation strategy focuses on the sample generation of the first time period, lays a good foundation for subsequent generation, and avoids the influence of initial sample quality problems on the whole sequence; the second generation strategy generates subsequent time period samples based on the high-quality samples of the first time period, ensures the rationality and continuity of the generated sample sequence in the time dimension, and makes the generated whole time sequence data more real and reliable.

[0053] Specifically, the first generation strategy is used to obtain a plurality of generated samples of the first time period meeting the initial time period data constraints and the effective data quantity constraints according to the historical sample in the first time period of each historical sample sequence; the second generation strategy is used to obtain a plurality of generated samples of a plurality of subsequent continuous time periods meeting the adjacent time period data constraints, the adjacent time period change constraints and the effective data quantity constraints according to each generated sample of the first time period, and to form a plurality of generated sample sequences.

[0054] That is, first, a plurality of generated samples of the first time period are obtained from the historical sample sequence by using the first generation strategy, and then a plurality of generated samples of a plurality of subsequent continuous time periods in the time window except the first time period are obtained by using the second generation strategy based on the plurality of generated samples of the first time period, so as to obtain a plurality of generated sample sequences with the same length as the historical sample sequence. In the generation process, different data constraints are used for effective sample screening, and the effective sample quantity constraint is used to control the minimum generation quantity, so the number of generated sample sequences obtained by the sample generation strategy for each historical sample sequence is not necessarily the same.

[0055] Further, the first generation strategy performs the following steps:

[0056] ①According to each running data, fluctuation value and random number in the historical sample in the first time period of each historical sample sequence, a plurality of generated data are obtained as a plurality of initial samples of the first time period.

[0057] It should be noted that the corresponding generated data is generated by adding the first random perturbation value multiple times to each running data in the first period of each historical sample sequence. The first random perturbation value is obtained by multiplying the random perturbation ratio with the corresponding running data. The random perturbation ratio is obtained based on the fluctuation value and the random number.

[0058] Specifically, the generated data for the first time period is calculated using the following formula:

[0059] (1),

[0060] in, , , and They represent the first The values ​​of distribution transformer load, distributed power grid output, charging load, and user conventional load in the historical samples of the first time period in the historical sample sequence; , , and These represent the first time period, number 1 and 2 respectively. The values ​​of distribution transformer load, distributed power grid output, charging load, and user conventional load in the initial sample; Represents a random number in the interval (0,1). This represents the fluctuation value, initially set to 0.1; This indicates the proportion of random disturbances.

[0061] As can be seen from formula (1), the fluctuation value determines the maximum deviation ratio of the disturbance relative to the historical sample's running data. The random number is used to generate a uniformly distributed random disturbance within the upper and lower deviation range of the running data of the historical sample through dynamic scaling.

[0062] It should be noted that each of the four data points generated by formula (1) forms an initial sample for the first time period; multiple executions of formula (1) will yield multiple initial samples, and the number of initial samples is controlled by a preset sample number.

[0063] ② Obtain valid samples that meet the data constraints of the initial period from the multiple initial samples of the first period, and repeat the first generation strategy until the number of valid samples in the first period meets the constraint of the number of valid samples, thus obtaining multiple generated samples of the first period.

[0064] It should be noted that the initial period data constraint is that the absolute value of the difference between the line loss rate of the initial sample of the first period and the line loss rate of the historical sample of the first period is not greater than a first threshold, wherein the line loss rate is calculated according to the transformer area distribution load, distributed power output, charging load and user regular load of the first period, and the formula is as follows:

[0065] (2),

[0066] wherein, indicates the initial line loss rate of the initial sample of the first period, indicates the line loss rate of the historical sample of the first period; indicates the first threshold, which is set to 5% in the embodiment.

[0067] In order to improve the accuracy of the data, the initial sample is checked by the initial period data constraint, and if the initial sample satisfies the initial period data constraint, it is regarded as a valid sample, otherwise the initial sample is removed. At the same time, the generated sample reaches a certain number by the valid sample number constraint. Wherein, the valid sample number constraint is that the number of valid samples is greater than or equal to a second threshold . That is, if the number of valid samples obtained is greater than or equal to the second threshold , the valid sample is regarded as the generated sample of the first period and is transmitted into the second generation strategy; otherwise, the valid sample is retained, the first generation strategy is repeatedly executed, new valid samples are obtained according to the above process, and until the number of all valid samples (new valid samples and previously retained valid samples) is greater than or equal to the second threshold , as the generated sample of the first period, is transmitted into the second generation strategy.

[0068] It should be noted that each generated sample of the first period corresponds to a generated sample sequence.

[0069] Further, the second generation strategy performs the following steps:

[0070] ①Taking the first period as the current period, the initial sample of the next period corresponding to each generated sample of the current period is obtained according to each generated data, fluctuation value and random number in each generated sample of the current period.

[0071] It should be noted that the generated data corresponding to the next period is respectively generated by adding a second random disturbance value to each generated data in each generated sample of the current period, wherein the second random disturbance value is obtained by multiplying the random disturbance ratio with the generated data of the corresponding generated sample; the random disturbance ratio is obtained according to the fluctuation value and the random number.

[0072] Specifically, the initial sample for the next time period corresponding to each generated sample in the current time period is calculated using the following formula:

[0073] (3),

[0074] in, , , and They represent the first The first time period The generated sample contains values ​​for the distribution transformer load, distributed power generation output, charging load, and user conventional load. , , and They represent the first The first time period The values ​​of distribution transformer load, distributed power grid output, charging load, and user conventional load in the initial sample; , This indicates the total number of time periods within the time window.

[0075] As can be seen from formula (3), each time four data points for the next time period are generated based on the four data points in the generated sample of the current time period, the initial sample for the next time period corresponding to the generated sample of the current time period is formed.

[0076] ② Obtain valid samples that satisfy the data constraints and changes in adjacent time periods from the initial samples of the next time period. If the valid samples do not meet the constraints on the number of valid samples, repeat the second generation strategy. Otherwise, use the obtained valid samples as the generated samples for the next time period, and use the next time period as the current time period, and then execute the second generation strategy again until multiple generated samples of multiple consecutive time periods of time window length are obtained, forming multiple generated sample sequences.

[0077] It should be noted that the data constraint for adjacent time periods is that the absolute value of the difference in line loss rate between the initial samples of adjacent time periods does not exceed a first threshold, as shown in the formula below:

[0078] (4),

[0079] in, and Indicates the first The first generated sample corresponding to the The time period and the first The line loss rate for each time period is based on the... The time period and the first The load of the transformer area, the output of the distributed power, the charging load and the regular load of the user in the time period are calculated.

[0080] Further, the valid samples satisfying the adjacent time period data constraint are further checked whether they satisfy the adjacent time period change constraint. The adjacent time period change constraint is that the change value of the transformer area load of the initial sample in the adjacent time period is greater than the line loss change value, which is shown in the following formula:

[0081] (5)。

[0082] The initial sample satisfying the adjacent time period data constraint and the adjacent time period change constraint is taken as the valid sample in the second time period. If the number of the valid samples does not satisfy the valid sample number constraint, the valid samples are reserved, and the second generation strategy is repeatedly executed, that is, for each generated sample in the first time period, a new initial sample in the second time period is generated according to the formula (3), and the new initial sample is checked by the adjacent time period data constraint and the adjacent time period change constraint to obtain new valid samples. If the number of the new valid samples satisfies the valid sample number constraint together with the number of the previously reserved valid samples, all the valid samples are taken as the generated samples in the second time period, and the second time period is taken as the current time period, and the second generation strategy is executed again to obtain multiple generated samples in the third time period according to the above method, and the process is sequentially repeated until multiple generated samples in the nth time period are obtained. It should be noted that in the process of repeatedly executing the second generation strategy, the multiple initial samples in the third time period generated according to the first generated sample in the first time period may not satisfy the data constraint, or may partially satisfy or fully satisfy the data constraint. Therefore, the association between the time periods is established for each generated sample, and the generated samples from the first time period to the nth time period are complete.

[0083]

[0084] ​​​​​​​​​​​Exemplarily, the second threshold in the effective sample quantity constraint is 40, for the first historical sample sequence, according to the historical sample of the first time period, 80 initial samples of the first time period are generated by performing the first generation strategy, and 60 effective samples are obtained after the initial time period data constraint verification, 60 is greater than the second threshold 40, then the 60 effective samples are transmitted into the second generation strategy as the generated samples of the first time period, and one corresponding initial sample of the second time period is generated respectively, that is, 60 initial samples of the second time period are generated, and the adjacent time period data constraint and the adjacent time period change constraint verification are performed:

[0085] If 50 effective samples are obtained, the 50 effective samples are taken as the generated samples of the second time period, and it is ensured that the 50 generated samples are associated with the generated samples of the first time period, after taking the second time period as the current time period, the second generation strategy is performed to obtain 50 initial samples of the third time period;

[0086] If 30 effective samples are obtained, the 30 effective samples are retained, and 60 new initial samples of the second time period are generated again according to the 60 generated samples of the first time period, the 60 new initial samples are verified, if 20 new effective samples are obtained, and the 30 effective samples retained before are added, a total of 50 effective samples are obtained, which is greater than the second threshold 40, then the 50 effective samples are taken as the generated samples of the second time period, and it is ensured that the 50 generated samples are associated with the generated samples of the first time period, after taking the second time period as the current time period, the second generation strategy is performed to obtain 50 initial samples of the third time period;

[0087] The 50 initial samples of the third time period are operated according to the processing process of the second time period, and so on, to obtain greater than or equal to 40 effective samples of the fourth time period as the generated samples.

[0088] According to the association relationship between the generated samples of each time period, a plurality of generated sample sequences are composed in the order of time periods, and correspond to the actually collected historical sample sequences. That is, for each historical sample sequence, a plurality of generated samples of time sequences with data constraint relationship are obtained by using the generator of the embodiment.

[0089] S22, feature extractor.

[0090] In this step, data features are extracted for each historical sample sequence and its corresponding generated sample sequence, wherein each historical sample sequence is constructed according to actually collected data, and the corresponding data features are taken as real features; the generated sample sequence obtained by using the generator, and the corresponding data features are taken as generated features.

[0091] ​Specifically, based on multiple preset indicators, features of each indicator of each operational data point are extracted from each historical sample sequence and concatenated to obtain the true features corresponding to each historical sample sequence; similarly, features of each indicator of each operational data point are extracted from each generated sample sequence and concatenated to obtain the generated features corresponding to each generated sample sequence. The preset indicators include: maximum value, minimum value, mean, variance, frequency, and frequency amplitude.

[0092] It should be noted that when extracting the frequency and frequency amplitude of each running data, Fourier transform is used to obtain multiple frequencies and their amplitudes. The largest and second largest frequency amplitudes and their corresponding frequencies are selected. If the second largest frequency amplitude is less than 10% of the largest frequency amplitude, only the largest frequency amplitude and its corresponding frequency are selected.

[0093] S23, Discriminator.

[0094] The discriminator in this embodiment is a binary classifier that employs a neural network model, such as a recurrent neural network, a multilayer perceptron, or a convolutional neural network. The discriminator distinguishes between real and generated features, and its output is the probability distribution of whether the input features are real features.

[0095] S24. Train the generative adversarial network.

[0096] When training a generative adversarial network using a historical sample set, the initial learning rate is set to... And after every 5 generations of training, the learning rate is multiplied by 0.95 to achieve decay.

[0097] It should be noted that the fluctuation values ​​used in the sample generation strategy in the generator, namely the fluctuation values ​​in formulas (1) and (3), are trainable parameters. During the training process of the generative adversarial network, the fluctuation values ​​are automatically updated and optimized through gradient descent, making the discriminator more inclined to believe that the generated data is real.

[0098] The parameters in a generative adversarial network are adjusted according to the following formula:

[0099] (6),

[0100] in, and These represent the first and second parts of the generator. The parameter is the first Second and third The value of the next iteration. and These represent the first and second parts of the discriminator. The parameter is the first Second and third The value of the next iteration; Indicates the learning rate; and respectively represent the generator loss function and the discriminator loss function, represents the gradient of the generator loss function with respect to the first parameter of the generator; represents the gradient of the discriminator loss function with respect to the first parameter of the discriminator.

[0101] When the loss values of the generator and the discriminator no longer obviously decrease / increase, and the difference value continues to fluctuate within a preset small range, the training is ended, and a trained generative adversarial network is obtained.

[0102] S3, after the training is ended, a generated sample sequence corresponding to the generated feature discriminated as true by the discriminator is obtained, and is put into a historical sample set to construct a prediction data set together with the rated capacity of the device, and a time series neural network model is trained to obtain a line loss rate prediction model.

[0103] It should be noted that the generated sample sequence corresponding to the generated feature discriminated as true by the discriminator is put into the historical sample set, and is collectively referred to as a sample sequence together with the historical sample sequence. The collected rated capacity of the device is used as a static feature, including: rated capacity of a transformer in a distribution area, rated capacity of a distributed power supply, and charging capacity of a charging pile.

[0104] Further, the values of the transformer load in the distribution area, the distributed power supply output, and the charging load in each time period in each sample sequence are divided by the corresponding rated capacity of the transformer in the distribution area, the rated capacity of the distributed power supply, and the charging capacity of the charging pile to obtain the transformer load rate in the distribution area, the distributed power supply utilization rate, and the charging pile utilization rate in each time period, which are used as new data together with the original data in the corresponding time period as prediction samples in the corresponding time period, so that a prediction sample sequence is obtained and is put into the prediction data set.

[0105] It should be noted that the length of the prediction sample sequence can be adjusted according to actual conditions, and does not need to be the same as the length of the historical sample sequence constructed in step S1.

[0106] Specifically, the data in the prediction sample in each time period in the prediction data set includes: transformer load in the distribution area, distributed power supply output, charging load, user regular load, transformer load rate in the distribution area, distributed power supply utilization rate, and charging pile utilization rate.

[0107] The time series neural network model in this embodiment is used to learn the input prediction sample sequence and predict the line loss rate in the next time period. Therefore, the label value (i.e., the actual line loss rate) of each prediction sample sequence is the line loss rate calculated according to the transformer load in the distribution area, the distributed power supply output, the charging load, and the user regular load in the next time period after the prediction sample sequence, which is used to compare with the line loss rate prediction value output by the model in the training process.

[0108] Any one of the time sequence neural network models, such as RNN, LSTM, GRU or Transformer model, is trained by using the prediction sample set, and a line loss rate prediction model is obtained after the training is completed.

[0109] The embodiment converts the fixed equipment rated capacity into the load rate and utilization rate changing over time, quantifies the current operation state of the equipment relative to the level of its maximum capacity, obtains more meaningful multiple time sequence features, and supplements the original operation data, so that the model more accurately learns the change rule of the line loss rate, and the accuracy of the model in predicting the line loss rate is improved.

[0110] S4, collecting operation data for prediction and equipment rated capacity, and obtaining the line loss rate at the prediction time by using the line loss rate prediction model.

[0111] In actual application, the operation data for prediction is collected: the transformer substation load of the transformer substation in multiple periods, the distributed power output and charging load, the transformer substation load rate, the distributed power utilization rate and the charging pile utilization rate in each period are calculated according to the equipment rated capacity, the time sequence data for prediction is composed and input into the line loss rate prediction model, and the line loss rate of the next period of the time sequence data is output.

[0112] Compared with the prior art, the low-voltage active transformer substation line loss rate prediction method based on the improved GAN provided by the embodiment improves the generator of the generative adversarial network, so that the generated sample is consistent with the historical sample in the continuity of the time sequence, and the quality of the generated sample in each period is guaranteed through data constraint screening, and the rationality of the generated sample is improved; a plurality of generated sample sequences are obtained by using each historical sample sequence, more data features and mode changes are covered, data homogenization caused by a single generation path is avoided, the diversity of the sample is increased, the transformer substation operation characteristics learned by the line loss rate prediction model are more comprehensive, the line loss rate prediction model can more accurately capture the change rule of the line loss, and the prediction accuracy of the line loss rate is significantly improved. The sample generation strategy is divided into two, the first generation strategy focuses on the sample generation of the first period, the initial period data constraint and the effective data quantity constraint are used to lay a good foundation for subsequent generation, and the influence of the initial sample quality problem on the entire sequence is avoided; the second generation strategy considers the adjacent period data constraint and the change constraint, generates the sample in the subsequent period based on the high-quality sample in the first period, guarantees the rationality and continuity of the generated sample sequence in the time dimension, and makes the generated entire time sequence data more real and reliable. The features of multiple indexes are extracted from the historical sample sequence and the generated sample sequence generated by the generator, the discriminator discriminates the comprehensive and implicit deep features in the sample, has stronger robustness when facing data with different distributions or noise interference, and improves the stability and reliability of the network.

[0113] Embodiment 2

[0114] Another embodiment of the present application discloses an improved GAN-based low-voltage active area line loss rate prediction system, thereby realizing the improved GAN-based low-voltage active area line loss rate prediction method in Embodiment 1. The specific implementation of each module is referred to the corresponding description in Embodiment 1. The system comprises:

[0115] a sample collection module, configured to collect historical operation data of a low-voltage active area, construct historical samples of each period, and form a plurality of historical sample sequences through a sliding time window and put them into a historical sample set;

[0116] a sample generation module, configured to construct a generative adversarial network comprising a generator, a feature extractor and a discriminator, and train the generative adversarial network using the historical sample set; the generator is configured to obtain a plurality of generated sample sequences according to each historical sample sequence and a sample generation strategy; the feature extractor is configured to extract real features and a plurality of generated features according to each historical sample sequence and the corresponding plurality of generated sample sequences respectively; and the discriminator is configured to discriminate all real features and generated features;

[0117] a model training module, configured to, after training is completed, obtain generated sample sequences corresponding to generated features discriminated as true by the discriminator, put them into the historical sample set, construct a prediction data set together with device rated capacity, train a time series neural network model, and obtain a line loss rate prediction model;

[0118] a line loss rate prediction module, configured to collect operation data for prediction and device rated capacity, and obtain a line loss rate at a prediction moment using the line loss rate prediction model.

[0119] Since the improved GAN-based low-voltage active area line loss rate prediction system of the present embodiment is related to the improved GAN-based low-voltage active area line loss rate prediction method described above, they can be mutually referred to, and thus repeated description is not given here. Since the system embodiment is the same as the method embodiment in principle, the system embodiment also has the corresponding technical effects of the method embodiment.

[0120] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer readable storage medium includes a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.

[0121] The above description is only the preferred embodiment of the present application, but the protection scope of the present application is not limited to this. Any changes or replacements within the technical scope disclosed by the present application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present application.

Claims

1. An improved GAN-based low-voltage active distribution area line loss rate prediction method, characterized in that, The method comprises the following steps: Collecting historical operation data of a low-voltage active transformer area, constructing historical samples of each period and forming multiple historical sample sequences through a sliding time window and putting them into a historical sample set; Constructing a generative adversarial network including a generator, a feature extractor and a discriminator, and training the network using the historical sample set; the generator is used to obtain multiple generated sample sequences according to each historical sample sequence and a sample generation strategy, specifically, multiple initial samples of each period are generated in sequence using the sample generation strategy according to the historical sample of the first period in each historical sample sequence, and valid samples meeting the data constraints of each period are obtained from the multiple initial samples of each period as multiple generated samples of the corresponding period, and then multiple generated sample sequences of the same time window length are obtained; the feature extractor is used to extract real features and multiple generated features according to each historical sample sequence and its corresponding multiple generated sample sequences respectively; The discriminator is used to discriminate all real features and generated features; After the training is completed, the generated sample sequence corresponding to the generated features discriminated as real by the discriminator is obtained and put into the historical sample set, and a prediction data set is constructed together with the rated capacity of the equipment, a time series neural network model is trained, and a line loss rate prediction model is obtained; Collecting operation data for prediction and rated capacity of the equipment, and obtaining the line loss rate at the prediction time using the line loss rate prediction model; The data constraints include initial period data constraints, adjacent period data constraints, adjacent period change constraints and valid sample quantity constraints; the sample generation strategy includes a first generation strategy and a second generation strategy in sequence; the first generation strategy is used to obtain multiple generated samples of the first period meeting the initial period data constraints and the valid data quantity constraints according to the historical sample of the first period in each historical sample sequence; the second generation strategy is used to obtain multiple generated samples of multiple subsequent continuous periods meeting the adjacent period data constraints, the adjacent period change constraints and the valid data quantity constraints according to each generated sample of the first period, and to form multiple generated sample sequences according to the time window length; The historical sample and the generated sample of each period each include multiple operation data: transformer substation load, distributed power output, charging load and user regular load; The first generation strategy performs the following steps: multiple corresponding generated data are obtained according to each operation data, a fluctuation value and a random number in the historical sample of the first period in each historical sample sequence, as multiple initial samples of the first period, valid samples meeting the initial period data constraints are obtained from the multiple initial samples of the first period, the first generation strategy is repeatedly executed until the valid samples of the first period meet the valid sample quantity constraints, and multiple generated samples of the first period are obtained. The second generation strategy performs the following steps: taking a first time period as a current time period, obtaining generation data corresponding to a next time period from each generation data in each generation sample of the current time period, a fluctuation value and a random number respectively, to obtain initial samples of the next time period corresponding to each generation sample of the current time period, obtaining valid samples meeting adjacent time period data constraints and adjacent time period change constraints therefrom, and repeating the second generation strategy when the valid samples do not meet valid sample quantity constraints; otherwise, taking the obtained valid samples as generation samples of the next time period, and taking the next time period as the current time period again to perform the second generation strategy, until a plurality of generation samples of a plurality of time periods of a time window length are obtained to form a plurality of generation sample sequences. The generation data corresponding to each running data in the first time period of each historical sample sequence is generated by adding a first random disturbance value to each running data a plurality of times, and the first random disturbance value is obtained by multiplying a random disturbance ratio by the corresponding running data. The generation data corresponding to each generation data in each generation sample of the current time period is generated by adding a second random disturbance value to each generation data in each generation sample, and the second random disturbance value is obtained by multiplying a random disturbance ratio by the generation data of the corresponding generation sample. The random disturbance ratio is obtained according to the fluctuation value and the random number. The initial time period data constraint is that the absolute difference between the line loss rate of the initial sample of the first time period and the line loss rate of the historical sample of the first time period is not greater than a first threshold. The adjacent time period data constraint is that the absolute difference between the line loss rates of the initial samples of adjacent time periods is not greater than the first threshold. The adjacent time period change constraint is that the area transformer distribution load change value of the initial sample of the adjacent time period is greater than the line loss change value. The valid sample quantity constraint is that the number of valid samples is greater than or equal to a second threshold.

2. The improved GAN-based low-voltage active feeder area line loss rate prediction method according to claim 1, characterized in that, The real features and the plurality of generation features are extracted from each historical sample sequence and the corresponding plurality of generation sample sequences, including: According to a plurality of preset indexes, the features of each index of each running data are extracted from each historical sample sequence and spliced to obtain real features corresponding to each historical sample sequence. The features of each index of each running data are extracted from each generation sample sequence and spliced to obtain generation features corresponding to each generation sample sequence.

3. The improved GAN-based low-voltage active feeder area line loss rate prediction method according to claim 1, characterized in that, The fluctuation value is a trainable parameter in the generator, and the fluctuation value is automatically updated and optimized through gradient descent in the training process of the generative adversarial network.

4. An improved GAN-based low-voltage active feeder area line loss rate prediction system, characterized in that, The system for implementing the improved GAN-based low-voltage active transformer area line loss rate prediction method of any one of claims 1-3, the system comprising: A sample collection module for collecting historical running data of a low-voltage active transformer area, constructing historical samples of each time period, and forming a plurality of historical sample sequences through a sliding time window and placing them in a historical sample set; The sample generation module is configured to construct a generative adversarial network including a generator, a feature extractor and a discriminator, and train the generative adversarial network by using the historical sample set; the generator is configured to obtain a plurality of generated sample sequences according to each historical sample sequence and a sample generation strategy; the feature extractor is configured to extract real features and a plurality of generated features respectively according to each historical sample sequence and the corresponding plurality of generated sample sequences; and the discriminator is configured to discriminate all real features and generated features; The model training module is configured to obtain the generated sample sequence corresponding to the generated feature discriminated as true by the discriminator after the training is completed, put the generated sample sequence into the historical sample set, construct a prediction data set together with the device rated capacity, train the time series neural network model, and obtain a line loss rate prediction model; The line loss rate prediction module is configured to collect operation data and device rated capacity for prediction, and obtain a line loss rate at a prediction moment by using the line loss rate prediction model.

Citation Information

Patent Citations

  • Method, device and system for calculating theoretical line loss of transformer area

    CN116304526A

  • Conditional generative adversarial network-based short-term wind power prediction method

    CN116488151A