A method for detecting energy sequence anomalies in CNC machine tool machining process

By preprocessing and aligning the energy sequence of CNC machine tools using Gaussian mixture clustering and dynamic time warping algorithms, and identifying ramp and descent values, combined with power and length anomaly factors, the accuracy and stability issues of energy sequence anomaly detection during CNC machine tool processing are solved, thereby improving detection efficiency and precision.

CN119989229BActive Publication Date: 2026-03-06SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies struggle to detect energy sequence anomalies in CNC machine tool processing in real time, and common anomaly detection algorithms are easily affected by uphill and downhill data, resulting in insufficient detection accuracy and stability.

Method used

Gaussian mixture clustering algorithm and dynamic time warping algorithm are used to preprocess, divide and align the energy sequence of CNC machine tool machining process, identify the uphill and downhill values, and detect them in combination with power and length anomaly factors.

Benefits of technology

It enables efficient and accurate detection of energy sequences during CNC machine tool processing, reduces energy loss, improves energy utilization efficiency, and provides support for intelligent monitoring and fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989229B_ABST
    Figure CN119989229B_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting energy sequence anomalies during CNC machine tool machining, belonging to the technical field of CNC machine tool energy anomaly detection. Specifically, it includes acquiring the standard energy sequence of the target workpiece during CNC machine tool machining; identifying and processing the ramp and descent sets within the energy sequence; and dividing the energy sequence into segments based on a Gaussian mixture clustering algorithm. k A standard energy sequence is obtained; the energy sequence to be detected is acquired, and the uphill and downhill sets in the energy sequence are identified and processed; the energy sequence is divided into groups based on the Gaussian mixture clustering algorithm. k The energy sequence to be detected; based on the dynamic time warping algorithm... k Class of energy sequences to be detected and corresponding k The method aligns standard energy sequences; calculates the power anomaly factor and length anomaly factor for each type of energy sequence; and determines whether each type of energy sequence is anomaly. The application of this invention can reduce energy loss and improve energy utilization efficiency in industrial production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CNC machine tool energy anomaly detection technology, and discloses a method for detecting energy sequence anomalies in the CNC machine tool machining process. Background Technology

[0002] As high-energy machining equipment, CNC milling machines have numerous energy-consuming components and a complex system structure. Under uncertain production conditions, abnormal energy consumption often occurs during the machining process. Furthermore, the complexity of the CNC milling machine system makes it prone to cascading failures; even if the failure rate of a single component is low, the scale effect causes the overall failure rate to increase exponentially, leading to abnormal energy consumption. This abnormal consumption is usually accompanied by significant energy loss and machining quality loss.

[0003] Energy sequence anomalies (or simply sequence anomalies) refer to an overall abnormality in the energy sequence during CNC milling. This can be caused by equipment malfunction, tooling issues, machining parameters, operator error, or other systemic anomalies. Energy sequence anomalies in CNC milling processes are further divided into sequence length anomalies and sequence power anomalies. Sequence length anomalies manifest as an increase or decrease in the length of the energy sequence compared to the standard energy sequence, while sequence power anomalies manifest as an increase or decrease in the power variation of the energy sequence compared to the standard energy sequence. Therefore, considering sequence anomalies comprehensively, further detailed analysis of the energy sequence is necessary.

[0004] However, most existing studies focus on the impact of machining parameters and tool parameters on energy and optimize them. Traditional energy monitoring and control methods mainly alarm when the energy of a single workpiece exceeds the control limit, but cannot detect energy anomalies in the machining process in real time. In addition, common anomaly detection algorithms are easily interfered with when dealing with the upslope and downslope data in the energy sequence during CNC machine tool machining, resulting in insufficient accuracy and stability of detection. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention proposes a method for detecting energy sequence anomalies during CNC machine tool machining.

[0006] The present invention adopts the following technical solution:

[0007] A method for detecting energy sequence anomalies during CNC machine tool machining, the method comprising the following steps:

[0008] S1: Obtain the standard energy sequence of the target workpiece during CNC machine tool machining. .

[0009] S2: Find the standard energy sequence obtained from S1 The uphill and downhill sets in the data are combined and processed to obtain the processed energy sequence. .

[0010] S3: Energy sequences are analyzed based on Gaussian mixture clustering algorithm. It is classified into k-class standard energy sequences.

[0011] S4: Obtain the energy sequence to be detected from the target workpiece during CNC machine tool machining. Searching for the energy sequence to be detected The uphill and downhill sets in the data are combined and processed to obtain the processed energy sequence. .

