A method and system for monitoring the state of a workpiece being spin finished
By using a non-invasive current sensor and a twin temporal convolutional network, combined with the parameters of the machine tool CNC system, a phase-position scenario is divided, and a time-series comparison model is constructed. This solves the problems of sensor dependence and data redundancy in rotary machining, and achieves low-cost, efficient, and accurate workpiece status monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-05
- Publication Date
- 2026-04-10
AI Technical Summary
Existing spin machining workpiece condition monitoring technologies rely on the deployment of a large number of sensors and the processing of massive amounts of data, resulting in high costs, complex maintenance, and significant processing delays, and failing to accurately monitor workpiece condition.
By employing non-invasive current sensors and deriving parameters from existing CNC systems in machine tools, combined with twin temporal convolutional networks, a time-series comparison model is constructed by dividing the process into stage-position scenarios. This model enables real-time monitoring of workpiece status, reduces sensor deployment costs, avoids processing interference, and builds feature libraries and thresholds for different contact positions.
It enables low-cost, non-complex installation-free workpiece status monitoring, reduces the difficulty of equipment deployment and maintenance, improves the accuracy and adaptability of monitoring, adapts to the intermittent contact characteristics of rotary machining, and reduces the false judgment rate.
Smart Images

Figure CN121624919B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of workpiece condition monitoring technology, and specifically to a method and system for monitoring the condition of a rotary machining workpiece. Background Technology
[0002] Rotation machining, a key process in the mechanical manufacturing field for forming precision parts (such as shafts, discs, and sleeves), is widely used in high-end equipment manufacturing scenarios such as automobiles, aerospace, and construction machinery due to its efficient material removal capabilities and good machining consistency. In this process, the workpiece rotates at high speed with the spindle, and the tool feeds radially / axially to achieve cutting and shaping. The dimensional accuracy and surface quality of the workpiece directly determine the assembly performance and service life of the final product. Therefore, real-time and accurate monitoring of the workpiece's condition during machining and determining whether any abnormalities occur are core aspects of ensuring production quality.
[0003] Existing monitoring solutions, referencing other machining technologies, require the simultaneous deployment of numerous sensors. The purchase cost of these sensors (especially high-precision force sensors and laser vision sensors) is high, and the installation process is complex. Some sensors need to be embedded in the machine tool body or placed close to the cutting area, which not only compromises the original structural precision of the machine tool but may also occupy machining space, interfere with coolant spraying and chip removal, and affect the continuity and stability of the turning process. Secondly, the massive amounts of data collected simultaneously by multiple sensors contain a large amount of redundant information. However, to ensure comprehensive monitoring, existing technologies require the collection, transmission, and processing of all data. This not only necessitates high-performance servers and industrial Ethernet hardware to meet data storage and transmission requirements but also requires the design of complex multi-source data fusion algorithms for feature extraction and status determination.
[0004] In summary, existing workpiece condition monitoring technologies for rotary machining rely excessively on the deployment of a large number of sensors and the processing of massive amounts of data, resulting in high costs, complex maintenance burdens, and significant processing delays. There is an urgent need for a workpiece condition monitoring technology that does not require the deployment of a large number of sensors, has low data processing pressure, provides accurate monitoring, and is suitable for rotary machining, thereby overcoming the shortcomings of existing technologies. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a method and system for monitoring the status of workpieces undergoing rotary machining, enabling convenient, efficient, and accurate monitoring of the status of workpieces undergoing rotary machining.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] On the one hand, a method for monitoring the state of a workpiece undergoing rotary machining is provided, comprising the following steps:
[0008] Based on historical machining data of qualified workpieces and corresponding workpiece and tool head parameters, several stages-position scenarios are divided; the time-series signals of each stage-position scenario are extracted from the historical machining data, and a time-series comparison model is constructed and trained.
[0009] Calculate the mean and standard deviation of the similarity of normal samples under various stage-location scenarios, construct and store a stage-location scenario benchmark library including model weights, scenario-based feature library and similarity;
[0010] The cutting edge position signal and current signal during the rotary machining process are acquired in real time. The acquired cutting edge position signal and current signal are filtered, synchronized, segmented and feature extracted, and the time sequence feature vector and the current stage-position scene are output.
[0011] Based on the current stage-location scene call stage-location scene benchmark library, the temporal feature vector is input into the trained temporal comparison model to obtain the real-time feature embedding vector.
[0012] Calculate the similarity and trend of the real-time feature embedding vector with the corresponding scene-based feature library, call the dynamic threshold of the corresponding scene to make a graded judgment, and output the workpiece status.
[0013] Furthermore, the method for dividing the stage-position scenario is as follows: based on the contact state between the cutting edge and the workpiece, it is divided into cutting contact scenario and non-cutting contact scenario; based on the contact position of the cutting edge, it is divided into tooth root contact, tooth surface contact and tooth tip contact.
[0014] In the cutting contact scenario, the current amplitude is greater than the idle reference current, while in the non-cutting contact scenario, the current amplitude is less than or equal to the idle reference current.
[0015] Furthermore, the temporal contrast model is constructed based on a Siamese temporal convolutional network. This Siamese temporal convolutional network contains two symmetrical TCN branches and one contrastive loss layer. The input to the TCN branches is a temporal feature vector, which is processed by multiple convolutional blocks to output a feature embedding vector. The contrastive loss layer uses a triplet loss function, and the loss value is calculated using the following formula:
[0016] Where n is the number of normal samples in the same stage-location scenario. Embed the vector for the anchor sample. For positive sample embedding vectors, For negative sample embedding vectors, This is the interval parameter.
[0017] Furthermore, the acquired cutting edge position signal and current signal are filtered, including: filtering the current signal using a 50Hz power frequency notch filter and a 1kHz Butterworth low-pass filter; and filtering the cutting edge position signal using a moving average filter. The filtering formula is as follows:
[0018]
[0019] Where k is the size of the sliding window. This is the unfiltered, raw blade position signal;
[0020] Synchronous alignment includes: correcting the time difference through linear interpolation to ensure that the blade position signal and the current signal correspond one-to-one at the same timestamp;
[0021] Segmentation includes: segmentation based on rotation indexing cycle, with each segment containing a complete cycle from cutting to idling, and further subdividing the scene into smaller segments according to the constructed stage-position scene. The rotation indexing cycle calculation formula is as follows:
[0022]
[0023] in, The angular velocity of the cutter head. The number of cutter teeth groups on the cutter head;
[0024] Feature extraction includes extracting temporal features for each scene segment based on segmentation.
[0025] Furthermore, the similarity between the real-time feature embedding vector and the corresponding scene-specific feature library is calculated, including: based on the cosine similarity algorithm, the calculation formula is as follows:
[0026]
[0027] in, For real-time feature embedding vectors, The feature embedding vector is a feature from a contextualized feature library;
[0028] The arithmetic mean of all cosine similarities is defined as the real-time similarity of the processing state.
[0029] Furthermore, the changing trend of the real-time feature embedding vector and the corresponding scene-based feature library is calculated, including: calculating the slope of the change in three consecutive sets of real-time similarity, with the slope calculation formula as follows:
[0030]
[0031] in, Let be the real-time similarity of the processing status at time t. The real-time similarity of the processing status at time t-2; if k < -0.05, it is marked as an abnormal state trend.
[0032] Furthermore, the dynamic threshold for the corresponding scenario is invoked for hierarchical determination, including:
[0033] Calculate the dynamic threshold of the cutting scene ,in, This represents the mean of the similarity among normal samples. Standard deviation of normal sample similarity;
[0034] Calculate the dynamic threshold for idling scenarios ,in, This represents the mean of the similarity among normal samples. Standard deviation of normal sample similarity;
[0035] If the real-time similarity of the processing status is greater than or equal to the dynamic threshold, and the status trend is normal, the workpiece status is determined to be normal.
[0036] If the real-time similarity of the processing status is less than the dynamic threshold, or the status trend is abnormal, the workpiece status is determined to be abnormal; and if it continues for one rotation indexing cycle, a first-level warning signal is output.
[0037] If the real-time similarity of the processing status is less than the dynamic threshold, or if the status trend is abnormal, the workpiece status is determined to be abnormal; if this continues for two rotation indexing cycles, a secondary warning signal will be output.
[0038] On the other hand, a system for monitoring the status of a workpiece in a rotary machining process is provided, comprising:
[0039] The data acquisition module includes a cutting edge position signal acquisition unit, a current signal acquisition unit, and a synchronous triggering unit, which are used to acquire the cutting edge position signal and current signal during the turning process and achieve timing alignment.
[0040] The data preprocessing module is used to filter, synchronize, segment, and extract features from the acquired signals, and output the time-series feature vector and the current stage-location scene.
[0041] A benchmark storage module is used to store a stage-location scene benchmark library, which includes trained temporal comparison model weights, a scene-based feature library, and similarities of various scenes.
[0042] The time-series comparison and determination module is used to call the stage-position scene benchmark library, calculate the similarity and change trend between the real-time feature embedding vector and the scene feature library, call the dynamic threshold of the corresponding scene for hierarchical determination, and output the workpiece status.
[0043] Furthermore, the update frequency of the cutting edge position signal acquisition unit is ≥5kHz; the current signal acquisition unit adopts a Rogowski coil sensor with a sampling frequency ≥10kHz; the synchronization triggering unit uses the zero position signal of the machine tool spindle encoder as a reference to achieve timing alignment between the cutting edge position signal and the current signal, with a synchronization error ≤0.5ms.
[0044] Furthermore, the benchmark storage module dynamically updates the stage-location benchmark library based on normal processing data, and automatically optimizes the scene-based feature library and similarity after accumulating a preset number of normal time-series segments.
[0045] The above approach has the following beneficial effects:
[0046] 1. Existing technologies rely on various types of sensors, such as force sensors and laser vision sensors. These not only incur high purchase and installation costs but also require embedding in the machine tool body or close proximity to the cutting zone, which can easily damage the machine tool's structural precision, interfere with coolant spraying and chip removal, and affect the continuity of rotary machining. This solution achieves signal acquisition solely through a non-invasive current sensor and parameter derivation from the machine tool's existing CNC system: the current sensor is externally connected to the spindle / workpiece axis power circuit, and the cutting edge position signal is derived from native machine tool parameters such as the cutter head angle and workpiece angle combined with trajectory equations. This requires no modification to the machine tool structure and does not occupy machining space. This design reduces equipment deployment costs and maintenance difficulty while avoiding interference with the continuous indexing cutting process in rotary machining, solving the pain points of complex sensor deployment and easy interference with machining in existing technologies.
[0047] 2. The core technological characteristic of rotary machining is the alternating cycle of cutting contact (high load) and idle non-contact (low load). Existing technologies do not consider the dynamic changes in load during machining and use a single global threshold to determine anomalies, resulting in a high false positive rate. This solution addresses the intermittent contact and dynamic switching of contact position between the cutting edge and the workpiece in rotary machining. It determines the contact state through current amplitude and precise adaptation to scene-specific benchmarks: the current amplitude is compared with the idle baseline to determine whether cutting contact has occurred, and the corresponding cutting scene benchmark or idle scene benchmark is called to determine the workpiece state. At the same time, it segments according to the rotation indexing cycle to ensure that each segment contains a complete cutting-idle cycle, avoiding interference from mixed signals across states and matching the intermittent contact characteristics of rotary machining.
[0048] 3. In rotary machining, the contact position between the cutting edge and the workpiece directly affects the cutting load (e.g., the cutting load at the tooth root is greater than the cutting load at the tooth surface). Existing technologies do not differentiate between contact positions, resulting in the same threshold being unable to adapt to the load differences at different positions. This solution accurately locates the contact position using the three-dimensional coordinates of the cutting edge, breaks down multiple cutting scenarios, and independently constructs a feature library and threshold for each scenario. This allows for targeted adaptation to the load characteristics of different contact positions, improving the accuracy of workpiece state determination. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0050] Figure 2 This is a schematic diagram of the timing comparison model structure according to an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation
[0052] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] The following detailed description illustrates the specific implementation method:
[0054] like Figure 1 As shown, a method for monitoring the state of a workpiece in rotary machining is presented. The core steps of this method include an offline reference construction stage and an online anomaly judgment stage, adapting to the stage-position change characteristics of rotary machining throughout the process. Based on the rotary machining principle: the cutting edge of the tool moves along a cycloidal trajectory, utilizing the characteristic of the cycloidal trajectory's periodic distribution along the circumference to machine workpieces with circumferentially distributed surfaces. When the cutting edge moves along the cycloidal trajectory, the cutting edge and the workpiece are in intermittent contact, and the contact position changes in real time with the machining stage. Taking the rotary machining of straight bevel gears as an example, this embodiment constructs seven stage-position scenarios: cutting-tooth root-small end, cutting-tooth root-large end, cutting-tooth surface-small end, cutting-tooth surface-large end, cutting-tooth tip-small end, cutting-tooth tip-large end, and idling-no contact. Among them, cutting-tooth root-small end means that the cutting edge of the tool is in contact with the workpiece and participates in cutting, and the cutting position is located at the tooth root of the small end of the workpiece; idle-no contact means that the cutting edge of the tool is not in contact with the workpiece and does not participate in cutting. Other stages-position scenarios are similar and will not be described in detail here.
[0055] Specifically, the offline benchmark construction phase is as follows:
[0056] First, select historical machining data of several combinations of straight bevel gears during rotary machining. The historical machining data includes the timing signals of each stage-position scenario mentioned above, as well as workpiece parameters such as the number of teeth, module, tooth width, and pitch cone angle of the straight bevel gears. Then, obtain the cutter head parameters during the rotary machining of straight bevel gears. The cutter head parameters include the number of cutter tooth sets, cutter head radius, cutter head speed, and the speed ratio between the cutter head and the workpiece.
[0057] Secondly, based on the seven constructed stage-position scenarios, time-series signals for different types of stage-position scenarios are extracted from historical processing data and directly defined as: cutting-tooth root-small end signal, cutting-tooth root-large end signal, cutting-tooth surface-small end signal, cutting-tooth surface-large end signal, cutting-tooth tip-small end signal, cutting-tooth tip-large end signal, and idling-no-contact signal. Several effective time-series segments are selected from the time-series signals of each stage-position scenario to form a training set.
[0058] Preferably, 5 to 10 groups of valid time segments are selected, each group having 35 sampling points, to form a training set.
[0059] Then, as Figure 2 As shown, a temporal contrast model is constructed based on a Siamese temporal convolutional network. This Siamese temporal convolutional network contains two symmetrical TCN branches and one contrastive loss layer. The TCN branch takes a 12-dimensional temporal feature vector as input, contains three convolutional blocks, and outputs a 64-dimensional temporal feature embedding vector. The contrastive loss layer uses a triplet loss function to narrow the feature distance between normal samples in the same scene and widen the distance between samples from different scenes. The triplet loss function calculates the loss value using the following formula:
[0060]
[0061] Where n is the number of normal samples in the same stage-location scenario. Embed the vector for the anchor sample. For positive sample embedding vectors, For negative sample embedding vectors, This is the interval parameter.
[0062] Set training parameters and train a time series comparison model. The output of the time series comparison model training is the similarity between two input time series signals.
[0063] Preferably, the training parameters are set as follows: batch size = 8, learning rate = 0.001, training epochs = 50, and optimizer = Adam.
[0064] Finally, the trained temporal comparison model weights and the feature embedding library of normal samples for each stage-location scene are saved; the mean and standard deviation of the similarity of normal samples for each stage-location scene are calculated as the basis for the dynamic threshold.
[0065] Specifically, for each scenario, n sets of valid normal temporal feature segments are selected, denoted as the sample set. Each sample group is a 12-dimensional temporal feature vector, with a length of 35 sampling points. In this embodiment, the similarity is the sample... and Cosine similarity calculated by time-series comparison model The value ranges from 0 to 1, with the closer the similarity is to 1, the more similar the temporal characteristics of the two samples are; individual sample similarity. For the sample The mean similarity score with all other normal samples in the same scene reflects the degree to which a single sample fits the normal distribution of the scene; the mean similarity score of normal samples. The arithmetic mean of the similarity scores of all individual samples in this scenario reflects the overall similarity level of normal temporal characteristics of the scenario; the standard deviation of the similarity of normal samples. This represents the standard deviation of the similarity scores of all individual samples in this scenario, used to reflect the fluctuation range of normal sample similarity.
[0066] The above items can be calculated using the following method:
[0067] Normal sample set for the target scene Iterate through all sample pairs Cosine similarity is calculated using a time-series comparison model. :
[0068]
[0069] in, For the sample 64-dimensional temporal feature embedding vector extracted by the temporal comparison model; For the sample 64-dimensional temporal feature embedding vector; It is the dot product of two vectors; , Let L2 be the L2 norm of the two vectors respectively.
[0070] Calculate individual similarity of samples :
[0071]
[0072] Where n is the number of normal samples in this scenario.
[0073] Calculate the mean similarity of normal samples. :
[0074]
[0075] Calculate the standard deviation of normal sample similarity :
[0076]
[0077] If a sample Individual similarity satisfy (in, , If the mean and standard deviation are initially calculated, then the sample is determined to be an abnormal interference sample, and it is removed and the above calculation is repeated until all samples are within the normal fluctuation range.
[0078] Specifically, the online anomaly detection phase is as follows:
[0079] like Figure 3 As shown, a system for monitoring the status of workpieces in rotary machining is constructed. The system includes a data acquisition module. In this embodiment, the data acquisition module adopts a non-intrusive deployment to avoid modifying the machine tool. Its core function is to collect timing signals that are strongly correlated with the workpiece status during rotary machining, mainly including cutting edge position signals and current signals.
[0080] The data acquisition module includes a cutting edge position signal acquisition unit, which reads the tool head rotation angle in real time based on the machine tool CNC system. Workpiece rotation angle The tool head tilt angle β is derived by using the trajectory equation of the cutting point during rotary machining to derive the three-dimensional coordinates (x, y, z) of the cutting point in the workpiece coordinate system. The contact position between the cutting point and the workpiece is divided according to the three-dimensional coordinates, namely the tooth root / tooth surface / tooth tip and small end / large end in this embodiment. The output format is stage-position, which matches the timing signal format of the different stages-position scenarios mentioned above.
[0081] The trajectory equation of the cutting point is as follows:
[0082]
[0083] in, The angle of rotation of the cutter head around its own axis; β is the workpiece rotation angle around its own axis; θ is the tool head tilt angle; e is the tool head radius; φ is the tool position angle. (R is the workpiece taper distance; B is the workpiece tooth width); all of the above values can be obtained through the CNC system of the machine tool.
[0084] Preferably, the position determination error of the blade position signal acquisition unit is ≤0.1mm, the update frequency is ≥5kHz, and the time synchronization error with the current signal is ≤0.5ms.
[0085] The data acquisition module includes a current signal acquisition unit, which includes a spindle current sensor installed in the spindle power circuit to acquire instantaneous three-phase current values. In this embodiment, the spindle current sensor is a Rogowski coil sensor, installed non-invasively. The current signal acquisition unit also includes a workpiece axis current sensor installed in the workpiece axis power circuit to acquire instantaneous three-phase current values. In this embodiment, the workpiece axis current sensor is also a Rogowski coil sensor, installed non-invasively.
[0086] Preferably, the sampling frequency of the spindle current sensor and the workpiece axis current sensor is ≥10kHz, the measurement accuracy is ±0.5% FS, the electromagnetic interference resistance is ≥80dB, and the speed range is compatible with the tool turret.
[0087] In addition, the data acquisition module of this embodiment also includes a synchronous triggering unit, which is connected to the aforementioned cutting edge position signal acquisition unit and current signal acquisition unit. The synchronous triggering unit is used to synchronously trigger the acquisition of the cutting edge position signal and current signal based on the zero position signal of the machine tool's spindle encoder, so as to ensure that the timing of the two is aligned.
[0088] The system for monitoring the status of rotary machining workpieces also includes a data preprocessing module. In this embodiment, the data preprocessing module is signal-connected to the data acquisition module and integrated into an industrial computer for running preprocessing algorithms. Its main operating flow is filtering-synchronization alignment-segmentation-feature extraction, specifically:
[0089] Filtering is performed using a 50Hz power frequency notch filter and a 1kHz Butterworth low-pass filter to filter the current signal; a moving average filter is used to filter the edge position signal. The filtering formula is as follows:
[0090]
[0091] Where k is the size of the sliding window. This is the unfiltered, raw blade position signal.
[0092] Synchronous alignment is achieved by correcting the time difference through linear interpolation, ensuring that the blade position signal and the current signal correspond one-to-one at the same timestamp.
[0093] The system is segmented based on the rotation indexing cycle. Each segment contains a complete cycle from cutting to idling. The system is then further subdivided into scene segments according to the constructed stage-position scenario, namely, cutting-tooth root-small end, cutting-tooth root-large end, cutting-tooth surface-small end, cutting-tooth surface-large end, cutting-tooth tip-small end, cutting-tooth tip-large end, and idling-no contact. Preferably, the segment length is 3.5ms, corresponding to the 35 sampling points mentioned above.
[0094] Specifically, the formula for calculating the rotation indexing period is as follows:
[0095]
[0096] in, The angular velocity of the cutter head. This represents the number of sets of cutting teeth on the cutter head.
[0097] Feature extraction: Based on each scene segment of the above segmentation, time-series features are extracted, including current peak value, effective value, kurtosis, standard deviation of edge point position fluctuation, and time-series trend slope, forming a 12-dimensional time-series feature vector.
[0098] The system for monitoring the status of rotary machining workpieces also includes a reference storage module and a timing comparison and judgment module, both of which are used in the offline reference construction stage and the online anomaly judgment stage.
[0099] The baseline storage module in this embodiment can be a data storage device such as a mechanical hard disk or a solid-state hard disk; it is mainly used to store the weights of the trained time-series comparison model and the time-series signals of each stage-position scenario contained in the historical processing data of qualified straight bevel gear turning.
[0100] In this embodiment, the timing comparison and judgment module is used in the offline benchmark construction phase to train a timing comparison model and build a stage-position scenario benchmark library based on the timing signals of various stages and positions contained in the historical machining data of qualified spur bevel gear turning. This provides a reference for judgment in the subsequent online operation phase. In the online anomaly judgment phase, based on the trained timing comparison model, it receives timing features in real time, calls the corresponding scenario benchmark, calculates the similarity, and determines the status of the machined workpiece through a dynamic threshold, outputting anomaly warnings or shutdown signals.
[0101] Specifically, the construction of the phase-location scene benchmark library includes: inputting n sets of normal samples for each scene into a time-series comparison model, extracting 64-dimensional time-series feature embedding vectors, and forming a scene-based feature library; based on the mean of the above normal sample similarity... Standard deviation of similarity with normal samples The calculation formula is used to statistically analyze the similarity of each type of scene. The time-series comparison model weights, scene-based feature libraries, and similarities are encapsulated by scene index, i.e., the stage-location scene benchmark library, and stored in the benchmark storage module.
[0102] Specifically, the online anomaly detection phase is a cyclical process that continues to execute after processing begins, including:
[0103] S1: Receives the 12-dimensional time-series feature vector, filtered cutting edge position signal, and filtered current signal transmitted from the data preprocessing module; detects the dimension of the 12-dimensional time-series feature vector and the integrity of the sampling points, discarding invalid data. Determines the current stage-position scenario based on the cutting edge position signal and current signal. Specifically, it determines the contact state between the cutting edge and the workpiece based on the current amplitude (when the cutting edge is in contact with the workpiece for cutting, the current is greater than the idle reference current), and determines the contact position between the cutting edge and the workpiece based on the cutting edge coordinates; outputs the current stage-position scenario and the current 12-dimensional time-series feature vector.
[0104] S2: Based on the current stage-location scene output, call the corresponding scene-based feature library and model weights from the stage-location scene benchmark library; input the current 12-dimensional temporal feature vector into the temporal comparison model, calculate the 64-dimensional real-time feature embedding vector through forward propagation, and output the real-time feature embedding vector and the corresponding scene-based feature library.
[0105] S3: Same as the cosine similarity mentioned above. The calculation formula calculates the cosine similarity between the real-time feature embedding vector and each set of feature embedding vectors in the scene-based feature library:
[0106] in, For the sample The 64-dimensional temporal feature embedding vector extracted by the temporal comparison model (the real-time feature embedding vector is the one used in the online anomaly detection stage). For the sample The 64-dimensional temporal feature embedding vector (the feature embedding vector in the scene-based feature library is used in the online anomaly detection stage). It is the dot product of two vectors; , Let L2 be the L2 norm of the two vectors respectively.
[0107] The arithmetic mean of the cosine similarities of each group of embeddings is taken to obtain the real-time similarity s of the processing state, which is used to make a basic judgment on the processing workpiece state. The slope k of the change in similarity scores for three consecutive groups is also calculated.
[0108]
[0109] in, Let be the real-time similarity of the processing status at time t. This represents the real-time similarity of the processing state at time t-2. If k < -0.05, it indicates a rapid decrease in similarity, marked as an abnormal state trend; otherwise, it indicates stable similarity, marked as a normal state trend. Output the real-time similarity s of the processing state and the state trend (abnormal / normal).
[0110] S4: Based on the current stage-location scene label, invoke the dynamic threshold of the corresponding scene; preferably, cut the scene. Idle scenario Perform the following workpiece status determination:
[0111] Normal state: When s≥V and the state trend is normal, the workpiece is marked as normal and a normal signal is output; the benchmark storage module dynamically updates the stage-position scene benchmark library based on normal processing data, and automatically optimizes the scene-based feature library and similarity after accumulating a preset number of normal time sequence segments;
[0112] Level 1 warning: When s < V or the state trend is abnormal, it is marked as an abnormal workpiece state, and if it lasts for 1 rotation indexing cycle, a level 1 warning signal is output; and the current timing signal is stored.
[0113] Level 2 warning: When s < V or the state trend is abnormal and lasts for 2 rotation indexing cycles, a level 2 warning signal is output; and a stop command is triggered, which directly controls the CNC system of the machine tool to stop the machine tool operation.
[0114] If the workpiece status is determined to be normal or a level 1 warning in step S4, the system continues to receive real-time output from the data preprocessing module and repeats steps S1-S4 until processing is complete. If the workpiece status is determined to be a level 2 warning in step S4, the system pauses receiving real-time data from the data preprocessing module and resumes repeating steps S1-S4 after receiving a continue command.
[0115] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method of monitoring the state of a workpiece being spin finished, characterized by, The method comprises the following steps: Based on the historical machining data of eligible workpiece rotary machining and corresponding workpiece parameters and cutter head parameters, a plurality of stage-position scenes are divided; the time sequence signals of various stage-position scenes are separated from the historical machining data, and a time sequence comparison model is constructed and trained; The stage-position scene division method is: based on the contact state of the blade point and the workpiece, it is divided into cutting contact scene and non-cutting contact scene, and based on the contact position of the blade point, it is divided into root contact, tooth surface contact and tooth tip contact; The cutting contact scene is determined by the current amplitude being greater than the idle reference current, and the non-cutting contact scene is determined by the current amplitude being less than or equal to the idle reference current; The mean and standard deviation of the similarity of normal samples in various stage-position scenes are calculated, a stage-position scene reference library containing model weight, scene-based feature library and similarity is constructed and stored; The blade point position signal and current signal in the rotary machining process are collected in real time, the collected blade point position signal and current signal are filtered, synchronized, segmented and feature extracted, and a time sequence feature vector and a current stage-position scene are output; Based on the current stage-position scene, the stage-position scene reference library is called, the time sequence feature vector is input into the trained time sequence comparison model, and a real-time feature embedding vector is obtained; The similarity and change trend of the real-time feature embedding vector and the corresponding scene-based feature library are calculated, the dynamic threshold of the corresponding scene is called for hierarchical judgment, and the workpiece state is output.
2. The method of claim 1, wherein, The time sequence comparison model is constructed based on a twin time domain convolution network, the twin time domain convolution network comprises two symmetrical TCN branches and a comparison loss layer, the input of the TCN branch is a time sequence feature vector, and the feature embedding vector is output after being processed by a plurality of convolution blocks; the comparison loss layer adopts a ternary loss function, and the loss value calculation formula is: ; wherein n is the number of normal samples of the same stage-position scenario, is an anchor sample embedding vector, is a positive sample embedding vector, is a negative sample embedding vector, is an interval parameter.
3. The method of claim 1, wherein, The collected blade point position signal and current signal are filtered, including: filtering the current signal by 50Hz power frequency notch and 1kHz Butterworth low-pass filter; filtering the blade point position signal by sliding average filter, and the filtering formula is: ; where k is the size of the sliding window, is the unfiltered raw edge point position signal; Synchronization alignment, including: correcting the time difference by linear interpolation to ensure that the blade point position signal and the current signal under the same timestamp correspond one by one; Segmentation, including: segmenting based on the rotation indexing period, each segment containing a complete cycle from cutting to idling, and then subdividing the scene segments according to the constructed stage-position scene, and the rotation indexing period calculation formula is as follows: ; wherein, is the angular velocity of the cutter head, is the number of tooth groups of the cutter head; Feature extraction, including extracting time sequence features based on each segmented scene segment.
4. The method of claim 1, wherein, The similarity of the real-time feature embedding vector and the corresponding scene-based feature library is calculated, including: based on the cosine similarity algorithm, and the calculation formula is: ; wherein, is a real-time feature embedding vector, is a feature embedding vector in a contextualized feature library; Take the arithmetic mean of all cosine similarities, and define it as the real-time similarity of the machining state.
5. The method of claim 1, wherein, The change trend of the real-time feature embedding vector and the corresponding scene-based feature library is calculated, including: calculating the change slope of the real-time similarity of three consecutive groups to determine, and the slope calculation formula is: ; wherein, is the real-time similarity of the processing state at time t, is the real-time similarity of the processing state at time t-2; if k < -0.05, it is marked as an abnormal state trend.
6. The method of claim 5, wherein, The dynamic threshold of the corresponding scene is called for hierarchical judgment, including: Computing dynamic thresholds for cutting scenarios wherein, is a mean of normal sample similarities, is a standard deviation of normal sample similarities; Computing a dynamic threshold for an idle scenario wherein, is a mean of normal sample similarities, is a standard deviation of normal sample similarities; The real-time similarity of the machining state is greater than or equal to the dynamic threshold, and the state trend is normal, which is judged as the normal workpiece state. The machining state real-time similarity is less than the dynamic threshold, or the state trend is abnormal, the workpiece state is determined to be abnormal, and a first-level early warning signal is output if the abnormal state lasts for one rotation period. The machining state real-time similarity is less than the dynamic threshold, or the state trend is abnormal, the workpiece state is determined to be abnormal, and a second-level early warning signal is output if the abnormal state lasts for two rotation periods.
7. A system for monitoring the state of a workpiece during a spinning process, implemented based on the method for monitoring the state of a workpiece during a spinning process according to any one of claims 1 to 6, characterized in that, The method comprises the following steps: A data acquisition module, comprising a blade point position signal acquisition unit, a current signal acquisition unit and a synchronous triggering unit, is used to acquire blade point position signals and current signals in the rotation division machining process and realize time sequence alignment; A data preprocessing module is used to filter, synchronize, segment and extract features of the acquired signals, output time sequence feature vectors and current stage-position scenarios; A reference storage module is used to store a stage-position scenario reference library, which contains trained time sequence comparison model weights, a scenario-based feature library and the similarity of various scenarios; A time sequence comparison determination module is used to call the stage-position scenario reference library, calculate the similarity and change trend of real-time feature embedding vectors and the scenario feature library, call the dynamic threshold of the corresponding scenario for hierarchical determination, and output the workpiece state.
8. The system for monitoring the state of a workpiece being spin divided according to claim 7, wherein, The blade point position signal acquisition unit has an update frequency of greater than or equal to 5 kHz; the current signal acquisition unit uses a Rogowski coil sensor with a sampling frequency of greater than or equal to 10 kHz; and the synchronous triggering unit uses the machine tool spindle encoder zero position signal as a reference to realize time sequence alignment of the blade point position signal and the current signal, with a synchronization error of less than or equal to 0.5 ms.
9. The system for monitoring the state of a workpiece being spin divided according to claim 7, wherein, The reference storage module dynamically updates the stage-position reference library based on normal machining data, and automatically optimizes the scenario-based feature library and the similarity after accumulating a preset number of normal time sequence segments.
Citation Information
Patent Citations
Numerical control machining intelligent monitoring and self-adaptive control method and related device
CN120103786A
Numerical control machine tool machining environment monitoring system
CN120779865A