Non-intrusive load decomposition method based on GAT and Transform

By constructing a topology map of the home power grid and using GAT and Transformer models for feature extraction and self-attention calculation, the problems of low accuracy and high noise interference in non-intrusive load decomposition methods are solved, achieving high-precision load decomposition and load characteristic analysis while protecting user privacy.

CN118820904APending Publication Date: 2024-10-22SHENYANG LANHAO NEW ENERGY TECH CO LTD +1

Patent Information

Application Number
CN202411096808.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing non-intrusive load decomposition methods in home power grids suffer from low accuracy and high susceptibility to noise interference. In particular, when there are many loads of similar types and frequent changes in status, the difficulty and error of load decomposition increase.

Method used

A non-intrusive load decomposition method based on GAT and Transformer is adopted. By constructing a topology map of the household power grid, feature extraction is performed using the GAT model and self-attention calculation is performed using the Transformer model to obtain the load type probability distribution of each node, and then load classification and decomposition are performed.

Benefits of technology

It improves the accuracy and robustness of load decomposition, effectively handles multi-classification problems, enhances the accuracy and sensitivity of load type prediction, and protects user privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820904A_ABST
    Figure CN118820904A_ABST
Patent Text Reader

Abstract

The invention provides a non-intrusive load decomposition method based on GAT and Transform, and the method comprises the steps: constructing a topological graph of a household power grid based on household power grid data; carrying out feature extraction on the topological graph of the household power grid based on a GAT model, and obtaining an updated feature vector of each node; carrying out self-attention calculation on the updated feature vector of each node based on a Transform model, and obtaining probability distribution of a load type of each node; based on the probability distribution of the load type of each node, classifying the load of each node, and obtaining the load type and load capacity of each node; and based on the load type and the load capacity of each node, decomposing the total load of the power grid to obtain the load composition and the load characteristics of the power grid. According to the method, the load decomposition precision and robustness can be improved by utilizing the topological structure of the power grid and the relevance between the nodes, and the load composition and the load characteristics of the power grid are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of household power grid load decomposition, and in particular relates to a non-intrusive load decomposition method based on GAT and Transformer. Background Art

[0002] The home grid refers to the power system that connects various electrical appliances in the home. It is an important part of the power grid and the main place for electricity consumption. The load decomposition of the home grid refers to analyzing the types and quantities of various loads in the home grid based on the total load data of the home grid, so as to understand the load composition and load characteristics of the home grid, and provide valuable information for energy saving, optimization and management of the home grid.

[0003] At present, there are two main methods for load decomposition of home power grids, one is invasive and the other is non-invasive. The invasive load decomposition method refers to installing sensors or meters in the home power grid to directly measure the data of various loads. For example, smart sockets, smart meters and other devices can be used to monitor the voltage, current, power and other parameters of each load in real time, so as to identify the type and amount of load. The advantage of this method is high accuracy, and the disadvantages are high cost, troublesome installation, and poor privacy. Users may not be willing to install too many devices in their home power grids, nor are they willing to disclose their load data to third parties.

[0004] The non-intrusive load decomposition method refers to using only the total load data of the home power grid to infer the data of various loads through mathematical models or machine learning algorithms. For example, the non-intrusive load monitoring (NILM) technology can be used to analyze the total active power data of the home power grid to identify the type and amount of loads. The advantages of this method are low cost, easy installation, and good privacy. Users only need to install a sensor at the main entrance of the home power grid to obtain the total load data. There is no need to install sensors on each load, nor is there a need to transmit the load data to a third party. The disadvantages of this method are low accuracy and high noise interference, because the total load data of the home power grid is the superposition of multiple loads, and it is difficult to separate the characteristics of each load from it. Especially when the number of loads is large, the types are similar, and the state changes frequently, the difficulty and error of load decomposition will increase. Summary of the invention

[0005] The purpose of the present invention is to provide a non-intrusive load decomposition method based on GAT and Transformer, which can utilize the topological structure of the power grid and the correlation between nodes to improve the accuracy and robustness of load decomposition and obtain the load composition and load characteristics of the power grid.

