Method for calculating joint speed of numerical control machine tool

By synchronizing and fusing multi-sensor data, combined with Kalman filtering and weighted average fusion, the joint speed is dynamically adjusted, which solves the problems of timing deviation and insufficient anti-interference ability of CNC machine tools in high-speed machining, and improves machining efficiency and tool life.

CN121657576APending Publication Date: 2026-03-13CHANGZHOU SHANGPAN INTELLIGENT EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing CNC machine tools lack hardware synchronization mechanisms during high-speed machining, resulting in timing deviations at the millisecond level, poor anti-interference capabilities, and static weight fusion failing to dynamically respond to changes in sensor performance, thus increasing the decision error rate.

Method used

The method employs multi-sensor data acquisition, data preprocessing and synchronization, feature extraction and fusion, speed calculation and optimization model, online learning and real-time optimization, joint replaceability adaptation, and performance evaluation and feedback. Through hardware synchronization and software alignment, combined with Kalman filtering and weighted average fusion formula, the fusion weights are dynamically adjusted to achieve real-time optimization of joint speed.

Benefits of technology

It achieves high-precision synchronization of multi-source sensor data, reduces speed fluctuations, improves machining efficiency, extends tool life, and reduces unplanned downtime losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121657576A_ABST
    Figure CN121657576A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical control machine tool joint speed calculation method, which belongs to the technical field of numerical control machine tools and comprises the steps of S1, multi-sensor data acquisition, S2, data preprocessing and synchronization, S3, feature extraction and fusion, S4, speed calculation and model optimization, S5, online learning and real-time optimization, S6, joint replaceability adaptation and S7, performance evaluation and feedback. On the basis of achieving joint speed calculation, joints can be replaced, and multi-sensor information fusion and online learning optimization can be carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool technology, and more specifically, to a method for calculating the joint speed of a CNC machine tool. Background Technology

[0002] CNC machine tools, short for numerical control machine tools, are automated machine tools equipped with a program control system. This control system can logically process programs with control codes or other symbolic instructions, decode them, represent them with coded numbers, and input them into the CNC device via an information carrier. After processing, the CNC device sends out various control signals to control the machine tool's movements, automatically machining parts according to the shape and dimensions required by the drawings.

[0003] Traditional methods rely on single sensor or asynchronously acquired multi-sensor data, lacking hardware synchronization mechanisms, resulting in timing deviations at the millisecond level, which cannot meet the needs of high-speed processing. Wireless transmission uses a common protocol, which has poor anti-interference capabilities and increases the data packet loss rate. At the same time, existing technologies mostly use static weight fusion, which cannot dynamically respond to changes in sensor performance and cannot resolve semantic conflicts of multi-source heterogeneous data, thus increasing the decision error rate. Summary of the Invention

[0004] 1. Technical problems to be solved To address the problems existing in the prior art, the purpose of this invention is to provide a method for calculating the joint speed of CNC machine tools. In addition to calculating the joint speed, this invention also allows for the replacement of joints and enables multi-sensor information fusion and online learning optimization.

[0005] 2. Technical Solution

[0006] To solve the above problems, the present invention adopts the following technical solution: A method for calculating the joint speed of a CNC machine tool includes: S1. Multi-sensor data acquisition; S2, Data Preprocessing and Synchronization; S3. Feature extraction and fusion; S4. Speed ​​Calculation and Optimization Model; S5, online learning and real-time optimization; S6, Joint replaceability adaptation; S7. Performance Evaluation and Feedback.

[0007] As a preferred embodiment of the present invention, step S1, multi-sensor data acquisition, includes: Sensor selection: Select high-precision and high-stability sensors based on the vibration, temperature and current monitoring targets, including vibration sensors, IMU modules and temperature sensors; Deployment location: Install the sensor on the side of the spindle housing, near the motor, and on the surface of the machine tool's moving path to ensure coverage of multi-dimensional information and avoid interference; Network topology: The sensor is connected using a WSN wireless self-organizing network to ensure reliable data transmission.

[0008] Hardware synchronization: FPGA trigger signals are used to ensure that all sensors collect data at the same time. Multiple synchronous clocks are generated by frequency dividers to drive different sensors respectively. Software synchronization: Timestamp alignment is performed on asynchronously collected data, and the data is adjusted to a unified time base through interpolation or extrapolation. Data alignment is achieved using time synchronization tools within the ROS framework. Real-time data stream acquisition: Continuously acquire raw data streams through an interface.

[0009] As a preferred embodiment of the present invention, step S2, data preprocessing and synchronization, includes: Filtering: Median filtering and Kalman filtering are used to eliminate high-frequency noise; Outlier removal: Excluding outlier data through standard deviation analysis or thresholding. Data standardization: Normalizing multi-source data to eliminate differences in units; Hardware synchronization: A high-precision clock source is used to trigger all sensors to collect data synchronously, and a synchronization pulse signal is generated by the FPGA to control the sensors to sample synchronously; Software synchronization: Using the main sensor as a reference, linear interpolation is performed on the data from other sensors to align with the time axis; Dynamic time warping: handles non-uniformly sampled data and achieves time alignment through sliding window interpolation; Coordinate system transformation: Convert the data from various sensors to the unified coordinate system of the machine tool; Spatial registration: For visual or lidar data, a feature matching algorithm is used to achieve spatial alignment with the mechanical structure.

