Provincial day-ahead scheduling optimization method, apparatus and device, and storage medium
By extracting and clustering the historical operation data of power grid provinces and regions, determining feasible domains, and building optimization models, the challenge of grid scheduling optimization after distributed new energy is solved, and more accurate and reliable scheduling is achieved.
Patent Information
- Application Number
- CN202411694808.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
After the distributed new energy is connected to the power grid, it has brought many challenges to the formulation of the power grid's recent dispatch plan, including significantly increasing the dispersion and randomness of system operations, making it difficult to effectively optimize the recent dispatch.
By obtaining the historical operation data of provinces and regions, building a running data matrix, and using preset feature extraction and clustering models for feature extraction and clustering, calculating the similarity between the cluster cluster and the running data matrix, determining the target cluster cluster, calculating its feasible domain, and constructing a province and region's recently dispatch optimization model for solving, optimizing the recently dispatch plan.
It has achieved optimization of recent scheduling of power grid provinces and regions, improved the accuracy and reliability of scheduling, and can more effectively deal with system changes after distributed new energy access.
Smart Images

Figure CN119543138A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid day-ahead dispatch optimization, and in particular to a provincial day-ahead dispatch optimization method, device, equipment and storage medium. Background Art
[0002] With the continuous construction of new power systems, a large number of distributed renewable energy sources are connected to the power grid. The access of distributed renewable energy sources has led to a significant expansion in the scale of active electrical nodes in the power system, and the decentralization and randomness of the system operation mode have been significantly enhanced, which has brought many challenges to the formulation of the day-ahead dispatching plan of the power grid. It is urgent to develop a method to optimize the provincial day-ahead dispatching of the power grid. Summary of the invention
[0003] The present invention provides a method, device, equipment and storage medium for optimizing provincial day-ahead dispatching, so as to solve the technical problem that the access of distributed new energy to the power grid brings challenges to the formulation of the day-ahead dispatching plan of the power grid.
[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for optimizing provincial day-ahead scheduling, including:
[0005] Acquire historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region;
[0006] Constructing a corresponding operation data matrix according to the historical operation data, and then inputting the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix;
[0007] Calculate the similarity between each cluster and the running data matrix, take the cluster with the greatest similarity to the running data matrix as the target cluster, and calculate the upper and lower limits of each random variable in the target cluster, and then obtain the feasible domain of each control variable in the target cluster according to the upper and lower limits;
[0008] According to the feasible domain, construct a corresponding provincial day-ahead dispatch optimization model and constraint conditions of the provincial day-ahead dispatch optimization model;
[0009] Under the constraints of the constraints, the provincial day-ahead dispatch optimization model is solved to obtain the day-ahead dispatch optimization unit schedule for the corresponding province, and then the provincial day-ahead dispatch is optimized according to the day-ahead dispatch optimization unit schedule.
[0010] As a preferred solution, the feature extraction and clustering model includes: a TAE sub-model and a KNet sub-model;
[0011] Extracting features from the operation data matrix, clustering the extracted features, and outputting clusters corresponding to the operation data matrix, including:
[0012] Inputting the operation data matrix into the TAE sub-model, so that the TAE sub-model performs feature extraction on the operation data matrix and outputs data features of the operation data matrix;
[0013] The data features of the running data matrix are input into the KNet sub-model, so that the KNet sub-model clusters the data features and outputs the cluster clusters corresponding to the running data matrix.
[0014] As a preferred solution, the feature extraction and clustering model generation includes:
[0015] Obtain provincial and regional operating data for model training, and construct a corresponding operating data matrix according to the provincial and regional operating data, and use the operating data matrix corresponding to the provincial and regional operating data and data features corresponding to the operating data matrix as model training samples;
[0016] Training the TAE sub-model according to the model training sample and a preset first loss function;
[0017] The KNet sub-model is trained according to the data features output during the training of the TAE sub-model and the preset second loss function, and then the model parameters of the TAE sub-model are back-propagated and optimized according to the parameters of the returned second loss function, and the model parameters and clustering results of the KNet sub-model are updated until the TAE sub-model and the KNet sub-model converge together.
[0018] As a preferred solution, the first loss function is:
[0019] L p =L rl +α1L ccl +α2L cll ;
[0020]
[0021] Among them, L rl To rebuild the losses; L ccl is the contrast loss; L cll is a convex combination loss; α1 and α2 are ≥0 tuning parameters used to adjust the weight of each loss function, α2≥0; is the cosine similarity calculation; Mj is the original data; M j ′ is the reconstructed data; is a convex combination of input data; g = (g1, g2, ..., g z ) are the coefficients of the convex combination, and H=h(N)=W (2) σ(W (1) N) is a multi-layer perceptron with hidden layers, σ is a Relu nonlinear layer, and τ is a set temperature parameter.
[0022] As a preferred solution, the second loss function is:
[0023] L c =L rl +α3L k ;
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] Among them, L k is the K-means loss function; α3≥0 is the tuning parameter, α3≥0; o i is the i-th cluster center; c j is the soft assignment vector of sample j, c j ∈{0,1} K , and c j T 1=1; γ is the weight for adjusting hard assignment and regularization terms; is the allocation vector updated at the t+1th iteration; β is the step size of the gradient descent; The projection operator projects the update result onto the probability simplex, ensuring that all elements of the allocation vector are between 0 and 1 and sum to 1; δ (t) is the parameter used for acceleration; ν (0) =0.
[0031] As a preferred solution, the similarity between each cluster and the running data matrix is calculated by the following formula:
[0032]
[0033] Among them, S j,il is the similarity of the variables in row i and column l in cluster j; B j,il is the mean of the maximum and minimum values of the variable in row i and column l in cluster j; B input,il is the value of the variable in row i and column l in the input data.
[0034] As a preferred solution, the provincial day-ahead dispatch optimization model and the constraints of the provincial day-ahead dispatch optimization model are:
[0035]
[0036]
[0037] in, is the output value of the generator at node i at time t; and are fuel cost, startup cost and shutdown cost respectively; a i 、b i and c i are the fuel cost coefficients of the units; u i,t is the start / stop state variable of unit i at time t, u i,t =1 means the unit is in the starting state, u i,t =0 means the unit is in shutdown state; is the startup cost of unit i; is the downtime cost of unit i; P t L , P t W and are the output values of load, wind power and photovoltaic power at time t respectively; and are the minimum and maximum outputs of the generators in the cluster with the highest similarity, respectively; and are the up-climbing and down-climbing of unit i in the cluster with the highest similarity, respectively; and are the maximum transmission power and minimum transmission power of the line in the cluster with the highest similarity; δ lp1,t and δ lp2,t are the phase angles at both ends of line l; X l is the reactance of line l.
[0038] On the basis of the above-mentioned embodiment, another embodiment of the present invention provides a provincial day-ahead dispatch optimization device, comprising: a historical operation data acquisition module, a feature extraction and clustering module, a feasible domain search module, a provincial day-ahead dispatch optimization model construction module, and a provincial day-ahead dispatch optimization module;
[0039] The historical operation data acquisition module is used to acquire the historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region;
[0040] The feature extraction and clustering module is used to construct a corresponding operation data matrix according to the historical operation data, and then input the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix;
[0041] The feasible domain search module is used to calculate the similarity between each of the clusters and the running data matrix, take the cluster with the greatest similarity to the running data matrix as the target cluster, and calculate the upper and lower limits of each random variable in the target cluster, and then obtain the feasible domain of each control variable in the target cluster according to the upper and lower limits;
[0042] The provincial day-ahead dispatch optimization model construction module is used to construct the corresponding provincial day-ahead dispatch optimization model and the constraint conditions of the provincial day-ahead dispatch optimization model according to the feasible domain;
[0043] The provincial day-ahead scheduling optimization module is used to solve the provincial day-ahead scheduling optimization model under the constraints of the constraints, obtain the day-ahead scheduling optimization unit schedule for the corresponding province, and then optimize the provincial day-ahead scheduling according to the day-ahead scheduling optimization unit schedule.
[0044] Based on the above embodiments, another embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the provincial day-ahead scheduling optimization method described in the above embodiments of the invention is implemented.
[0045] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the provincial day-ahead scheduling optimization method described in the above invention embodiment.
[0046] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0047] The present invention provides a method for optimizing province-day-ahead scheduling, which obtains historical operation data of corresponding provinces and regions; constructs a corresponding operation data matrix according to the historical operation data, and then inputs the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix; calculates the similarity between each cluster cluster and the operation data matrix, takes the cluster cluster with the greatest similarity to the operation data matrix as the target cluster cluster, and calculates the upper and lower limits of each random variable in the target cluster cluster, and then obtains the feasible domain of each control variable in the target cluster cluster according to the upper and lower limits; constructs a corresponding province-day-ahead scheduling optimization model and constraint conditions of the province-day-ahead scheduling optimization model according to the feasible domain; solves the province-day-ahead scheduling optimization model under the constraint of the constraint conditions, obtains the day-ahead scheduling optimization unit schedule of the corresponding province-day-ahead scheduling, and then optimizes the province-day-ahead scheduling according to the day-ahead scheduling optimization unit schedule. The present invention can realize the optimization of the province-day-ahead scheduling and improve the accuracy and reliability of the province-day-ahead scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flow chart of a method for optimizing provincial day-ahead scheduling provided by an embodiment of the present invention;
[0049] Figure 2 This is the overall flow chart of the provincial and regional day-ahead dispatch optimization decision-making based on TAKE;
[0050] Figure 3 It is a structural diagram of a provincial day-ahead scheduling optimization device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0053] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0056] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0057] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0058] Embodiment 1
[0059] Please refer to Figure 1 , is a flow chart of a method for optimizing provincial day-ahead scheduling provided by an embodiment of the present invention, comprising the following specific steps:
[0060] S1. Obtain historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region;
[0061] For details, please refer to Figure 2, which is the overall flow chart of the provincial day-ahead dispatch optimization decision based on TAKE, and specifically includes the following processing steps:
[0062] 1. Data collection:
[0063] Collect historical operation optimization data, including provincial and regional power grid dispatching operation data, power grid model data, dispatching targets, dispatching constraints and meteorological data.
[0064] S2. Construct a corresponding operation data matrix according to the historical operation data, and then input the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix;
[0065] Preferably, the feature extraction and clustering model includes: a TAE sub-model and a KNet sub-model; performing feature extraction on the operating data matrix, clustering the extracted features, and outputting cluster clusters corresponding to the operating data matrix, including: inputting the operating data matrix into the TAE sub-model so that the TAE sub-model extracts features from the operating data matrix and outputs data features of the operating data matrix; inputting the data features of the operating data matrix into the KNet sub-model so that the KNet sub-model clusters the data features and outputs cluster clusters corresponding to the operating data matrix.
[0066] Preferably, the feature extraction and clustering model generation includes: obtaining provincial and regional operating data for model training, and constructing a corresponding operating data matrix based on the provincial and regional operating data, and using the operating data matrix corresponding to the provincial and regional operating data and the data features corresponding to the operating data matrix as model training samples; training the TAE sub-model according to the model training samples and a preset first loss function; training the KNet sub-model according to the data features output during the training of the TAE sub-model and a preset second loss function, and then back-propagating and optimizing the model parameters of the TAE sub-model according to the parameters of the returned second loss function, and updating the model parameters and clustering results of the KNet sub-model until the TAE sub-model and the KNet sub-model converge together.
[0067] Preferably, the first loss function is:
[0068] L p =L rl +α1L ccl +α2L cll ;
[0069]
[0070]
[0071] Among them, L rl To rebuild the losses; L ccl is the contrast loss; L cll is a convex combination loss; α1 and α2 are ≥0 tuning parameters used to adjust the weight of each loss function, α2≥0; is the cosine similarity calculation; M j is the original data; M′ j is the reconstructed data; is a convex combination of input data; g = (g1, g2, ..., g z ) are the coefficients of the convex combination, and H=h(N)=W (2) σ(W (1) N) is a multi-layer perceptron with hidden layers, σ is a Relu nonlinear layer, and τ is a set temperature parameter.
[0072] Preferably, the second loss function is:
[0073] L c =L rl +α3L k ;
[0074]
[0075]
[0076] Among them, L k is the K-means loss function; α3≥0 is the tuning parameter, α3≥0; o i is the i-th cluster center; c j is the soft assignment vector of sample j, c j ∈{0,1} K , and c j T 1=1; γ is the weight for adjusting hard assignment and regularization terms; is the allocation vector updated at the t+1th iteration; β is the step size of the gradient descent; The projection operator projects the update result onto the probability simplex, ensuring that all elements of the allocation vector are between 0 and 1 and sum to 1; δ (t) is the parameter used for acceleration; ν (0) =0.
[0077] 2. Feature extraction and clustering:
[0078] This part involves the following two models:
[0079] (1) Transformer AutoEncoder: TAE model is a Transformer autoencoder used to extract high-dimensional features of historical operation optimization data of provincial power grids. It includes an encoder and a decoder and is constructed using a Transformer based on the ViT architecture.
[0080] (2) TAKE: The feature representation of the provincial power grid operation optimization data obtained by the Transformer AutoEncoder pre-training model is preliminarily clustered using the K-means algorithm, KNet is initialized, and the TransformerAutoEncoder and KNet models are trained according to the given loss function so that the final feature representation and clustering results gradually converge to obtain the final clustering allocation results.
[0081] The feature extraction and clustering process is as follows:
[0082] 1. TAE sub-model pre-training: The TAE sub-model consists of an encoder and a decoder, and is constructed using the Transformer based on the ViT architecture. The encoder is used to extract input data features and convert them into low-dimensional features. The decoder is the inverse structure of the encoder, but has a lower number of parameters than the encoder. It can restore the original data space based on the extracted features to achieve feature extraction operations.
[0083] The training sample of the TAE sub-model is the running data matrix constructed in the input processing at different times, and the input and output of the autoencoder are both this matrix. During the training process, forward propagation is used to feed the input data into the encoder to obtain a low-dimensional feature representation, and the low-dimensional feature is fed into the decoder to output the reconstruction result. The mean square error of the reconstruction loss is calculated to compare the difference between the reconstructed output and the original input. Then the Adam optimizer is used to update the model parameters through back propagation to minimize the loss, and the above steps are repeated until the preset number of training rounds is reached or the loss converges.
[0084] The trained model inputs the running data matrix to obtain the decoder output data that extracts the input data features, obtains the data feature representation, and provides initialization parameters for the subsequent KNet network.
[0085] 2. Clustering based on the TAKE model: First, the K-means algorithm is used for preliminary clustering based on the feature representation obtained from TAE model training, the KNet parameters are initialized, and the parameters of the loss function are returned. Then, the TAE model parameters are back-propagated and optimized, and the KNet model parameters and clustering results are updated. The optimization is iterated so that the final feature representation and clustering results gradually converge to obtain the final clustering assignment results.
[0086] The KNet model is a neural network module for clustering. It processes the low-dimensional features output by the TAE model. Through network learning, KNet assigns features to find suitable clusters. The TAKE model is a combination of the TAE model and the KNet model. TAE is responsible for feature extraction, while KNet is responsible for clustering these features. When the two converge together, the clustering results are obtained.
[0087] In the clustering process based on the TAKE model, the input is the running data matrix and the output is the clustering result. At this time, the TAE model training loss function includes reconstruction loss and clustering loss. Back propagation is used to optimize the entire model during training, and the encoder parameters of TAE and the clustering parameters of KNet are iteratively updated until a converged clustering assignment result is obtained. The obtained cluster clusters are used to search for constraints in the scheduling optimization model.
[0088] Specifically, the loss function in the TAE model pre-training, that is, the first loss function, can be described by the following formula:
[0089] L p =L rl +α1L ccl +α2L cll ;
[0090]
[0091]
[0092] Among them, L rl To rebuild the losses; L ccl is the contrast loss; L cll is a convex combination loss; α1 and α2 are ≥0 tuning parameters used to adjust the weight of each loss function, α2≥0; is the cosine similarity calculation; M j is the original data; M j ′ is the reconstructed data; is a convex combination of input data; g = (g1, g2, ..., g z ) are the coefficients of the convex combination, and H=h(N)=W (2) σ(W (1) N) is a multi-layer perceptron with hidden layers, σ is a Relu nonlinear layer, and τ is a set temperature parameter.
[0093] The loss function of the TAE model during the overall training of TAKE, that is, the second loss function, can be described by the following formula:
[0094] L c =L rl +α3L k ;
[0095]
[0096]
[0097] Among them, L k is the K-means loss function; α3≥0 is the tuning parameter, α3≥0; o i is the i-th cluster center; c j is the soft assignment vector of sample j, c j ∈{0,1} K , and c j T 1=1; γ is the weight for adjusting hard assignment and regularization terms; is the allocation vector updated at the t+1th iteration; β is the step size of the gradient descent; The projection operator projects the update result onto the probability simplex, ensuring that all elements of the allocation vector are between 0 and 1 and sum to 1; δ (t) is the parameter used for acceleration; ν (0) =0.
[0098] S3, calculating the similarity between each of the clusters and the running data matrix, taking the cluster with the greatest similarity to the running data matrix as the target cluster, and calculating the upper and lower limits of each random variable in the target cluster, and then obtaining the feasible domain of each control variable in the target cluster according to the upper and lower limits;
[0099] Preferably, the similarity between each of the clusters and the running data matrix is calculated by the following formula:
[0100]
[0101] Among them, S j,il is the similarity of the variables in row i and column l in cluster j; B j,il is the mean of the maximum and minimum values of the variable in row i and column l in cluster j; B input,il is the value of the variable in row i and column l in the input data.
[0102] 3. Feasible domain search of clustering clusters:
[0103] Based on the similarity search method of partial data, the cluster most similar to the input data is searched according to the cosine similarity calculation, the upper and lower limits of each random variable in the cluster are found, and the feasible domain of each control variable in each cluster is obtained, providing constraint conditions for the provincial day-ahead scheduling optimization model.
[0104] Specifically, the similarity calculation in the feasible domain search can be described by the following formula:
[0105]
[0106] Among them, S j,il is the similarity of the variables in row i and column l in cluster j; B j,il is the mean of the maximum and minimum values of the variable in row i and column l in cluster j; B input,il is the value of the variable in row i and column l in the input data.
[0107] S4. According to the feasible domain, construct a corresponding provincial day-ahead dispatch optimization model and constraint conditions of the provincial day-ahead dispatch optimization model;
[0108] Preferably, the provincial day-ahead scheduling optimization model and the constraint conditions of the provincial day-ahead scheduling optimization model are:
[0109]
[0110] in, is the output value of the generator at node i at time t; and are fuel cost, startup cost and shutdown cost respectively; a i , b i and c i are the fuel cost coefficients of the units; u i,t is the start / stop state variable of unit i at time t, u i,t =1 means the unit is in the starting state, u i,t =0 means the unit is in shutdown state; is the startup cost of unit i; is the downtime cost of unit i; P t L , P t W and P t V are the output values of load, wind power and photovoltaic power at time t respectively; and are the minimum and maximum outputs of the generators in the cluster with the highest similarity, respectively; and are the up-climbing and down-climbing of unit i in the cluster with the highest similarity, respectively; and are the maximum transmission power and minimum transmission power of the line in the cluster with the highest similarity; δ lp1,t and δ lp2,t are the phase angles at both ends of line l; X l is the reactance of line l.
[0111] 4. Constructing a provincial day-ahead dispatch optimization model:
[0112] Based on the feasible domain data of each component obtained, a provincial day-ahead scheduling optimization model is constructed, and the constraints of the provincial day-ahead scheduling optimization model are set.
[0113] Specifically, the provincial day-ahead dispatch optimization model and its constraints can be described by the following formula:
[0114]
[0115]
[0116]
[0117] in, is the output value of the generator at node i at time t; and are fuel cost, startup cost and shutdown cost respectively; a i , b i and c i are the fuel cost coefficients of the units; u i,t is the start / stop state variable of unit i at time t, u i,t =1 means the unit is in the starting state, u i,t =0 means the unit is in shutdown state; is the startup cost of unit i; is the downtime cost of unit i; P t L , P t W and P t V are the output values of load, wind power and photovoltaic power at time t respectively; and are the minimum and maximum outputs of the generators in the cluster with the highest similarity, respectively; and are the up-climbing and down-climbing of unit i in the cluster with the highest similarity, respectively; and are the maximum transmission power and minimum transmission power of the line in the cluster with the highest similarity; δ lp1,t and δ lp2,t are the phase angles at both ends of line l; X l is the reactance of line l.
[0118] S5. Under the constraints of the constraints, the province-day-ahead dispatch optimization model is solved to obtain the province-day-ahead dispatch optimization unit schedule for the corresponding province, and then the province-day-ahead dispatch is optimized according to the province-day-ahead dispatch optimization unit schedule.
[0119] 5. Solve the provincial day-ahead dispatch optimization model:
[0120] The mixed integer optimization solver bonmin is used to solve the provincial day-ahead dispatch optimization model, and the scheduling of the provincial day-ahead dispatch optimization unit plan is obtained. When the model has no solution, the value range of the feasible domain variables is expanded, and then the provincial day-ahead dispatch is optimized according to the scheduling of the provincial day-ahead dispatch optimization unit plan.
[0121] Preferably, the feature extraction and clustering model includes: a TAE sub-model and a KNet sub-model; performing feature extraction on the operating data matrix, clustering the extracted features, and outputting cluster clusters corresponding to the operating data matrix, including: inputting the operating data matrix into the TAE sub-model so that the TAE sub-model extracts features from the operating data matrix and outputs data features of the operating data matrix; inputting the data features of the operating data matrix into the KNet sub-model so that the KNet sub-model clusters the data features and outputs cluster clusters corresponding to the operating data matrix.
[0122] It can be seen that the present invention provides a method for optimizing the day-ahead scheduling of provinces and regions. The present invention is based on the Transformer autoencoder pre-training model, and uses reconstruction loss, contrast loss and convex combination loss for pre-training. This step learns the feature representation suitable for K-means clustering, laying the foundation for realizing high-dimensional feature clustering. Then the KNet model is initialized with the high-dimensional feature representation of the data extracted by the TAE model, and the Transformer autoencoder and KNet are trained using reconstruction loss and K-means loss function, and finally converge to obtain the clustering result; this processing step is the core of the present invention, and the clustering result based on the high-dimensional feature representation is generated by the TAKE model to provide clustering data support for scheduling decisions. Then, the feasible domain of the control variable is searched according to the cosine similarity, and the constraint conditions of the provincial day-ahead scheduling optimization model are automatically set, which helps to improve the economy and safety of the scheduling decision. In general, the design of the entire day-ahead scheduling optimization decision, including clustering with the pre-trained TAKE model and solving data redundancy or error problems through partial search methods, this systematic and innovative combination can significantly improve the efficiency of decision-making.
[0123] Embodiment 2
[0124] Please refer to Figure 3 , is a schematic diagram of the structure of a provincial day-ahead scheduling optimization device provided by an embodiment of the present invention, the device comprising: a historical operation data acquisition module, a feature extraction and clustering module, a feasible domain search module, a provincial day-ahead scheduling optimization model construction module and a provincial day-ahead scheduling optimization module;
[0125] The historical operation data acquisition module is used to acquire the historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region;
[0126] The feature extraction and clustering module is used to construct a corresponding operation data matrix according to the historical operation data, and then input the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix;
[0127] The feasible domain search module is used to calculate the similarity between each of the clusters and the running data matrix, take the cluster with the greatest similarity to the running data matrix as the target cluster, and calculate the upper and lower limits of each random variable in the target cluster, and then obtain the feasible domain of each control variable in the target cluster according to the upper and lower limits;
[0128] The provincial day-ahead dispatch optimization model construction module is used to construct the corresponding provincial day-ahead dispatch optimization model and the constraint conditions of the provincial day-ahead dispatch optimization model according to the feasible domain;
[0129] The provincial day-ahead scheduling optimization module is used to solve the provincial day-ahead scheduling optimization model under the constraints of the constraints, obtain the day-ahead scheduling optimization unit schedule for the corresponding province, and then optimize the provincial day-ahead scheduling according to the day-ahead scheduling optimization unit schedule.
[0130] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0131] Those skilled in the art can clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0132] Embodiment 3
[0133] Accordingly, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the provincial day-ahead scheduling optimization method described in the above-mentioned embodiment of the invention when executing the computer program.
[0134] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The device may include, but is not limited to, a processor and a memory.
[0135] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and various interfaces and lines are used to connect various parts of the entire device.
[0136] Embodiment 4
[0137] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the provincial day-ahead scheduling optimization method described in the above-mentioned embodiment of the invention.
[0138] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0139] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each method embodiment described above can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0140] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for optimizing provincial day-ahead scheduling, characterized in that: include: Acquire historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region; Constructing a corresponding operation data matrix according to the historical operation data, and then inputting the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix; Calculate the similarity between each cluster and the running data matrix, take the cluster with the greatest similarity to the running data matrix as the target cluster, and calculate the upper and lower limits of each random variable in the target cluster, and then obtain the feasible domain of each control variable in the target cluster according to the upper and lower limits; According to the feasible domain, construct a corresponding provincial day-ahead dispatch optimization model and constraint conditions of the provincial day-ahead dispatch optimization model; Under the constraints of the constraints, the provincial day-ahead dispatch optimization model is solved to obtain the day-ahead dispatch optimization unit schedule for the corresponding province, and then the provincial day-ahead dispatch is optimized according to the day-ahead dispatch optimization unit schedule.
2. The method for optimizing provincial day-ahead scheduling as claimed in claim 1, characterized in that: The feature extraction and clustering model includes: a TAE sub-model and a KNet sub-model; Extracting features from the operation data matrix, clustering the extracted features, and outputting clusters corresponding to the operation data matrix, including: Inputting the operation data matrix into the TAE sub-model, so that the TAE sub-model performs feature extraction on the operation data matrix and outputs data features of the operation data matrix; The data features of the running data matrix are input into the KNet sub-model, so that the KNet sub-model clusters the data features and outputs the cluster clusters corresponding to the running data matrix.
3. The method for optimizing provincial day-ahead scheduling as claimed in claim 2, characterized in that: The feature extraction and clustering model generation include: Obtain provincial and regional operating data for model training, and construct a corresponding operating data matrix according to the provincial and regional operating data, and use the operating data matrix corresponding to the provincial and regional operating data and data features corresponding to the operating data matrix as model training samples; Training the TAE sub-model according to the model training sample and a preset first loss function; The KNet sub-model is trained according to the data features output during the training of the TAE sub-model and the preset second loss function, and then the model parameters of the TAE sub-model are back-propagated and optimized according to the parameters of the returned second loss function, and the model parameters and clustering results of the KNet sub-model are updated until the TAE sub-model and the KNet sub-model converge together.
4. The method for optimizing provincial day-ahead scheduling as claimed in claim 3, characterized in that: The first loss function is: L p =L rl +α1L ccl +α2L cll ; Among them, L rl To rebuild the losses; L ccl is the contrast loss; L cll is a convex combination loss; α1 and α2 are tuning parameters used to adjust the weight of each loss function, α2 ≥ 0; is the cosine similarity calculation; M j is the original data; M j ′ is the reconstructed data; is a convex combination of input data; g = (g1, g2, ..., g z ) are the coefficients of the convex combination, and H=h(N)=W (2) σ(W (1) N) is a multi-layer perceptron with hidden layers, σ is a Relu nonlinear layer, and τ is a set temperature parameter.
5. The method for optimizing provincial day-ahead scheduling as claimed in claim 4, characterized in that: The second loss function is: L c =L rl +α3L k ; Among them, L k is the K-means loss function; α3 is the tuning parameter, α3 ≥ 0; o i is the i-th cluster center; c j is the soft assignment vector of sample j, c j ∈{0,1} K , and c j T 1=1; γ is the weight for adjusting hard assignment and regularization terms; is the allocation vector updated at the t+1th iteration; β is the step size of the gradient descent; The projection operator projects the update result onto the probability simplex, ensuring that all elements of the allocation vector are between 0 and 1 and sum to 1; δ (t) is the parameter used for acceleration; ν (0) =0.
6. The method for optimizing provincial day-ahead scheduling as claimed in claim 1, characterized in that: The similarity between each cluster and the running data matrix is calculated by the following formula: Among them, S j,il is the similarity of the variables in row i and column l in cluster j; B j,il is the mean of the maximum and minimum values of the variable in row i and column l in cluster j; B input,il is the value of the variable in row i and column l in the input data.
7. The method for optimizing provincial day-ahead scheduling as claimed in claim 1, characterized in that: The provincial day-ahead dispatch optimization model and the constraints of the provincial day-ahead dispatch optimization model are: in, is the output value of the generator at node i at time t; and are fuel cost, startup cost and shutdown cost respectively; a i 、b i and c i are the fuel cost coefficients of the units; u i,t is the start / stop state variable of unit i at time t, u i,t =1 means the unit is in the starting state, u i,t =0 means the unit is in shutdown state; is the startup cost of unit i; is the downtime cost of unit i; P t L , P t W and P t V are the output values of load, wind power and photovoltaic power at time t respectively; and are the minimum and maximum outputs of the generators in the cluster with the highest similarity, respectively; and are the up-climbing and down-climbing of unit i in the cluster with the highest similarity, respectively; and are the maximum transmission power and minimum transmission power of the line in the cluster with the highest similarity; δ lp1,t and δ lp2,t are the phase angles at both ends of line l; X l is the reactance of line l.
8. A provincial day-ahead dispatch optimization device, characterized in that: include: Historical operation data acquisition module, feature extraction and clustering module, feasible domain search module, provincial and regional day-ahead dispatch optimization model construction module, and provincial and regional day-ahead dispatch optimization module; The historical operation data acquisition module is used to acquire the historical operation data of the corresponding province or region; wherein the historical operation data includes: power grid dispatching operation data, power grid model data, dispatching objectives, dispatching constraints and meteorological data of the corresponding province or region; The feature extraction and clustering module is used to construct a corresponding operation data matrix according to the historical operation data, and then input the operation data matrix into a preset feature extraction and clustering model, so that the feature extraction and clustering model extracts features from the operation data matrix, clusters the extracted features, and outputs cluster clusters corresponding to the operation data matrix; The feasible domain search module is used to calculate the similarity between each of the clusters and the running data matrix, take the cluster with the greatest similarity to the running data matrix as the target cluster, and calculate the upper and lower limits of each random variable in the target cluster, and then obtain the feasible domain of each control variable in the target cluster according to the upper and lower limits; The provincial day-ahead dispatch optimization model construction module is used to construct the corresponding provincial day-ahead dispatch optimization model and the constraint conditions of the provincial day-ahead dispatch optimization model according to the feasible domain; The provincial day-ahead scheduling optimization module is used to solve the provincial day-ahead scheduling optimization model under the constraints of the constraints, obtain the day-ahead scheduling optimization unit schedule for the corresponding province, and then optimize the provincial day-ahead scheduling according to the day-ahead scheduling optimization unit schedule.
9. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the provincial day-ahead scheduling optimization method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the provincial day-ahead scheduling optimization method as described in any one of claims 1 to 7.