Methods and systems for locating harmonic sources
By extracting the spatiotemporal features of harmonic data using a spatiotemporal graph convolutional neural network, the problems of large data volume and slow speed in existing technologies are solved, enabling efficient and accurate location and quantity of harmonic sources in complex power distribution networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2023-05-18
- Publication Date
- 2026-05-26
AI Technical Summary
Existing harmonic source location methods require large amounts of data and operate slowly in multi-harmonic source distribution networks, and cannot effectively mine the spatiotemporal correlation of harmonic information, resulting in misjudgment and low operating efficiency.
A spatiotemporal graph convolutional neural network is used to obtain voltage and current data of the power distribution network topology. Features are extracted using graph convolution and temporal convolution, and combined with deep learning algorithms to locate the location and number of harmonic sources.
It effectively uncovers the hidden relationships between harmonic data in time and space, reduces the amount of data required, and improves the positioning speed and accuracy, making it suitable for harmonic control in complex power distribution networks.
Smart Images

Figure CN116826705B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network technology, and in particular to a method and system for locating harmonic sources. Background Technology
[0002] With the widespread integration of distributed renewable energy sources, the uncertainty of power distribution network disturbances has increased and the coupling characteristics of multiple harmonic sources have been enhanced, which seriously affects power quality. Therefore, accurate harmonic source location is needed to provide support for power quality management.
[0003] Currently, harmonic source localization methods are mainly divided into qualitative and quantitative approaches. Qualitative methods are only applicable to single-harmonic-source systems. These methods calculate the values of harmonic active power, harmonic reactive power, and harmonic distortion power based on equivalent circuits to determine whether the harmonic source is located on the power supply side or the user side. While these methods are simple in principle, the probability of misjudgment increases exponentially when the voltage-current phase angle difference in the distribution network exceeds 180°, making them unsuitable for complex distribution networks prone to multiple harmonic sources. Quantitative methods primarily rely on harmonic state estimation. The basic idea is to first determine the nodes where harmonic measurement devices are configured, making the system as observable as possible. Then, the voltage and current information of the nodes are synchronously collected through the measurement devices. Relevant algorithms, such as least squares, sparse representation, and independent component analysis, are then used to estimate the harmonic state, calculate the harmonic current, and thus locate the harmonic source. These methods require time-domain information such as harmonic amplitude and phase angle, necessitating extremely high signal synchronization and a large amount of memory space, which is often difficult to achieve in practice. Furthermore, the large amount of time-domain data results in slow processing speed, therefore, this method cannot be applied to most practical engineering projects.
[0004] Furthermore, the above methods all ignore the complex spatiotemporal correlations between electrical nodes in the distribution network and fail to uncover the spatiotemporal correlations of harmonic information. Summary of the Invention
[0005] The purpose of embodiments of the present invention is to provide a method and system for locating harmonic sources, which solves the problem that existing methods require a large amount of data, resulting in large memory requirements and slow running speed.
[0006] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for locating harmonic sources, comprising: acquiring a topology diagram of a power distribution network, and acquiring at least one node in the topology diagram of the power distribution network; acquiring the voltage and current values of each node of the at least one node in the topology diagram of the power distribution network within a preset time period; and acquiring, based on the voltage and current values of each node of the at least one node in the topology diagram of the power distribution network within the preset time period, the fundamental voltage average value, the h-th harmonic voltage average value, the fundamental current average value, the h-th harmonic current average value, the fundamental apparent power, the h-th harmonic active power, the harmonic voltage distortion rate, and the harmonic current distortion rate. Furthermore, the average fundamental voltage, average h-th harmonic voltage, average fundamental current, average h-th harmonic current, apparent fundamental power, active power of the h-th harmonic, harmonic voltage distortion rate, and harmonic current distortion rate of each node in at least one node of the distribution network topology diagram within a preset time period are used as input data for the harmonic source location model. Based on the harmonic source location model, the node where the h-th harmonic source is located is determined from at least one node in the distribution network topology diagram.
[0007] In some embodiments, the method further includes: acquiring historical voltage and current data for each node of at least one node in the distribution network topology diagram, as well as historical data for nodes with harmonic sources; and acquiring historical data for the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate for each node of at least one node in the distribution network topology diagram based on the historical voltage and current data of each node of at least one node in the distribution network topology diagram; using the historical data for the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node of at least one node in the distribution network topology diagram as the input dataset, and using the historical data for nodes with harmonic sources as the output dataset. A training set for the harmonic source localization model is then created based on the input and output datasets. Furthermore, based on the training set of the harmonic source localization model, a neural network algorithm is used to obtain the harmonic source localization model.
[0008] In some embodiments, obtaining a harmonic source localization model using a neural network algorithm based on the training set of the harmonic source localization model includes: performing a first time feature extraction on the input data in the training set of the harmonic source localization model to obtain time feature data; performing graph convolution feature extraction on the time feature data to obtain spatial feature data; performing ReLU activation and a second time feature extraction on the spatial feature data to obtain predicted values for harmonic source localization; and obtaining the harmonic source localization model based on the predicted values for harmonic source localization, the output data in the training set of the harmonic source localization model, and a loss function.
[0009] In some embodiments, a first time feature extraction is performed on the input data in the training set of the harmonic source localization model to obtain time feature data, including: using the formula The first time feature extraction is performed, where, The input data in the training set for the harmonic source localization model is Γ, where Γ is the convolution kernel for temporal convolution. Here are the parameters of the harmonic source localization model, and σ is the sigmoid activation function. For the Hadamarda product, H (l) This is time-related data.
[0010] In some embodiments, graph convolution feature extraction is performed on temporal feature data to obtain spatial feature data, including: using the formula Graph convolution feature extraction is performed, where W is the weight corresponding to each feature, W has a size of l*(l+1), σ represents the sigmoid activation function, A is the topological adjacency matrix of the distribution network graph, D is the degree matrix, and I is the identity matrix; H (l+1) It is spatial feature data, H (l) It is time-related data.
[0011] Secondly, embodiments of the present invention provide a harmonic source location system, including a node acquisition module, a data acquisition module, and a harmonic source location result output module. The node acquisition module is configured to: acquire a topology diagram of a power distribution network and acquire at least one node in the topology diagram. The data acquisition module is configured to: acquire the voltage and current values of each node of the at least one node in the topology diagram of the power distribution network within a preset time period, and based on the voltage and current values of each node of the at least one node in the topology diagram of the power distribution network within the preset time period, acquire the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node of the at least one node in the topology diagram of the power distribution network within the preset time period. The harmonic source location result output module is configured to take the average fundamental voltage, average h-th harmonic voltage, average fundamental current, average h-th harmonic current, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in at least one node of the distribution network topology diagram within a preset time period as input data for the harmonic source location model. Based on the harmonic source location model, the node where the h-th harmonic source is located is determined from at least one node in the distribution network topology diagram.
[0012] In some embodiments, the system further includes a training set acquisition module for harmonic source localization and a model acquisition module for harmonic source localization. The data acquisition module is further configured to: acquire historical voltage and current data for each node of at least one node in the distribution network topology diagram, as well as historical data for nodes containing harmonic sources; and, based on the historical voltage and current data of each node in the distribution network topology diagram, acquire historical data for the fundamental voltage average value, the h-th harmonic voltage average value, the fundamental current average value, the h-th harmonic current average value, the fundamental apparent power, the h-th harmonic active power, the harmonic voltage distortion rate, and the harmonic current distortion rate for each node in the distribution network topology diagram. The training set acquisition module for harmonic source localization is configured as follows: It takes historical data of the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate for each node in at least one node of the distribution network topology diagram as the input dataset, and the historical data of nodes containing harmonic sources as the output dataset; and constructs a training set for the harmonic source localization model based on the input and output datasets. The harmonic source localization model acquisition module is configured to use a neural network algorithm to acquire the harmonic source localization model based on the training set of the harmonic source localization model.
[0013] In some embodiments, the harmonic source localization model acquisition module includes a temporal feature extraction unit, a spatial feature extraction unit, a prediction value acquisition unit, and a harmonic source localization model acquisition unit. The temporal feature extraction unit is configured to perform a first temporal feature extraction on the input data in the training set of the harmonic source localization model to obtain temporal feature data. The spatial feature extraction unit is configured to perform graph convolution feature extraction on the temporal feature data to obtain spatial feature data. The prediction value acquisition unit is configured to perform ReLU activation and a second temporal feature extraction on the spatial feature data to obtain the predicted value for harmonic source localization. The harmonic source localization model acquisition unit is configured to acquire the harmonic source localization model based on the predicted value for harmonic source localization, the output data in the training set of the harmonic source localization model, and the loss function.
[0014] In some embodiments, the time feature extraction unit is configured to: use the formula The first time feature extraction is performed, where, The input data in the training set for the harmonic source localization model is Γ, where Γ is the convolution kernel for temporal convolution. Here are the parameters of the harmonic source localization model, and σ is the sigmoid activation function. For the Hadamarda product, H (l) This is time-related data.
[0015] In some embodiments, the spatial feature extraction unit is configured to: use the formula Graph convolution feature extraction is performed, where W is the weight corresponding to each feature, W has a size of l*(l+1), σ represents the sigmoid activation function, A is the topological adjacency matrix of the distribution network graph, D is the degree matrix, and I is the identity matrix; H (l+1) It is spatial feature data, H (l) It is time-related data.
[0016] The beneficial effects of this invention include:
[0017] 1. The harmonic source localization method and system provided by this invention can uncover the hidden relationships between harmonic data in time and space in the power distribution network through spatiotemporal graph convolution, overcoming the difficulty of traditional harmonic state estimation methods that require the establishment of mathematical equations such as measurement matrices to estimate harmonic currents.
[0018] 2. The harmonic source localization method and system provided by this invention uses deep learning to realize harmonic source localization using a spatiotemporal graph convolution module. It avoids errors caused by harmonic impedance changes under changing power distribution network conditions and can still achieve accurate localization.
[0019] 3. The harmonic source location method and system provided by this invention use voltage and current waveform values that are not synchronously sampled for harmonic source location, but rather average steady-state values of voltage and current that can be provided in actual engineering. This is more suitable for engineering applications, requires less data, and can quickly locate the location of the harmonic source, which is beneficial for harmonic mitigation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of this invention, the accompanying drawings used in some embodiments of this invention will be briefly described below. Obviously, the drawings described below are only drawings of some embodiments of this invention, and those skilled in the art can obtain other drawings based on these drawings. Furthermore, the drawings described below can be regarded as schematic diagrams and are not intended to limit the actual size of the product, the actual flow of the method, the actual timing of the signals, etc. involved in the embodiments of this invention.
[0021] Figure 1 This is a flowchart of a method for locating a harmonic source according to some embodiments;
[0022] Figure 2 This is a flowchart of another method for locating harmonic sources according to some embodiments;
[0023] Figure 3 This is a diagram illustrating the internal architecture of a spatiotemporal convolutional block according to some embodiments;
[0024] Figure 4 This is a flowchart of another method for locating harmonic sources according to some embodiments;
[0025] Figure 5 This is a diagram illustrating the internal architecture of a temporally gated convolution according to some embodiments;
[0026] Figure 6 This is a model architecture diagram of a spatiotemporal graph convolutional neural network according to some embodiments;
[0027] Figure 7 This is a topology diagram of an IEEE 14-node system according to some embodiments;
[0028] Figure 8 Here is a flowchart of a harmonic source localization method according to a specific example of some embodiments;
[0029] Figure 9 This is a structural diagram of a harmonic source localization system according to some embodiments;
[0030] Figure 10 This is a structural diagram of another harmonic source localization system according to some embodiments;
[0031] Figure 11 This is a structural diagram of another harmonic source localization system according to some embodiments. Detailed Implementation
[0032] The technical solutions in some embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art are within the scope of protection of the present invention.
[0033] This invention provides a method for locating harmonic sources. First, steady-state spatiotemporal features such as fundamental voltage and current amplitudes, harmonic voltage and current amplitudes, harmonic active power, and fundamental apparent power are selected as the input feature set. Next, a graph convolutional neural network is used to learn the spatial correlation between electrical nodes. Finally, a spatiotemporal graph convolutional neural network is used to mine the hidden spatiotemporal feature information between nodes to locate the position and number of harmonic sources.
[0034] In some embodiments, the method for locating harmonic sources is as follows: Figure 1 As shown, it includes steps 101 to 103.
[0035] Step 101: Obtain the topology diagram of the distribution network and obtain at least one node in the topology diagram of the distribution network.
[0036] Understandably, for harmonic source localization, the distribution network is essentially a graph structure, and the electrical quantities at each node can be regarded as signals on the graph. Therefore, before performing harmonic source localization, it is necessary to obtain the topology diagram of the distribution network and at least one node in the topology diagram of the distribution network.
[0037] Step 102: Obtain the voltage and current values of each node of at least one node in the topology diagram of the distribution network within a preset time period, and obtain the input data of the harmonic source location model.
[0038] Understandably, the method for obtaining the input data of the harmonic source location model can be as follows: based on the voltage and current values of each node of at least one node in the distribution network topology diagram within a preset time period, obtain the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in the distribution network topology diagram within a preset time period.
[0039] Understandably, when using spatiotemporal graph convolutional networks for harmonic source localization, the first step is to determine the input and output features based on the measurement data available in actual engineering practice.
[0040] The input feature selection principle is as follows: Assume there are M nodes in the distribution network, and all nodes are observable. The measuring device can record the voltage and current values of each node within a time period T. After internal processing by the measuring device, the stored data is the average fundamental voltage and current V of each node. 1 and I 1 The average value of the h-th harmonic voltage and current is V. h and I h Assuming the distribution network is operating stably during this time period, the phase angle δ between the h-th harmonic voltage and current is a constant and measurable. When a harmonic is injected at a node, the harmonic current and voltage at that node will inevitably change, and consequently, the harmonic active power will also change, generally increasing. To extract more useful information from the data, the above data is preprocessed to calculate the harmonic voltage distortion rate (THD). V Harmonic current distortion rate (THD) I Harmonic active power P h Because the power of each node differs, even if a node has a harmonic source, its apparent power is small, resulting in a small harmonic active power. Therefore, the fundamental apparent power S1 and the harmonic active power P are selected. h As a reference, this paper selects the above 8 steady-state values as the input feature set X = [x1, x2, x3, ..., x8] for the time period T, as shown in Table 1.
[0041] Table 1 Input Feature Set for Harmonic Source Localization
[0042] Input feature number Input features <![CDATA[x1]]> Average fundamental voltage over time period T <![CDATA[x2]]> The average value of the hth harmonic voltage within time period T <![CDATA[x3]]> Average fundamental current within time period T <![CDATA[x4]]> The average value of the hth harmonic current within time period T <![CDATA[x5]]> Fundamental apparent power x h-th harmonic active power <![CDATA[x7]]> Harmonic voltage distortion rate <![CDATA[x8]]> Harmonic current distortion rate
[0043] Step 103: Input the input data of the harmonic source location model into the harmonic source location model, and determine the node where the h-th harmonic source is located from at least one node in the topology diagram of the distribution network.
[0044] Understandably, step 103 can be implemented as follows: the average fundamental voltage, average h-th harmonic voltage, average fundamental current, average h-th harmonic current, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in at least one node of the distribution network topology diagram within a preset time period are used as input data for the harmonic source location model. Based on the harmonic source location model, the node where the h-th harmonic source is located is determined from at least one node in the distribution network topology diagram.
[0045] Based on the input features shown in Table 1, the output feature selection principle is as follows: the output target matrix TARGET is set to the position of the node where the harmonic source is located, and its size is M*M. If a node has a harmonic source, the position of the matrix TARGET is marked as 1; otherwise, it is marked as 0.
[0046] In some embodiments, such as Figure 2 As shown, it also includes steps 201 to 203.
[0047] Step 201: Obtain the historical voltage and current data of each node in at least one node of the distribution network topology diagram, as well as the historical data of nodes with harmonic sources, and obtain the historical data of the input data for the harmonic source location model based on the historical voltage and current data of each node in at least one node of the distribution network topology diagram.
[0048] Understandably, the historical data of the input data for the harmonic source location model includes historical data of the fundamental voltage average value of each node in at least one node of the distribution network topology diagram, historical data of the h-th harmonic voltage average value, historical data of the fundamental current average value, historical data of the h-th harmonic current average value, historical data of the fundamental apparent power, historical data of the h-th harmonic active power, historical data of the harmonic voltage distortion rate, and historical data of the harmonic current distortion rate.
[0049] Step 202: Create a training set for the harmonic source localization model based on the input and output datasets.
[0050] Understandably, the historical data of the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in at least one node of the distribution network topology diagram can be used as the input dataset, and the historical data of the nodes with harmonic sources can be used as the output dataset.
[0051] Step 203: Based on the training set of the harmonic source localization model, use a neural network algorithm to obtain the harmonic source localization model.
[0052] To uncover deeper features in harmonic spatiotemporal data, spatiotemporal convolutional blocks (ST-Conv Blocks) are used to jointly process graph-structured time series. For example... Figure 3 As shown, the spatial layer in the middle of the spatiotemporal convolutional block connects the two temporal layers, enabling fast spatial state propagation from graph convolution to temporal convolution. The middle graph convolutional layer performs down-scaling and up-scaling on the channels, achieving scale compression and feature compression. The overall formula for the spatiotemporal convolutional block is shown in Equation (1).
[0053]
[0054] In equation (1), These represent the convolution kernels on two temporal convolutions, Θ l Denotes the convolution kernel on graph convolution, v l+1 Indicates the output feature, ν l This represents the input features.
[0055] According to equation (1), the input harmonic feature data is first convolved in the time dimension, then convolved in the graph. The output of the graph convolution is then processed by a ReLU activation function and then convolved in the time dimension once more.
[0056] In some embodiments, such as Figure 4 As shown, the implementation method of step 203 may include steps 2031 to 2034.
[0057] Step 2031: Perform the first time feature extraction on the input data in the training set of the harmonic source localization model to obtain time feature data.
[0058] Understandably, electricity consumption follows a temporal pattern. Due to varying electricity consumption at different times of the day, the harmonic voltage and current detected at different points also differ. Therefore, it is necessary to extract the temporal characteristics of harmonics. For example... Figure 5 As shown, the temporal convolutional layer for extracting temporal features consists of a layer with a width of K. tThe kernel consists of a 1-D causal convolution and a GLU, where GLU stands for Gated Linear Unit. The formula for calculating temporal convolution is shown in Equation (2).
[0059]
[0060] In equation (2), Let Γ represent the input features, and let Γ denote the convolution kernel on the temporal convolution. These are the parameters of the harmonic source localization model, i.e., the parameters that need to be learned. σ is the sigmoid activation function. It is the Hadamard product, which represents the product of corresponding elements. H (l) The hidden features are the data extracted through a temporal convolutional layer, i.e., temporal feature data.
[0061] Step 2032: Extract spatial feature data by performing graph convolution on the temporal feature data.
[0062] Understandably, the spatial topology of power systems does not follow Euclidean geometry, making it impossible to extract spatial features using traditional convolutional neural networks (CNNs). Graph Convolutional Networks (GCNs) ingeniously employ a technique to extract graph convolutional features from the frequency domain.
[0063] For the location of harmonic sources, the mathematical representation of the Laplace matrix L of the distribution network topology is as shown in equation (3).
[0064] L = DA (3)
[0065] In the formula, A is the topological adjacency matrix of the distribution network topology, and D is the degree matrix, which is a diagonal matrix.
[0066] The Laplace matrix is canonically normalized to
[0067]
[0068] In equation (4), I is the identity matrix, U is the Fourier basis of the power distribution network topology, and is a matrix composed of eigenvectors (the eigenvectors intersect each other). Λ is a diagonal matrix, and the corresponding elements are the eigenvalues of the matrix.
[0069] Taking the power distribution network diagram at time T as an example, graph convolution is performed. For the input feature set X = [x1, x2, x3, ..., x8] of each node in the graph, the graph convolution operation is represented by *G. However, directly performing eigenvalue decomposition on the graph Laplacian matrix has extremely high time and space complexity. Therefore, a polynomial approximation function is used to solve this problem, and the formula for calculating graph convolution can be expressed as equation (5).
[0070]
[0071] In equation (5), Θ l Let θ represent the convolution kernel on the graph, and let θ represent the shared parameters of the convolution kernel.
[0072] Equation (5) is for a feature x, and for the entire feature matrix X, we have equation (6).
[0073]
[0074] In equation (6), W represents the weight corresponding to each feature, and the size of W is l*(l+1), σ represents the sigmoid activation function, and H (l+1) It is the current layer of hidden features after spatial features are mined through graph convolution, i.e., spatial feature data, H. (l) It is the previous layer, namely time feature data.
[0075] Step 2303: Perform ReLU activation and a second time feature extraction on the spatial feature data to obtain the predicted value of harmonic source location.
[0076] like Figure 6 As shown, the network architecture of the time-map convolutional network consists of n stacked spatiotemporal convolutional blocks plus a fully connected layer as the output layer. The purpose of harmonic source localization is to determine the location of h-th harmonic sources in a power distribution network, which is a classification problem in the field of deep learning. To obtain the location of the harmonic sources, the fully connected layer takes M units as input and outputs M predicted values, indicating whether a harmonic source exists at each node. The activation function used is the sigmoid function.
[0077] Understandably, in step 2303, the implementation method of the second time feature extraction can refer to the implementation method of the first time feature extraction in step 2301.
[0078] Step 2034: Obtain the harmonic source localization model based on the predicted values of the harmonic source localization, the output data in the training set of the harmonic source localization model, and the loss function.
[0079] Understandably, the difference between the predicted output value and the harmonic source location values in the TARGET algorithm is calculated, using the MSE squared loss function to guide the update of the weight parameters in the neural network until the loss is minimized, at which point the neural network training is complete. Next, the performance of the trained neural network is tested using test set data, and the results are output. If the output value of a node is greater than 0.5, it is considered that a harmonic source exists at that node, and the value is corrected to 1; if the output value of a node is less than 0.5, it is considered that no harmonic source exists at that node, and the value is corrected to 0. After the harmonic source location is completed, the number of "1"s in the M-column matrix is counted, which represents the number of harmonic sources in the distribution network. Thus, the location and number of harmonic sources in the distribution network can be determined.
[0080] The harmonic source localization method provided in this invention can uncover the hidden temporal and spatial relationships of harmonic data in the distribution network through spatiotemporal graph convolution, overcoming the difficulty of traditional harmonic state estimation methods that require establishing mathematical equations such as measurement matrices to estimate harmonic currents. Furthermore, in this invention, deep learning is used to achieve harmonic source localization via the spatiotemporal graph convolution module, avoiding errors caused by harmonic impedance changes even under varying distribution network conditions, while still achieving accurate localization. Moreover, in this invention, the data used for harmonic source localization is not synchronously sampled voltage and current waveform values, but rather average steady-state values of voltage and current available in actual engineering projects. This is more suitable for engineering applications, requires less data, and can quickly locate the harmonic source, which is beneficial for harmonic mitigation.
[0081] The following uses a modified IEEE 14-node system as a specific example to illustrate the method for locating harmonic sources provided by the embodiments of the present invention.
[0082] The modified IEEE 14-node system, such as Figure 7 As shown, in this example, the simulation sample generation platform is PSCAD / EMTDC. The platform for data preprocessing, model training, and testing is MATLAB.
[0083] In this example, the flowchart is as follows: Figure 8 As shown, firstly, based on the distribution network topology, an adjacency matrix is established. Then, electrical signals from monitoring points are collected, a steady-state input feature set is selected, and the input feature set is preprocessed to convert it into a spatiotemporal graph data format. Next, a spatiotemporal graph convolutional neural network is used to train the data and validated on a validation set until the loss value is minimized. Finally, the trained weights and other parameters with the lowest loss value are saved, and the trained weights and other parameters are used for harmonic source localization. Next, combined with... Figure 7 right Figure 8 The process will be explained in detail.
[0084] First, a harmonic source location database is generated through time-domain simulation. Sample data for two calculation cases are generated by changing the harmonic source injection location, harmonic source amplitude, number of harmonic sources, and load size. For Calculation Case 1 (multiple harmonic sources): considering the influence of harmonic source location, harmonic source 1 is located at nodes 1-14, and harmonic source 2 is randomly located at nodes 4, 6, 8, 11, and 13; considering the influence of harmonic source amplitude, the amplitude of harmonic source 1 is 0.01-0.1kA, and the amplitude of harmonic source 2 is 0.02-0.2kA. For Calculation Case 2 (single harmonic source): considering the influence of harmonic source location, harmonic source 1 is located at nodes 1-14; considering the influence of harmonic source amplitude, the amplitude of harmonic source 1 is 0.01-0.1kA; considering load changes, the loads at nodes 8, 11, and 12 are set to 50% and 200% of their original values, respectively. Example 1 generated 3500 working conditions, and Example 2 generated 980 working conditions, with a simulation time of 0.35 seconds for each working condition. Next, based on the input features shown in Table 1, MATLAB was used to integrate and shuffle the required input features for each working condition, generating 3500 and 980 valid samples for Example 1 and Example 2, respectively. Then, 60% of the samples were used as training samples to train the spatiotemporal graph convolutional neural network model, 20% as validation samples, and 20% as test samples.
[0085] The number of spatiotemporal convolutional blocks (n) in the spatiotemporal graph convolutional neural network is set to 2. Following the steps described above, the mapping relationship between the training input features and output features is constructed, thus completing the establishment of the spatiotemporal graph convolutional neural network model. Next, for examples 1 and 2, the constructed spatiotemporal graph convolutional neural network model is used to predict the location of harmonic sources on the test samples of each example. The model performance test results are shown in Table 2.
[0086] Table 2 shows the performance of the harmonic source localization model under the test samples of Example 1 and Example 2.
[0087] Test System Input feature dimension epoch Accuracy Ac Calculation example 1 8 300 97.25% Calculation example 2 8 300 99.49%
[0088] As can be seen, the spatiotemporal graph convolutional neural network model proposed in this example can achieve harmonic source location accuracy of 97.25% and 99.49% for two distribution network topologies containing harmonic sources, namely Example 1 (multiple harmonic sources) and Example 2 (single harmonic source), under conditions where the input features are stable values (i.e., weak communication) and the location, amplitude, and load level of the harmonic source vary. It can be seen that the harmonic source location method of this invention can achieve harmonic source location under weak communication conditions, and the accuracy of harmonic source location can reach over 97.25%.
[0089] like Figure 9As shown, an embodiment of the present invention provides a harmonic source localization system. The harmonic source localization system 900 includes a node acquisition module 901, a data acquisition module 902, and a harmonic source localization result output module 903.
[0090] The node acquisition module 901 is configured to acquire the topology diagram of the distribution network and acquire at least one node in the topology diagram. The data acquisition module 902 is configured to acquire the voltage and current values of each node of at least one node in the topology diagram of the distribution network within a preset time period, and based on the voltage and current values of each node of at least one node in the topology diagram of the distribution network within the preset time period, acquire the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node of at least one node in the topology diagram of the distribution network within the preset time period. The harmonic source location result output module 903 is configured to: take the average fundamental voltage, average h-th harmonic voltage, average fundamental current, average h-th harmonic current, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in at least one node of the distribution network topology diagram within a preset time period as input data for the harmonic source location model; and determine the node where the h-th harmonic source is located from at least one node in the distribution network topology diagram according to the harmonic source location model.
[0091] In some embodiments, such as Figure 10As shown, the harmonic source location system 900 also includes a harmonic source location training set acquisition module 904 and a harmonic source location model acquisition module 905. The data acquisition module 901 is further configured to: acquire historical voltage and current data of each node in at least one node of the distribution network topology diagram, as well as historical data of nodes containing harmonic sources; and, based on the historical voltage and current data of each node in the distribution network topology diagram, acquire historical data of the fundamental voltage average value, the h-th harmonic voltage average value, the fundamental current average value, the h-th harmonic current average value, the fundamental apparent power, the h-th harmonic active power, the harmonic voltage distortion rate, and the harmonic current distortion rate of each node in the distribution network topology diagram. The training set acquisition module 904 for harmonic source localization is configured to: use historical data of the fundamental voltage average value, h-th harmonic voltage average value, fundamental current average value, h-th harmonic current average value, fundamental apparent power, h-th harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate of each node in the topology diagram of the distribution network as the input dataset, and use historical data of nodes containing harmonic sources as the output dataset. Furthermore, a training set for the harmonic source localization model is created based on the input and output datasets. The harmonic source localization model acquisition module 905 is configured to: use a neural network algorithm to acquire the harmonic source localization model based on the training set of the harmonic source localization model.
[0092] In some embodiments, such as Figure 11 As shown, the harmonic source localization model acquisition module 905 includes: a temporal feature extraction unit 9051, a spatial feature extraction unit 9052, a prediction value acquisition unit 9053, and a harmonic source localization model acquisition unit 9054. The temporal feature extraction unit 9051 is configured to perform a first temporal feature extraction on the input data in the training set of the harmonic source localization model to obtain temporal feature data. The spatial feature extraction unit 9052 is configured to perform graph convolution feature extraction on the temporal feature data to obtain spatial feature data. The prediction value acquisition unit 9053 is configured to perform ReLU activation and a second temporal feature extraction on the spatial feature data to obtain the predicted value of the harmonic source localization. The harmonic source localization model acquisition unit 9054 is configured to acquire the harmonic source localization model based on the predicted value of the harmonic source localization, the output data in the training set of the harmonic source localization model, and the loss function.
[0093] In some embodiments, the time feature extraction unit 9051 is configured to: use the formula The first time feature extraction is performed, where, The input data in the training set for the harmonic source localization model is Γ, where Γ is the convolution kernel for temporal convolution. Here are the parameters of the harmonic source localization model, and σ is the sigmoid activation function. For the Hadamarda product, H (l) This is time-related data.
[0094] In some embodiments, the spatial feature extraction unit 9052 is configured to: use the formula Graph convolution feature extraction is performed, where W is the weight corresponding to each feature, W has a size of l*(l+1), σ is the sigmoid activation function, A is the topological adjacency matrix of the distribution network graph, D is the degree matrix, and I is the identity matrix; H (l+1) It is spatial feature data, H (l) It is time-related data.
[0095] The detailed scheme and beneficial effects of the harmonic source localization system provided in the embodiments of the present invention can be found in the relevant description of the harmonic source localization method provided in the embodiments of the present invention, and will not be repeated here.
[0096] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for locating harmonic sources, characterized in that, include: Obtain the topology diagram of the power distribution network, and obtain at least one node in the topology diagram of the power distribution network; Obtain the voltage and current values of each node in at least one node of the distribution network topology diagram within a preset time period, and obtain the average fundamental voltage of each node in at least one node of the distribution network topology diagram within the preset time period based on the voltage and current values of each node in the distribution network topology diagram within the preset time period. h Average value of second harmonic voltage, average value of fundamental current h Average value of second harmonic current, apparent power of fundamental frequency h Subharmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate; as well as The average fundamental voltage of each node in at least one node of the distribution network topology diagram within a preset time period. h Average value of second harmonic voltage, average value of fundamental current h Average value of second harmonic current, apparent power of fundamental frequency h The first harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate are used as input data for the harmonic source location model. Based on the harmonic source location model, at least one node in the topology diagram of the distribution network is used to determine the source. h The node where the subharmonic source is located; It also includes: obtaining the harmonic source localization model using a neural network algorithm based on the training set of the harmonic source localization model; including: The input data in the training set of the harmonic source localization model is subjected to a first time feature extraction to obtain time feature data; including: using the formula The first time feature extraction is performed, where, The input data in the training set of the harmonic source localization model. The convolution kernel for temporal convolution. , , , The parameters of the harmonic source location model are... It is the sigmoid activation function. For Hadama accumulation, The temporal feature data is used; graph convolution feature extraction is performed on the temporal feature data to obtain spatial feature data. The spatial feature data is subjected to ReLU activation and a second time feature extraction to obtain the predicted value for harmonic source localization; and Based on the predicted values of the harmonic source localization, the output data in the training set of the harmonic source localization model, and the loss function, the harmonic source localization model is obtained.
2. The method for locating harmonic sources according to claim 1, characterized in that, Also includes: Obtain historical voltage and current data for each node of at least one node in the topology diagram of the distribution network, as well as historical data for nodes with harmonic sources. Based on the historical voltage and current data of each node of at least one node in the topology diagram of the distribution network, obtain historical data of the average fundamental voltage of each node of at least one node in the topology diagram of the distribution network. h Historical data on the average value of second harmonic voltage and the average value of fundamental current. h Historical data on the average value of the second harmonic current, and the apparent power of the fundamental frequency. h Historical data on subharmonic active power, historical data on harmonic voltage distortion rate, and historical data on harmonic current distortion rate. Historical data of the fundamental voltage average value of each node in at least one node of the distribution network topology diagram. h Historical data on the average value of second harmonic voltage and the average value of fundamental current. h Historical data on the average value of the second harmonic current, and the apparent power of the fundamental frequency. h Historical data on subharmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate are used as input datasets, and historical data on nodes containing harmonic sources are used as output datasets. A training set for the harmonic source localization model is created based on the input and output datasets; as well as Based on the training set of the harmonic source localization model, a neural network algorithm is used to obtain the harmonic source localization model.
3. The method for locating harmonic sources according to claim 1, characterized in that, The step of performing graph convolution feature extraction on the temporal feature data to obtain spatial feature data includes: Use formula Graph convolution feature extraction is performed, where, W The weights corresponding to each feature, W The size is , This represents the sigmoid activation function. A This is the topological adjacency matrix of the power distribution network diagram. D For degree matrix, I It is the identity matrix; It is spatial feature data. It is time-related data.
4. A harmonic source localization system, characterized in that, include: The node acquisition module is configured to: acquire a topology diagram of the power distribution network and acquire at least one node in the topology diagram of the power distribution network; The data acquisition module is configured to: acquire the voltage and current values of each node of at least one node in the topology diagram of the distribution network within a preset time period, and acquire the average fundamental voltage of each node of at least one node in the topology diagram of the distribution network within the preset time period based on the voltage and current values of each node of at least one node in the topology diagram of the distribution network within the preset time period. h Average value of second harmonic voltage, average value of fundamental current h Average value of second harmonic current, apparent power of fundamental frequency h Subharmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate; and The harmonic source location result output module is configured to output the average fundamental voltage of each node in at least one node of the distribution network topology diagram within a preset time period. h Average value of second harmonic voltage, average value of fundamental current h Average value of second harmonic current, apparent power of fundamental frequency h The first harmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate are used as input data for the harmonic source location model. Based on the harmonic source location model, at least one node in the topology diagram of the distribution network is used to determine the source. h The node where the subharmonic source is located; It also includes: a module for acquiring the harmonic source localization model, which includes: The time feature extraction unit is configured to: perform a first time feature extraction on the input data in the training set of the harmonic source localization model to obtain time feature data; including: using the formula The first time feature extraction is performed, where, The input data in the training set of the harmonic source localization model. The convolution kernel for temporal convolution. , , , The parameters of the harmonic source location model are... It is the sigmoid activation function. For Hadama accumulation, This is time-related data; The spatial feature extraction unit is configured to perform graph convolution feature extraction on the temporal feature data to obtain spatial feature data. The prediction value acquisition unit is configured to: perform ReLU activation and a second time feature extraction on the spatial feature data to obtain the predicted value for harmonic source localization; and The harmonic source localization model acquisition unit is configured to acquire the harmonic source localization model based on the predicted value of the harmonic source localization, the output data in the training set of the harmonic source localization model, and the loss function.
5. The harmonic source localization system according to claim 4, characterized in that, It also includes a training set acquisition module for harmonic source localization and a harmonic source localization model acquisition module; The data acquisition module is further configured to: acquire historical voltage and current data of each node of at least one node in the topology diagram of the distribution network, as well as historical data of nodes with harmonic sources, and acquire historical data of the average fundamental voltage of each node of at least one node in the topology diagram of the distribution network based on the historical voltage and current data of each node of at least one node in the topology diagram of the distribution network. h Historical data on the average value of second harmonic voltage and the average value of fundamental current. h Historical data on the average value of the second harmonic current, and the apparent power of the fundamental frequency. h Historical data on subharmonic active power, historical data on harmonic voltage distortion rate, and historical data on harmonic current distortion rate. The training set acquisition module for harmonic source localization is configured to: acquire historical data of the fundamental voltage average value of each node in at least one node of the distribution network topology diagram. h Historical data on the average value of second harmonic voltage and the average value of fundamental current. h Historical data on the average value of the second harmonic current, and the apparent power of the fundamental frequency. h Historical data on subharmonic active power, harmonic voltage distortion rate, and harmonic current distortion rate are used as input datasets, and historical data on nodes containing harmonic sources are used as output datasets; and a training set for the harmonic source localization model is created based on the input and output datasets. The module for obtaining the harmonic source localization model is set up to use a neural network algorithm to obtain the harmonic source localization model based on the training set of the harmonic source localization model.
6. The harmonic source localization system according to claim 4, characterized in that, The spatial feature extraction unit is set as follows: using the formula Graph convolution feature extraction is performed, where, W The weights corresponding to each feature, W The size is , This represents the sigmoid activation function. A This is the topological adjacency matrix of the power distribution network diagram. D For degree matrix, I It is the identity matrix; It is spatial feature data. It is time-related data.