[0010] As a preferred embodiment of the present invention, the formula used in step S2, data preprocessing and synchronization, includes: The minimum-maximum normalization formula is: Where S is the raw sensor data, Let be the minimum and maximum values ​​in the data sample, respectively, and let a and b be the target range, with values ​​ranging from [0,1]. The normalized numerical value is dimensionless; The Z-Score standardization formula is: Where X represents the raw data, and the unit of X is the same as the sensor unit. The mean of the data is in the same unit as X. It is the standard deviation and has the same unit as X; The time synchronization interpolation formula is: ,in The timestamp is for the main sensor and is in seconds. The timestamp is for the sensor and the unit is seconds. For the sensor in The measured value at time; The weighted average fusion formula is: ,in For the data of the i-th sensor, The weighting coefficients are dimensionless and satisfy the following conditions: , and Same unit; The dynamic normalization formula is Where V is the actual sensor voltage value. The maximum / minimum value within the current operating cycle, expressed in volts.

[0011] As a preferred embodiment of the present invention, step S3, feature extraction and fusion, includes: Temporal feature extraction: Calculate the mean, variance, peak value, and RMS of the sensor data; Frequency domain feature extraction: Extracting spectral features using FFT; Spatial feature extraction: Extracting edge, texture, and point cloud features from visual or LiDAR data; Deep learning features: CNNs are used to automatically learn high-order features, or LSTMs are used to capture temporal dependencies; Feature selection and dimensionality reduction: Based on statistical indicators, low-correlation features are eliminated, high-dimensional features are mapped to low-dimensional space through PCA or LDA, the main information is retained, and important features are selected using decision trees or L1 regularization models. Data-level fusion: Concatenate raw data or pre-processed feature vectors from different sensors into a unified input, and assign weights to redundant sensor data according to reliability. Feature aggregation: The feature vectors from different sensors are concatenated and input into the model. The weights of different features are dynamically allocated through CBA to highlight key information. Cross-modal alignment: mapping visual features and mechanical features to the same semantic space; Decision-level fusion: Each sensor independently classifies the data and then votes to determine the final result. For scenarios with high uncertainty, the joint posterior distribution is calculated using prior probabilities and likelihood functions. DS evidence theory: improves robustness by merging conflicting evidence through a trust function and a likelihood function; Dynamic weight adjustment: Adjust the fusion weights based on the real-time performance of the sensors; Online learning optimization: Dynamically optimize the fusion strategy through reinforcement learning.

[0012] As a preferred embodiment of the present invention, the formula used in step S3, feature extraction and fusion, includes: The formula for time-domain feature extraction is: , where xi is the vibration value assigned to the i-th sampling point, N is the number of sampling points, normalization processing: xi needs to be Z-Score standardized before numerical input; The formula for frequency domain feature extraction is: ,in The amplitude of the spectrum after FFT transformation, in m / s 2 / Hz, and The frequency band is measured in Hz. It is the frequency band energy and the unit is (m / s) 2 ) 2 Normalization: Energy value divided by total energy Obtain the proportion; The formula for spatial feature extraction is: ,in All values ​​are eigenvalues ​​of the point cloud covariance matrix, and the unit is mm. 2 The point cloud coordinates are unified to millimeters; The Kalman filter fusion formula is as follows: ,in For the observed values, For Kalman gain, the observation noise covariance matrix R needs to be standardized; The weighted formula for attention mechanism is: , ,in For feature importance scoring, Softmax ensures ; The principal component analysis dimensionality reduction formula is Y=XW, where X is the original feature matrix and W is the eigenvector matrix. Dimension processing: the input X needs to be Z-score standardized.

[0013] As a preferred embodiment of the present invention, the speed calculation and optimization model in step S4 includes: Model import and path generation: Import the geometric model of the surface to be processed into the CAM software, calculate the motion path of each axis, and define the main axis; Path segmentation: The spindle path is divided into three stages: acceleration, constant speed, and deceleration, which correspond to the processes of acceleration start-up, stable machining, and deceleration stop, respectively. Jet control: Jet is defined using a sine trigonometric function. Acceleration is obtained by integration. and speed This ensures smooth speed changes; Time allocation optimization: based on path length S and target speed v m Calculate the duration of each stage: acceleration T1, constant speed T2, and deceleration T3, and constrain them to be integer multiples of the interpolation period T to match the timing of the control system. Dynamic adjustment: If the path is short, the acceleration can be approximated by increasing the speed change time, sacrificing some accuracy in exchange for processing efficiency and stability; Spindle speed mapping: Based on the spindle speed curve, the acceleration, velocity, and position of other axes are calculated using an interpolation algorithm to ensure synchronous motion of multiple axes; Kinematic model: based on maximum acceleration a max and speed v max Calculate acceleration distance and average speed distance Dynamically allocate movement amounts at each stage.