[0012] S5: Energy sequences are analyzed based on Gaussian mixture clustering algorithm. The energy sequences to be detected are divided into k classes.

[0013] S6: Align the k-class energy sequences to be detected with the corresponding k-class standard energy sequences based on the dynamic time warping algorithm.

[0014] S7: Calculate the power anomaly factor and length anomaly factor for each type of energy sequence; determine whether each type of energy sequence is abnormal. If the power anomaly factor or length anomaly factor of an energy sequence is greater than the set anomaly threshold, then the energy sequence is determined to be abnormal.

[0015] Preferably, the standard energy sequence mentioned in S1 refers to the energy sequence measured when a skilled operator processes the target workpiece under ideal processing conditions according to a standard operating procedure. , ,in Indicates time, Indicates power.

[0016] Preferably, step S2 specifically includes the following steps:

[0017] S2.1: If the energy points in the energy sequence X satisfy If it is, then it is marked as the peak PV.

[0018] If the energy points in the energy sequence X satisfy If so, then mark it as the valley value VV.

[0019] If the energy points in the energy sequence X satisfy If so, then mark it as the ramp value CV.

[0020] If the energy points in the energy sequence X satisfy If so, then mark it as the downslope value DV.

[0021] In this method, the first energy point of the standard energy sequence is marked as the peak value, and the last energy point is marked as the valley value.

[0022] S2.2: A set of individual or continuous, uninterrupted climb values ​​is designated as a climb set, denoted as . The specific calculation formula is as follows:

[0023] ;

[0024] ;

[0025] and These represent the starting index and the ending index, respectively.

[0026] A set consisting of single or continuous downhill values ​​is called a downhill set, denoted as . The specific calculation formula is as follows:

[0027] ;

[0028] .

[0029] For climbing sets The energy points within are assigned values ​​using the following formula:

[0030] .

[0031] downhill set The energy points within are assigned values ​​using the following formula:

[0032] .

[0033] S2.3: The final processed energy sequence .

[0034] Preferably, step S3 specifically includes the following steps:

[0035] S3.1: Initialize the parameters of the Gaussian mixture model ;

[0036] , , Let represent the weight, mean, and covariance matrix of each Gaussian component in the Gaussian mixture model, respectively.

[0037] S3.2: Calculate the energy sequence based on the current Gaussian mixture model parameters. Energy data in Posterior probability of belonging to class h The specific calculation formula is as follows:

[0038] ;

[0039] The Gaussian distribution representing the h-th component.

[0040] S3.3: Using posterior probability Update the weights of each Gaussian component in the Gaussian mixture model. mean Covariance Matrix The specific calculation formula is as follows:

[0041] ;

[0042] ;

[0043] .

[0044] S3.4: Will Divide into the corresponding energy sequence, assuming each energy data The classification is as follows Energy data The classification formula can be expressed as:

[0045] .

[0046] Preferably, the energy sequence to be detected is searched in S4. The process of combining the uphill and downhill sets and processing them is the same as in S2, resulting in the processed energy sequence. Gaussian mixture clustering algorithm divides energy sequences The process of dividing the energy sequences into k classes to be detected is the same as the process in S3.

[0047] Preferably, S6 specifically includes the following steps:

[0048] S6.1: One type of standard energy sequence is , and this type of standard energy sequence The corresponding energy sequence to be detected is ;

[0049] make ; ,in , , .

[0050] S6.2: Initialize parameters, introducing the following three constraints:

[0051] Boundaries: ;

[0052] Monotonicity: ;

[0053] Continuous type: ;

[0054] in, Represents energy sequence The index of the w-th point in the middle. Represents energy sequence The index of the w-th point in the middle.

[0055] S6.3: Distance Matrix Indicates the distance to the current energy point. Cumulative distance matrix Indicates the distance to the current energy point The sum of the cumulative distances to the smallest neighboring energy point that can reach the energy point; using nested loops to traverse all elements of the classified energy sequence to be tested and the standard energy sequence.

[0056] S6.4: Calculation of the standard energy sequence With the corresponding energy sequence to be detected Similarity metric distance ;

[0057] .

[0058] S6.5: The optimal set of alignment paths is obtained as follows , For any one of the optimal alignment paths in the set of energy sequences to be detected Points on With the corresponding standard energy sequence Points on The path.

[0059] Preferably, S7 specifically includes the following steps:

[0060] S7.1: Construct the power anomaly factor, denoted as The specific calculation formula is as follows:

[0061] ;

[0062] In the formula, Indicates the first Standard energy sequence on the alignment path The power value on; Indicates the first Energy sequence to be detected on the alignment path The power value on.

