Machine tool machining abnormality diagnosis method and system based on self-cleaning rotating window vision and multi-sensor fusion
By using a self-cleaning rotating window vision and multi-sensor fusion method, the timing accuracy and contaminant occlusion problems of multi-sensor diagnosis during machine tool processing are solved, achieving high-precision anomaly detection and closed-loop control.
Patent Information
- Application Number
- CN202611616165.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-20
AI Technical Summary
In the current machine tool processing, multi-sensor fusion diagnostic methods cannot meet the timing accuracy requirements for detecting sudden anomalies at the millisecond level. Furthermore, the reliability of the visual modality of the self-cleaning rotating window changes periodically with the rotation angle, leading to a high risk of false alarms and missed alarms.
By fusing vision with a self-cleaning rotating window and multiple sensors, the centrifugal force of the rotating transparent turntable is used to clean contaminants. Combined with rotation angle detection and time series basic model, cross-modal temporal alignment and feature fusion are achieved, reducing the impact of contaminant occlusion and improving alignment accuracy and robustness.
It achieves automatic weight reduction of visual modalities in occluded regions, reduces the risk of false alarms and missed alarms, improves the accuracy and reliability of multimodal diagnosis, and takes into account the rapid detection and early warning of both progressive and sudden transient anomalies.
Smart Images