[0006] To achieve the above object, the present invention provides a non-intrusive load decomposition method based on GAT and Transformer, comprising:

[0007] Collecting home grid data; wherein the home grid data includes: total active power in a preset time period, active power data of various electrical appliances in the grid, and influencing factor data;

[0008] Based on the home power grid data, construct a topological map of the home power grid;

[0009] Based on the GAT model, the topology of the home power grid is extracted to obtain the updated feature vector of each node;

[0010] Based on the Transformer model, self-attention calculation is performed on the updated feature vector of each node to obtain the probability distribution of the load type of each node;

[0011] Based on the probability distribution of the load type of each node, the load of each node is classified to obtain the load type and load amount of each node;

[0012] Based on the load type and load amount of each node, the total load of the power grid is decomposed to obtain the load composition and load characteristics of the power grid.

[0013] Optionally, collecting home power grid data includes:

[0014] Collect the total active power of the household power grid during a preset time period and the active power data of various electrical appliances in the power grid;

[0015] Collect influencing factor data; wherein the influencing factor data includes: meteorological factors temperature, humidity, irradiance, wind speed, time factors, holidays and time;

[0016] Based on the total active power, active power data of various electrical appliances in the power grid and influencing factor data, construct an initial home power grid data set;

[0017] Filling missing values ​​in the initial household power grid data set;

[0018] The padded initial home power grid data set is normalized to generate final home power grid data.

[0019] Optionally, constructing a topology diagram of a home power grid includes:

[0020] Determine the number and location of nodes and edges in the power grid according to the structure and connection relationship of the power grid;

[0021] According to the active power data and influencing factor data of each node, construct the feature vector of each node;

[0022] According to the connection relationship of each edge, the adjacency matrix of the power grid is constructed.

[0023] Optionally, extracting features from the topology of the home power grid based on the GAT model to obtain updated feature vectors of each node includes:

[0024] Convert the topology of the home power grid into graph-structured data;

[0025] Inputting the data of the graph structure into the GAT model, performing preset processing, and obtaining an output feature vector of each node; wherein the GAT model includes several graph attention layers;

[0026] The output feature vector of the upper graph attention layer is used as the input feature vector of the next graph attention layer, and the preset processing is repeated until the last graph attention layer, so as to obtain the final output feature vector of each node as the updated feature vector of each node.

[0027] Optionally, the data of the graph structure includes: a set of nodes and edges; wherein the nodes represent loads in a home power grid, the edges represent connection relationships in the home power grid, and the characteristic vectors of the nodes and edges are respectively the power and influencing factor data of the nodes, and the adjacency matrix of the edges.

[0028] Optionally, inputting the data of the graph structure into a GAT model and performing a preset process includes:

[0029] Perform linear transformation on the feature vector of each node to obtain the query vector, key vector and value vector;

[0030] Based on the query vector and the key vector, calculating the attention score between each node and its neighbor nodes;

[0031] The attention score is:

[0032]

[0033] Among them, e ij is the attention score, LeakyReLU is the nonlinear activation function, q i and k i are the query vector and key vector of the node and neighbor nodes specific to the GAT graph attention layer, respectively;

[0034] Normalizing the attention score to obtain an attention weight;

[0035] Calculate the output feature vector of each node based on the attention weight and value vector;

[0036] The output feature vector of each node is:

[0037]

[0038] Among them, h i is the output feature vector, α ij is the attention weight, v j is the value vector, N i is the set of neighbor nodes of the node.

[0039] Optionally, performing self-attention calculation on the updated feature vector of each node based on the Transformer model to obtain the probability distribution of the load type of each node includes:

[0040] Input the updated feature vector of each node into the Transformer model to obtain the context-related feature vector of each node;

[0041] The context-related feature vector of each node is input into the decoder, and the output vector of the decoder is used as the probability distribution of the load type of each node.

[0042] Optionally, obtaining a context-related feature vector for each node includes:

[0043] Step 1. Perform self-attention calculation on the updated feature vector of each node to obtain q, k, v; q, k, v are the query vector, key vector, and value vector in the encoder layer specific to the Transformer model respectively;

[0044] Step 2. Based on the query vector and key vector between the node and other nodes, as well as the dimension of the feature vector, calculate the similarity between each node and other nodes, and perform softmax normalization on the similarity to obtain the attention weight;

[0045] Step 3. Calculate the context vector of each node based on the attention weight and value vector;

[0046] The context vector for each node is:

[0047]

[0048] Among them, c i is the context vector, α ij is the attention weight, v j is a value vector;

[0049] Step 4. Perform linear transformation and residual connection on the context vector of each node to obtain the output vector of each node after connection;

[0050] The output vector of each node after connection is:

[0051] zi =LayerNorm(W O c i +x i )

[0052] Among them, z i is the output vector, LayerNorm is the layer normalization function, W O is the learnable weight matrix, c i is the context vector, x i is the feature vector of the node;

[0053] Step 5. Perform feedforward neural network calculation and residual connection on the output vector of each connected node to obtain the output vector of each layer encoder;

[0054] The output vector of each encoder layer is:

[0055] f i =LayerNorm(W F z i +x i )

[0056] Among them, f i is the output vector, LayerNorm is the layer normalization function, W F is the learnable weight matrix, Z is the output vector of the previous step, x i is the feature vector of the node;

[0057] Step 6. Use the output vector of each layer of encoder as the input vector of the next layer of encoder, repeat steps 1-5 until the last layer of encoder, and obtain the final output vector of each node as the context-related feature vector of each node.

[0058] Optionally, obtaining the load type and load amount of each node includes:

[0059] For the probability distribution of the load type of each node, select the load type corresponding to the maximum probability as the load type of the corresponding node;

[0060] For each node's load, the node's load is calculated based on its load type and active power data.

[0061] Optionally, based on the load type and load amount of each node, the total load of the power grid is decomposed to obtain the load composition and load characteristics of the power grid including:

[0062] Group all nodes in the home power grid according to load type and obtain node sets of different load types;

[0063] For each set of nodes of each load type, the sum of the loads is calculated as the total load of the corresponding load type;

[0064] For the total load of the household power grid, calculate the load proportion of each load type as the load composition of the household power grid;

[0065] For the total load of the household power grid, the load characteristics are calculated, including the average value, variance, peak-to-valley difference, and load curve of the load, as the load characteristics of the household power grid.

[0066] The present invention has the following beneficial effects:

[0067] (1) The present invention represents the topological graph of the power grid as graph-structured data and uses the GAT model to weight and update the features of each node, which can effectively capture the topological structure of the power grid and the correlation between nodes, and improve the accuracy and robustness of load decomposition;

[0068] (2) The present invention uses the Transformer model to perform self-attention calculation on the features of each node, which can effectively handle long-distance dependencies and improve the accuracy and sensitivity of load type prediction;

[0069] (3) The present invention classifies the load of each node according to the probability distribution of the load type of each node, which can effectively handle the problem of multiple classifications and improve the flexibility and scalability of load decomposition;

[0070] (4) The present invention decomposes the total load of the power grid according to the load type and load amount of each node, and can effectively obtain the load composition and load characteristics of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0072] Figure 1 A schematic flow chart of a non-intrusive load decomposition method based on GAT and Transformer according to an embodiment of the present invention;

[0073] Figure 2 A schematic diagram of the GAT model structure of an embodiment of the present invention;

[0074] Figure 3 Schematic diagram of the Transformer model structure of an embodiment of the present invention. DETAILED DESCRIPTION

[0075] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0076] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0077] In order to overcome the shortcomings of non-invasive load decomposition methods and improve the accuracy and robustness of load decomposition, this embodiment proposes a non-invasive load decomposition method based on GAT and Transformer. This method uses a graph attention network (GAT) and a transformer (Transformer) model to extract features and predict load types from the topology of a home power grid, thereby decomposing the total load of the home power grid and obtaining the load composition and load characteristics of the home power grid. This method makes full use of the topological structure of the home power grid and the correlation between nodes, improves the accuracy and robustness of load decomposition, and protects the privacy of users.

