A numerical control machining abnormal data analysis system and method based on multi-source data

CN122902405APending Publication Date: 2026-10-13OVERCONTROL DIGITAL TECHNOLOGY (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611267241.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0002]五轴数控机床凭借其多轴联动的灵活性,在复杂曲面加工领域得到广泛应用,然而,五轴加工过程中因切削力过载、轮廓监控报警、PLC互锁中断等原因导致的异常停机事件时有发生,异常停机后如何安全地将刀具从当前位置退出、避免二次碰撞和设备损伤,是数控加工领域长期存在的技术难题;

Benefits of technology

[0085]1、通过采集异常停机前后的多源数据,构建运动学雅可比矩阵并计算条件数量化各方向速度传递能力的均衡程度,实现姿态奇异性的自动判断,同时采集伺服使能切断后的多维停机响应特征并计算停机瞬态风险指标,实现停机后瞬态响应的量化评估,与现有技术忽略姿态奇异性和瞬态应力释放的方案不同,本发明根据姿态风险分级选择退刀策略,并根据停机瞬态风险指标的各分量分别约束速度、加速度、转矩和检测频率;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902405A_ABST
    Figure CN122902405A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-source data's numerical control processing abnormal data analysis system and method, it is related to data analysis technical field, the method includes the following steps: in the processing of multi-axis numerical control machine tool, multi-source data is collected and stored;From historical abnormal record, extract abnormal feature, filter abnormal feature type, gather into feature abnormal information set;When real-time abnormal shutdown occurs, obtain shutdown response data, posture configuration data and torque demand data, form abnormal analysis node;The condition number in the abnormal analysis node is weighted statistics based on the matching degree of historical tool withdrawal data and the feature abnormal information set, fusion local and global success rate, to modify condition number with comprehensive failure rate;With the posture risk value and shutdown transient risk index after modification generate tool withdrawal strategy, the application realizes numerical control processing abnormal data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, specifically a CNC machining anomaly data analysis system and method based on multi-source data. Background Technology

[0002] Five-axis CNC machine tools are widely used in the field of complex surface machining due to their flexibility of multi-axis linkage. However, abnormal shutdown events caused by cutting force overload, contour monitoring alarm, PLC interlock interruption and other reasons occur frequently during five-axis machining. How to safely remove the tool from the current position after an abnormal shutdown and avoid secondary collision and equipment damage is a long-standing technical problem in the field of CNC machining.

[0003] Existing technologies often face the following shortcomings when dealing with the safe recovery problem after abnormal machine stop: First, they lack the ability to judge posture singularities. The breakpoint continuation machining scheme only solves the problem of where to continue, but cannot determine whether the stop point meets the conditions for safe tool retraction. The general safe retraction scheme generates the retraction path by preset the retraction direction and distance. When the rotary axis of a five-axis machine tool is in a singular posture, the tiny movement of the tool tip can cause the rotary axis to rotate violently. Direct tool retraction is very likely to cause a collision. Existing technologies completely ignore the judgment of posture singularities. Second, they ignore the problem of transient stress release after machine stop. Existing tool retraction schemes do not consider the transient response caused by the servo enable cut-off after abnormal machine stop. The elastic potential energy accumulated in the transmission chain is released instantaneously after the enable cut-off. The tool may passively slip or elastically rebound. The sudden release of stress during the tool retraction process can easily cause tool bounce, chipping, or workpiece scratches. Existing technologies ignore this transient process when generating the tool retraction path. Summary of the Invention

[0004] The purpose of this invention is to provide a CNC machining anomaly data analysis system and method based on multi-source data to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for analyzing abnormal CNC machining data based on multi-source data, the method comprising the following steps:

[0006] During the machining process on a multi-axis CNC machine tool, real-time data is collected and stored;

[0007] Extract following error, overload rate, attitude deviation and feed rate features from historical anomaly records. Compare the measured values ​​of each feature with the corresponding benchmark values ​​and mark the over-limit type. Calculate the percentage of occurrence of each over-limit type. Using the interval with the largest difference between adjacent percentages as the boundary, extract the over-limit types on the side with the larger percentage and compile them into a feature anomaly information set.

[0008] When a real-time abnormal shutdown occurs, the complete position time series after the shutdown is obtained, the maximum offset, cumulative motion and final net offset are extracted to form multi-dimensional shutdown response features, and the condition number is calculated based on the attitude data before shutdown. The actual torque feedback of the drive is read and the load peak component, load change component, overload duration component and mechanical response component are extracted to form a shutdown transient risk index. The condition number and shutdown transient risk index are combined to construct an anomaly analysis node.

[0009] For the condition number, query the tool retraction records in adjacent regions and assign weights according to their matching degree with the feature anomaly information set, calculate the local tool retraction success rate, use Bayesian smoothing to fuse the global success rate, and adjust the condition number with the comprehensive failure rate.

[0010] A retraction strategy is generated based on the corrected attitude risk value and the transient risk index of shutdown.

[0011] In the machining process of multi-axis CNC machine tools, real-time data is collected and stored. The specific steps include:

[0012] During normal machining on a multi-axis CNC machine tool, position feedback data of each translation axis, current loop output values ​​of each driver, angle feedback values ​​of each rotary axis, PLC interlock input signal status, and machining stage are continuously collected at a fixed interpolation cycle as the sampling interval. The multi-axis CNC machine tool is a five-axis CNC machine tool. The position feedback values ​​of each translation axis are the readings of the grating rulers or encoders of the X, Y, and Z axes. The commanded position values ​​of each translation axis are the theoretical commanded positions of the X, Y, and Z axes. The following error values ​​of each translation axis are the differences between the theoretical commanded positions of the X, Y, and Z axes and the grating ruler or encoder feedback readings. The actual speed values ​​of each translation axis are the time change rates of the grating ruler or encoder feedback readings of the X, Y, and Z axes. The angle feedback values ​​of each rotary axis include the angle feedback values ​​of the A and C axes. The current loop output values ​​or load rates of each driver are the current loop output values ​​or load rates of the X, Y, Z, A, and C axis servo drivers.

[0013] The collected data is timestamped according to the sampling time to establish a structured storage format. Each row of data contains five types of data at the same time, forming a multi-source historical database.

[0014] The system reads the controller's operating status and current interpolation type, and combines this information with the currently executed program segment instructions to determine the current machining stage. The controller's operating status includes running, paused, and emergency stop states. The interpolation type is determined by the CNC system's interpolation preprocessing module based on the address symbol and its subsequent value in the currently executed program segment instructions.

