A load spectrum clustering method and system based on DTW distance

Through the load spectrum clustering method and hierarchical clustering technology of DTW distance, the problem of payload spectrum similarity judgment is solved, accurate clustering and damage calculation of load spectrum are achieved, and the accuracy of relative damage calculation is improved.

CN117131397BActive Publication Date: 2024-11-05BEIHANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311130261.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2024-11-05
Estimated Expiration
2043-09-04

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately calculate the similarity of the load spectrum, which affects the accuracy of relative damage calculations, especially the inconsistency of critical damage values ​​under the high and low load order effect of the load spectrum.

Method used

Dynamic Time War (DTW) distance is used as a measure of load spectrum similarity, and the load spectrum with a close DTW distance is clustered through hierarchical clustering, and the cluster number of clusters is determined using the Dunn index to determine the clustering of the load spectrum. Class results.

Benefits of technology

Through the load spectrum clustering method based on DTW distance, the similarity and damage dispersion of the load spectrum can be effectively characterized, providing an accurate basis for relative damage calculation, and solving the problem of judging the similarity of the load spectrum.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131397B_ABST
    Figure CN117131397B_ABST
Patent Text Reader

Abstract

The present invention discloses a load spectrum clustering method and system based on DTW distance, wherein the method comprises: S1, collecting load spectrum data, and preprocessing the load spectrum data to obtain a peak-valley value sequence; S2, calculating the DTW distance based on the peak-valley value sequence, and clustering the load spectrum based on the DTW distance to obtain a preliminary clustering result; S3, evaluating the preliminary clustering result, and determining the final clustering result based on the evaluation result. The present invention clusters the load spectrum according to the similarity. After the clustering is completed, for each type of load spectrum, there is a certain degree of similarity between them, and a relative damage calculation method is used to calculate the damage of each type of load spectrum, thereby obtaining a damage sample, which provides a basis for the dispersion characterization of load spectrum damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of aircraft measured load spectrum processing, and in particular relates to a load spectrum clustering method and system based on DTW distance. Background Art

[0002] There are certain differences in the load-time history experienced by each single machine in the fleet during actual use. Even when the same single machine performs the same task, its load-time history also has certain differences. In order to characterize the differences in the load spectra used by the above-mentioned single machines, it is necessary to study the dispersion of the load spectra used, and the key lies in the damage calculation of the load spectrum.

[0003] There are many difficulties in accurately calculating the damage of the load spectrum. One of them is the order effect of high and low loads in the load spectrum. Studies have shown that when the spectrum types in the load spectrum are arranged from high to low, the critical damage value will be lower than 1, while when arranged from low to high, the critical damage value will be higher than 1. Many researchers have proposed many damage accumulation theories from different perspectives, but they all have certain limitations. In 1979, Schutz pointed out in the literature that "for two load spectra with similar shapes, their critical damage values ​​are consistent, and the life of one load spectrum can be determined by the life of another load spectrum", which is the relative damage calculation method.

[0004] The key to relative damage calculation lies in how to judge the similarity between two load spectra. The simplest method is to regard the two load spectra as coordinate points in a high-dimensional space and judge the similarity between the load spectra by calculating the Euclidean distance between the two points. However, the length of the measured load spectrum is usually random and unlikely to be completely consistent. The above-mentioned measurement method using Euclidean distance is not suitable. Therefore, it is necessary to propose a load spectrum clustering method to solve the above problem. Summary of the invention

[0005] The present invention aims to solve the shortcomings of the prior art and proposes a load spectrum clustering method and system based on TW distance. The DTW distance is used as a measure of load spectrum similarity. According to the hierarchical clustering method, load spectra with close DTW distances are clustered in turn. Finally, the number of clusters is determined according to the Dunn index, thereby determining the result of load spectrum clustering.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A load spectrum clustering method based on DTW distance includes the following steps:

[0008] S1. collecting load spectrum data, and obtaining a peak-valley value sequence based on the load spectrum data;

