A motion accuracy compensation system and method for CNC Swiss-type lathes

By integrating a multi-source signal acquisition module and an edge AI inference engine into a CNC Swiss-type lathe, the servo current, spindle vibration, and turret position signals are monitored and compensated in real time. Lightweight neural networks are used for accuracy evaluation and compensation, solving the problem of insufficient real-time response in existing technologies and achieving sub-micron-level machining stability and high compatibility.

CN121578744BActive Publication Date: 2026-04-07GUANGDONG ZHONG CONG INTELLIGENT EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The existing motion accuracy compensation system of CNC Swiss-type lathes cannot respond to dynamic degradation during the machining process in real time. It relies on external equipment, which leads to production interruptions and high maintenance costs. It also lacks self-diagnosis and self-decision-making capabilities, making it difficult to achieve sub-micron level machining stability.

Method used

Employing a multi-source signal acquisition module, an edge AI inference engine, a precision status assessment model, and an adaptive compensation parameter library, the system acquires servo current, spindle vibration, and turret position signals in real time through the machine tool's existing sensors. It then utilizes a lightweight neural network for real-time feature extraction and compensation parameter calculation to achieve feedforward precision compensation.

Benefits of technology

It achieves real-time compensation without external calibration, reducing system hardware costs and maintenance complexity. It has self-learning capabilities and can maintain submicron-level processing stability and high compatibility during long-term continuous processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578744B_ABST
    Figure CN121578744B_ABST
Patent Text Reader

Abstract

This application discloses a motion accuracy compensation system and method for CNC Swiss-type lathes, aiming to solve the problems of existing accuracy compensation methods that rely on external calibration, interrupt production, cannot respond to dynamic errors in real time, and lack self-learning closed-loop capabilities. The method includes: real-time acquisition of servo current, spindle vibration, and turret position signals; extraction of signal features and input into a pre-trained model to assess the degree of stiffness degradation and predict position deviation; querying a compensation parameter library based on the assessment results; and real-time injection of the compensation offset into subsequent CNC commands. The system includes a multi-source signal acquisition module, an edge AI inference engine, an accuracy status assessment model, an adaptive compensation parameter library, and a CNC command injection interface. By adopting the above technical solution, this application can achieve online real-time accuracy perception and adaptive compensation without external high-precision equipment or production interruption, significantly improving machining dimensional consistency and long-term stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine tool control, and specifically relates to a motion accuracy compensation system for a CNC Swiss-type lathe. Background Technology

[0002] As a core piece of equipment for machining high-precision micro-parts, CNC Swiss-type lathes are widely used in fields with stringent requirements for dimensional consistency and surface integrity, such as medical devices, precision electronics, and aerospace. They achieve one-time forming of complex contours by clamping the workpiece with a spindle and cooperating with a multi-axis linkage turret, featuring high rigidity, high speed, and high integration. In this type of machine tool, the positioning accuracy and trajectory roundness of the X / Z axes directly determine the final geometric quality of the workpiece and are key indicators for evaluating the overall machine performance.

[0003] Motion accuracy compensation technology aims to offset systematic deviations caused by factors such as mechanical wear, thermal deformation, and the evolution of assembly clearances, in order to maintain long-term machining stability. Existing compensation methods are mainly divided into two categories: one is offline calibration compensation, which relies on external high-precision instruments such as laser interferometers or ballbars to establish a static error model in a stopped state. Although the accuracy is high, it interrupts the production process and cannot capture real-time degradation under dynamic working conditions; the other is closed-loop feedback control, which uses grating rulers or encoders to form a fully closed-loop servo system. It can only suppress the following error within the servo bandwidth and is difficult to cope with the large-scale positional offset caused by the decrease in structural stiffness due to guide rail wear, spindle loosening, etc.

[0004] Existing technologies have further exposed multiple limitations: machine learning-based prediction methods generally lack the ability to deeply mine the inherent signals of the machining process, failing to transform existing information such as servo current harmonics and spindle vibration spectrum into a basis for accuracy status perception; more importantly, current systems generally lack a closed-loop mechanism of "self-diagnosis—self-decision-self-execution," making it impossible to achieve online updates and feedforward injection of compensation parameters without human intervention. These problems lead to existing compensation strategies facing difficulties such as slow response, poor adaptability, and high maintenance costs in continuous batch production scenarios. There is an urgent need for a motion accuracy compensation system that requires no external calibration, relies on native machine tool signals, and has real-time self-learning capabilities to support the long-term maintenance of sub-micron level machining stability. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a motion accuracy compensation system for CNC Swiss-type lathes, which can effectively solve the problems in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] On the one hand, a motion accuracy compensation system for a CNC Swiss-type lathe is proposed, which includes the following components:

[0008] The multi-source signal acquisition module is used to acquire multi-source signals in real time during the machining process, including the servo current signal built into the machine tool, the spindle vibration signal, and the turret position signal. The multi-source signals serve as intrinsic process variables characterizing the motion accuracy state.

[0009] An edge AI inference engine, deployed on the machine tool's local edge computing unit, is used to preprocess the multi-source signals and extract time-frequency domain features, including the total harmonic distortion rate of the servo current, the energy proportion of the spindle vibration in a specific frequency band, and the turret position hysteresis.

[0010] The accuracy status assessment model is a pre-trained lightweight neural network model. Its input is the feature vector extracted by the edge AI inference engine, and its output is the stiffness index characterizing the current degree of overall stiffness degradation of the machine tool and the predicted X / Z axis position deviation vector.

[0011] An adaptive compensation parameter library stores the mapping relationship between different machining condition parameters and corresponding compensation offsets. The machining condition parameters include at least workpiece material, spindle speed and feed rate.

[0012] The CNC instruction injection interface is used to superimpose the compensation offset output by the adaptive compensation parameter library into the CNC program interpolation instruction stream of the subsequent workpiece in real time through the standard application programming interface provided by the CNC system, thereby realizing feedforward precision compensation.

[0013] Preferably, the multi-source signal acquisition module reuses or supplements the machine tool's original sensors. The servo current signal is acquired through high-precision Hall current sensors connected to the output terminals of the X-axis and Z-axis servo drives, with a sampling frequency of not less than 20 kHz. The spindle vibration signal is acquired through a three-axis MEMS vibration sensor installed on the front flange of the spindle, with a sampling frequency of not less than 5 kHz. The turret position signal is provided by the machine tool's original absolute encoder via a fieldbus protocol.

[0014] Furthermore, the feature extraction process performed by the edge AI inference engine specifically involves: performing a fast Fourier transform on the servo current signal to calculate its total harmonic distortion (THD), the calculation formula of which is as follows: ,in This is the effective value of the fundamental current. The effective value of the h-th harmonic current is given; a short-time Fourier transform is performed on the spindle vibration signal to extract the percentage of vibration energy in the 100 Hz to 500 Hz frequency band; the difference between the final position fed back by the encoder and the command target position is recorded when the turret completes each tool change action as the position hysteresis.

[0015] Furthermore, the accuracy state assessment model employs a one-dimensional convolutional neural network structure. Its input layer receives a three-dimensional feature vector composed of THD, vibration energy percentage, and hysteresis. The model includes two convolutional layers, one global average pooling layer, and two fully connected layers. The final output layer is divided into two branches: one outputs a stiffness exponent scalar ranging from 0 to 1, and the other outputs a two-dimensional position deviation vector containing Δx and Δz components. Before deployment, the model is quantized to FP16 precision using the TensorRT framework to ensure a single inference latency of less than 8 ms on the edge computing unit. This embodiment preferably uses a one-dimensional convolutional neural network; however, those skilled in the art will understand that, provided the computing power and latency requirements of the edge computing unit are met, other lightweight model architectures, such as simplified versions of recurrent neural networks (RNNs) or Transformers, can also be used to achieve the functionality of this invention.

[0016] On the other hand, a motion accuracy compensation method for CNC Swiss-type lathes is also proposed. The specific steps of this method are as follows:

[0017] Step S110: During the machining of the workpiece by the CNC Swiss-type lathe, the three-phase current signals of the X-axis and Z-axis servo motors, the vibration acceleration signals of the spindle in the three orthogonal directions, and the rotation position feedback signal of the turret are collected synchronously and in real time.

[0018] Step S120: Denoise and standardize the collected current signal and vibration signal respectively, and extract the total harmonic distortion rate of the servo current, the energy ratio of the spindle vibration signal in the 100-500 Hz frequency band, and the position backlash during the turret tool change to form a feature vector.

[0019] Step S130: Input the feature vector into a pre-trained lightweight convolutional neural network model. The model simultaneously calculates and outputs a stiffness index characterizing the current motion accuracy degradation of the machine tool and a predicted X / Z axis position deviation vector.