[0063] S7.2: Setting the standard energy sequence The length is Energy sequence to be detected The length is Construct an energy sequence length anomaly factor, denoted as The specific calculation formula is as follows:

[0064] .

[0065] S7.3: Set power threshold If the power anomaly factor Greater than the power threshold If the power of the energy sequence being detected is abnormal, it indicates that the power of the energy sequence is normal; conversely, if the power of the energy sequence is normal, a fixed length threshold for the energy sequence is set. If the energy sequence length anomaly factor Greater than the length threshold If the value is 0, it indicates that the length of the energy sequence to be detected is abnormal; otherwise, it indicates that the length of the energy sequence to be detected is normal.

[0066] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0067] This invention provides a method for detecting energy sequence anomalies in CNC machine tool machining processes. By combining the identification and processing of ramp and descent sets in the energy sequence, Gaussian Mixture Clustering (GMM) algorithm, and Dynamic Time Warping (DTW) algorithm, it achieves efficient and accurate detection of energy sequence anomalies in CNC milling processes. First, the energy sequence is preprocessed to identify and smooth peak, valley, ramp, and descent values, reducing noise interference. Second, GMM automatically divides the energy sequence according to machining states (e.g., standby, spindle acceleration, no-load, cutting, spindle deceleration, etc.) to adapt to energy change patterns under different machining states. Next, the DTW algorithm is used to align the time of the sequence to be detected with the standard sequence, avoiding misjudgments caused by time offset. Finally, by calculating power anomaly factors and length anomaly factors, and combining them with a set anomaly threshold, comprehensive detection of power and length anomalies in the energy sequence is achieved, ensuring the accuracy and practicality of the detection results. This method significantly improves the efficiency and accuracy of energy sequence anomaly identification, enabling reduced energy loss and improved energy utilization efficiency in industrial production, and providing strong support for intelligent monitoring and fault diagnosis of CNC machine tools. Attached Figure Description

[0068] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0069] Figure 1This is a schematic diagram of the process of the present invention.

[0070] Figure 2 This is a diagram showing the energy sequence and subsequence division of the CNC milling process.

[0071] Figure 3 (a) is a schematic diagram of the "climbing value" and "descent value" of the spindle acceleration sequence; (b) is a schematic diagram of the "climbing value" and "descent value" of the cutting sequence.

[0072] Figure 4 A schematic diagram illustrating the data assignment process in the climbing and descending sets.

[0073] Figure 5 This is a graph showing the power anomaly and length anomaly of the energy sequence.

[0074] Figure 6 This is a diagram of the original energy sequence of the CNC milling process in Example 1.

[0075] Figure 7 The image shows the result of processing the original energy sequence of the CNC milling process in Example 1 after steps S4 and S5.

[0076] Figure 8 This is a standard energy sequence diagram of the CNC milling process in Example 1.

[0077] Figure 9 This is the DTW alignment path diagram of the standby energy sequence in Example 1.

[0078] Figure 10 This is the DTW alignment path diagram of the spindle acceleration energy sequence in Example 1.

[0079] Figure 11 This is the DTW alignment path diagram of the empty energy sequence in Example 1.

[0080] Figure 12 This is the DTW alignment path diagram of the cutting energy sequence in Example 1.

[0081] Figure 13 This is the DTW alignment path diagram of the spindle deceleration energy sequence in Example 1. Detailed Implementation

[0082] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and specific examples.

[0083] Combination Figures 1 to 5 A method for detecting energy sequence anomalies during CNC machine tool machining, characterized by the following steps:

[0084] S1: Obtain the standard energy sequence of the target workpiece during CNC machine tool machining. .

[0085] The standard energy sequence refers to the energy sequence measured when a skilled operator processes a target workpiece under ideal processing conditions according to standard operating procedures. Each energy point ,in Indicates time, Indicates power.

[0086] like Figure 2 As shown, from the perspective of energy flow and consumption in the CNC milling process, taking the machining of a plane as an example, the CNC milling process typically includes shutdown, startup, standby, spindle acceleration, no-load, cutting, and spindle deceleration. Among these, shutdown consumes no energy, and although startup has a relatively high transient power, the number of startups is infrequent and the startup time is short; therefore, shutdown and startup processes are temporarily disregarded. Thus, the CNC machine tool machining process can be divided into a standby sequence, a spindle acceleration sequence, a no-load sequence, a cutting sequence, and a spindle deceleration sequence.

