A method for voltage sag state estimation based on space-time three-dimensional tensor
By employing a voltage sag state estimation method based on spatiotemporal three-dimensional tensors and utilizing Gram angle field transform and CNN+Transformer model, the problem of power grid component parameter dependence in traditional methods is solved, achieving high accuracy and low complexity in voltage sag state estimation and improving the ability to mine spatiotemporal mapping patterns of power grid voltage sag data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional voltage sag estimation methods require obtaining grid component parameters and considering grid topology, electrical parameters and operating conditions, resulting in a complex estimation process and poor accuracy. Furthermore, data-driven methods fail to deeply explore the spatiotemporal mapping patterns of voltage sag data, are susceptible to noise, and have high computational complexity.
A voltage sag state estimation method based on spatiotemporal three-dimensional tensor is adopted. The spatiotemporal three-dimensional tensor is constructed by Gram angle field transformation and similarity calculation, and the voltage sag state is estimated by combining CNN+Transformer cascade model. This method deeply explores the spatiotemporal mapping pattern of voltage sag in the power grid and improves the estimation accuracy.
It eliminates the need for power grid component parameter analysis, improves the accuracy and timeliness of voltage sag estimation, overcomes the complexity and noise effects of traditional methods, and can effectively capture local and global information from voltage time series data.
Smart Images