[0009] S2, calculating the DTW distance based on the peak-to-valley value sequence, and performing load spectrum clustering based on the DTW distance to obtain a preliminary clustering result;

[0010] S3. Evaluate the preliminary clustering result, and determine the final clustering result based on the evaluation result.

[0011] Preferably, the S1 includes:

[0012] Extracting peak and valley values ​​of the load spectrum data to obtain a peak and valley value load sequence;

[0013] The peak-to-valley value load sequence is standardized to obtain the peak-to-valley value sequence.

[0014] Preferably, the S2 includes:

[0015] Calculating the Euclidean distances of the components of the two peak-to-valley value sequences, constructing the Euclidean distances of the components into a distance matrix, and initializing the distance matrix;

[0016] Select a shortest path based on the initialized distance matrix, and calculate the DTW distance of the shortest path;

[0017] Constructing a DTW distance matrix based on the DTW distance, and arranging the elements in the DTW distance matrix in ascending order to obtain a DTW value sequence;

[0018] The load spectrum is clustered based on the DTW value sequence to obtain a preliminary clustering result.

[0019] Preferably, S3 includes:

[0020] The Dunn coefficient is used to evaluate the preliminary clustering results to obtain the final number of categories;

[0021] The final number of categories is set as a cutoff value, and a final clustering result is obtained based on the cutoff value.

[0022] The present invention also provides a load spectrum clustering system based on DTW distance, comprising:

[0023] Preprocessing unit, clustering unit and evaluation unit;

[0024] The preprocessing unit is used to collect load spectrum data and obtain a peak-valley value sequence based on the load spectrum data;

[0025] The clustering unit is used to calculate the DTW distance based on the peak-to-valley value sequence, and perform load spectrum clustering based on the DTW distance to obtain a preliminary clustering result;

[0026] The evaluation unit is used to evaluate the preliminary clustering result and determine the final clustering result based on the evaluation result.

[0027] Preferably, the method by which the preprocessing unit obtains the peak-to-valley value sequence includes:

[0028] Extracting peak and valley values ​​of the load spectrum data to obtain a peak and valley value load sequence;

[0029] The peak-to-valley value load sequence is standardized to obtain the peak-to-valley value sequence.

[0030] Preferably, the method for the clustering unit to obtain the preliminary clustering result of book search includes:

[0031] Calculating the Euclidean distances of the components of the two peak-to-valley value sequences, constructing the Euclidean distances of the components into a distance matrix, and initializing the distance matrix;

[0032] Select a shortest path based on the initialized distance matrix, and calculate the DTW distance of the shortest path;

[0033] Constructing a DTW distance matrix based on the DTW distance, and arranging the elements in the DTW distance matrix in ascending order to obtain a DTW value sequence;

[0034] The load spectrum is clustered based on the DTW value sequence to obtain a preliminary clustering result.

[0035] Preferably, the method by which the evaluation unit obtains the final clustering result includes:

[0036] The Dunn coefficient is used to evaluate the preliminary clustering results to obtain the final number of categories;

[0037] The final number of categories is set as a cutoff value, and a final clustering result is obtained based on the cutoff value.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The load spectrum clustering method based on DTW distance proposed in this paper clusters the load spectra according to similarity. After clustering, for each type of load spectrum, there is a certain degree of similarity between them. The relative damage calculation method is used to calculate the damage of each type of load spectrum, thereby obtaining damage samples, which provides a basis for the dispersion characterization of load spectrum damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0041] Figure 1 This is a flow chart of a load spectrum clustering method based on DTW distance according to an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a DTW distance calculation path according to an embodiment of the present invention;

[0043] Figure 3 Schematic diagram of peak and valley load sequence of load spectrum according to an embodiment of the present invention;

[0044] Figure 4 This is a schematic diagram showing the comparison before and after the standardization process of an embodiment of the present invention;

[0045] Among them, (a) is a schematic diagram before standardization; (b) is a schematic diagram after standardization;