[0020] Step S140: Determine whether the stiffness index is lower than a preset degradation threshold; if it is lower, query the adaptive compensation parameter library according to the current machining condition parameters, including workpiece material type, spindle speed and feed rate, and retrieve the matching compensation offset; if it is not lower, maintain the existing compensation parameters or set them to zero.

[0021] Step S150: Through the standard API interface provided by the CNC system controller, the compensation offset is injected in real time into the starting point instruction of the CNC program G code interpolation path of the next workpiece to be processed in a vector superposition manner.

[0022] Step S160 involves repeatedly executing steps S110 to S150, thereby forming a closed loop between the machining process, accuracy status perception, and compensation parameter adjustment, and achieving adaptive accuracy maintenance.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] 1. It completely eliminates the reliance on external high-precision measuring equipment such as laser interferometers and ballbars. By deeply exploring and utilizing the built-in sensor signals of the machine tool's original or low-cost additions, the machining process itself is transformed into a high-dimensional precision state perception source, which significantly reduces the system hardware cost and integration and maintenance complexity.

[0025] 2. The system achieves real-time and continuous compensation processes. Within each workpiece processing cycle, the system can complete a full signal acquisition, feature extraction, state assessment, and compensation decision-making. The compensation parameters can be dynamically updated as the processing progresses, effectively overcoming the drawbacks of traditional offline calibration compensation that interrupts production and cannot respond to real-time degradation.

[0026] 3. Possesses strong self-learning and adaptive capabilities. Through the "operating condition-signal-accuracy" data pairs accumulated over long-term operation, the accuracy status assessment model can be retrained and optimized, and the mapping relationships in the adaptive compensation parameter library can be dynamically updated, thereby continuously improving the long-term compensation accuracy and stability of the system under different wear stages and processing tasks.

[0027] 4. Strong system compatibility and engineering practicality. The CNC instruction injection interface is developed based on the standard communication protocols and APIs provided by mainstream CNC systems such as Fanuc FOCAS, Siemens OPC UA, and Mitsubishi MELSEC. It does not require in-depth modification of the original machine tool control kernel, making it easy to modify and deploy on existing equipment. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the overall technical architecture of the motion accuracy compensation system for CNC Swiss-type lathes proposed in this invention;

[0029] Figure 2 This is a flowchart of the closed-loop logic process for accuracy state assessment and adaptive compensation based on multi-source signal perception and AI reasoning in this invention. Detailed Implementation

[0030] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. 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.

[0031] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the specific embodiments according to the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.

[0032] Example 1

[0033] In high-volume, long-term continuous machining scenarios for precision shaft parts, such as the manufacturing of fuel injector valve bodies for automotive engines, CNC Swiss-type lathes need to maintain extremely high dimensional accuracy and shape tolerance consistency. Traditional methods relying on external equipment such as laser interferometers for periodic offline calibration not only interrupt production but also fail to capture real-time accuracy degradation caused by thermal deformation and mechanical wear during machining. This embodiment provides a motion accuracy compensation system for CNC Swiss-type lathes, aiming to achieve adaptive accuracy maintenance during the machining process.

[0034] See Figure 1 This system is physically integrated into the CNC Swiss-type lathe body and its CNC system. Its core components include a multi-source signal acquisition module, an edge AI inference engine, a precision status assessment model, an adaptive compensation parameter library, and a CNC instruction injection interface. These modules work together to form a closed loop from signal perception to compensation execution.

[0035] The multi-source signal acquisition module is responsible for continuously capturing process variables characterizing the intrinsic state of machine tool motion accuracy during machining. This module fully utilizes or adds to the machine tool's existing sensors at low cost, avoiding the introduction of complex external measuring devices. Specifically, for servo current signal acquisition, a non-invasive closed-loop Hall current sensor is connected in parallel to the three-phase current output terminals of the X-axis and Z-axis servo drives necessary for high-precision machining. This sensor has a bandwidth of at least 100 kHz and a sampling frequency set to 20 kHz to ensure complete capture of high-frequency harmonic components in the current waveform. The current signal is transmitted to the signal conditioning circuit via shielded twisted-pair cable for preliminary amplification and filtering, and then converted into a digital signal stream by a 16-bit analog-to-digital converter. For spindle vibration signal acquisition, a three-axis microelectromechanical system (MEMS) vibration sensor is rigidly mounted on the non-rotating reference surface of the spindle's front flange. This sensor measures the spindle's vibration acceleration in three orthogonal directions: radial, axial, and tangential, with a range of ±50 g and a sampling frequency set to 5 kHz. The sensor output is transmitted directly via a digital interface after passing through a built-in anti-aliasing filter. For acquiring the turret position signal, the original multi-turn absolute encoder of the machine tool is directly reused. This encoder periodically reports the real-time rotation angle of the turret and the final position after the tool change to the CNC system in the form of digital messages via PROFIBUS-DP or MELSECNET fieldbus protocol. The multi-source signal acquisition module uses a dedicated field-programmable gate array to synchronously acquire and timestamp multiple signals, ensuring that all signal samples have strict time synchronization, laying the foundation for subsequent time-frequency domain correlation analysis.

