Distribution terminal fault recording test method based on weighted optimization DTW algorithm
By applying a weighted DTW algorithm in the application of power distribution terminal fault recording wave test, the time sequence derivative of the fault recording waveform is calculated and evaluated its similarity, solving the problem of accuracy evaluation of the accuracy evaluation of power distribution terminals in existing technologies. Achieve fast and accurate test results.
Patent Information
- Application Number
- CN202410823039.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-06-25
AI Technical Summary
The existing technology lacks effective testing methods to evaluate the accuracy of fault recording of power distribution terminals, resulting in time-consuming and labor-intensive and low accuracy, making it difficult to adapt to the needs of large-scale production and batch operation.
Adopt a dynamic time regularization (DTW) algorithm based on the weighted optimization, by obtaining the time sequence of the faulty -wave shape of the device to be tested and the recording instrument, calculate its guide number as a comparison sequence and reference sequence, and uses the dtW algorithm calculation of time weights to calculate similarly. Degree to determine whether the fault recording wave is qualified.
It can quickly and accurately judge the fault recording performance of distribution terminals without manual intervention, reduce labor costs, and improve test progress and accuracy.
Smart Images

Figure CN118376868B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network testing, and in particular to a distribution terminal fault recording test method based on a weighted optimization DTW algorithm. Background Art
[0002] In recent years, with the improvement of user requirements and the development of distribution network technology, power supply companies have attached more and more importance to the construction of distribution networks. Distribution network demonstration areas have been set up in many places and the digital transformation of distribution networks has been promoted through the construction of demonstration areas. While promoting the construction of "source, grid, load and storage", power supply companies have increased their demand for auxiliary technologies for distribution network operation analysis and higher requirements for operation and maintenance. For distribution terminal equipment responsible for handling distribution network faults and anomalies, providing reliable fault recording and manual recording has become a necessary function. However, at present, there is a lack of effective testing methods for the reliability and accuracy of fault recording. Manual analysis is time-consuming and labor-intensive, with low accuracy, and it is difficult to adapt to the requirements of mass production and batch commissioning of terminal equipment. Therefore, how to test the accuracy of fault recording of distribution terminal equipment has become an urgent problem to be solved.
[0003] The DTW (Dynamic Time Warping) algorithm is a method for calculating the similarity between two time series. It is now widely used in speech recognition and curve similarity measurement. However, since the Dynamic Time Warping (DTW) algorithm itself does not directly involve the concept of time point weighting, the algorithm needs to be expanded or mutated when the importance of each time point is different. The traditional DTW algorithm traverses all possible paths to find the optimal match between two time series, which may result in large computational complexity and low efficiency. Summary of the invention
[0004] The purpose of the present invention is to solve at least one technical problem in the background technology and to provide a distribution terminal fault recording test method based on a weighted optimization DTW algorithm.
[0005] To achieve the above object, the present invention provides a distribution terminal fault recording test method based on a weighted optimization DTW algorithm, comprising:
[0006] Obtaining a time series of a fault recording waveform of the device under test, and using a derivative of the time series as a comparison series;
[0007] Obtaining a time series of a fault recording waveform of a recorder, and using a derivative of the time series as a reference series;
[0008] Calculating the similarity between the comparison sequence and the reference sequence using a time-weighted DTW algorithm;
[0009] Whether the fault recording of the device under test is qualified is judged according to the similarity.
[0010] According to one aspect of the present invention, before calculating the similarity between the comparison sequence and the reference sequence using the DTW algorithm with time weight, the method further includes:
[0011] A cross-correlation function is calculated for the comparison sequence and the reference sequence. When the maximum value of the cross-correlation function calculation is greater than a set threshold, it is determined that the reference sequence and the comparison sequence are not recorded at the same time, and the similarity calculation is stopped.
[0012] According to one aspect of the present invention, the calculating the similarity between the comparison sequence and the reference sequence using the time-weighted DTW algorithm includes:
[0013] The fault waveform is cut by using window constraints: the generation of the comparison sequence and the reference sequence only covers the four cycles before and the eight cycles after the fault moment;
[0014] Define time weight: The fault time point is taken as the point with the maximum weight, and the weight of the time point farther away from the fault time point is smaller;
[0015] Initialize the distance matrix of the DTW algorithm;
[0016] Calculating the distance of corresponding elements: calculating the distance between the corresponding time points in the comparison sequence and the reference sequence according to the distance matrix, and then multiplying the distance by the weight of the corresponding time point;
[0017] Calculating the DTW distance: using a recursive algorithm to find the shortest path lengths of corresponding time points in the comparison sequence and the reference sequence;
[0018] Calculating similarity: Calculating the similarity between the comparison sequence and the reference sequence according to the shortest path length.
[0019] According to one aspect of the present invention, the method further includes: using an early stopping strategy to shorten the calculation time of the DTW algorithm.
[0020] According to one aspect of the present invention, the early stopping strategy includes:
[0021] Early stopping strategy based on cumulative distance threshold: Set the cumulative distance threshold A. When the cumulative distance calculated by the DTW algorithm exceeds the cumulative distance threshold A, it is determined that the difference between the comparison sequence and the reference sequence is greater than the acceptable range, and the current calculation path is terminated in advance.
[0022] According to one aspect of the present invention, the early stopping strategy includes:
[0023] Early stopping strategy based on similarity measurement: set a similarity threshold B. When the similarity measurement calculated by the DTW algorithm is higher than the similarity threshold B, it is determined that the matching degree between the comparison sequence and the reference sequence meets the requirement, and the DTW calculation is terminated in advance.
[0024] To achieve the above object, the present invention also provides a distribution terminal fault recording test system based on weighted optimization DTW algorithm, comprising:
[0025] A comparison sequence calculation module obtains a time series of a fault recording waveform of the device under test and uses a derivative of the time series as a comparison sequence;
[0026] A reference sequence calculation module is used to obtain a time series of a fault recording waveform of the recorder, and a derivative of the time series is used as a reference sequence;
[0027] A similarity calculation module, which uses a time-weighted DTW algorithm to calculate the similarity between the comparison sequence and the reference sequence;
[0028] The recording judgment module judges whether the fault recording of the device under test is qualified according to the similarity.
[0029] To achieve the above-mentioned purpose, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm as described above is implemented.
[0030] To achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm as described above is implemented.
[0031] According to the solution of the present invention, the present invention obtains the distribution terminal fault waveform as a comparison sequence by simulating line faults and setting up a simulated master station, obtains the waveform of a special recorder as a reference sequence, uses the maximum value of the cross-correlation function to judge the correctness of the recording file, and if the file is correct, uses a fast dynamic time warping algorithm with variable time weight to calculate the similarity between the comparison sequence and the reference sequence, judges whether the recording waveform is qualified based on the similarity, and outputs a test report. The present invention can quickly and accurately judge the distribution terminal fault recording performance based on the similarity between the fault recording waveform and the reference fault waveform without the need for manual judgment, thereby reducing labor costs and accelerating the progress and accuracy of the distribution terminal function test. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1A flowchart schematically showing a distribution terminal fault recording test method based on a weighted optimization DTW algorithm according to an embodiment of the present invention;
[0033] Figure 2 This is a structural diagram of the system for implementing the distribution terminal fault recording test method based on the weighted optimization DTW algorithm in Example 1 of the present invention;
[0034] Figure 3 It is a flow chart of a distribution terminal fault recording test method based on a weighted optimization DTW algorithm in Embodiment 1 of the present invention;
[0035] Figure 4 This is an algorithm flow chart of the weighted optimization DTW algorithm in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0036] The present invention will now be discussed with reference to exemplary embodiments. It should be understood that the embodiments discussed are only to enable those skilled in the art to better understand and thus implement the present invention, rather than implying any limitation on the scope of the present invention.
[0037] As used herein, the term “including” and variations thereof are to be interpreted as open-ended terms meaning “including, but not limited to.” The term “based on” is to be interpreted as “based, at least in part, on.” The terms “one embodiment” and “an embodiment” are to be interpreted as “at least one embodiment.”
[0038] Figure 1 The flowchart schematically shows a method for recording and testing a distribution terminal fault based on a weighted optimization DTW algorithm according to an embodiment of the present invention. Figure 1 As shown, in this embodiment, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm includes:
[0039] Obtaining a time series of a fault recording waveform of the device under test, and using a derivative of the time series as a comparison series;
[0040] Obtaining a time series of a fault recording waveform of a recorder, and using a derivative of the time series as a reference series;
[0041] The time-weighted DTW algorithm is used to calculate the similarity between the comparison sequence and the reference sequence;
[0042] Determine whether the fault recording of the device under test is qualified based on the similarity.
[0043] According to an embodiment of the present invention, before calculating the similarity between the comparison sequence and the reference sequence using the time-weighted DTW algorithm, the method further includes:
[0044] The cross-correlation function is calculated for the comparison sequence and the reference sequence. When the maximum value of the cross-correlation function is greater than the set threshold, it is determined that the reference sequence and the comparison sequence are not recorded at the same time, and the similarity calculation is stopped.
[0045] Further, according to an embodiment of the present invention, the similarity between the comparison sequence and the reference sequence is calculated using a time-weighted DTW algorithm, including:
[0046] Adopt window constraint to cut fault waveform: the generation of comparison sequence and reference sequence only covers the four cycles before and the eight cycles after the fault moment;
[0047] Define time weight: The fault time point is taken as the point with the maximum weight, and the weight of the time point farther away from the fault time point is smaller;
[0048] Initialize the distance matrix of the DTW algorithm;
[0049] Calculate the distance between corresponding elements: According to the distance matrix, calculate the distance between the corresponding time points in the comparison sequence and the reference sequence, and then multiply it by the weight of the corresponding time point;
[0050] Calculate the DTW distance: Use a recursive algorithm to find the shortest path length between the comparison sequence and the reference sequence at the corresponding time point;
[0051] Calculate similarity: The similarity between the comparison sequence and the reference sequence is calculated based on the shortest path length.
[0052] Furthermore, according to an embodiment of the present invention, it also includes: using an early stopping strategy to shorten the calculation time of the DTW algorithm.
[0053] Further, according to an embodiment of the present invention, the early stopping strategy includes:
[0054] Early stopping strategy based on cumulative distance threshold: Set the cumulative distance threshold A. When the cumulative distance calculated by the DTW algorithm exceeds the cumulative distance threshold A, it is determined that the difference between the comparison sequence and the reference sequence is greater than the acceptable range, and the current calculation path is terminated in advance.
[0055] Further, according to an embodiment of the present invention, the early stopping strategy includes:
[0056] Early stopping strategy based on similarity measurement: set a similarity threshold B. When the similarity measurement calculated by the DTW algorithm is higher than the similarity threshold B, it is determined that the matching degree between the comparison sequence and the reference sequence meets the requirement, and the DTW calculation is terminated in advance.
[0057] According to the above scheme of the present invention, the present invention obtains the distribution terminal fault waveform as a comparison sequence by simulating line faults and setting up a simulated master station, obtains the waveform of a special recorder as a reference sequence, uses the maximum value of the cross-correlation function to judge the correctness of the recording file, and if the file is correct, uses a fast dynamic time warping algorithm with variable time weight to calculate the similarity between the comparison sequence and the reference sequence, judges whether the recording waveform is qualified based on the similarity, and outputs a test report. The present invention can quickly and accurately judge the distribution terminal fault recording performance based on the similarity between the fault recording waveform and the reference fault waveform without the need for manual judgment, thereby reducing labor costs and accelerating the progress and accuracy of the distribution terminal function test.
[0058] To achieve the above object, the present invention also provides a distribution terminal fault recording test system based on weighted optimization DTW algorithm, comprising:
[0059] A comparison sequence calculation module obtains a time series of a fault recording waveform of the device under test and uses a derivative of the time series as a comparison sequence;
[0060] A reference sequence calculation module is used to obtain a time series of a fault recording waveform of the recorder, and a derivative of the time series is used as a reference sequence;
[0061] A similarity calculation module, which uses a time-weighted DTW algorithm to calculate the similarity between the comparison sequence and the reference sequence;
[0062] The recording judgment module judges whether the fault recording of the device under test is qualified according to the similarity.
[0063] According to an embodiment of the present invention, before calculating the similarity between the comparison sequence and the reference sequence using the time-weighted DTW algorithm, the method further includes:
[0064] The cross-correlation function is calculated for the comparison sequence and the reference sequence. When the maximum value of the cross-correlation function is greater than the set threshold, it is determined that the reference sequence and the comparison sequence are not recorded at the same time, and the similarity calculation is stopped.
[0065] Further, according to an embodiment of the present invention, the similarity between the comparison sequence and the reference sequence is calculated using a time-weighted DTW algorithm, including:
[0066] Adopt window constraint to cut fault waveform: the generation of comparison sequence and reference sequence only covers the four cycles before and the eight cycles after the fault moment;
[0067] Define time weight: The fault time point is taken as the point with the maximum weight, and the weight of the time point farther away from the fault time point is smaller;
[0068] Initialize the distance matrix of the DTW algorithm;
[0069] Calculate the distance between corresponding elements: According to the distance matrix, calculate the distance between the corresponding time points in the comparison sequence and the reference sequence, and then multiply it by the weight of the corresponding time point;
[0070] Calculate the DTW distance: Use a recursive algorithm to find the shortest path length between the comparison sequence and the reference sequence at the corresponding time point;
[0071] Calculate similarity: The similarity between the comparison sequence and the reference sequence is calculated based on the shortest path length.
[0072] Furthermore, according to an embodiment of the present invention, it also includes: using an early stopping strategy to shorten the calculation time of the DTW algorithm.
[0073] Further, according to an embodiment of the present invention, the early stopping strategy includes:
[0074] Early stopping strategy based on cumulative distance threshold: Set the cumulative distance threshold A. When the cumulative distance calculated by the DTW algorithm exceeds the cumulative distance threshold A, it is determined that the difference between the comparison sequence and the reference sequence is greater than the acceptable range, and the current calculation path is terminated in advance.
[0075] Further, according to an embodiment of the present invention, the early stopping strategy includes:
[0076] Early stopping strategy based on similarity measurement: set a similarity threshold B. When the similarity measurement calculated by the DTW algorithm is higher than the similarity threshold B, it is determined that the matching degree between the comparison sequence and the reference sequence meets the requirement, and the DTW calculation is terminated in advance.
[0077] According to the above scheme of the present invention, the present invention obtains the distribution terminal fault waveform as a comparison sequence by simulating line faults and setting up a simulated master station, obtains the waveform of a special recorder as a reference sequence, uses the maximum value of the cross-correlation function to judge the correctness of the recording file, and if the file is correct, uses a fast dynamic time warping algorithm with variable time weight to calculate the similarity between the comparison sequence and the reference sequence, judges whether the recording waveform is qualified based on the similarity, and outputs a test report. The present invention can quickly and accurately judge the distribution terminal fault recording performance based on the similarity between the fault recording waveform and the reference fault waveform without the need for manual judgment, thereby reducing labor costs and accelerating the progress and accuracy of the distribution terminal function test.
[0078] To achieve the above objectives, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm as described above is implemented.
[0079] To achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm as described above is implemented.
[0080] Based on the above solution of the present invention, the solution of the present invention is described in detail in the following in combination with the accompanying drawings in the form of a specific embodiment.
[0081] Example 1
[0082] Build a system that can complete the distribution terminal fault recording test method based on the weighted optimization DTW algorithm. The system structure is as follows: Figure 2 As shown, the system may include:
[0083] 1. Power distribution terminal test platform.
[0084] In this embodiment, the distribution terminal test platform includes a large number of distribution terminal automation and semi-automation test cases. The test platform has a test case running environment and also has a simulated master station function, and can communicate with the device under test through 104 and 101 protocols. The test platform can communicate with the tester through a private protocol and control the tester to output state quantities. In addition to simulating faults, the test platform can also download field and true-shape test waveforms for testing ground faults or simulating field faults.
[0085] 2. Tester.
[0086] In this embodiment, the tester has the functions of state quantity output, binary input and output, and waveform playback, and is connected to the test platform and can communicate with the power distribution terminal test platform. The tester is connected to the device under test through a dedicated test line to simulate the operation and fault of the device in the line.
[0087] 3. Device under test.
[0088] In this embodiment, the device under test includes various types of power distribution terminals, including station terminals, feeder terminals, etc. Before testing, the device under test needs to be configured with a communication point table.
[0089] 4. Oscilloscope.
[0090] In this embodiment, the recorder refers to a dedicated line recording device, and its sampling accuracy and sampling frequency are much higher than those of the device under test.
[0091] Figure 3 This is a flow chart of a distribution terminal fault recording test method based on a weighted optimization DTW algorithm according to Embodiment 1 of the present invention. The fault recording test method comprises:
[0092] 1. Use the power distribution terminal test platform to connect the tester and the device under test to perform fault simulation.
[0093] After selecting the test case, set the tester type and the device type to be tested in the test platform, and import the configured communication point table into the test case. It should be noted that after selecting the corresponding test case, the device under test needs to be put into protection of the corresponding function and the fault recording function should be turned on.
[0094] 2. Use the power distribution terminal test platform to communicate with the device under test and the recorder and obtain the fault recording.
[0095] In this embodiment, the power distribution terminal test platform has the function of simulating a master station, and can communicate with the device under test based on the 104 protocol through Ethernet or 4G module, and can use the message agreed in the 104 protocol to read the fault recording, and read the recording generated at the latest moment in the device under test by default. The recorder used in this system has a sampling frequency far higher than that of the device under test, and the corresponding time recording can be retrieved through Ethernet.
[0096] 3. Use the dynamic time warping algorithm to calculate the shortest path length between the comparison sequence and the reference sequence.
[0097] In this embodiment, the DTW algorithm calculates the similarity between two time series by extending and shortening the time series. Specifically, the DTW algorithm will find a warp path that passes through all similar points and calculate the sum of the distances between these similar points. This distance is called the warp path distance, which is used to measure the similarity between two time series. This algorithm avoids problems in topology recognition caused by errors in time synchronization. After finding the optimal curved path, the DTW distance under the path can be converted into similarity through the formula to judge the similarity between the two curves.
[0098] 4. Output the test report.
[0099] In this embodiment, after each item is tested, the test result of the item is automatically filled in the corresponding place of the report template. The test report template can be prepared in combination with the items to be tested before the test.
[0100] Figure 4 This is an algorithm flow chart of the weighted optimization DTW algorithm according to Embodiment 1 of the present invention. Since the standard DTW algorithm does not consider the weight of the time point, in order to better characterize the accuracy of the fault recording, the present invention assigns different weights to different time points in the DTW calculation. After adding the time point weight, the steps of the improved DTW algorithm can be divided into:
[0101] Adopt window constraint to cut fault waveform: To reduce the amount of calculation and maintain good matching effect, the generation of comparison sequence and reference sequence only covers the four cycles before and the eight cycles after the fault moment to improve the calculation speed.
[0102] Obtaining comparison sequence and reference sequence: To solve the problem that the DTW algorithm cannot effectively find the similarity between time series with large speed changes during the calculation process, this embodiment does not directly measure the similarity of two original time series, but obtains the first-order derivative of the two original time series to obtain two derivative time series (i.e., comparison sequence and reference sequence), and then measures the similarity of the two derivative time series. Specifically, if the fault recording discrete curve is used as the time series , then the derivative time series is obtained by the following formula (1). The fault recording curves of the device under test and the recorder are calculated by this formula to obtain the comparison sequence and reference sequence.
[0103] (1)
[0104] Defining weights: If the discrete curve of the fault recording of the device under test is used as a time series , the discrete curve of the recorded waveform obtained by sampling the waveform recorder is used as the time series , then the weight can be used Indicates that , , i and j are time points in two time series X and Y. The present invention takes the fault moment as the point with the maximum weight, and the farther away from the fault moment, the smaller the weight.
[0105] Initialize the distance matrix: Create a two-dimensional matrix to store the cumulative distance. The size of the matrix should be equal to the length of the two sequences. In the algorithm, the distance matrix should be initialized to 0 first, that is:
[0106]
[0107] Furthermore, initialize the cumulative distance matrix:
[0108]
[0109]
[0110] Calculate the distance between corresponding elements: Starting from the upper left corner of the matrix, calculate the distance (point-to-point distance) between corresponding elements (time points) in the two comparison sequences and the reference sequence, multiplied by the weight of the corresponding time point.
[0111] Among them, find the distance between points:
[0112]
[0113] Calculate DTW distance: Because the matrix is , from the upper left corner of the matrix To any point The shortest path length is The shortest path of the current element (time point) must be the length of the shortest path of the previous element plus the value of the current element. Then a recursive algorithm can be used to find the shortest path length:
[0114]
[0115] The judgment result is output by the curve similarity:
[0116] In this embodiment, based on the above shortest path length calculation process, for the time series With time series The DTW distance can be expressed as:
[0117] , where m and n are the time points in the time series X and Y respectively;
[0118] For the convenience of calculation, the similarity S between the comparison sequence of the fault recording waveform of the device under test and the reference sequence of the fault recording waveform of the recorder can be expressed as:
[0119]
[0120] In this embodiment, the greater the similarity, the greater S is, and the higher the accuracy of characterizing the fault waveform is.
[0121] Furthermore, in this embodiment, it also includes: using an early stopping strategy to terminate the calculation early.
[0122] In this embodiment, the improved DTW algorithm has two early stopping strategies to shorten the algorithm calculation time.
[0123] Early stopping strategy based on cumulative distance threshold: Set threshold A. When the calculated cumulative distance exceeds this threshold A, the current calculation path is terminated early, that is, it is considered that the difference between the comparison sequence and the reference sequence is greater than the acceptable range. Threshold A is set according to experimental experience.
[0124] Early stopping strategy based on similarity measurement: Set threshold B. During the calculation process, if the similarity measurement of the current path is higher than the similarity threshold B, the calculation is terminated early, that is, it is considered that the matching degree of the two time series is high enough and there is no need to continue searching for other matching paths.
[0125] As can be seen from the above, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm provided in this embodiment obtains the derivative of the time series of the fault recording waveform of the device under test as the comparison sequence, obtains the derivative of the time series of the fault recording waveform of the special recorder as the reference sequence, and uses the time-weighted dynamic time warping algorithm to calculate the similarity between the comparison sequence and the reference sequence, and determines the distribution terminal recording accuracy and outputs the report based on the similarity, and the algorithm also uses an early stop strategy to shorten the algorithm calculation time. Since the accuracy of the recording of the device under test can be quickly and accurately judged based on the similarity of the fault recording waveform without manual intervention, the present invention can reduce labor costs and improve the efficiency and reliability of factory inspection and network inspection of the device.
[0126] Optionally, in the above embodiment, the wave recording test method further includes:
[0127] Calculate the cross-correlation function of the recorded discrete curve for preliminary judgment.
[0128] In this embodiment, before using the DTW algorithm to calculate the curve similarity, the cross-correlation function of the waveform of the device under test and the reference waveform can be performed to pre-judge the correctness of the file. If there is a problem with the device and no waveform is generated when a fault occurs or the waveform is generated at an incorrect time, the called waveform will be extremely inconsistent with the reference waveform. By setting the relevant threshold, unqualified devices can be screened out through this calculation step, thereby speeding up the device detection progress.
[0129] Those skilled in the art will appreciate that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method implementation methods, and will not be repeated here.
[0131] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0132] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0133] In addition, each functional module in the embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0134] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the energy-saving signal sending / receiving method of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0135] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
[0136] It should be understood that the size of the serial numbers of each step in the content of the invention and the implementation methods of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present invention.
Claims
1. A distribution terminal fault recording test method based on weighted optimization DTW algorithm, characterized in that: include: Obtaining a time series of a fault recording waveform of the device under test, and using a derivative of the time series as a comparison series; Obtaining a time series of a fault recording waveform of a recorder, and using a derivative of the time series as a reference series; Calculating the similarity between the comparison sequence and the reference sequence using a time-weighted DTW algorithm; Whether the fault recording of the device under test is qualified is judged according to the similarity.
2. The distribution terminal fault recording test method based on the weighted optimization DTW algorithm according to claim 1 is characterized in that: Before calculating the similarity between the comparison sequence and the reference sequence using the DTW algorithm with time weight, the method further includes: A cross-correlation function is calculated for the comparison sequence and the reference sequence. When the maximum value of the cross-correlation function calculation is greater than a set threshold, it is determined that the reference sequence and the comparison sequence are not recorded at the same time, and the similarity calculation is stopped.
3. The distribution terminal fault recording test method based on the weighted optimization DTW algorithm according to claim 1 is characterized in that: The calculating the similarity between the comparison sequence and the reference sequence using the time-weighted DTW algorithm includes: The fault waveform is cut by using window constraints: the generation of the comparison sequence and the reference sequence only covers the four cycles before and the eight cycles after the fault moment; Define time weight: The fault time point is taken as the point with the maximum weight, and the weight of the time point farther away from the fault time point is smaller; Initialize the distance matrix of the DTW algorithm; Calculating the distance of corresponding elements: calculating the distance between the corresponding time points in the comparison sequence and the reference sequence according to the distance matrix, and then multiplying the distance by the weight of the corresponding time point; Calculating the DTW distance: using a recursive algorithm to find the shortest path lengths of corresponding time points in the comparison sequence and the reference sequence; Calculating similarity: Calculating the similarity between the comparison sequence and the reference sequence according to the shortest path length.
4. The distribution terminal fault recording test method based on the weighted optimization DTW algorithm according to claim 1 is characterized in that: Also includes: Use early stopping strategy to shorten the computation time of DTW algorithm.
5. The distribution terminal fault recording test method based on weighted optimization DTW algorithm according to claim 4 is characterized in that: The early stopping strategy includes: Early stopping strategy based on cumulative distance threshold: Set the cumulative distance threshold A. When the cumulative distance calculated by the DTW algorithm exceeds the cumulative distance threshold A, it is determined that the difference between the comparison sequence and the reference sequence is greater than the acceptable range, and the current calculation path is terminated in advance.
6. The distribution terminal fault recording test method based on the weighted optimization DTW algorithm according to claim 4 is characterized in that: The early stopping strategy includes: Early stopping strategy based on similarity measurement: set a similarity threshold B. When the similarity measurement calculated by the DTW algorithm is higher than the similarity threshold B, it is determined that the matching degree between the comparison sequence and the reference sequence meets the requirement, and the DTW calculation is terminated in advance.
7. The distribution terminal fault recording test system based on weighted optimization DTW algorithm is characterized by: include: A comparison sequence calculation module obtains a time series of a fault recording waveform of the device under test and uses a derivative of the time series as a comparison sequence; A reference sequence calculation module is used to obtain a time series of a fault recording waveform of the recorder, and a derivative of the time series is used as a reference sequence; A similarity calculation module, which uses a time-weighted DTW algorithm to calculate the similarity between the comparison sequence and the reference sequence; The recording judgment module judges whether the fault recording of the device under test is qualified according to the similarity.
8. An electronic device, characterized in that The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for testing distribution terminal fault recording based on the weighted optimized DTW algorithm as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the distribution terminal fault recording test method based on the weighted optimization DTW algorithm as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Blind guide glasses based on motion sensor and work method of blind guide glasses
CN103385795A
Inter-station time difference analysis method based on fault wave recording data
CN106950445A