[0015] If the controller is in an emergency stop state, it is determined that it is currently in the emergency stop phase, during which any axis movement is prohibited;

[0016] If the controller is in a paused or running state, and the current interpolation type is linear interpolation, it is determined that the current state is in the linear interpolation cutting stage; if the current interpolation type is circular interpolation, it is determined that the current state is in the circular interpolation cutting stage; if the current interpolation type is rapid positioning, it is determined that the current state is in the rapid positioning stage, and by reading the target coordinate value in this program segment and combining it with the current tool tip position, it is determined that the current state is approaching or moving away from the workpiece; if the current program segment instruction is M06, it is determined that the current state is in the tool change start state, and the subsequent M code in the tool change action sequence is further read. If no subsequent tool change action M code is detected within the preset time window after M06, it is determined that the current state is in the tool change instruction waiting execution state; if a subsequent tool change action M code has been detected, it is determined that the current state is in the tool change action execution state; when the program segment instruction is G43, it is determined that the current state is in the tool length compensation effective state. This state is an auxiliary state of the cutting stage and is not a separate machining stage.

[0017] The PLC interlock input signal status includes emergency stop signal, safety door signal, positive and negative soft limit signals for each axis, positive and negative hard limit signals for each axis, servo drive ready signal, motor brake status signal, and safety torque cut-off signal.

[0018] All of the above data types are directly read from the internal variables or fieldbus of the multi-axis CNC system. The position feedback value, command position value, following error value, and actual speed value come from the encoder or grating ruler feedback channel of each translation axis servo drive; the angle feedback value comes from the encoder feedback channel of the rotary axis servo drive; the current loop output value comes from the current loop feedback channel of each axis servo drive; the load rate is calculated by the ratio of the current loop output value to the rated current of the motor; the PLC interlock input signal status comes from the input image area of ​​the programmable logic controller; the currently executed program segment instruction comes from the interpolation preprocessing module of the CNC system kernel.

[0019] The units for position feedback, commanded position, and follow-up error are millimeters; the unit for actual speed is millimeters per second; the unit for angle feedback is degrees; the unit for current loop output is amperes; the unit for load rate is percentage; and the PLC interlock input signal status is a Boolean value, including active and inactive.

[0020] All data were collected at sampling intervals based on the inherent interpolation cycle of the CNC system, with the interpolation cycle ranging from 1ms to 4ms. Each type of data was accompanied by a unified timestamp from the CNC system during collection. After collection, the timestamps were aligned according to the sampling time. Since all data were collected by the CNC system within the same interpolation cycle, the time synchronization error between the data sources was less than one interpolation cycle. This error range does not affect the effectiveness of subsequent multi-source data fusion analysis.

[0021] The position feedback value, current loop output value, and angle feedback value are all processed by a first-order low-pass filter inside the CNC system before entering the acquisition buffer to suppress the impact of high-frequency noise on the validity of the data. The cutoff frequency of the filter is matched with the speed loop bandwidth of the CNC system and is set by the system parameters without additional configuration. The following error value and the actual speed value are calculated from the filtered position feedback value and the command position, without separate filtering processing.

[0022] Extract following error, overload rate, attitude deviation, and feed rate features from historical anomaly records. Compare the measured values ​​of each feature with the corresponding baseline values ​​and label the overload type. Calculate the percentage of occurrence of each overload type. Using the interval with the largest difference between adjacent percentages as the boundary, extract the overload types on the side with the larger percentage and compile them into a feature anomaly information set. The specific steps include:

[0023] Each historical anomaly record detected when a multi-axis CNC machine tool triggers an alarm or abnormal shutdown is collected. Feature extraction is performed on each of the historical anomaly records to obtain several anomaly feature information. The anomaly feature information includes the following error value, load rate value, attitude angle deviation value, and feed speed value at the time of the anomaly. The load rate value is the ratio of the current loop output value to the rated current value of the servo motor, which is used to characterize the load level of the axis at the time of the anomaly.

[0024] For each type of abnormal feature, the following methods are used to determine if the limit has been exceeded:

[0025] For the following error value, read the preset following error monitoring threshold. If the recorded following error value exceeds the monitoring threshold, mark the feature as following error exceeding the limit.

[0026] For the current loop output value, read the rated current value of the motion axis servo motor, calculate the ratio of the recorded current loop output value to the rated current value as the load rate, and if the load rate exceeds the preset load rate threshold, mark the feature as overload rate.

[0027] In one embodiment, the preset load rate threshold is determined based on the rated current of the servo motor, including a warning threshold and an over-limit threshold; the warning threshold is 80% of the rated current of the servo motor, and the over-limit threshold is 115% of the rated current of the servo motor.

[0028] In another embodiment, the preset load rate threshold is determined based on the historical load rate data of each axis collected by the CNC system under normal machining conditions: load rate data within a preset time period under normal machining conditions is collected, and its mean μ and standard deviation σ are calculated. μ+2σ is used as the warning threshold and μ+3σ is used as the over-limit threshold.

[0029] For the attitude angle deviation value, read the corresponding A-axis and C-axis command angle values ​​of the record, calculate the absolute value of the difference between the command angle value and the feedback angle value as the attitude angle deviation value, and if the attitude angle deviation value exceeds the preset attitude angle deviation threshold, then mark the feature as attitude deviation exceeding the limit.

[0030] For the feed rate value, read the preset allowable feed rate value corresponding to the current processing stage, calculate the ratio of the recorded feed rate value to the allowable feed rate value as the feed rate ratio, and if the feed rate ratio exceeds the preset speed ratio threshold, then mark the feature as high-speed feed;

[0031] The number of times each out-of-limit type is marked in all historical anomaly records is counted, and the percentage of its occurrence is calculated. Out-of-limit types whose percentage of occurrence exceeds the natural boundary point are extracted, and all extracted out-of-limit types are compiled into a feature anomaly information set. The natural boundary point is determined by sorting the percentage of occurrence of each out-of-limit type from largest to smallest, calculating the difference between adjacent percentages, and taking the adjacent interval point with the largest difference as the natural boundary point.

[0032] When a real-time abnormal shutdown occurs, the complete position time series after the shutdown is obtained. The maximum offset, cumulative motion, and final net offset are extracted to form multi-dimensional shutdown response features. The condition number is calculated based on the attitude data before shutdown. The actual torque feedback of the drive is read, and the peak load component, load mutation component, overload duration component, and mechanical response component are extracted to form a shutdown transient risk index. The condition number and shutdown transient risk index are combined to construct an anomaly analysis node. The specific steps include:

[0033] When a multi-axis CNC machine tool experiences a real-time abnormal shutdown, starting from the shutdown trigger time, the most recent M consecutive interpolation cycles are traced backward, where M is a positive integer greater than 1 and ranges from 5 to 10. The position feedback data of each translation axis, the actual torque current feedback value of each feed axis, and the angle feedback value of each rotary axis are latched at each sampling time within these M interpolation cycles. Simultaneously, after the shutdown is triggered and the position feedback data can be read normally, the position feedback value of each translation axis grating ruler is continuously collected at a preset sampling interval until the position of each axis tends to be completely stationary, thus obtaining the complete position time series from the shutdown trigger time to complete stationary state.

[0034] Based on the complete position time series, the maximum offset of the translational axis relative to the stop trigger moment, the final net offset after stabilization, and the cumulative motion before complete stillness are calculated. The maximum offset is used to assess the upper limit risk of stress release, the final net offset is used to determine the dominant stress direction, and the cumulative motion is used to assess the severity of stress release. The maximum offset, the final net offset, and the cumulative motion are combined to form the multidimensional stop response characteristics of the translational axis.

[0035] The method for determining complete stillness is as follows: if the actual velocity of N consecutive sampling points in the complete position time series is lower than the preset zero velocity threshold, then the translational axis is determined to have reached complete stillness, where N is a positive integer greater than or equal to 3.

[0036] The cumulative motion is defined as Σ|P_k-P_{k-1}|, which is the sum of the absolute values ​​of the position differences between adjacent sampling times before complete rest, in millimeters. It is used to quantify the total motion amplitude of the mechanical system after stopping. The cumulative motion reflects the intensity of the release process of the elastic potential energy stored in the transmission chain. Even if the maximum offset and the final net offset are small, if the cumulative motion is large, it indicates that repeated oscillations have occurred, and caution is still required when retracting the tool. The typical range of cumulative motion is 0.01mm to 0.5mm, and the specific value depends on the type of shaft and the stopping conditions.

[0037] The settling time is defined as the time required from the moment the machine stops until the actual speed first continuously falls below the zero-speed threshold, measured in milliseconds, and is used to evaluate the duration of the transient response. A longer settling time indicates a longer time for the motion axis to reach a stable state, a longer residual motion duration, and a more conservative speed should be adopted during tool retraction. In one embodiment, the settling time for rapid springback is approximately 20ms to 50ms, and the settling time for slow descent is approximately 100ms to 300ms. In this invention, the settling time is used as an auxiliary correction for tool retraction speed reduction. When the settling time is large, the tool retraction speed should be additionally reduced. The specific reduction amount and the corresponding settling time threshold are determined by experimental calibration. For example, in a calibration embodiment, when the settling time is greater than 100ms, the speed reduction factor is additionally multiplied by 0.9.

[0038] Based on the rotation axis angle feedback value at each sampling time within the M interpolation cycles, calculate the condition number K at each time.

[0039] Extract the maximum offset ΔP_max, cumulative motion ΔP_sum, and stopping time T_stable from the complete position time series after the stop trigger moment, as well as the actual torque feedback value T_actual of the driver in the last interpolation cycle before the stop trigger moment, and read the rated power P_rated and electromechanical time constant t_m of the servo motor of the motion axis.

[0040] The transient risk index ψ of shutdown is calculated. ψ is obtained by combining the following components: peak load component, based on the ratio of the actual torque feedback value T_actual to the rated torque T_rated of the servo motor; sudden load component, based on the rate of change of torque within multiple sampling periods before and after the shutdown trigger moment; overload duration component, based on the length of time the torque exceeds the rated value or threshold; and mechanical response component, based on the maximum offset ΔP_max, cumulative motion ΔP_sum, and stopping time T_stable.

[0041] The load peak component is calculated as T_actual / T_rated, where T_rated is the rated torque of the motion axis servo motor.

[0042] The load mutation component is calculated as the average of the torque change rate in each sampling period before and after the shutdown trigger moment;

[0043] The overload duration component is the ratio of the duration during which the torque continuously exceeds the rated torque to a preset time window.

[0044] The mechanical response component is a weighted sum of the maximum offset and cumulative motion of each axis, and the weighting coefficient is related to the axis type and the machining stage.

[0045] The downtime transient risk index ψ is a weighted combination of the above components, with the weighting coefficients based on the historical load characteristics of each axis and the preset processing stage.

[0046] The preset method for the weight coefficients of each component is as follows: Based on the load data of the axis under historical normal operating conditions, the coefficient of variation of each component is calculated. The larger the coefficient of variation, the more significant the fluctuation of the component under normal operating conditions, and the stronger the ability to distinguish abnormal conditions. Therefore, a higher weight is assigned. Specifically, the weight of each component is proportional to its coefficient of variation, i.e., w_i=CV_i / ΣCV_j, where CV_i is the coefficient of variation of the i-th component, ΣCV_j is the sum of the coefficients of variation of all components, and the total weight coefficient is 1.

[0047] The condition number K and the shutdown transient risk index ψ are combined to construct an anomaly analysis node.

[0048] The anomaly analysis node consists of two core indicators: the condition number K and the transient risk index ψ. The condition number K is a kinematic constraint indicator, reflecting the degree of imbalance in effective inertia in various directions under the current attitude, and is used to drive the selection of the tool retraction path type. The transient risk index ψ is a dynamic constraint indicator, comprehensively reflecting the load impact and mechanical response characteristics after a stop, and is used to drive the reduction of the tool retraction speed. These two indicators independently characterize the risk state after an abnormal stop from both kinematic and dynamic constraint dimensions, respectively, together forming a complete anomaly analysis node.

[0049] Based on the rotation axis angle feedback values ​​at each sampling time within the M interpolation periods, the condition number at each time point is calculated, and the specific construction method is as follows:

[0050] Based on the kinematic chain structure of a five-axis CNC machine tool, the Denavit-Hartenberg parametric method is used to establish the homogeneous transformation matrix between each motion coordinate system. Each joint variable q is substituted into each transformation matrix and multiplied sequentially to obtain the positive kinematic relationship between the tool tip position vector P relative to the workpiece coordinate system and each joint variable q: P=f(q). Each joint variable q includes the positions of three translation axes (X, Y, Z) and the angles of two rotation axes (A, C).