[0087] An energy sequence may contain one or more energy subsequences. For example, in a CNC milling process of machining a plane, the standby energy sequence has two standby energy subsequences, the no-load energy sequence has four no-load energy subsequences, the cutting energy sequence has three cutting energy subsequences, and the spindle acceleration and deceleration energy sequences each contain one energy subsequence. In other words, an energy subsequence is an energy sequence. Furthermore, considering the uncertain and anomalous energies present in the CNC milling process, an anomalous energy segment consisting of ≥2 consecutive anomalous energy points is also considered an energy subsequence. It is worth noting that in actual machining, the energy sequence of the CNC milling process needs to be divided according to the actual machining state.

[0088] (1) Standby Sequence: In milling, the standby sequence refers to the period when the machine is powered on but not actively involved in the machining process. In the standby sequence, the machine is ready but not actively involved in cutting. Power consumption is relatively low but not negligible. Power may be used to maintain the machine's standby functions, including keeping the control system active. (2) Spindle Acceleration Sequence: The spindle acceleration sequence involves the machine moving at high speed to reach the desired position before the actual milling operation begins. When the milling process begins, the spindle begins to accelerate, requiring additional power to overcome inertia and friction, increasing power consumption. Energy is used to accelerate the spindle to the required speed. Power tends to rise during this phase until the spindle reaches the required rotational speed. (3) Idle Sequence: The idle sequence occurs when the milling machine is running but not involved in the cutting operation. Once the spindle reaches its operating speed and no cutting is being performed (idle state), power consumption tends to stabilize at a relatively constant level. The machine is running, but the cutting tool is not involved in material removal. Power is used to maintain the spindle speed and other machine functions. (4) Cutting Sequence: The cutting sequence is the core of the milling process and is the stage in which material is removed from the workpiece by rotating the cutting tool. The cutting state involves actively milling or cutting the workpiece. The power consumption in this stage is usually higher than that in the no-load state. The power trend will fluctuate depending on factors such as the cutting material, cutting tool specifications, and cutting depth and speed. Higher material removal rates or harder materials may lead to increased power consumption. (5) Spindle Deceleration Sequence: The spindle deceleration sequence involves retracting the cutting tool at high speed after the machining operation is completed. As the milling process ends, the spindle begins to decelerate, and the power consumption decreases. Energy is used to gradually stop the spindle. The power trend in this state is downward until the spindle comes to a complete stop.

[0089] S2: Find the standard energy sequence obtained from S1 The uphill and downhill sets in the data are combined and processed to obtain the processed energy sequence. .

[0090] In CNC milling, the time series exhibits numerous unique trends. For example... Figure 3 (a) Due to transient acceleration, the power of the spindle acceleration sequence shows a trend of first rising and then falling. This trend inevitably leads to "climbing values" and "downhill values" in the original time series under spindle acceleration. In addition, similar data characteristics also exist in the spindle deceleration sequence and the cutting sequence. Figure 3 (b) It is important to note that the reason for this type of data in the cutting sequence differs from that in the spindle acceleration / deceleration sequence. The spindle acceleration / deceleration sequence is caused by transient changes in spindle speed, while the cutting sequence is caused by incomplete contact between the tool and the workpiece. This type of data can significantly affect the determination of the machining sequence. Therefore, without affecting the amount of machining sequence data, eliminating the "climbing values" and "descending values" in the original time series helps in the online determination of the machining sequence.

[0091] The rainflow counting method, originally proposed by TN Frosch and NEM Morrow in 1968, is primarily used for fatigue analysis to assess fatigue damage to materials or structures under cyclic loading. This method decomposes the load history into a series of non-overlapping cyclic loads, then counts and analyzes these cyclic loads. Its basic principle is to identify cyclic loads based on the peaks and valleys of the load history and count these cyclic loads. Based on the principle of the rainflow counting method and the energy characteristics of CNC milling processes, this invention proposes to find and process the ramp and descent sets in the energy sequence, mainly including the following steps: 1) Labeling data types: Label each data point in the original time series as a ramp value, descent value, peak value, or valley value. 2) Finding ramp and descent sets: Traverse the data type of each data point in the original time series, grouping consecutive data of the same data type into a data set. 3) Assigning values: Assign a new value to the data in the ramp and descent sets. Specifically, this includes the following steps:

[0092] S2.1: If the energy points in the energy sequence X satisfy If it is, then it is marked as the peak PV.

[0093] If the energy points in the energy sequence X satisfy If so, then mark it as the valley value VV.

[0094] If the energy points in the energy sequence X satisfy If so, then mark it as the ramp value CV.

[0095] If the energy points in the energy sequence X satisfy If so, then mark it as the downslope value DV.