[0046] Figure 5 This is a hierarchical clustering dendrogram of an embodiment of the present invention;

[0047] Figure 6 Schematic diagram of the change of DVI value with the number of categories M according to an embodiment of the present invention;

[0048] Figure 7 This is a schematic diagram for comparing similar load spectra of embodiments of the present invention;

[0049] Among them, (a) is a comparison chart of spectrum 20 and spectrum 24; (b) is a comparison chart of spectrum 28 and spectrum 40;

[0050] Figure 8 Schematic diagram for comparing different types of load spectra according to an embodiment of the present invention.

[0051] Among them, (a) is a comparison chart of spectrum 8 and spectrum 9; (b) is a comparison chart of spectrum 19 and spectrum 9. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Embodiment 1

[0055] like Figure 1 As shown, this embodiment provides a load spectrum clustering method based on DTW distance, comprising the following steps:

[0056] S1. Collect load spectrum data, and obtain peak-valley value sequence based on the load spectrum data; specifically,

[0057] Firstly, the peak and valley values ​​of the load spectrum data are extracted to obtain the peak and valley value load sequence.

[0058] This embodiment uses the following method to extract peak and valley values:

[0059]

[0060] In the formula, σ i Indicates the current speed. According to the above method, a load sequence with only peak and valley values ​​can be obtained;

[0061] The load sequence is filtered, and the small variation range in the load sequence is deleted to obtain the peak-to-valley load sequence. In this embodiment, the threshold of the filter is selected as 8% of the maximum peak value and the minimum estimate value.

[0062] Then, the peak-valley value load sequence is standardized to obtain the peak-valley value sequence.

[0063] In this embodiment, the method of standardization processing includes:

[0064]

[0065] In the formula, x′ i represents the i-th data value after standardization, x i represents the i-th data value before standardization, μ represents the sample mean of the load spectrum peak and valley value sequence, and σ represents the sample standard deviation of the load spectrum peak and valley value sequence.

[0066] The calculation methods of μ and σ include:

[0067]

[0068] In the formula, n represents the total number of data samples, x i represents the i-th data value before normalization, Represents the mean of the sample data.

[0069] S2, calculate the DTW distance based on the peak-to-valley value sequence, and cluster the load spectrum based on the DTW distance to obtain preliminary clustering results;

[0070] For any two peak-to-valley value sequences (possibly of unequal length) after the above processing: X = {x1, x2, ..., x m}, Y = {y1, y2, ..., y n}, measure the distance or similarity between two peak-valley value sequences. Specifically:

[0071] First, calculate the Euclidean distance between the two peak-to-valley sequence components: d f,g =|x f -y g |, where x r With y g Represent the components of the two peak-to-valley value sequences respectively; and construct a distance matrix based on the Euclidean distance between the components, and initialize the distance matrix.

[0072] Then, a path {w1, w2, ..., w k}, where k∈[max{m,n},m+n-1), w1=(1,1), w k =(m, n); the above path is monotonous and continuous, so that the final accumulated DTW distance is the shortest. The DTW distance calculation method includes:

[0073] DTW ij =d(i, j)+min{DTW i-1,j-1 , DTW i,j-1 , DfW i-1,j},

[0074] The final accumulated DTW m,n The minimum distance is taken as the DTW distance between the two peak-to-valley value sequences mentioned above, as follows: Figure 2 shown.

[0075] An N×N DTW distance matrix is ​​constructed using the obtained DTW distances, and the elements in the DTW distance matrix are arranged in ascending order to obtain a DTW value sequence.

[0076] Among them, the DTW distance matrix is ​​as follows:

[0077] The elements on the main diagonal of the DTW distance matrix are all 0 and are symmetric about the main diagonal;

[0078]

[0079] Where D N-1,N Represents the DTW distance between the N-1th load spectrum and the Nth load spectrum.

[0080] Based on the above DTW value sequence, the load spectrum is clustered to obtain the preliminary clustering results. The specific steps are as follows:

[0081] First, the elements in the DTW distance matrix D are arranged in ascending order to obtain a DTW value sequence, and the index value corresponding to each element is recorded, and the initial number of categories is set to M = N;

[0082]

[0083] In the formula, D′ represents the reordered DTW value sequence, d j (j=1, 2, ..., N′) represents each reordered DTW value, N′ represents the length of the DTW sequence, and N represents the total number of load spectra to be clustered.

[0084] Then, in order of size, the two load spectra corresponding to d1 with the smallest DTW value are clustered into one category and marked as clustered. At this time, the number of categories is reduced by 1;

[0085] After that, starting from d2, the two corresponding load spectra are judged as follows: if both load spectra are not clustered, the two load spectra are merged into one category, the number of categories is reduced by 1, and the two load spectra are marked as clustered; if one of the two load spectra has been clustered into a certain category, the other one is assigned to the category, the number of categories is reduced by 1, and the spectrum is marked as clustered; if the two load spectra are divided into different categories, the categories to which the two load spectra belong are merged, and the number of categories is reduced by 1;

[0086] Finally, the previous step is repeated until all DTW values ​​are retrieved or a certain set condition is met.

[0087] Through the above clustering method, a hierarchical clustering dendrogram of a set of load spectra can be obtained. If the number of clusters (ie the number of categories) is set, the number of the load spectrum corresponding to each cluster can also be obtained.

[0088] S3. Evaluate the preliminary clustering results and determine the final clustering results based on the evaluation results.

[0089] In this embodiment, the Dunn coefficient is used to evaluate the preliminary clustering result, that is, the above-mentioned hierarchical clustering dendrogram, to obtain the final number of categories; specifically:

[0090] The Dunn index is defined as the ratio of the minimum distance between two clusters to the maximum distance within a cluster, and is calculated as follows:

[0091]

[0092] In the formula, K represents the number of categories obtained by the final clustering, Ω m ,Ω n represents the mth, nth class, x f ,y g Represent elements in two categories respectively.

[0093] Among them, the higher the DVI value, the larger the distance between clusters and the smaller the distance within clusters, that is, the more significant the difference between different classes, the higher the similarity within the same class, and the better the clustering effect. When clustering, calculate the DVI values ​​corresponding to different numbers of clusters, and select the cluster number with a larger DVI value and a smaller number of clusters relative to the total number of samples (that is, the total number of load spectra to be clustered) as the final number of categories to be divided M0.

[0094] The final number of categories is set as the cutoff value, which is the condition set in S2. The result at the cutoff is taken as the final clustering result.

[0095] Embodiment 2

[0096] The embodiment of the present invention provides a load spectrum clustering system based on DTW distance, including: a preprocessing unit, a clustering unit and an evaluation unit.

[0097] The preprocessing unit is used to collect load spectrum data and obtain a peak-valley value sequence based on the load spectrum data;

[0098] The working process of the pre-processing unit includes:

[0099] Firstly, the peak and valley values ​​of the load spectrum data are extracted to obtain the peak and valley value load sequence.

[0100] This embodiment uses the following method to extract peak and valley values:

[0101]

[0102] In the formula, σ i Indicates the current speed. According to the above method, a load sequence with only peak and valley values ​​can be obtained;

[0103] The load sequence is filtered, and the small variation range in the load sequence is deleted to obtain the peak-to-valley load sequence. In this embodiment, the threshold of the filter is selected as 8% of the maximum peak value and the minimum estimate value.

[0104] Then, the peak-valley value load sequence is standardized to obtain the peak-valley value sequence.

[0105] In this embodiment, the method of standardization processing includes:

[0106]

[0107] In the formula, x′ irepresents the i-th data value after standardization, x i represents the i-th data value before standardization, μ represents the sample mean of the load spectrum peak and valley value sequence, and σ represents the sample standard deviation of the load spectrum peak and valley value sequence.

[0108] The calculation methods of μ and σ include:

[0109]

[0110] In the formula, n represents the total number of data samples, x i represents the i-th data value before normalization, Represents the mean of the sample data.

