Real-time compensation control system and method for multi-axis linkage error of CNC machine tools

By constructing a propagation path diagram and an adaptive pre-compensation command sequence, the problem of incomplete characterization of error propagation relationships in multi-axis linkage machining was solved, enabling precise locking of key error sources and improving machining accuracy and compensation effect.

CN122308254APending Publication Date: 2026-06-30HENAN WANGUO INTELLIGENT CNC CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN WANGUO INTELLIGENT CNC CO LTD
Filing Date
2025-11-14
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing error compensation technologies fail to fully characterize the transmission relationship and degree of influence of errors in multi-axis linkage machining, resulting in limited compensation effects, difficulty in identifying key error sources, and impact on machining accuracy and surface quality.

Method used

By synchronously collecting multi-source sensor data from each motion axis of the machine tool, constructing a propagation path diagram, analyzing error transmission relationships, identifying key error sources, and generating an adaptive pre-compensation command sequence, real-time compensation control is achieved.

Benefits of technology

By accurately quantifying error propagation characteristics and identifying the core error propagation chain, the system can precisely locate key error sources, improve processing accuracy and the targeted nature of compensation, and solve the problem of incomplete characterization of error joint relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention belongs to the field of error analysis and compensation technology. It discloses a real-time error compensation control system and method for multi-axis linkage of CNC machine tools. The system includes: acquiring multi-source sensor data streams of each motion axis of the machine tool during the linkage process; fitting and generating multi-dimensional elements of the propagation path based on the correlation between data changes and energy distribution of the multi-source sensor data streams, and constructing a propagation path diagram between motion axes; determining the node topology sequence by performing dynamic error transmission analysis on adjacent nodes in the propagation path diagram; determining the core error transmission relationship chain by performing critical path analysis on the propagation path diagram based on the topology sequence; identifying the key error source axis by analyzing the degree of change in error transmission in the core error transmission relationship chain; and generating an adaptive pre-compensation command sequence by analyzing the changing trend of the key error source axis in the error signal. This invention solves the problem of compensation inaccuracy caused by error transmission due to multi-axis linkage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of error analysis and compensation technology, and more specifically, to a real-time compensation control system and method for multi-axis linkage error of CNC machine tools. Background Technology

[0002] Real-time error compensation is a key technology in the field of modern precision manufacturing. During high-speed and high-precision multi-axis linkage machining, CNC machine tools generate complex dynamic errors due to the combined effects of various factors such as the dynamic characteristics of mechanical structure, servo drive response, thermal deformation and external vibration. These errors are transmitted and amplified between each motion axis, ultimately causing the actual motion trajectory of the tool relative to the workpiece to deviate from the ideal command trajectory, which seriously affects the machining accuracy and surface quality of the workpiece.

[0003] Existing error compensation technologies have the following drawbacks: They typically treat the errors of moving axes as independent factors. However, in the complex multi-axis linkage conditions of machine tools, the combined effect of mechanical structure vibration and dynamic movement of the moving axes is ignored, leading to an incomplete characterization of the joint relationship between errors, hindering the quantification of the spatiotemporal characteristics of error propagation and accurate acquisition of the direction and degree of error transmission. Furthermore, due to the transmission effect between errors of different axes, it is difficult to accurately identify the key error source with the greatest impact on the final machining accuracy from among numerous error sources, resulting in inaccurate compensation and limited effectiveness. Therefore, how to perceive these dynamic errors in real time and accurately, and effectively compensate for them, is an urgent problem to be solved. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a real-time compensation control method for multi-axis linkage error in CNC machine tools, comprising: The machine tool synchronously acquires multi-source sensor data streams of each motion axis during the linkage process; the data streams include real-time position readings of the grating ruler, vibration acceleration data mounted on the spindle box, and actual tool runout. Based on the correlation between the multi-source sensor data stream and the energy distribution, a multi-dimensional element of the propagation path is fitted and generated, and a propagation path diagram between motion axes is constructed based on the multi-dimensional element. By performing dynamic error propagation analysis on adjacent nodes in the propagation path graph, the node topology sequence is determined; Based on the aforementioned topological sequence, critical path analysis is performed on the propagation path graph to determine the core error propagation relationship chain. By analyzing the degree of change in error propagation in the core error propagation chain, the key error source axis is identified. By analyzing the changing trend of the key error source axis in the error signal, an adaptive pre-compensation command sequence is generated to perform real-time compensation control on the key error source axis.

[0005] Preferably, the multidimensional elements for fitting and generating the propagation path include: By analyzing the correlation between the position readings of each motion axis and the actual runout of the tool, the correlation strength and correlation hysteresis value between the motion axis and the tool are determined. A short-time Fourier transform is performed on the vibration acceleration data to generate a vibration energy spectrum that varies with time. By analyzing the correlation between different frequency components of the vibration energy spectrum and the change in the position error of the motion axis, the dominant frequency band is determined; The correlation strength, correlation lag value, and dominant frequency band are used as multidimensional factors when generating propagation paths.

[0006] Preferably, the step of constructing the propagation path diagram between motion axes based on multi-dimensional elements includes: Define each motion axis of the machine tool and the terminal tool point as a node, and enumerate any two node combinations to obtain node pairs; The direction of error propagation between node pairs is determined by the sign of the associated hysteresis values ​​of the two nodes in the node pair. The correlation strength between the motion axis and the tool is normalized to obtain the normalized correlation strength. The coherence coefficient of the dominant frequency band in the node pair is calculated, and the normalized correlation strength and coherence coefficient are weighted and fused. The result of the weighted fusion is used as the edge weight of the connection edge between the nodes. Based on the propagation direction between nodes and the edge weights of the connecting edges, directed edges for node pairs are constructed, and the directed edges of all node pairs are integrated to obtain the propagation path graph.