[0036] The edge AI inference engine is deployed on an industrial-grade edge computing unit directly installed within an electrical cabinet. This unit features a multi-core processor and a dedicated neural network inference accelerator. The engine's primary task is to preprocess and extract features from the raw signal stream. For the servo current digital signal stream, the engine first applies a sliding window-based Kalman filter for denoising, suppressing random noise caused by electromagnetic interference. Subsequently, a Fast Fourier Transform is performed on a data window consisting of 1024 sampling points to calculate the current spectrum. Based on the spectrum data, the engine performs a core feature calculation: Total Harmonic Distortion (THD). Its calculation formula is as follows: ,in This is the effective value of the fundamental current. The effective value of the h-th harmonic current is given, with H set to 50 to cover the main harmonic components. The total harmonic distortion rate directly reflects the load characteristic distortion of the servo drive system caused by changes in mechanical friction and relaxation of guide rail preload. For the spindle vibration acceleration signal, the engine first performs coordinate transformation to synthesize the three-axis signals into a total vibration vector. Subsequently, a Hamming window is applied to the data segment consisting of every 512 sampling points, and a short-time Fourier transform is performed to generate the time spectrum. The engine extracts the vibration energy in the key frequency band from 100 Hz to 500 Hz and calculates its percentage of the total vibration energy. The energy percentage in this frequency band is a sensitive indicator for identifying spindle bearing wear and dynamic balance deterioration. For the turret position signal, the engine continuously monitors the encoder's position feedback. Whenever a tool change command is detected to be executed and the position feedback is stable, the difference between the absolute position value fed back by the encoder and the target command position value issued by the CNC system is recorded. This difference is defined as the position backlash of this tool change. The accumulated position backlash reflects the gear clearance and worm gear wear in the turret drive chain. Finally, the edge AI inference engine combines the total harmonic distortion rate, vibration energy ratio, and latest position hysteresis calculated in real time into a 3D feature vector, and sends it to the downstream accuracy status assessment model.

[0037] The accuracy status assessment model is a lightweight one-dimensional convolutional neural network that has been pre-trained offline and deployed. Before deployment, the model was trained using massive amounts of "feature vector-measured accuracy deviation" data collected from multiple machine tools of the same model over several months of actual machining. The measured accuracy deviation data was obtained by measuring the key dimensions of a standard workpiece using a contact-type online probe before the machine tool leaves the factory or during regular maintenance, and using the difference between the measurement results and the theoretical dimensions as label data. During long-term system operation, a non-contact laser rangefinder integrated on the turret can also be used to quickly scan the key features of the workpiece during tool changes to obtain accuracy feedback data for online model updates. After training, the model was quantized to FP16 accuracy using the TensorRT framework and optimized into an efficient inference engine suitable for edge computing units, ensuring that the end-to-end latency of a single forward inference is strictly controlled within 8 milliseconds. The model's network structure includes two one-dimensional convolutional layers, one global average pooling layer, and two fully connected layers. Its input layer receives the aforementioned three-dimensional feature vector. The model's forward propagation process performs nonlinear mapping and abstraction of high-dimensional features. The final output layer of the model consists of two independent branches: the first branch outputs a scalar ranging from 0 to 1, defined as the "stiffness index." This index comprehensively characterizes the degree of stiffness degradation of the machine tool's current mechanical structure (such as the bed, spindle box, and slide); the lower the value, the more severe the stiffness loss. The second branch outputs a 2D vector containing two components, Δx and Δz, which represent the predicted combined positional deviation of the X and Z axes in the next machining cycle, expressed in micrometers. This prediction deviation incorporates the effects of thermal errors, force-induced deformation, and geometric errors.