[0111] The clustering unit is used to calculate the DTW distance based on the peak-valley value sequence, and to cluster the load spectrum based on the DTW distance to obtain preliminary clustering results;

[0112] The working process of the clustering unit includes:

[0113] For any two peak-to-valley value sequences (possibly of unequal length) after the above processing: X = {x1, x2, ..., x m}, Y = {y1, y2, ..., y n}, measure the distance or similarity between two peak-valley value sequences. Specifically:

[0114] First, calculate the Euclidean distance between the two peak-to-valley sequence components: d f,g =|x f -y g |, where x f With y g Represent the components of the two peak-to-valley value sequences respectively; and construct a distance matrix based on the Euclidean distance between the components, and initialize the distance matrix.

[0115] Then, a path {w1, w2, ..., w k}, where k∈[max{m,n},m+n-1), w1=(1,1), w k =(m, n); the above path is monotonous and continuous, so that the final accumulated DTW distance is the shortest. The DTW distance calculation method includes:

[0116] DTW ij =d(i, j)+min{DTW i-1,j-1 , DTW i,j-1 , DTW i-1,j},

[0117] The final accumulated DTW m,nThe minimum distance is taken as the DTW distance between the above two peak-to-valley value sequences.

[0118] An N×N DTW distance matrix is ​​constructed using the obtained DTW distances, and the elements in the DTW distance matrix are arranged in ascending order to obtain a DTW value sequence.

[0119] Among them, the DTW distance matrix is ​​as follows:

[0120] The elements on the main diagonal of the DTW distance matrix are all 0 and are symmetric about the main diagonal;

[0121]

[0122] Where D N-1,N Represents the DTW distance between the N-1th load spectrum and the Nth load spectrum.

[0123] Based on the above DTW value sequence, the load spectrum is clustered to obtain the preliminary clustering results. The specific steps are as follows:

[0124] First, the elements in the DTW distance matrix D are arranged in ascending order to obtain a DTW value sequence, and the index value corresponding to each element is recorded, and the initial number of categories is set to M = N;

[0125]

[0126] In the formula, D′ represents the reordered DTW value sequence, d j (j=1, 2, ..., N′) represents each reordered DTW value, N′ represents the length of the DTW sequence, and N represents the total number of load spectra to be clustered.

[0127] Then, in order of size, the two load spectra corresponding to d1 with the smallest DTW value are clustered into one category and marked as clustered. At this time, the number of categories is reduced by 1;

[0128] After that, starting from d2, the two corresponding load spectra are judged as follows: if both load spectra are not clustered, the two load spectra are merged into one category, the number of categories is reduced by 1, and the two load spectra are marked as clustered; if one of the two load spectra has been clustered into a certain category, the other one is assigned to the category, the number of categories is reduced by 1, and the spectrum is marked as clustered; if the two load spectra are divided into different categories, the categories to which the two load spectra belong are merged, and the number of categories is reduced by 1;

[0129] Finally, the previous step is repeated until all DTW values ​​are retrieved or a certain set condition is met.

[0130] Through the above clustering method, a hierarchical clustering dendrogram of a set of load spectra can be obtained. If the number of clusters (ie the number of categories) is set, the number of the load spectrum corresponding to each cluster can also be obtained.

[0131] The evaluation unit is used to evaluate the preliminary clustering results and determine the final clustering results based on the evaluation results.

[0132] In this embodiment, the Dunn coefficient is used to evaluate the preliminary clustering result, that is, the above-mentioned hierarchical clustering dendrogram, to obtain the final number of categories; specifically:

[0133] The Dunn index is defined as the ratio of the minimum distance between two clusters to the maximum distance within a cluster, and is calculated as follows:

[0134]

[0135] In the formula, K represents the number of categories obtained by the final clustering, Ω m ,Ω n Represents the mth and nth categories.