[0014] As a preferred embodiment of the present invention, step S5, online learning and real-time optimization, includes: Online learning: The stochastic gradient descent algorithm is used for online learning, and model parameters are updated in real time. The learning rate is dynamically adjusted using the following formula: ; Sparse online learning: Introducing L1 regularization to promote feature selection and improve computational efficiency; Cutting parameter optimization: Optimal control commands are generated by fusing multi-sensor data through Kalman filtering; Multi-axis collaborative control: Synchronizes the motion of each axis through interpolation algorithms to ensure time alignment accuracy down to the microsecond level; Knowledge base updates: Employing a continuous learning framework, updates are performed through task sequences T1, T2, ..., T... N Accumulate knowledge gradually to avoid catastrophic forgetting; Feedback loop: Processed data is fed back to the model in real time, performance is evaluated through an online validation set, and model retraining is triggered.

[0015] As a preferred embodiment of the present invention, step S6, joint replaceability adaptation, includes: Joint disassembly and installation preparation: Turn off the machine tool power, use an anti-static wrist strap to avoid circuit damage, clean the joint connection parts to prevent impurities from entering, loosen the fixing screws, disconnect the connecting wires, and check the tools and spare parts; Mechanical calibration: Adjust the relative position of the new joint and the main unit. The relative position includes the tool magazine and the tool changing position of the robot arm. Check the levelness with a precision level to ensure that the geometric accuracy is within the tolerance range. Grind and repair the guide rail and lead screw to restore the surface flatness. Electrical Connections: When rewiring, tighten the communication cable and verify the stability of the 48V power supply and grounding. Update the servo gain and backlash compensation parameters to match the new joint dynamics.

[0016] Dynamic accuracy calibration and testing: Perform machine tool homing operation, check the motor encoder zero mark for semi-closed-loop system, and calibrate the grating ruler for full closed-loop system to avoid pitch error. Set the workpiece coordinate system with G54 command and determine the origin offset value through trial cutting method. Dynamic performance verification: Run the test program to test the motion of each axis, spindle speed and tool change action, monitor the vibration spectrum and tool path tracking error, use a laser interferometer to detect the positioning accuracy, and use a ball bar to analyze the roundness error to ensure stable dynamic response; Software and control system adaptation: Re-enter the tool parameters in the CNC system and update the pitch compensation table to eliminate accumulated errors. Adjust the logic conditions in the PLC program to avoid triggering alarms due to unmet constraints. Intelligent optimization: Based on an online learning model, cutting parameters are dynamically adjusted, and joint control commands are optimized in real time by integrating data from multiple sensors.

[0017] As a preferred embodiment of the present invention, step S7, performance evaluation and feedback, includes: Static accuracy test: The positioning error is calculated by the deviation between the command value and the actual displacement value. The same program is run repeatedly to statistically analyze the consistency of continuous machining and measure the difference between the theoretical and actual angles of the rotary table. Dynamic performance testing: Tests the actual speed under the G01 command to evaluate high-speed response capability; Dynamic error monitoring: Analyzing roundness error during high-speed motion using a ballbar. Spindle performance: Verify stability within the speed range and under load, and monitor the vibration spectrum; Automatic tool change test: Under full load conditions, test the tool change time and tool number accuracy, and check the reliability of the robot arm in grasping tool holders of different sizes; Limit protection test: Verify whether the soft / hard limit is triggered in a timely manner; Machining accuracy assessment: Compare the workpiece dimensions before and after machining, and calculate whether the deviation is within the tolerance; Fault mode identification: Statistical analysis of processing error distribution, identification of systematic deviations, and establishment of fault prediction models using sensor data.

[0018] Real-time adjustment: Fine-tune parameters based on test results and adjust fusion weights based on sensor confidence. Continuous learning: Update the digital twin model, simulate the processing effect under new parameters, and use flexible weights to solidify and protect key parameters to prevent the model from forgetting them; Report generation: Record test data, adjustment measures and optimization effects, and update technical documents.

[0019] 3. Beneficial effects

[0020] Compared with the prior art, the advantages of this invention are: (1) This invention achieves multimodal data collaborative optimization, which realizes that after the vibration, temperature, current and other multi-source sensor data are synchronized by hardware and aligned by software, noise is eliminated by Kalman filtering and weighted average fusion formula, so that the data synchronization error is controlled at the microsecond level. In the feature extraction stage, time domain, frequency domain and spatial features are combined, and PCA dimensionality reduction and DS evidence theory are used to resolve conflicting data and reduce feature fusion error. Based on the S-shaped acceleration and deceleration curve and homogeneous polynomial interpolation algorithm, the duration of the three stages of acceleration, constant speed and deceleration is dynamically allocated to ensure that the acceleration is continuous and without impact and reduce speed fluctuation. (2) This invention shortens calibration time through intelligent maintenance and scalability, replaceable joints are calibrated by laser interferometer and verified by digital twin, continuous learning framework avoids model forgetting, improves the learning efficiency of new tasks, online learning model adjusts cutting parameters in real time, adapts to tool wear and material changes, improves processing efficiency, extends tool life, and reduces unplanned downtime losses. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the steps of a method for calculating the joint speed of a CNC machine tool according to the present invention. Detailed Implementation

[0022] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0023] Example:

[0024] Please see Figure 1 A method for calculating the joint speed of a CNC machine tool, comprising: S1, multi-sensor data acquisition; S2, Data Preprocessing and Synchronization; S3. Feature extraction and fusion; S4. Speed ​​Calculation and Optimization Model; S5, online learning and real-time optimization; S6, Joint replaceability adaptation; S7. Performance Evaluation and Feedback.

[0025] In a specific embodiment of the present invention, multimodal data collaborative optimization is achieved. After hardware synchronization and software alignment of multi-source sensor data such as vibration, temperature, and current, noise is eliminated through Kalman filtering and weighted average fusion formula, keeping the data synchronization error at the microsecond level. In the feature extraction stage, time domain, frequency domain, and spatial features are combined, and PCA dimensionality reduction and DS evidence theory are used to resolve conflicting data, reducing feature fusion error. Based on the S-shaped acceleration and deceleration curve and homogeneous polynomial interpolation algorithm, the duration of the three stages of acceleration, constant speed, and deceleration is dynamically allocated to ensure continuous acceleration without impact and reduce speed fluctuations. Through intelligent maintenance and scalability, joints can be replaced and adapted through laser interferometer calibration and digital twin verification, shortening calibration time. The continuous learning framework avoids model forgetting and improves the learning efficiency of new tasks. The online learning model adjusts cutting parameters in real time to adapt to tool wear and material changes, improving processing efficiency, extending tool life, and reducing unplanned downtime losses.

[0026] Specifically, step S1, multi-sensor data acquisition, includes: Sensor selection: Select high-precision and high-stability sensors based on the vibration, temperature and current monitoring targets, including vibration sensors, IMU modules and temperature sensors; Deployment location: Install the sensor on the side of the spindle housing, near the motor, and on the surface of the machine tool's moving path to ensure coverage of multi-dimensional information and avoid interference; Network topology: The sensor is connected using a WSN wireless self-organizing network to ensure reliable data transmission.

[0027] Hardware synchronization: FPGA field-programmable gate array trigger signals are used to ensure that all sensors collect data at the same time. Multiple synchronous clocks are generated by frequency divider to drive different sensors respectively. Software synchronization: Timestamp alignment is performed on asynchronously collected data, and the data is adjusted to a unified time base through interpolation or extrapolation. Data alignment is achieved using time synchronization tools within the ROS open-source meta-operating system framework. Real-time data stream acquisition: Continuously acquire raw data streams through an interface.

[0028] In a specific embodiment of the present invention, vibration sensors, IMU inertial measurement modules, and temperature sensors cover the spindle housing and key parts of the motor. Data is synchronized through FPGA hardware synchronization and ROS software synchronization, and WSN wireless networking ensures transmission reliability, eliminates timing deviations, and achieves data synchronization accuracy at the microsecond level, providing highly consistent input for subsequent fusion.

[0029] Specifically, step S2, data preprocessing and synchronization, includes: Filtering: Median filtering and Kalman filtering are used to eliminate high-frequency noise; Outlier removal: Excluding outlier data through standard deviation analysis or thresholding. Data standardization: Normalizing multi-source data to eliminate differences in units; Hardware synchronization: A high-precision clock source is used to trigger all sensors to collect data synchronously, and a synchronization pulse signal is generated by the FPGA to control the sensors to sample synchronously; Software synchronization: Using the main sensor as a reference, linear interpolation is performed on the data from other sensors to align with the time axis; Dynamic time warping: handles non-uniformly sampled data and achieves time alignment through sliding window interpolation; Coordinate system transformation: Convert the data from various sensors to the unified coordinate system of the machine tool; Spatial registration: For visual or lidar data, a feature matching algorithm is used to achieve spatial alignment with the mechanical structure.

[0030] In a specific embodiment of the present invention, median filtering and Kalman filtering are used for noise reduction, Z-Score normalization is used to eliminate dimensional differences, FPGA-triggered synchronous sampling is used, and dynamic time warping is used to process non-uniform data, thereby improving noise suppression capability and reducing coordinate system transformation errors.

[0031] Specifically, the formulas used in step S2, data preprocessing and synchronization, include: The minimum-maximum normalization formula is: Where S is the raw sensor data, Let be the minimum and maximum values ​​in the data sample, respectively, and let a and b be the target range, with values ​​ranging from [0,1]. The normalized numerical value is dimensionless; The Z-Score standardization formula is: Where X represents the raw data, and the unit of X is the same as the sensor unit. The mean of the data is in the same unit as X. It is the standard deviation and has the same unit as X; The time synchronization interpolation formula is: ,in The timestamp is for the main sensor and is in seconds. The timestamp is for the sensor and the unit is seconds. For the sensor in The measured value at time; The weighted average fusion formula is: ,in For the data of the i-th sensor, The weighting coefficients are dimensionless and satisfy the following conditions: , and Same unit; The dynamic normalization formula is Where V is the actual sensor voltage value. The maximum / minimum value within the current operating cycle, expressed in volts.

[0032] In a specific embodiment of the present invention, the minimum and maximum normalized compressed data range, the weighted average fusion of multi-source data, the dynamic normalization to adapt to sensor drift, the avoidance of numerical overflow, and the reduction of feature fusion error are all achieved.