[0038] The adaptive compensation parameter library is a relational database stored on the solid-state drive of the edge computing unit. It establishes a non-linear mapping between "machining condition parameters" and "ideal compensation offsets." The machining condition parameters are multi-dimensional vectors, including at least: workpiece material type (e.g., stainless steel, aluminum alloy, titanium alloy), spindle speed (revolutions per minute), and X-axis and Z-axis feed rates (millimeters per minute). The compensation offset is a corresponding 2-dimensional vector (Cx, Cz), representing the command offset to be applied along the corresponding axis to compensate for prediction deviations. The initial data for this parameter library comes from the machine tool's precision calibration experiments and finite element simulations at the time of shipment. During long-term system operation, the parameter library has self-updating capabilities. After the system performs compensation, the compensation effect can be verified by online measurement results after machining (e.g., using a contact probe) or periodically sampled workpiece dimensions. This verification allows for the correction or addition of mapping entries in the library, enabling the accumulation and optimization of experience.

[0039] The CNC instruction injection interface is a key execution component for implementing compensation actions. This interface software is developed based on standard application programming interfaces (APIs) provided by CNC system manufacturers, such as the FOCAS library for Fanuc systems, the OPC UA client for Siemens systems, and the MELSEC communication protocol for Mitsubishi systems. This interface runs as a foreground or background service, continuously monitoring the compensation offset output from the adaptive compensation parameter library. When compensation is needed, before the CNC program for the next workpiece begins execution, the interface precisely adds the compensation offset (Cx, Cz) as a coordinate offset to the current workpiece coordinate system of the CNC system via API function calls, at the starting point of the interpolator's G-code path planning. This process is a feedforward superposition, which does not modify the original CNC program file, only affecting the real-time interpreted instruction flow, thus achieving immediate correction of subsequent machining trajectories.

[0040] See Figure 2 The above modules work together in strict timing and logical closed loop, specifically as shown in the following method steps:

[0041] In step S110, during the machining of a single workpiece by a CNC Swiss-type lathe, the system synchronously initiates multi-source signal acquisition. The three-phase current signals of the X-axis and Z-axis servo motors, the three-axis vibration acceleration signals of the spindle, and the rotational position feedback signal of the turret are acquired and buffered in real time and synchronously.

[0042] In step S120, the edge AI inference engine performs batch processing on the cached current and vibration signal data. First, denoising and standardization preprocessing is performed to eliminate the influence of dimensions. Then, the engine strictly follows the aforementioned method to extract the total harmonic distortion rate of the servo current, the energy proportion of the spindle vibration in the 100–500 Hz frequency band, and calculates the position backlash generated by the most recent turret tool change within the current machining cycle. These three feature values ​​are constructed into a standardized 3D feature vector.

[0043] In step S130, the feature vector is immediately fed into the accuracy status assessment model that has been loaded into memory for inference. The model performs parallel computation and outputs two results simultaneously: a stiffness index (scalar) characterizing the degree of degradation of the machine tool's current overall motion accuracy, and a predicted X / Z axis position deviation vector (Δx, Δz).

[0044] In step S140, the system decision logic is triggered. The core of the decision is to determine whether the stiffness index is lower than a preset degradation threshold (e.g., 0.75). If the stiffness index is not lower than the threshold, the machine tool is considered to be in good condition, and the prediction deviation may be dominated by random factors. The system will maintain the existing compensation parameters unchanged or set the compensation offset to zero. If the stiffness index is lower than the threshold, it indicates that the machine tool has experienced significant stiffness degradation, and the prediction deviation is systematic. At this time, the system obtains the current machining condition parameters, including the type of workpiece material being machined, the current spindle speed program value, and the current feed rate program value. Using these condition parameters as indexes, the adaptive compensation parameter library is queried. The query algorithm uses a combination of nearest neighbor matching and linear interpolation to retrieve one or more sets of compensation offsets that best match the current condition from the library. After weighted calculation, the compensation offset (Cx, Cz) to be used in this case is finally determined.

[0045] In step S150, after the compensation offset is determined, the CNC instruction injection interface immediately takes action. At the instant before the CNC program segment for the next workpiece is interpreted and executed by the interpolator after the current workpiece machining is completed, the interface precisely injects (Cx, Cz) as coordinate offsets into the path planning buffer of the CNC system via the CNC system's standard API. This offset will take effect from the next interpolation cycle, correcting the tool's motion trajectory in real time.

