Numerical control machine tool spindle protection method and related device
A load mutation identification model is established through high-frequency synchronous acquisition and speed adaptive filtering. Combined with sliding window difference and second-order derivative calculation, the impact judgment threshold is dynamically matched, which solves the false alarm and missed alarm problems of traditional CNC machine tool spindle protection methods under different working conditions, and achieves higher judgment accuracy and rapid response protection.
Patent Information
- Application Number
- CN202510863758.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-23
AI Technical Summary
Traditional CNC machine tool spindle protection methods rely on fixed threshold monitoring and cannot adapt to the dynamic changes in load characteristics under different processing conditions, resulting in false alarms during heavy-load processing or missed alarms during minor impacts, and insufficient stability and reliability.
High-frequency synchronous acquisition technology and speed adaptive filtering processing are used to establish a load mutation identification model. Through sliding window difference and second-order derivative calculation, combined with the spindle speed compensation factor, multi-dimensional feature fusion analysis is performed, and the impact judgment threshold is dynamically matched. Protection action is achieved through multiple confirmation mechanisms and instantaneous linkage technology.
Accurately capture transient changes in spindle load, reduce false alarm and missed alarm rates, improve the stability and reliability of CNC machine tools, and achieve millisecond-level rapid response and coordinated protection.
Smart Images