[0033] Specifically, step S3, feature extraction and fusion, includes: Temporal feature extraction: Calculate the mean, variance, peak value, and root mean square (RMS) of the sensor data; Frequency domain feature extraction: Extracting spectral features using FFT; Spatial feature extraction: Extracting edge, texture, and point cloud features from visual or LiDAR data; Deep learning features: Utilize CNN convolutional neural networks to automatically learn high-order features, or LSTM long short-term memory networks to capture temporal dependencies; Feature selection and dimensionality reduction: Based on statistical indicators, low-correlation features are eliminated, high-dimensional features are mapped to low-dimensional space through PCA or LDA, the main information is retained, and important features are selected using decision trees or L1 regularization models. Data-level fusion: Concatenate raw data or pre-processed feature vectors from different sensors into a unified input, and assign weights to redundant sensor data according to reliability. Feature aggregation: The feature vectors of different sensors are concatenated and input into the model. The weights of different features are dynamically allocated through CBA cost-benefit analysis to highlight key information. Cross-modal alignment: mapping visual features and mechanical features to the same semantic space; Decision-level fusion: Each sensor independently classifies the data and then votes to determine the final result. For scenarios with high uncertainty, the joint posterior distribution is calculated using prior probabilities and likelihood functions. DS evidence theory: improves robustness by merging conflicting evidence through a trust function and a likelihood function; Dynamic weight adjustment: Adjust the fusion weights based on the real-time performance of the sensors; Online learning optimization: Dynamically optimize the fusion strategy through reinforcement learning.

[0034] In a specific embodiment of the present invention, Fast Fourier Transform (FFT) is used to extract spectral energy, Principal Component Analysis (PCA) is used to reduce dimensionality and retain principal components. PCA extracts core features of data through orthogonal transformation. DeFinet-Schaffer evidence theory resolves conflicting data. DeFinet-Schaffer evidence theory is a mathematical reasoning method used to handle uncertainty and incomplete information. Attention mechanism weights key features, reduces feature dimensionality, and improves decision accuracy.

[0035] Specifically, the formulas used in step S3, feature extraction and fusion, include: The formula for time-domain feature extraction is: , where xi is the vibration value assigned to the i-th sampling point, N is the number of sampling points, normalization processing: xi needs to be Z-Score standardized before numerical input; The formula for frequency domain feature extraction is: ,in The amplitude of the spectrum after FFT transformation, in m / s 2 / Hz, and The frequency band is measured in Hz. It is the frequency band energy and the unit is (m / s) 2 ) 2 Normalization: Energy value divided by total energy Obtain the proportion; The formula for spatial feature extraction is: ,in All values ​​are eigenvalues ​​of the point cloud covariance matrix, and the unit is mm. 2 The point cloud coordinates are unified to millimeters; The Kalman filter fusion formula is as follows: ,in For the observed values, For Kalman gain, the observation noise covariance matrix R needs to be standardized; The weighted formula for attention mechanism is: , ,in For feature importance scoring, Softmax ensures ; The principal component analysis dimensionality reduction formula is Y=XW, where X is the original feature matrix and W is the eigenvector matrix. Dimension processing: the input X needs to be Z-score standardized.

[0036] In a specific embodiment of the present invention, Kalman filtering fuses observations, OSQP solves convex quadratic programming problems, optimizes joint angular velocities, Jacobian matrix solves kinematic constraints, reduces velocity planning computation, and jerk is applied continuously without impact. OSQP is an algorithm for solving convex quadratic programming problems and is a variant of the alternating direction multiplier method.

[0037] Specifically, step S4, the speed calculation and optimization model, includes: Model import and path generation: Import the geometric model of the surface to be processed into the CAM software, calculate the motion path of each axis, and define the main axis; Path segmentation: The spindle path is divided into three stages: acceleration, constant speed, and deceleration, which correspond to the processes of acceleration start-up, stable machining, and deceleration stop, respectively. Jet control: Jet is defined using a sine trigonometric function. Acceleration is obtained by integration. and speed This ensures smooth speed changes; Time allocation optimization: based on path length S and target speed v m Calculate the duration of each stage: acceleration T1, constant speed T2, and deceleration T3, and constrain them to be integer multiples of the interpolation period T to match the timing of the control system. Dynamic adjustment: If the path is short, the acceleration can be approximated by increasing the speed change time, sacrificing some accuracy in exchange for processing efficiency and stability; Spindle speed mapping: Based on the spindle speed curve, the acceleration, velocity, and position of other axes are calculated using an interpolation algorithm to ensure synchronous motion of multiple axes; Kinematic model: based on maximum acceleration a max and speed v max Calculate acceleration distance and average speed distance Dynamically allocate movement amounts at each stage.

[0038] In a specific embodiment of the present invention, the S-shaped speed planning segmented control jerk, the interpolation algorithm synchronizes multi-axis motion, dynamically adjusts the path duration, reduces speed fluctuation, and the surface roughness Ra≤0.2μm is achieved.