[0046] In step S160, after completing the machining and compensation of a workpiece, the system immediately resets and repeats steps S110 to S150. The machining cycle of each workpiece (usually tens of seconds to several minutes) constitutes a complete "perception-evaluation-decision-execution" closed loop. Through this high-frequency closed-loop adjustment, the machining process, accuracy status perception, and compensation parameter adjustment are tightly coupled, enabling the system to dynamically track and compensate for accuracy drift caused by heat accumulation and progressive wear, achieving adaptive accuracy maintenance.

[0047] The system described in this embodiment has been verified through actual installation. After 8 hours of continuous processing, the critical shaft diameter dimensional consistency of the workpiece processed by the CNC Swiss-type lathe using this system can be improved from ±5 micrometers and stabilized within ±1.2 micrometers. In unattended batch processing for up to 72 hours, the process capability index CPK of the critical hole diameter has been significantly improved from 0.92 to 1.67, achieving long-term maintenance of submicron-level processing stability and greatly reducing scrap rate and quality inspection costs.

[0048] Example 2

[0049] In the mass production of precision stainless steel bone screws for medical devices, higher requirements are placed on the dynamic accuracy and surface finish of CNC Swiss-type lathes. This embodiment, based on the system architecture of Embodiment 1, further enhances the monitoring and compensation of spindle thermal characteristics and chatter during the cutting process, and refines the dimensions of the compensation parameter library.

[0050] In this embodiment, the multi-source signal acquisition module adds one more signal acquisition channel to the existing module in Embodiment 1: a non-contact infrared temperature sensor is used to monitor the temperature of the outer ring of the spindle front bearing in real time, with a sampling frequency of 1 Hz. This temperature signal is used to more accurately model the impact of spindle thermal expansion on Z-axis accuracy. Simultaneously, the frequency band analysis of the spindle vibration signal is expanded. In addition to the 100-500 Hz wear band, extra attention is paid to the 500-2000 Hz high-frequency band, as a sudden increase in vibration energy in this band is an important precursor to cutting chatter.

[0051] The feature extraction process of the edge AI inference engine has been expanded accordingly. For temperature signals, the slope of the temperature rise relative to the ambient temperature is calculated. For vibration signals, in addition to calculating the energy proportion of the original frequency bands of interest, the ratio of high-frequency (500-2000Hz) energy to mid-to-low-frequency (0-500Hz) energy is newly calculated as the "flutter tendency index". Therefore, the feature vector dimension of this embodiment is expanded from 3-dimensional to 5-dimensional, including: total harmonic distortion rate of servo current, low-frequency energy proportion of spindle vibration, high-frequency / low-frequency energy ratio of spindle vibration, temperature rise slope of spindle bearing, and turret position hysteresis.

[0052] The accuracy condition assessment model also needs to be retrained to adapt to the 5-dimensional input. Its output, while retaining the stiffness exponent and the X / Z axis basic position deviation vector, adds a scalar output of a "surface quality degradation coefficient." This coefficient is used to predict the degree of workpiece surface roughness deterioration that might result from continued machining under the current conditions.

[0053] The adaptive compensation parameter library has been significantly expanded in dimensionality. In addition to workpiece material, spindle speed, and feed rate, new parameters have been added for depth of cut, width of cut, and coolant status (on / off). The compensation offset has also been expanded to a 4-dimensional vector (Cx, Cz, Cs, Cf), where Cx and Cz are position offsets, Cs is the spindle speed fine-tuning amount (in revolutions per minute) for surface quality degradation, and Cf is the percentage of feed rate fine-tuning for chatter tendency. The parameter library was constructed based on extensive cutting experiments and surface roughness testing data.

[0054] The functionality of the CNC instruction injection interface has been enhanced. In addition to injecting coordinate offsets, it must also have the ability to dynamically fine-tune the spindle speed (S) and feed rate (F) instructions via API. When the system output compensation vector includes Cs and Cf, the interface must temporarily overwrite the corresponding modal instructions in the CNC program within the compensation cycle.

[0055] The method steps are refined based on Example 1:

[0056] In step S110, the spindle bearing temperature is added to the synchronously acquired signal.

[0057] In step S120, the calculation of the added temperature rise slope and flutter tendency index is performed to form a 5-dimensional feature vector.

[0058] In step S130, the accuracy state assessment model outputs the stiffness index, the position deviation vector (Δx, Δz), and the surface quality attenuation coefficient.

