Phase-shifting transformer-considered day-ahead optimal scheduling method for double-layer power distribution network
Through deep learning, the distribution network operation stability of the distribution network under large-scale access is solved, and the safe and stable operation and system optimization of the distribution network are achieved.
Patent Information
- Application Number
- CN202411069749.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
AI Technical Summary
Under the large-scale access of distributed photovoltaics, the operating conditions of the medium and low voltage distribution networks are complex, and the power supply quality and reliability need to be improved. It is difficult for the existing technology to ensure the safe and stable operation of the distribution system.
Using the double-layer optimization scheduling method of phase-shift transformer, deep learning is used to predict distributed photovoltaic output by collecting distribution network data, and the double-layer optimization model is used to optimize distribution network scheduling. The upper layer target is the minimum network loss and the lower layer target is the lowest To minimize the sum of the combined ring shock current, the constraints of the distribution network and the phase shift transformer are considered.
It realizes a safer and more stable operation of the distribution system under large-scale access to distributed photovoltaics, improves the topological reconstruction collaborative optimization of the distribution network and the safe scheduling of the phase-shift transformer, and improves the overall operating efficiency and reliability of the system. .
Smart Images

Figure CN119009971A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network dispatching, and in particular to a day-ahead optimization dispatching method for a double-layer distribution network taking into account a phase-shifting transformer. Background Art
[0002] As the demand for electricity increases, the depletion of non-renewable energy is accelerated, and the environment is also polluted. Therefore, distributed power sources are widely used, including new power sources such as wind power, solar power, biomass power generation, and gas power generation. They can adjust power output in real time as needed, thereby improving the flexibility and reliability of the power grid.
[0003] However, the medium and low voltage distribution network with distributed power sources has complex operating conditions, complex and changeable networks, and the power supply quality and reliability need to be improved. How to make the distribution system under large-scale access of distributed photovoltaics more safe and stable through existing devices and diversified control methods has become an urgent problem to be solved. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a double-layer distribution network day-ahead optimization scheduling method taking into account phase-shifting transformers, so that the distribution system under large-scale access of distributed photovoltaics can operate more safely and stably.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] The present invention provides a method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer, comprising the following steps:
[0007] Collect distribution network operation data and perform data preprocessing to obtain distribution network operation sequence data;
[0008] Perform deep learning based on distribution network operation sequence data to predict distributed photovoltaic output;
[0009] According to the distributed photovoltaic output prediction results, a two-layer optimization model is used to optimize the distribution network scheduling. The upper layer of the two-layer optimization model takes the minimum network loss as the goal and considers the constraints of the distribution network system to perform optimization scheduling;
[0010] The lower layer of the two-layer optimization model takes the minimum sum of the closed-loop impact current during reconstruction as the goal, considers the constraints of the distribution network system and the constraints of the phase-shifting transformer, and performs optimal scheduling;
[0011] The distribution network is dispatched optimally on the day before according to the dispatch results calculated by the two-layer optimization model.
[0012] Further, the data preprocessing includes extracting time characteristics, position vectors and environmental characteristics based on the collected distribution network operation data;
[0013] The position vector is generated by using the sine-cosine method according to the position sequence;
[0014] The time feature is generated based on the date content as a three-dimensional vector consisting of year, month and day;
[0015] The environmental characteristics are extracted based on the cleanliness of the photovoltaic array surface, irradiance and photovoltaic cell temperature.
[0016] Furthermore, the data preprocessing also includes normalizing the data extraction results.
[0017] Furthermore, the deep learning process includes: extracting features from the distribution network operation sequence data through an encoder, and obtaining valuable information through a distillation mechanism to obtain a coding vector; and predicting distributed photovoltaic output according to the coding vector through a decoder.
[0018] Furthermore, the encoder performs feature extraction based on an improved self-attention mechanism, which evaluates the sparsity of each query matrix through KL divergence, selects the top u query matrices with the highest evaluation results, and calculates the self-attention score, where u is a positive integer.
[0019] Furthermore, the evaluation expression of the sparsity of the query matrix is:
[0020]
[0021] In the formula, q i is the i-th query matrix, K is the matrix of key vectors, L k is the matrix length of the key vector, is the transpose of the jth value in the key vector, d is the dimension of the query matrix and the key matrix, The logarithm of the sum of the exponential operation of the i-th query vector and all key vectors is calculated. is the arithmetic mean of the logarithms of the corresponding sums of all query vectors;
[0022] The output formula of the improved self-attention mechanism is:
[0023]
[0024] Where A(Q,K,V) is the output of the improved self-attention mechanism, is the query matrix of the top u items with the highest sparsity evaluation results, V is the matrix of value vectors, d k is the scaling factor.
[0025] Furthermore, the distillation mechanism includes performing a one-dimensional convolution operation on the feature extraction result, increasing the dimension of the result, and then inputting the ELU activation function, and finally selecting the most valuable feature from multiple features through the MaxPool function. The calculation expression corresponding to the distillation mechanism is:
[0026] X j+1 =MaxPool(ELU(Convld(X j ) AB ))
[0027] In the formula, (X j ) AB is the feature extraction result, Convld is a one-dimensional convolution operation, X j+1 The most valuable feature is selected.
[0028] Furthermore, the decoder includes two multi-head self-attention layers connected in sequence, and the input vector of the multi-head self-attention layer at the input end is the concatenation result of the distribution network operation sequence data and the sequence to be trained, and the corresponding calculation expression is:
[0029]
[0030] In the formula, is the input vector of the multi-head self-attention layer at the input end, is the distribution network operation sequence data, is a training sequence that is initially all 0. For and The splicing result.
[0031] Furthermore, the objective function of the upper layer of the two-layer optimization model is:
[0032]
[0033] In the formula, f 1 is the objective function value of the upper layer of the two-layer optimization model, N is the number of lines, R i,j is the resistance of the line between nodes i and j, P i,j and Q i,j are the active power and reactive power injected into branch i and j respectively, U i,j is the voltage of node i,j;
[0034] The upper constraint conditions of the two-layer optimization model include: AC power flow model of the transmission network and line safety constraints, unit output constraints, capacitor switching constraints and topology reconstruction constraints;
[0035] The calculation expressions of the AC power flow model of the transmission network and the line safety constraints are as follows:
[0036]
[0037] (2x i,j,1 ) 2 +(2x i,j,2 ) 2 +(x i -x j ) 2 ≤(x i +x j ) 2
[0038] In the formula, G i,j and B i,j are the conductance and susceptance of the line between nodes i and j, respectively, m i,j is a 0-1 variable used to determine the existence status of branch i, j, S i.j is the line transmission power, U i is the voltage at node i, x i V i 2 ,y i,j is the admittance of the line between nodes i and j, y i,0 is the admittance of node i to the ground, x i,j,1 V i V j sinθ, θ is the phase angle between nodes, x i,j,2 V i V j cosθ,V i is the voltage at node i, V j is the voltage at node j;
[0039] The calculation expression of the unit output constraint is:
[0040]
[0041] In the formula, and are the minimum and maximum values of active and reactive output of unit i, respectively. for, is the active power output of unit i, is the reactive power output of unit i;
[0042] The calculation expression of the capacitor switching constraint is:
[0043]
[0044] In the formula, and is the minimum and maximum capacity of the connected capacitor bank, t cb is the capacitor position, t act is the number of capacitor operations, is the capacity of the connected capacitor bank, t max is the maximum value of the capacitor gear, t actmax is the maximum number of capacitor actions;
[0045] The calculation expression of the topology reconstruction constraint is:
[0046]
[0047] Where n is the number of branches in the distribution network, β i,j is a 0-1 variable, which takes the value 1 if node i is the parent node of node j, otherwise it takes the value 0; is the total number of nodes.
[0048] Furthermore, the objective function of the lower layer of the two-layer optimization model is:
[0049]
[0050] In the formula, f 2 is the objective function of the lower layer of the two-layer optimization model, k i is the closed-loop impulse current coefficient, α i is the importance of the circuit; I i,j is the steady-state value of the line current;
[0051] The constraints of the phase-shifting transformer include a voltage phase angle constraint of the phase shifter and a power constraint at both ends of the phase shifter;
[0052] The calculation expression of the phase shifter voltage phase angle constraint is:
[0053]
[0054]
[0055] Where U S is the voltage amplitude of the node not connected to the phase shifter, N B2 is the number of turns on the YY type transformer side, N' B2 N is the number of turns on the Y-Δ type transformer side. E3 and N' E3 are the turns of the series-parallel side, N B1 、N' B1 B T and B' T Number of turns of winding, N E1 and N' E1 B T and B' TNumber of turns of winding, U L is the voltage amplitude of the node connected to the phase shifter, T P Adjust the gear for voltage amplitude, is the voltage phase of the node on the non-connected phase shifter side, and N is the number of line branches;
[0056] The calculation expression of the power constraint at both ends of the phase shifter is:
[0057]
[0058] In the formula, v s is the square of the voltage amplitude at node s, v L is the square of the voltage amplitude at node L, t is the introduced virtual node, v t and l tn Represent the square of the voltage amplitude and current amplitude at node t, P tn is the voltage amplitude at node t, Q tn is the current amplitude at node t, P in,n and Q in,n are the active and reactive power injected into node n, respectively. k:n→k represents the child node of node n. P nk +jQ nk is the total power injected into node n, P tn +jQ tn is the apparent power of line tn.
[0059] Compared with the prior art, the present invention has the following advantages:
[0060] (1) The present invention collects distribution network operation data and predicts distributed photovoltaic output in a deep learning manner. A two-layer optimization model is used to optimize the distribution network according to the prediction results. The two-layer optimization model performs economic upper-layer optimization scheduling of the distribution network with distribution-micro-cooperation considering topological reconstruction, and safe lower-layer optimization scheduling of the distribution network containing phase-shifting transformers. In the upper-layer optimization, the topology and system constraints of the distribution network are mainly considered, and the network loss is minimized; in the lower-layer optimization, the constraints of the phase-shifting transformer are focused on, and the total amount of closed-loop impact current during reconstruction is minimized; overall, the comprehensive scheduling optimization of the distribution network system containing phase-shifting transformers is achieved, so that the distribution system under large-scale access of distributed photovoltaics can operate more safely and stably.
[0061] (2) The present invention uses a self-attention mechanism in the deep learning process. Considering that the self-attention score obeys a long-tail distribution, a few dot products have a large impact on the output, while most dot products have a small impact on the output. The entire self-attention score matrix is sparse. In this regard, the sparsity of the query matrix is evaluated by KL divergence, and multiple query matrices with the highest evaluation results are selected for self-attention calculation. The average probability of other self-attention scores is taken, which significantly increases the calculation speed.
[0062] (3) The present invention adopts a combination of an encoder and a decoder for deep learning. The encoder is based on a modified self-attention mechanism and is mainly used to extract the connections and features between long sequence inputs. Taking into account the redundant relationship between the results of probability dilution, a distillation mechanism is adopted to obtain more valuable information, thereby improving computational efficiency. In the encoder, for the input vector of the first self-attention layer, a training sequence that is initially all zeros is concatenated with a preprocessed known sequence for processing, thereby solving the problem of slow output results. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The present invention is a flowchart of a method for optimizing the day-ahead scheduling of a double-layer distribution network taking into account a phase-shifting transformer provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] 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.
[0065] 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.
[0066] 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.
[0067] Example 1
[0068] like Figure 1 As shown, this embodiment provides a method for optimizing the day-ahead scheduling of a double-layer distribution network taking into account a phase-shifting transformer, comprising the following steps:
[0069] S1: Collect distribution network operation data through the distribution network automation system or marketing system, and perform data preprocessing to obtain distribution network operation sequence data;
[0070] S2: Perform deep learning based on the distribution network operation sequence data to predict the distributed photovoltaic output;
[0071] S3: Based on the distributed photovoltaic output prediction results, a two-layer optimization model is used to optimize the distribution network scheduling. The upper layer of the two-layer optimization model takes the minimum network loss as the goal and considers the constraints of the distribution network system to perform optimal scheduling;
[0072] The lower layer of the two-layer optimization model takes the minimum sum of the closed-loop impact current during reconstruction as the goal, considers the constraints of the distribution network system and the constraints of the phase-shifting transformer, and performs optimal scheduling;
[0073] S4: Perform day-ahead optimal dispatch of the distribution network based on the dispatch results calculated by the two-layer optimization model.
[0074] The above steps are described in detail below.
[0075] In step S1, data preprocessing includes extracting time characteristics, position vectors and environmental characteristics based on the collected distribution network operation data;
[0076] The position vector is generated using the sine and cosine method based on the position sequence;
[0077] The time feature is generated based on the date content as a three-dimensional vector consisting of year, month, and day;
[0078] Environmental characteristics are extracted based on the cleanliness of the photovoltaic array surface, irradiance and photovoltaic cell temperature.
[0079] Specifically, the distributed photovoltaic output results belong to time series data, which have a strong correlation with time coding, location coding and environmental characteristics. Therefore, time coding, location coding and environmental characteristics are extracted.
[0080] Use sine and cosine to generate position vector for position encoding:
[0081]
[0082] In the formula, p is a position in the sequence, L is the length of the input sequence, and d model is the embedding vector dimension.
[0083] For time coding, the date content is converted into time features, and a three-dimensional vector is generated according to the characteristics of the year, month, and day. The mechanism model is used to extract environmental features:
[0084]
[0085] In the formula, the first term of the three products is the cleanliness of the photovoltaic array surface, the second term is the photovoltaic array irradiance, and the third term is the photovoltaic cell temperature. This formula can extract key weather characteristics, including irradiance characteristics, coupling characteristics of irradiance and ambient temperature, and irradiance and wind speed.
[0086] Preferably, in order to prevent differences in the features themselves and accelerate the convergence of the model, the processed feature data is normalized using the z-score normalization method;
[0087] Normalize the load characteristics:
[0088]
[0089] In the formula, x is the input value of the independent variable, x is the average value of the sample data; x i is the value of the i-th sample data; N is the number of sample data.
[0090] Normalize the temporal features:
[0091]
[0092] Where, d w is the day of the week, and its value range is [1, 7]; d m The day of the month, with a value range of [1, 31]; d y It is the day of the year, and its value range is [1, 366].
[0093] Min-Max normalization is used to normalize weather characteristics:
[0094]
[0095] In the formula, x max and x min They correspond to the maximum and minimum values of weather characteristics respectively.
[0096] The deep learning process in step S2 includes: extracting features from the distribution network operation sequence data through an encoder, and obtaining valuable information through a distillation mechanism to obtain a coding vector; and predicting distributed photovoltaic output according to the coding vector through a decoder.
[0097] The output formula of the traditional self-attention mechanism is as follows:
[0098]
[0099] Where Q, K and V correspond to the matrices of query, key and value vectors respectively, d is the dimension of query matrix and key matrix, and softmax is the normalized activation function.
[0100] Preferably, considering that the self-attention score follows a long-tail distribution, a few dot products have a large impact on the output, and most dot products have a small impact on the output, and the entire self-attention score matrix is sparse, so the focus is on the part with high self-attention scores, and the other self-attention scores take the average probability, which significantly increases the calculation speed.
[0101] Define a query matrix q in the form of kernel smoothing probability i The output formula of the attention output of the sparse self-attention mechanism is as follows:
[0102]
[0103] The improved self-attention mechanism evaluates the sparsity of each query matrix through KL divergence, selects the top u query matrices with the highest evaluation results, and calculates the self-attention score, where u is a positive integer.
[0104] A query matrix q i The sparsity of can be evaluated by KL divergence as:
[0105]
[0106] In the formula, q i is the i-th query matrix, K is the matrix of key vectors, L k is the matrix length of the key vector, is the transpose of the jth value in the key vector, d is the dimension of the query matrix and the key matrix, The logarithm of the sum of the exponential operation of the i-th query vector and all key vectors is calculated. is the arithmetic mean of the logarithms of the corresponding sums of all query vectors;
[0107] The modified formula for the output of the probabilistic sparse self-attention mechanism is:
[0108]
[0109] Where A(Q,K,V) is the output of the improved self-attention mechanism, is the query matrix of the top u items with the highest sparsity evaluation results, V is the matrix of value vectors, d k is the scaling factor. u is determined by the control factor c, u = c·LQ.
[0110] The encoder is based on a modified self-attention mechanism, which is mainly used to extract connections and features between long sequence inputs. Since there is redundant relationship as a result of probability dilution, a distillation mechanism is needed to obtain more valuable information.
[0111] The distillation mechanism involves performing a one-dimensional convolution operation on the feature extraction results, increasing the dimension of the result, and then inputting the ELU activation function. Finally, the most valuable features are selected from multiple features through the MaxPool function. The calculation expression corresponding to the distillation mechanism is:
[0112] X j+1 =MaxPool(ELU(Convld(Xj ) AB ))
[0113] In the formula, (X j ) AB To extract the feature results, we first perform a one-dimensional convolution operation, increase the dimension of the output result, and then input it into the activation function of ELU. Finally, we use the MaxPool function to select the most valuable features from multiple features. Convld is a one-dimensional convolution operation. X j+1 The most valuable feature is selected.
[0114] The decoder consists of two multi-head self-attention layers connected in sequence. The input vector of the multi-head self-attention layer at the input end is the concatenation result of the distribution network operation sequence data and the sequence to be trained. The corresponding calculation expression is:
[0115]
[0116] In the formula, is the input vector of the multi-head self-attention layer at the input end, is the distribution network operation sequence data, is a training sequence that is initially all 0. For and The stitching results can be obtained by adjusting the output speed to solve the problem of slow output speed.
[0117] In step S3, the upper layer of the two-layer optimization model is to optimize the economic upper layer scheduling of the distribution network by the distribution-micro collaboration considering the topology reconstruction, which optimizes the operation state of the distribution network with the goal of minimizing the network loss:
[0118]
[0119] In the formula, f 1 is the objective function value of the upper layer of the two-layer optimization model, N is the number of lines, R i,j is the resistance of the line between nodes i and j, P i,j and Q i,j are the active power and reactive power injected into branch i and j respectively, U i,j is the voltage of node i,j;
[0120] The optimization process of the upper layer of the two-layer optimization model needs to meet the following constraints:
[0121] Constraint 1: Transmission network AC power flow model and line safety constraints:
[0122]
[0123] In the formula, G i,j and B i,jare the conductance and susceptance of the line between nodes i and j, respectively, m i,j is a 0-1 variable used to determine the existence status of branch i, j, S i.j is the line transmission power, U i is the voltage at node i.
[0124] Considering that the phase angle difference required for closing the loop is involved in the lower-level optimization, this scheme introduces the phase angle into the power flow calculation and changes the original power flow equation into a convex second-order cone inequality constraint, as follows:
[0125]
[0126] (2x i,j,1 ) 2 +(2x i,j,2 ) 2 +(x i -x j ) 2 ≤(x i +x j ) 2
[0127] In the formula, x i V i 2 ,y i,j is the admittance of the line between nodes i and j, y i,0 is the admittance of node i to the ground, x i,j,1 V i V j sinθ, θ is the phase angle between nodes, x i,j,2 V i V j cosθ,V i is the voltage at node i, V j is the voltage at node j;
[0128] Constraint 2: Unit output constraint:
[0129]
[0130] In the formula, and are the minimum and maximum values of active and reactive output of unit i, respectively. for, is the active power output of unit i, is the reactive power output of unit i;
[0131] Constraint 3: Capacitor switching constraint:
[0132]
[0133] In the formula, and is the minimum and maximum capacity of the connected capacitor bank, t cb is the capacitor position, t act is the number of capacitor operations, Q i C is the capacity of the connected capacitor bank, t max is the maximum value of the capacitor gear, t actmax is the maximum number of capacitor actions;
[0134] Constraint 4: Topology reconstruction constraint:
[0135]
[0136] Where n is the number of branches in the distribution network, β i,j is a 0-1 variable, which takes the value 1 if node i is the parent node of node j, otherwise it takes the value 0; is the total number of nodes. Before and after the topology is changed, the radial structure of the distribution network must be maintained, and the generation of islands and ring networks must be avoided.
[0137] The lower layer of the two-layer optimization model further optimizes the operation status of the distribution network with the goal of minimizing the total sum of loop impact current during reconstruction:
[0138]
[0139] In the formula, f 2 is the objective function of the lower layer of the two-layer optimization model, k i is the closed-loop impulse current coefficient, α i is the importance of the circuit; I i,j is the steady-state value of the line current;
[0140] In addition to meeting the constraints of the distribution system, the entire optimization process also needs to meet the constraints of the phase-shifting transformer:
[0141] Constraint 1: Phase shifter voltage phase angle constraint:
[0142]
[0143] -13≤T P ≤13T P ∈N
[0144]
[0145] Where U S is the voltage amplitude of the node not connected to the phase shifter, N B2 is the number of turns on the YY type transformer side, N' B2 N is the number of turns on the Y-Δ type transformer side. E3 and N'E3 are the turns of the series-parallel side, N B1 、N' B1 B T and B' T Number of turns of winding, N E1 and N' E1 B T and B' T Number of turns of winding, U L is the voltage amplitude of the node connected to the phase shifter, T P Adjust the gear for voltage amplitude, is the voltage phase of the node on the non-connected phase shifter side, and N is the number of line branches;
[0146] Constraint 2: Power constraints at both ends of the phase shifter:
[0147]
[0148] In the formula, v s is the square of the voltage amplitude at node s, v L is the square of the voltage amplitude at node L, t is the introduced virtual node, v t and l tn Represent the square of the voltage amplitude and current amplitude at node t, P tn is the voltage amplitude at node t, Q tn is the current amplitude at node t, P in,n and Q in,n are the active and reactive power injected into node n, respectively. k:n→k represents the child node of node n. P nk +jQ nk is the total power injected into node n, P tn +jQ tn is the apparent power of line tn.
[0149] In summary, this solution aims at the access of massive distributed power sources and improves the safe and stable operation of the distribution network through various means, including distributed photovoltaic processing prediction based on deep learning, economic upper-layer optimization scheduling of the distribution network with distribution and micro-cooperation considering topological reconstruction, and safe lower-layer optimization scheduling of the distribution network with phase-shifting transformers. Through existing devices and diversified control methods, the distribution system under large-scale access of distributed photovoltaics can operate more safely and stably.
[0150] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer, characterized in that: The following steps are involved: Collect distribution network operation data and perform data preprocessing to obtain distribution network operation sequence data; Perform deep learning based on distribution network operation sequence data to predict distributed photovoltaic output; According to the distributed photovoltaic output prediction results, a two-layer optimization model is used to optimize the distribution network scheduling. The upper layer of the two-layer optimization model takes the minimum network loss as the goal and considers the constraints of the distribution network system to perform optimization scheduling; The lower layer of the two-layer optimization model takes the minimum sum of the closed-loop impact current during reconstruction as the goal, considers the constraints of the distribution network system and the constraints of the phase-shifting transformer, and performs optimal scheduling; The distribution network is dispatched optimally according to the dispatch results calculated by the two-layer optimization model.
2. A method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 1, characterized in that: The data preprocessing includes extracting time characteristics, position vectors and environmental characteristics based on the collected distribution network operation data; The position vector is generated by using the sine-cosine method according to the position sequence; The time feature is generated based on the date content as a three-dimensional vector consisting of year, month and day; The environmental characteristics are extracted based on the cleanliness of the photovoltaic array surface, irradiance and photovoltaic cell temperature.
3. A method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 2, characterized in that: The data preprocessing also includes normalizing the data extraction results.
4. The method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 1, characterized in that: The deep learning process includes: extracting features from the distribution network operation sequence data through an encoder, and obtaining valuable information through a distillation mechanism to obtain a coding vector; and predicting distributed photovoltaic output according to the coding vector through a decoder.
5. A method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 4, characterized in that: The encoder performs feature extraction based on an improved self-attention mechanism, which evaluates the sparsity of each query matrix through KL divergence, selects the top u query matrices with the highest evaluation results, and calculates the self-attention score, where u is a positive integer.
6. A method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 5, characterized in that: The evaluation expression of the sparsity of the query matrix is: In the formula, q i is the i-th query matrix, K is the matrix of key vectors, L k is the matrix length of the key vector, is the transpose of the jth value in the key vector, d is the dimension of the query matrix and the key matrix, The logarithm of the sum of the exponential operation of the i-th query vector and all key vectors is calculated. is the arithmetic mean of the logarithms of the corresponding sums of all query vectors; The output formula of the improved self-attention mechanism is: Where A(Q,K,V) is the output of the improved self-attention mechanism, is the query matrix of the top u items with the highest sparsity evaluation results, V is the matrix of value vectors, d k is the scaling factor.
7. The method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 5, characterized in that: The distillation mechanism includes performing a one-dimensional convolution operation on the feature extraction result, increasing the dimension of the result, and then inputting the ELU activation function. Finally, the most valuable feature is selected from multiple features through the MaxPool function. The calculation expression corresponding to the distillation mechanism is: X j+1 =MaxPool(ELU(Convld(X j ) AB )) In the formula, (X j ) AB is the feature extraction result, Convld is a one-dimensional convolution operation, X j+1 The most valuable feature is selected.
8. The method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 5, characterized in that: The decoder includes two multi-head self-attention layers connected in sequence. The input vector of the multi-head self-attention layer at the input end is the concatenation result of the distribution network operation sequence data and the sequence to be trained. The corresponding calculation expression is: In the formula, is the input vector of the multi-head self-attention layer at the input end, is the distribution network operation sequence data, is a training sequence that is initially all 0. For and The splicing result.
9. The method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 1, characterized in that: The objective function of the upper layer of the two-layer optimization model is: Where f1 is the objective function value of the upper layer of the two-layer optimization model, N is the number of lines, R i,j is the resistance of the line between nodes i and j, P i,j and Q i,j are the active power and reactive power injected into branch i and j respectively, U i,j is the voltage of node i,j; The upper constraint conditions of the two-layer optimization model include: AC power flow model of the transmission network and line safety constraints, unit output constraints, capacitor switching constraints and topology reconstruction constraints; The calculation expressions of the AC power flow model of the transmission network and the line safety constraints are as follows: (2x i,j,1 ) 2 +(2x i,j,2 ) 2 +(x i -x j ) 2 ≤(x i +x j ) 2 In the formula, G i,j and B i,j are the conductance and susceptance of the line between nodes i and j, respectively, m i,j is a 0-1 variable used to determine the existence status of branch i, j, S i.j is the line transmission power, U i is the voltage at node i, x i V i 2 ,y i,j is the admittance of the line between nodes i and j, y i,0 is the admittance of node i to the ground, x i,j,1 V i V j sinθ, θ is the phase angle between nodes, x i,j,2 V i V j cosθ,V i is the voltage at node i, V j is the voltage at node j; The calculation expression of the unit output constraint is: In the formula, and are the minimum and maximum values of active and reactive output of unit i, respectively. for, is the active power output of unit i, is the reactive power output of unit i; The calculation expression of the capacitor switching constraint is: In the formula, and is the minimum and maximum capacity of the connected capacitor bank, t cb is the capacitor position, t act is the number of capacitor operations, is the capacity of the connected capacitor bank, t max is the maximum value of the capacitor gear, t actmax is the maximum number of capacitor actions; The calculation expression of the topology reconstruction constraint is: Where n is the number of branches in the distribution network, β i,j is a 0-1 variable, which takes the value 1 if node i is the parent node of node j, otherwise it takes the value 0; is the total number of nodes.
10. The method for optimizing the day-ahead dispatching of a double-layer distribution network taking into account a phase-shifting transformer according to claim 1, characterized in that: The objective function of the lower layer of the two-layer optimization model is: Where f2 is the objective function of the lower layer of the two-layer optimization model, k i is the closed-loop impulse current coefficient, α i is the circuit importance; I i,j is the steady-state value of the line current; The constraints of the phase-shifting transformer include a voltage phase angle constraint of the phase shifter and a power constraint at both ends of the phase shifter; The calculation expression of the phase shifter voltage phase angle constraint is: -13≤T P ≤13T P ∈N Where U S is the voltage amplitude of the node not connected to the phase shifter, N B2 is the number of turns on the YY type transformer side, N' B2 N is the number of turns on the Y-Δ type transformer side. E3 and N' E3 are the turns of the series-parallel side, N B1 、N' B1 B T and B' T Number of turns of winding, N E1 and N' E1 B T and B' T Number of turns of winding, U L is the voltage amplitude of the node connected to the phase shifter, T P Adjust the gear for voltage amplitude, is the voltage phase of the node on the non-connected phase shifter side, is the voltage phase angle adjustment gear, N is the number of lines; The calculation expression of the power constraint at both ends of the phase shifter is: In the formula, v s is the square of the voltage amplitude at node s, v L is the square of the voltage amplitude at node L, t is the introduced virtual node, v t and l tn Represent the square of the voltage amplitude and current amplitude at node t, P tn is the voltage amplitude at node t, Q tn is the current amplitude at node t, P in,n and Q in,n are the active and reactive power injected into node n, respectively. k:n→k represents the child node of node n. P nk +jQ nk is the total power injected into node n, P tn +jQ tn is the apparent power of line tn.