[0039] Specifically, step S5 online learning and real-time optimization includes: Online learning: The stochastic gradient descent algorithm is used for online learning, and model parameters are updated in real time. The learning rate is dynamically adjusted using the following formula: ; Sparse online learning: Introducing L1 regularization to promote feature selection and improve computational efficiency; Cutting parameter optimization: Optimal control commands are generated by fusing multi-sensor data through Kalman filtering; Multi-axis collaborative control: Synchronizes the motion of each axis through interpolation algorithms to ensure time alignment accuracy down to the microsecond level; Knowledge base updates: Employing a continuous learning framework, updates are performed through task sequences T1, T2, ..., T... N Accumulate knowledge gradually to avoid catastrophic forgetting; Feedback loop: Processed data is fed back to the model in real time, performance is evaluated through an online validation set, and model retraining is triggered.

[0040] In a specific embodiment of the present invention, stochastic gradient descent updates model parameters, a continuous learning framework avoids forgetting, and Kalman filtering generates optimal instructions, thereby improving the model convergence speed and achieving a real-time response latency of <1ms.

[0041] Specifically, step S6, joint replaceability adaptation, includes: Joint disassembly and installation preparation: Turn off the machine tool power, use an anti-static wrist strap to avoid circuit damage, clean the joint connection parts to prevent impurities from entering, loosen the fixing screws, disconnect the connecting wires, and check the tools and spare parts; Mechanical calibration: Adjust the relative position of the new joint and the main unit. The relative position includes the tool magazine and the tool changing position of the robot arm. Check the levelness with a precision level to ensure that the geometric accuracy is within the tolerance range. Grind and repair the guide rail and lead screw to restore the surface flatness. Electrical Connections: When rewiring, tighten the communication cable and verify the stability of the 48V power supply and grounding. Update the servo gain and backlash compensation parameters to match the new joint dynamics.

[0042] Dynamic accuracy calibration and testing: Perform machine tool homing operation, check the motor encoder zero mark for semi-closed-loop system, and calibrate the grating ruler for full closed-loop system to avoid pitch error. Set the workpiece coordinate system with G54 command and determine the origin offset value through trial cutting method. Dynamic performance verification: Run the test program to test the motion of each axis, spindle speed and tool change action, monitor the vibration spectrum and tool path tracking error, use a laser interferometer to detect the positioning accuracy, and use a ball bar to analyze the roundness error to ensure stable dynamic response; Software and control system adaptation: Re-enter the tool parameters in the CNC system and update the pitch compensation table to eliminate accumulated errors. Adjust the logic conditions in the PLC program to avoid triggering alarms due to unmet constraints. Intelligent optimization: Based on an online learning model, cutting parameters are dynamically adjusted, and joint control commands are optimized in real time by integrating data from multiple sensors.

[0043] In a specific embodiment of the present invention, mechanical calibration restores geometric accuracy, electrical connection matches servo parameters, and laser interferometer verifies dynamic performance, thereby shortening the calibration time after joint replacement.

[0044] Specifically, step S7 performance evaluation and feedback includes: Static accuracy test: The positioning error is calculated by the deviation between the command value and the actual displacement value. The same program is run repeatedly to statistically analyze the consistency of continuous machining and measure the difference between the theoretical and actual angles of the rotary table. Dynamic performance testing: Tests the actual speed under the G01 command to evaluate high-speed response capability; Dynamic error monitoring: Analyzing roundness error during high-speed motion using a ballbar. Spindle performance: Verify stability within the speed range and under load, and monitor the vibration spectrum; Automatic tool change test: Under full load conditions, test the tool change time and tool number accuracy, and check the reliability of the robot arm in grasping tool holders of different sizes; Limit protection test: Verify whether the soft / hard limit is triggered in a timely manner; Machining accuracy assessment: Compare the workpiece dimensions before and after machining, and calculate whether the deviation is within the tolerance; Fault mode identification: Statistical analysis of processing error distribution, identification of systematic deviations, and establishment of fault prediction models using sensor data.

[0045] Real-time adjustment: Fine-tune parameters based on test results and adjust fusion weights based on sensor confidence. Continuous learning: Update the digital twin model, simulate the processing effect under new parameters, and use flexible weights to solidify and protect key parameters to prevent the model from forgetting them; Report generation: Record test data, adjustment measures and optimization effects, and update technical documents.

[0046] In a specific embodiment of the present invention, a coordinate measuring machine is used to evaluate static accuracy, a ballbar is used to monitor dynamic roundness, and a digital twin is used to simulate parameter effects, thereby improving the accuracy of fault prediction and extending tool life.

[0047] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and its improved concept, should be covered within the scope of protection of the present invention.

Claims

1. A method for calculating the joint speed of a CNC machine tool, characterized in that, include: S1. Multi-sensor data acquisition; S2, Data Preprocessing and Synchronization; S3. Feature extraction and fusion; S4. Speed ​​Calculation and Optimization Model; S5, online learning and real-time optimization; S6, Joint replaceability adaptation; S7. Performance Evaluation and Feedback.

2. The method for calculating the joint speed of a CNC machine tool according to claim 1, characterized in that, The multi-sensor data acquisition step S1 includes: Sensor selection: Select high-precision and high-stability sensors based on the vibration, temperature and current monitoring targets, including vibration sensors, IMU modules and temperature sensors; Deployment location: Install the sensor on the side of the spindle housing, near the motor, and on the surface of the machine tool's moving path to ensure coverage of multi-dimensional information and avoid interference; Network topology: Sensors are connected using a WSN wireless self-organizing network to ensure reliable data transmission; Hardware synchronization: FPGA trigger signals are used to ensure that all sensors collect data at the same time. Multiple synchronous clocks are generated by frequency dividers to drive different sensors respectively. Software synchronization: Timestamp alignment is performed on asynchronously collected data, and the data is adjusted to a unified time base through interpolation or extrapolation. Data alignment is achieved using time synchronization tools within the ROS framework. Real-time data stream acquisition: Continuously acquire raw data streams through an interface.

