Time convolutional neural network model fusing attention mechanism, power system dynamic state estimation method, system, device and medium
By adopting a time convolutional neural network model with a fusion attention mechanism in the dynamic state estimation of power systems, the problem of insufficient accuracy in the prior art is solved, and more efficient dynamic state feature extraction and estimation is achieved.
Patent Information
- Application Number
- CN202411532631.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has insufficient accuracy in the estimation of dynamic state of power systems, making it difficult to effectively capture the complex dynamic characteristics of power systems.
Using the temporal convolutional neural network model with a fusion attention mechanism, a deep learning model is constructed by introducing the temporal convolutional neural network (TCN) and attention mechanism. This model can automatically learn and extract the characteristics of the dynamic state of the power system and use it to Attention mechanism improves the accuracy of information extraction.
It improves the accuracy of dynamic state estimation of power system, can more effectively capture the complex dynamic characteristics of power system, simplifies the model construction process, and reduces the risk of overfitting.
Smart Images

Figure CN119514616A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power systems and relates to a temporal convolutional neural network model integrating an attention mechanism, a power system dynamic state estimation method, system, equipment and medium. Background Art
[0002] Traditional state estimation mainly estimates algebraic variables such as voltage amplitude and phase angle through system measurements. Dynamic State Estimation (DSE) refers to the process of estimating the dynamic state associated with synchronous generators. Dynamic state estimation focuses on estimating and tracking the dynamic state of synchronous generators and their associated control units, which is a more comprehensive task. Synchronous generators form the core of the power system, so DSE mainly focuses on the dynamic state of synchronous generators, including speed and rotor angle.
[0003] At present, there have been many studies on dynamic state estimation of power systems. At the beginning, Debs and Larson conducted research on the Kalman filter algorithm in "A Dynamic Estimator for Tracking the State of a Power System [J]. IEEE Transactions on Power Apparatus and Systems, 1970 (7): 1670-1678." The DSE model they used adopted a simpler structure. For example, the Extended Kalman Filter (EKF) is an early nonlinear method used for dynamic state estimation of power systems "Unscented Filtering and Nonlinear Estimation [J]. Proceedings of the IEEE, 2004, 92 (3): 401-422." It combines measurement values, network parameters and state prediction values in a weighted least squares framework to seek the optimal state estimation. Unscented Kalman Filter (UKF) abandons the linearization step in EKF and approximates the true output of nonlinear functions through sampling methods, thereby avoiding linearization errors. Gao et al. studied the accuracy and easier implementation of UKF in estimating the dynamic characteristics of generators in "On-Line Dynamic State Estimation of Power Systems [C] / / North American Power Symposium 2010. 2010: 1-6." and provided corresponding simulation results. With the increase in the complexity of the power grid and the emergence of various load components in the network, the concept of load modeling has become more important. Kent et al. discussed the need to correctly represent electrical loads in stability studies by conducting a series of load-voltage tests on the Southern California Edison system "Kent MH, Schmus WR, McCrackin FA, et al. Dynamic Modeling of Loads in Stability Studies [J]. IEEE Transactions on Power Apparatus and Systems, 1969 (5): 756-763."Schneider et al. showed that "Schneider KP, Fuller JC, Chassin D P. Multi-State Load Models for Distribution System Analysis [J]. IEEE Transactions on Power Systems, 2011, 26 (4): 2425-2433." Multi-state physical load models can be used to appropriately represent the terminal load behavior for distribution system analysis. The widespread use of PMUs provides a large amount of sufficient measurement data, which lays the foundation for the application of machine learning (ML) and artificial intelligence (AI) technology in state estimation. Vedran et al. established a state estimator based on support vector machine (SVM) regression and WLS method in "Support Vector Machine State Estimation [J]. Applied Artificial Intelligence, 2019, 33 (6): 517-53". WLS is used to provide the state estimation values required to create the SVM model and is verified in multiple IEEE test systems. Guanyud et al. proposed a state estimation method based on neural network, combining linear state estimation neural network and unobservable state estimation neural network, which greatly improved the estimation accuracy of unobservable nodes in the network and was verified in the IEEE 118-node test system and Jiangsu power grid in "Neural-Network-Based Power System State Estimation with Extended Observability[J]. Journal of Modern Power Systems and Clean Energy, 2021, 9(5): 1043-1053." In addition, some graph theory-based methods perform well in capturing the topological structure of power systems by integrating information from adjacent nodes.Kundacina et al. proposed a method of using graph neural networks (GNNs) to learn complex bus voltage estimates from PMUs voltage and current measurements. "Graph neural networks on factor graphs for robust, fast, and scalable linear state estimation with PMUs[J]. Sustainable Energy, Grids and Networks, 2023, 34: 101056." They proposed an original implementation of GNNs on the factor graph of the power system to simplify the integration of various types and quantities of measurements on the power system bus and branches. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a temporal convolutional neural network model integrating an attention mechanism, a method, system, device and medium for estimating the dynamic state of a power system. The model, method, system, device and medium can improve the accuracy of dynamic state estimation of the power system.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme:
[0006] On the one hand, the present invention provides a temporal convolutional neural network model integrating an attention mechanism, comprising an input layer, an output layer, a fully connected layer, and several TCN modules, wherein the input layer, each TCN module, the fully connected layer, and the output layer are connected in sequence, and self-attention layers and activation function modules are sequentially arranged between adjacent TCN modules and between the last TCN module and the fully connected layer.
[0007] The temporal convolutional neural network model integrating the attention mechanism described in the present invention is further improved in that:
[0008] Furthermore, the data of the TCN module is four.
[0009] In a second aspect of the present invention, the present invention provides a method for estimating a dynamic state of a power system, comprising:
[0010] Obtain the measurement information of the power system, the voltage amplitude and phase angle of each node of the power system;
[0011] The measurement information of the power system is input into the trained temporal convolutional neural network model with fusion attention mechanism to obtain the dynamic state of the power system.
[0012] The method for estimating the dynamic state of a power system according to the present invention is further improved in that:
[0013] Furthermore, the measurement information of the power system is a graph embedding feature vector [E1, E2, E3, ..., E m ].
[0014] Furthermore, the context matrix C of the self-attention layer is expressed as:
[0015]
[0016] Among them, d K is the dimension of the value matrix, Q is the query matrix, K is the key matrix, and V is the value matrix.
[0017] In a third aspect of the present invention, the present invention provides a power system dynamic state estimation system, comprising:
[0018] An acquisition module, used for acquiring measurement information of the power system;
[0019] The prediction module is used to input the measurement information of the power system into the trained time convolutional neural network model with fusion attention mechanism to obtain the dynamic state of the power system.
[0020] The power system dynamic state estimation system of the present invention is further improved in that:
[0021] Furthermore, the measurement information of the power system is a graph embedding feature vector [E1, E2, E3, ..., E m ].
[0022] Furthermore, the context matrix C of the self-attention layer is expressed as:
[0023]
[0024] Among them, d K is the dimension of the value matrix, Q is the query matrix, K is the key matrix, and V is the value matrix.
[0025] In a fourth aspect of the present invention, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for estimating the dynamic state of a power system when executing the computer program.
[0026] In a fifth aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the power system dynamic state estimation method are implemented.
[0027] The present invention has the following beneficial effects:
[0028] The temporal convolutional neural network model, power system dynamic state estimation method, system, device and medium integrated with attention mechanism described in the present invention introduces temporal convolutional neural network (TCN) in specific operation. TCN is a special deep learning model that can process sequence data through convolution operation, can capture long-term dependencies without specifying a fixed time step, and can automatically learn and extract features, which means that there is no need to manually select and extract features, which greatly simplifies the model construction process. The application of TCN in the dynamic state estimation and prediction of power systems can not only improve the accuracy of prediction, but also simplify the model construction process. The introduction of attention mechanism allows weights to be assigned to input data to achieve focused extraction of information, further improving the accuracy of dynamic estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0030] Figure 1 This is the structural diagram of the self-attention layer;
[0031] Figure 2 This is the architecture diagram of the temporal convolutional neural network that integrates the attention mechanism in the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, not all embodiments, and is not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concepts disclosed in the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0033] The accompanying drawings show schematic diagrams of structures according to embodiments disclosed in the present invention. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0034] Embodiment 1
[0035] The temporal convolutional neural network model integrating the attention mechanism described in the present invention includes an input layer, an output layer, a fully connected layer, and several TCN modules, wherein the input layer, each TCN module, the fully connected layer, and the output layer are connected in sequence, and self-attention layers and activation function modules are sequentially arranged between adjacent TCN modules and between the last TCN module and the fully connected layer. Specifically, the number of data of the TCN module is four.
[0036] Embodiment 2
[0037] refer to Figure 1 The method for estimating the dynamic state of a power system according to the present invention comprises the following steps:
[0038] Temporal Convolutional Network (TCN) is introduced. The TCN is a special deep learning model that processes sequence data through convolution operations, can capture long-term dependencies without specifying a fixed time step, and can automatically learn and extract features, which means that there is no need to manually select and extract features, greatly simplifying the model building process. The application of TCN in dynamic state estimation and prediction of power systems can not only improve the accuracy of predictions, but also simplify the model building process. The introduction of the attention mechanism allows weights to be assigned to input data to achieve focused extraction of information, further improving the accuracy of dynamic estimation.
[0039] Suppose there is an input sequence {x0,...,x T}, hoping to predict the corresponding output {y0,...,y T}, the key constraint of the task is: in order to predict the output y at a certain time t t , the present invention can only use previously observed inputs, namely {x0,...,x T Specifically, a sequence modeling network is a function f:X T+1 →Y T+1 , whose function is to complete the following mapping:
[0040]
[0041] When the causal constraint condition is met, it means that the target variable y t Only with the historical input sequence {x0,...,x T} is associated with any input data from the "future" time {x t+1 ,...,x TIn the context of sequence modeling tasks, the core goal is to find a mapping function f that minimizes the expected error between the model's predicted output and the true result measured by a predetermined loss function.
[0042] The TCN structure is mainly composed of a one-dimensional full convolutional network (1D Fully Convolutional Network, 1D FCN) and causal convolution, namely:
[0043] TCN = 1D FCN + causal convolution
[0044] In order to cope with those task scenarios that are highly dependent on long-term window historical data, the solution of using TCN is to adopt dilated convolution that can achieve exponentially large receptive field based on the work of WaveNet, and introduce residual modules, so that learning within and between layers can modify the identity mapping more efficiently, which greatly speeds up the calculation of the network, and the deeper the network, the more obvious the effect.
[0045] The introduction of the attention mechanism makes it easier to establish long-term dependencies. The attention mechanism enables the model to establish direct dependencies between different time points. The definition of the attention function is a function that maps a query matrix Q, a key matrix K, and a value matrix V to an output. Scaled dot product attention is an attention function, and the calculated context matrix C is:
[0046]
[0047] Among them, d K is the dimension of the value matrix. The key matrix K and the value matrix V usually correspond to the input sequence x, while the matrix Q consists of randomly initialized trainable parameters. The query matrices Q and K T The dot product of represents a measure of pairwise similarity between the query and key matrices, resulting in an attention score. Therefore, the matrix C represents the intrinsic dependencies between sequence representations.
[0048] The time convolutional neural network (TCN-Attention) framework of the fusion attention mechanism adopted in the present invention is as follows: Figure 2 As shown in Figure 1, the framework consists of a deep learning model consisting of four temporal convolutional network modules. The input data is the graph embedding feature vector [E1, E2, E3, ..., E m ], it will pass through each TCN module in turn. Each TCN module is followed by a self-attention layer and an activation function. Finally, the fully connected layer maps the features to the output, that is, the estimated or predicted value of the system state, expressed as
[0049] The advantages of the present invention are that it can process sequence data of different lengths, and due to the characteristics of weight sharing, the number of parameters of the model is relatively small, thereby reducing the risk of overfitting. In addition, the Dropout regularization technology also helps to improve the generalization ability of the model.
[0050] Embodiment 3
[0051] The power system dynamic state estimation system of the present invention comprises:
[0052] An acquisition module, used for acquiring measurement information of the power system;
[0053] The prediction module is used to input the measurement information of the power system into the trained time convolutional neural network model with fusion attention mechanism to obtain the dynamic state of the power system.
[0054] Furthermore, the measurement information of the power system is a graph embedding feature vector [E1, E2, E3, ..., E m ].
[0055] Furthermore, the context matrix C of the self-attention layer is expressed as:
[0056]
[0057] Among them, d K is the dimension of the value matrix, Q is the query matrix, K is the key matrix, and V is the value matrix.
[0058] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0059] Embodiment 4
[0060] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the power system dynamic state estimation method are implemented, for example, including: obtaining measurement information of the power system; inputting the measurement information of the power system into the trained time convolutional neural network model with fusion attention mechanism to obtain the dynamic state of the power system, wherein the time convolutional neural network model with fusion attention mechanism includes an input layer, an output layer, a fully connected layer, and several TCN modules, wherein the input layer, each TCN module, the fully connected layer, and the output layer are sequentially connected, and the adjacent TCN modules and the last TCN module and the fully connected layer are sequentially provided with self-attention layers and activation function modules, and specifically, the data of the TCN module is four. The memory may include a memory, such as a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk memory, etc. The processor, the network interface, and the memory are interconnected through an internal bus, and the internal bus may be an industrial standard architecture bus, a peripheral component interconnection standard bus, an extended industrial standard structure bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory is used to store programs, specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory may include internal memory and non-volatile memory, and provide instructions and data to the processor.
[0061] Embodiment 5
[0062] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the power system dynamic state estimation method are implemented, for example, including: obtaining measurement information of the power system; inputting the measurement information of the power system into the trained time convolutional neural network model with fusion attention mechanism to obtain the dynamic state of the power system, wherein the time convolutional neural network model with fusion attention mechanism includes an input layer, an output layer, a fully connected layer, and several TCN modules, wherein the input layer, each TCN module, the fully connected layer and the output layer are connected in sequence, and the self-attention layer and the activation function module are sequentially arranged between the adjacent TCN modules and between the last TCN module and the fully connected layer, and specifically, the data of the TCN module is four. Specifically, the computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include read-only memory (ROM), hard disk, flash memory, optical disk, disk, etc.
[0063] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0064] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0065] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A temporal convolutional neural network model integrating an attention mechanism, characterized in that: It includes an input layer, an output layer, a fully connected layer, and several TCN modules, wherein the input layer, each TCN module, the fully connected layer, and the output layer are connected in sequence, and a self-attention layer and an activation function module are sequentially arranged between adjacent TCN modules and between the last TCN module and the fully connected layer.
2. The temporal convolutional neural network model integrating the attention mechanism according to claim 1, characterized in that: The data of the TCN module is four.
3. A method for estimating the dynamic state of a power system, characterized in that: include: Obtain measurement information of the power system; The measurement information of the power system is input into the trained temporal convolutional neural network model with the fusion attention mechanism described in any one of claims 1-2 to obtain the dynamic state of the power system.
4. The method for estimating the dynamic state of a power system according to claim 3, characterized in that: The measurement information of the power system is a graph embedding feature vector [E1, E2, E3, ..., E m ].
5. The method for estimating the dynamic state of a power system according to claim 3, characterized in that: The context matrix C of the self-attention layer is expressed as: Among them, d K is the dimension of the value matrix, Q is the query matrix, K is the key matrix, and V is the value matrix.
6. A power system dynamic state estimation system, characterized in that: include: An acquisition module, used for acquiring measurement information of the power system; A prediction module is used to input the measurement information of the power system into the trained temporal convolutional neural network model with the fusion attention mechanism described in any one of claims 1-2 to obtain the dynamic state of the power system.
7. The power system dynamic state estimation system according to claim 6, characterized in that: The measurement information of the power system is a graph embedding feature vector [E1, E2, E3, ..., E m ].
8. The power system dynamic state estimation system according to claim 6, characterized in that: The context matrix C of the self-attention layer is expressed as: Among them, d K is the dimension of the value matrix, Q is the query matrix, K is the key matrix, and V is the value matrix.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for estimating the dynamic state of a power system as described in any one of claims 3 to 5 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for estimating the dynamic state of a power system as described in any one of claims 3 to 5 are implemented.
Citation Information
Patent Citations
TCN multivariate time series prediction method based on parallel space-time attention mechanism
CN112257911A
Fault diagnosis method based on AM-TCN
CN114297921A
Carbon footprint prediction method and system based on improved neural network model, and medium
CN116595878A
Dynamic power feature fusion method and system based on convolutional attention network
CN118861945A
Cited By
Power system state estimation method and device, medium and equipment
CN120049438A