[0096] In this method, the first energy point of the standard energy sequence is marked as the peak value, and the last energy point is marked as the valley value.

[0097] S2.2: A set of individual or continuous, uninterrupted climb values ​​is designated as a climb set, denoted as . The specific calculation formula is as follows:

[0098] ;

[0099] .

[0100] A set consisting of single or continuous downhill values ​​is called a downhill set, denoted as . The specific calculation formula is as follows:

[0101] ;

[0102] .

[0103] and These represent the starting index and the ending index, respectively. It's worth noting that when... = When this occurs, it means that the "slope value" is discontinuous, that is, an independent "slope value" constitutes a "slope"; when When the slope is continuous, it means that the "slope value" is continuous and uninterrupted, that is, multiple consecutive "slope values" constitute a "slope". According to the definition of "slope", there is no single "slope", that is, there are both "climbing values" and "downhill values".

[0104] For climbing sets The energy points within are assigned values ​​using the following formula:

[0105] .

[0106] downhill set The energy points within are assigned values ​​using the following formula:

[0107] .

[0108] Assignment processing diagram as shown below Figure 4 .

[0109] S2.3: The final processed energy sequence .

[0110] During CNC milling, the spindle acceleration, deceleration, and cutting power data of the machine tool exhibit upward or downward slope characteristics. To process this type of raw time-series energy data, peak-valley time-series data is obtained by replacing the upward and downward slope values. The purpose of this operation is to eliminate the interference of these data on the discrimination of the machining sequence and improve the accuracy of subsequent anomaly detection.

[0111] S3: Energy sequences are analyzed based on Gaussian mixture clustering algorithm. It is classified into k-class standard energy sequences.

[0112] The value of k here needs to be specified according to the actual machining process. In this embodiment, the actual CNC milling process includes 5 machining sequences, namely standby sequence, spindle acceleration sequence, no-load sequence, cutting sequence, and spindle deceleration sequence; therefore, k is 5.

[0113] S3 specifically includes the following steps:

[0114] S3.1: Initialize the parameters of the Gaussian mixture model .

[0115] , , Let represent the weight, mean, and covariance matrix of each Gaussian component in the Gaussian mixture model, respectively.

[0116] S3.2: Calculate the energy sequence based on the current Gaussian mixture model parameters. Energy data in Posterior probability of belonging to class h The specific calculation formula is as follows:

[0117] .

[0118] Let h represent the Gaussian distribution of the h-th component, i.e., the probability density function.

[0119] S3.3: Using posterior probability Update the weights of each Gaussian component in the Gaussian mixture model. mean Covariance Matrix The specific calculation formula is as follows:

[0120] .

[0121] .

[0122] .

[0123] S3.4: Will Divide into the corresponding energy sequence, assuming each energy data The classification is as follows Energy data The classification formula can be expressed as:

[0124] .

[0125] S4: Obtain the energy sequence to be detected from the target workpiece during CNC machine tool machining. Searching for the energy sequence to be detected The uphill and downhill sets in the data are combined and processed to obtain the processed energy sequence. .

[0126] Searching for the energy sequence to be detected in S4 The process of combining the uphill and downhill sets and processing them is the same as in S2, resulting in the processed energy sequence. .

[0127] S5: Energy sequences are analyzed based on Gaussian mixture clustering algorithm. The energy sequences to be detected were divided into 5 categories, and the Gaussian mixture clustering algorithm was used to further analyze the energy sequences. The process of dividing the energy sequences into k classes to be detected is the same as the process in S3.

[0128] S6: Align the k-class energy sequences to be detected with the corresponding k-class standard energy sequences based on the dynamic time warping algorithm.

[0129] Due to external factors such as changes in the operating environment, equipment differences, or human error, or internal factors such as errors in machining parameters, each machining sequence in the actual CNC milling process may have slight time offsets, distortions, or compressions compared to its corresponding standard machining sequence. To more accurately determine whether a machining sequence is abnormal, it is necessary to align the measured machining sequence with the standard machining sequence to ensure a better match. To solve this alignment problem, this invention utilizes the Dynamic Time Warping (DTW) algorithm. DTW is a flexible time series alignment method that finds the optimal alignment path by performing non-linear stretching or compression on the time axis, thereby minimizing the distance between the two sequences.

[0130] S6 specifically includes the following steps:

[0131] S6.1: One type of standard energy sequence is , and this type of standard energy sequence The corresponding energy sequence to be detected is ;

[0132] make ; ,in , , .

[0133] S6.2: Initialize parameters, introducing the following three constraints.

[0134] Boundaries: The semicolon indicates that the two sequences must match at the beginning and end, and the order of their parts must also match.