[0007] Preferably, determining the node topology sequence includes: Calculate the in-degree of each node in the propagation path graph, and add all nodes with an in-degree of zero to a queue of nodes to be processed. Initialize an empty topology sequence, take a node from the queue of nodes to be processed, append it to the end of the topology sequence, and then remove the node and all directed edges originating from the node in the propagation path graph. Update the in-degree value of neighboring nodes, iterate through whether there are any neighboring nodes whose in-degree has become zero, and if so, add the node to the queue of nodes to be processed. Repeat the above steps until the queue of nodes to be processed is empty, and obtain a complete node topology sequence.

[0008] Preferably, determining the core error propagation chain further includes: Identify the starting point of the propagation path graph, and according to the order of the topological sequence, enumerate all paths from the starting point of the propagation path graph to that node, and denot them as sequential topological paths; Calculate the cumulative edge weight of each sequential topology path, denoted as the sequential weight, compare the sequential weights of different sequential topology paths, and record the maximum sequential weight as the earliest start propagation time of the node. Identify the endpoint in the propagation path graph, calculate the earliest propagation weight of the endpoint, and record it as the earliest propagation time of the endpoint; Enumerate all paths from the endpoint of the propagation path graph to the node in reverse order of the topological sequence; these are denoted as reverse topological paths. Calculate the cumulative edge weight of each reverse topology path, denoted as the reverse weight, and compare the reverse weights of different reverse topology paths. The latest start time of propagation of a node is obtained by calculating the difference between the earliest propagation time of the endpoint and the maximum reverse weight. The node time difference is calculated by taking the difference between the latest start time of propagation and the earliest start time of propagation for each node. Nodes with zero time difference are marked as target nodes, and the target nodes are connected in the order of their positions in the topology sequence to obtain the core error propagation chain.

[0009] Preferably, determining the key error source axis includes: In the core error propagation chain, identify all direct upstream nodes of each node and calculate the error propagation coefficient; Obtain the error measurement value of the upstream node and multiply it by the error propagation coefficient to obtain the predicted impact value of the upstream node on the downstream node; The total upstream propagation error of the nodes is obtained by algebraically summing the predicted impact values ​​of all directly upstream nodes. The actual measurement error of the node is obtained and the difference is calculated with the total upstream propagation error to obtain the node local error. The node local errors are then combined in time series to obtain the local error data sequence. Based on the topological structure of the core error propagation chain, enumerate the paths from each node to the endpoint, which are used as error propagation paths. Calculate the product of the error propagation coefficients of different nodes in the error propagation path, and use it as the path amplification coefficient of the starting node of the error propagation path. Calculate the statistical energy value of the local error data sequence of each node, and then perform weighted fusion of the statistical energy value and the corresponding path amplification coefficient; normalize the result of the weighted fusion to generate the error contribution index of the node. Nodes whose error contribution index exceeds the preset dynamic threshold are marked as key nodes, and the motion axes corresponding to the key nodes are marked as candidate key error source axes.

[0010] Preferably, determining the correlation strength and correlation hysteresis value between the motion axis and the tool includes: The motion axis position readings and the actual tool runout are time-series combined to obtain the motion axis position reading sequence and the actual tool runout sequence. The sequence of motion axis position readings is combined with the sequence of actual tool runout to obtain sequence pairs. All sequence pairs of different motion axis types and tool types are enumerated. Based on the preset sliding time window, extract the motion axis position reading subsequence and the actual tool deflection quantum sequence for each sequence pair; Calculate the cross-correlation function sequence between the motion axis position reading subsequence and the actual tool runout quantum sequence; Search for the maximum cross-correlation value in the sequence of cross-correlation function values, and define the absolute value of the maximum cross-correlation value as the correlation strength; The time offset corresponding to the maximum cross-correlation value is defined as the correlation hysteresis value between the motion axis and the tool.

[0011] Preferably, determining the dominant frequency band includes: The displacement command sequence issued by the motion axis in the current control cycle is read in real time, and the command acceleration spectrum of the displacement command sequence is extracted. Identify the non-uniform regions of frequency peak distribution in the command acceleration spectrum and determine them as the main motion frequency components; Using the calculated main motion frequency components as the center frequency, a symmetrical frequency band analysis window is preset on the vibration energy spectrum diagram; Within the defined frequency band analysis window, identify the local peak points of vibration energy amplitude in the vibration energy spectrum. Calculate the signal-to-noise ratio (SNR) of each local peak point, and remove local peak points with an SNR lower than a preset SNR threshold, marking them as regions with uneven energy distribution. Candidate resonance bands are generated based on the center frequency and bandwidth of local peak points; The theoretical command position data is read in real time. The position reading error is calculated based on the theoretical command position data and the real-time position reading, and the time sequence is combined to obtain the position reading error signal. The center frequency and bandwidth of the candidate resonance band are filtered with the position reading error signal to obtain the resonance band error signal; Calculate the average power of the position reading error signal and the resonance band error signal within the frequency band analysis window, and obtain the resonance error power and the total error power, respectively. The ratio of the resonance error power to the total error power is calculated to obtain the power proportion of the candidate resonance frequency band under the current operating conditions, which is used as the contribution weight of the resonance to the total error. Candidate resonance frequency bands whose contribution weight is greater than a preset weight threshold are marked as dominant frequency bands.

[0012] Preferably, generating the adaptive pre-compensation instruction sequence includes: Extract the resonant band error signal corresponding to the dominant frequency band, and construct an error prediction model by analyzing the changing trend of the resonant band error signal; Based on the error prediction model, the prediction error sequence of the key error source axis within the dynamic error prediction window is predicted by rolling prediction. Based on the prediction error sequence, an adaptive pre-compensation command sequence is generated using a compensator.