3. The method for calculating the joint speed of a CNC machine tool according to claim 2, characterized in that, Step S2, data preprocessing and synchronization, includes: Filtering: Median filtering and Kalman filtering are used to eliminate high-frequency noise; Outlier removal: Excluding outlier data through standard deviation analysis or thresholding. Data standardization: Normalizing multi-source data to eliminate differences in units; Hardware synchronization: A high-precision clock source is used to trigger all sensors to collect data synchronously, and a synchronization pulse signal is generated by the FPGA to control the sensors to sample synchronously; Software synchronization: Using the main sensor as a reference, linear interpolation is performed on the data from other sensors to align with the time axis; Dynamic time warping: handles non-uniformly sampled data and achieves time alignment through sliding window interpolation; Coordinate system transformation: Convert the data from various sensors to the unified coordinate system of the machine tool; Spatial registration: For visual or lidar data, a feature matching algorithm is used to achieve spatial alignment with the mechanical structure.

4. The method for calculating the joint speed of a CNC machine tool according to claim 3, characterized in that, The formulas used in step S2, data preprocessing and synchronization, include: The minimum-maximum normalization formula is: Where S is the raw sensor data, Let be the minimum and maximum values ​​in the data sample, respectively, and let a and b be the target range, with values ​​ranging from [0,1]. The normalized numerical value is dimensionless; The Z-Score standardization formula is: Where X represents the raw data, and the unit of X is the same as the sensor unit. The mean of the data is in the same unit as X. It is the standard deviation and has the same unit as X; The time synchronization interpolation formula is: ,in The timestamp is for the main sensor and is in seconds. The timestamp is for the sensor and the unit is seconds. For the sensor in The measured value at time; The weighted average fusion formula is: ,in For the data of the i-th sensor, The weighting coefficients are dimensionless and satisfy the following conditions: , and Same unit; The dynamic normalization formula is Where V is the actual sensor voltage value. The maximum / minimum value within the current operating cycle, expressed in volts.

5. The method for calculating the joint speed of a CNC machine tool according to claim 4, characterized in that, The feature extraction and fusion step S3 includes: Temporal feature extraction: Calculate the mean, variance, peak value, and RMS of the sensor data; Frequency domain feature extraction: Extracting spectral features using FFT; Spatial feature extraction: Extracting edge, texture, and point cloud features from visual or LiDAR data; Deep learning features: CNNs are used to automatically learn high-order features, or LSTMs are used to capture temporal dependencies; Feature selection and dimensionality reduction: Based on statistical indicators, low-correlation features are eliminated, high-dimensional features are mapped to low-dimensional space through PCA or LDA, the main information is retained, and important features are selected using decision trees or L1 regularization models. Data-level fusion: Concatenate raw data or pre-processed feature vectors from different sensors into a unified input, and assign weights to redundant sensor data according to reliability. Feature aggregation: The feature vectors from different sensors are concatenated and input into the model. The weights of different features are dynamically allocated through CBA to highlight key information. Cross-modal alignment: mapping visual features and mechanical features to the same semantic space; Decision-level fusion: Each sensor independently classifies the data and then votes to determine the final result. For scenarios with high uncertainty, the joint posterior distribution is calculated using prior probabilities and likelihood functions. DS evidence theory: improves robustness by merging conflicting evidence through a trust function and a likelihood function; Dynamic weight adjustment: Adjust the fusion weights based on the real-time performance of the sensors; Online learning optimization: Dynamically optimize the fusion strategy through reinforcement learning.

6. The method for calculating the joint speed of a CNC machine tool according to claim 5, characterized in that, The formulas used in step S3, feature extraction and fusion, include: The formula for time-domain feature extraction is: , where xi is the vibration value assigned to the i-th sampling point, N is the number of sampling points, normalization processing: xi needs to be Z-Score standardized before numerical input; The formula for frequency domain feature extraction is: ,in The amplitude of the spectrum after FFT transformation, in m / s 2 / Hz, and The frequency band is measured in Hz. It is the frequency band energy and the unit is (m / s) 2 ) 2 Normalization: Energy value divided by total energy Obtain the proportion; The formula for spatial feature extraction is: ,in All values ​​are eigenvalues ​​of the point cloud covariance matrix, and the unit is mm. 2 The point cloud coordinates are unified to millimeters; The Kalman filter fusion formula is as follows: ,in For the observed values, For Kalman gain, the observation noise covariance matrix R needs to be standardized; The weighted formula for attention mechanism is: , ,in For feature importance scoring, Softmax ensures ; The principal component analysis dimensionality reduction formula is Y=XW, where X is the original feature matrix and W is the eigenvector matrix. Dimension processing: the input X needs to be Z-score standardized.

