Scene generation method, system and device considering source-load coupling and medium
By amplifying the historical source load data vertically and horizontally, and using clustering and Markov chain Monte Carlo algorithm to generate future scenarios, combined with GAN model for prediction, the problems of insufficient historical data, slow calculation speed and balance under extreme load conditions in the existing technology are solved, and source load scenario generation with higher accuracy and faster calculation speed are achieved.
Patent Information
- Application Number
- CN202411616424.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
AI Technical Summary
When generating source load scenarios, the prior art faces problems such as insufficient historical data, slow clustering calculation speed, and failure to consider power supply and load balancing under extreme load conditions.
By acquiring historical source load data for vertical and horizontal expansion, clustering analysis was performed after the data was fused, and future source load scenarios were generated using self-organized mapping clustering algorithm and Markov chain Monte Carlo algorithm, and predictions were made in combination with GAN model.
It improves the accuracy of the generated scene, shortens the calculation time, can better adapt to the balanced needs of power and load under extreme load conditions, and meets the demand for the dispatching center to generate new energy output scenario sequences under specific load levels.
Smart Images

Figure CN119577672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of scene generation, and more specifically, to a scene generation method, system, device and medium taking source-load coupling into consideration. Background Art
[0002] At present, a series of policies have been implemented worldwide to reduce carbon emissions and greenhouse effects. At the same time, in many countries, in order to cope with global climate change, the proportion of renewable energy in power generation has gradually increased; some countries have proposed detailed incremental plans for wind power installed capacity and photovoltaic installed capacity; in addition, my country is also expected to have about 500 million kilowatts of distributed new energy installed capacity by 2025; however, the volatility and randomness of new energy, as well as the access of new loads such as electric vehicles, have brought unprecedented challenges to the dispatching and power balance of power systems; therefore, how to accurately characterize the uncertainty of new energy and loads has become a research hotspot in the field of power systems in recent years. Research methods based on artificial intelligence and neural networks have become the mainstream research direction in this field with their powerful data processing and pattern recognition capabilities; the main idea is to use the powerful learning ability of artificial intelligence to obtain the distribution characteristics contained in the source-load data, and generate similar source-load scenarios based on this.
[0003] However, there are the following problems in generating similar source-load scenarios:
[0004] 1. The artificial intelligence method requires sufficient historical data information, but a considerable number of new energy power plants have only been put into operation in recent years, resulting in a limited amount of historical data, which leads to the inaccuracy of the generated scenarios;
[0005] 2. Although the clustering method has high clustering accuracy, the calculation speed is too slow when the sample size is large;
[0006] 3. In the power and electricity balance and operation scheduling of the power system, it is necessary to consider the balance of power supply and load under extreme conditions (such as high load level and low load level); however, when performing source-load balance under high load level conditions, traditional scenario generation methods usually use historical data to generate future scenarios. However, these scenarios do not consider the limitations of extreme load levels and are not suitable for calculations at specific load levels.
[0007] In view of this, this application is hereby made. Summary of the invention
[0008] The purpose of the present invention is to provide a scene generation method, system, device and medium taking source-load coupling into consideration, so as to solve the problems existing in the above-mentioned background technology.
[0009] The above technical objectives of the present invention are achieved through the following technical solutions:
[0010] In a first aspect, the present application provides a scenario generation method considering source-load coupling, comprising the following specific steps:
[0011] Obtain historical source and load data, vertically expand the data of two adjacent days in the historical source and load data to obtain vertical expansion data, and horizontally expand the data of adjacent moments on the same day to obtain horizontal expansion data. The historical source and load data includes historical load data and corresponding new energy output data;
[0012] The horizontally expanded data and the vertically expanded data are fused to obtain expanded fused data, and the expanded fused data and the historical source load data are combined according to the daily sequence number, and the combined data is determined as sample data;
[0013] Based on the preset conditions of extreme days and typical days, the self-organizing map clustering algorithm is used to perform cluster analysis on the sample data to obtain cluster analysis results. The cluster analysis results include the first-day type clustering results corresponding to extreme days and the second-day type clustering results corresponding to typical days.
[0014] Based on the Markov chain, the state transfer matrix between the first day type clustering result and the second day type clustering result is constructed, and the Markov chain Monte Carlo algorithm is used to sample each state transfer matrix to generate the day type sequence in the future prediction time period;
[0015] Using the cluster data of each day type in the first day type clustering result and the second day type clustering result, respectively train the preset GAN models of each day type until each GAN model meets the preset training end condition, and determine each GAN model that meets the preset training end condition as a prediction model;
[0016] The cluster data of each day type in the day type sequence in the cluster analysis results are input into the corresponding prediction model for processing to obtain the target source load data of each day type in the day type sequence, and the target source load data are sorted according to the day serial number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
[0017] The beneficial effects of the present invention are as follows: in this scheme, firstly, the original sample (historical source-load data) is amplified according to the historical source-load data, and the historical source-load data includes the new energy processing data and the historical load data; then, the sample data obtained after the amplification of the original sample is clustered and analyzed to obtain cluster data of multiple day types, that is, the first day type clustering result includes cluster data of multiple day types, and similarly, the second day type clustering result includes cluster data of multiple day types, and each cluster of the first day type clustering result or the second day type clustering result includes a daily load curve and a corresponding new energy output curve; and the first day type clustering result includes the day type of the corresponding extreme day, and the second day type clustering result includes the day type of the corresponding typical day; then, based on the Markov chain, the clustering results of the first day type and the second day type are constructed. The state transfer matrix between all day types characterizes the transition probability between each day type in the first day type clustering result and the second day type clustering result; when training the preset GAN model, the cluster data of the same day type is used to train the same GAN model, that is, the number of day types existing in the historical source and load data corresponds to the number of GAN models. After the training of each GAN model is completed, the day type sequence in the future prediction time period is obtained based on the Erkov chain Monte Carlo algorithm, and the cluster data of each day type existing in the day type sequence in the clustering analysis result is input into the corresponding prediction model for processing, so as to obtain the target source and load data of each day type, and finally sort the target source and load data according to the day serial number of each day type in the day type sequence, and finally obtain the source and load scene sequence of the future prediction time period.
[0018] In this scheme, horizontal and vertical data augmentation methods are used to make the model training samples sufficient, ultimately improving the accuracy of the generated scenarios, and the clustering method used above is not only accurate but also faster in calculation; based on the preset conditions of extreme days and typical days, cluster data corresponding to each day type in extreme days are obtained through clustering, so that when training the model, the model can better learn the scene characteristics under the machine-side scenario; the above scheme is based on the source-load data expansion method of Kalman gain information fusion technology, which overcomes the shortcomings of insufficient historical data information for effective artificial intelligence training, and proposes a new energy output sequence scenario generation method based on artificial intelligence under load level constraints, which meets the needs of the dispatching center to generate new energy output scene sequences under specific load levels.
[0019] Based on the above technical solution, the present invention can also be improved as follows.
[0020] Furthermore, the above-mentioned self-organizing map clustering algorithm is used to perform cluster analysis on the sample data, specifically:
[0021] Perform dimensionality reduction processing on the historical load data in the sample data to obtain multiple characteristic indicators corresponding to the historical load data;
[0022] Each characteristic index and the corresponding new energy output data are clustered and analyzed using the self-organizing map clustering algorithm to obtain the cluster analysis results.
[0023] The beneficial effect of adopting the above further scheme is: when clustering the sample data, due to the high sample dimension of the sample data, the Euclidean distance between high-dimensional samples may show a trend of approaching each other, which will cause the distance relationship between the sample points to be weakened to a certain extent, thereby reducing the effectiveness of the clustering results based on the Euclidean distance. In order to improve the clustering effect, the daily load demand curve can be first subjected to dimensionality reduction processing and then clustering, and multiple characteristic indicators can be used to replace the original data, thereby achieving a substantial dimensionality reduction of the sample data.
[0024] Furthermore, the above horizontal expansion data is specifically as follows:
[0025] D h,t =D a,t-1 +r and,h ×(D a,t -D a,t-1 );
[0026] Where D h,t Indicates horizontal expansion of data, D a,t-1 represents the data at time t-1 in the ath, r and,h Indicates a random number between 0 and 1, D a,t Represents the data at time t in the ath;
[0027] The vertical expansion data is as follows:
[0028] D z,t =D a,t +r and,z ×(D a+1,t -D a,t );
[0029] Where D z,t Indicates that D a,t represents the data at time t in the ath, r and,z Indicates a random number between 0 and 1, D a+1,t Represents the data at time t in the a+1th node.
[0030] Furthermore, the above-mentioned expanded fusion data is specifically:
[0031] D r,t =D h,t +b r (D z,t -D h,t );
[0032] Where D r,t represents the expanded fusion data, D h,t Indicates horizontal expansion of data, b r represents the Kalman gain coefficient, D z,t Indicates vertical expansion of data.
[0033] The beneficial effect of adopting the above further scheme is: the expansion of new energy output and load demand samples based on Kalman gain information fusion, that is, using similar historical record information to perform flexible random combinations in the horizontal and vertical dimensions, and then using Kalman gain to fuse the horizontal and vertical information, so as to obtain reliable and sufficient expanded samples.
[0034] Furthermore, the above characteristic indicators include daily load rate, daily peak-to-valley difference rate, daily maximum load and daily load average, among which:
[0035] The daily load rate is as follows:
[0036] In the formula, α represents the daily load rate, T represents the total number of time periods per day, and l(t) represents the load size in time period t;
[0037] The daily peak-to-valley difference rate is as follows:
[0038] In the formula, β represents the daily peak-to-valley difference rate, and l(t) represents the load size in period t;
[0039] The maximum daily load is specifically: γ = max{l(t)};
[0040] In the formula, γ represents the maximum daily load, l(t) represents the load size in period t;
[0041] The daily load average is as follows:
[0042] In the formula, δ represents the daily load mean, T represents the total number of time periods per day, and l(t) represents the load size in time period t.
[0043] Furthermore, the above state transfer matrix is specifically:
[0044] in:
[0045] In the formula, P represents the state transfer matrix, p kl is an element in the state transfer matrix P, indicating the current state S c For day type k, the next day status is S c+1 The probability of transitioning to day type l (k, l = 1, 2, ..., K), G represents the transition from state S cTo state S c+1 The transition probability.
[0046] Furthermore, the above preset training end condition is that the objective function value of each GAN model does not exceed the threshold, and the objective function value is specifically:
[0047]
[0048] In the formula, represents the objective function value, x represents the real sample, z represents random noise, G(·) represents the generator function in the GAN model, and D(·) represents the discriminator function in the GAN model.
[0049] The beneficial effect of adopting the above further scheme is: in the training and learning process, first fix the gradient of G, update the parameters of D to maximize the objective function, so that D(x) tends to 1, and D(G(z)) tends to 0, that is, it is hoped that the discriminator will recognize the real sample x as true, and the discriminator will recognize the generated data G(z) as false; then fix the gradient of D, update the parameters of G to minimize the objective function, so that D(G(z)) tends to 1, that is, it is hoped that the sample G(z) generated by the generator can be recognized as true by the discriminator.
[0050] In a second aspect, the present application provides a scene generation system considering source-load coupling, which is applied to a scene generation method considering source-load coupling in any one of the first aspects, including:
[0051] The first module is used to obtain historical source-load data, vertically expand the data of two adjacent days in the historical source-load data to obtain vertical expansion data, and horizontally expand the data of adjacent moments on the same day to obtain horizontal expansion data. The historical source-load data includes historical load data and corresponding new energy output data;
[0052] The second module is used to fuse the horizontally expanded data and the vertically expanded data to obtain expanded fused data, and to combine the expanded fused data and the historical source load data according to the daily sequence number, and determine the combined data as sample data;
[0053] The third module is used to perform cluster analysis on the sample data based on the preset conditions of extreme days and typical days using the self-organizing map clustering algorithm to obtain cluster analysis results, which include the first day type clustering results corresponding to extreme days and the second day type clustering results corresponding to typical days;
[0054] The fourth module is used to construct a state transfer matrix between each day type in the first day type clustering result and the second day type clustering result based on the Markov chain, and use the Markov chain Monte Carlo algorithm to sample each state transfer matrix to generate a day type sequence in the future prediction time period;
[0055] The fifth module is used to train the preset GAN models of each day type respectively by using the cluster data of each day type in the first day type clustering result and the second day type clustering result, until each GAN model satisfies the preset training end condition, and determines each GAN model that satisfies the preset training end condition as a prediction model;
[0056] The sixth module is used to input the cluster data of each day type in the day type sequence in the cluster analysis results into the corresponding prediction model for processing, obtain the target source load data of each day type in the day type sequence, and sort the target source load data according to the day serial number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
[0057] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods in the first aspect when executing the computer program.
[0058] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any one of the methods in the first aspect.
[0059] Compared with the prior art, the present invention has at least the following beneficial effects:
[0060] In the present application, firstly, the original sample (historical source-load data) is amplified according to the historical source-load data, and the historical source-load data includes the new energy processing data and the historical load data; then, the sample data obtained after the amplification of the original sample is clustered and analyzed to obtain cluster data of multiple day types, that is, the first day type clustering result includes cluster data of multiple day types, and similarly, the second day type clustering result includes cluster data of multiple day types, and each cluster of the first day type clustering result or the second day type clustering result includes a daily load curve and a corresponding new energy output curve; and the first day type clustering result includes the day type of the corresponding extreme day, and the second day type clustering result includes the day type of the corresponding typical day; and then, based on the Markov chain, all day types in the first day type clustering result and the second day type clustering result are constructed. The state transfer matrix between them represents the transition probability between each day type in the first day type clustering result and the second day type clustering result; when training the preset GAN model, the cluster data of the same day type is used to train the same GAN model, that is, the number of day types existing in the historical source load data corresponds to the number of GAN models. After the training of each GAN model is completed, the day type sequence in the future prediction time period is obtained based on the Erkov chain Monte Carlo algorithm, and the cluster data of each day type existing in the day type sequence in the clustering analysis result is input into the corresponding prediction model for processing, so as to obtain the target source load data of each day type, and finally sort the target source load data according to the day serial number of each day type in the day type sequence, and finally obtain the source load scene sequence of the future prediction time period.
[0061] In the present application, horizontal and vertical data augmentation methods are used to make the model training samples sufficient, ultimately improving the accuracy of the generated scenarios, and the clustering method used above is not only accurate but also faster in calculation; and based on the preset conditions of extreme days and typical days, cluster data corresponding to each day type in extreme days are obtained through clustering, so that when training the model, the model can better learn the scene characteristics under the machine-side scenario; the above-mentioned scheme is based on the source-load data expansion method of Kalman gain information fusion technology, which overcomes the shortcomings of insufficient historical data information for effective artificial intelligence training, and proposes a new energy output sequence scene generation method based on artificial intelligence under load level constraints, which meets the needs of the dispatching center to generate new energy output scene sequences under specific load levels.
[0062] In the present application, when clustering sample data, due to the high sample dimension of the sample data, the Euclidean distance between high-dimensional samples may show a trend of approaching each other, which will cause the distance relationship between sample points to be weakened to a certain extent, thereby reducing the effectiveness of the clustering results based on the Euclidean distance. In order to improve the clustering effect, the daily load demand curve can be first subjected to dimensionality reduction processing and then clustered, and multiple characteristic indicators can be used to replace the original data to achieve a substantial dimensionality reduction of the sample data; the new energy output and load demand sample expansion based on Kalman gain information fusion, that is, using similar historical record information, flexibly random combination in the horizontal and vertical dimensions, and then using Kalman gain to fuse the horizontal and vertical information, so as to obtain reliable and sufficient expanded samples.
[0063] In the present application, when training each model, based on the objective function of each proposed model, first, the gradient of G is fixed, and the parameters of D are updated to maximize the objective function, so that D(x) tends to 1 and D(G(z)) tends to 0, that is, it is hoped that the discriminator will recognize the real sample x as true and the generated data G(z) as false; then the gradient of D is fixed, and the parameters of G are updated to minimize the objective function, so that D(G(z)) tends to 1, that is, it is hoped that the sample G(z) generated by the generator can be recognized as true by the discriminator. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0065] Figure 1 A method flow chart of a scene generation method according to an embodiment of the present invention;
[0066] Figure 2 A schematic diagram of data amplification in an embodiment of the present invention;
[0067] Figure 3 This is a structural diagram of a GAN model in an embodiment of the present invention;
[0068] Figure 4 Schematic diagram of the connection of the scene generation system in the embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0070] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0072] In the description of the embodiments of the present invention, "plurality" means at least 2.
[0073] Embodiment 1: To solve the problems in the prior art that the artificial intelligence algorithm requires insufficient historical data information, the clustering method has a slow calculation speed when the sample is large, and the balance between power supply and load is not considered under extreme conditions (such as high load level and low load level), this embodiment provides a scene generation method that considers source-load coupling, such as Figure 1 As shown, the following specific steps are included:
[0074] S1, obtain historical source and load data, perform vertical expansion based on the data of two adjacent days in the historical source and load data to obtain vertical expansion data, and perform horizontal expansion on the data of adjacent moments on the same day to obtain horizontal expansion data. The historical source and load data includes historical load data and corresponding new energy output data.
[0075] Optionally, the horizontal expansion data is specifically:
[0076] D h,t =D a,t-1 +r and,h ×(D a,t -D a,t-1 );
[0077] Where D h,t Indicates horizontal expansion of data, D a,t-1 represents the data at time t-1 in the ath, r and,h Indicates a random number between 0 and 1, D a,t Represents the data at time t in the ath.
[0078] Optionally, the vertical expansion data is specifically:
[0079] D z,t =D a,t +r and,z ×(D a+1,t -D a,t );
[0080] Where D z,tIndicates that D a,t represents the data at time t in the ath, r and,z Indicates a random number between 0 and 1, D a+1,t Represents the data at time t in the a+1th node.
[0081] Specifically, the data augmentation strategy implementation process is as follows: Figure 2 As shown, in Figure 2 The principle of sample data amplification is intuitively demonstrated in Figure 1. The upper and lower lines are sample data of two similar periods of time. z,t is the expanded data obtained by vertically expanding the sample data of two consecutive days, D h,t It is the expanded data obtained by horizontally expanding the sample data at adjacent times of the same day.
[0082] S2, fusing the horizontally expanded data and the vertically expanded data to obtain expanded fused data, and combining the expanded fused data and the historical source load data according to the daily sequence number, and determining the combined data as sample data.
[0083] Optionally, after obtaining the horizontal and vertical expanded data, in order to further improve the accuracy of the expanded data, a data fusion method based on the Kalman gain coefficient can be used to fuse the horizontal and vertical expanded data. The expanded fusion data is specifically:
[0084] D r,t =D h,t +b r (D z,t -D h,t ),in:
[0085]
[0086] Where D r,t represents the expanded fusion data, D h,t Indicates horizontal expansion of data, b r represents the Kalman gain coefficient, D z,t Indicates vertical expansion of data.
[0087] Among them, the expansion of new energy output and load demand samples based on Kalman gain information fusion, that is, using similar historical record information, flexibly random combination in the horizontal and vertical dimensions, and then using Kalman gain to fuse the horizontal and vertical information, so as to obtain reliable and sufficient expanded samples; it should be noted that when the load is expanded, the corresponding new energy output data needs to be similarly expanded, so that each day's load data has corresponding new energy output data.
[0088] S3, based on the preset conditions of extreme days and typical days, the sample data is clustered and analyzed using the self-organizing map clustering algorithm to obtain the cluster analysis results, which include the first day type clustering results corresponding to extreme days and the second day type clustering results corresponding to typical days. That is, in the first day type clustering results or the second day type clustering results, there are multiple day types and corresponding cluster data. The day type can be understood as a collection of load data and new energy processing data on the same day, and the corresponding cluster data is in this collection. The day type can include extreme environments such as heavy rain and strong wind under extreme conditions, as well as sunny days and cloudy days; for example, when the day type is a heavy rain day, the corresponding cluster data records the load data and new energy processing data of that day; it should be noted that for the proposed source-load data, "source" corresponds to the new energy output data, and "load" corresponds to the load data.
[0089] Among them, traditional scenario generation and clustering methods usually use historical data to generate future scenarios, but these generated scenarios are not suitable for the calculation of specific load levels. The method proposed in this embodiment directly classifies the new energy data of the same day into the corresponding daily load cluster, which is equivalent to only counting the new energy output characteristics under a specific load level, and excluding the new energy output characteristics under other load levels; therefore, the new energy output scenario generated based on this method is more in line with the characteristics of a specific (extreme conditions) load level, and is therefore more accurate.
[0090] Specifically, this embodiment adopts the Self-Organizing Map (SOM) clustering algorithm to perform cluster analysis on the daily load sequence after data expansion, and divides it into two categories: several extreme days and several typical days. At the same time, in order to form a more complete scenario description, for each daily load type, we also classify the new energy data corresponding to the same day into the same category, that is, the clustering algorithm is used to divide the historical daily load curve into multiple clusters, and the new energy data is directly classified into the cluster to which the corresponding daily load belongs. In this way, source load scenario clusters corresponding to the daily load type are constructed, and these source load data clusters accurately reflect the clustering results of source load historical data under different load level constraints.
[0091] Optionally, the self-organizing map clustering algorithm is used to perform cluster analysis on the sample data, specifically:
[0092] S31, performing dimensionality reduction processing on the historical load data in the sample data to obtain a plurality of characteristic indicators corresponding to the historical load data.
[0093] Among them, if the daily load curve of 96 data points per day (one data point every 15 minutes) is clustered directly, due to the high sample dimension, the Euclidean distance between high-dimensional samples may show a trend of approaching each other, which will cause the distance relationship between sample points to be weakened to a certain extent, thereby reducing the effectiveness of the clustering results based on Euclidean distance; in order to improve the clustering effect, the daily load demand curve can be first subjected to dimensionality reduction processing and then clustered; the specific approach is to use the four key characteristic indicators of daily load: daily load rate, daily peak-to-valley difference rate, daily maximum load and daily load mean, to replace the original daily load sequence, thereby achieving a substantial dimensionality reduction of the daily load curve.
[0094] S32, performing cluster analysis on each characteristic index and the corresponding new energy output data using a self-organizing map clustering algorithm to obtain a cluster analysis result.
[0095] Optionally, the above characteristic indicators include daily load rate, daily peak-to-valley difference rate, daily maximum load and daily load average, where:
[0096] The daily load rate is as follows:
[0097] In the formula, α represents the daily load rate, T represents the total number of time periods per day, and l(t) represents the load size in time period t.
[0098] Furthermore, the above daily peak-to-valley difference rate is specifically:
[0099] In the formula, β represents the daily peak-to-valley difference rate, and l(t) represents the load size in period t.
[0100] Furthermore, the above-mentioned maximum daily load is specifically: γ = max{l(t)};
[0101] Where γ represents the maximum daily load, and l(t) represents the load size during period t.
[0102] Furthermore, the above daily load average is specifically:
[0103] In the formula, δ represents the daily load mean, T represents the total number of time periods per day, and l(t) represents the load size in time period t.
[0104] Specifically, after obtaining the characteristic indicators of daily load, these indicators and the SOM clustering algorithm are used to cluster the historical daily load curves; SOM is an unsupervised artificial neural network clustering method, which is based on a competitive learning mechanism, gradually optimizes the network structure through competition between neurons, and uses the nearest neighbor relationship function to maintain the topological structure of the input space. Compared with clustering algorithms such as k-means, SOM has the ability to automatically find the optimal number of clusters. It can automatically classify samples based on the similarity between them without knowing the labels of the samples in advance. The following are the calculation steps of the clustering process:
[0105] 1. Standardize the data, select the number of neuron nodes in the competition layer according to the rules and randomly initialize the weights, setting t = 1;
[0106] 2. Read an input sample x i , calculate the Euclidean distance with the nodes in the competition layer, and select the node with the smallest distance as the winning node;
[0107] 3. According to formula W s+1 =W s +ηg(x i -W s ) to update the node weights. In the process of updating the weights, the formula is used Gaussian function is used as the update weight to determine the weight update amplitude of the winning node and its neighboring nodes; the formula is used The adaptive learning rate that is automatically updated with the number of iterations improves learning accuracy;
[0108] In the above formula: W s and W s+1 are the node weights before and after the update, respectively; g is the update weight; (m,n) is the coordinate of the node in the grid; (c u ,c v ) is the coordinate of the winning node in the grid; τ is the neighborhood range constraint variable; η is the adaptive learning rate; η0 is the initial learning rate; t is the current number of iterations; T is the total number of iterations.
[0109] 4. Return to step 2 and loop until all samples are read and one iteration is completed. Set t = t + 1; end the iteration when t = T. In the unsupervised clustering algorithm, the model automatically classifies similar samples into one category based on the distance between samples, and will classify extreme scenarios into typical days. Therefore, before clustering the daily load, it is necessary to first filter out the extreme load scenarios. You can select the daily load mean greater than δ max and the daily load average is lower than δ min As high-load day type cluster and low-load day type cluster, δ max and δ minDetermined by the following formula; the remaining data are clustered into different typical days using the above clustering method.
[0110] Among them, the above δ max =mean(δ)+1.2std(δ),δ min =mean(δ)-1.2std(δ);
[0111] Where: mean() is for finding the mean; std() is for finding the standard deviation.
[0112] Specifically, after obtaining the load clustering results, for the daily load curve in each cluster, the new energy output curve on the same day is also divided into a cluster accordingly, and the new energy output cluster corresponding to each load cluster is obtained. Since each load cluster represents the corresponding load level, the clustering of source and load historical data under the load level constraint is obtained.
[0113] S4, constructing a state transfer matrix between each day type in the first day type clustering result and the second day type clustering result based on the Markov chain, and using the Markov chain Monte Carlo algorithm to sample each state transfer matrix to generate a day type sequence in the future prediction time period.
[0114] Among them, after completing the day type clustering, the conversion relationship between each day type can be approximately regarded as a Markov random change process. Therefore, the Markov chain can be used to describe the day type conversion relationship, and the state transfer matrix P is constructed to represent the random change law between day types. Based on P, the day type sequence for a period of time in the future is generated through rolling sampling.
[0115] Optionally, the above state transfer matrix is specifically:
[0116] P kl =G(S c+1 = l | S c = k), in:
[0117] In the formula, P represents the state transfer matrix, p kl is an element in the state transfer matrix P, indicating the current state S c For day type k, the next day status is S c+1 The probability of transitioning to day type l (k, l = 1, 2, ..., K), G represents the transition from state S c To state S c+1 The transition probability.
[0118] S5, using the cluster data of each day type in the first day type clustering result and the second day type clustering result to train the preset GAN models of each day type respectively, until each GAN model meets the preset training end condition, and each GAN model that meets the preset training end condition is determined as a prediction model.
[0119] Among them, after obtaining the source load historical data clustering and day type sequence under the load level constraint condition, the scenario generation method of generative adversarial network (GAN) is used; the core concept of this method is: use each subset data corresponding to each cluster to train the GAN model separately; use the GAN model corresponding to each day type in the generated day type sequence to generate the source load sequence under the corresponding day type, so as to obtain the source load sequence scenario under the load level constraint in the future period of time.
[0120] Specifically, Figure 3 The figure shows the basic structure of the GAN model. The generator inputs random noise to generate samples. The discriminator inputs real samples and generated samples, and the output is the probability that the sample is true, that is, the loss function. The loss function is used to update the generator and discriminator network weights.
[0121] Optionally, the above preset training end condition is that the objective function value of each GAN model does not exceed a threshold value, and the objective function value is specifically:
[0122]
[0123] In the formula, represents the objective function value, x represents the real sample, z represents random noise, G(·) represents the generator function in the GAN model, and D(·) represents the discriminator function in the GAN model.
[0124] In the training and learning process, first, the gradient of G is fixed, and the parameters of D are updated to maximize the objective function, so that D(x) tends to 1 and D(G(z)) tends to 0. In other words, it is hoped that the discriminator will recognize the real sample x as true, and the discriminator will recognize the generated data G(z) as false. Then, the gradient of D is fixed, and the parameters of G are updated to minimize the objective function, so that D(G(z)) tends to 1. In other words, it is hoped that the sample G(z) generated by the generator can be recognized as true by the discriminator.
[0125] Specifically, since the value of JS divergence (Jensen-Shannon Divergence) tends to a constant when dealing with two distributions with no overlapping areas, the loss function based on JS divergence may encounter training difficulties or even training crashes when training generative adversarial networks (GANs). In order to overcome this defect, the Wasserstein distance (also known as Earth-Mover's Distance or EMD) can be used as a discriminator loss function. A key advantage of the Wasserstein distance is that it can effectively measure the distance between the two distributions even if there is no overlap between the two distributions. This makes the GAN based on the Wasserstein distance (commonly referred to as WGAN, or Wasserstein GAN) more stable during training and helps to generate higher quality samples. The specific training steps are as follows:
[0126] 1. Generate random noise that conforms to the normal distribution and input it into the generator to obtain the generated sample;
[0127] 2. Input the generated samples and real samples into the discriminator, and the discriminator outputs the discriminant values of the real samples and the generated samples;
[0128] 3. Calculate the loss function of the generator and the discriminator, and update the network weights of the generator and the discriminator respectively. If the discriminator loss function does not converge to a stable state, return to step 1;
[0129] 4. After training, use the generator model and input random noise to generate source-load scenarios that conform to the statistical laws of historical data.
[0130] S6, input the cluster data of each day type in the day type sequence in the cluster analysis result into the corresponding prediction model for processing, obtain the target source load data of each day type in the day type sequence, and sort the target source load data according to the day sequence number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
[0131] Embodiment 2: The embodiment of the present application provides a scene generation system considering source-load coupling, which is applied to a scene generation method considering source-load coupling in any one of Embodiment 1, such as Figure 4 As shown, including:
[0132] The first module is used to obtain historical source and load data, vertically expand the data of two adjacent days in the historical source and load data to obtain vertical expansion data, and horizontally expand the data of adjacent moments on the same day to obtain horizontal expansion data. The historical source and load data include historical load data and corresponding new energy output data.
[0133] The second module is used to fuse the horizontally expanded data and the vertically expanded data to obtain expanded fused data, and to combine the expanded fused data and the historical source load data according to the daily sequence number, and to determine the combined data as sample data.
[0134] The third module is used to perform cluster analysis on sample data based on the preset conditions of extreme days and typical days using a self-organizing mapping clustering algorithm to obtain cluster analysis results. The cluster analysis results include the first-day type clustering results corresponding to extreme days and the second-day type clustering results corresponding to typical days.
[0135] The fourth module is used to construct a state transfer matrix between the first day type clustering result and the second day type clustering result based on the Markov chain, and use the Markov chain Monte Carlo algorithm to sample each state transfer matrix to generate a day type sequence in the future prediction time period.
[0136] The fifth module is used to train the preset GAN models of each day type respectively using the cluster data of each day type in the first day type clustering result and the second day type clustering result, until each GAN model meets the preset training end condition, and each GAN model that meets the preset training end condition is determined as a prediction model.
[0137] The sixth module is used to input the cluster data of each day type in the day type sequence in the cluster analysis results into the corresponding prediction model for processing, obtain the target source load data of each day type in the day type sequence, and sort the target source load data according to the day serial number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
[0138] Embodiment 3: The embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, any one of the methods in Embodiment 1 is implemented.
[0139] Embodiment 4: The embodiment of the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any method in Embodiment 1.
[0140] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A scene generation method considering source-load coupling, characterized in that: The specific steps include: Acquire historical source-load data, perform vertical expansion based on the data of two adjacent days in the historical source-load data to obtain vertical expansion data, and perform horizontal expansion on the data of adjacent moments on the same day to obtain horizontal expansion data, wherein the historical source-load data includes historical load data and corresponding new energy output data; The horizontally expanded data and the vertically expanded data are subjected to data fusion to obtain expanded fusion data, and the expanded fusion data and the historical source load data are combined according to the day sequence number, and the combined data are determined as sample data; Based on the preset conditions of extreme days and typical days, a self-organizing map clustering algorithm is used to perform cluster analysis on the sample data to obtain cluster analysis results, wherein the cluster analysis results include a first-day type clustering result corresponding to the extreme day and a second-day type clustering result corresponding to the typical day; Based on the Markov chain, the state transfer matrix between the first day type clustering result and the second day type clustering result is constructed, and the Markov chain Monte Carlo algorithm is used to sample each state transfer matrix to generate the day type sequence in the future prediction time period; Using the cluster data of each day type in the first day type clustering result and the second day type clustering result, respectively train the GAN models preset for each day type until each of the GAN models meets a preset training end condition, and determine each GAN model that meets the preset training end condition as a prediction model; The cluster data of each day type in the day type sequence in the cluster analysis result is input into the corresponding prediction model for processing to obtain the target source load data of each day type in the day type sequence, and the target source load data is sorted according to the day serial number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
2. A scene generation method considering source-load coupling according to claim 1, characterized in that: The cluster analysis of sample data using the self-organizing map clustering algorithm is specifically as follows: Performing dimensionality reduction processing on the historical load data in the sample data to obtain a plurality of characteristic indicators corresponding to the historical load data; The characteristic indicators and the corresponding new energy output data are clustered and analyzed using a self-organizing map clustering algorithm to obtain the cluster analysis results.
3. The scene generation method considering source-load coupling according to claim 1, characterized in that: The horizontal expansion data is specifically: D h,t =D a,t-1 +r and,h ×(D a,t -D a,t-1 ); Where D h,t Indicates horizontal expansion of data, D a,t-1 represents the data at time t-1 in the ath, r and,h Indicates a random number between 0 and 1, D a,t Represents the data at time t in the ath; The vertical expansion data is specifically: D z,t =D a,t +r and,z ×(D a+1,t -D a,t ); Where D z,t Indicates that D a,t represents the data at time t in the ath, r and,z Indicates a random number between 0 and 1, D a+1,t Represents the data at time t in the a+1th element.
4. The scene generation method considering source-load coupling according to claim 3 is characterized in that: The expanded fusion data is specifically: D r,t =D h,t +b r (D z,t -D h,t ); Where D r,t represents the expanded fusion data, D h,t Indicates horizontal expansion of data, b r represents the Kalman gain coefficient, D z,t Indicates vertical expansion of data.
5. The scene generation method considering source-load coupling according to claim 2, characterized in that: The characteristic indicators include daily load rate, daily peak-to-valley difference rate, daily maximum load and daily load average, among which: The daily load rate is specifically: In the formula, α represents the daily load rate, T represents the total number of time periods per day, and l(t) represents the load size in time period t; The daily peak-to-valley difference rate is specifically: In the formula, β represents the daily peak-to-valley difference rate, and l(t) represents the load size in period t; The maximum daily load is specifically: γ = max{l(t)}; In the formula, γ represents the maximum daily load, l(t) represents the load size in period t; The daily load average is specifically: In the formula, δ represents the daily load mean, T represents the total number of time periods per day, and l(t) represents the load size in time period t.
6. The scene generation method considering source-load coupling according to claim 1, characterized in that: The state transfer matrix is specifically: in: In the formula, P represents the state transfer matrix, p kl is an element in the state transfer matrix P, indicating the current state S c For day type k, the next day status is S c+1 The probability of transitioning to day type l (k, l = 1, 2, ..., K), G represents the transition from state S c To state S c+1 The transition probability.
7. The scene generation method considering source-load coupling according to claim 1, characterized in that: The preset training end condition is that the objective function value of each of the GAN models does not exceed a threshold value, and the objective function value is specifically: In the formula, represents the objective function value, x represents the real sample, z represents random noise, G(·) represents the generator function in the GAN model, and D(·) represents the discriminator function in the GAN model.
8. A scene generation system considering source-load coupling, applied to a scene generation method considering source-load coupling according to any one of claims 1 to 7, characterized in that: include: The first module is used to obtain historical source-load data, vertically expand the data of two adjacent days in the historical source-load data to obtain vertical expansion data, and horizontally expand the data of adjacent moments on the same day to obtain horizontal expansion data, wherein the historical source-load data includes historical load data and corresponding new energy output data; The second module is used to fuse the horizontally expanded data and the vertically expanded data to obtain expanded fused data, and combine the expanded fused data and the historical source load data according to the daily sequence number, and determine the combined data as sample data; The third module is used to perform cluster analysis on the sample data based on the preset conditions of extreme days and typical days using a self-organizing map clustering algorithm to obtain cluster analysis results, wherein the cluster analysis results include a first-day type clustering result corresponding to the extreme day and a second-day type clustering result corresponding to the typical day; The fourth module is used to construct a state transfer matrix between each day type in the first day type clustering result and the second day type clustering result based on the Markov chain, and use the Markov chain Monte Carlo algorithm to sample each state transfer matrix to generate a day type sequence in the future prediction time period; A fifth module, configured to train the preset GAN models of each day type respectively by using the cluster data of each day type in the first day type clustering result and the second day type clustering result, until each of the GAN models satisfies a preset training end condition, and determine each GAN model that satisfies the preset training end condition as a prediction model; The sixth module is used to input the cluster data of each day type in the day type sequence in the cluster analysis results into the corresponding prediction model for processing, obtain the target source load data of each day type in the day type sequence, and sort the target source load data according to the day serial number of each day type in the day type sequence to obtain the source load scenario sequence of the future prediction time period.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 7 is implemented when the processor executes the computer program.
10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which enable a computer to execute the method of any one of claims 1-7.