[0013] This invention also provides a real-time compensation control method for multi-axis linkage error of CNC machine tools, applied to the above-mentioned real-time compensation control method for multi-axis linkage error of CNC machine tools, including: The data acquisition module synchronously acquires multi-source sensor data streams of each motion axis of the machine tool during the linkage process; the data streams include real-time position readings of the grating ruler, vibration acceleration data installed on the spindle box, and actual tool runout. The error propagation analysis module analyzes the dynamic error propagation relationship between axes based on the multi-source sensor data stream and constructs an error propagation relationship chain. The critical error source localization module identifies the critical error source axis by analyzing the degree of change in error propagation in the core error propagation chain. The adaptive compensation module analyzes the changing trend of the key error source axis in the error signal, generates an adaptive pre-compensation command sequence, and performs real-time compensation control on the key error source axis.

[0014] The technical effects and advantages of the real-time compensation control system and method for multi-axis linkage error in CNC machine tools of the present invention are as follows: By calculating the correlation strength and correlation hysteresis value between the motion axis and the tool to quantify the spatiotemporal characteristics of error propagation, and combining vibration energy spectrum analysis to identify the dominant frequency band, a directed weighted propagation path graph characterizing the error propagation direction and intensity between nodes is constructed using the weighted value of the normalized correlation strength and the frequency band coherence coefficient as the edge weight. This achieves the effect of accurately quantifying the dynamic error interaction mechanism between axes and solves the problem of incomplete characterization of error joint relationship.

[0015] By using topology sorting and critical path analysis, the core error propagation chain that has a decisive impact on the accuracy of the terminal was identified. Finally, by calculating the local error of each node on the link and its contribution to the terminal, the accurate and dynamic locking of the key error source axis was achieved. This solved the problem of inaccurate compensation target caused by ignoring the characteristics of error propagation under multi-axis linkage, and enabled compensation resources to be concentrated on the key links that have the greatest impact on machining accuracy. Attached Figure Description

[0016] Figure 1This is a schematic diagram of the method flow for the real-time compensation control method for multi-axis linkage error of CNC machine tools according to the present invention.

[0017] Figure 2 This is a flowchart illustrating the method for determining the node topology sequence in the real-time compensation control method for multi-axis linkage error of CNC machine tools according to the present invention.

[0018] Figure 3 This is a flowchart illustrating the method for determining the core error transmission chain in the real-time compensation control method for multi-axis linkage error of CNC machine tools according to the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] This application provides a real-time error compensation control system and method for multi-axis linkage of CNC machine tools. By constructing a directed weighted propagation path graph that characterizes the direction and intensity of error propagation between nodes, and combining topological sorting and critical path analysis, the core error propagation relationship chain that has a decisive influence on the terminal accuracy is identified. This solves the problem of incomplete characterization of joint error relationships and the problem of inaccurate compensation targets caused by ignoring the characteristics of error propagation under multi-axis linkage.