[0051] Based on the kinematic chain structure of the five-axis CNC machine tool, coordinate transformation is performed according to the topological relationship between the tool kinematic chain and the workpiece kinematic chain to obtain the homogeneous transformation matrix T of the tool coordinate system relative to the workpiece coordinate system; partial derivatives of the homogeneous transformation matrix T with respect to each joint variable q are obtained to obtain the kinematic Jacobian matrix J(q), which is a 6×5 dimensional matrix, where the 6 rows correspond to the six components of the tool tip linear velocity and angular velocity, and the 5 columns correspond to the five motion axes X, Y, Z, A, and C. The element in the i-th row and j-th column represents the i-th velocity component of the tool tip caused by the unit velocity change of the j-th joint.

[0052] Singular value decomposition of the kinematic Jacobian matrix J(q) is performed: J(q) = U × Σ × V T Where U is the left singular vector matrix, V is the right singular vector matrix, and V T Let Σ denote the transpose of matrix V, where Σ is a diagonal matrix and its diagonal elements σ1, σ2, ..., σ5 are the singular values ​​of the kinematic Jacobian matrix, arranged in descending order as σ1≥σ2≥...≥σ5>0; the ratio K=σ_max / σ_min of the maximum singular value σ_max to the minimum singular value σ_min is taken as the condition number at that moment.

[0053] If the condition number K is close to 1, it means that the kinematic Jacobian matrix has similar ability to transmit the tool tip velocity in all directions, that is, it is isotropic, and the torque requirements of each axis are balanced when the tool is retracted in a coordinated manner.

[0054] If K is much greater than 1, it means that the magnification in a certain direction is much greater than that in other directions, i.e., anisotropy. During the coordinated retraction, the torque distribution is uneven, and there is a risk that the torque requirement of a certain axis is much greater than that of other axes. When selecting the retraction path, step-by-step retraction should be prioritized to avoid overloading of that axis.

[0055] The process involves querying retraction records in adjacent regions and assigning weights based on their matching degree with the feature anomaly information set. Local retraction success rates are calculated, and Bayesian smoothing is used to fuse the global success rate. The condition number is then adjusted based on the overall failure rate. Specific steps include:

[0056] For each anomaly analysis node constructed, the condition number K is used to query the historical database for historical tool retraction records in the region adjacent to the current attitude angle. The adjacent region is a circular region with the current attitude angle as the center and a preset radius.

[0057] Let N be the total number of tool retractions in this area, where the extracted feature information corresponding to the j-th historical tool retraction record constitutes the feature vector V_j of the record. Calculate the similarity between the feature vector V_j and the set of feature anomalies.

[0058] If the similarity is greater than the similarity threshold, the historical knife retraction record is determined to belong to a feature abnormal scene and is assigned a first scene weight coefficient; otherwise, it is assigned a second scene weight coefficient; the first scene weight coefficient is greater than the second scene weight coefficient.

[0059] The system calculates the weighted number of successful weapon withdrawals and the total weighted number of withdrawals within the region. Each historical weapon withdrawal record corresponds to a weapon withdrawal result indicator value: 1 for a successful withdrawal and 0 for a failed withdrawal. The weighted number of successful weapon withdrawals is defined as the product of the scene weight coefficient corresponding to each record and the weapon withdrawal result indicator value. The total weighted number of withdrawals is equal to the sum of the scene weight coefficients corresponding to each record. The system also calculates the weighted weapon withdrawal success rate p within the region, which is defined as the ratio of the weighted number of successful weapon withdrawals to the total weighted number of withdrawals.

[0060] Count the number of similar tool retraction records n and the number of successful retraction records s in the region, where n is the number of records in the total number of tool retractions N in the region whose similarity to the current abnormal scene is greater than the similarity threshold, and s is the number of records that successfully retracted the tool.

[0061] If n is less than the preset minimum sample threshold n_min, then the global retraction success rate p_global is directly used as the comprehensive success rate S_combined;

[0062] If n is not less than n_min, then the Bayesian smoothing method is used to calculate the overall success rate S_combined, and its calculation formula is as follows:

[0063] S_combined=(s+α×p_global) / (n+α)

[0064] Where α is the smoothing parameter, and p_global is the global tool retraction success rate of all historical tool retraction records in the historical database; the value of α ranges from 1 to 10.

[0065] The determination of similar records is based on the comprehensive matching of multi-dimensional features, including alarm code, processing stage, normalized load rate, following error, residual displacement and A / C axis attitude angle. Among them, the angles of the A-axis and C-axis need to be normalized when calculating the difference, and the angle values ​​are mapped to the range of [-180°, 180°) to avoid mismatches caused by angle wrapping.

[0066] The criteria for "successful tool retraction" are to meet the following conditions simultaneously: no new alarms during the tool retraction process, the load rate of each axis does not exceed the allowable upper limit, the following error of each axis does not exceed the monitoring threshold, the tool reaches the preset safe position and the machining program ends normally. All of the above conditions can be objectively read from the CNC system records.

[0067] When the local sample size is insufficient, shrink towards the global success rate, where α is a smoothing parameter that controls the degree of shrinkage. The larger α is, the more the result leans towards p_global; the smaller α is, the greater the influence of local data. In one embodiment, when n=3, s=3, p_global=0.88, and α=3, S_combined=(3+3×0.88) / (3+3)=5.64 / 6=0.94, which not only reflects the fact that all local data are successful, but also appropriately shrinks towards the global success rate due to the small sample size. The value of the minimum sample threshold n_min ranges from 5 to 10. When n<n_min, the statistical result is unreliable, and the global success rate is directly adopted.

[0068] Taking 1-S_combined as the statistical risk correction term, and superimposing it on the condition number K to obtain the corrected posture risk value U_adj, which is defined as U_adj=K×(1+(1-S_combined)).

[0069] The similarity threshold is determined based on the distribution relationship between the similarity and the tool retraction success rate in the historical tool retraction records, specifically as follows:

[0070] Taking the similarity as the dividing variable, the historical tool retraction records are divided into a high similarity group and a low similarity group, and the similarity value corresponding to the maximum difference of the tool retraction success rate between the two groups is taken as the similarity threshold; the first scene weight coefficient is the ratio of the tool retraction success rate of the historical tool retraction records determined as the feature abnormal scene to the global tool retraction success rate of all historical tool retraction records, and the second scene weight coefficient is 1;

[0071] The value of the similarity threshold ranges from 0.7 to 0.85, and the value of the first scene weight coefficient ranges from 1.3 to 1.8;

[0072] In one embodiment, the similarity threshold is set to 0.8, the first scene weight coefficient is set to 1.5, and the second scene weight coefficient is set to 1.0.