Figure CN120686723A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerically controlled machine tools, and in particular to a method for protecting a spindle of a numerically controlled machine tool and a related device. Background Art
[0002] Traditional spindle protection technology relies primarily on simple load threshold monitoring methods. This involves presetting the maximum load value for the spindle motor and triggering protection when the detected load exceeds the threshold. However, this fixed-threshold protection method has significant technical limitations. It cannot adapt to the dynamic changes in load characteristics under different machining conditions, is prone to false alarms during heavy-load machining, and is prone to missed alarms during minor impacts. Summary of the Invention
[0003] The present invention provides a spindle protection method and related devices for CNC machine tools. The present invention can accurately capture the transient change characteristics of the spindle load, effectively avoid false triggering caused by transient interference signals, and improve the stability and reliability of the CNC machine tool.
[0004] A first aspect of the present invention provides a CNC machine tool spindle protection method, the CNC machine tool spindle protection method comprising: Obtain the spindle load data of the spindle motor drive in the CNC machine tool and establish a load mutation identification model; Performing sliding window difference and second-order derivative calculations based on the spindle load data to obtain a first-order rate of change and a second-order rate of change; Based on the load mutation identification model, performing impact analysis on the first-order change rate, the second-order change rate and the spindle speed compensation factor to obtain a spindle impact prediction value; performing a collision threshold comparison on the spindle collision prediction value to obtain a collision event confirmation signal; Based on the collision event confirmation signal, the spindle motor enable signal, feed axis retraction instruction and coolant supply control of the CNC machine tool are instantaneously linked to execute the spindle collision protection action.
[0005] In combination with the first aspect, in a first implementation of the first aspect of the present invention, obtaining spindle load data of a spindle motor driver in a CNC machine tool and establishing a load mutation identification model include: Synchronously collect the current and speed of the spindle motor driver in the CNC machine tool to obtain the spindle current signal and spindle speed signal; Adjusting the parameters of a second-order Butterworth low-pass filter according to the spindle speed signal to obtain a speed adaptive filter; Inputting the spindle current signal into the speed adaptive filter to eliminate high-frequency noise and clean the signal to obtain spindle load data; A load mutation identification model is established based on the spindle load data.
[0006] In combination with the first aspect, in a second implementation of the first aspect of the present invention, establishing a load mutation identification model based on the spindle load data includes: Calculating a steady-state load reference value based on the spindle load data; The least squares method is used to fit the controlled impact test data of different processing materials and cutting depths to obtain the impact load amplitude, spindle system time constant and spindle natural frequency parameters; A load mutation identification model is established according to the steady-state load reference value, the impact load amplitude, the spindle system time constant and the spindle natural frequency parameter.
[0007] In combination with the first aspect, in a third implementation of the first aspect of the present invention, performing sliding window difference and second-order derivative calculation based on the spindle load data to obtain the first-order rate of change and the second-order rate of change includes: Performing sliding window difference on the spindle load data to obtain a sliding window calculation unit; Performing a linear regression difference operation on the spindle load data within the window of the sliding window calculation unit to obtain a first-order rate of change; Two consecutive differential operations and change acceleration calculations are performed based on the first-order change rate to obtain the second-order change rate.
[0008] In combination with the first aspect, in a fourth implementation of the first aspect of the present invention, performing impact analysis on the first-order change rate, the second-order change rate, and the spindle speed compensation factor based on the load mutation identification model to obtain a spindle impact prediction value includes: The spindle speed compensation factor is obtained by calculating the square ratio of the current spindle speed and the reference speed; A weighted fusion collision prediction function including a first-order change rate weight coefficient, a second-order change rate weight coefficient, and a speed compensation weight coefficient is established based on the load mutation identification model; The first-order change rate, the second-order change rate and the spindle speed compensation factor are input into the weighted fusion collision prediction function to perform multi-dimensional feature fusion to obtain a spindle collision prediction value.
[0009] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, comparing the spindle impact prediction value with an impact threshold to obtain an impact event confirmation signal includes: Matching a corresponding dynamic collision judgment threshold according to the current machining state, and comparing the spindle collision prediction value based on the dynamic collision judgment threshold to obtain an initial judgment result; Performing a predefined time window observation according to the initial judgment result to obtain a time window observation result; Multiple sampling period monitoring and threshold double confirmation condition judgment are performed according to the time window observation result to obtain a collision multiple confirmation result, and a collision event confirmation signal is generated based on the collision multiple confirmation result.
[0010] In combination with the first aspect, in a sixth implementation of the first aspect of the present invention, instantaneously linking the spindle motor enable signal, the feed axis retract instruction, and the coolant supply control of the CNC machine tool based on the collision event confirmation signal to execute the spindle collision protection action includes: Inputting the collision event confirmation signal into the emergency stop control module of the CNC machine tool to immediately cut off the spindle motor enable signal, thereby obtaining an immediate spindle stop instruction; triggering the feed axis control system of the CNC machine tool to record the current position and perform reverse retraction motion according to the collision event confirmation signal, thereby obtaining a feed axis retraction motion instruction; Synchronously triggering a coolant control valve of a CNC machine tool based on the collision event confirmation signal to close a liquid supply pipeline, thereby obtaining a coolant cut-off instruction; The spindle immediate stop instruction, the feed axis tool retraction movement instruction and the coolant cut-off instruction are controlled to be executed in parallel to perform a spindle collision protection action.
[0011] A second aspect of the present invention provides a CNC machine tool spindle protection device, the CNC machine tool spindle protection device comprising: An acquisition module is used to obtain the spindle load data of the spindle motor driver in the CNC machine tool and establish a load mutation identification model; a calculation module, configured to perform sliding window difference and second-order derivative calculations based on the spindle load data to obtain a first-order rate of change and a second-order rate of change; an impact analysis module, configured to perform an impact analysis on the first-order change rate, the second-order change rate, and the spindle speed compensation factor based on the load mutation identification model to obtain a spindle impact prediction value; a threshold comparison module, configured to compare the spindle impact prediction value with an impact threshold to obtain an impact event confirmation signal; The instantaneous linkage module is used to instantaneously link the spindle motor enable signal, feed axis retract instruction and coolant supply control of the CNC machine tool based on the collision event confirmation signal to execute the spindle collision protection action.
[0012] The third aspect of the present invention provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned CNC machine tool spindle protection method.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned CNC machine tool spindle protection method.
[0014] Compared with existing technologies, the present invention offers the following advantages: It utilizes high-frequency synchronous acquisition technology with a 1-2 millisecond interval and speed-adaptive filtering, enabling more accurate capture of transient spindle load variations compared to conventional low-frequency sampling methods of 50-100 milliseconds. It also establishes a load mutation identification model based on the physical mechanism of spindle impact. Through comprehensive analysis of steady-state load reference values, impact load amplitudes, spindle system time constants, and spindle natural frequency parameters, it achieves a fundamental technological breakthrough from traditional "absolute load value determination" to "load mutation feature identification." It utilizes sliding window differencing and second-order derivative calculation techniques to obtain first- and second-order rates of change. Combined with a spindle speed compensation factor, a weighted fusion impact prediction function enables comprehensive analysis of multi-dimensional features, resulting in higher accuracy and reliability compared to single-use load monitoring methods. Dynamically matching the impact detection threshold based on the current machining state overcomes the technical problem of traditional fixed thresholds being unable to adapt to different working conditions, effectively reducing false alarm rates during heavy-load machining and missed alarm rates during minor impacts. Through predefined time window observation and multiple confirmation mechanisms, combined with instantaneous linkage technology for the spindle motor enable signal, feed axis retraction command, and coolant supply control, this system achieves millisecond-level rapid response protection, significantly improving the response speed of traditional protection methods. The use of multiple sampling cycle monitoring and dual threshold confirmation condition judgment effectively avoids false triggering caused by transient interference signals. Parallel execution control ensures the coordination and integrity of protection actions, significantly improving the stability and reliability of the entire protection system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] The structures, proportions, sizes, etc. depicted in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not intended to limit the conditions under which the present invention can be implemented and therefore have no substantive technical significance. Any structural modifications, changes in proportional relationships, or adjustments in size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and objectives that can be achieved by the present invention.
[0017] Figure 1 1 is a flow chart of a CNC machine tool spindle protection method provided by an embodiment of the present invention; Figure 2 This is a schematic block diagram of the structure of a CNC machine tool spindle protection device provided by an embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations. Figure 1 , an embodiment of a CNC machine tool spindle protection method in an embodiment of the present invention includes: Step 100: Obtain spindle load data of a spindle motor driver in a CNC machine tool and establish a load mutation recognition model; It is understandable that the execution subject of the present invention may be a CNC machine tool spindle protection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0022] Specifically, the multi-channel signals of the CNC machine tool spindle motor driver are collected in parallel, including the synchronous acquisition of the spindle motor output current signal and the spindle speed encoder feedback signal. The current acquisition channel uses a high-precision current sensor installed on the analog output port of the spindle driver, and obtains a continuous current sequence through the CNC system with a high-frequency sampling period of 1-2 milliseconds. At the same time, real-time speed data is obtained from the spindle speed encoder using communication interfaces such as RS485. Since the spindle speed changes in different processing stages affect its load response characteristics, the collected current signal is subjected to noise suppression processing coordinated with the speed. A signal purification module with a second-order Butterworth low-pass filter as the core is introduced. The design specifically suppresses the high-frequency noise components in the spindle system load signal, and the filter parameters are dynamically adjusted by the speed signal. When the spindle speed is in the low-speed machining phase (e.g., n < 1000 rpm), the filter's cutoff frequency is automatically set to 150 Hz to enhance the filter depth and more effectively suppress non-impact disturbances caused by low-speed fluctuations. When the spindle is in the high-speed operating phase (n ≥ 1000 rpm), the cutoff frequency is increased to 200 Hz to ensure that the filter retains transient signal components from high-speed impacts, avoiding over-smoothing or false suppression of valid impact features. After the speed adaptive filter parameters are set, the spindle current signal is input into the filter for real-time processing, outputting a purified signal that removes high-frequency noise interference. This purified current sequence is considered the real-time spindle load data. To improve the system's ability to identify spindle force changes, a spindle load mutation recognition model is constructed based on this purified load data. This model uses the spindle's steady-state load under normal operating conditions as a benchmark and introduces a transient loading curve fitting function after an impact disturbance. Combined with the spindle structure's inertia time constant and the system's natural frequency, a framework is constructed to predict the response to load disturbances caused by sudden impacts. The model parameters are trained by fitting historical sampling data and dynamically adaptively modified according to the actual processing material type and the current speed range, thereby improving the model's generalization ability and discrimination sensitivity under multiple working conditions.
[0023] Step 200: Perform sliding window difference and second-order derivative calculation based on the spindle load data to obtain the first-order rate of change and the second-order rate of change; Specifically, a multi-level differential analysis method based on the fusion of a sliding window structure and linear regression is adopted to improve the dynamic response capability and feature analysis accuracy to sudden changes in the spindle load. The spindle load data is subjected to sliding window differential, and a fixed-length sliding window differential structure is constructed. The window length is set to 5 consecutive sampling points, corresponding to a data time domain range of 10ms, which can cover the spindle load disturbance process in the early stage of a typical impact event. Whenever a new sampling point is generated, the sliding window is updated. The oldest data is automatically removed through a first-in-first-out queue mechanism, and the latest load value is added, thus forming a real-time updated sliding window calculation unit. Within this calculation unit, instead of directly using the traditional forward or backward differential method, a linear regression analysis is performed on all load data points in the window. A linear curve representing the load change trend during this time period is fitted using the least squares method, and its slope value is then extracted as the first-order rate of change of the load during this time period. Unlike the first-order derivative approximation based on the difference between two points, the regression slope method employed in this system can filter out short-term interference while improving the stability and reliability of the rate of change, making it suitable for real-time response identification in complex machining conditions. The first-order rate of change reflects the instantaneous rate of increase or decrease in the spindle load per unit time and is a key indicator of spindle force fluctuations. This indicator can rise rapidly and exceed the steady-state fluctuation range, especially in the early stages of the spindle's initial impact. To enhance the accuracy of detecting sudden load disturbances, a second-order derivative is calculated based on the first-order rate of change. This calculation process differs two adjacent first-order rates of change and combines them with the sampling time interval to determine the increase or decrease trend of the load rate of change per unit time, i.e., the acceleration. This second-order derivative effectively characterizes sudden accelerations during impact and is sensitive to minor impacts or nonlinear disturbances, thus forming a high-level feature quantity in the dynamic load change identification system.
[0024] Step 300: Based on the load mutation identification model, perform impact analysis on the first-order change rate, the second-order change rate, and the spindle speed compensation factor to obtain a spindle impact prediction value; Specifically, an adaptive compensation mechanism for spindle speed variations is implemented. This mechanism generates a speed compensation factor based on the square ratio of the current actual spindle speed to the baseline set speed. The key characteristic of this compensation factor is that its response value dynamically adjusts with changes in the actual spindle speed. When the spindle speed is low, the compensation factor approaches zero, preventing the system from misjudging normal load fluctuations during low-speed machining. At higher spindle speeds, the factor gradually increases toward unity, enhancing the system's sensitivity to sudden load changes during high-speed operation and effectively improving the accuracy of impact detection. Based on this speed compensation factor, a multidimensional fusion impact prediction function is designed. This function is centered on a sudden load change recognition model and sets weight coefficients for three key characteristic quantities, corresponding to the first-order rate of change, the second-order rate of change, and the aforementioned spindle speed compensation factor. The initial values are 0.6, 0.3, and 0.1, respectively. The weight coefficients are determined based on regression fitting results from a large amount of experimental data. Their physical significance lies in fully reflecting the differences and relative contributions of each characteristic dimension in impact event recognition. The first-order rate of change primarily describes the velocity trend of a sudden spindle force change, which is most pronounced at the initial stage of a sudden impact. The second-order rate of change further measures the acceleration level of this change, revealing underlying disturbance signals even when the first-order change is less pronounced. The speed compensation factor, as a working condition adjustment factor for machining conditions, plays a crucial role in modifying the characteristic response amplitude. During system operation, the first-order and second-order rates of change, collected in real time, and the compensation factor calculated from the current speed are simultaneously input into the impact prediction function. An internal fusion mechanism generates a spindle impact prediction value. This prediction value represents the current spindle state in a multidimensional feature space. Under normal operating conditions, its value remains between 0.1 and 0.3, but rapidly rises to above 0.8 when a collision occurs. To enhance the adaptability of the prediction function, a genetic algorithm optimization strategy is introduced. After machining 1,000 parts, the system automatically tunes the three weighting coefficients. By learning from the impact sample data and updating the model, the prediction value is maximized in terms of discrimination, thereby improving the accuracy and robustness of impact recognition under different machining conditions.
[0025] Step 400 , comparing the spindle impact prediction value with the impact threshold to obtain an impact event confirmation signal; Specifically, based on machining state identification, the system reads the current machine tool machining mode information in real time, including roughing, finishing, and idle mode, and matches the corresponding collision judgment threshold accordingly. During the roughing stage, due to the large fluctuations in cutting forces, the dynamic collision judgment threshold is set to 0.7. During the finishing stage, the cutting load is relatively stable, so the threshold is set to 0.5. During the idle mode, the threshold is set to 0.3. After completing this matching, the current spindle collision prediction value is compared with the selected dynamic threshold. If the prediction value exceeds the corresponding threshold, an initial judgment result is generated, which serves as the input for the next stage of the observation mechanism. At this point, the system automatically activates a set of predefined time window observers, with an observation period between 5 and 15 milliseconds, and a fixed sampling interval of 2 milliseconds. Within each sampling period, the spindle collision prediction value is recalculated and its relative relationship with the current threshold is continuously monitored. The changing trend is also evaluated to determine whether the prediction value exhibits a stable upward dynamic characteristic or remains above the threshold. The purpose of this observation mechanism is to filter out instantaneous anomalies in the predicted value caused by short-term interference or system jitter, and to ensure that only data that truly has the evolution trend of the impact characteristics will enter the next step of processing. When the time window observation is completed, the accumulated monitoring results are input into the double confirmation judgment module, which adopts two parallel verification strategies. The first strategy is the continuous verification method, which requires the predicted value to remain higher than the current threshold in the next three consecutive sampling cycles; the second strategy is the sudden surge verification method, that is, the predicted value exceeds 1.5 times the set threshold in any sampling cycle, that is, when a strong mutation feature appears, the confirmation condition is directly triggered. If any of the two conditions is met, it is considered that the current load state has a credible impact characteristic, thereby generating the final impact event confirmation signal.
[0026] Step 500: Based on the collision event confirmation signal, the spindle motor enable signal, the feed axis retract instruction and the coolant supply control of the CNC machine tool are instantaneously linked to execute the spindle collision protection action.
[0027] Specifically, the collision event confirmation signal is input into the emergency stop control module of the CNC machine tool, the spindle motor enable signal is terminated through hardware interruption, and the spindle immediate stop command is output to ensure that the spindle achieves dual responses of electrical power off and mechanical braking within milliseconds, thereby terminating the spindle rotation and preventing the inertia during the collision from further aggravating the impact contact between the tool and the workpiece. At the same time as the collision event confirmation signal is generated, the signal is synchronously transmitted to the drive control system of the feed axis, and the current position recording program is started to sample and archive the tool space coordinates at the time of the collision, and the reverse retraction action is executed on this basis. The retraction action instruction is scheduled according to the preset acceleration curve and the axial reverse safety path, so that the tool quickly leaves the workpiece cutting area, avoiding secondary damage to the tool or scratches on the workpiece surface due to inertial feeding after the collision. In this action, the time compactness of the reverse action is guaranteed, and the retraction amplitude and path limit conditions are adjusted in real time in combination with the spindle state feedback information, thereby achieving highly reliable active avoidance control. To prevent malfunctioning of the cooling system or damage to the equipment caused by liquid splashing or spraying during an impact, a collision confirmation signal is introduced into the coolant control module, synchronously triggering the solenoid valve in the liquid supply line to close, thereby immediately terminating the coolant flow and generating a coolant shut-off command. This coolant shut-off process is controlled within 4 to 5 milliseconds after the collision signal is confirmed, forming a three-way protection strategy with compact timing and coordinated response, along with the spindle power-off and feed-and-retract actions. To ensure that the aforementioned spindle stop, feed-and-retract, and coolant shut-off commands can be executed in parallel with minimal delay, a high-priority concurrent execution thread is introduced into the control architecture, and command scheduling is performed through a reentrant multi-threaded scheduling mechanism. All commands are distributed and responded to within 12 milliseconds of the event confirmation trigger, ensuring that the spindle is effectively protected at the initial stage of the collision, minimizing the risk of mechanical damage and downtime costs caused by the collision.
[0028] In a specific embodiment, the process of executing step 100 may specifically include the following steps: Synchronously collect the current and speed of the spindle motor driver in the CNC machine tool to obtain the spindle current signal and spindle speed signal; The parameters of the second-order Butterworth low-pass filter are adjusted according to the spindle speed signal to obtain a speed adaptive filter; The spindle current signal is input into the speed adaptive filter to eliminate high-frequency noise and purify the signal to obtain the spindle load data; A load mutation identification model is established based on the spindle load data.
[0029] Specifically, during the operation of a CNC machine tool, the system continuously collects the operating status of the spindle motor driver. To ensure data synchronization and real-time performance, the system connects the spindle current output and spindle speed feedback terminals in parallel via two signal channels. The current signal channel uses a high-precision current sensor for analog data acquisition, with a sampling resolution better than 0.1 ampere, capable of accurately reproducing even the smallest fluctuations in the spindle load current. The speed signal channel, based on the spindle encoder feedback interface, acquires high-resolution speed feedback data using industrial bus communication (such as RS485 or CANopen), with a data sampling period of 1 to 2 milliseconds. Using a unified timestamp management strategy, both signals are collected and archived within the same control cycle, ensuring consistent temporal correspondence between the collected data. Because industrial field signals can be affected by high-frequency electromagnetic interference, drive harmonic interference, and cutting noise, the raw collected spindle current signal contains a significant amount of high-frequency spurious fluctuations. A speed-adaptive filtering mechanism is developed, the core of which is the dynamic adjustment of the parameter structure of a traditional second-order Butterworth low-pass filter. This filter exhibits smooth transitions and a ringing-free response in the signal's amplitude-frequency characteristics. A key parameter in its standard design is the cutoff frequency, which directly determines the filter's ability to suppress or retain signals of different frequency bands. Considering that the response frequency band to load changes varies at different spindle speeds, the system adaptively sets this cutoff frequency based on the spindle speed. When the spindle is operating at low speeds, for example, below 1000 rpm, the effective load information is mostly concentrated in the low-frequency region. To prevent high-frequency noise from interfering with the dominant signal characteristics, the filter's cutoff frequency is set to 150 Hz, achieving deeper high-frequency suppression. However, when the spindle enters the high-speed cutting phase, with speeds exceeding or equal to 1000 rpm, the dynamic response frequency between the spindle's internal mechanisms and the tool increases significantly. Using a lower cutoff frequency at this stage can easily lead to oversmoothing, distortion, or filtering of the actual sudden change signal. Therefore, at high speeds, the system increases the cutoff frequency to 200 Hz to preserve the important transient components involved in high-speed impacts. This adjustment process relies on real-time speed signal input. The system reassesses the current speed at each sampling cycle and dynamically updates the filter parameters, thus creating a self-adjusting filter system that is adaptable to the operating conditions. The acquired spindle current signal is fed into the dynamically parameterized speed adaptive filter described above in real time. The filtered signal significantly attenuates high-frequency noise, retaining only the effective components directly related to the load state. This constitutes the purified spindle load data. This data exhibits waveform continuity in the time domain and is free of unwanted interference in the frequency domain. To enhance the dynamic understanding of spindle load behavior, a load mutation identification model is established based on the spindle load data. This model not only focuses on absolute load changes but also emphasizes its nonlinear dynamic evolution in the time series.The model uses the load stability range of the spindle under normal operating conditions as a reference baseline, and performs structural fitting on the response waveform of the load data within a continuous sampling period to extract characteristic parameters such as the mutation starting point, rising slope, response peak, and attenuation shape. In terms of model structure setting, considering that the spindle will produce a short-term, high-amplitude, and rapidly decaying oscillation response when encountering a transient impact, the model framework introduces a mutation perturbation kernel, integrating the inertia, damping, and stiffness factors of the spindle mechanical system to reflect the transient fluctuation process in load anomalies and parameterize its amplitude, duration, and response trend. The model parameters are obtained through offline calibration of preset impact test data, or are modified in real time during operation according to different working conditions (such as the type of processing material, tool length, and spindle inertia) to achieve dynamic adaptive matching of the model to impact events.
[0030] In a specific embodiment, the process of executing the step of establishing a load mutation identification model based on the spindle load data may specifically include the following steps: Calculate the steady-state load reference value based on the spindle load data; The least squares method is used to fit the controlled impact test data of different processing materials and cutting depths to obtain the impact load amplitude, spindle system time constant and spindle natural frequency parameters; A load mutation identification model is established based on the steady-state load reference value, impact load amplitude, spindle system time constant and spindle natural frequency parameters.
[0031] Specifically, during normal machining, the system continuously acquires spindle load data using a high-frequency sampling device. This data is represented as a time series of current feedback values or equivalent torque signals. To extract the characteristic response during the steady-state machining phase, the load data is smoothed using a sliding average strategy over a continuous sampling period. Twenty equally spaced sampling points are selected within a stable operating range to eliminate tool entry disturbances at the initial machining stage and unloading effects at the end of tool exit, ensuring the representativeness and stability of the extracted load values. This data segment is then arithmetic averaged, and the resulting mean value serves as the steady-state load baseline for the current operating condition. This baseline value is used in the model structure to describe the stable load level of the machining system in the absence of sudden disturbances. It serves as a comparison baseline for identifying sudden load behavior and has dynamic updating capabilities: the system recalculates at the beginning of each machining cycle to adapt to the normal load state under different parts, tools, or machining parameters. To capture the typical dynamic characteristics of sudden load responses, a data calibration process centered on controlled impact testing was established. In this experiment, representative processing material types were selected, including typical workpiece materials such as aluminum alloy, steel, and cast iron. Artificial impact scenarios were constructed under various cutting depth conditions. The spindle load data during the impact process was collected and recorded to form an impact response database. The experimental data includes the load surge section at the beginning of the impact, the load oscillation section, and the final steady-state drop section, showing typical vibration superposition characteristics and nonlinear attenuation forms. For this type of data sequence, the least squares fitting mechanism was introduced to perform regression analysis on the actual collected curves. Relying on the response function structure with clear physical meaning, the key dynamic parameters are extracted: impact load amplitude, spindle system time constant, and spindle natural frequency. The impact load amplitude reflects the additional force mutation caused by the impact on the spindle system. Its value directly corresponds to the increase in the peak value of the mutation relative to the steady-state load, determining the impact signal's response strength in the model. The spindle system time constant describes the time scale for recovery from the impact mutation state to the steady state. Its value ranges from 8 to 15 milliseconds and varies depending on the test conditions. This parameter reflects the system's damping characteristics and mechanical response inertia. The spindle natural frequency describes the periodic oscillation characteristics of the system during the impact process. Its value ranges from 120 to 180 Hz and plays a decisive role in controlling the frequency of the oscillation superposition term in the model. Through fitting and analysis of sample data from multiple sets of material and working condition combinations, a parameter database with adaptability to working conditions was constructed. Based on the extraction of the above characteristic parameters, a load mutation identification model is finally constructed. The model uses the steady-state load reference value as the baseline input, the impact load amplitude as the disturbance excitation term, the time constant and the natural frequency as the system structural parameters, and introduces the superposition function form of exponential decay and cosine oscillation to construct the response output, so that the model has the ability to describe the transient oscillation, rapid decay and final regression process of the spindle system under the excited state.This model not only retains the response characteristics of the actual mechanical structure of the spindle, but also achieves the ability to migrate and adapt to different processing conditions through parameterization. It can calculate the fit between the actual load data and the model prediction results during the model identification stage, and judge whether there is significant mutation behavior based on the degree of consistency. To ensure that the model can adapt to environmental changes and equipment aging during the long-term operation of the machine tool, an adaptive correction mechanism for model parameters is introduced. This mechanism dynamically updates the steady-state load reference value based on the continuous load data changes during the spindle processing process, and automatically triggers the recalibration process when the model fit is lower than 0.85, making small adjustments to the time constant and natural frequency to ensure that the model always maintains high-precision mutation identification capabilities throughout the life cycle of the equipment.
[0032] In a specific embodiment, the process of executing step 200 may specifically include the following steps: Perform sliding window difference on the spindle load data to obtain a sliding window calculation unit; Perform linear regression difference operation on the spindle load data within the window of the sliding window calculation unit to obtain the first-order change rate; The second-order rate of change is obtained by performing two consecutive differential operations and changing acceleration calculations based on the first-order rate of change.
[0033] Specifically, during the continuous sampling of spindle load data, a fixed-length sliding window structure is constructed. This window is based on a fixed sampling period and selects five consecutive data points as the window length, corresponding to a time range of approximately 10ms to 20ms, to ensure coverage of the dynamic response range in the early stages of a typical impact event. The window structure is refreshed in real time using a first-in, first-out mechanism. Whenever a new data point arrives, the oldest data point is replaced, achieving continuous time-series updating of the load data. The data within this calculation unit retains the subtle fluctuation trends of the load over very short periods of time, exhibiting good local dynamic representativeness and supporting high-resolution derivative estimation analysis. To extract the rate of change of the spindle load within the current time period, a linear regression difference operation is used to perform trend modeling on the data within the window. Based on the least squares criterion, the linear regression method fits a first-order linear model to all data points in the window. The slope of the fitting result represents the average rate of change of the spindle load during that time period, namely the first-order derivative (i.e., the first-order rate of change). The advantage of this approach is that it effectively suppresses the impact of occasional data anomalies on the results and has stronger noise immunity. It can stably extract the true change trend, especially in the presence of high-frequency disturbances, cutting vibrations, or transient sensor errors. The magnitude and sign of the first-order rate of change together reflect the direction and speed of the spindle force change and are one of the direct characteristic quantities for identifying sudden impact behavior. In particular, when a sudden force disturbance occurs, the slope of the first-order rate of change will show a significant jump within a short period of time, providing an early response signal for the system. After obtaining the first-order rate of change, it is continuously recorded in a first-order derivative history sequence, and a second-order difference calculation based on this sequence is performed to obtain the second-order rate of change of the spindle load. The difference between two consecutive first-order rates of change is time-normalized. This operation subtracts the first-order rate of change of the previous sampling period from the current first-order rate of change and divides it by the sampling interval. This yields the amplitude of the first-order rate of change per unit time, i.e., the acceleration of change. The second-order rate of change reflects the dynamic nature of the load variation trend itself, revealing whether the current spindle force state is experiencing a sharp increase, sudden decrease, or strong oscillation. This deep-level feature is more sensitive to load disturbance trends. By combining the aforementioned sliding window differencing structure with first-order linear regression slope extraction, and then constructing a second-order derivative sequence through continuous differencing, multi-level feature upscaling of spindle load data from raw current or torque samples to dynamic variation trends and acceleration levels is achieved. To enhance the robustness of this derivative extraction mechanism in complex signal environments, an outlier detection mechanism is introduced. During the derivative output process, a threshold for normal fluctuations in the first-order rate of change is set within the range of [-50A / s, +50A / s]. If the current calculated result deviates significantly from this range, the system initiates a median filter, statistically sorting the derivative values over three consecutive sampling periods and taking the median value as the corrected output to avoid erroneous outputs caused by signal interference, electromagnetic disturbances, or sensor jitter.
[0034] In a specific embodiment, the process of executing step 300 may specifically include the following steps: The spindle speed compensation factor is obtained by calculating the square ratio of the current spindle speed and the reference speed; Based on the load mutation recognition model, a weighted fusion collision prediction function is established, which includes the weight coefficient of the first-order change rate, the weight coefficient of the second-order change rate, and the speed compensation weight coefficient. The first-order change rate, second-order change rate and spindle speed compensation factor are input into the weighted fusion collision prediction function for multi-dimensional feature fusion to obtain the spindle collision prediction value.
[0035] Specifically, to account for the differences in load response sensitivity and the discernibility of sudden change characteristics under different spindle speed conditions, a spindle speed compensation factor is constructed based on the square ratio of the current spindle speed to a preset reference speed. This factor is used to calculate the spindle speed compensation factor. This factor is designed to account for the fact that at low spindle speeds, load fluctuations are easily masked by the drive system's inertia and frictional damping, weakening the amplitude of sudden change signals and reducing the system's recognition capability. However, at higher spindle speeds, the intense contact between the tool and workpiece makes sudden changes in load more pronounced and easily amplified. Therefore, the load characteristic intensity under different speed conditions is normalized and corrected. By calculating the square ratio, a nonlinear mapping of the speed influence intensity is achieved. This compensation factor approaches zero at low speeds, reducing system sensitivity and preventing misjudgments caused by normal load fluctuations at low speeds. At high speeds, it approaches unity, enhancing recognition sensitivity and ensuring the system can promptly identify sudden impacts during high-speed machining. Based on the first- and second-order load change rates extracted from the load sudden change recognition model, a collision prediction function is established that integrates multidimensional dynamic features. The function employs a weighted combination structure, assigning the first-order rate of change a primary weight, the second-order rate of change a secondary weight, and the speed compensation factor a third weight. Each weight coefficient represents the relative contribution of each parameter to the overall impact assessment. The first-order rate of change, representing the instantaneous rate of load change, is the most sensitive signal source at the initial impact stage and is therefore assigned a dominant weight. The second-order rate of change reflects the acceleration characteristics of the load curve and is suitable for identifying delayed impacts with inertial response, thus being assigned a secondary weight. The speed compensation factor is used to macro-adjust the overall numerical structure of the fusion function to adapt to different operating conditions and has a lower weight. Initially, the three weight coefficients are set to 0.6, 0.3, and 0.1, respectively. To ensure that this weight configuration can adapt to the complex changes in equipment operation, a dynamic weight update mechanism is designed. After the system collects a certain number of impact and non-impact samples, it automatically adjusts the weights using a genetic algorithm or gradient optimization algorithm. This ensures that the fusion function output value remains below the warning value under normal conditions but increases rapidly during sudden events, thereby improving the overall robustness and reliability of the system. After completing the weight configuration, the first-order and second-order rates of change, along with the spindle speed compensation factor, calculated during each sampling cycle, are uniformly input into the weighted fusion prediction function described above for numerical solution. This fusion calculation process is executed in a high-priority thread, ensuring that its results are output within milliseconds and serve as direct criterion for subsequent impact event identification, threshold comparison, and protective action triggering. The output value of this fusion function, the spindle impact prediction value, is essentially a numerical expression of the comprehensive risk level of the current load behavior under the dynamic change rate, acceleration, and spindle operating conditions.Under normal operating conditions, all three values are within a stable fluctuation range, with the fused output value fluctuating between 0.1 and 0.3. When a slight impact or incomplete contact disturbance occurs on the spindle, the first-order derivative rises first, followed by the second-order derivative, with the fused output value rising to between 0.5 and 0.7. When a significant impact occurs, the derivative term rapidly rises, and in conjunction with the speed compensation factor, the fused output value exceeds 0.8 in a very short time, forming a significant numerical jump and becoming a high-confidence impact identification mark. Furthermore, the system records each calculation process of the fusion function and compares and analyzes the input parameters and output results with the actual protection action results, constructing a database of impact samples. Through continuous data accumulation and feature abstraction, the function structure and parameter configuration are optimized, forming a predictive model evolution mechanism with self-learning capabilities.
[0036] Among them, a weighted fusion collision identification function including a first-order change rate weight coefficient, a second-order change rate weight coefficient and a speed compensation weight coefficient is established based on the load mutation identification model, including: performing weight importance ranking calculation based on the analysis of the physical characteristics of the spindle collision based on the load mutation identification model, and obtaining the initial value settings of the first-order change rate weight coefficient of 0.6, the second-order change rate weight coefficient of 0.3 and the speed compensation weight coefficient of 0.1; establishing a three-term linear superposition calculation structure of the first-order change rate product term, the second-order change rate product term and the speed compensation product term according to the first-order change rate weight coefficient, the second-order change rate weight coefficient and the speed compensation weight coefficient to obtain the initial collision identification function; data collection and binary classification labeling of normal processing and collision events under different processing materials, cutting depths and spindle speed working conditions are performed to obtain a sample data set; the sample data set is input into the genetic algorithm for combination optimization and collision recognition accuracy fitness function calculation to obtain the target weight coefficient combination; the weight parameters of the initial collision identification function are replaced and the collision recognition performance is verified according to the target weight coefficient combination to obtain the weighted fusion collision identification function.
[0037] In a specific embodiment, the process of executing step 400 may specifically include the following steps: Match the corresponding dynamic collision judgment threshold according to the current machining state, and compare the spindle collision prediction value based on the dynamic collision judgment threshold to obtain an initial judgment result; Perform predefined time window observation according to the initial judgment result to obtain the time window observation result; Based on the time window observation results, multiple sampling period monitoring and threshold double confirmation condition judgment are performed to obtain the impact multiple confirmation results, and an impact event confirmation signal is generated based on the impact multiple confirmation results.
[0038] Specifically, at the beginning of each machining cycle, the system proactively reads the current machine tool operating parameters, including information such as the machining program segment type, tool type, feed rate, cutting depth, and spindle speed. These parameters together form the basis for identifying the current machining state. Based on the identification results, the collision judgment threshold corresponding to the machining state is searched in a preset dynamic threshold database. This threshold is set for different machining stages: For example, in the roughing stage, due to the large cutting forces themselves, load fluctuations are normal, so a higher collision recognition threshold of 0.7 is set; in the finishing stage, due to the high process requirements and small load fluctuations, a medium threshold of 0.5 is set; and in the no-load idle run stage, any abnormal fluctuations may be an anomaly, so a lower threshold of, for example, 0.3 is set. This threshold matching mechanism ensures that the judgment criteria change synchronously with the working conditions, giving the system reasonable sensitivity adjustment capabilities under different load backgrounds. After matching is complete, the currently calculated spindle impact prediction value is compared with the matched dynamic impact judgment threshold. If the predicted value is less than the threshold, the current spindle load state is considered to be within the normal range, and the system enters normal operation. If the predicted value exceeds the dynamic threshold for the first time, the system does not immediately trigger protection. Instead, it generates an initial judgment result, marking the state as "suspected impact" and initiating the next phase of the short-term dynamic observation mechanism. This initial judgment is essentially a soft trigger mechanism, designed to prevent misjudgments caused by abnormal increases in the predicted value due to transient noise disturbances, current fluctuations, or local material hard spots. Once the system confirms the "suspected impact" state, a predefined time window observation mechanism is activated. This observation mechanism structurally establishes a fixed observation window of 5 to 15 milliseconds. Within this window, samples are taken at evenly spaced intervals of 2 milliseconds. The predicted spindle impact value within this period is continuously recorded and characteristic indicators such as fluctuation trend, maximum value, average value, and growth gradient are calculated. The predicted value within this time window is analyzed to determine whether it remains above the dynamic threshold, whether there is a gradual upward trend, and whether the waveform pattern reaches a specific mutation intensity. For example, if the observed data shows a continuous increase, with the maximum value exceeding 1.2 times the initial threshold, it indicates that the spindle load is indeed experiencing abnormal acceleration, and the system deems a "high probability of an impact event." Conversely, if the observed data indicates a momentary drop in the predicted value or minimal fluctuation, the predicted value exceeding the limit is considered a short-term disturbance, and the system automatically clears the "suspected impact" flag and returns to normal. After completing the time window observation, the system enters the final stage of impact confirmation, namely the multi-cycle dual judgment mechanism.This mechanism sets two confirmation paths: the first is continuity judgment, that is, in the next three consecutive sampling cycles, the spindle impact prediction values must all exceed the dynamic threshold value, and the system will consider the impact behavior to be stable and continuous, thus meeting the confirmation conditions; the second is sudden judgment, that is, in any sampling cycle, if the prediction value directly exceeds 1.5 times the dynamic threshold value, the system will determine that the current load state has reached the severe abnormality standard, even if the previous and next sampling cycles do not exceed the threshold value, it is considered a valid impact event. When any of the above confirmation paths is met, the system generates a "collision event confirmation signal" and sends this signal as a strong trigger source to the spindle protection system, feed axis control system and coolant management system synchronously, initiating subsequent emergency protection actions, such as emergency stop of the spindle, execution of the tool retraction command and coolant cut-off operation. At the same time, the signal is archived in the impact event history database and recorded together with the timestamp of the event, tool information, machining program line number and machining material.
[0039] In a specific embodiment, the process of executing step 500 may specifically include the following steps: The collision event confirmation signal is input into the emergency stop control module of the CNC machine tool to immediately cut off the spindle motor enable signal and obtain an immediate spindle stop instruction; According to the collision event confirmation signal, the feed axis control system of the CNC machine tool is triggered to record the current position and reverse retract movement, and obtain the feed axis retract movement instruction; Based on the collision event confirmation signal, the coolant control valve of the CNC machine tool is synchronously triggered to close the liquid supply pipeline, thereby obtaining a coolant cut-off instruction; The spindle immediate stop command, feed axis retract motion command and coolant cut-off command are executed in parallel to perform the spindle collision protection action.
[0040] Specifically, the collision event confirmation signal is input into the emergency stop control module within the CNC system. This module is the highest-priority hardware interrupt-level interface in the CNC controller, and it responds to events with significant mechanical or electrical risks in milliseconds. Upon receiving the collision confirmation signal, the system immediately cuts off the enable channel of the spindle drive through the internal bus or high-speed signal link, interrupting the power output of the spindle motor at both the logical and power control levels, generating an "immediate spindle stop command," and subsequently feeding back the spindle status to the main control unit within 1 to 2 milliseconds. This action has a dual protection mechanism of mechanical power-off and electronic latching, ensuring that the spindle stops within the first control cycle after the collision, thereby cutting off the collision inertia transmission path and preventing the collision from continuing to expand and affecting the integrity of the tool, fixture, or spindle bearing components. At the same time, the system does not limit the collision processing to the spindle drive unit, but instead forwards the confirmation signal to the machine tool's feed axis control system at the same time, initiating the feed axis protection response process. The first step in this process is current position recording. At the same moment the impact confirmation signal is triggered, the system samples the absolute encoder feedback values of each feed axis and stores the current coordinate information for three (or more) axes, creating a snapshot of the feed position status. The system then initiates the feed axis retraction. This action is not a simple return to zero. Instead, it generates a retraction path based on the current tool coordinates and a pre-set reverse motion path through rapid interpolation. The feed axis is then driven back using an acceleration-limited curve control method until the tool completely exits the workpiece cutting area or reaches a safe retraction zone. The retraction action begins within 2 to 5 milliseconds of impact and is fully tracked by the servo system over multiple subsequent cycles, ensuring that the tool no longer applies any cutting force. This minimizes the risk of tool breakage or secondary impact marks caused by residual inertia after the impact. A synchronous control module for the coolant channels is incorporated into the response mechanism to prevent secondary equipment damage or sensor contamination caused by liquid splashing or short-term coolant shock. After the collision event confirmation signal is generated, the control system immediately drives the solenoid valve through the I / O control interface or PLC interrupt port to cut off the coolant supply pipeline and generate a "coolant cut-off instruction". This instruction is quickly closed through a relay or pulse drive circuit, and the action response time is controlled within 5 milliseconds after the collision occurs. At the same time, the coolant control system records key indicators such as flow parameters, pressure status and liquid temperature at the time of cut-off in real time, and submits a cooling system status report after the collision processing is completed. After the above three instructions are triggered and distributed respectively, the system control core enters the multi-threaded parallel control stage. In this stage, the "spindle immediate stop instruction", "feed axis retract movement instruction" and "coolant cut-off instruction" are synchronously executed through the multi-threaded scheduler built into the CNC system or the branch program of the PLC module to ensure that the three actions will not have problems such as instruction queuing, priority conflicts or logical waiting.To ensure coordinated control, a command synchronization lock mechanism is introduced to ensure that the status feedback of each action is aggregated and uniformly monitored within a specific time window. At the same time, intermediate state fault detection logic is provided. For example, if the spindle has not completed stalling, the feed axis has not completed retraction, or the coolant is abnormally disconnected, the system will enter a "locked state", prohibiting further processing and initiating the exception handling process. To ensure the traceability of collision event processing, an event backtracking data chain is established after the spindle protection response is executed. The system automatically records key data such as the collision event trigger time, confirmation signal number, response time of each command, feed axis retraction path, coolant flow interruption status, and spindle stall confirmation feedback, and generates a standardized collision event report.
[0041] The above describes the CNC machine tool spindle protection method according to the embodiment of the present invention. The following describes the CNC machine tool spindle protection device according to the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a spindle protection device for a numerically controlled machine tool includes: An acquisition module 11 is used to acquire the spindle load data of the spindle motor driver in the CNC machine tool and establish a load mutation identification model; A calculation module 12 is used to perform sliding window difference and second-order derivative calculation based on the spindle load data to obtain the first-order rate of change and the second-order rate of change; The impact analysis module 13 is used to perform impact analysis on the first-order change rate, the second-order change rate and the spindle speed compensation factor based on the load mutation identification model to obtain a spindle impact prediction value; A threshold comparison module 14 is used to compare the spindle impact prediction value with the impact threshold to obtain an impact event confirmation signal; The instantaneous linkage module 15 is used to instantaneously link the spindle motor enable signal, feed axis retract instruction and coolant supply control of the CNC machine tool based on the collision event confirmation signal to execute the spindle collision protection action.
[0042] Through the collaborative efforts of these components, high-frequency synchronous acquisition technology with a 1-2 millisecond interval and speed-adaptive filtering can more accurately capture transient variations in spindle load compared to traditional low-frequency sampling methods of 50-100 milliseconds. This allows for a load mutation identification model based on the physical mechanism of spindle impact. Through comprehensive analysis of steady-state load baseline values, impact load amplitudes, spindle system time constants, and spindle natural frequency parameters, this achieves a fundamental technological breakthrough from traditional "absolute load value determination" to "load mutation feature identification." Sliding window differencing and second-order derivative calculation techniques are used to obtain first- and second-order rates of change. Combined with a spindle speed compensation factor, a weighted fusion impact prediction function is used to achieve a comprehensive analysis of multi-dimensional features, resulting in higher accuracy and reliability than single-use load monitoring methods. Dynamically adapting the impact detection threshold based on the current machining state overcomes the technical challenge of traditional fixed thresholds that cannot adapt to different working conditions, effectively reducing false alarms during heavy-load machining and missed alarms during minor impacts. Through predefined time window observation and multiple confirmation mechanisms, combined with instantaneous linkage technology for the spindle motor enable signal, feed axis retraction command, and coolant supply control, this system achieves millisecond-level rapid response protection, significantly improving the response speed of traditional protection methods. The use of multiple sampling cycle monitoring and dual threshold confirmation condition judgment effectively avoids false triggering caused by transient interference signals. Parallel execution control ensures the coordination and integrity of protection actions, significantly improving the stability and reliability of the entire protection system.
[0043] See also Figure 3 , Figure 3 This is a schematic block diagram of the structure of an electronic device 300 provided in an embodiment of the present invention. The electronic device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected via a device bus 303, wherein the memory 302 may include a non-volatile storage medium and an internal memory.
[0044] The non-volatile storage medium can store a computer program. The computer program includes program instructions. When the program instructions are executed by the processor 301, the processor 301 can execute any of the above-mentioned CNC machine tool spindle protection methods.
[0045] The processor 301 is used to provide computing and control capabilities to support the operation of the entire electronic device 300 .
[0046] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned CNC machine tool spindle protection methods.
[0047] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the electronic device 300 involved in the solution of the present invention. The specific electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0048] It should be understood that the processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0049] It should be noted that, those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device 300 described above can refer to the corresponding process of the aforementioned CNC machine tool spindle protection method, and will not be repeated here.
[0050] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors, the one or more processors implement the CNC machine tool spindle protection method provided by the embodiment of the present invention.
[0051] The computer-readable storage medium may be an internal storage unit of the electronic device 300 in the aforementioned embodiment, such as a hard disk or memory of the electronic device 300. The computer-readable storage medium may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc., equipped with the electronic device 300.
[0052] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0053] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0054] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A CNC machine tool spindle protection method, characterized in that: include: Obtain the spindle load data of the spindle motor drive in the CNC machine tool and establish a load mutation identification model; Performing sliding window difference and second-order derivative calculations based on the spindle load data to obtain a first-order rate of change and a second-order rate of change; Based on the load mutation identification model, performing impact analysis on the first-order change rate, the second-order change rate and the spindle speed compensation factor to obtain a spindle impact prediction value; performing a collision threshold comparison on the spindle collision prediction value to obtain a collision event confirmation signal; Based on the collision event confirmation signal, the spindle motor enable signal, feed axis retraction instruction and coolant supply control of the CNC machine tool are instantaneously linked to execute the spindle collision protection action.
2. The CNC machine tool spindle protection method according to claim 1, characterized in that: The method of obtaining spindle load data of a spindle motor driver in a CNC machine tool and establishing a load mutation identification model includes: Synchronously collect the current and speed of the spindle motor driver in the CNC machine tool to obtain the spindle current signal and spindle speed signal; Adjusting the parameters of a second-order Butterworth low-pass filter according to the spindle speed signal to obtain a speed adaptive filter; Inputting the spindle current signal into the speed adaptive filter to eliminate high-frequency noise and clean the signal to obtain spindle load data; A load mutation identification model is established based on the spindle load data.
3. The CNC machine tool spindle protection method according to claim 2, characterized in that: The establishing of a load mutation identification model based on the spindle load data includes: Calculating a steady-state load reference value based on the spindle load data; The least squares method is used to fit the controlled impact test data of different processing materials and cutting depths to obtain the impact load amplitude, spindle system time constant and spindle natural frequency parameters; A load mutation identification model is established according to the steady-state load reference value, the impact load amplitude, the spindle system time constant and the spindle natural frequency parameter.
4. The CNC machine tool spindle protection method according to claim 1, characterized in that: The step of performing sliding window difference and second-order derivative calculation based on the spindle load data to obtain a first-order rate of change and a second-order rate of change includes: Performing sliding window difference on the spindle load data to obtain a sliding window calculation unit; Performing a linear regression difference operation on the spindle load data within the window of the sliding window calculation unit to obtain a first-order rate of change; Two consecutive differential operations and change acceleration calculations are performed based on the first-order change rate to obtain the second-order change rate.
5. The CNC machine tool spindle protection method according to claim 1, characterized in that: The method of performing impact analysis on the first-order change rate, the second-order change rate, and the spindle speed compensation factor based on the load mutation identification model to obtain a spindle impact prediction value includes: The spindle speed compensation factor is obtained by calculating the square ratio of the current spindle speed and the reference speed; A weighted fusion collision prediction function including a first-order change rate weight coefficient, a second-order change rate weight coefficient, and a speed compensation weight coefficient is established based on the load mutation identification model; The first-order change rate, the second-order change rate and the spindle speed compensation factor are input into the weighted fusion collision prediction function to perform multi-dimensional feature fusion to obtain a spindle collision prediction value.
6. The CNC machine tool spindle protection method according to claim 1, characterized in that: Comparing the spindle impact prediction value with an impact threshold to obtain an impact event confirmation signal includes: Matching a corresponding dynamic collision judgment threshold according to the current machining state, and comparing the spindle collision prediction value based on the dynamic collision judgment threshold to obtain an initial judgment result; Performing a predefined time window observation according to the initial judgment result to obtain a time window observation result; Multiple sampling period monitoring and threshold double confirmation condition judgment are performed according to the time window observation result to obtain a collision multiple confirmation result, and a collision event confirmation signal is generated based on the collision multiple confirmation result.
7. The CNC machine tool spindle protection method according to claim 1, characterized in that: The method instantaneously links the spindle motor enable signal, the feed axis retract instruction, and the coolant supply control of the CNC machine tool based on the collision event confirmation signal to execute the spindle collision protection action, including: Inputting the collision event confirmation signal into the emergency stop control module of the CNC machine tool to immediately cut off the spindle motor enable signal, thereby obtaining an immediate spindle stop instruction; triggering the feed axis control system of the CNC machine tool to record the current position and perform reverse retraction motion according to the collision event confirmation signal, thereby obtaining a feed axis retraction motion instruction; Synchronously triggering a coolant control valve of a CNC machine tool based on the collision event confirmation signal to close a liquid supply pipeline, thereby obtaining a coolant cut-off instruction; The spindle immediate stop instruction, the feed axis tool retraction movement instruction and the coolant cut-off instruction are controlled to be executed in parallel to perform a spindle collision protection action.
8. A CNC machine tool spindle protection device, characterized in that: Used to perform the CNC machine tool spindle protection method according to any one of claims 1 to 7, the CNC machine tool spindle protection device comprises: An acquisition module is used to obtain the spindle load data of the spindle motor driver in the CNC machine tool and establish a load mutation identification model; a calculation module, configured to perform sliding window difference and second-order derivative calculations based on the spindle load data to obtain a first-order rate of change and a second-order rate of change; an impact analysis module, configured to perform an impact analysis on the first-order change rate, the second-order change rate, and the spindle speed compensation factor based on the load mutation identification model to obtain a spindle impact prediction value; a threshold comparison module, configured to compare the spindle impact prediction value with an impact threshold to obtain an impact event confirmation signal; The instantaneous linkage module is used to instantaneously link the spindle motor enable signal, feed axis retract instruction and coolant supply control of the CNC machine tool based on the collision event confirmation signal to execute the spindle collision protection action.
9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the electronic device to execute the CNC machine tool spindle protection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the CNC machine tool spindle protection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Anti-overload control method and system for numerical control machine tool cutter
CN121232706A
Numerical control machine tool adjusting method and device, electronic equipment and computer readable medium
CN121433103A
Geometric error identification and compensation system and method for numerical control machine tool
CN121477776A