[0059] In step S140, the decision logic becomes a multi-condition judgment. First, it is determined whether either the stiffness index or the surface quality attenuation coefficient is below its corresponding threshold. Second, it is determined whether the flutter tendency index exceeds a safety threshold. Based on different threshold trigger combinations, the compensation parameter library is queried. For example, if only the stiffness index is low, the position compensation amount (Cx, Cz) is mainly queried; if the flutter tendency index is high, the feed rate adjustment amount Cf is queried first; if the surface quality attenuation coefficient is low and the temperature rises, a composite compensation amount including speed fine-tuning Cs may be queried.

[0060] In step S150, the CNC instruction injection interface performs a composite compensation action based on the obtained 4D compensation vector (Cx, Cz, Cs, Cf): injecting coordinate offset (Cx, Cz), and temporarily overriding and modifying the spindle speed (S instruction adds Cs) and feed rate (F instruction multiplies by (1+Cf)) through system instructions.

[0061] With the enhancements in this embodiment, the system can not only compensate for geometric position errors, but also actively suppress chatter and optimize cutting parameters to maintain surface quality, achieving an upgrade from "precision compensation" to "process optimization". It is particularly suitable for processing medical device parts with extremely high requirements for surface integrity.

[0062] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A motion accuracy compensation system for a CNC Swiss-type lathe, characterized in that, The system includes the following components: The multi-source signal acquisition module is used to acquire multi-source signals in real time during the machining process, including the servo current signal built into the machine tool, the spindle vibration signal, and the turret position signal. The multi-source signals serve as intrinsic process variables characterizing the motion accuracy state. An edge AI inference engine, deployed on the machine tool's local edge computing unit, is used to preprocess the multi-source signals and extract time-frequency domain features, including the total harmonic distortion rate of the servo current, the energy proportion of the spindle vibration in a specific frequency band, and the turret position hysteresis. The accuracy status assessment model is a pre-trained lightweight neural network model. Its input is the feature vector extracted by the edge AI inference engine, and its output is the stiffness index characterizing the current degree of overall stiffness degradation of the machine tool and the predicted X / Z axis position deviation vector. An adaptive compensation parameter library stores the mapping relationship between different machining condition parameters and corresponding compensation offsets. The machining condition parameters include at least workpiece material, spindle speed and feed rate. The CNC instruction injection interface is used to superimpose the compensation offset output by the adaptive compensation parameter library into the CNC program interpolation instruction stream of the subsequent workpiece in real time through the standard application programming interface provided by the CNC system, so as to realize feedforward accuracy compensation. In the multi-source signal acquisition module, the servo current signal is acquired by a high-precision Hall current sensor connected to the output terminals of the X-axis and Z-axis servo drivers, with a sampling frequency of not less than 20 kHz; the spindle vibration signal is acquired by a three-axis MEMS vibration sensor installed on the front flange of the spindle, with a sampling frequency of not less than 5 kHz; and the turret position signal is provided by the machine tool's original absolute encoder via a fieldbus protocol. The feature extraction process performed by the edge AI inference engine specifically involves: performing a Fast Fourier Transform on the servo current signal and calculating its Total Harmonic Distortion (THD) using the formula: THD = ,in This is the effective value of the fundamental current. The effective value of the h-th harmonic current is given; a short-time Fourier transform is performed on the spindle vibration signal to extract the percentage of vibration energy in the 100 Hz to 500 Hz frequency band; the difference between the final position fed back by the encoder and the target position of the command is recorded when the turret completes each tool change action, as the position hysteresis.

2. The motion accuracy compensation system for a CNC Swiss-type lathe according to claim 1, characterized in that, The accuracy state assessment model adopts a one-dimensional convolutional neural network structure. Its input layer receives a three-dimensional feature vector consisting of total harmonic distortion, vibration energy ratio, and hysteresis. The model contains two convolutional layers, one global average pooling layer, and two fully connected layers. The final output layer is divided into two branches: one outputs a stiffness exponent scalar ranging from 0 to 1, and the other outputs a two-dimensional position deviation vector containing Δx and Δz components. The accuracy state assessment model is quantized to FP16 precision before deployment to ensure that the single inference latency on the edge computing unit is less than 8 ms.