7. The method for calculating the joint speed of a CNC machine tool according to claim 6, characterized in that, The speed calculation and optimization model in step S4 includes: Model import and path generation: Import the geometric model of the surface to be processed into the CAM software, calculate the motion path of each axis, and define the main axis; Path segmentation: The spindle path is divided into three stages: acceleration, constant speed, and deceleration, which correspond to the processes of acceleration start-up, stable machining, and deceleration stop, respectively. Jet control: Jet is defined using a sine trigonometric function. Acceleration is obtained by integration. and speed This ensures smooth speed changes; Time allocation optimization: based on path length S and target speed v m Calculate the duration of each stage: acceleration T1, constant speed T2, and deceleration T3, and constrain them to be integer multiples of the interpolation period T to match the timing of the control system. Dynamic adjustment: If the path is short, the acceleration can be approximated by increasing the speed change time, sacrificing some accuracy in exchange for processing efficiency and stability; Spindle speed mapping: Based on the spindle speed curve, the acceleration, velocity, and position of other axes are calculated using an interpolation algorithm to ensure synchronous motion of multiple axes; Kinematic model: based on maximum acceleration a max and speed v max Calculate acceleration distance and average speed distance Dynamically allocate movement amounts at each stage.

8. The method for calculating the joint speed of a CNC machine tool according to claim 7, characterized in that, The online learning and real-time optimization step S5 includes: Online learning: The stochastic gradient descent algorithm is used for online learning, and model parameters are updated in real time. The learning rate is dynamically adjusted using the following formula: ; Sparse online learning: Introducing L1 regularization to promote feature selection and improve computational efficiency; Cutting parameter optimization: Optimal control commands are generated by fusing multi-sensor data through Kalman filtering; Multi-axis collaborative control: Synchronizes the motion of each axis through interpolation algorithms to ensure time alignment accuracy down to the microsecond level; Knowledge base updates: Employing a continuous learning framework, updates are performed through task sequences T1, T2, ..., T... N Accumulate knowledge gradually to avoid catastrophic forgetting; Feedback loop: Processed data is fed back to the model in real time, performance is evaluated through an online validation set, and model retraining is triggered.

9. The method for calculating the joint speed of a CNC machine tool according to claim 6, characterized in that, The step S6, joint replaceability adaptation, includes: Joint disassembly and installation preparation: Turn off the machine tool power, use an anti-static wrist strap to avoid circuit damage, clean the joint connection parts to prevent impurities from entering, loosen the fixing screws, disconnect the connecting wires, and check the tools and spare parts; Mechanical calibration: Adjust the relative position of the new joint and the main unit. The relative position includes the tool magazine and the tool changing position of the robot arm. Check the levelness with a precision level to ensure that the geometric accuracy is within the tolerance range. Grind and repair the guide rail and lead screw to restore the surface flatness. Electrical Connections: When rewiring, tighten the communication cable and verify the stability of the 48V power supply and grounding. Update the servo gain and backlash compensation parameters to match the new joint dynamics. Dynamic accuracy calibration and testing: Perform machine tool homing operation, check the motor encoder zero mark for semi-closed-loop system, and calibrate the grating ruler for full closed-loop system to avoid pitch error. Set the workpiece coordinate system with G54 command and determine the origin offset value through trial cutting method. Dynamic performance verification: Run the test program to test the motion of each axis, spindle speed and tool change action, monitor the vibration spectrum and tool path tracking error, use a laser interferometer to detect the positioning accuracy, and use a ball bar to analyze the roundness error to ensure stable dynamic response; Software and control system adaptation: Re-enter the tool parameters in the CNC system and update the pitch compensation table to eliminate accumulated errors. Adjust the logic conditions in the PLC program to avoid triggering alarms due to unmet constraints. Intelligent optimization: Based on an online learning model, cutting parameters are dynamically adjusted, and joint control commands are optimized in real time by integrating data from multiple sensors.

10. The method for calculating the joint speed of a CNC machine tool according to claim 7, characterized in that, The performance evaluation and feedback step S7 includes: Static accuracy test: The positioning error is calculated by the deviation between the command value and the actual displacement value. The same program is run repeatedly to statistically analyze the consistency of continuous machining and measure the difference between the theoretical and actual angles of the rotary table. Dynamic performance testing: Tests the actual speed under the G01 command to evaluate high-speed response capability; Dynamic error monitoring: Analyzing roundness error during high-speed motion using a ballbar. Spindle performance: Verify stability within the speed range and under load, and monitor the vibration spectrum; Automatic tool change test: Under full load conditions, test the tool change time and tool number accuracy, and check the reliability of the robot arm in grasping tool holders of different sizes; Limit protection test: Verify whether the soft / hard limit is triggered in a timely manner; Machining accuracy assessment: Compare the workpiece dimensions before and after machining, and calculate whether the deviation is within the tolerance; Fault mode identification: Statistical analysis of processing error distribution to identify systematic deviations, and establishment of fault prediction models using sensor data; Real-time adjustment: Fine-tune parameters based on test results and adjust fusion weights based on sensor confidence. Continuous learning: Update the digital twin model, simulate the processing effect under new parameters, and use flexible weights to solidify and protect key parameters to prevent the model from forgetting them; Report generation: Record test data, adjustment measures and optimization effects, and update technical documents.