[0073] Read the safety status signals of the multi-axis numerical control system, where the safety status signals include an emergency stop signal, a safety torque off signal, a safety door signal, a servo driver ready signal, a motor brake status signal, a position valid signal of each axis, a positive and negative soft limit signal of each axis, a positive and negative hard limit signal of each axis, and a PLC interlock input signal status; if any of the above signals indicates that the current status does not meet the safe motion condition, the automatic tool retraction command is prohibited from being generated and manual intervention is prompted;

[0074] After all the safety status signals meet the safe motion conditions, the tool retraction path strategy is determined according to the corrected posture risk value U_adj:

[0075] When U_adj is less than the first risk threshold, the current posture is determined to be safe, and the translational exit method is adopted, that is, the current tool posture remains unchanged, and the tool is translated and exited only along the tool axis direction.

[0076] When U_adj is not less than the first risk threshold but less than the second risk threshold, the current posture is determined to be close to the singular region. The posture adjustment method is adopted, that is, first it is determined whether the current tool has disengaged from the workpiece. If it has disengaged, the tool is retracted step by step in the order of first adjusting the rotary axis posture to the safe angle range, and then performing the translational axis tool retraction. If the tool is still in contact with the workpiece, the rotary axis posture adjustment is prohibited, only the translational disengagement is performed and manual confirmation is prompted.

[0077] When U_adj is not less than the second risk threshold, the current posture is determined to be in a high-risk singular region, the generation of automatic tool retraction command is prohibited and manual intervention is prompted;

[0078] During the execution of the tool retraction path, the upper speed limit is constrained by the peak load component; the larger the peak load component, the lower the upper speed limit. Specifically, the peak load component is divided into several continuous intervals, each interval corresponding to a speed limit reduction ratio; the higher the interval containing the peak load component, the larger the reduction ratio. Similarly, the upper acceleration limit is constrained by the load abrupt change component; the larger the load abrupt change component, the lower the upper acceleration limit. This is also achieved by dividing the load abrupt change component into several continuous intervals, each interval corresponding to an acceleration limit reduction ratio; the higher the interval containing the load abrupt change component, the larger the reduction ratio. Finally, the upper torque limit is constrained by the overload duration component; the larger the overload duration component, the lower the upper torque limit. This is achieved by dividing the overload duration component into several continuous intervals, each interval corresponding to a torque limit reduction ratio; the higher the interval containing the overload duration component, the larger the reduction ratio. The higher the value, the greater the reduction ratio. The pause detection frequency is constrained by the mechanical response component. The larger the mechanical response component, the higher the pause detection frequency. Specifically, the mechanical response component is divided into several continuous intervals, and each interval corresponds to a magnification factor of the detection frequency. The higher the interval in which the mechanical response component is located, the greater the magnification factor. The correspondence between the continuous interval division of each component and the reduction ratio is obtained by experimental calibration. The calibration method is as follows: when each component takes different typical values, a tool retraction experiment is carried out, and the maximum allowable speed, acceleration and torque upper limit to ensure safe tool retraction are recorded. The interval division and reduction ratio are obtained by fitting based on the experimental data. At the same time, the constraint upper limit of each motion parameter is set to 10% of the maximum allowable value of the machine tool by default, and is gradually reduced to 1% of the maximum allowable value of the machine tool according to the increase of the load peak component.

[0079] The calibration methods for the first and second risk thresholds are as follows: For typical machining characteristics of the machine tool, cutting experiments are conducted under normal and abnormal cutting conditions, respectively. Actual torque feedback data of each axis is collected and its maximum and average values ​​are recorded. The first risk threshold is twice the average value of the number of posture conditions under normal cutting conditions, and the second risk threshold is the value of the condition measured when the machine tool is at the boundary of the singular region. The above thresholds are initially calibrated during the first debugging of the machine tool and are periodically verified and updated based on actual cutting data during subsequent machining processes. Abnormal cutting conditions refer to cutting conditions where the load rate exceeds 120% of the rated value, the following error exceeds the monitoring threshold of 150%, or the contour monitoring alarm is triggered.

[0080] A CNC machining anomaly data analysis system based on multi-source data, the system comprising:

[0081] The module includes a data acquisition module, a feature extraction module, a node construction module, a risk correction module, and a strategy generation module.

[0082] The data acquisition module collects and stores multi-source data during the machining process of a multi-axis CNC machine tool; the feature extraction module extracts abnormal features from historical anomaly records, filters the types of abnormal features, and aggregates them into a feature anomaly information set; the node construction module is used to acquire stop response data, attitude configuration data, and torque demand data when a real-time abnormal stop occurs, forming an anomaly analysis node; the risk correction module is used to perform weighted statistics on the condition number in the anomaly analysis node based on the matching degree between historical tool retraction data and the feature anomaly information set, and integrates local and global success rates to correct the condition number based on the comprehensive failure rate; the strategy generation module is used to generate a tool retraction strategy based on the corrected attitude risk value and the stop transient risk index.

[0083] The output of the data acquisition module is connected to the input of the feature extraction module; the output of the feature extraction module is connected to the input of the node construction module; the output of the node construction module is connected to the input of the risk correction module; and the output of the risk correction module is connected to the input of the strategy generation module.

[0084] Compared with the prior art, the beneficial effects of the present invention are:

[0085] 1. By collecting multi-source data before and after abnormal shutdown, a kinematic Jacobian matrix is ​​constructed and the balance of velocity transmission capability in each direction is calculated and quantified under conditions, so as to realize the automatic judgment of attitude singularity. At the same time, multi-dimensional shutdown response characteristics after servo enable cut-off are collected and shutdown transient risk index is calculated to realize the quantitative evaluation of transient response after shutdown. Unlike the existing technology that ignores attitude singularity and transient stress release, this invention selects the tool retraction strategy according to attitude risk classification and constrains speed, acceleration, torque and detection frequency according to each component of shutdown transient risk index.

[0086] 2. By constructing a feature anomaly information set, differentiated scene weights are assigned to historical tool retraction records, and Bayesian smoothing is used to fuse local success rates and global success rates. The overall failure rate is used to statistically correct the posture risk. At the same time, a complete decision-making link is established from multi-source data collection, feature extraction, risk correction to strategy generation. Attached Figure Description

[0087] Figure 1 This is a flowchart illustrating a method for analyzing abnormal data in CNC machining based on multi-source data, according to the present invention. Detailed Implementation

[0088] 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. 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.

[0089] In the embodiment: such as Figure 1 As shown, a five-axis CNC machine tool triggered a contour monitoring alarm and caused an abnormal shutdown when machining a certain structural part.