[0021] Example 1, please refer to Figure 1 , Figure 2 and Figure 3 The real-time compensation control method for multi-axis linkage error of CNC machine tools is implemented in detail through the following steps: The system synchronously acquires multi-source sensor data streams from each motion axis of the machine tool during the linkage process. These multi-source sensor data streams include real-time position readings of the grating ruler, vibration acceleration data mounted on the spindle box, and actual tool runout. In each acquisition cycle (e.g., 1 second), the system reads the current position count value of each axis's grating ruler in parallel and converts it into a length quantity in engineering units. The current position count value is the raw digital signal representing the position output by the grating ruler, which is converted by reading the register of the encoder interface module and multiplying it by a resolution coefficient. The vibration acceleration sensors installed in three directions on the spindle box are synchronously acquired, and the analog voltage output is converted from analog to digital after passing through an anti-aliasing filter. The vibration acceleration data is used to characterize the mechanical vibration intensity of the machine tool during the machining process. The anti-aliasing filter is an analog low-pass filter used to filter out components in the signal with frequencies higher than the Nyquist frequency before sampling. By triggering a non-contact laser displacement sensor, the instantaneous distance data between the tool tip and the measurement reference surface is obtained from its measurement buffer, which is used as the actual tool runout. The measurement buffer is a storage area inside the sensor used to temporarily store the latest measurement results. All collected data is tagged with a unified time stamp and packaged into a structured data frame, which is then sent to the real-time data processing queue. The unified time stamp is an absolute time stamp taken from the hardware clock source. The structured data frame is a standard format that includes fields such as timestamp, data identifier, and data value. Based on the analysis of multi-source sensor data streams, the dynamic error propagation relationship between axes is analyzed, and an error propagation relationship chain is constructed. The dynamic error propagation relationship between axes describes how the error of a certain axis (such as thermal expansion of the X-axis) affects the final accuracy of other axes (such as the Y-axis). This relationship is obtained by analyzing the temporal and amplitude correlation of the changes in sensor data of different axes, and is used to associate isolated error sources into a complete causal chain. In Embodiment 1 of this invention, the multidimensional elements for fitting and generating the propagation path specifically include: By analyzing the correlation between the position readings of each motion axis and the actual runout of the tool, the correlation strength and correlation hysteresis value between the motion axis and the tool are determined. Determine the association strength and association hysteresis value between the motion axis and the tool, including: The motion axis position readings and the actual tool runout are time-series combined to obtain the motion axis position reading sequence and the actual tool runout sequence. The sequence of motion axis position readings is combined with the sequence of actual tool runout to obtain sequence pairs. All sequence pairs of different motion axis types and tool types are enumerated. Based on a preset sliding time window, extract the sequence of motion axis position readings and the actual tool yaw quantum sequence; wherein, the preset sliding time window length is determined based on the median of the maximum compensation delay time of the system, and is used to capture the correlation characteristics of the signal over the corresponding time span; The cross-correlation function value sequence is calculated between the motion axis position reading subsequence and the actual tool runout quantum sequence. The motion axis position reading subsequence is used as the input signal, and the actual tool runout quantum sequence is used as the output signal. The cross-correlation function value sequence is a numerical sequence describing the similarity between the two signals at different time offsets (lag or lead). The input signal data segment is a segment of axis position data extracted within a time window of a specific time length. The output signal data segment is a segment of tool runout data extracted within the same time window. By performing discrete cross-correlation calculation on the two data segments and traversing all possible time offsets, the cross-correlation function value sequence is obtained, which is used to determine whether there is a delay or lead. The maximum cross-correlation value of the cross-correlation function value sequence is searched, and the absolute value of the maximum cross-correlation value is defined as the correlation strength. The maximum value of the cross-correlation function value sequence is the maximum correlation value calculated over all time offsets, and its absolute value directly reflects the degree of linear correlation between the two signals at that time scale. The time offset corresponding to the maximum cross-correlation value is defined as the correlation hysteresis value between the motion axis and the tool; where the time offset corresponding to the maximum value represents the amount of time that one signal needs to move relative to another signal in order to achieve the best match, with positive values ​​indicating hysteresis and negative values ​​indicating lead. A short-time Fourier transform is performed on the vibration acceleration data to generate a vibration energy spectrum that varies with time. Specifically, this involves multiplying the vibration acceleration data segments point by point using a windowing function to obtain a windowed vibration data segment. The windowing function is a mathematical function that has a large value in the middle and gradually decays to zero at both ends, such as the Hanning window or the Hamming window. It is used to reduce spectral leakage caused by data truncation and improve frequency resolution accuracy. The windowed vibration data segment is subjected to a Fast Fourier Transform (FFT) operation to transform it from a time domain representation to a frequency domain representation, and an initial frequency spectrum containing complex results is output. The FFT is an efficient algorithm for calculating the Discrete Fourier Transform (DFT). The initial frequency spectrum is an array of complex numbers, each of which corresponds to a frequency component and contains the amplitude and phase information of that component. The square of the modulus of the complex number corresponding to each frequency point in the initial frequency spectrum is calculated, and the calculation result is used as the vibration energy value of that frequency point, thus obtaining a vibration energy spectrum that represents the distribution of vibration energy on the frequency axis; where the vibration energy spectrum is a real number array, with frequency on the horizontal axis and energy value on the vertical axis, used to quantify the energy magnitude of vibration components at different frequencies; By analyzing the correlation between different frequency components of the vibration energy spectrum and the change in the position error of the motion axis, the dominant frequency band is determined; Determine the dominant frequency band, including: The system reads the displacement command sequence issued by the motion axis in real time within the current control cycle and extracts the command acceleration spectrum of the displacement command sequence. Specifically, this includes: performing time differentiation on the displacement command sequence to calculate the instantaneous velocity of the axis within the current sampling cycle; performing first-order difference operation on the instantaneous velocity to obtain the displacement acceleration; and performing a fast Fourier transform on the displacement acceleration to obtain its corresponding command acceleration spectrum. The control cycle of the motion axis refers to the time interval between the controller's detection, calculation, and output of the position, velocity, or torque of the motion axis in a closed-loop adjustment process. The displacement command sequence is a series of position points representing the precise motion trajectory within a very short time (such as several servo cycles), generated by the interpolation algorithm within the CNC system. The displacement command sequence is read in real time by the CNC system interpolator. The instantaneous velocity is a set of data composed of the rate of change of the displacement command over time, reflecting the ideal velocity fluctuation of the axis within the current short time window. It is obtained by calculating the difference between adjacent displacement commands and dividing by the servo control cycle. The displacement acceleration is the rate of change of the velocity command, obtained by calculating the difference between adjacent instantaneous velocity commands. Identify the uneven distribution of frequency peaks in the command acceleration spectrum and determine them as the main motion frequency components. Specifically, this includes: identifying local peak maxima through a spectrum peak search algorithm and sorting them by amplitude, taking the top N (e.g., N=3) local peak maxima as the main motion frequency components; local peak maxima refer to spikes in the spectrum whose amplitude is significantly higher than the surrounding frequencies. Using the calculated main motion frequency components as the center frequency, a symmetrical frequency band analysis window is preset on the vibration energy spectrum. The frequency band analysis window is a frequency range with a certain width. By obtaining the control bandwidth of the servo system, the frequency components corresponding to the historical local peak maxima in the historical command acceleration spectrum are obtained. The difference between the frequency components of every two adjacent local peak maxima is calculated, and the calculation result is recorded as the sample bandwidth. The average of the sample bandwidths of different adjacent local peak maxima is calculated to obtain the desired bandwidth. The control bandwidth and the desired bandwidth are averaged to obtain the bandwidth of the frequency band analysis window. Within the frequency band analysis window, local peak points of vibration energy amplitude in the vibration energy spectrum are identified; the identification of local peak points uses the same spectrum peak search algorithm as described above. The signal-to-noise ratio (SNR) of each local peak point is calculated, and local peak points with an SNR lower than a preset SNR threshold are removed. The SNR is obtained by calculating the ratio of the peak point energy to the background noise energy, which is used to quantify the prominence of the energy bulge, thereby distinguishing between true significant resonance and random fluctuations. The background noise energy is characterized by the median of the energy amplitude of all frequency points within the calculation window. Candidate resonance bands are generated based on the center frequency and bandwidth of local peak points; The theoretical command position data is read in real time. The position reading error is calculated based on the theoretical command position data and the real-time position reading, and the timing is combined to obtain the position reading error signal. Specifically, the command position data refers to the theoretical command position data issued to each axis servo drive in the current control cycle. It is a discrete position point that describes the ideal motion trajectory of each axis, generated by the CNC system after interpolation calculation based on the machining program. It is obtained by accessing the real-time data interface opened inside the CNC system. The center frequency and bandwidth of the candidate resonance band are used to filter the position reading error signal to obtain the resonance band error signal. Specifically, this involves: taking the position reading error signal as an input sequence and filtering the input sequence to obtain the resonance band error signal; wherein, the resonance band error signal is the component of the original error signal that contains the frequency components of the candidate resonance band; and the original error signal is obtained by passing it through a digital bandpass filter centered on the center frequency of the candidate resonance band and with its bandwidth as the passband. The average power of the position reading error signal and the resonance band error signal within the frequency band analysis window is calculated separately to obtain the resonance error power and the total error power, respectively. The resonance error power is a quantitative indicator characterizing the energy intensity of the resonance band error signal; the total error power is a quantitative indicator characterizing the total energy intensity of the entire position reading error signal (including all frequency components). The power is obtained by averaging the squared amplitudes of each point in the signal sequence. The power ratio of the resonance error power to the total error power is calculated to obtain the power proportion of the candidate resonance frequency band under the current operating conditions, which is used as the contribution weight of the resonance to the total error. The power proportion refers to the ratio of the energy of the error signal in the resonance frequency band to the total energy of the entire frequency band. It is obtained through bandpass filtering and power calculation. Candidate resonance frequency bands with contribution weights greater than a preset weight threshold are marked as dominant frequency bands. Specifically, when acquiring the initial operation phase of the machine tool, for multiple different candidate resonance frequency bands, the historical contribution weights at each occurrence are continuously calculated and recorded. The probability density of the historical contribution weights is statistically analyzed, and the probabilities of the top three historical contribution weight intervals are normalized to obtain the weighted weight of the historical contribution weight intervals. The median of the three historical contribution weight intervals is weighted according to the weighted weights, and the calculation result is used as the preset weight threshold. Using correlation strength, correlation hysteresis value, and dominant frequency band as multidimensional factors when generating propagation paths; A propagation path diagram between motion axes is constructed based on multi-dimensional elements; the propagation path diagram depicts the propagation path and dependencies of errors between each motion axis in the form of a directed graph. In Embodiment 1 of the present invention, constructing a propagation path diagram between motion axes based on multi-dimensional elements specifically includes: Each motion axis and end-tool point of the machine tool are defined as a node. Any combination of any two nodes is enumerated to obtain node pairs. Nodes are the basic elements that constitute a directed graph. Each node represents an entity that may contain errors or be affected by errors, such as the X-axis, Y-axis, Z-axis, spindle, and end-tool point. The node list is obtained by enumerating all motion axes of the machine tool involved in the linkage and the final output point. The direction of error propagation between node pairs is determined by the sign of the correlation lag values ​​of the two nodes in the node pair: if the correlation lag value is positive, it means that the error of the first node is ahead of the error of the second node, that is, the error is propagated from the first node to the second node. The correlation strength between the motion axis and the tool is normalized to obtain the normalized correlation strength. The coherence coefficient of the dominant frequency band of the node pair is calculated, and the normalized correlation strength and coherence coefficient are weighted and fused. The result of the weighted fusion is used as the edge weight of the connection between the nodes. The coherence coefficient is an index that measures the linear correlation between two signals in the frequency domain, and its value ranges from [0, 1]. It is obtained by calculating the average value of the coherence function in the frequency domain of the dominant frequency band of the two nodes. When the machine tool is in the initial operation stage, the historical normalized correlation strength and historical coherence coefficient of the nodes are obtained. Weighted calculation is performed using different weight combinations. The standard deviation of the obtained edge weights is calculated, and the set of weights corresponding to the minimum standard deviation is used as the weight of the normalized correlation strength and coherence coefficient. Based on the propagation direction between nodes and the edge weights of the connecting edges, directed edges for node pairs are constructed, and the directed edges of all node pairs are integrated to obtain the propagation path graph. To address the shortcomings of existing machine tool multi-error compensation methods, which neglect the combined effect of mechanical structure vibration and dynamic motion axis, resulting in an incomplete characterization of error joint relationships, this paper quantifies the spatiotemporal characteristics of error propagation by calculating the correlation strength and correlation hysteresis value between the motion axis and the tool. Furthermore, it identifies the dominant frequency band by combining vibration energy spectrum analysis. Then, using the weighted value of normalized correlation strength and frequency band coherence coefficient as edge weights, a directed weighted propagation path diagram characterizing the error propagation direction and intensity between each node (motion axis, tool) is constructed. This achieves the effect of accurately quantifying the dynamic error interaction mechanism between axes and solves the problem of incomplete characterization of error joint relationships. By performing dynamic error propagation analysis on adjacent nodes in the propagation path graph, the node topology sequence is determined; In Embodiment 1 of the present invention, determining the node topology sequence includes: Calculate the in-degree of each node in the propagation path graph, and add all nodes with an in-degree of zero to a queue of nodes to be processed; where the in-degree of a node is the number of directed edges pointing to that node, which is obtained by traversing all edges in the directed graph and counting the number of times they point to each node. Initialize an empty topology sequence, take a node from the queue of nodes to be processed, append it to the end of the topology sequence, and then remove the node and all directed edges originating from the node in the propagation path graph; where the topology sequence is a linear list that is ultimately used to store the node sorting results; the queue of nodes to be processed is a set of nodes that follow the first-in-first-out principle and temporarily store nodes that no longer have predecessor constraints. Update the in-degree value of neighboring nodes, iterate through whether there are any neighboring nodes whose in-degree has become zero, and if so, add the node to the queue of nodes to be processed. Repeat the above steps until the queue of nodes to be processed is empty, and obtain a complete node topology sequence; Based on the aforementioned topological sequence, critical path analysis is performed on the propagation path graph to determine the core error propagation relationship chain. In Embodiment 1 of the present invention, determining the core error propagation chain includes: Identify the starting point of the propagation path graph. Based on the order of the topology sequence, enumerate all paths from the starting point of the propagation path graph to that node, and denot them as sequential topology paths. Here, the starting point is the first node added to the processing node queue, representing a series of initial, independent error sources that are not affected by other error sources. Calculate the cumulative edge weight of each sequential topology path, denoted as the sequential weight. Compare the sequential weights of different sequential topology paths, and record the maximum sequential weight as the earliest propagation start time of the node. The earliest propagation start time is the earliest time when the error effect of a node can begin to take effect. Identify the endpoint in the propagation path diagram, calculate the earliest propagation weight of the endpoint, and record it as the earliest propagation time of the endpoint; where the endpoint is the final node of the entire error propagation process. In CNC machine tools, it can be the comprehensive spatial error of the contact point between the tool and the workpiece, that is, the node corresponding to the actual deflection of the tool measured by the laser displacement sensor. Calculate the cumulative edge weight of each reverse topology path, denoted as the reverse weight, and compare the reverse weights of different reverse topology paths. The latest propagation start time of a node is obtained by calculating the difference between the earliest propagation time of the endpoint and the maximum reverse weight; where the latest propagation start time is the latest time when the error of a node can start without affecting the final total error. Calculate the time difference for each node, which is equal to the difference between its latest start time and earliest start time. Select all nodes with zero time difference and connect them in the order of their topological sequence to obtain the core error propagation chain. The core error propagation chain determines the minimum possible value of the final point error. By analyzing the degree of change in error propagation in the core error propagation chain, the key error source axis is identified; among them, the key error source axis refers to the motion axis whose error contributes the most to the final machining accuracy of the workpiece. Identify the key error source axes, including: In the core error propagation chain, all direct upstream nodes of each node are identified, and the error propagation coefficient is calculated. Among them, the error propagation gain is a quantified value, which represents the amount of error change in the corresponding node caused by a unit error change in the upstream node. Its significance lies in clarifying the source and intensity of the "external input error" that needs to be deducted from the total error of the node. By obtaining the historical changes in upstream error and the historical changes in error of the corresponding node, a linear fit is performed using the least squares method to obtain a mathematical expression, and the intercept term is used as the error propagation coefficient. Obtain the error measurement value of the upstream node and multiply it by the error propagation coefficient to obtain the predicted impact value of the upstream node on the downstream node; sum the predicted impact values ​​of all directly upstream nodes algebraically to obtain the total upstream propagation error of the node; obtain the actual total observation error of the node and calculate the difference with the total upstream propagation error to obtain the node local error; combine the node local errors in a time series to obtain the local error data sequence. Based on the topological structure of the core error propagation chain, enumerate the paths from each node to the endpoint, which are used as error propagation paths. The product of the error propagation coefficients of different nodes in the error propagation path is calculated as the path amplification coefficient of the starting node of the error propagation path. The significance of the path amplification coefficient lies in quantifying the degree to which the error of the node is amplified or reduced during the propagation process, reflecting its structural importance in the chain. The statistical energy value of each node is weighted and fused with the corresponding path amplification coefficient. The weighted fusion result is normalized to generate the error contribution index of the node. When the machine tool is in the initial operation stage, the historical statistical energy value and path amplification coefficient of the node are obtained. Weighted calculation is performed using different weight combinations. The standard deviation of the obtained error contribution index is calculated. The set of weights corresponding to the minimum standard deviation is used as the weight of the statistical energy value and the path amplification coefficient. Nodes whose error contribution index exceeds the preset dynamic threshold are marked as key nodes, and the motion axis corresponding to the key node is marked as the key error source axis. The preset dynamic threshold is obtained by normalizing the probability density of the historical error contribution index by statistically analyzing the probability density of the historical error contribution index, and obtaining the weighted weight of the historical contribution weight interval. The median of the three error contribution index intervals is then calculated based on the weighted weight. To address the problem of the transmission effect between errors on different axes in existing machine tool multi-error compensation, making it difficult to dynamically locate key error sources, this paper identifies the core error transmission chain that has a decisive impact on the final accuracy through topology sorting and critical path analysis. Finally, by calculating the local error of each node in the chain and its contribution to the final accuracy, precise and dynamic locking of the key error source axis is achieved. This solves the problem of inaccurate compensation targets caused by ignoring the characteristics of error transmission under multi-axis linkage, enabling compensation resources to be concentrated on the key links that have the greatest impact on machining accuracy. By analyzing the changing trend of the key error source axis in the error signal, an adaptive pre-compensation command sequence is generated to perform real-time compensation control on the key error source axis. Generate an adaptive pre-compensation instruction sequence, including: Extract the resonant band error signal corresponding to the dominant frequency band, and construct an error prediction model by analyzing the changing trend of the resonant band error signal; Constructing an error prediction model includes: Local extrema detection is performed on the resonant frequency band error signal to identify all peak and trough position sequences in the signal waveform. Local extrema refer to discrete time points where the signal reaches a local maximum (peak) or local minimum (trough). They are identified by comparing the numerical values ​​of each sampling point with its adjacent points before and after it. Based on the peak and trough position sequence, the upper and lower envelopes of the resonance error signal are constructed respectively, and their mean values ​​are calculated to obtain the instantaneous center line of the signal; where the upper envelope is a smooth curve connecting all peak points, and the lower envelope is a smooth curve connecting all trough points; the extreme point sequence is obtained by interpolating using a cubic spline interpolation algorithm. Calculate the time interval sequence between adjacent wave crests, and perform a reciprocal operation on the time interval sequence to obtain the instantaneous frequency change sequence of the resonance error signal; The instantaneous frequency change sequence is piecewise linearly approximated, and the slope and intercept values ​​of each fitted line are identified and recorded. By using a sliding time window, the least squares method is used to perform linear fitting on the instantaneous frequency change data points within each window. Statistical distribution analysis is performed on the instantaneous frequency change sequence to calculate its mean and standard deviation within the sliding time window, forming a set of frequency stability indices; among which, the frequency stability indices are statistical quantities used to characterize the instantaneous frequency fluctuation characteristics. Within each sliding time window, the absolute value of the slope of the set of centerline trend lines is extracted as a trend strength indicator, while the mean and standard deviation within the sliding time window are used to calculate the coefficient of variation as a frequency volatility indicator. Using the trend strength index as the horizontal axis and the frequency fluctuation index as the vertical axis, all data points within the sliding time window are plotted in a two-dimensional feature space to form a trend-frequency feature scatter plot. Density-based spatial clustering analysis is performed on the distribution of data points in the trend-frequency feature scatter plot to identify densely distributed areas of data points. Each dense area is marked as a candidate pattern cluster. The mean of all trend strength indices and the mean of frequency fluctuation indices within the candidate feature scatter plot cluster are calculated to obtain the error data development pattern of the candidate pattern cluster. Based on historical resonance frequency band error signals, the pattern change rules of error data development patterns are extracted. For each error data development pattern, the error data development patterns of the subsequent k sliding time windows are extracted, and the pattern rule chain of the corresponding error data development pattern is constructed. The pattern rule chains of different error data development patterns are combined to obtain the pattern rule library, which is used as the error prediction model. Based on the error prediction model, the prediction error sequence of the key error source axis within the dynamic error prediction window is predicted by rolling prediction; specifically, it includes extracting the error data development pattern from the end segment of the current resonant frequency band error signal in real time, extracting the corresponding pattern rule chain from the pattern rule base, simulating the error data of the current resonant frequency band error signal in the future k sliding time window based on the pattern rule chain, and generating the prediction error sequence. Based on the prediction error sequence, an adaptive pre-compensation instruction sequence is generated using a compensator. To address the shortcomings of existing machine tool error compensation, such as a lack of foresight and compensation commands lagging behind actual error changes, an error prediction model is constructed to predict the error sequence of key error source axes within a future window. Based on this, a forward-looking compensation command sequence is generated, achieving real-time pre-compensation of errors. This optimizes the timeliness of compensation and control accuracy, and solves the problem of decreased machining accuracy caused by response delay.