[0078] like Figure 1 As shown, the non-intrusive load decomposition method based on GAT and Transformer proposed in this embodiment specifically includes the following steps:

[0079] (1) Collecting data such as voltage and current in the power grid and preprocessing them, including the following steps:

[0080] (1.1) For voltage, current and other data, collect the total active power of the power grid over a period of time and the active power data of various electrical appliances in the power grid. For influencing factor data, obtain meteorological factors such as temperature, humidity, irradiance and wind speed, as well as time factors such as holidays and time.

[0081] (1.2) Fill in the missing values ​​of the acquired power and influencing factor data sets to form a complete data set.

[0082] (1.3) Normalize the complete data set. The normalization formula is:

[0083]

[0084] Among them, x' is the normalized data, x is the original data, and x min and x max are the minimum and maximum values ​​of the original data respectively.

[0085] (2) Constructing a topological graph of the home power grid, representing the nodes and edges in the grid as feature vectors and adjacency matrices respectively, including the following steps:

[0086] (2.1) According to the structure and connection relationship of the power grid, determine the number and location of nodes and edges in the power grid. For example, if there are 10 nodes and 15 edges in the power grid, construct a topological graph with 10 nodes and 15 edges.

[0087] (2.2) According to the power and influencing factor data of each node, construct the feature vector of each node. For example, if the power data of a node is 100W, and the influencing factor data is {temperature: 25℃, humidity: 60%, irradiance: 800W / m^2, wind speed: 5m / s, holiday: no, time: 12:00}, then the feature vector of the node is [100, 25, 60, 800, 5, 0, 12], where 0 represents no holiday and 1 represents yes holiday, and the time is represented by 24-hour system.

[0088] (2.3) According to the connection relationship of each edge, the adjacency matrix of the power grid is constructed. For example, if the first edge in the power grid connects the first node and the second node, then the elements in the first row and second column and the second row and first column of the adjacency matrix are 1, and the other elements are 0, indicating that there is a connection between the two nodes, otherwise there is no connection.

[0089] (3) Use the GAT model to extract features from the topology of the power grid and obtain the attention weight and updated feature vector of each node, including the following steps:

[0090] (3.1) The topological graph of the power grid is converted into graph-structured data, that is, a set of nodes and edges, where the nodes represent the loads in the power grid, the edges represent the connection relationships in the power grid, and the characteristic vectors of the nodes and edges are the power and influencing factor data of the nodes and the adjacency matrix of the edges, respectively.

[0091] (3.2) The graph structured data is input into the GAT model. The GAT model consists of multiple layers of graph attention layers, such as Figure 2 As shown, each graph attention layer includes the following steps:

[0092] (3.2.1) Perform a linear transformation on the feature vector of each node to obtain the query vector, key vector and value vector, i.e., q i =W q x i , k i =W k x i , v i =W v x i , where W q , W k ,W v is the learnable weight matrix, x i is the feature vector of the node.

[0093] (3.2.2) Calculate the attention score between each node and its neighbor nodes, that is where e ij is the attention score, LeakyReLU is the nonlinear activation function, q i and k i are the query vector and key vector of the node and neighbor nodes respectively.

[0094] (3.2.3) Normalize the attention score to get the attention weight, i.e., α ij =softmax j (e ij ), where α ij is the attention weight, softmax is the normalization function, e ij is the attention score.

[0095] (3.2.4) According to the attention weight and value vector, the output feature vector of each node is calculated, that is, where h i is the output feature vector, α ij is the attention weight, v j is the value vector, N i is the set of neighbor nodes of the node.

[0096] (3.3) Take the output feature vector of each graph attention layer as the input feature vector of the next graph attention layer, repeat step (3.2) until the last graph attention layer, and obtain the final output feature vector of each node as the updated feature vector of each node.