Figure CN120577640B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of voltage sag state estimation, and particularly relates to a voltage sag state estimation method based on a space-time three-dimensional tensor. BACKGROUND
[0002] In power quality problems, voltage sags occur most frequently and cause huge economic losses. The premise of solving voltage sags is that the system can obtain the voltage sag conditions of each node of the power grid, and on this basis, the weak links of the power grid can be identified, the economic cost can be evaluated, the corresponding responsible party can be verified, and the voltage sag relief scheme can be derived. However, in practice, the power grid is a huge system, not only the number of nodes is large, but also the topological structure is complex. Considering the economic cost, it is impossible to install voltage sag measurement devices at each node, so only a limited number of monitoring devices can be installed in the power grid. Traditional voltage sag state estimation methods mostly rely on the analysis of power grid topological structure and electrical parameters and construct mathematical models, which usually require the parameters of all power grid elements, but these parameters are extremely difficult to obtain. Moreover, the data obtained by measurement in the power grid has disturbance factors such as harmonics and noise, the system operating conditions are complex, and the electrical parameters and even the topological structure change when faults occur, which leads to inaccurate voltage sag state estimation by traditional methods. Data-driven voltage sag state estimation does not require the acquisition of power grid element parameters, does not need to analyze the system operating conditions, topological structure and electrical parameters, and only considers the nonlinear coupling relationship between the voltage sag data of the monitored nodes and the unmonitored nodes. However, the input data selected by the current voltage sag data-driven state estimation method is generally one-dimensional voltage time series data or voltage data at a certain time node, without deep mining of the space-time mapping rules of voltage sag data in the power grid. Moreover, traditional deep learning models can only extract local features and are difficult to establish long-distance dependence relationships of the overall data. The model is easily affected by system noise, a large amount of noise data will affect the training and prediction effect of the model, and the data feature information loss caused by the algorithm in the training process of the model, all of which will reduce the accuracy of the data-driven state estimation method, and the computational complexity of the model will directly affect the timeliness of the state estimation. SUMMARY
[0003] The purpose of the present application is to solve the problem of complex voltage sag state estimation process and poor accuracy caused by the need to obtain power grid element parameters, consider the power grid topological structure, electrical parameters and operating conditions, and propose a voltage sag state estimation method based on a space-time three-dimensional tensor.
[0004] The technical scheme of the present application is: a voltage sag state estimation method based on a space-time three-dimensional tensor, comprising the following steps:
[0005] S1. Collecting actual detection data of the power grid to obtain three-phase voltage time series data of the power grid;
[0006] S2. Perform Gram angle field transformation and similarity calculation on the three-phase voltage time series data to obtain the spatiotemporal three-dimensional tensor;
[0007] S3. Construct a CNN+Transformer concatenated model;
[0008] S4. Input the spatiotemporal three-dimensional tensor into the CNN+Transformer cascaded model and output the voltage sag state estimation result.
[0009] The beneficial effects of this invention are:
[0010] 1. This invention does not require component parameters to model the system, nor does it require analysis of system operating conditions, topology, and electrical parameters.
[0011] 2. This invention constructs a three-dimensional tensor based on voltage time-series data from multiple monitoring points in the power grid, and mines the spatiotemporal mapping pattern of voltage sag events propagating in the power grid, which can effectively improve the accuracy of voltage sag state estimation.
[0012] Preferably, step S2 specifically includes the following sub-steps:
[0013] S21. Perform Gram angle field transformation on the three-phase voltage time series data to obtain three-phase GAF two-dimensional image data;
[0014] S22. Using the outermost monitoring node in the power grid topology as the base point, the similarity between the three-phase voltage time series data of the base point and the three-phase voltage time series data of the other monitoring nodes is calculated using the DTW algorithm.
[0015] S23. Based on similarity, stack the three-phase GAF two-dimensional image data into a three-channel spatiotemporal three-dimensional tensor.
[0016] Preferably, step S21 specifically includes the following steps:
[0017] S211. The three-phase voltage timing data is normalized. The calculation formula for the normalization process is as follows:
[0018]
[0019] in, This represents the normalized three-phase voltage timing data. This represents the three-phase voltage timing sequence before normalization. Represents the three-phase voltage timing sequence The first in One time series data, Represents the three-phase voltage timing sequence The maximum value in, Represents the three-phase voltage timing sequence The minimum value in;
[0020] S212. Convert the normalized time series data into polar coordinates, where the cosine of the angle between the polar coordinates is the time series data value, and the polar radius is the timestamp. The specific calculation formula is as follows:
[0021]
[0022] in, Indicates the polar angle. Represents the inverse cosine function. Indicates the polar axis. Representing time series data The timestamp of the location This indicates the number of all time points contained in the time series data;
[0023] S213. Using the Gram matrix, perform Gram angle field transformation on the time series data in polar coordinate form to obtain three-phase GAF two-dimensional image data. The specific calculation formula is as follows:
[0024]
[0025] in, This represents three-phase GAF two-dimensional image data. Representing a three-phase voltage time sequence in polar coordinates transpose, Representing a three-phase voltage time sequence in polar coordinates The first in One time series data, This represents the inner product of two vectors, i.e., the correlation information of different timestamp features.
[0026] Preferably, step S22 specifically involves: based on the voltage timing sequence of the base point. Voltage timing sequence of other monitoring nodes , build a matrix ,in, The first voltage timing sequence representing the base point One time series data, This represents the first [node] in the voltage time sequence of the remaining monitoring nodes. Time series data, matrix medium elements Indicates the first A voltage timing sequence With the A voltage timing sequence The Euclidean distance between them , From the matrix Find a line from arrive The path is such that the path has the minimum cumulative Euclidean distance, which is the similarity between the three-phase voltage time series data of the base point and the three-phase voltage time series data of each of the other monitoring nodes.
[0027] Preferably, the CNN+Transformer concatenated model in step S3 includes a first 3DCNN layer, a max pooling layer, a concatenated module of M convolutional layers and a Transformer encoder, a data flattening layer, a fully connected layer, and a Softmax layer connected in sequence.
[0028] Preferably, the convolutional layer and Transformer encoder cascade module includes an average pooling layer, a second 3DCNN layer, a first Transformer encoder, a second Transformer encoder, and a third 3DCNN layer connected in sequence.
[0029] Preferably, both the first Transformer encoder and the second Transformer encoder include a multi-head self-attention layer, a first residual connection and layer normalization layer, a feedforward fully connected layer, and a second residual connection and layer normalization layer connected in sequence.
[0030] Preferably, the multi-head attention mechanism of the multi-head self-attention layer is as follows: the T tokens of the input data of the multi-head self-attention layer are split into T / t groups, and t tokens are calculated in each group; the T tokens of the input data of the multi-head self-attention layer are calculated by multiple stacked Transformer encoders respectively; based on the calculation results of the multiple stacked Transformer encoders, feature fusion is performed using an average pooling layer to obtain the global features of the input data.
[0031] When splitting the T tokens of the input data of the multi-head self-attention layer into T / t groups, relative position encoding needs to be performed on each group of tokens. Specifically, a three-dimensional coordinate system is constructed based on the size of the spatiotemporal three-dimensional tensor. This three-dimensional coordinate system contains the coordinate information of each input data point of the multi-head self-attention layer. The coordinate differences are obtained by subtracting the length, width, and height coordinates of the other points from the length, width, and height coordinates of a certain point. The distance relationship between the two coordinates is obtained by adding the coordinate differences, and finally, the relative position encoding of all input data points is obtained. The specific calculation formula is as follows:
[0032]
[0033] in, Represents the relative position encoding matrix. Indicates input data points Location and input data points Relative position information, , .
[0034] Preferably, step S4 specifically includes the following formula:
[0035] S41. Input the spatiotemporal 3D tensor into the first 3DCNN layer for 3D convolution processing to obtain the output value of the first 3DCNN layer. The specific calculation formula is as follows:
[0036]
[0037] in, Represents the spatiotemporal three-dimensional tensor after convolution kernel The obtained output is the output value after 3D convolution processing. Represents a three-dimensional spacetime tensor. The number of channels in a spacetime three-dimensional tensor is represented by: , This represents the total number of channels in the spatiotemporal three-dimensional tensor. , and Representing the length, width, and height of the spacetime three-dimensional tensor, respectively. , and These represent the length, width, and height of the convolution kernel, respectively. , and These represent the stride of the convolution kernel in the length, width, and height directions, respectively. Represents the convolution kernel The weight parameters in Represents the convolution kernel On the bias, , and These represent the range of the window that moves in the length, width, and height directions of the spatiotemporal three-dimensional tensor during the 3D convolution process.
[0038] S42. Transfer the output value of the first 3DCNN layer The input is processed by a max pooling layer to obtain the output value of the max pooling layer. The specific calculation formula is as follows:
[0039]
[0040] in, Indicates the maximum value;
[0041] S43. Convert the output value of the max pooling layer Input a module consisting of M concatenated convolutional layers and a Transformer encoder, and output the fused features of the spatiotemporal three-dimensional tensor.
[0042] S44. Flatten the fusion features of the spatiotemporal three-dimensional tensor to obtain one-dimensional data;
[0043] S45. The number of one-dimensional data points is transformed into the number of categories for voltage sag state estimation through linear mapping.
[0044] Preferably, the voltage sag state estimation results in step S4 include six voltage amplitude categories: category V-1, category V-2, category V-3, category V-4, category V-5, and category V-6, each corresponding to a different voltage amplitude. The scope, specifically:
[0045] Category V-1: ;
[0046] Category V-2: ;
[0047] Category V-3: ;
[0048] Category V-4: ;
[0049] Category V-5: ;
[0050] Category V-6: .
[0051] The beneficial effects of the above preferred solution are:
[0052] 1. By using Gram angle field transform, voltage sag time series data is converted into three-phase GAF two-dimensional image data, which can reflect the correlation information of different timestamp characteristics within the time series. The similarity of voltage sag time series data is calculated by using the DTW algorithm to obtain the coupling relationship between monitoring nodes. This allows for in-depth mining of the spatiotemporal mapping pattern of voltage sag data in the power grid, which can effectively improve the accuracy of voltage sag state estimation.
[0053] 2. The CNN+Transformer concatenated model integrates the multi-scale feature extraction and noise resistance capabilities of CNN with the global modeling capabilities of transformer. It overcomes the shortcomings of CNN in building a global understanding of context and transformer in terms of poor robustness, and can effectively capture the local and global information of voltage time series data.
[0054] 3. The multi-head attention mechanism effectively reduces the computational complexity of traditional attention mechanisms by splitting the T tokens of the input data into T / t groups and using multiple stacked Transformer encoders to handle each group of input data tokens. It also overcomes the problem of high-dimensional information loss during the computation process of traditional attention mechanisms and can effectively mine the relative positional relationship of input samples in the power grid. Attached Figure Description
[0055] Figure 1 The diagram shows a flowchart of a voltage sag state estimation method based on spatiotemporal three-dimensional tensors.
[0056] Figure 2 The diagram shown is a CNN+Transformer concatenated model structure provided in an embodiment of the present invention.
[0057] Figure 3 The diagram shown is a cascaded module structure diagram of a convolutional layer and a Transformer encoder provided in an embodiment of the present invention.
[0058] Figure 4 The diagram shown is a structural diagram of the Transformer encoder provided in an embodiment of the present invention. Detailed Implementation
[0059] Exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the drawings are merely exemplary and are intended to illustrate the principles and spirit of the invention, and are not intended to limit the scope of the invention.
[0060] Before describing specific embodiments of the present invention, to make the solution of the present invention clearer and more complete, the definitions of abbreviations and key terms appearing in the present invention will first be explained:
[0061] Voltage sag: refers to a power quality disturbance phenomenon with a voltage amplitude in the range of 0.1~0.9pu and a duration of 0.5T~1min, where T is the fundamental frequency period.
[0062] Voltage sag estimation: refers to estimating the voltage sag amplitude at unmonitored points based on data from monitored points.
[0063] Example:
[0064] like Figure 1 As shown, a voltage sag state estimation method based on spatiotemporal three-dimensional tensor includes the following steps:
[0065] S1. Collect actual power grid detection data to obtain the three-phase voltage time sequence data of the power grid;
[0066] S2. Perform Gram angle field transformation and similarity calculation on the three-phase voltage time series data to obtain the spatiotemporal three-dimensional tensor;
[0067] S3. Construct a CNN+Transformer concatenated model;
[0068] S4. Input the spatiotemporal three-dimensional tensor into the CNN+Transformer cascaded model and output the voltage sag state estimation result.
[0069] In this embodiment, step S2 specifically includes the following sub-steps:
[0070] S21. Perform Gram angle field (GAF) transformation on the three-phase voltage time series data of ABC to obtain two-dimensional GAF image data of the three-phase ABC;
[0071] S22. Taking the outermost monitoring node in the power grid topology as the base point, the similarity between the ABC three-phase voltage time series data of the base point and the ABC three-phase voltage time series data of the other monitoring nodes is calculated by the Dynamic Time Warping (DTW) algorithm.
[0072] S23. Stack the three-phase GAF two-dimensional image data of ABC according to the similarity from high to low to obtain three spatiotemporal three-dimensional data of ABC. Stack the three spatiotemporal three-dimensional data of ABC according to the three-phase order of ABC to form a three-channel spatiotemporal three-dimensional tensor.
[0073] In this embodiment, step S21 specifically includes the following steps:
[0074] S211. The three-phase voltage timing data is normalized. The calculation formula for the normalization process is as follows:
[0075]
[0076] in, This represents the normalized three-phase voltage timing data. This represents the three-phase voltage timing sequence before normalization. Represents the three-phase voltage timing sequence The first in One time series data, Represents the three-phase voltage timing sequence The maximum value in, Represents the three-phase voltage timing sequence The minimum value in;
[0077] S212. Convert the normalized time series data into polar coordinates, where the cosine of the angle between the polar coordinates is the time series data value, and the polar radius is the timestamp. The specific calculation formula is as follows:
[0078]
[0079] in, Indicates the polar angle. Represents the inverse cosine function. Indicates the polar axis. Representing time series data The timestamp of the location This indicates the number of all time points contained in the time series data. In the polar coordinate system, each time series data point contains two pieces of information: one is the normalized three-phase voltage time series data of that data point, and the other is the time series position of that data point, i.e., the polar axis. The time relationship of the three-phase voltage timing data was preserved, including the polar angle. The numerical relationships of the three-phase voltage timing data at a certain timestamp are preserved.
[0080] S213. Using the Gram matrix, perform Gram angle field transformation on the time series data in polar coordinate form to obtain three-phase GAF two-dimensional image data. The specific calculation formula is as follows:
[0081]
[0082] in, This represents three-phase GAF two-dimensional image data. Representing a three-phase voltage time sequence in polar coordinates transpose, Representing a three-phase voltage time sequence in polar coordinates The first in One time series data, The inner product of two vectors represents the correlation information of different timestamp features. It can be considered as the similarity between two vectors, i.e., the correlation information of different timestamp features.
[0083] In this embodiment, the current voltage sag data-driven state estimation method does not consider the impact of a single set of data on the global situation during the preprocessing of the input data. This lack of consideration for the spatial coupling characteristics between monitoring nodes leads to reduced accuracy in state estimation. Therefore, it is necessary to consider the connections between each monitoring node. When a voltage sag occurs, the closer the spatial distance between the monitoring node and the fault location, and the higher the degree of electrical coupling, the deeper the impact, resulting in more severe voltage waveform distortion at that node. Therefore, the DTW algorithm can be used to measure the similarity between the time series of two different monitoring nodes to reflect the topological space and electrical coupling between the monitoring nodes. Step S22 specifically involves: based on the voltage time series of the base point... Voltage timing sequence of other monitoring nodes , build a matrix ,in, The first voltage timing sequence representing the base point One time series data, This represents the first [node] in the voltage time sequence of the remaining monitoring nodes. Time series data, matrix medium elements Indicates the first A voltage timing sequence With the A voltage timing sequence The Euclidean distance between them , From the matrix Find a line from arrive The path is such that the path has the minimum cumulative Euclidean distance, which is the similarity between the three-phase voltage time series data of the base point and the three-phase voltage time series data of each of the other monitoring nodes. The smaller the cumulative Euclidean distance, the higher the similarity.
[0084] In this embodiment, as Figure 2 As shown, the CNN+Transformer concatenated model in step S3 includes a first three-dimensional convolutional (3DCNN) layer, a max pooling layer, a concatenated module of multiple convolutional layers and a Transformer encoder, a data flattening layer, a fully connected layer, and a Softmax layer connected in sequence.
[0085] like Figure 3 As shown, the convolutional layer and Transformer encoder cascade module includes an average pooling layer, a second 3DCNN layer, multiple stacked Transformer encoders, and a third 3DCNN layer connected in sequence.
[0086] like Figure 4 As shown, the multiple stacked Transformer encoders each include a multi-head self-attention layer, a first residual connection and layer normalization layer, a feedforward fully connected layer, and a second residual connection and layer normalization layer connected in sequence.
[0087] The algorithmic complexity of the attention mechanism is proportional to the square of the input data size, and its complexity is O(n log n). Therefore, in this embodiment, the multi-head attention mechanism of the multi-head self-attention layer is as follows: the T tokens of the input data of the multi-head self-attention layer are split into T / t groups, and t tokens are calculated in each group, which can effectively reduce the computational complexity to The algorithm utilizes multiple stacked Transformer encoders to calculate T tokens from the input data of the multi-head self-attention layer. Based on the calculation results of the multiple stacked Transformer encoders, it uses an average pooling layer to perform feature fusion, thereby obtaining the global features of the input data while effectively reducing the computational complexity.
[0088] When splitting the T smallest processing units (tokens) of the input data of the multi-head self-attention layer into T / t groups, relative position encoding needs to be performed on each group of tokens. Specifically, a three-dimensional coordinate system is constructed based on the size of the spatiotemporal three-dimensional tensor. This three-dimensional coordinate system contains the coordinate information of each input data point of the multi-head self-attention layer. The coordinate differences are obtained by subtracting the length, width, and height coordinates of the other points from the length, width, and height coordinates of a certain point. The distance relationship between the two coordinates is obtained by adding the coordinate differences, and finally, the relative position encoding of all input data points is obtained. The specific calculation formula is as follows:
[0089]
[0090] in, Represents the relative position encoding matrix. Indicates input data points Location and input data points Relative position information, , ;
[0091] Attention in multi-head self-attention layer The calculation formula is:
[0092]
[0093] in, , and This represents the mapping of input data to the multi-head self-attention layer. This represents the activation function. Mapping of input transpose, This represents the vector dimension of each point in the input data of the multi-head self-attention layer, which is the number of channels in this case. This represents the relative positional encoding bias of the input data for the multi-head self-attention layer.
[0094] In this embodiment, step S4 specifically includes the following formula:
[0095] S41. Input the spatiotemporal 3D tensor into the first 3DCNN layer for 3D convolution processing to obtain the output value of the first 3DCNN layer. The specific calculation formula is as follows:
[0096]
[0097] in, Represents the spatiotemporal three-dimensional tensor after convolution kernel The obtained output is the output value after 3D convolution processing. Represents a three-dimensional spacetime tensor. The number of channels in a three-dimensional spatiotemporal tensor is represented by: , This represents the total number of channels in the spatiotemporal three-dimensional tensor. , and Representing the length, width, and height of the spacetime three-dimensional tensor, respectively. , and These represent the length, width, and height of the convolution kernel, respectively. , and These represent the stride of the convolution kernel in the length, width, and height directions, respectively. Represents the convolution kernel The weight parameters in Represents the convolution kernel On the bias, , and These represent the range of the window that moves in the length, width, and height directions of the spatiotemporal three-dimensional tensor during the 3D convolution process.
[0098] S42. Transfer the output value of the first 3DCNN layer The input is processed by a max pooling layer to obtain the output value of the max pooling layer. The specific calculation formula is as follows:
[0099]
[0100] in, Indicates the maximum value;
[0101] S43. Convert the output value of the max pooling layer Input a module consisting of M concatenated convolutional layers and a Transformer encoder, and output the fused features of the spatiotemporal three-dimensional tensor.
[0102] S44. Flatten the fusion features of the spatiotemporal three-dimensional tensor to obtain one-dimensional data;
[0103] S45. The number of one-dimensional data points is transformed into the number of categories for voltage sag state estimation through linear mapping.
[0104] In this embodiment, the voltage sag state estimation results in step S4 include six voltage amplitude categories: category V-1, category V-2, category V-3, category V-4, category V-5, and category V-6, each corresponding to a different voltage amplitude. The scope, specifically:
[0105] Category V-1: ;
[0106] Category V-2: ;
[0107] Category V-3: ;
[0108] Category V-4: ;
[0109] Category V-5: ;
[0110] Category V-6: .
[0111] This invention proposes a voltage sag state estimation method based on spatiotemporal three-dimensional tensors to deeply explore the spatiotemporal mapping patterns of voltage sag data in the power grid. The method transforms voltage sag time-series data into an image representation reflecting the correlation information of different timestamps within the time series through Gram angle field transformation. By calculating the similarity of time-series data, the coupling relationship between monitoring nodes is obtained. Based on this, the image data is stacked into a three-dimensional tensor to reflect the spatial characteristics of the system. A CNN+Transformer cascaded model is employed, which has excellent local and global feature extraction capabilities and strong robustness. The attention mechanism is improved, effectively reducing the computational complexity of traditional attention mechanisms and overcoming the problem of high-dimensional information loss during computation. The preprocessed data is input into the model for training to obtain the state estimation results. This method effectively improves the accuracy and practicality of voltage sag state estimation.
[0112] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A voltage sag state estimation method based on spatiotemporal three-dimensional tensor, characterized in that, The method includes the following steps: S1. Collect actual power grid detection data to obtain the three-phase voltage time sequence data of the power grid; S2. Perform Gram angle field transformation and similarity calculation on the three-phase voltage time series data to obtain the spatiotemporal three-dimensional tensor; S3. Construct a CNN+Transformer concatenated model; S4. Input the spatiotemporal three-dimensional tensor into the CNN+Transformer cascaded model and output the voltage sag state estimation result; Step S2 specifically includes the following sub-steps: S21. Perform Gram angle field transformation on the three-phase voltage time series data to obtain three-phase GAF two-dimensional image data; S22. Using the outermost monitoring node in the power grid topology as the base point, the similarity between the three-phase voltage time series data of the base point and the three-phase voltage time series data of the other monitoring nodes is calculated using the DTW algorithm. S23. Based on similarity, stack the three-phase GAF two-dimensional image data into a three-channel spatiotemporal three-dimensional tensor.
2. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 1, characterized in that, Step S21 specifically includes the following steps: S211. The three-phase voltage timing data is normalized, and the calculation formula for the normalization process is as follows: in, This represents the normalized three-phase voltage timing data. This represents the three-phase voltage timing sequence before normalization. Represents the three-phase voltage timing sequence The first in One time series data, Represents the three-phase voltage timing sequence The maximum value in, Represents the three-phase voltage timing sequence The minimum value in; S212. Convert the normalized time series data into polar coordinates, where the cosine of the angle between the polar coordinates is the time series data value, and the polar radius is the timestamp. The specific calculation formula is as follows: in, Indicates the polar angle. Represents the inverse cosine function. Indicates the polar axis. Representing time series data The timestamp of the location This indicates the number of all time points contained in the time series data; S213. Using the Gram matrix, perform Gram angle field transformation on the time series data in polar coordinate form to obtain three-phase GAF two-dimensional image data. The specific calculation formula is as follows: in, This represents three-phase GAF two-dimensional image data. Representing a three-phase voltage time sequence in polar coordinates transpose, Representing a three-phase voltage time sequence in polar coordinates The first in One time series data, This represents the inner product of two vectors, i.e., the correlation information of different timestamp features.
3. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 1, characterized in that, Step S22 specifically involves: based on the voltage timing sequence of the base point. Voltage timing sequence of other monitoring nodes , build a matrix ,in, The first voltage timing sequence representing the base point One time series data, This represents the first [node] in the voltage time sequence of the remaining monitoring nodes. Time series data, matrix medium elements Indicates the first A voltage timing sequence With the A voltage timing sequence The Euclidean distance between them , From the matrix Find a line from arrive The path is such that the path has the minimum cumulative Euclidean distance, which is the similarity between the three-phase voltage time series data of the base point and the three-phase voltage time series data of each of the other monitoring nodes.
4. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 1, characterized in that, The CNN+Transformer concatenated model described in step S3 includes a first 3DCNN layer, a max pooling layer, a concatenated module of multiple convolutional layers and a Transformer encoder, a data flattening layer, a fully connected layer, and a Softmax layer connected in sequence.
5. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 4, characterized in that, The concatenated module of the convolutional layer and the Transformer encoder includes an average pooling layer, a second 3DCNN layer, multiple stacked Transformer encoders, and a third 3DCNN layer connected in sequence.
6. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 5, characterized in that, The multiple stacked Transformer encoders each include a multi-head self-attention layer, a first residual connection and layer normalization layer, a feedforward fully connected layer, and a second residual connection and layer normalization layer connected in sequence.
7. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 6, characterized in that, The multi-head attention mechanism of the multi-head self-attention layer is as follows: the T tokens of the input data of the multi-head self-attention layer are split into T / t groups, and t tokens are calculated for each group; the T tokens of the input data of the multi-head self-attention layer are calculated by using multiple stacked Transformer encoders respectively. Based on the calculation results of multiple stacked Transformer encoders, feature fusion is performed using an average pooling layer to obtain the global features of the input data; When splitting the T tokens of the input data of the multi-head self-attention layer into T / t groups, relative position encoding needs to be performed on each group of tokens. Specifically, a three-dimensional coordinate system is constructed based on the size of the spatiotemporal three-dimensional tensor. This three-dimensional coordinate system contains the coordinate information of each input data point of the multi-head self-attention layer. The coordinate differences are obtained by subtracting the length, width, and height coordinates of the other points from the length, width, and height coordinates of a certain point. The distance relationship between the two coordinates is obtained by adding the coordinate differences, and finally, the relative position encoding of all input data points is obtained. The specific calculation formula is as follows: in, Represents the relative position encoding matrix. Indicates input data points Location and input data points Relative position information, , .
8. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 7, characterized in that, Step S4 specifically includes the following formula: S41. Input the spatiotemporal 3D tensor into the first 3DCNN layer for 3D convolution processing to obtain the output value of the first 3DCNN layer. The specific calculation formula is as follows: in, Represents the spatiotemporal three-dimensional tensor after convolution kernel The obtained output is the output value after 3D convolution processing. Represents a three-dimensional spacetime tensor. The number of channels in a three-dimensional spatiotemporal tensor is represented by: , This represents the total number of channels in the spatiotemporal three-dimensional tensor. , and Representing the length, width, and height of the spacetime three-dimensional tensor, respectively. , and These represent the length, width, and height of the convolution kernel, respectively. , and These represent the stride of the convolution kernel in the length, width, and height directions, respectively. Represents the convolution kernel The weight parameters in Represents the convolution kernel On the bias, , and These represent the range of the window that moves in the length, width, and height directions of the spatiotemporal three-dimensional tensor during the 3D convolution process. S42. Transfer the output value of the first 3DCNN layer The input is processed by a max pooling layer to obtain the output value of the max pooling layer. The specific calculation formula is as follows: in, Indicates the maximum value; S43. Convert the output value of the max pooling layer Input a module consisting of M concatenated convolutional layers and a Transformer encoder, and output the fused features of the spatiotemporal three-dimensional tensor. S44. Flatten the fusion features of the spatiotemporal three-dimensional tensor to obtain one-dimensional data; S45. The number of one-dimensional data points is transformed into the number of categories for voltage sag state estimation through linear mapping.
9. The voltage sag state estimation method based on spatiotemporal three-dimensional tensor according to claim 1, characterized in that, The voltage sag estimation results in step S4 include six voltage amplitude categories: category V-1, category V-2, category V-3, category V-4, category V-5, and category V-6, each corresponding to a different voltage amplitude. The scope, specifically: Category V-1: ; Category V-2: ; Category V-3: ; Category V-4: ; Category V-5: ; Category V-6: .
Citation Information
Patent Citations
Voltage sag state estimation method considering power grid reconstruction
CN112186750A
Electric energy quality disturbance classification method of Gramer angle field and CNN-LSTM (convolutional neural network-long short-term memory)
CN115115888A