[0136] Among them, the higher the DVI value, the larger the distance between clusters and the smaller the distance within clusters, that is, the more significant the difference between different classes, the higher the similarity within the same class, and the better the clustering effect. When clustering, calculate the DVI values ​​corresponding to different numbers of clusters, and select the cluster number with a larger DVI value and a smaller number of clusters relative to the total number of samples (that is, the total number of load spectra to be clustered) as the final number of categories to be divided M0.

[0137] Set the final number of categories as the cutoff value as the condition set in the clustering unit. The result at the cutoff is the final clustering result.

[0138] Embodiment 3

[0139] This embodiment will select several types of load spectrum peak and valley value sequences generated randomly to explain the method steps of the present invention in detail. In this embodiment, a total of 43 load spectra are selected.

[0140] First, the load spectrum data is processed, and the peak and valley values ​​are extracted and the small load is deleted, and the following is obtained: Figure 3 Peak-to-valley load sequence shown.

[0141] Then standardize it, and compare it before and after standardization. Figure 4 As shown in (a)(b).

[0142] Then the DTW distances between the load spectra are calculated. For the case where 43 load spectra are clustered in this embodiment, the final DTW distance matrix is ​​a 43×43 square matrix, where the length of the DTW distance sequence above the main diagonal that needs to be considered in actual clustering is Only a part of the DTW sequence and its corresponding two load spectrum numbers are shown here.

[0143] The DTW value sequence is:

[0144]

[0145] The corresponding load spectrum index value sequence is:

[0146]

[0147] The DTW value sequence calculated above is reordered in ascending order, and the corresponding load spectrum index value sequence is reordered, and the initial number of categories is set to M=43. The reordering result is as follows (due to its long length, only a part is shown).

[0148]

[0149] At this time, the corresponding load spectrum index value sequence is:

[0150]

[0151] In order, the two load spectra corresponding to the first value in D′ are clustered into one category, namely, spectrum 19 and spectrum 23. Then, the two spectra are marked as clustered, and the number of categories is reduced by 1 (the number of categories is 42 at this time).

[0152] Starting from the second value in D′, it is necessary to determine whether there is a load spectrum that has been clustered. In this embodiment, the two load spectra 27 and 37 corresponding to the second value 1.2718 are not clustered, so these two load spectra are clustered into one category.

[0153] Repeat the above operation for subsequent values ​​in D′ until all values ​​are traversed.

[0154] Through the above steps, hierarchical clustering is completed, and a tree diagram of hierarchical clustering can be drawn as follows: Figure 5 shown.

[0155] Calculate the DVI values ​​corresponding to M = 2 to 42 respectively, and draw the curve of DVI value changing with M value as shown in Figure 6 shown.

[0156] according to Figure 6It can be seen that as the number of clusters increases, the Dunn index tends to increase. This is because the increase in the number of clusters means that the maximum distance within the cluster is decreasing. In the extreme case, each spectrum is a separate category. At this time, the distance within the cluster is 0, and the DVI value tends to infinity. Theoretically, the larger the DVI value, the better the clustering effect. However, the number of clusters should be considered at the same time. The more clusters there are relative to the total number of spectra, the less obvious the meaning of clustering. Therefore, it is necessary to choose an appropriate number of clusters while ensuring that the DVI value is large. Figure 6 It can be seen that when the number of clusters is 8 (the dotted line position in the figure), the DVI value reaches an extreme value. At this time, if the number of clusters is increased, the DVI value will not increase significantly, and the number of clusters will increase accordingly. Therefore, this set of load spectra can be divided into 8 categories, that is, the optimal number of categories is 8.

[0157] Taking M=8 as the clustering cutoff condition, the number of each type of load spectrum is finally obtained, as shown in Table 1:

[0158] Table 1

[0159]

[0160] For the above results, four groups of load spectrum data of the same category and different categories were randomly selected for comparison. The results are as follows: Figure 7 (a)(b), Figure 8 As shown in (a)(b) (for the convenience of comparison, the load spectra drawn are all standardized ones).