[0135] Monotonicity: This indicates that the path must monotonically increase over time.

[0136] Continuous type: This constraint means that in the many-to-one and one-to-many matching process, it can only match the surrounding time step, that is, it is impossible to cross a certain point to match, and it can only align with the point adjacent to itself.

[0137] in, Represents energy sequence The index of the w-th point in the middle. Represents energy sequence The index of the w-th point in the middle.

[0138] S6.3: Distance Matrix Indicates the distance to the current energy point. Cumulative distance matrix Indicates the distance to the current energy point The sum of the cumulative distances to the smallest neighboring energy point that can reach the energy point; using nested loops to traverse all elements of the classified energy sequence to be tested and the standard energy sequence.

[0139] S6.4: Calculation of the standard energy sequence With the corresponding energy sequence to be detected Similarity metric distance ;

[0140] .

[0141] S6.5: The optimal set of alignment paths is obtained as follows , For any one of the optimal alignment paths in the set of energy sequences to be detected Points on With the corresponding standard energy sequence Points on The path.

[0142] S7: Calculate the power anomaly factor and length anomaly factor for each type of energy sequence; determine whether each type of energy sequence is abnormal. If the power anomaly factor or length anomaly factor of an energy sequence is greater than the set anomaly threshold, then the energy sequence is determined to be abnormal.

[0143] Sequence anomaly refers to an overall energy anomaly in a machining sequence during CNC milling, such as... Figure 5As shown. This may indicate an overall anomaly in the energy consumption of the entire machining sequence, possibly caused by equipment failure, tooling problems, machining parameters, operator error, or other systemic anomalies. It is worth noting that in this invention, sequence anomalies in the CNC milling process are further divided into sequence length anomalies and sequence power anomalies. Sequence length anomalies manifest as the length of the machining sequence being longer or shorter than the standard machining sequence length, while sequence power anomalies manifest as the power variation of the machining sequence being higher or lower than the standard machining sequence in the power dimension. Therefore, even if the power curve does not show point anomalies or sub-sequence anomalies, sequence anomalies may still exist. For example, (a) when the cutting depth is greater than a given standard cutting depth, the power of the cutting sequence is greater than the standard cutting power; (b) when the standby time is greater than the standard standby time, the length of the standby sequence is greater than the length of the standard standby sequence. It is easy to understand that anomaly (a) is a type of sequence power anomaly; while anomaly (b) is a type of sequence length anomaly.

[0144] S7 specifically includes the following steps:

[0145] S7.1: Construct the power anomaly factor, denoted as The specific calculation formula is as follows:

[0146] .

[0147] In the formula, Indicates the first Standard energy sequence on the alignment path The power value on; Indicates the first Energy sequence to be detected on the alignment path The power value on.

[0148] S7.2: Setting the standard energy sequence The length is Energy sequence to be detected The length is Construct an energy sequence length anomaly factor, denoted as The specific calculation formula is as follows:

[0149] .

[0150] S7.3: Set power threshold If the power anomaly factor Greater than the power threshold If the power of the energy sequence being detected is abnormal, it indicates that the power of the energy sequence is normal; conversely, if the power of the energy sequence is normal, a fixed length threshold for the energy sequence is set. If the energy sequence length anomaly factor Greater than the length threshold If the value is 0, it indicates that the length of the energy sequence to be detected is abnormal; otherwise, it indicates that the length of the energy sequence to be detected is normal.

[0151] Example 1

[0152] Combination Figures 6 to 13 During a CNC milling operation, the operator mistakenly set the spindle speed to 6000 r / min, resulting in the original time sequence of the CNC milling process being as follows: Figure 6 As shown. Figure 7 The results after steps S4 and S5 are shown, clearly demonstrating that the CNC milling process is divided into standby sequence, no-load sequence, cutting sequence, spindle acceleration sequence, and spindle deceleration sequence.

[0153] The standard depth of cut is 5mm, the standard feed rate is 600mm / s, the standard spindle speed is 8000r / min, and the standard depth of cut is 1mm. The standard machining sequence is as follows: Figure 8 As shown.

[0154] The abnormal length thresholds for the standby energy sequence, spindle acceleration energy sequence, no-load energy sequence, cutting energy sequence, and spindle deceleration energy sequence are set to 0.3; the abnormal power thresholds for the standby energy sequence, no-load energy sequence, and cutting energy sequence are set to 30; and the abnormal power thresholds for the spindle acceleration energy sequence and spindle deceleration energy sequence are set to 500.

