DTW (Dynamic Time Warning) user-transformer relation identification method based on improvement
Through the improved DTW algorithm, the extreme point and Euclidean distance of the voltage sequence are calculated, which solves the problem of excessive time complexity in the prior art, and realizes high-precision household change relationship recognition in a short time.
Patent Information
- Application Number
- CN202411525182.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art has the problem that the household change relationship identification in low-voltage station area has too much time complexity and cannot complete the household change relationship identification in a short time.
By calculating the voltage fluctuation trend of the voltage sequence at each sampling time, a coarse-grained DTW distance is obtained; traversing the voltage fluctuation trend to find the extreme point, uniformly sampling the extreme points between each extreme point and calculating the Euclidean distance, and finally the two distances are placed. Add up to get the final distance.
It effectively reduces the computational complexity, improves the accuracy of algorithm recognition, and can complete the identification of household-change relationships in a short time.
Smart Images

Figure CN119401425A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-voltage transformer-to-household relationship, and in particular to a method for identifying transformer-to-household relationship based on improved DTW. Background Art
[0002] In the distribution system, correct topology information is of great significance for the load balancing management of the substation. Since the user side is powered by single-phase power, the three-phase load often becomes unbalanced.
[0003] In view of the inaccurate household-transformer relationship in low-voltage substations due to maintenance and other reasons, which affects the operation and management of low-voltage substations, the existing household-transformer relationship identification mainly includes two methods: characteristic signal method and data-driven method; the advantage of the characteristic signal method is that it has a higher recognition accuracy, but the recognition equipment needs to be installed on the transformer outlet side and the user's incoming side, which poses certain risks; when the number of substations is large, the workload is large, which increases the maintenance cost of the substation; if the voltage fluctuation of the substation is large, it will affect the recognition accuracy.
[0004] The data-driven method uses the K-Means clustering method to realize household transformer relationship identification, but the selection of K value seriously affects the accuracy of household transformer relationship identification, and the original power data obtained needs to be reduced in dimension before the K-Means clustering method can be used to realize household transformer relationship identification, and the algorithm has a high time complexity.
[0005] The publication number is CN118094260A, which performs variational mode decomposition on voltage time series data for feature mining and extracts the optimal trend mode function; calculates the dynamic time distance of voltage time series data based on the optimal trend mode function; the publication number is CN114896302B, which reconstructs the voltage fluctuation value sequence of the small load household meter and the electricity user meter with the highest matching degree based on the matching results, then calculates the correlation between the two reconstructed voltage fluctuation value sequences, and identifies the household-to-household relationship of small load users based on the correlation calculation results.
[0006] The above two methods are based on the traditional DTW algorithm to calculate the correlation between two reconstructed voltage fluctuation value sequences. The traditional DTW algorithm has the problem of too large time complexity and too much calculation when calculating the correlation, and cannot complete the household change relationship identification in a short time. Summary of the invention
[0007] In view of the shortcomings of the existing methods, the present invention first calculates the voltage fluctuation trend of the voltage sequence at each sampling moment to obtain the coarse-grained DTW distance; secondly, traverses the voltage fluctuation trend to find the extreme points, uniformly samples the extreme points and calculates the Euclidean distance between the corresponding extreme points, and finally adds the two distances to obtain the final distance.
[0008] The technical solution adopted by the present invention is: an improved DTW household-transformer relationship recognition method includes the following steps:
[0009] Step 1: Extract the characteristic points of the three-phase voltage on the low-voltage side of the substation transformer.
[0010] As a preferred embodiment of the present invention, Step 1 specifically includes:
[0011] Step 11: Input the original voltage time series X j , output the voltage characteristic point set P j , and set the temporary voltage characteristic set P j ';
[0012] Step 12: Add the starting point and the ending point to P j '; Traverse X j , find the extreme points P j , P 1 ,..., P 2 ,..., P i in each time period of X j , and add them to P
[0013] Step 13: Traverse P j ', use the extreme point algorithm to obtain several extreme points and output them to the voltage characteristic point set P j . The formula of the extreme point algorithm is: {(P i <P i-1 ) ∩ (P i <P i+1 )} ∪ {(P i >P i-1 ) ∩ (P i >P i+1 )} ∪ {P i (i = 1)} ∪ {P i (i = n)}; where P i represents the i-th extreme point, 1 = <i <n, and n is the total number of the original voltage time series.
[0014] As a preferred embodiment of the present invention, the low-voltage side of the substation transformer includes the substation side and the user side.
[0015] Step 2: Intervalize the time series data of the characteristic points of the three-phase voltage on the low-voltage side of the substation transformer.
[0016] As a preferred embodiment of the present invention, Step 2 specifically includes:
[0017] Intervalize the time series and A coarse-grained collection sequence of time series data sets divided into specified cardinality according to chronological order and in,
[0018]
[0019]
[0020] in, k is a positive integer, g is an interval number, t n Represents the time stamp, and n is the time stamp sequence number.
[0021] Step 3: Calculate the interval mean and mean deviation of the three-phase voltage characteristic points on the low-voltage side of the transformer after the time series data is intervalized, and calculate the interval distance difference value according to the mean deviation; compare the interval distance difference value with the threshold value to determine whether the user belongs to a certain transformer area;
[0022] As a preferred embodiment of the present invention, the formula of interval mean is:
[0023]
[0024] Among them, X and Y are different time series, and n is the time mark number.
[0025] As a preferred embodiment of the present invention, the formula of mean deviation is:
[0026]
[0027] Among them, Ave((XY) k ) is the interval mean.
[0028] As a preferred implementation of the present invention, the formula for the interval distance difference value is:
[0029]
[0030] in, dtw is the dynamic time warping algorithm.
[0031] As a preferred implementation of the present invention, comparing the interval distance difference value with a threshold value to determine whether the user belongs to a certain station change zone includes:
[0032] When the minimum value of the DIS values of a certain user side and a certain station change area meets DISmin≥α, it is determined that the user does not belong to the station area; wherein α is the first threshold;
[0033] When the maximum value in the DIS values of several data segments on a certain user side satisfies DISmax≥β, it is determined that the user belongs to this transformer area; where β is the second threshold.
[0034] When β < DIS < α, increase the data intervalization k value, and compare DISmin with the first threshold and DISmax with the second threshold again, and continuously iterate until the iteration stops when DISmin≥α or Dis≥β.
[0035] As a preferred embodiment of the present invention, an improved DTW user-transformer relationship recognition system includes: a memory for storing instructions executable by a processor; a processor for executing the instructions to implement an improved DTW user-transformer relationship recognition method.
[0036] As a preferred embodiment of the present invention, a computer-readable medium storing computer program code, and the computer program code implements an improved DTW user-transformer relationship recognition method when executed by a processor.
[0037] Advantages of the present invention:
[0038] 1. Use the extreme point algorithm to extract the characteristic points of the three-phase voltage on the low-voltage side of the transformer area, reduce the complexity of the algorithm, and improve the accuracy of algorithm recognition;
[0039] 2. The improved DTW algorithm effectively reduces the computational complexity and can complete the recognition of the user-transformer relationship in a short time;
[0040] 3. Intervalize the time series data to reduce the algorithm complexity;
[0041] 4. Use the mean value to calculate the deviation in the distance set, and combine the deviations in three branch directions. Without fully calculating the dynamic programming path, it can be determined whether the user belongs to this transformer area, effectively reducing the time complexity; that is, introduce the branch difference degree on the optimal matching path, and solve the optimal time series set and its minimum DTW distance with the smallest difference of each DTW branch search node. Description of the Drawings
[0042] Figure 1 is the flow chart of the improved DTW user-transformer relationship recognition method of the present invention;
[0043] Figure 2 is the effect diagram of the speed ratio of the improved DTW and the traditional DTW;
[0044] Figure 3 is the topological structure diagram of a certain distribution network;
[0045] Figure 4 is the schematic diagram of the DTW component. Detailed Embodiments
[0046] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0047] like Figure 1 As shown, a method for identifying household change relations based on improved DTW includes the following steps:
[0048] Step 1: extract the characteristic points of the three-phase voltage on the low-voltage side of the transformer;
[0049] Voltage characteristic points are key points that can reflect the overall trend of the time series. Voltage characteristic points include the starting point, end point and extreme point of voltage data.
[0050] For example: divide the data points in the 5-second voltage data segment into starting points end and extreme points;
[0051] Step 11: Input the original voltage timing sequence X j , output voltage characteristic point set P j , and set the temporary voltage characteristic set P j ';
[0052] Step 12: Set the starting point and end point Add to P j '; traverse X j , find X in each period j The extreme point P 1 ,P 2 ,…,P i , and add to P j ', each period is 5 seconds;
[0053] Step 13: Traverse P j ', use the extreme point algorithm to obtain several extreme points and output them to the voltage characteristic point set P j middle;
[0054] The extreme point algorithm is:
[0055] {(P i <P i-1 )∩(P i <P i+1 )}∪{(P i >P i-1 )∩(P i >P i+1 )}∪{P i (i=1)}∪{P i (i=n)}(1)
[0056] Among them, P i represents the i-th extreme point, where 1 = < i < n, and n is the total number of the original voltage time series.
[0057] The low-voltage side of the transformer substation includes the transformer substation side and the user side. Through P j the time series of the voltage characteristic points on the transformer substation side is output and the time series of the voltage characteristics on the user side
[0058] The time series of the voltage characteristics on the transformer substation side The time series of the voltage characteristics on the user side
[0059] Among them, and respectively represent the n-th data points on the transformer substation side and the user side, and t n represents the timestamp.
[0060] For the analysis of time series data, the measurement of its similarity is crucial; the commonly used similarity representations include Euclidean distance and DTW distance; when using Euclidean distance to compare two time series, a one-to-one correspondence is established for each point in the sequence in order, and the Euclidean distance is calculated based on the correspondence between points as the distance measurement between the two time series, but this one-to-one correspondence between points is unlikely to occur in real-time series data; using DTW distance to solve the distance measurement and matching problems of unequal-length data has a relatively high algorithm complexity; therefore, the present invention adopts an improved DTW that combines the advantages of Euclidean distance and DTW distance;
[0061] Step 2. Intervalization of time series data: The time series and are divided into a coarse-grained set sequence of the specified base time series data set in chronological order and which is called data intervalization;
[0062]
[0063]
[0064] Among them, k takes a positive integer, g is the number of intervalizations, t n represents the time mark, and n is the time mark serial number.
[0065] The time series complexity of the traditional DTW algorithm = n 2 , while the complexity of the present invention is effectively reduced. After data intervalization, the original data set is divided into several segments to calculate the DTW distance, and the algorithm complexity is of the g 2 level.
[0066] For example: The original time series is When g = 4, the interval is {{1,3,5,6},{7,8,9,10},{2,4,0,0}}, then the complexity is 4 2 ; The complexity of the classic DTW algorithm is 10 2 .
[0067] Step 3: By performing DTW calculation on the sequence within the data interval, when the DTW value of a certain station change side and user side exceeds the threshold, the calculation is stopped, indicating that the user does not belong to the station change area, which effectively reduces the complexity of the calculation.
[0068] Step 31, calculating a set of cumulative distance matrices;
[0069] The mean of the elements in this distance set is defined as the interval mean, denoted by Ave((XY) k ); (XY) k The mean deviation of the elements in is defined as the mean deviation, denoted as MAV((XY) k ).
[0070] The superscripts 1, 2, and 3 indicate directions, such as Figure 4 As shown, 1 is the x-sequence direction, 3 is the y-sequence direction, and 2 is the direction of the angle bisector of the x and y sequences.
[0071]
[0072] in,
[0073]
[0074] The smaller the value produced by the MAV function, the smaller the difference.
[0075] Among them, X and Y are different time series, t n represents the time tag, g is the interval number, n is the time tag sequence number, and dtw is the DTW algorithm.
[0076] For example, there is a data set {5, 7, 2, 6, 5}, and the solution in MAV is as follows: the solution is the average 5; then the data set mean deviation is solved to get {0, 2, -3, 1, 0}; then the absolute value is solved to get {0, 2, 3, 1, 0}; solve the mean deviation, and record MAV = 1.2.
[0077] Step 32: Set (XY) k The interval DTW distance difference of the elements in three directions is called the interval distance difference, denoted as DIS, and the formula is:
[0078]
[0079] Among them,
[0080] Formula (4) takes the mean value in the distance set, calculates the deviation in the distance set and combines the deviations in three branch directions. Without fully calculating the dynamic programming path, it can be determined whether the user belongs to this transformer substation area, effectively reducing the time complexity.
[0081] The branch difference degree is introduced in finding the optimal matching path to solve the optimal timing set of each DTW branch search node and its DTW distance with the smallest difference.
[0082] Step 33: Determine whether the user does not belong to a certain transformer substation area;
[0083] Step 331: When the minimum value in the DIS values of several data segments on the user side satisfies DISmin≥α, the branch difference degree is large, then it is determined that the user does not belong to this transformer substation area; where α is the first threshold;
[0084] Step 332: When the maximum value in the DIS values of several data segments on the user side satisfies DISmax≥β, the branch difference degree is small, then it is determined that the user belongs to this transformer substation area; where β is the second threshold.
[0085] Step 333: When β < DIS < α, it means that the difference degree between any two distances is small and it is impossible to determine whether the user belongs to a certain transformer substation area; therefore, increase the data intervalization k value to make the data discretization intervals more; re-execute Steps 31 to 33 to obtain new DIS values, and then execute the judgments in Steps 331 and 333; stop the calculation until Steps 331 or 332 are satisfied, and finally determine whether the user belongs to this transformer substation area; where 0≤β < α≤1.
[0086] Experimental process:
[0087] Verify the effectiveness of the improved DTW, including performance analysis in terms of time complexity, classification, clustering, etc., in order to fully verify the rationality of the improved DTW algorithm.
[0088] The experimental data set is the UCR data set, and 7 sub-data sets are selected from it. Their data comes from different fields, as shown in the following table:
[0089] Table 1 Different data sets
[0090] Dataset Number of categories Training set size Test set size Time series data length 50words 50 450 455 270 Facefour 4 24 88 350 Gun_Point 2 50 150 150 Plane 7 105 105 144 Trace 4 100 100 275 Wine 2 57 54 234 WordsSynonyms 25 267 638 270
[0091] Time complexity:
[0092] The complexity of the traditional DTW algorithm is O(ce), where c and e represent different time series, while the improved DTW algorithm makes the time complexity O(e) by introducing branch differences. To further verify the calculation time of the improved DTW algorithm, the traditional DTW algorithm and the improved DTW algorithm are compared on 7 UCR data sets. Since the size of each data set is different, the speed needs to be normalized. The calculation speed of the same data set is normalized to the following formula:
[0093]
[0094] Among them, l i' is the consumption time of the i'th data set, is the time consumed by data sets 0 to j, L i is the normalized calculation speed ratio.
[0095] like Figure 2 As shown in the figure, the calculation speed of the improved DTW algorithm is 35.8% higher than that of the traditional DTW algorithm.
[0096] Error rate ERR analysis:
[0097] As shown in Table 2, among the seven UCR datasets, the improved DTW algorithm performs well on the Facefour, Gun_Point, Wine, 50words, and WordsSynonyms datasets, while the traditional DTW only performs well on Trace.
[0098] The improved DTW algorithm and the traditional DTW algorithm were experimented on 7 different data sets. The experimental error rate calculation formula is as follows:
[0099]
[0100] Among them, NUM is the total number of time series of test data, N t is the number of correctly classified time series.
[0101] Table 2 Error rates of improved DTW and traditional DTW in different data sets
[0102] Dataset Improving DTW Classic DTW 50words 0.19013 0.36923 Facefour 0.02005 0.21591 Gun_Point 0.02278 0.086667 Plane 0.02056 0.038095 Trace 0.25 0.24 Wine 0.296 0.38889 WordsSynonyms 0.211 0.38245
[0103] In summary, through experimental comparison, the improved DTW algorithm of the present invention has certain effectiveness.
[0104] Validity:
[0105] The original file topology of a distribution network is as follows: Figure 3 As shown in the figure, the three-phase voltages on the low-voltage side of transformer D1 are expressed as U 1A , U 1B and U1C The three-phase voltages on the low-voltage side of transformer D2 are respectively represented by U 2A , U 2B and U 2C , 1 to 25 represent the user numbers in the substation area, among which users 1 to 4, 5 to 8, 9 to 13 are connected to the A, B, and C phases of D1 respectively, and users 14 to 16, 17 to 20, and 21 to 25 are connected to the A, B, and C phases of D2 respectively.
[0106] The traditional DTW algorithm is used to directly perform cluster analysis on the voltage sequences of 25 users in two substations. The clustering results are shown in Table 3. Table 3 shows that the substation to which the users belong is inconsistent with the original substation archive, indicating that cluster analysis using only DTW distance cannot completely distinguish the voltage sequences that are generally similar in voltage data.
[0107] Table 3 Traditional DTW clustering results
[0108] Cluster Transformer side voltage User side voltage 1 U1A, U2C U1,U2,U3,U4,U23,U24,U25 2 / U12,U13,U21,U22 3 U2A U14,U15,MU16 4 U2B U17, U19, U20 5 / U10,U11,U18 6 U1B,U1C U5,U6,U7,U8,U9
[0109] Figure 3 All voltage series in the cluster analysis are performed using improved DTW, and the clustering results are shown in Table 4, which is completely consistent with the original substation archives.
[0110] Table 4 Improved DTW clustering results
[0111]
[0112]
[0113] The present invention bins the time series data to reduce the algorithm complexity; uses the mean to calculate the deviation in the distance set, and combines the deviations in the three branch directions, so it is possible to determine whether the user belongs to the station area without fully calculating the dynamic regularization path, effectively reducing the time complexity; that is, the branch difference is introduced on the optimal matching path to solve the optimal time series set of each DTW branch search node and its minimum difference DTW distance.
[0114] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for identifying household change relationships based on improved DTW, characterized in that: It includes the following steps: Step 1: Extract the characteristic points of the three-phase voltage on the low-voltage side of the substation transformer. Step 2: Intervalize the time-series data of the extracted characteristic points of the three-phase voltage on the low-voltage side of the substation transformer. Step 3: Calculate the interval mean and mean deviation of the characteristic points of the three-phase voltage on the low-voltage side of the substation transformer after time-series data intervalization, and calculate the interval distance difference value according to the mean deviation; compare the interval distance difference value with a threshold value to determine whether the user belongs to a certain substation transformer area.
2. The improved DTW household change relationship identification method according to claim 1, characterized in that: Step 1 specifically includes: Step 11: Input the original voltage timing sequence X j , output voltage characteristic point set P j , set the temporary voltage characteristic set P j '; Step 12: Set the starting point and end point Add to P j '; traverse X j , find X in each period j The extreme points P1, P2, ..., P i , and add to P j '; Step 13: Traverse P j ', and use the extreme point algorithm to obtain several extreme points and output them to the voltage feature point set P j . The formula of the extreme point algorithm is: {(P i <P i-1 ) ∩ (P i <P i+1 )} ∪ {(P i >P i-1 ) ∩ (P i >P i+1 )} ∪ {P i (i = 1)} ∪ {P i (i = n)}; where P i represents the i-th extreme point, 1 = <i < n, and n is the total number of the original voltage time series.
3. The improved DTW household change relationship identification method according to claim 1, characterized in that: Step 2 specifically includes: The time series and A coarse-grained collection sequence of time series data sets divided into specified cardinality according to chronological order and in, in, k is a positive integer, g is an interval number, t n Represents the time stamp, and n is the time stamp sequence number.
4. The improved DTW household change relationship identification method according to claim 3 is characterized in that: The formula for the interval mean is: Where X and Y are different time series, and n is the time mark serial number.
5. The improved DTW household change relationship identification method according to claim 4 is characterized in that: The formula for the mean deviation is: Among them, Ave((XY) k ) is the interval mean.
6. The improved DTW household change relationship identification method according to claim 5, characterized in that: The formula for the interval distance difference value is: in, dtw is the dynamic time warping algorithm.
7. The improved DTW household change relationship identification method according to claim 6, characterized in that: Comparing the interval distance difference value with the threshold value to determine whether the user belongs to a certain substation transformer area includes: When several data segments on a certain user side satisfy DISmin≥α with the minimum value in the DIS values of a certain substation transformer area; where α is the first threshold value; it is determined that the user does not belong to this substation area. When several data segments on a certain user side satisfy DISmax≥β with the maximum value in the DIS values of a certain substation transformer area; where β is the second threshold value; it is determined that the user belongs to this substation area. When β < DIS < α, increase the k value of data intervalization, and compare DISmin with the first threshold value and DISmax with the second threshold value again, and iterate continuously until it satisfies DISmin≥α or DISmax≥β and then stop the iteration.
8. The improved DTW household change relationship identification method according to claim 1, characterized in that: The low-voltage side of the substation transformer includes the substation side and the user side.
9. Based on the improved DTW household change relationship identification system, it is characterized by: It includes: A memory for storing instructions executable by a processor; A processor for executing the instructions to implement the improved DTW-based household-substation relationship recognition method according to any one of claims 1-8.
10. A computer readable medium storing computer program code, characterized in that: The computer program code implements the improved DTW-based household-substation relationship recognition method according to any one of claims 1-8 when executed by the processor.
Citation Information
Patent Citations
Method, system, device and storage medium for identifying household change relationship of small load users
CN114896302B
Power distribution network user-transformer relation identification method based on voltage time sequence change characteristic mining
CN118094260A