3. The motion accuracy compensation system for a CNC Swiss-type lathe according to claim 1, characterized in that, In the adaptive compensation parameter library, the machining condition parameters also include cutting depth and cutting width; the compensation offset is expanded into a 4-dimensional vector containing X-axis compensation offset Cx, Z-axis compensation offset Cz, spindle speed fine adjustment Cs, and feed rate fine adjustment percentage Cf. The mapping relationship of the parameter library is constructed based on cutting experiment and surface roughness detection data, and it has the ability to self-update according to online measurement results.

4. The motion accuracy compensation system for a CNC Swiss-type lathe according to claim 3, characterized in that, The CNC instruction injection interface is developed based on the Fanuc FOCAS, Siemens OPC UA, or Mitsubishi MELSEC standard communication protocols and APIs. Before the CNC program for the next workpiece to be processed begins execution, the interface superimposes the compensation offset onto the current workpiece coordinate system of the CNC system in the form of coordinate offset. It can also dynamically fine-tune the spindle speed command and feed rate command through the API based on the Cs and Cf components in the compensation offset.

5. A method for motion accuracy compensation of a CNC Swiss-type lathe based on the motion accuracy compensation system according to any one of claims 1 to 4, characterized in that, The method includes the following steps: S110. During the machining process of the CNC Swiss-type lathe, the three-phase current signals of the X-axis and Z-axis servo motors, the vibration acceleration signals of the spindle in three orthogonal directions, and the feedback signal of the turret's rotation position are collected synchronously in real time. S120. The acquired current signal and vibration signal are denoised and standardized preprocessed respectively, and the total harmonic distortion rate of the servo current, the energy ratio of the spindle vibration signal in the 100-500 Hz frequency band and the position backlash during the turret tool change are extracted to form a feature vector. S130. The feature vector is input into a pre-trained lightweight convolutional neural network model, which simultaneously calculates and outputs a stiffness index characterizing the current motion accuracy degradation of the machine tool and a predicted X / Z axis position deviation vector. S140. Determine whether the stiffness index is lower than the preset degradation threshold. If it is lower, query the adaptive compensation parameter library according to the current processing condition parameters, including workpiece material type, spindle speed and feed rate, and retrieve the matching compensation offset. If it is not lower, maintain the existing compensation parameters or set them to zero. S150. Through the standard API interface provided by the CNC system controller, the compensation offset is injected in real time into the starting point instruction of the CNC program G code interpolation path of the next workpiece to be processed in a vector superposition manner. S160, cyclically execute steps S110 to S150, so that the machining process, accuracy status perception and compensation parameter adjustment form a closed loop, and achieve adaptive accuracy maintenance.

6. The motion accuracy compensation method for a CNC Swiss-type lathe according to claim 5, characterized in that, In step S110, the synchronously acquired signal also includes the temperature signal of the outer ring of the front bearing of the spindle obtained by a non-contact infrared temperature sensor; in step S120, the feature extraction also includes calculating the temperature rise slope of the spindle bearing, and calculating the energy ratio of the spindle vibration signal in the 500-2000 Hz high frequency band to the 0-500 Hz mid-low frequency band as a flutter tendency index. The feature vector is expanded into a 5-dimensional vector including total harmonic distortion, low frequency vibration energy ratio, high frequency / low frequency vibration energy ratio, temperature rise slope, and position hysteresis.

7. The motion accuracy compensation method for a CNC Swiss-type lathe according to claim 6, characterized in that, In step S130, the accuracy state assessment model also outputs a surface quality attenuation coefficient simultaneously; in step S140, the decision logic performs multi-condition judgment based on the comparison results of the stiffness index, surface quality attenuation coefficient and chatter tendency index with their respective preset thresholds, and queries the adaptive compensation parameter library to obtain the corresponding 4-dimensional compensation offset (Cx, Cz, Cs, Cf) according to different threshold trigger combinations, where Cx is the X-axis compensation offset, Cz is the Z-axis compensation offset, Cs is the spindle speed fine adjustment amount, and Cf is the feed rate fine adjustment percentage.

8. The motion accuracy compensation method for a CNC Swiss-type lathe according to claim 7, characterized in that, In step S150, the injection of the compensation offset includes: injecting Cx and Cz as coordinate offsets into the path planning buffer of the CNC system, temporarily overriding the spindle speed command by adding Cs through system instructions, and multiplying the feed rate command by (1+Cf).

Citation Information

Patent Citations

  • Dynamic positioning error compensation system of numerical control machine tool feed driving system

    CN120560158A

  • Dynamic precision compensation control method based on intelligent PCB drilling machine

    CN120949694A