[0155] Figures 9-13 In the diagram, blue dots represent power points on the sequence to be tested, while red dots represent power points on the standard processed sequence.

[0156] In this embodiment, as Figure 9 As shown, the DTW alignment path of the standby energy sequence is displayed. The detection results show that the standard standby energy sequence length is 264, while the example standby energy sequence length is 279, with a length anomaly factor of 0.057, which is less than the length anomaly threshold, indicating that the energy sequence length is normal. The example standby energy sequence power anomaly factor is 0.519, which is less than the sequence power anomaly threshold, indicating that the energy sequence power is normal.

[0157] In this embodiment, as Figure 10 As shown, the DTW alignment path of the spindle acceleration energy sequence is illustrated. The detection results show that the length of the standard spindle acceleration energy sequence is 17, while the length of the case spindle acceleration energy sequence is 21, with a length anomaly factor of 0.235, which is less than the length anomaly threshold, indicating that the energy sequence length is normal. The power anomaly factor of this energy sequence is 262.261, which is less than the sequence power anomaly threshold, indicating that the power of this energy sequence is normal.

[0158] In this embodiment, as Figure 11The image shows the DTW alignment path of the unloaded energy sequence. The detection results show that the length of the standard unloaded energy sequence is 182, while the length of the case unloaded energy sequence is 178, with a length anomaly factor of 0.022, which is less than the length anomaly threshold, indicating that the energy sequence length is normal. However, the power anomaly factor of this energy sequence is 59.052, which is greater than the sequence power anomaly threshold, indicating that the power of this energy sequence is abnormal.

[0159] In this embodiment, as Figure 12 As shown, the DTW alignment path of the cutting energy sequence is illustrated. The detection results show that the length of the standard cutting energy sequence is 334, while the length of the case cutting energy sequence is 339, with a length anomaly factor of 0.015, which is less than the length anomaly threshold, indicating that the energy sequence length is normal. The power anomaly factor of the case cutting energy sequence is 34.659, which is greater than the sequence power anomaly threshold, indicating that the power of this energy sequence is abnormal.

[0160] In this embodiment, as Figure 13 The image shows the DTW alignment path of the spindle deceleration energy sequence. The test results show that the length of the standard spindle deceleration energy sequence is 14, while the length of the case spindle deceleration energy sequence is 16, with a length anomaly factor of 0.143, which is less than the length anomaly threshold, indicating that the energy sequence length is normal. The power anomaly factor of the case cutting energy sequence is 248.412, which is less than the sequence power anomaly threshold, indicating that the power of the energy sequence is normal.

[0161] In summary, in this embodiment, the energy sequence anomaly detection results for the CNC milling process are as follows: the standby energy sequence power and length are normal; the spindle acceleration energy sequence power and length are normal; the no-load energy sequence length is normal, but the power is abnormal; the cutting energy sequence length is normal, but the power is abnormal; and the spindle deceleration energy sequence power and length are normal. These experimental results are consistent with actual results, verifying the reliability of the detection method. The energy sequence anomaly detection method for CNC machining processes proposed in this invention has significant effects. It can accurately divide the energy sequence of the CNC milling process into several categories according to the machining state, while simultaneously aligning the standard energy sequence with the sequence to be detected. This allows for separate anomaly detection of each energy sequence, helping to improve the efficiency and accuracy of energy sequence anomaly identification.

[0162] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A method for detecting abnormality in energy sequence of a machining process of a numerical control machine tool, characterized in that, The method comprises the following steps: S1: acquiring a standard energy sequence of a target workpiece in a numerical control machine tool machining process ; S2: find the standard energy sequence from S1 , and process the uphill set and downhill set to get the processed energy sequence ; S3: dividing the energy sequence into k-class standard energy sequences based on a Gaussian mixture clustering algorithm; S3: dividing the energy sequence into k-class standard energy sequences based on a Gaussian mixture clustering algorithm; S4: acquiring a to-be-detected energy sequence of a target workpiece in a machining process of a numerical control machine tool , finding a climbing set and a downhill set in the to-be-detected energy sequence and processing the climbing set and the downhill set to obtain a processed energy sequence ; S5: dividing the energy sequence into k classes of energy sequences to be detected based on a Gaussian mixture clustering algorithm; S5: dividing the energy sequence into k classes of energy sequences to be detected based on a Gaussian mixture clustering algorithm; S6: aligning the k types of energy sequences to be detected and the corresponding k types of standard energy sequences based on a dynamic time warping algorithm; S7: calculating a power anomaly factor and a length anomaly factor of each type of energy sequence; determining whether each type of energy sequence is abnormal, if the power anomaly factor or the length anomaly factor of the energy sequence is greater than a set abnormal threshold, the energy sequence is determined to be abnormal.