Figure CN123128976A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine tool processing status monitoring technology, specifically to a method and system for diagnosing machine tool processing anomalies based on a self-cleaning rotating window vision and multi-sensor fusion. Background Technology
[0002] During machine tool processing (such as milling, turning, and drilling), abnormal conditions such as tool wear, chipping, chatter, chip entanglement and blockage, workpiece clamping looseness, and spindle bearing failure, if not identified and addressed in a timely manner, can lead to minor issues like workpiece surface quality and dimensional deviations, or even serious consequences such as workpiece scrap, tool damage, and damage to the spindle and guideways. Therefore, it is necessary to perform real-time diagnosis of abnormal conditions during processing and to take corrective action as quickly as possible after an anomaly is diagnosed.
[0003] Existing technical solutions mainly involve deploying multiple sensors in the processing area and employing a multimodal information fusion diagnostic method. This requires time alignment of signals from different sensors and weighted fusion according to modal reliability. However, in this process, the unified time grid constructed by existing solutions for aligning various modalities is limited by the period of the visual modality with the lowest sampling rate, resulting in cross-modal alignment deviations on the order of tens of milliseconds. This, coupled with clock drift from the acquisition equipment, leads to accumulated alignment mismatches, making it difficult to meet the timing accuracy requirements for detecting and handling sudden anomalies at the hundreds of millisecond level. Existing technologies either use discontinuous visual acquisition that interrupts processing or only optimize alignment accuracy within a unified time axis framework. Secondly, under the condition of a self-cleaning rotating window, residual contaminants on the disk rotate with the disk, so the actual reliability of the visual modality changes periodically with the rotation angle: in some rotation angles, contaminants happen to obscure the key observation area, at which point the visual features are essentially ineffective; in other rotation angles, the field of view is clear, and the visual feature quality is the highest. Existing common fixed weights, data-learned weights, or real-time estimated weights do not include window rotation angles, cannot reflect this deterministic prior, will cause false alarms in visual failure intervals, waste information in visually clear intervals, and cannot clearly determine that the visual modality is unusable, and do not support degraded operation.
[0004] Meanwhile, the above problems are time-coupled. The lowest visual sampling rate is the main source of multimodal temporal alignment deviation, and the reliability fluctuates with the corner period. When the occlusion corner interval coincides with the mismatch interval, the visual system is unavailable and the alignment is unreliable during the critical period for confirming the anomaly, forming a high-risk window for missed and false alarms. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for diagnosing machine tool processing anomalies based on self-cleaning rotating window vision and multi-sensor fusion, so as to solve the problems mentioned in the background art.
[0006] The specific technical solution provided by this invention is as follows: A machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion, comprising the following operational steps: Step S1: The video stream of the machine tool processing area is acquired by the self-cleaning rotating window camera to form a visual modal signal, and the instantaneous rotation angle of the transparent rotating turntable corresponding to each video frame is acquired synchronously; wherein, the self-cleaning rotating window camera is installed at the location of the machine tool processing area; the transparent rotating turntable is driven by a motor to rotate stably at a known speed, and is installed between the camera lens and the machine tool processing area to isolate processing contaminants and use the centrifugal force of rotation to throw off the contaminants attached to the turntable surface.
[0007] Furthermore, the instantaneous rotation angle is acquired by the rotation angle detection unit at the exposure synchronization point of each video frame; the visual timestamp, frame number, instantaneous rotation angle, and rotation angle validity flag of the k-th frame image are written into a tuple and written into the circular buffer, and the rotation angle of adjacent frames is checked for continuity; when the rotation angle of adjacent frames is consistent with the angle increment corresponding to the nominal rotation frequency of the transparent rotating turntable, the frame rotation angle is determined to be valid; otherwise, the frame rotation angle is marked as invalid and compensated by the interpolation or prediction value of adjacent frames.
[0008] Step S2: Synchronously acquire vibration mode signals and spindle motor current mode signals.
[0009] Furthermore, the vibration mode signal and the current mode signal are acquired under their respective independent clock sources and retain their original timestamps without pre-sampling with a fixed grid. When there are missing channels or delays, a missing flag is recorded, and the channel corresponding to the missing flag is processed by masking in the cross-modal attention operation.
[0010] Step S3: Extract the characteristic frequency components excited by the rotation of the transparent rotating disk from the vibration modal signal, use the phase of the characteristic frequency components as a common time base, and introduce a time series basic model to perform cross-modal time alignment of each modal signal.
[0011] Furthermore, cross-modal timing alignment includes: performing orthogonal demodulation on the multi-channel signals acquired by the vibration sensor according to the rotation frequency of the transparent rotating disk and its harmonic frequencies to obtain the in-phase and quadrature components of each harmonic of each channel; calculating the corresponding demodulation amplitude and phase quality index of each harmonic of each channel, where the phase quality index is the ratio of the demodulation amplitude to the standard deviation of the background noise of the vibration channel; and then performing circular statistical averaging on the demodulated phase of each harmonic according to its harmonic order to obtain the coarse demodulated fundamental frequency phase of each channel.
[0012] Furthermore, the difference between the instantaneous rotation angle on the visual side and the coarse demodulated fundamental frequency phase on the vibration side is taken as the phase difference. The phase difference is encoded into a dual-channel sequence of sine and cosine channels, and combined with one or more covariates from the multi-harmonic demodulation amplitude, phase quality, rotational speed, temperature, and instantaneous rotation angle angular velocity to form an input sequence, which is then input into the time series basic model. The time series basic model outputs the quantile predictions for future times. After normalizing each quantile prediction value to the unit circle, the phase difference is inversely solved. The median is taken as the prior mean of the phase difference, and the standard deviation of the phase prediction and the corresponding confidence level are determined based on the deviation between the inverse solution results of each quantile and the prior mean of the phase difference.
[0013] Furthermore, an exponentially normalized fusion weight is constructed based on the demodulation amplitude, phase quality index, and phase prediction standard deviation of each harmonic in each channel. The phase of each harmonic converted to the fundamental frequency is then averaged using the exponentially normalized fusion weight to obtain the common time base phase on the vibration side. Finally, the phase quality index is weighted and summed using the exponentially normalized fusion weight to obtain the fused phase quality.
[0014] Furthermore, a two-dimensional state vector containing phase shift and phase drift rate is constructed. The prior mean of phase difference and the standard deviation of phase prediction are used as the observation prior and adaptive noise parameters of Kalman filtering, respectively. The phase shift and its drift rate are obtained through Kalman prediction and updating. After converting the phase shift into a time shift, the vibration mode signal and the current mode signal are adaptively resampled and aligned to the visual frame time axis. The posterior phase standard deviation, visual mode confidence, fusion phase quality, and phase prediction confidence output by Kalman filtering are multiplied to obtain the common time base alignment confidence. When the common time base alignment confidence is lower than the preset alignment confidence threshold, the gating weight of the visual mode is reduced, the fusion is degraded to a vibration and current dual-mode, the dependence of Kalman filtering on the prediction results of the time series basic model is increased, and the detection threshold of the second type of sudden transient anomaly is raised. When the common time base alignment confidence rises back to above the alignment confidence threshold, the visual mode is restored to participate in multimodal fusion.
[0015] Step S4: Determine the area covered by the contaminants attached to the transparent rotating disk in the current video frame based on the instantaneous rotation angle, and calculate the visual modal confidence of the video frame.
[0016] Furthermore, calculating the visual modal confidence of the video frame includes: in the fixed coordinate system of the transparent rotating turntable, rotating the pollutant angle coverage interval in the opposite direction according to the current instantaneous rotation angle, calculating the intersection length of the rotated pollutant angle interval and the defined key observation area angle interval, dividing the intersection length by the angle width of the key observation area to obtain the pollutant coverage; performing a nonlinear mapping on the pollutant coverage to obtain the visual modal confidence, wherein the nonlinear mapping is bounded by the confidence lower limit retained when completely occluded, and adjusting the confidence difference between the occluded interval and the clear interval through a sharpening coefficient; performing first-order temporal smoothing and hysteresis judgment based on the degradation entry threshold and degradation exit threshold on the visual modal confidence, setting the degradation entry threshold to be greater than the degradation exit threshold; when the smoothed visual modal confidence is lower than the degradation exit threshold, entering the visually unusable degradation state, and when the smoothed visual modal confidence is higher than the degradation entry threshold, exiting the visually unusable degradation state.
[0017] Step S5: Input the aligned modal signals into the multimodal fusion neural network, and perform feature fusion using the visual modal confidence as the gating weight of the visual modal features.
[0018] Furthermore, visual modality features are used as query vectors, and cross-attention operations are performed on the key vector and value vector obtained by concatenating the features of each modality. When calculating the attention score, a feature scaling factor is introduced; and the value vector corresponding to the visual modality is scaled element by element by the visual modality confidence.
[0019] Step S6: Output the classification result and confidence level of the abnormal event. When the confidence level is not lower than the preset threshold, trigger the handling action that matches the abnormal category.
[0020] Furthermore, the classification head of the multimodal fusion neural network includes two sets of sub-classification heads corresponding to the first type of progressive evolution anomaly and the second type of sudden transient anomaly, respectively. When the confidence of the classification result is not lower than a preset threshold, a handling action matching the anomaly category is triggered; otherwise, only a log is recorded.
[0021] On the other hand, the present invention also provides a machine tool machining anomaly diagnosis system based on self-cleaning rotating window vision and multi-sensor fusion, used to execute a machine tool machining anomaly diagnosis method, including: A self-cleaning rotating window camera is installed in the machine tool processing area to collect video streams from the machine tool processing area. The self-cleaning rotating window camera includes a transparent rotating turntable driven by a motor to rotate stably at a known speed. The transparent rotating turntable is installed between the camera lens and the machine tool processing area to isolate processing contaminants and use the centrifugal force of rotation to throw off the contaminants attached to the turntable surface. The rotation angle detection unit is used to output the instantaneous rotation angle of the transparent rotating turntable in real time and mark the rotation angle information to each frame of video image; Vibration sensors are used to collect vibration modal signals during the processing. The current sampling unit is used to acquire the current mode signal corresponding to the output current of the spindle motor; The timing alignment unit is used to extract the characteristic frequency components excited by the rotation of the transparent rotating disk from the vibration mode signal and perform cross-modal timing alignment. The visual modality confidence calculation unit is used to determine the area covered by the contaminants attached to the transparent rotating turntable in the current video frame based on the instantaneous rotation angle, and to calculate the visual modality confidence corresponding to the current video frame. A multimodal fusion neural network is used to receive multimodal features after time-aligned processing, perform feature fusion, and output processing anomaly classification results. The decision-making module is used to trigger corresponding actions based on the classification results of processing anomalies.
[0022] Compared with the prior art, the beneficial effects achieved by the present invention are: (i) This invention sets up a transparent rotating turntable driven by a motor and rotating stably at a known speed between the camera lens and the processing area. The centrifugal force generated by the rotation throws the oil, chips and cutting coolant attached to the turntable away, thereby achieving self-cleaning of the viewing window and reducing the obstruction of the processing area's field of view by contaminants from a hardware perspective. (ii) This invention binds the image frame to the instantaneous rotation angle of the transparent rotating disk, and uses the rotation frequency and the phase of its harmonic components excited by the rotation of the disk in the vibration mode signal as a common time base. It does not require the deployment of hardware synchronization trigger lines between multiple sensors, nor does it require the forced uniform resampling of each mode signal to the same grid. It can align visual, vibration and current mode signals with significantly different sampling rates to the same time axis, avoid the interpolation error and phase information loss introduced by uniform resampling, and maintain alignment under the conditions of frame loss, missing frames and rotation speed fluctuations, thereby improving the alignment accuracy and robustness of multimodal signals.
[0023] (III) This invention uses the deterministic hardware prior of the instantaneous rotation angle output by the rotation angle detection unit to quantify the coverage of pollutants in the key observation area in real time and map it into the confidence of the visual modality. This confidence is directly used as the gating weight of the cross-modal attention module, so that the visual modality is automatically reduced in the occluded corner interval and restored in the corner interval with clear field of view. This overcomes the problem of false alarms and false negatives caused by the visual modality being unreliable but still participating in the fusion with equal weight under the condition of pollutant occlusion.
[0024] (iv) This invention introduces the probability prediction of the time series basic model and physical orthogonal demodulation to form a dual channel, and uses the uncertainty of the model prediction as the adaptive noise parameter of Kalman filtering and the penalty term of phase fusion weight, so that cross-modal time alignment remains interpretable, evaluable and degradeable under weak signal, occlusion, variable speed and clock drift conditions. It also identifies high-risk windows where occlusion intervals and mismatch intervals overlap through common time base alignment confidence, triggering a deterministic degradation mechanism.
[0025] (v) This invention divides the anomalies to be diagnosed into two categories: the first category of progressively evolving anomalies and the second category of sudden transient anomalies, and sets two sets of evaluation indicators for each category. The system's overall confidence level is used as a prerequisite for issuing handling actions. This invention takes into account both early warning of progressively evolving anomalies and rapid detection of sudden transient anomalies, while avoiding dangerous actions such as accidental emergency stops in low-confidence scenarios, thus forming a closed-loop control for fault diagnosis and equipment handling. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the machine tool machining anomaly diagnosis system provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the multimodal fusion neural network provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the operation of the machine tool processing anomaly diagnosis method provided in the embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the timing alignment principle of multimodal systems provided in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the principle of visual modality confidence change provided in an embodiment of the present invention; Figure 6 This is a response timing comparison diagram of sudden anomalies and gradual anomalies provided in an embodiment of the present invention; Figure 7 This is a schematic diagram comparing the logical principles of the two types of exceptions provided in the embodiments of the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.
[0028] Example 1: In this embodiment, combined with Figure 1As shown, this invention provides a machine tool machining anomaly diagnosis system based on a self-cleaning rotating window vision and multi-sensor fusion. By fusing multiple signals such as vision, vibration, current, and optional sound, the system achieves real-time diagnosis and decision-making during the machining process. The system's components and functions are as follows: Machine tool: As the monitored object of this system, it includes the bed, spindle, feed system, fixture, and cutting tools, capable of performing milling, turning, or drilling operations. During machine tool operation, the machining area generates interactions between the tool and the workpiece, simultaneously producing various physical field signals such as vibration, current, and optional acoustic signals. The machine tool also serves as the physical carrier of the system, providing physical mounting references for various sensors deployed on the spindle bearing housing and workpiece fixture. Furthermore, it provides drive power and mechanical mounting interfaces for the rotating window component in the self-cleaning rotating window camera, ensuring the proper installation and power supply of the hardware components.
[0029] Self-cleaning rotating window camera: The self-cleaning rotating window camera mounted on the machine tool in this system is a key hardware device that distinguishes it from traditional fixed window solutions. It is mainly deployed in the machining area of the machine tool to provide uninterrupted visual observation of the machining area and output corner marking signals that can be used for timing alignment. The self-cleaning rotating window camera also includes: Transparent Rotating Turntable: This is a transparent disc driven by a motor and maintaining a stable rotation at a known speed, installed between the camera lens and the machine tool processing area. It isolates oil, chips, and cutting coolant, preventing these contaminants from directly contaminating the camera lens. Its self-cleaning ability relies on the centrifugal force generated by rotation, combined with the disc's own structure, to fling away contaminants adhering to the disc. Because the transparent rotating turntable in this system is a mechanical body rotating stably at a known speed, it excites vibration components corresponding to its own rotational frequency and harmonics on the machine tool's overall structure. The phase of these vibration components and the instantaneous rotation angle of the transparent rotating turntable have a one-to-one mapping relationship. Furthermore, the instantaneous rotation angle can be correlated with each frame of video image output by the camera, allowing the same physical quantity to be simultaneously reflected in both the vibration signal and the image signal—two independent signals. This physical characteristic is the physical basis for establishing a common time base for the entire system of this invention. If a traditional fixed window structure were used instead, it would be impossible to generate vibration components strictly bound to the image frames and excited by components at a known rotational speed, making the core technology of this invention impossible to achieve.
[0030] The rotation angle detection unit is used to output the instantaneous rotation angle of the transparent rotating disk in real time and mark the rotation angle information on each frame of the output video image, so that each frame image and the corresponding rotation angle form a deterministic one-to-one mapping relationship. In this invention, the hardware implementation of this unit can be achieved by using a photoelectric encoder, a Hall sensor with a magnetic grating, or by using image recognition to track the disk feature marks in the image to calculate the rotation angle. The resolution of the rotation angle signal output by the hardware needs to be higher than the accuracy requirements of the subsequent confidence calculation and phase alignment stages, with an angle resolution (preferably better than 0.5° in this embodiment). The rotation angle signal output by this unit is simultaneously sent to the visual modal confidence calculation unit and the cross-modal timing alignment stage, thereby establishing a closed-loop control link from hardware state acquisition to algorithm gating logic.
[0031] Vibration sensor: Mounted on the spindle bearing housing or workpiece fixture, it is used to collect vibration modal signals during the machining process. These vibration modal signals are the core physical channel for identifying tool wear, chipping, machining chatter, fixture loosening, and bearing failure. In addition to the characteristic signals corresponding to machining anomalies, the vibration sensor output signal also includes the rotational frequency and harmonic characteristic frequency components generated by the rotation of the transparent rotating disk. This system utilizes these features to extract the common time base phase information. In this embodiment, an accelerometer sensor or a laser displacement sensor can be used for signal acquisition at the hardware level, with a sampling rate set much higher than that of the visual modality, not less than 1kHz, to ensure the accuracy of phase estimation calculations.
[0032] The current sampling unit is used to acquire the current mode signal corresponding to the output current of the spindle motor. This signal can characterize the dynamic changes of spindle load and cutting force, and has high sensitivity to sudden machining conditions such as chipping, tool breakage, and chip clogging. In this embodiment, the sampling clock of the current sampling unit can share the same clock source as the vibration acquisition channel, or it can use independent clock sources. In this system, cross-modal timing alignment between the current channel and the vision channel is achieved through a common time base phase, without relying on a unified resampling grid to complete multi-channel alignment.
[0033] Microphone Array: This microphone array is an optional configuration module in this system, used to collect acoustic signals during machine tool processing, providing additional discrimination assistance information for high-frequency transient processing events such as chatter initiation and chipping impact. Whether this module participates in multimodal feature fusion calculations in this system is uniformly controlled by the system's confidence gating logic and cross-modal attention scheduling mechanism to enhance the complementarity of multimodal processing.
[0034] Multimodal fusion neural networks: combining Figure 2As shown, the network serves as the carrier model for the machine tool machining anomaly diagnosis method implemented in this invention. It receives multi-modal features after time-aligned processing, performs feature fusion calculations, and outputs the machining anomaly classification results. This network consists of four sub-modules: a visual backbone, a vibration backbone, a current backbone, and a cross-modal attention module. The visual backbone receives video frame sequences from a self-cleaning rotating window camera, extracts visual features, and outputs visual modal feature sequences corresponding to the feature dimensions. In this embodiment, convolutional networks such as ConvNeXt and ResNet, or video spatiotemporal models such as 3D CNN and TimeSformer can be used to extract visual semantic features related to tool working state, chip morphology, and changes in cutting sparks.
[0035] Vibration backbone: Used to extract features from the time-aligned vibration signal and output a vibration mode feature sequence. In this embodiment, one-dimensional convolution or the Inception module can be selected. Alternatively, the original signal can be converted into a wavelet or STFT time spectrum and then fed into a CNN or Transformer network to extract vibration information such as flutter frequency band energy, impact components, and envelope features.
[0036] Current backbone: Used to extract features from the current signal after timing alignment, output current mode feature sequence, capture signal features such as spindle load change, current harmonics, and current asymmetry, and is particularly sensitive to the identification of sudden working conditions such as chipping and tool breakage.
[0037] Cross-modal attention module: In general cross-modal attention mechanisms, the weights of each modality are fixed values or obtained entirely through data training. This system introduces an external gate control signal, namely the visual modality confidence score, which is output in real-time from the hardware's operating status. This signal can only be obtained using a rotating window visual acquisition scheme. The rotation angle prior information output by the hardware in this system can directly regulate the distribution of attention weights within the network, achieving mutual support between hardware features and algorithmic features at the functional level. In this embodiment, the visual modality confidence score is used as the gate weight for visual features. When the transparent rotating disk has a heavier contamination in the corner area, the contribution of visual features to the final fusion result is reduced, thus restoring the visual feature weight contribution in the corner area where the disk surface has a clear view.
[0038] The visual modality confidence calculation unit receives the instantaneous rotation angle output by the rotation angle detection unit, and, based on this rotation angle position, determines the area of the transparent rotating disk covered by contaminants in the current video frame image, calculating the visual modality confidence corresponding to the current frame. In this invention, the visual modality confidence calculation unit converts the deterministic prior information obtained from the hardware into a scalar gating signal that can be directly used by the neural network, building an information bridge between the physical hardware state and the network attention operation. When the calculated confidence is lower than a pre-set degradation entry threshold and / or degradation exit threshold, the unit outputs a "visual unavailable" status flag, driving the system into a degradation operation mode.
[0039] The decision-making module receives the anomaly classification results and confidence information of each modality from the multimodal fusion neural network. Based on the two predefined anomaly categories and two sets of evaluation indicators, it maps and generates equipment handling actions that match the fault classification results. These actions include speed reduction, planned tool change, emergency stop and tool retraction, feed pause, chip removal, and audible and visual alarms. The corresponding handling action is only triggered when the overall system confidence level exceeds a preset threshold, thus completing the closed-loop control of "fault diagnosis - equipment handling."
[0040] Example 2 In this embodiment, the present invention provides a machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion, which is executed by the machine tool machining anomaly diagnosis system in Embodiment 1. Combined with... Figure 3 As shown, the method includes the following steps: Step S1: The video stream of the machine tool processing area is collected by the self-cleaning rotating window camera to form a visual modal signal, and the instantaneous rotation angle of the transparent rotating turntable corresponding to each video frame is obtained simultaneously.
[0041] In this embodiment, a self-cleaning rotating window camera acquires video streams from the machine tool processing area, forming a visual modal signal. Simultaneously, a rotation angle detection unit obtains the instantaneous rotation angle of the transparent rotating disk corresponding to each frame's exposure synchronization point, ensuring that each frame carries a deterministic rotation angle marker. This rotation angle marker serves as both the input for subsequent visual modal confidence calculations and a physical anchor point connecting the visual frame and the vibration phase. This invention utilizes the known rotational speed of the rotating window's mechanical characteristics to bind the "image frame" with the "instantaneous rotation angle of the disk," solving the problem of visual frames lacking a physical marker usable as a common time base. By having each frame carry the instantaneous rotation angle output by the rotation angle detection unit, subsequent alignment of vision with vibration and current can be achieved using the same physical quantity, the "rotating disk phase," without relying on a unified resampling grid. Simultaneously, it provides deterministic input for rotation angle-related visual confidence modeling, ensuring spatiotemporal consistency.
[0042] Specifically, the implementation steps include: Step S11: Use the camera to set the frame rate (In this embodiment, it can be set) Continuously acquire video from the processing area to form a visual modal signal sequence. ,in, This represents the total number of frames.
[0043] Step S12: The rotation angle detection unit outputs the instantaneous rotation angle of the transparent rotating disk corresponding to each frame at the exposure synchronization point. , Indicates the first The instantaneous rotation angle of the transparent rotating disk at the moment of frame image exposure forms a rotation angle sequence. Among them, the corner detection hardware can be selected from photoelectric encoders, Hall sensors with magnetic grids, or image recognition methods to track disk feature marks.
[0044] Step S13: Establish the frame-rotation correspondence, that is, in the first... frame The marked corner is And record the visual timestamp of the frame. Serial Number Corner validity mark , forming tuples They are jointly written to a circular cache for subsequent alignment based on the physical phase and gating based on the rotation angle. Both share the same hardware source to ensure spatiotemporal consistency.
[0045] Step S14: Perform a corner continuity check again. If the corners of adjacent frames meet the following conditions: When the corner is active, it is valid; if a jump, frame drop, or encoder malfunction occurs, it is marked as active. And can be temporarily compensated by interpolation from adjacent frames or by predicted values, where, The nominal rotation frequency is for a transparent rotating turntable. , For phase wrapping folding operators, used here to normalize the angle to .
[0046] Step S15: Perform preprocessing on the visual image, including distortion correction, region of interest cropping, brightness normalization, and motion blur evaluation. When a frame is determined to be severely blurred or completely occluded, record the corresponding quality flag, but do not discard the frame data directly. Transmit it to the subsequent confidence calculation to determine its gating weight.
[0047] Step S2: Simultaneously acquire vibration mode signals and spindle motor current mode signals.
[0048] In this embodiment, the present invention acquires vibration modal signals through a vibration sensor and spindle motor current modal signals through a current sampling unit. In embodiments with a microphone array, the present invention also simultaneously acquires acoustic modal signals. Each modality is acquired under its own independent clock, without requiring a shared clock with the vision channel, thus ensuring compatibility with low-cost, heterogeneous multi-sensor hardware. The invention preserves the original timestamps of each modality without pre-sampling with a fixed grid, providing the original data foundation for phase common time base alignment.
[0049] Specifically, the specific implementation steps of this invention include: Step S21: Using a vibration sensor mounted on the spindle bearing housing or workpiece fixture, at a preset sampling rate... Collect vibration signals ,in It is used to identify faults such as tool wear, chipping, chatter, loose fixtures, and bearing failure. In addition to abnormal machining characteristics, the vibration signal also includes the rotational frequency generated by the rotation of the transparent rotating turntable. and its harmonic components.
[0050] Step S22: The current sampling unit uses a sampling rate... Acquire three-phase or single-phase current signals from the spindle motor This signal characterizes the dynamic changes in spindle load and cutting force, and is sensitive to sudden working conditions such as chipping, tool breakage, and chip blockage. The current sampling clock can be from the same source as the vibration channel or it can be independent.
[0051] Step S23: Optional microphone array acquires acoustic signals It is used to assist in the discrimination of high-frequency transient events such as flutter initiation and blade breakage impact. Whether it participates in the fusion is uniformly controlled by subsequent confidence gating and cross-modal attention scheduling.
[0052] Step S24: Retain the individual timestamp sequence for each modality. Simultaneously record sampling rate, range, filter bandwidth, and device number. Each channel undergoes anti-aliasing filtering, A / D conversion, detrending, and buffering, but is not forced to be uniform with the visual sampling rate grid.
[0053] Step S25: When some channels are missing or delayed, record the missing flag and process it through a mask in the cross-modal attention process instead of forcibly filling it through uniform resampling.
[0054] Step S3: Extract the characteristic frequency component excited by the rotation of the transparent rotating disk from the vibration modal signal, and use the phase of the characteristic frequency component as a common time base to introduce the time series basic model for cross-modal time alignment.
[0055] In this embodiment, combined with Figure 4As shown, this invention uses the rotational frequency of a transparent rotating disk and the phase of its harmonics in the vibration signal as a common time base. However, instead of directly using the phase obtained from orthogonal demodulation for alignment, it introduces a time series prediction model (Chronos-T5-Base). This model uses a T5 encoder-decoder as its backbone, tokenizes the time series into buckets, and performs probabilistic prediction to output the quantiles of future times. In this invention, the rotating disk phase difference sequence is encoded into a dual-channel model and combined with covariates such as multi-harmonic amplitude, phase quality, rotational speed, temperature, and visual rotation angle, and input into the Chronos-T5 model to obtain the probabilistic prediction and uncertainty of the phase difference. This invention does not directly output the alignment result through the model, but instead uses the model as a phase domain probability prior generator, forming a dual-channel model with physical orthogonal demodulation, to achieve interpretable and degradable cross-modal alignment under conditions of weak signals, occlusion, variable rotational speed, multi-harmonic interference, and clock drift.
[0056] Specifically, the implementation process of this step includes: Step S31: Extract the characteristic frequency components of the rotating disk, perform orthogonal demodulation on the multi-channel signals collected by the vibration sensor, and calculate the amplitude and phase quality indices of the harmonics of the transparent rotating disk.
[0057] Specifically, this invention extracts the characteristic frequency components excited by the rotation of the transparent rotating disk from the vibration modal signal, namely the rotational frequency and its harmonics, and performs orthogonal demodulation on the multi-channel signals collected by the vibration sensor, including:
[0058]
[0059]
[0060] In this step, t refers to time t. For the m-th channel, the h-th harmonic in-phase component (I component); This is a low-pass filter operator used to filter out high-frequency components after demodulation. For the first The original vibration time-domain signal of each vibration channel, The nominal rotation frequency of the turntable. For the first The instantaneous phase angle of the subharmonic. It represents the orthogonal component (Q component) of the m-th channel and the h-th harmonic. The original phase obtained by demodulating the h-th harmonic of the m-th channel. For the four-quadrant arctangent function, through input Output phase, output range is .
[0061] Further calculations of the amplitude and phase quality indices of the harmonics of the transparent rotating disk include:
[0062]
[0063] in, Let h be the demodulation amplitude of the h-th harmonic in the m-th channel. This is a phase quality index; the larger the value, the higher the reliability of the phase result for that harmonic. Let m be the standard deviation of the background noise at time t for the m-th channel. Let the phase of each harmonic be... Divide by harmonic order Obtain the fundamental frequency phase The coarse demodulated fundamental frequency phase is obtained by performing a circular statistical average on the converted fundamental frequency phase.
[0064] in, The coarse demodulated fundamental frequency phase is obtained by multi-harmonic circular averaging of the m-th channel. , Harmonic order From 1 to the highest harmonic H, The weighting weights are the weights corresponding to the h-th harmonic of the m-th channel. , To project the converted fundamental frequency phase onto the unit circle along the y and x axes (the standard practice of circular statistical averaging), a multi-channel coarse phase set is finally obtained. .
[0065] Step S32: Encode the phase difference sequence between vision and vibration into a dual-channel array, and combine it with covariates such as multi-harmonic amplitude, mass, rotational speed, temperature, and visual rotation angle to construct the input token of the Chronos-T5 model.
[0066] Specifically, this step first defines the visual moment of the k-th frame. coarse phase difference at :
[0067] in, For phase wrapping folding operator, its relationship with They belong to the same category but have different output value ranges; here, they are used to fold arbitrary real angles into an interval. This solves the problem of periodic angular jumps. The instantaneous rotation angle of the transparent rotating disk measured in the k-th frame of the visual image. For the vibrating side at the visual moment The coarse demodulated fundamental frequency phase is then determined. The phase difference sequence between visual and vibration data is then encoded into a sequence including a phase difference sinusoidal channel. and phase difference cosine channel Dual-channel: Mapping the periodic phase difference to the continuous range of [-1, 1] eliminates... The transition occurs at a certain point.
[0068] Further construct the input sequence for the Chronos-T5 model: In this embodiment, k in the input sequence represents time k. Let be the single-step input vector of the Chronos-T5 model at time k, and be a one-dimensional feature sequence, where This represents the multi-harmonic fusion amplitude at the current moment. The phase quality at the current moment characterizes the reliability of the phase result. The temperature observation value at time k is used as an external covariate. Let be the angular velocity of the instantaneous rotation angle. This ensures that the input sequence is a historical window of length L. The features from the most recent L steps are concatenated into a time-series sequence to provide context for the time-series model. Then, Chronos-T5 is used as the master predictor, its backbone parameters are frozen, and only the input projection layer and output back projection layer are trained. The model outputs quantile predictions for the next one or several steps in the future. ,in, For the first Step (the next step) The Quantile predictions For the first step The The predicted quantile value is, For the Chronos-T5 probabilistic time series model function, input the history window. quantile parameters Output prediction dual channels.
[0069] Step S33: Normalize the sin / cos quantile predictions output by Chronos-T5 and inversely solve them into phase differences, and calculate the mean and variance of the phase differences.
[0070] Specifically, for each quantile First, the two-channel predicted values of the model's original output. , Unit circle normalization is performed. Since the predicted values directly output by the Chronos-T5 model do not strictly satisfy the unit circle constraint, directly feeding them into the four-quadrant arctangent calculation would introduce phase calculation bias due to amplitude. Therefore, normalized projection is performed to constrain the predicted points to the unit circle for normalization, ensuring that the sine and cosine dual-channel components strictly fall on the unit circle. After dual-channel normalization, the four-quadrant arctangent function is called to perform the phase difference inverse solution, restoring the normalized dual-channel components on the unit circle to the phase difference angle, and outputting the predicted phase difference corresponding to the q-th quantile. The range of output phase values is constrained within... Within the interval, the periodic constraint of the phase angle is maintained. After the phase difference corresponding to all quantiles has been inversely solved, the median prediction is selected as the prior mean of the phase difference output by the large model, and the highest prior estimate of the phase difference given by the large model at the next time step is obtained. The standard deviation is estimated using the difference between 0.1 and 0.9 quantiles. When the Chronos-T5 model outputs prediction results for more than two quantiles, the quantile regression interval width estimation is used. The absolute value deviation between the phase difference obtained by inverse solution at each quantile and the prior mean is calculated. The arithmetic mean of the deviations of all quantiles is taken to obtain the uncertainty standard deviation estimate. After obtaining the standard deviation of the phase prediction of the large model, the phase prior confidence of the large model is defined. The larger the defined value, the lower the uncertainty of the phase prediction of the large model and the more reliable the prediction result. That is, when the prediction standard deviation approaches 0, the confidence approaches 1, and the confidence exponential decay approaches 0 when the prediction standard deviation increases.
[0071] Step S34: Utilize the large model uncertainty and multi-harmonic quality to define circular statistical fusion weights, and fuse the coarse demodulation phases of multiple vibration channels and multiple harmonics into a unified vibration side common time base phase.
[0072] Specifically, this invention calculates the phase of the m-th channel and the h-th harmonic to the fundamental frequency. Define exponential normalized fusion weights :
[0073] All of these have been dimensionless. For the first Channel 1 Subharmonic demodulation amplitude For the first Channel 1 Phase quality corresponding to the second harmonic. The standard deviation of the phase difference prediction obtained by the large model at the current moment is used as a penalty term. The greater the uncertainty, the higher the degree to which the corresponding weight is suppressed. , , The adjustment coefficient is set manually. , All are dummy variables (traversing channels and harmonic indices respectively, distinguishing fixed molecular channels). and molecular fixed harmonics ), At time t, the th iteration... Channel, First Subharmonic demodulation amplitude for At what moment, the traversed number of times Channel, First The phase quality of the second harmonic is calculated by summing and normalizing the denominator across all M vibration channels and all H-order harmonics, ensuring that all weights satisfy the constraints. As the uncertainty of the large model output increases, the penalty term strengthens, compressing the weight differences between channels and harmonics, leading to a more uniform weight distribution and reducing the interference of local anomalous channels and harmonics on the fused phase. This yields the fused weights. Then, the fused phase is solved by circular statistical weighted average method. The sine and cosine components of the phase angle projected onto the unit circle are weighted and summed respectively. The phase is then restored by the arctangent of the four quadrants, and the common time base phase obtained by the final fusion is output. Finally, the fused phase quality is obtained by weighted summation of the phase quality of all channels and harmonics with fusion weight.
[0074] Step S35: Use the mean and variance of the phase difference output by Chronos-T5 as the prior and adaptive noise parameters of Kalman filtering to estimate the relative phase offset and drift rate between the visual clock and the vibration clock, and thereby complete the common time base alignment of the vibration and current signals to the visual frame time axis.
[0075] Specifically, this embodiment constructs a two-dimensional state vector including phase offset and phase drift rate, adopts a uniform drift state transition model, uses the common phase obtained by multi-harmonic fusion and the coarse phase difference calculated by visual angle as the observation value, and dynamically configures the noise parameters of Kalman filtering in combination with large model uncertainty. After Kalman prediction and updating, the smoothed phase offset and drift rate are obtained. Then, the phase offset is converted into a time offset, and adaptive resampling is performed on the vibration and current signals (instead of blind resampling based on a fixed uniform sampling rate grid) to align the vibration and current signals to the common time base of the visual frame. At the same time, the time alignment accuracy can be evaluated based on the Kalman posterior phase standard deviation.
[0076] Step S36: Freeze the Chronos-T5 model backbone network and train only the LoRA low-rank adapter, input and output backprojection layers. Inject the LoRA low-rank matrix into the attention layer weights to achieve efficient parameter fine-tuning. Construct a label-free self-supervised loss by leveraging the physical consistency of the rotating disk. No manual labeling or alignment is required, enabling the large model to be adapted online for specific machine tools, speeds, and pollution conditions.
[0077] The training process employs two types of losses: Phase Consistency Self-Supervised Loss, which utilizes the physical constraints between visual rotation and fused phase, and combines visual confidence, fused phase quality, and large model prediction confidence to generate sample weights, applying higher loss weights to reliable samples; and Quantile Loss, which optimizes the model's ability to estimate output uncertainty. The total loss is obtained by a weighted combination of Phase Consistency Loss, Quantile Loss, and the L2 regularization term of the LoRA parameters. The online update process only updates the LoRA adapter and projection layer, using a small learning rate and performing parameter updates periodically at frame intervals. This balances model adaptability with real-time edge computing performance, addressing the performance degradation issue when transferring pre-trained large models to specific machine tool scenarios.
[0078] Step S37: Combine the Chronos-T5 phase prediction uncertainty, visual modality confidence, and fused phase quality to define a common time base alignment confidence value.
[0079] Among them, the public time base alignment confidence value Represented as:
[0080] in, This is the posterior phase standard deviation of the Kalman filter output. This parameter characterizes the uncertainty of the phase estimation result itself; the larger the phase estimation deviation, the greater the uncertainty. The pre-defined phase reference variance is used as a scaling parameter of the Gaussian decay function to control the decay rate of the phase error on the alignment confidence. For visual modal confidence, when the viewport is rotated to an area obscured by pollutants, A significant decrease indicates that the visual modality output is unreliable. To fuse phase quality, Representing the visual side timestamp, this parameter quantifies the integrity of phase alignment after multi-source phase fusion, reflecting the timing matching quality between vibration, current, and visual multimodalities. The more severe the timing mismatch, the lower the value of this phase quality. The confidence score for the phase prediction of the Chronos-T5 model characterizes the uncertainty of the phase prediction results output by the large model. The more unreliable the model prediction, the lower the confidence score. The common time base alignment confidence score is output after multiplication of four factors. The range of values is constrained to When alignment confidence When the alignment confidence level falls below the preset alignment confidence threshold, it is determined that the current moment has entered a high-risk window of occlusion-mismatch overlap, triggering a deterministic degradation mechanism. This mechanism includes reducing the visual modality gating weight, degrading phase fusion to a vibration-current dual-mode, adjusting the Kalman filter noise parameters to increase the dependence on large model predictions, and raising the transient anomaly detection threshold to suppress false alarms. If the alignment confidence level is lower than the preset alignment confidence threshold, the system will be considered to be in a high-risk window of occlusion-mismatch overlap. Once the risk level rises above the threshold, the system exits the high-risk window state and resumes normal operation, with visual modalities participating in multimodal fusion.
[0081] Step S38: Using the visual frame timeline as the final unified common time reference, output the vibration, current, and acoustic signals aligned to the time base; simultaneously, output a complete set of alignment parameters frame by frame in a structured manner, including phase shift, drift rate, time shift, Kalman posterior phase standard deviation, alignment confidence, visual usability flag, and the mean, uncertainty, and confidence of the large model phase prior, and store all results in the common time base cache for downstream modules to use. Cross-modal attention gating combines visual confidence and alignment confidence to calculate the visual branch attention gain. When either indicator is low, the attention weight of the visual branch is automatically suppressed, realizing the synergy of temporal alignment and visual attention gating, completing the closed loop from physical signal to algorithm gating, which facilitates the comprehensive use of multi-dimensional reliable information by subsequent cross-modal fusion and anomaly diagnosis modules.
[0082] Step S4: Determine the area covered by the contaminants attached to the transparent rotating disk in the current frame based on the instantaneous rotation angle, calculate the visual modal confidence of the frame, and use the confidence as the gating weight of the subsequent cross-modal attention module.
[0083] In this embodiment, under the fixed coordinate system of the transparent rotating disk, the contaminant is fixedly attached to the disk, and its angular coverage range is denoted as . The angle is processed according to a modulo 2π period; the projection of the key observation area onto the visual window corresponding to the processing area has a fixed center angle position and angle width in the disk-fixed coordinate system. For the k-th frame, the current instantaneous rotation angle is obtained. The pollutant angle range will rotate in the opposite direction following the turntable. Angle, that is, the range of angles covered. Rotate in opposite directions around the center of the disk The angle range of pollutants after rotation is obtained. The overlap length of the rotated pollutant interval and the critical observation area interval is calculated, and the pollutant coverage is obtained by dividing the overlap length by the angle width of the critical observation area. When there are multiple pollutants on the turntable, corresponding to multiple sets of angle intervals, each pollutant interval is first rotated in the opposite direction according to the current frame's rotation angle, and the union of all rotated intervals is calculated. Then, the total length of the interval where the union intersects with the critical observation area is calculated, and divided by the angle width of the critical observation area to obtain the pollutant coverage under the condition of multiple pollutants.
[0084] After calculating pollutant coverage, visual modal confidence is calculated using a nonlinear mapping formula: Solve for the original visual modality confidence of the k-th frame. ; To retain a lower bound of confidence in fully occluded scenes, and to prevent the network gradient from vanishing when the confidence level drops to zero; For pollutant coverage; This is the sharpening factor, used to amplify the confidence difference between the occluded and clear areas, enhancing the differentiation effect, and outputting... The range of values is limited to .
[0085] Next, degradation judgment and confidence time smoothing are performed. The original judgment logic uses preset degradation entry threshold and / or degradation exit threshold as the judgment benchmark. A Boolean flag indicates whether the visual modality is available. When the condition is not met, the visual modality of the current frame is marked as unavailable, and the system performs deterministic degradation. Phase fusion degenerates into vibration and current dual-mode operation. To suppress frequent jitter of the gating signal, first-order time smoothing is implemented on the original confidence. At the same time, a hysteresis threshold mechanism is introduced, setting degradation entry threshold and degradation exit threshold. The degradation entry threshold is greater than the degradation exit threshold. When the smoothed confidence is less than the degradation exit threshold, the system enters the visual unavailability degradation state. Only when the smoothed confidence increases and is greater than the degradation entry threshold will it exit the degradation state, relying on hysteresis characteristics to eliminate gating jitter.
[0086] Step S5: Inject the aligned multimodal features and visual modality confidence into the multimodal fusion neural network, and use the visual confidence as the gating weight of the visual modality features for fusion.
[0087] Specifically, in combination Figure 5 As shown, this invention receives the sequence of visual, vibration, and current modal features after time alignment. In this embodiment, if a microphone array is configured, the acoustic features can participate in the fusion in the same way. Then, using the visual token as the query vector, cross-attention operations are performed on the key and value obtained by concatenating all modalities. The query, key, and value mapping is completed through a learnable projection matrix, and the visual, vibration, and current modal features are concatenated. When calculating the attention score, a feature scaling factor is introduced to prevent the softmax gradient from disappearing due to excessively large inner product values. Finally, the visual side features are fused and output. To reduce computational overhead, a method can be chosen to directly apply gating to the visual value branch. In this method, the feature contribution of the visual modality is scaled element-wise by the visual modality confidence. In the corner occlusion range caused by pollutants, the visual modality confidence value is small, and the visual value is suppressed, avoiding false alarms caused by visual failure. In the clear image range, the visual modality confidence value remains high, making full use of visual modality information. Finally, the three modal fusion outputs are concatenated or pooled to obtain fused features, resulting in aggregated features. , This represents the concatenation or average pooling operation along the feature dimension of the three-modal eigenvectors. To output features for visual modality fusion, For vibration mode fusion output characteristics, The current mode fusion output features are then fed into a classification head composed of a multilayer sensing mechanism. , This represents two sets of sub-classification heads implemented by a multilayer perceptron. Specifically, each classification head internally sets two sets of sub-classification heads, each corresponding to a confidence level for one of the two types of anomalies, and outputs the anomaly classification result along with its corresponding confidence level.
[0088] Step S6: Anomaly classification output and handling decision triggering.
[0089] In this embodiment, combined with Figure 6 , Figure 7 As shown, the present invention receives the abnormal event classification results and confidence levels, and sets two independent evaluation indicators for the two types of abnormalities. When the output confidence level is greater than the preset threshold, the handling decision module triggers the handling action that matches the abnormality category, forming a closed-loop control for fault diagnosis and equipment handling.
[0090] This invention classifies the anomalies to be diagnosed into two categories: a first category of progressively evolving anomalies and a second category of sudden, transient anomalies. Different evaluation indicators are used for each category. The first category of progressively evolving anomalies includes faults such as tool wear, gradual deterioration of spindle bearings, and gradual loosening of workpiece clamping. Since the faults do not occur instantaneously, before a substantial anomaly occurs, early, weak changes in signals collected by the equipment's sensors that can predict the subsequent fault are used as precursor signals. At this point, the threshold for warning output has not yet been reached. The evaluation indicators focus on the consistency between long-term trends and signals, using sliding window trend slope, cumulative offset, and long-term variance drift. As damage continues to accumulate, if the sliding window trend slope / cumulative offset / variance drift indicators meet preset conditions and reach the threshold, progressive warnings, planned tool changes, or speed reduction measures are triggered. The second category of sudden transient anomalies includes faults such as blade chipping, tool breakage, sudden chip blockage, and chattering. Evaluation indicators focus on sudden signal response, including instantaneous energy surge ratio, kurtosis, and detection delay. When conditions are met, emergency stop and tool retraction, feed pause, chip blowing, or audible and visual alarm actions are triggered. Only when the overall system confidence level is higher than a preset threshold is a response action allowed. In low-confidence scenarios, only log entries are made to avoid false triggering of dangerous actions, thus completing closed-loop control from fault diagnosis to equipment handling.
[0091] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0092] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion, characterized in that, The following steps are included: Step S1: Collect video streams of the machine tool processing area through a self-cleaning rotating window camera to form a visual modal signal, and simultaneously acquire the instantaneous rotation angle of the transparent rotating turntable corresponding to each video frame; The self-cleaning rotating window camera is installed in the machine tool processing area; The transparent rotating turntable is driven by a motor to rotate stably at a known speed. It is installed between the camera lens and the machine tool processing area to isolate processing contaminants and use the centrifugal force of rotation to throw off the contaminants attached to the turntable surface. Step S2: Synchronously acquire vibration mode signals and spindle motor current mode signals; Step S3: Extract the characteristic frequency components excited by the rotation of the transparent rotating disk from the vibration modal signal, use the phase of the characteristic frequency components as a common time base, and introduce a time series basic model to perform cross-modal time alignment of each modal signal; Step S4: Determine the area covered by the contaminants attached to the transparent rotating disk in the current video frame based on the instantaneous rotation angle, and calculate the visual modal confidence of the video frame; Step S5: Input the aligned modal signals into the multimodal fusion neural network, and perform feature fusion using the visual modality confidence as the gating weight of the visual modality features; Step S6: Output the classification result and confidence level of the abnormal event. When the confidence level is not lower than the preset threshold, trigger the handling action that matches the abnormal category.
2. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 1, characterized in that, In step S1, the instantaneous rotation angle is acquired by the rotation angle detection unit at the exposure synchronization point of each video frame; Write a tuple consisting of the visual timestamp, frame number, instantaneous rotation angle, and rotation angle validity flag of the k-th frame image into a circular buffer, and perform a continuity check on the rotation angles of adjacent frames. If the rotation angle of an adjacent frame is consistent with the angle increment corresponding to the nominal rotation frequency of the transparent rotating disk, the frame rotation angle is determined to be valid; otherwise, the frame rotation angle is marked as invalid and compensated by the interpolation or prediction value of the adjacent frame.
3. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 2, characterized in that, In step S2, the vibration mode signal and the current mode signal are acquired under their respective independent clock sources and their original timestamps are retained without pre-sampling with a fixed grid. When there is a missing channel or a delay, a missing flag is recorded, and the channel corresponding to the missing flag is processed by masking in the cross-modal attention operation.
4. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 3, characterized in that, Step S3 includes cross-modal timing alignment, which includes: The multi-channel signals acquired by the vibration sensor are orthogonally demodulated according to the rotation frequency of the transparent rotating disk and its harmonic frequencies to obtain the in-phase and quadrature components of each harmonic of each channel. Calculate the demodulation amplitude and phase quality index of each harmonic of each channel. The phase quality index is the ratio of the demodulation amplitude to the standard deviation of the background noise of the vibration channel. The demodulation phase of each harmonic is converted into the fundamental frequency phase according to the harmonic order, and then a circular statistical average is performed to obtain the coarse demodulation fundamental frequency phase of each channel.
5. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 4, characterized in that, Step S3 also includes: The difference between the instantaneous rotation angle on the visual side and the phase of the coarse demodulated fundamental frequency on the vibration side is taken as the phase difference. The phase difference is encoded into a dual-channel sequence of sine and cosine channels, and combined with one or more covariates such as multi-harmonic demodulation amplitude, phase quality, rotation speed, temperature, and instantaneous rotation angle angular velocity to form an input sequence, which is then input into the basic time series model. The time series model outputs quantile predictions for future times. After normalizing each quantile prediction value to the unit circle, the inverse solution is obtained as the phase difference. The median is taken as the prior mean of the phase difference. The standard deviation of the phase prediction and the corresponding confidence level of the phase prediction are determined based on the deviation between the inverse solution results of each quantile and the prior mean of the phase difference.
6. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 5, characterized in that, Step S3 also includes: An exponentially normalized fusion weight is constructed based on the demodulation amplitude, phase quality index, and phase prediction standard deviation of each harmonic in each channel. The phase of each harmonic converted to the fundamental frequency is then averaged using the exponentially normalized fusion weight to obtain the common time base phase on the vibration side. Finally, the phase quality index is weighted and summed using the exponentially normalized fusion weight to obtain the fused phase quality.
7. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 6, characterized in that, Step S3 also includes: Construct a two-dimensional state vector that includes phase offset and phase drift rate; The phase difference prior mean and the phase prediction standard deviation are used as the observation prior and adaptive noise parameters of the Kalman filter, respectively. The phase shift and its drift rate are obtained through Kalman prediction and updating. After converting the phase offset into a time offset, adaptive resampling is performed on the vibration mode signal and the current mode signal to align them to the visual frame time axis. The common time base alignment confidence is obtained by multiplying the posterior phase standard deviation, visual modality confidence, fused phase quality, and phase prediction confidence of the Kalman filter output. When the common time base alignment confidence is lower than the preset alignment confidence threshold, the gating weight of the visual modality is reduced, the fusion is degraded into a vibration and current dual-modality, the dependence of the Kalman filter on the prediction results of the time series basic model is increased, and the detection threshold of the second type of sudden transient anomaly is raised. When the common time base alignment confidence rises above the alignment confidence threshold, the visual modality is restored to participate in multimodal fusion.
8. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 7, characterized in that, Step S4, calculating the visual modal confidence of the video frame, includes: In the fixed coordinate system of the transparent rotating turntable, the angular coverage range of pollutants is rotated in the opposite direction according to the current instantaneous rotation angle. The intersection length of the rotated pollutant angular range and the defined key observation area angular range is calculated. The intersection length is divided by the angular width of the key observation area to obtain the pollutant coverage. Visual modal confidence is obtained by nonlinear mapping of pollutant coverage. The nonlinear mapping is bounded by the lower limit of confidence retained when completely occluded. The difference in confidence between the occluded and clear regions is adjusted by the sharpening coefficient. The confidence scores of the visual modal are sequentially subjected to first-order time smoothing and hysteresis determination based on the downgrade entry threshold and downgrade exit threshold, with the downgrade entry threshold set to be greater than the downgrade exit threshold; When the confidence level of the smoothed visual modality is lower than the degradation exit threshold, it enters the visual unusable degradation state; when the confidence level of the smoothed visual modality is higher than the degradation entry threshold, it exits the visual unusable degradation state.
9. The machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion according to claim 8, characterized in that, Step S5 also includes: using visual modality features as query vectors, performing cross-attention operations on the key vector and value vector obtained by concatenating the features of each modality, introducing a feature scaling factor when calculating the attention score; scaling the value vector corresponding to the visual modality element by element using the visual modality confidence. Step S6 also includes: the classification head of the multimodal fusion neural network includes two sets of sub-classification heads corresponding to the first type of progressive evolution anomaly and the second type of sudden transient anomaly, respectively. When the confidence of the classification result is not lower than the preset threshold, the handling action matching the anomaly category is triggered; otherwise, only the log is recorded.
10. A machine tool machining anomaly diagnosis system based on self-cleaning rotating window vision and multi-sensor fusion, used to execute the machine tool machining anomaly diagnosis method based on self-cleaning rotating window vision and multi-sensor fusion as described in any one of claims 1-9, characterized in that the system... include: A self-cleaning rotating window camera is installed in the machine tool processing area to collect video streams from the machine tool processing area. The self-cleaning rotating window camera includes a transparent rotating turntable driven by a motor to rotate stably at a known speed. The transparent rotating turntable is installed between the camera lens and the machine tool processing area to isolate processing contaminants and use the centrifugal force of rotation to throw off the contaminants attached to the turntable surface. The rotation angle detection unit is used to output the instantaneous rotation angle of the transparent rotating turntable in real time and mark the rotation angle information to each frame of video image; Vibration sensors are used to collect vibration modal signals during the processing. The current sampling unit is used to acquire the current mode signal corresponding to the output current of the spindle motor; The timing alignment unit is used to extract the characteristic frequency components excited by the rotation of the transparent rotating disk from the vibration mode signal and perform cross-modal timing alignment. The visual modality confidence calculation unit is used to determine the area covered by the contaminants attached to the transparent rotating turntable in the current video frame based on the instantaneous rotation angle, and to calculate the visual modality confidence corresponding to the current video frame. A multimodal fusion neural network is used to receive multimodal features after time-aligned processing, perform feature fusion, and output processing anomaly classification results. The decision-making module is used to trigger corresponding actions based on the classification results of processing anomalies.