[0022] Example 2: This application provides a real-time compensation control system for multi-axis linkage error of CNC machine tools, applied to the real-time compensation control method for multi-axis linkage error of CNC machine tools provided in Example 1, including: The data acquisition module synchronously acquires multi-source sensor data streams of each motion axis of the machine tool during the linkage process; the data streams include real-time position readings of the grating ruler, vibration acceleration data installed on the spindle box, and actual tool runout. The error propagation analysis module analyzes the dynamic error propagation relationship between axes based on the multi-source sensor data stream and constructs an error propagation relationship chain. The critical error source localization module identifies the critical error source axis by analyzing the degree of change in error propagation in the core error propagation chain. The adaptive compensation module analyzes the changing trend of the key error source axis in the error signal, generates an adaptive pre-compensation command sequence, and performs real-time compensation control on the key error source axis.

[0023] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0024] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0025] All formulas in this manual are dimensionless and calculated numerically. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0026] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for real-time compensation control of multi-axis linkage error in CNC machine tools, characterized in that, include: Simultaneously acquire multi-source sensor data streams of each motion axis of the machine tool during the linkage process; The data stream includes real-time position readings of the grating ruler, vibration acceleration data mounted on the spindle box, and actual tool runout. Based on the correlation between the multi-source sensor data stream and the energy distribution, a multi-dimensional element of the propagation path is fitted and generated, and a propagation path diagram between motion axes is constructed based on the multi-dimensional element. By performing dynamic error propagation analysis on adjacent nodes in the propagation path graph, the node topology sequence is determined; Based on the aforementioned topological sequence, critical path analysis is performed on the propagation path graph to determine the core error propagation relationship chain. By analyzing the degree of change in error propagation in the core error propagation chain, the key error source axis is identified. By analyzing the changing trend of the key error source axis in the error signal, an adaptive pre-compensation command sequence is generated to perform real-time compensation control on the key error source axis.

2. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 1, characterized in that, The multidimensional elements of the fitted propagation path include: By analyzing the correlation between the position readings of each motion axis and the actual runout of the tool, the correlation strength and correlation hysteresis value between the motion axis and the tool are determined. A short-time Fourier transform is performed on the vibration acceleration data to generate a vibration energy spectrum that varies with time. By analyzing the correlation between different frequency components of the vibration energy spectrum and the change in the position error of the motion axis, the dominant frequency band is determined; The correlation strength, correlation lag value, and dominant frequency band are used as multidimensional factors when generating propagation paths.

3. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 1, characterized in that, The construction of the propagation path diagram between motion axes based on multi-dimensional elements includes: Define each motion axis of the machine tool and the terminal tool point as a node, and enumerate any two node combinations to obtain node pairs; The direction of error propagation between node pairs is determined by the sign of the associated hysteresis values ​​of the two nodes in the node pair. The correlation strength between the motion axis and the tool is normalized to obtain the normalized correlation strength. The coherence coefficient of the dominant frequency band in the node pair is calculated, and the normalized correlation strength and coherence coefficient are weighted and fused. The result of the weighted fusion is used as the edge weight of the connection edge between the nodes. Based on the propagation direction between nodes and the edge weights of the connecting edges, directed edges for node pairs are constructed, and the directed edges of all node pairs are integrated to obtain the propagation path graph.

4. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 3, characterized in that, The determination of the node topology sequence includes: Calculate the in-degree of each node in the propagation path graph, and add all nodes with an in-degree of zero to a queue of nodes to be processed. Initialize an empty topology sequence, take a node from the queue of nodes to be processed, append it to the end of the topology sequence, and then remove the node and all directed edges originating from the node in the propagation path graph. Update the in-degree value of neighboring nodes, iterate through whether there are any neighboring nodes whose in-degree has become zero, and if so, add the node to the queue of nodes to be processed. Repeat the above steps until the queue of nodes to be processed is empty, and obtain a complete node topology sequence.

5. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 4, characterized in that, The determination of the core error propagation chain also includes: Identify the starting point of the propagation path graph, and according to the order of the topological sequence, enumerate all paths from the starting point of the propagation path graph to that node, and denot them as sequential topological paths; Calculate the cumulative edge weight of each sequential topology path, denoted as the sequential weight, compare the sequential weights of different sequential topology paths, and record the maximum sequential weight as the earliest start propagation time of the node. Identify the endpoint in the propagation path graph, calculate the earliest propagation weight of the endpoint, and record it as the earliest propagation time of the endpoint; Enumerate all paths from the endpoint of the propagation path graph to the node in reverse order of the topological sequence; these are denoted as reverse topological paths. Calculate the cumulative edge weight of each reverse topology path, denoted as the reverse weight, and compare the reverse weights of different reverse topology paths. The latest start time of propagation of a node is obtained by calculating the difference between the earliest propagation time of the endpoint and the maximum reverse weight. The node time difference is calculated by taking the difference between the latest start time of propagation and the earliest start time of propagation for each node. Nodes with zero time difference are marked as target nodes, and the target nodes are connected in the order of their positions in the topology sequence to obtain the core error propagation chain.

6. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 5, characterized in that, The determination of the key error source axis includes: In the core error propagation chain, identify all direct upstream nodes of each node and calculate the error propagation coefficient; Obtain the error measurement value of the upstream node and multiply it by the error propagation coefficient to obtain the predicted impact value of the upstream node on the downstream node; The total upstream propagation error of the nodes is obtained by algebraically summing the predicted impact values ​​of all directly upstream nodes. The actual measurement error of the node is obtained and the difference is calculated with the total upstream propagation error to obtain the node local error. The node local errors are then combined in time series to obtain the local error data sequence. Based on the topological structure of the core error propagation chain, enumerate the paths from each node to the endpoint, which are used as error propagation paths. Calculate the product of the error propagation coefficients of different nodes in the error propagation path, and use it as the path amplification coefficient of the starting node of the error propagation path. Calculate the statistical energy value of the local error data sequence of each node, and then perform weighted fusion of the statistical energy value and the corresponding path amplification coefficient; normalize the result of the weighted fusion to generate the error contribution index of the node. Nodes whose error contribution index exceeds the preset dynamic threshold are marked as key nodes, and the motion axes corresponding to the key nodes are marked as candidate key error source axes.

7. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 2, characterized in that, Determining the correlation strength and correlation hysteresis value between the motion axis and the tool includes: The motion axis position readings and the actual tool runout are time-series combined to obtain the motion axis position reading sequence and the actual tool runout sequence. The sequence of motion axis position readings is combined with the sequence of actual tool runout to obtain sequence pairs. All sequence pairs of different motion axis types and tool types are enumerated. Based on the preset sliding time window, extract the motion axis position reading subsequence and the actual tool deflection quantum sequence for each sequence pair; Calculate the cross-correlation function sequence between the motion axis position reading subsequence and the actual tool runout quantum sequence; Search for the maximum cross-correlation value in the sequence of cross-correlation function values, and define the absolute value of the maximum cross-correlation value as the correlation strength; The time offset corresponding to the maximum cross-correlation value is defined as the correlation hysteresis value between the motion axis and the tool.

8. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 3, characterized in that, The determination of the dominant frequency band includes: The displacement command sequence issued by the motion axis in the current control cycle is read in real time, and the command acceleration spectrum of the displacement command sequence is extracted. Identify the non-uniform regions of frequency peak distribution in the command acceleration spectrum and determine them as the main motion frequency components; Using the calculated main motion frequency components as the center frequency, a symmetrical frequency band analysis window is preset on the vibration energy spectrum diagram; Within the defined frequency band analysis window, identify the local peak points of vibration energy amplitude in the vibration energy spectrum. Calculate the signal-to-noise ratio (SNR) of each local peak point, and remove local peak points with an SNR lower than a preset SNR threshold, marking them as regions with uneven energy distribution. Candidate resonance bands are generated based on the center frequency and bandwidth of local peak points; The theoretical command position data is read in real time. The position reading error is calculated based on the theoretical command position data and the real-time position reading, and the time sequence is combined to obtain the position reading error signal. The center frequency and bandwidth of the candidate resonance band are filtered with the position reading error signal to obtain the resonance band error signal; Calculate the average power of the position reading error signal and the resonance band error signal within the frequency band analysis window, and obtain the resonance error power and the total error power, respectively. The ratio of the resonance error power to the total error power is calculated to obtain the power proportion of the candidate resonance frequency band under the current operating conditions, which is used as the contribution weight of the resonance to the total error. Candidate resonance frequency bands whose contribution weight is greater than a preset weight threshold are marked as dominant frequency bands.

9. The real-time compensation control method for multi-axis linkage error of CNC machine tools according to claim 1, characterized in that, The generation of the adaptive pre-compensation instruction sequence includes: Extract the resonant band error signal corresponding to the dominant frequency band, and construct an error prediction model by analyzing the changing trend of the resonant band error signal; Based on the error prediction model, the prediction error sequence of the key error source axis within the dynamic error prediction window is predicted by rolling prediction. Based on the prediction error sequence, an adaptive pre-compensation command sequence is generated using a compensator.

10. A real-time compensation control system for multi-axis linkage error of CNC machine tools, applied to the real-time compensation control method for multi-axis linkage error of CNC machine tools as described in any one of claims 1 to 9, characterized in that, include: The data acquisition module synchronously acquires multi-source sensor data streams from each motion axis of the machine tool during the linkage process; The data stream includes real-time position readings of the grating ruler, vibration acceleration data mounted on the spindle box, and actual tool runout. The error propagation analysis module analyzes the dynamic error propagation relationship between axes based on the multi-source sensor data stream and constructs an error propagation relationship chain. The critical error source localization module identifies the critical error source axis by analyzing the degree of change in error propagation in the core error propagation chain. The adaptive compensation module analyzes the changing trend of the key error source axis in the error signal, generates an adaptive pre-compensation command sequence, and performs real-time compensation control on the key error source axis.