2. The method according to claim 1, characterized in that, The standard energy sequence in S1 refers to the energy sequence measured when a skilled operator processes a target workpiece under ideal processing conditions according to a standard operating procedure , wherein denotes the time, denotes the power.

3. The method according to claim 2, characterized in that, The S2 specifically comprises the following steps: S2.1: If an energy point in the energy sequence X satisfies then it is marked as a peak value PV; If an energy point in the energy sequence X satisfies it is marked as a valley value VV; An energy point in the energy sequence X is marked as a climb value CV if satisfies ​ If an energy point in the energy sequence X satisfies it is marked as a downhill value DV; Wherein, the first energy point of the standard energy sequence is marked as a peak value, and the last energy point is marked as a valley value. S2.2: Mark the set of single or continuous uninterrupted ramp values as a ramp set, denoted as The specific calculation formula is: ; ; and represent a start index and an end index, respectively; The set of single or continuous uninterrupted downhill value groups is marked as a downhill set, denoted as The specific calculation formula is: ; ; Assigning values to energy points in a climbing set The specific assignment formula is: ; Assigning values to energy points in the downhill set The specific assignment formula is: ; S2.3: The resulting processed energy sequence .

4. The method according to claim 3, characterized in that, The S3 specifically comprises the following steps: S3.1: Initialize parameters of Gaussian Mixture Model ; , , respectively denote the weight, mean and covariance matrix of each Gaussian component in the Gaussian mixture model. S3.2: Compute the energy data in the energy sequence according to the current Gaussian mixture model parameters Posterior probability that the data belongs to class h The specific formula is: ; The Gaussian distribution representing the h-th component; S3.3: Utilizing posterior probabilities updating the weight of each Gaussian component in the Gaussian mixture model , mean and covariance matrix , specifically: ; ; ; S3.4: The energy data are divided into corresponding energy sequences, assuming that each energy data is classified as , the classification formula of energy data can be expressed as: 。 5. The method according to claim 2, wherein, Searching for the energy sequence to be detected in S4 The process of combining the uphill and downhill sets and processing them is the same as in S2, resulting in the processed energy sequence. Gaussian mixture clustering algorithm divides energy sequences The process of dividing the energy sequences into k classes to be detected is the same as the process in S3.

6. The method according to claim 5, wherein, The S6 specifically comprises the following steps: S6.1: one of the standard energy sequences is , and the corresponding to-be-detected energy sequence is , and the corresponding to-be-detected energy sequence is ; Let ; where , , ; S6.2: initializing parameters, and introducing the following three restriction conditions: Borderline: ; Monotonicity: ; Continuous: ; wherein representative energy sequence index of the wth point in the sequence, representative energy sequence index of the wth point in the sequence; S6.3: Distance matrix distance to the current energy point, cumulative distance matrix distance to the current energy point the sum of the cumulative distances to the minimum neighboring energy points that can reach this energy point; all elements of the sorted energy sequence to be detected and the standard energy sequence are traversed using nested loops; S6.4: Calculate the standard energy sequence and the similarity measure distance to the corresponding to-be-detected energy sequence ;​ ; S6.5: get the set of optimal alignment paths as , is a path connecting the points on the to-be-detected energy sequence and the points on the corresponding standard energy sequence . ​​ 7. The method according to claim 6, wherein, The S7 specifically comprises the following steps: S7.1: Construct the power anomaly factor, denoted as The specific calculation formula is: ; wherein represents the first bar alignment path; power value on the standard energy sequence on the first represents the first bar alignment path; power value on the energy sequence to be detected on the first S7.2: Set the standard energy sequence The length of the energy sequence to be detected is The length of the energy sequence to be detected is The length of the energy sequence to be detected is An energy sequence length anomaly factor is constructed, denoted as The specific calculation formula is: ; S7.3: Set the power threshold If the power anomaly factor is greater than the power threshold , it indicates that the power of the energy sequence to be detected is abnormal; otherwise, it indicates that the power of the energy sequence to be detected is normal; set the fixed length threshold of the energy sequence If the energy sequence length anomaly factor is greater than the length threshold , it indicates that the length of the energy sequence to be detected is abnormal; otherwise, it indicates that the length of the energy sequence to be detected is normal.

Citation Information

Patent Citations

  • Method for automatically identifying and monitoring on-line machined workpieces of numerical control machine tool

    CN101710235A

  • Energy consumption anomaly detection method based on rain flow counting method and local anomaly factor

    CN110362608A