[0090] During normal machine tool processing, the position feedback data, command position data, following error value, actual speed value, current loop output value of each driver, angle feedback value of each rotary axis, interlock input signal status of programmable logic controller, and currently executed program segment instruction are continuously collected at a fixed interpolation cycle sampling interval. The collected data are timestamped according to the sampling time, and each line of data contains various types of data at the same time, forming a multi-source data historical database.

[0091] Four features—following error, overload rate, attitude deviation, and feed rate—are extracted from historical anomaly records. For each type of anomaly feature, the corresponding baseline value for that feature in the current processing state is obtained. The measured value is compared with the baseline value and the overload type is marked. The percentage of each overload type in all historical anomaly records is counted. After sorting each percentage from largest to smallest, the difference between adjacent percentages is calculated. The overload type on the side with the largest difference is used as the boundary and is extracted. These are then compiled into a feature anomaly information set.

[0092] After an abnormal shutdown occurs, starting from the shutdown trigger time, the system traces back the last five interpolation cycles and latches the position feedback data of each translation axis, the driver current loop output value, and the rotation axis angle feedback value at these five sampling times. Meanwhile, after the servo driver is enabled and disabled, the system continuously collects the position feedback values ​​of each translation axis grating at a preset sampling interval until each axis approaches complete stillness, thereby obtaining a complete position time series from the shutdown trigger time to complete stillness. Based on this series, the system calculates the maximum offset of each translation axis relative to the shutdown trigger time, the final net offset after stabilization, and the cumulative motion before complete stillness, which together constitute the multidimensional shutdown response characteristics.

[0093] Based on the rotation axis angle feedback value, the Denavit-Hatenberg parameter method is used to establish the positive kinematic relationship and obtain the partial derivatives to obtain the kinematic Jacobian matrix. Singular value decomposition is performed on this matrix, and the ratio of the maximum singular value to the minimum singular value is used as the condition number to extract the maximum offset, cumulative motion, and stopping time from the multidimensional shutdown response characteristics, as well as the actual torque feedback value of the driver in the last interpolation cycle before shutdown. The rated power and electromechanical time constant of the servo motor are also read. The shutdown transient risk index is composed of four components: load peak, load change, overload duration, and mechanical response. The condition number and the shutdown transient risk index are combined to form an anomaly analysis node.

[0094] The system queries historical databases for tool retraction records within the region adjacent to the current attitude angle. It calculates the similarity between the feature vector of each record and the feature anomaly information set, compares the similarity with a threshold, assigns weights, and calculates the weighted number of successful tool retractions and the total number of weighted retractions to obtain the local tool retraction success rate. It then counts the number of similar tool retraction records and the number of successful records within the local region. If the number of similar records is less than the minimum sample threshold, the global tool retraction success rate is used directly as the overall success rate. If the number of similar records is not less than the minimum sample threshold, a Bayesian smoothing method is used to calculate the overall success rate. The overall failure rate is then added as a statistical risk correction term to the condition number to obtain the corrected attitude risk value.

[0095] The system reads safety status signals, including emergency stop signals, safety torque cut-off signals, safety gate signals, servo drive ready signals, motor brake status signals, valid position signals for each axis, soft and hard limit signals, and programmable logic controller interlock signals. If any signal fails to meet the safe movement conditions, automatic tool retraction commands are prohibited, and manual intervention is prompted. Once all safety conditions are met, the tool retraction strategy is determined based on the corrected attitude risk value: if the risk is below the first threshold, the tool is kept in a translational disengagement position; if the risk is between the first and second thresholds, it is first determined whether the tool has disengaged from the workpiece. If it has, the rotary axis attitude is adjusted before performing translational tool retraction; if it has not disengaged, only translational disengagement is performed, and manual confirmation is prompted; if the risk is not below the second threshold, automatic tool retraction is prohibited, and manual intervention is prompted. During tool retraction, the speed upper limit is constrained based on the load peak component, the acceleration upper limit is constrained based on the load mutation component, the torque upper limit is constrained based on the overload duration component, and the pause detection frequency is determined based on the mechanical response component.

[0096] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for analyzing abnormal CNC machining data based on multi-source data, characterized in that: The method includes the following steps: During the machining process on a multi-axis CNC machine tool, real-time data is collected and stored; Extract following error, overload rate, attitude deviation and feed rate features from historical anomaly records. Compare the measured values ​​of each feature with the corresponding benchmark values ​​and mark the over-limit type. Calculate the percentage of occurrence of each over-limit type. Using the interval with the largest difference between adjacent percentages as the boundary, extract the over-limit types on the side with the larger percentage and compile them into a feature anomaly information set. When a real-time abnormal shutdown occurs, the complete position time series after the shutdown is obtained, the maximum offset, cumulative motion and final net offset are extracted to form multi-dimensional shutdown response features, and the condition number is calculated based on the attitude data before shutdown. The actual torque feedback of the drive is read and the load peak component, load change component, overload duration component and mechanical response component are extracted to form a shutdown transient risk index. The condition number and shutdown transient risk index are combined to construct an anomaly analysis node. For the condition number, query the tool retraction records in adjacent regions and assign weights according to their matching degree with the feature anomaly information set, calculate the local tool retraction success rate, use Bayesian smoothing to fuse the global success rate, and adjust the condition number with the comprehensive failure rate. A retraction strategy is generated based on the corrected attitude risk value and the transient risk index of shutdown.

2. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 1, characterized in that: In the machining process of multi-axis CNC machine tools, real-time data is collected and stored. The specific steps include: During normal machining on a multi-axis CNC machine tool, with a fixed interpolation cycle as the sampling interval, the position feedback data, commanded position data, following error value, actual speed value, current loop output value or load rate of each driver, angle feedback value of each rotary axis, PLC interlock input signal status, and currently executed program segment instruction of each translation axis are continuously collected. The multi-axis CNC machine tool is a five-axis CNC machine tool. The position feedback values ​​of each translation axis are the readings from the X-axis, Y-axis, and Z-axis grating rulers or encoders. The commanded position values ​​of each translation axis are... The values ​​are the theoretical command positions of the X, Y, and Z axes; the following error values ​​of each translation axis are the differences between the theoretical command positions of the X, Y, and Z axes and the feedback readings of the grating ruler or encoder; the actual speed values ​​of each translation axis are the time change rates of the feedback readings of the X, Y, and Z axis grating rulers or encoders; the angle feedback values ​​of each rotation axis include the angle feedback values ​​of the A and C axes; and the current loop output values ​​or load rates of each driver are the current loop output values ​​or load rates of the X, Y, Z, A, and C axis servo drivers. The collected data is timestamped according to the sampling time to establish a structured storage format. Each row of data contains five types of data at the same time, forming a multi-source historical database.

3. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 2, characterized in that: Extract following error, overload rate, attitude deviation, and feed rate features from historical anomaly records. Compare the measured values ​​of each feature with the corresponding baseline values ​​and label the overload type. Calculate the percentage of occurrence of each overload type. Using the interval with the largest difference between adjacent percentages as the boundary, extract the overload types on the side with the larger percentage and compile them into a feature anomaly information set. The specific steps include: Each historical anomaly record detected when a multi-axis CNC machine tool triggers an alarm or abnormal shutdown is collected, and features are extracted from each historical anomaly record to obtain several anomaly feature information; the anomaly feature information includes the following error value, load rate value, attitude angle deviation value, and feed rate value at the time of the anomaly occurrence. For each type of abnormal feature, the corresponding reference value of the feature in the current processing state is obtained, and the deviation or ratio between the measured value of the feature and the reference value is calculated. If the deviation or ratio exceeds the preset corresponding threshold, the feature is marked as the corresponding over-limit type. The reference value includes the monitoring threshold preset by the CNC system, the rated value of the servo motor, the theoretical value of the command, or the allowable value of the current processing stage. The threshold is preset by an engineering threshold determined based on the equipment specification parameters and processing technology requirements. The over-limit types include following error over-limit, load rate over-limit, posture deviation over-limit, and high-speed feed. The number of times each out-of-limit type is marked in all historical anomaly records is counted, and the percentage of its occurrence is calculated. Out-of-limit types whose percentage of occurrence exceeds the natural boundary point are extracted, and all extracted out-of-limit types are compiled into a feature anomaly information set. The natural boundary point is determined by sorting the percentage of occurrence of each out-of-limit type from largest to smallest, calculating the difference between adjacent percentages, and taking the adjacent interval point with the largest difference as the natural boundary point.

4. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 3, characterized in that: When a real-time abnormal shutdown occurs, the complete position time series after the shutdown is obtained. The maximum offset, cumulative motion, and final net offset are extracted to form multi-dimensional shutdown response features. The condition number is calculated based on the attitude data before shutdown. The actual torque feedback of the drive is read, and the peak load component, load mutation component, overload duration component, and mechanical response component are extracted to form a shutdown transient risk index. The condition number and shutdown transient risk index are combined to construct an anomaly analysis node. The specific steps include: When a multi-axis CNC machine tool experiences a real-time abnormal shutdown, starting from the shutdown trigger time, the most recent M consecutive interpolation cycles are traced backward, where M is a positive integer greater than 1. The position feedback data of each translation axis, the actual torque current feedback value of each feed axis, and the angle feedback value of each rotary axis are latched at each sampling time within these M interpolation cycles. Simultaneously, after the shutdown is triggered and the position feedback data can be read normally, the position feedback value of each translation axis grating ruler is continuously collected at a preset sampling interval until the position of each axis tends to be completely stationary, thus obtaining the complete position time series from the shutdown trigger time to the complete stationary state. Based on the complete position time series, the maximum offset of the translational axis relative to the stop trigger moment, the final net offset after stabilization, and the cumulative motion before complete stillness are calculated. The maximum offset is used to assess the upper limit risk of stress release, the final net offset is used to determine the dominant stress direction, and the cumulative motion is used to assess the severity of stress release. The maximum offset, the final net offset, and the cumulative motion are combined to form the multidimensional stop response characteristics of the translational axis. The method for determining complete stillness is as follows: if the actual velocity of N consecutive sampling points in the complete position time series is lower than the preset zero velocity threshold, then the translational axis is determined to have reached complete stillness, where N is a positive integer greater than or equal to 3. Based on the rotation axis angle feedback value at each sampling time within the M interpolation cycles, calculate the condition number K at each time, and take the maximum value of the condition number within the M interpolation cycles as the condition number K of the anomaly analysis node. Extract the maximum offset ΔP_max, cumulative motion ΔP_sum, and stopping time T_stable from the complete position time series after the stop trigger moment, as well as the actual torque feedback value T_actual of the driver in the last interpolation cycle before the stop trigger moment, and read the rated power P_rated and electromechanical time constant t_m of the servo motor of the motion axis. The transient risk index ψ of shutdown is calculated. ψ is obtained by combining the following components: peak load component, based on the ratio of the actual torque feedback value T_actual to the rated torque T_rated of the servo motor; sudden load component, based on the rate of change of torque within multiple sampling periods before and after the shutdown trigger moment; overload duration component, based on the length of time the torque exceeds the rated value or threshold; and mechanical response component, based on the maximum offset ΔP_max, cumulative motion ΔP_sum, and stopping time T_stable. The condition number K and the shutdown transient risk index ψ are combined to construct an anomaly analysis node.

5. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 4, characterized in that: Based on the rotation axis angle feedback values ​​at each sampling time within the M interpolation periods, the condition number K at each time point is calculated, and the specific construction method is as follows: Based on the kinematic chain structure of a five-axis CNC machine tool, the Denavit-Hartenberg parametric method is used to establish the homogeneous transformation matrix between each motion coordinate system. Each joint variable q is substituted into each transformation matrix and multiplied sequentially to obtain the positive kinematic relationship between the tool tip position vector P relative to the workpiece coordinate system and each joint variable q: P=f(q). Each joint variable q includes the positions of three translation axes (X, Y, Z) and the angles of two rotation axes (A, C). Based on the kinematic chain structure of the five-axis CNC machine tool, coordinate transformation is performed according to the topological relationship between the tool kinematic chain and the workpiece kinematic chain to obtain the homogeneous transformation matrix T of the tool coordinate system relative to the workpiece coordinate system. The partial derivatives of the homogeneous transformation matrix T with respect to each joint variable q are obtained to obtain the kinematic Jacobian matrix J(q). This matrix is ​​a 6×5 dimensional matrix, with 6 rows corresponding to the six components of the tool tip linear velocity and angular velocity, and 5 columns corresponding to the five motion axes X, Y, Z, A, and C. The element in the i-th row and j-th column represents the i-th velocity component of the tool tip caused by the unit velocity change of the j-th joint. Singular value decomposition of the kinematic Jacobian matrix J(q) is performed: J(q) = U × Σ × V T Where U is the left singular vector matrix, V is the right singular vector matrix, and V T Let Σ denote the transpose of matrix V, where Σ is a diagonal matrix and its diagonal elements σ1, σ2, ..., σ5 are the singular values ​​of the kinematic Jacobian matrix, arranged in descending order as σ1≥σ2≥...≥σ5>0; the ratio K=σ_max / σ_min of the maximum singular value σ_max to the minimum singular value σ_min is taken as the condition number at that moment.

6. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 4, characterized in that: The process involves querying retraction records in adjacent regions and assigning weights based on their matching degree with the feature anomaly information set. Local retraction success rates are calculated, and Bayesian smoothing is used to fuse the global success rate. The condition number is then adjusted based on the overall failure rate. Specific steps include: For each anomaly analysis node constructed, the condition number K is used to query the historical database for historical tool retraction records in the region adjacent to the current attitude angle. The adjacent region is a circular region with the current attitude angle as the center and a preset radius. Let N be the total number of tool retractions in this area, where the extracted feature information corresponding to the j-th historical tool retraction record constitutes the feature vector V_j of the record. Calculate the similarity between the feature vector V_j and the set of feature anomalies. If the similarity is greater than the similarity threshold, the historical knife retraction record is determined to belong to a feature abnormal scene and is assigned a first scene weight coefficient; otherwise, it is assigned a second scene weight coefficient; the first scene weight coefficient is greater than the second scene weight coefficient. The system calculates the weighted number of successful weapon withdrawals and the total weighted number of withdrawals within the region. Each historical weapon withdrawal record corresponds to a weapon withdrawal result indicator value: 1 for a successful withdrawal and 0 for a failed withdrawal. The weighted number of successful weapon withdrawals is defined as the product of the scene weight coefficient corresponding to each record and the weapon withdrawal result indicator value. The total weighted number of withdrawals is equal to the sum of the scene weight coefficients corresponding to each record. The system also calculates the weighted weapon withdrawal success rate p within the region, which is defined as the ratio of the weighted number of successful weapon withdrawals to the total weighted number of withdrawals. Count the number of similar tool retraction records n and the number of successful retraction records s in the region, where n is the number of records in the total number of tool retractions N in the region whose similarity to the current abnormal scene is greater than the similarity threshold, and s is the number of records that successfully retracted the tool. If n is less than the preset minimum sample threshold n_min, then the global retraction success rate p_global is directly used as the comprehensive success rate S_combined; If n is not less than n_min, then the Bayesian smoothing method is used to calculate the overall success rate S_combined, and its calculation formula is as follows: S_combined=(s+α×p_global) / (n+α) Where α is the smoothing parameter, and p_global is the global tool retraction success rate of all historical tool retraction records in the historical database; the value of α ranges from 1 to 10. The statistical risk correction term 1-S_combined is added to the condition number K to obtain the corrected attitude risk value U_adj, which is defined as follows: U_adj=K×(1+(1-S_combined)).

7. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 6, characterized in that: The similarity threshold is determined based on the distribution relationship between similarity and success rate of tool retraction in historical retraction records, specifically: Using similarity as a dividing variable, historical weapon withdrawal records are divided into high similarity groups and low similarity groups. The similarity threshold is the similarity value corresponding to the maximum difference in weapon withdrawal success rate between the two groups. The first scene weight coefficient is the ratio of the weapon withdrawal success rate of historical weapon withdrawal records judged as feature abnormal scenes to the global weapon withdrawal success rate of all historical weapon withdrawal records. The second scene weight coefficient is 1.

8. The method for analyzing abnormal CNC machining data based on multi-source data according to claim 6, characterized in that: The tool retraction strategy is generated based on the corrected attitude risk value and the transient risk index of downtime. The specific steps include: The system reads the safety status signals of the multi-axis CNC system, including emergency stop signal, safety torque cut-off signal, safety gate signal, servo driver ready signal, motor brake status signal, valid position signal of each axis, positive and negative soft limit signal of each axis, positive and negative hard limit signal of each axis, and PLC interlock input signal status. If any of the above signals indicates that the current status does not meet the safe movement conditions, the generation of automatic tool retraction command is prohibited and manual intervention is prompted. After all safety status signals meet the safety motion conditions, the tool retraction path strategy is determined based on the corrected attitude risk value U_adj: When U_adj is less than the first risk threshold, the current posture is determined to be safe, and the translational exit method is adopted, that is, the current tool posture remains unchanged, and the tool is translated and exited only along the tool axis direction. When U_adj is not less than the first risk threshold but less than the second risk threshold, the current posture is determined to be close to the singular region. The posture adjustment method is adopted, that is, first it is determined whether the current tool has disengaged from the workpiece. If it has disengaged, the tool is retracted step by step in the order of first adjusting the rotary axis posture to the safe angle range, and then performing the translational axis tool retraction. If the tool is still in contact with the workpiece, the rotary axis posture adjustment is prohibited, only the translational disengagement is performed and manual confirmation is prompted. When U_adj is not less than the second risk threshold, the current posture is determined to be in a high-risk singular region, the generation of automatic tool retraction command is prohibited and manual intervention is prompted; During the execution of the above-mentioned tool retraction path, the motion parameters are constrained according to each component of the transient risk index of the shutdown: the upper limit of the motion speed of each axis is constrained according to the load peak component, and the higher the load peak, the lower the speed limit; the upper limit of the acceleration of each axis is constrained according to the load change component, and the more violent the load change, the lower the acceleration limit; the upper limit of the torque of each axis is constrained according to the overload duration component, and the longer the overload duration, the lower the torque limit; the pause detection frequency during the tool retraction process is determined according to the mechanical response component, and the larger the residual displacement or cumulative motion, the higher the pause detection frequency.

9. A CNC machining anomaly data analysis system based on multi-source data, applied to the CNC machining anomaly data analysis method based on multi-source data as described in any one of claims 1-8, characterized in that: The system includes: The module includes a data acquisition module, a feature extraction module, a node construction module, a risk correction module, and a strategy generation module. The data acquisition module collects and stores multi-source data during the machining process of a multi-axis CNC machine tool; the feature extraction module extracts abnormal features from historical anomaly records, filters the types of abnormal features, and aggregates them into a feature anomaly information set; the node construction module is used to acquire stop response data, attitude configuration data, and torque demand data when a real-time abnormal stop occurs, forming an anomaly analysis node; the risk correction module is used to perform weighted statistics on the condition number in the anomaly analysis node based on the matching degree between historical tool retraction data and the feature anomaly information set, and integrates local and global success rates to correct the condition number based on the comprehensive failure rate; the strategy generation module is used to generate a tool retraction strategy based on the corrected attitude risk value and the stop transient risk index. The output of the data acquisition module is connected to the input of the feature extraction module; the output of the feature extraction module is connected to the input of the node construction module; the output of the node construction module is connected to the input of the risk correction module; and the output of the risk correction module is connected to the input of the strategy generation module.