[0161] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A load spectrum clustering method based on DTW distance, characterized in that: The following steps are involved: S1, collecting load spectrum data, and obtaining a peak-to-valley value sequence based on the load spectrum data; S1 includes: The load spectrum data is subjected to peak-valley value extraction to obtain a peak-valley value load sequence; the peak-valley value extraction is performed: In the formula, σ i Indicates the current speed; according to the above method, a load sequence with only peak and valley values ​​is obtained; Filter the above load sequence, delete the small variation range in the load sequence, and obtain the peak-valley value load sequence; Standardizing the peak-valley value load sequence to obtain the peak-valley value sequence; Standardization methods include: In the formula, x' i represents the i-th data value after standardization, x i represents the i-th data value before standardization, μ represents the sample mean of the load spectrum peak and valley value sequence, and s represents the sample standard deviation of the load spectrum peak and valley value sequence; Among them, the calculation methods of μ and s include: In the formula, t represents the total amount of data samples, x i represents the i-th data value before normalization, Represents the average value of sample data; S2, calculating the DTW distance based on the peak-to-valley value sequence, and performing load spectrum clustering based on the DTW distance to obtain a preliminary clustering result; The S2 includes: Calculating the Euclidean distances of the components of the two peak-to-valley value sequences, constructing the Euclidean distances of the components into a distance matrix, and initializing the distance matrix; First, calculate the Euclidean distance between the two peak-to-valley sequence components: d f,g =|y f -y g |, where y f With y g Represent the components of two peak-to-valley value sequences respectively; construct a distance matrix based on the Euclidean distance between the components, and initialize the distance matrix; Based on the initialized distance matrix, a shortest path {w1, w2, ..., w k }, where k∈[max{m,n},m+n-1), w1=(1,1), w k =(m, n); calculating the DTW distance of the shortest path; wherein the DTW distance calculation method includes: DTW qr =d(q,r)+min{DTW q-1,r-1 ,DTW q,r-1 ,DTW q-1,r }, The final accumulated DTW m,n The minimum distance is taken as the DTW distance between the two peak-to-valley sequences. A DTW distance matrix is ​​constructed based on the DTW distance, and the elements in the DTW distance matrix are arranged in ascending order to obtain a DTW value sequence; the DTW distance matrix is ​​as follows: The elements on the main diagonal of the DTW distance matrix are all 0 and are symmetric about the main diagonal; Where D N-1,N represents the DTW distance between the N-1th load spectrum and the Nth load spectrum; Clustering the load spectrum based on the DTW value sequence to obtain a preliminary clustering result; In order of size, the two load spectra corresponding to d1 with the smallest DTW value are clustered into one category and marked as clustered, and the number of categories is reduced by 1; starting from d2, if both load spectra are not clustered, the two load spectra are merged into one category, the number of categories is reduced by 1, and the two load spectra are marked as clustered; if one of the two load spectra has been clustered into a certain category, the other one is assigned to the category, the number of categories is reduced by 1, and the spectrum is marked as clustered; if the two load spectra are divided into different categories, the categories to which the two load spectra belong are merged, and the number of categories is reduced by 1; until all DTW values ​​are indexed or the set conditions are met; S3, evaluating the preliminary clustering result, and determining the final clustering result based on the evaluation result; The S3 includes: The Dunn coefficient is used to evaluate the preliminary clustering results to obtain the final number of categories; the Dunn coefficient is defined as the ratio of the minimum distance between two clusters to the maximum distance within a cluster, and the calculation formula is as follows: In the formula, K represents the number of categories obtained by the final clustering, Ω m ,Ω n represents the m,nth class, x f , x g Represent elements in two categories respectively; When clustering, the Dunn index values ​​corresponding to different numbers of clusters are calculated, and the coarse clusters with larger Dunn index values ​​and smaller number of clusters relative to the total number of samples are selected as the final number of categories; Setting the final number of categories as a cutoff value, as the condition set in S2, and obtaining a final clustering result based on the cutoff value; A total of 43 load spectra were selected; Firstly, the load spectrum data is processed, and the peak and valley values ​​are extracted and small loads are deleted, and the peak and valley value load sequence is formed; Then standardize it; Then the DTW distance between each load spectrum is calculated. When 43 load spectra are clustered, the final DTW distance matrix is ​​a 43×43 square matrix, where the length of the DTW distance sequence above the main diagonal that needs to be considered in actual clustering is The DTW value sequence is: The corresponding load spectrum index value sequence is: The DTW value sequence calculated above is reordered from small to large, and the corresponding load spectrum index value sequence is reordered. Let the initial number of categories be M=43. The reordering results are as follows: At this time, the corresponding load spectrum index value sequence is: In order, the two load spectra corresponding to the first value in D′ are clustered into one category, namely, spectrum 19 and spectrum 23. Then, these two spectra are marked as clustered, and the number of categories is reduced by 1. At this time, the number of categories is 42. Starting from the second value in D′, it is necessary to determine whether there are any load spectra that have been clustered. The two load spectra 27 and 37 corresponding to the second value 1.2718 are not clustered, so these two load spectra are clustered into one category. Repeat the above operation for subsequent values ​​in D′ until all values ​​are traversed; Through the above steps, hierarchical clustering is completed and a tree diagram of hierarchical clustering is drawn; Calculate the DVI values ​​corresponding to M=2~42 respectively, and draw a curve of DVI value changing with M value; As the number of clusters increases, the Dunn index tends to increase. This is because the increase in the number of clusters means that the maximum distance within the cluster is decreasing. In the extreme case, each spectrum is a separate category. At this time, the distance within the cluster is 0, and the DVI value tends to infinity. The larger the DVI value, the better the clustering effect. It is necessary to choose an appropriate number of clusters and ensure that the DVI value is large. When the number of clusters is 8, the DVI value reaches an extreme value. At this time, if the number of clusters is increased, the DVI value will not increase significantly, and the number of clusters will increase accordingly. Therefore, this group of load spectra is divided into 8 categories, that is, the optimal number of categories is 8. M=8 is used as the clustering cutoff condition, and finally the number of each type of load spectrum is obtained.