[0097] In the above step (3), k i ,q i ,v i It is obtained by linearly transforming the feature vector of each node. These vectors are the input of the Graph Attention Layer in the GAT model, which is used to calculate the attention scores between nodes and update the feature vector of the node accordingly. i ,q i ,v i are specific to the GAT graph attention layer, and they are computed to aggregate information between nodes within this layer.

[0098] (4) Use the Transformer model to perform self-attention calculation on the feature vector of each node to obtain the probability distribution of the load type of each node, including the following steps:

[0099] (4.1) Input the feature vector of each node into the Transformer model, such as Figure 3 As shown, the Transformer model consists of multiple layers of encoders and a decoder. Each layer of the encoder includes the following steps:

[0100] (4.1.1) Perform self-attention calculation on the feature vector of each node, that is, q = W Q x, k = W K x,v=W V x, where W Q , W K ,W V is a learnable weight matrix, x is the feature vector of the node, q, k, v are the query vector, key vector and value vector respectively. q, k, v are used in the encoder layer of the Transformer model to perform self-attention calculation.

[0101] (4.1.2) Calculate the similarity between each node and other nodes, that is, where s ij is the similarity, q i and k j are the query vector and key vector of node i and node j respectively, and d is the dimension of the feature vector. Then the similarity is normalized by softmax to obtain the attention weight, that is, where α ij is the attention weight and n is the number of nodes.

[0102] (4.1.3) According to the attention weight and value vector, the context vector of each node is calculated, that is, where c i is the context vector, α ij is the attention weight, v j is a value vector.

[0103] (4.1.4) Perform linear transformation and residual connection on the context vector of each node, that is, zi = LayerNorm (W O ci+xi), where z i is the output vector, LayerNorm is the layer normalization function, W O is the learnable weight matrix, c i is the context vector, x i is the feature vector of the node.

[0104] (4.1.5) The output vector of each node is subjected to feedforward neural network calculation and residual connection, that is, fi = LayerNorm (W F zi+xi), where f iis the output vector, LayerNorm is the layer normalization function, W F is the learnable weight matrix, Z is the output vector of the previous step, x i is the characteristic vector of the node. This step is to increase the nonlinearity and expression ability of the model and improve the effect of load type prediction.

[0105] (4.1.6) Use the output vector of each layer of encoder as the input vector of the next layer of encoder, repeat steps (4.1.1)-(4.1.5) until the last layer of encoder, and obtain the final output vector of each node as the context-related feature vector of each node.

[0106] (4.2) The context-dependent feature vector of each node is input into the decoder, which consists of a fully connected layer and a softmax layer, including the following steps:

[0107] (4.2.1) Perform a linear transformation on the context-related feature vector of each node to obtain a vector of dimension N, where N is the number of load types. For example, if the load types are air conditioner, refrigerator, and TV, then N is 3 and the vector is [[y1, y2, y3], where yi is the score of the node belonging to the i-th load type.

[0108] (4.2.2) Perform softmax calculation on the score vector of each node to obtain a vector of dimension N, where N is the number of load types. For example, if the load types are air conditioner, refrigerator, and TV, then N is 3 and the vector is [p1, p2, p3], where pi is the probability that the node belongs to the i-th load type, and p1+p2+p3=1.

[0109] (4.3) The output vector of the decoder is used as the probability distribution of the load type of each node. For example, if the output vector of a node is [0.1, 0.3, 0.6], the probability distribution of the load type of the node is {air conditioner: 0.1, refrigerator: 0.3, TV: 0.6}.

[0110] (5) According to the probability distribution of the load type of each node, the load of each node is classified to obtain the load type and load amount of each node, including the following steps:

[0111] (5.1) For the probability distribution of the load type of each node, the load type corresponding to the maximum probability is selected as the load type of the node. For example, if the probability distribution of the load type of a node is {air conditioner: 0.2, refrigerator: 0.3, TV: 0.5}, then the load type of the node is TV.

[0112] (5.2) For each node’s load, calculate its load based on its load type and active power data. For example, if a node’s load type is air conditioning and its active power is 1000W, then its load is 1000W / 0.8=1250VA, where 0.8 is the power factor of the air conditioner, which is a known constant.

[0113] (6) According to the load type and load amount of each node, the total load of the power grid is decomposed to obtain the load composition and load characteristics of the power grid, including the following steps:

[0114] (6.1) All nodes in the power grid are grouped according to their load types to obtain node sets of different load types. For example, all nodes with air conditioning load type are put together to form an air conditioning node set, and so on.

[0115] (6.2) For each load type node set, calculate the sum of their loads as the total load of the load type. For example, if there are three nodes in the air-conditioning node set, and their loads are 1250VA, 1500VA, and 1750VA respectively, then the total load of the air-conditioning load is 1250+1500+1750=4500VA.

[0116] (6.3) For the total load of the power grid, calculate the load proportion of each load type as the load composition of the power grid. For example, if the total load of the power grid is 10000VA, the total load of the air-conditioning load is 4500VA, the total load of the refrigerator load is 3000VA, and the total load of the TV load is 2500VA, then the load composition of the power grid is {air-conditioning: 0.45, refrigerator: 0.3, TV: 0.25}.

[0117] (6.4) For the total load of the power grid, calculate its load characteristics, including the load mean, variance, peak-to-valley difference, load curve, etc., as the load characteristics of the power grid. For example, if the data of the total load of the power grid changing over time is {10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000} VA, then the load characteristics of the power grid are {average value: 5500VA, variance: 825000VA^2, peak-to-valley difference: 9000VA, load curve: downward trend}.

[0118] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A non-intrusive load decomposition method based on GAT and Transformer, characterized in that: include: Collect home power grid data; The household power grid data includes: total active power in a preset time period, active power data of various electrical appliances in the power grid, and influencing factor data; Based on the home power grid data, construct a topological map of the home power grid; Based on the GAT model, the topology of the home power grid is extracted to obtain the updated feature vector of each node; Based on the Transformer model, self-attention calculation is performed on the updated feature vector of each node to obtain the probability distribution of the load type of each node; Based on the probability distribution of the load type of each node, the load of each node is classified to obtain the load type and load amount of each node; Based on the load type and load amount of each node, the total load of the power grid is decomposed to obtain the load composition and load characteristics of the power grid.

2. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1 is characterized in that: Collecting home power grid data includes: Collect the total active power of the household power grid during a preset time period and the active power data of various electrical appliances in the power grid; Collect influencing factor data; wherein the influencing factor data includes: meteorological factors temperature, humidity, irradiance, wind speed, time factors, holidays and time; Based on the total active power, active power data of various electrical appliances in the power grid and influencing factor data, construct an initial home power grid data set; Filling missing values ​​in the initial household power grid data set; The padded initial home power grid data set is normalized to generate final home power grid data.

3. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1 is characterized in that: The topology diagram for building a home power grid includes: Determine the number and location of nodes and edges in the power grid according to the structure and connection relationship of the power grid; According to the active power data and influencing factor data of each node, construct the feature vector of each node; According to the connection relationship of each edge, the adjacency matrix of the power grid is constructed.

4. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1, characterized in that: Based on the GAT model, the topology of the home power grid is extracted to obtain the updated feature vector of each node, including: Convert the topology of the home power grid into graph-structured data; Inputting the data of the graph structure into the GAT model, performing preset processing, and obtaining an output feature vector of each node; wherein the GAT model includes several graph attention layers; The output feature vector of the upper graph attention layer is used as the input feature vector of the next graph attention layer, and the preset processing is repeated until the last graph attention layer, so as to obtain the final output feature vector of each node as the updated feature vector of each node.

5. The non-intrusive load decomposition method based on GAT and Transformer according to claim 4 is characterized in that: The data of the graph structure includes: a set of nodes and edges; wherein the nodes represent the loads in the home power grid, the edges represent the connection relationships in the home power grid, and the characteristic vectors of the nodes and edges are the power and influencing factor data of the nodes, and the adjacency matrix of the edges.

6. The non-intrusive load decomposition method based on GAT and Transformer according to claim 5, characterized in that: Inputting the data of the graph structure into the GAT model and performing preset processing includes: Perform linear transformation on the feature vector of each node to obtain the query vector, key vector and value vector; Based on the query vector and the key vector, calculating the attention score between each node and its neighbor nodes; The attention score is: Among them, e ij is the attention score, LeakyReLU is the nonlinear activation function, q i and k i are the query vector and key vector of the node and neighbor nodes specific to the GAT graph attention layer, respectively; Normalizing the attention score to obtain an attention weight; Calculate the output feature vector of each node based on the attention weight and value vector; The output feature vector of each node is: Among them, h i is the output feature vector, α ij is the attention weight, v j is the value vector, N i is the set of neighbor nodes of the node.

7. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1, characterized in that: Based on the Transformer model, the updated feature vector of each node is self-attention calculated to obtain the probability distribution of the load type of each node, including: Input the updated feature vector of each node into the Transformer model to obtain the context-related feature vector of each node; The context-related feature vector of each node is input into the decoder, and the output vector of the decoder is used as the probability distribution of the load type of each node.

8. The non-intrusive load decomposition method based on GAT and Transformer according to claim 7, characterized in that: Obtaining the context-dependent feature vector for each node involves: Step 1. Perform self-attention calculation on the updated feature vector of each node to obtain q, k, v; q, k, v are the query vector, key vector, and value vector in the encoder layer specific to the Transformer model respectively; Step 2. Based on the query vector and key vector between the node and other nodes, as well as the dimension of the feature vector, calculate the similarity between each node and other nodes, and perform softmax normalization on the similarity to obtain the attention weight; Step 3. Calculate the context vector of each node based on the attention weight and value vector; The context vector for each node is: Among them, c i is the context vector, α ij is the attention weight, v j is a value vector; Step 4. Perform linear transformation and residual connection on the context vector of each node to obtain the output vector of each node after connection; The output vector of each node after connection is: z i =LayerNorm(W O c i +x i ) Among them, z i is the output vector, LayerNorm is the layer normalization function, W O is the learnable weight matrix, c i is the context vector, x i is the feature vector of the node; Step 5. Perform feedforward neural network calculation and residual connection on the output vector of each connected node to obtain the output vector of each layer encoder; The output vector of each encoder layer is: f i =LayerNorm(W F z i +x i ) Among them, f i is the output vector, LayerNorm is the layer normalization function, W F is the learnable weight matrix, Z is the output vector of the previous step, x i is the feature vector of the node; Step 6. Use the output vector of each layer of encoder as the input vector of the next layer of encoder, repeat steps 1-5 until the last layer of encoder, and obtain the final output vector of each node as the context-related feature vector of each node.

9. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1, characterized in that: Obtaining the load type and load amount of each node includes: For the probability distribution of the load type of each node, select the load type corresponding to the maximum probability as the load type of the corresponding node; For each node's load, the node's load is calculated based on its load type and active power data.

10. The non-intrusive load decomposition method based on GAT and Transformer according to claim 1, characterized in that: Based on the load type and load amount of each node, the total load of the power grid is decomposed to obtain the load composition and load characteristics of the power grid, including: Group all nodes in the home power grid according to load type and obtain node sets of different load types; For each set of nodes of each load type, the sum of the loads is calculated as the total load of the corresponding load type; For the total load of the household power grid, calculate the load proportion of each load type as the load composition of the household power grid; For the total load of the household power grid, the load characteristics are calculated, including the average value, variance, peak-to-valley difference, and load curve of the load, as the load characteristics of the household power grid.

Citation Information

Patent Citations

  • Transformer-based non-intrusive load decomposition method

    CN113434493A

  • Non-intrusive load decomposition method based on mathematical morphology and improved Transform

    CN115905857A

  • Two-stage non-intrusive load decomposition method based on TCN and Informer

    CN116599036A

  • Water quality prediction method and system based on GAT-Transform time sequence model

    CN117273203A

  • Power consumption prediction system and method based on variational mode decomposition and graph attention

    CN117937471A

Cited By

  • Gene expression deletion filling method and system based on deep learning

    CN120183513A