2. A load spectrum clustering system based on DTW distance, the system is used to implement the method according to any one of claims 1, characterized in that: include: Preprocessing unit, clustering unit and evaluation unit; The preprocessing unit collects load spectrum data and obtains a peak-valley value sequence based on the load spectrum data; The clustering unit is used to calculate the DTW distance based on the peak-to-valley value sequence, and perform load spectrum clustering based on the DTW distance to obtain a preliminary clustering result; The evaluation unit is used to evaluate the preliminary clustering result and determine the final clustering result based on the evaluation result.

3. The load spectrum clustering system based on DTW distance according to claim 2, characterized in that: The method for the preprocessing unit to obtain the peak-to-valley value sequence includes: Extracting peak and valley values ​​of the load spectrum data to obtain a peak and valley value load sequence; The peak-to-valley value load sequence is standardized to obtain the peak-to-valley value sequence.

4. The load spectrum clustering system based on DTW distance according to claim 2, characterized in that: The method for the clustering unit to obtain the preliminary clustering result of book search includes: Calculating the Euclidean distances of the components of the two peak-to-valley value sequences, constructing the Euclidean distances of the components into a distance matrix, and initializing the distance matrix; Select a shortest path based on the initialized distance matrix, and calculate the DTW distance of the shortest path; Constructing a DTW distance matrix based on the DTW distance, and arranging the elements in the DTW distance matrix in ascending order to obtain a DTW value sequence; The load spectrum is clustered based on the DTW value sequence to obtain a preliminary clustering result.

5. The load spectrum clustering system based on DTW distance according to claim 2, characterized in that: The method for the evaluation unit to obtain the final clustering result includes: The Dunn coefficient is used to evaluate the preliminary clustering results to obtain the final number of categories; The final number of categories is set as a cutoff value, and a final clustering result is obtained based on the cutoff value.