Automatic lathe machining control method and system based on numerical control device
By integrating a variety of sensors and tool condition analysis models on CNC lathes, collecting and analyzing production data in real time, and dynamically adjusting processing parameters, the problem of difficult to achieve accurate control and efficient processing in high-precision and complex workpiece processing in traditional CNC lathes is solved, and higher machining accuracy and production efficiency are achieved.
Patent Information
- Application Number
- CN202510244303.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-03
AI Technical Summary
When traditional CNC lathes are processed with high-precision and complex workpieces, it is difficult to achieve precise control and efficient processing, resulting in low production efficiency, unstable quality and unpredictable tool life.
By installing a variety of sensors on the lathe, the tool temperature, vibration, pressure and other production data are collected, and the tool condition analysis model is used for real-time health assessment. Based on workpiece processing task data and tool historical loss data, the processing speed and cutting parameters are dynamically adjusted to realize automatic machining control.
It improves machining accuracy and efficiency, extends the tool service life, ensures the stability of the production process and optimizes the allocation of resources, and improves the overall production efficiency.
Smart Images

Figure CN120044884A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerically controlled lathes, and particularly to a lathe automatic machining control method and system based on a numerical control device. Background Art
[0002] With the continuous development of the manufacturing industry, lathes, as an important machining equipment, are widely used in metal processing, mold manufacturing, and component production. Traditional lathes usually rely on manual operation and manually adjust machining parameters to meet the machining requirements of different workpieces. However, with the increasing requirements for machining accuracy, traditional lathes gradually expose some limitations. Especially when dealing with high-precision and complex workpieces, it is difficult to achieve precise control and efficient machining. This leads to problems such as low production efficiency, unstable quality, and inability to accurately predict tool life, restricting the application range and production capacity of lathes.
[0003] Currently, numerical control technology has been applied to the automatic control of lathes, and precise control of cutting parameters is achieved through digital means, significantly improving the machining accuracy and automation level of lathes. Modern numerically controlled lathes are usually equipped with multi-axis control systems, which can automatically adjust parameters such as feed speed and cutting depth. However, existing numerical control systems still have some deficiencies. For example, they cannot monitor the health status of the tool in real time, lack a dynamic evaluation mechanism for tool wear, and it is also difficult to adjust cutting parameters in real time during the machining process to cope with changing machining conditions. In addition, most existing numerical control systems rely on preset machining templates and lack an adaptive adjustment function, resulting in the inability to optimize the efficiency and accuracy during the machining process.
[0004] The deficiencies of traditional numerically controlled lathes are mainly reflected in the tool condition monitoring and dynamic regulation capabilities. Due to the lack of real-time analysis of tool health, tool wear is often not detected in time during the production process, resulting in a decline in machining quality or tool damage, affecting production efficiency. In addition, when existing numerically controlled lathes dynamically regulate machining speed and cutting parameters, they only rely on preset fixed parameters and machining templates, and it is difficult to adjust in a timely manner according to the actual machining tasks and tool wear conditions, resulting in unstable machining accuracy and too short tool service life. Summary of the Invention
[0005] A lathe automatic machining control method based on a numerical control device includes the following steps: Step S1: Data acquisition, obtaining production data during the automatic machining process through sensors on the lathe. The production data includes the temperature of the tool, the frequency, amplitude, and waveform of tool vibration, the pressure at the connection between the tool and the workpiece and the connection between the tool and the fixture, the image of the tool, the rotational speed and position of the spindle; Step S2: Automatic control, obtaining the cutting parameters of the machining template of the workpiece in sequence, and controlling the position of the tool through a machining control system composed of a single-chip microcomputer; adjusting the cutting parameters of the tool through real-time production data feedback; Step S3: Tool analysis, inputting the production data into a tool condition analysis model for calculation, and outputting a tool health assessment report, including the estimated life, machining matching degree, and recommended tools, for reminding tool replacement, and the tool replacement is automatically carried out by a four-direction automatic tool rest; Step S4: Dynamic regulation, dynamically controlling the machining speed of the workpiece based on the workpiece machining task data and combining with the historical wear data of the tool; Step S5: Production regulation, automatically scheduling machining tasks according to the priority of the workpiece machining tasks and the production resource status, updating the production schedule in real time, optimizing the production resource allocation, and improving the production efficiency.
[0006] As a preferred technical solution of the present invention, the production data includes: The temperature of the tool, obtained by a temperature sensor installed on the tool and stored in the form of real-time temperature values; The frequency, amplitude, and waveform of the tool vibration, obtained by a vibration sensor installed on the tool and stored in the form of an array of vibration frequency, amplitude, and waveform parameters; The pressure at the connection between the tool and the workpiece, obtained by a pressure sensor installed at the connection between the tool and the workpiece and stored in the form of a time series of pressure values; The pressure at the connection between the tool and the fixture, obtained by a pressure sensor installed at the connection between the tool and the fixture and stored in the form of a time series of pressure values; The image of the tool, obtained by an image acquisition sensor installed above or on the side of the lathe and stored in the form of image frames, and each frame is image data; The rotation speed and position of the main shaft, obtained by an optical encoder installed on the main shaft, the rotation speed data is stored in the form of a time series of rotation speed values, and the position data is stored in the form of a time series of position values; The above data is stored as time series data in a structured format, where the timestamp is used as the key field and corresponds to the data items of each sensor; the corresponding position of each data item in the time series is used for subsequent data analysis, prediction, and feedback regulation.
[0007] As a preferred technical solution of the present invention, the position control includes: Obtaining the sequential cutting parameters in the machining template of the workpiece, the cutting parameters including the main shaft rotation speed, main shaft position, feed speed, and cutting depth, and the cutting parameters are arranged in time sequence according to the requirements of the machining path; The processing template further includes standard feedback data corresponding to the timing cutting parameters, and the standard feedback data includes the frequency, amplitude and waveform of tool vibration, and the standard values of the pressures at the connections between the tool and the workpiece and between the tool and the fixture; Through a processing control system composed of a single-chip microcomputer, according to the timing cutting parameters and standard feedback data in the processing template, the position and movement trajectory of the tool are controlled in real time to ensure that the tool performs cutting according to the specified processing path; The position control system adjusts the position of the tool according to the standard values of the spindle speed and spindle position to achieve precise cutting operations.
[0008] As a preferred technical solution of the present invention, the feedback regulation includes: By comparing the real-time production data with the standard feedback data in the current corresponding processing template, it is judged whether the processing is in place; if the processing is not in place, the tool continues to perform cutting at the original position until the standard is reached; By obtaining the difference between the real-time production data and the standard feedback data and performing weighted summation, an anomaly score is calculated for anomaly assessment; The calculation method of the anomaly score is: taking the difference and performing weighted summation on the data items of the real-time production data with standard feedback data, and using the remaining data items in the real-time production data to obtain the deviation weight for calculating the comprehensive anomaly score , and the calculation formula is: , where is the total number of the remaining data items, is the total number of the data items of the real-time production data with standard feedback data, is the i th remaining data item, is the corresponding normal standard value; is the j th data item of the real-time production data with standard feedback data, is the corresponding standard feedback data; If the comprehensive anomaly score exceeds the preset step threshold, it is judged as poor processing or abnormal processing, and the system makes corresponding adjustments; for poor processing, the cutting parameters are adjusted, and for abnormal processing, the processing is stopped and an alarm is issued; The anomaly assessment also includes setting the anomaly extreme value for each item of data. If the deviation value of the corresponding data item exceeds the set single-item anomaly extreme value, it is also judged as abnormal processing.
[0009] As a preferred technical solution of the present invention, the structure of the tool condition analysis model includes: Image analysis layer: used to process the image data of the tool. The convolutional neural network analyzes the surface image of the tool to identify the physical state of the tool. The processing of image data includes image preprocessing, feature extraction, image classification, and defect detection, which are used to identify the appearance damage and deformation of the tool and provide a visual assessment of the tool's health status; the physical state of the tool includes wear, damage, and cracks. Vibration and pressure data analysis layer: used to extract the vibration characteristics corresponding to the frequency, amplitude, and waveform of the tool vibration, and the pressure characteristics corresponding to the pressure data at the connections between the tool, workpiece, and fixture; the vibration characteristics are obtained through fast Fourier transform; the pressure data is obtained through data fluctuation analysis. This layer provides predictions of tool failures or excessive wear. Data fusion layer: used to fuse the results of the image analysis layer and the vibration and pressure data analysis layer, combine the analysis results of various data, and comprehensively evaluate the overall state of the tool; by weighted fusion of the results output by the two analysis layers, the tool state is quantified as a tool health score. Life prediction and matching degree analysis layer: used to calculate the estimated life of the tool by regression analysis based on the fused tool health score, combined with historical data and the sequential cutting parameters of workpiece machining; and evaluate the machining matching degree between the current tool and the workpiece, determine whether the tool is suitable for continuing the current machining task, and output the decision basis for recommending tool replacement. Decision output layer: used to output a tool health status assessment report based on the results of life prediction and matching degree analysis, including the estimated life of the tool, machining matching degree, and recommended tools for system control and operator reference.
[0010] As a preferred technical solution of the present invention, the training of the tool condition analysis model includes: Dataset construction: Obtain historical production data, label the historical production data according to the actual condition of the tool, and construct a labeled training dataset; the training dataset includes input data and corresponding tool health status labels for supervised learning; the training dataset is divided into a training set, a validation set, and a test set before use. Data preprocessing and feature extraction: For image data, use a convolutional neural network for image processing, including operations such as image enhancement, denoising, and normalization, to extract the surface features of the tool; for vibration and pressure data, extract frequency domain features through fast Fourier transform and analyze the fluctuation of vibration signals and pressure signals. Training process: Use a structure combining a deep convolutional neural network and a long short-term memory network to train with the training set. The deep convolutional neural network is used to process image data and extract the surface features of the tool from the image; the long short-term memory network is used to process the time series data of vibration and pressure to capture the dynamic features of the data changing over time. The loss function of the entire network is defined as: , where is the predicted value of the output, is the corresponding tool health status label, is the total number of samples is the parameter of the weight, is the regularization coefficient, used to prevent overfitting, and optimize the parameters of the network by minimizing the loss function; Model evaluation and adjustment: During the training process, the performance of the model is comprehensively evaluated by using cross - validation on the validation set in combination with accuracy and precision; According to the training results, the hyperparameters of the tool condition analysis model during the training process are further optimized to improve the network structure and performance; Model testing and verification: After the training is completed, the trained model is verified using the test set; By comparing the prediction results with the actual labels, the prediction accuracy of the model is evaluated, and subsequent tuning is performed for the errors; Finally, a tool condition analysis model that can comprehensively evaluate the tool health status based on production data is obtained.
[0011] As a preferred technical solution of the present invention, the dynamic regulation includes: Processing speed control: The control of the processing speed is specifically achieved through a rotation speed stage table, which includes preset different rotation speed stages; By based on the workpiece processing task data and the historical wear data of the tool, the rotation speed stage is dynamically adjusted. Specifically, according to the processing type, material characteristics of the workpiece and the wear condition of the tool, a matching rotation speed stage is selected and its adjustment within the dynamic range is maintained; Rotation speed stage adjustment: According to the processing requirements of the workpiece and the tool health assessment report, the most suitable rotation speed range is selected from the stage table, and the rotation speed stage is adjusted to optimize the cutting process; Application of historical wear data: During the dynamic regulation process, the historical wear data of the tool is obtained in real - time, including the wear curve and over - cutting situation of the tool. By comparing the historical wear data with the real - time processing conditions, the rotation speed stage is adjusted to meet the processing task requirements of the current tool and workpiece.
[0012] As a preferred technical solution of the present invention, the production regulation includes: Task priority judgment: According to the type, urgency and production goals of the workpiece processing tasks, the priority of each task is comprehensively evaluated; Resources are allocated according to the priority to ensure that key tasks or urgent tasks are given priority, and production bottlenecks caused by task delays are avoided; Monitoring of production resource status: The status of resources on the production line is monitored in real - time, including the operating status of equipment, the health status of tools and the supply situation of workpieces; By collecting real - time data of various resources, it is evaluated whether the production resources are sufficient, and whether there are situations of resource waste or shortage; Automatically schedule machining tasks: Automatically schedule machining tasks based on the priority of workpiece machining tasks, production resource status, and historical machining data; Dynamically adjust the machining sequence and task allocation according to real-time data and task priorities; Real-time update the production schedule: Dynamically update the production schedule according to the completion progress of machining tasks and the real-time status of the production line to ensure the accuracy and timeliness of scheduling information; Optimize the production plan by adjusting the start and completion times of machining tasks to avoid conflicts between tasks and resource waste; Optimize the allocation of production resources: Based on the real-time update of production scheduling, adjust the allocation plan of production resources to ensure the efficient allocation and utilization of resources such as equipment, cutting tools, and workpieces.
[0013] A lathe automatic machining control system based on a numerical control device, including the following modules: Data acquisition module: Used to obtain production data during the automatic machining process through sensors on the lathe; Automatic control module: Used to control the position of the cutting tool through a machining control system composed of a single-chip microcomputer in combination with cutting parameters; And adjust the cutting parameters of the cutting tool through real-time production data feedback; Tool analysis module: Used to input production data into a tool condition analysis model for calculation, and output a tool health assessment report, including estimated life, machining matching degree, and recommended tools, for reminding tool replacement, and the tool replacement is automatically carried out by a four-position automatic tool turret; Dynamic regulation module: Based on workpiece machining task data, dynamically control the machining speed of the workpiece in combination with the historical wear data of the cutting tool; Production regulation module: Used to automatically schedule machining tasks according to the priority of workpiece machining tasks and the production resource status, real-time update the production schedule, optimize the allocation of production resources, and improve production efficiency.
[0014] The present invention has the following advantages: The present invention comprehensively collects production data by integrating multiple sensors, covering multiple indicators. Compared with traditional lathes that only rely on a small amount of data for machining control, the multi-dimensional data collected can provide more accurate and richer information for subsequent analysis and decision-making, ensuring the accuracy and quality during the machining process.
[0015] The automatic control system of the present invention can dynamically adjust the cutting parameters of the cutting tool according to real-time production data feedback. In this way, the lathe can respond in real time to changes in workpiece machining conditions, accurately control the cutting depth and feed rate during the machining process, effectively improve the machining accuracy and efficiency, and avoid errors caused by manual intervention.
[0016] Through the tool condition analysis model and combined with multi-dimensional real-time production data, the present invention can evaluate the health condition of the tool in real time and predict the remaining life of the tool. This intelligent analysis can timely detect problems such as tool wear and damage, avoid machining inaccuracy or production interruption caused by tool failures, thereby effectively extending the service life of the tool and improving machining stability.
[0017] Based on workpiece machining task data and tool historical wear data, the present invention dynamically adjusts the machining speed and tool usage parameters to ensure the best cutting efficiency and tool life during the machining process. By flexibly adjusting the rotation speed stage and cutting parameters during the machining process, while maximizing the machining accuracy, tool wear is reduced and the overall production efficiency is improved.
[0018] The production control module of the present invention can automatically schedule machining tasks according to the priority of workpiece machining tasks and the status of production resources, and update the production schedule in real time to optimize the allocation of production resources. This not only improves production efficiency, but also ensures the optimal utilization of resources, avoids production bottlenecks and resource waste, and further improves the flexibility and automation level of the production line. Brief Description of the Drawings
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only schematic diagrams of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings; Figure 1 It is a schematic structural diagram of a lathe automatic machining control system based on a numerical control device adopted in an embodiment of the present invention. Detailed Embodiments
[0020] In order to make the purpose, technical solutions and advantages of the present invention clearer, the following will further describe the present invention in detail with reference to the drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0021] Embodiment 1, a lathe automatic machining control method based on a numerical control device, includes the following steps: Step S1: Data acquisition, obtaining production data during the automatic machining process through sensors on the lathe. The production data includes the temperature of the tool, the frequency, amplitude and waveform of tool vibration, the pressure at the connection between the tool and the workpiece and at the connection between the tool and the fixture, the image of the tool, the rotation speed and position of the spindle; The production data includes: The temperature of the cutting tool is obtained by a temperature sensor installed on the cutting tool and stored in the form of real-time temperature values; The frequency, amplitude, and waveform of the cutting tool vibration are obtained by a vibration sensor installed on the cutting tool and stored in the form of an array of vibration frequency, amplitude, and waveform parameters; The pressure at the connection between the cutting tool and the workpiece is obtained by a pressure sensor installed at the connection between the cutting tool and the workpiece and stored in the form of a time series of pressure values; The pressure at the connection between the cutting tool and the fixture is obtained by a pressure sensor installed at the connection between the cutting tool and the fixture and stored in the form of a time series of pressure values; The image of the cutting tool is obtained by an image acquisition sensor installed above or on the side of the lathe and stored in the form of image frames, with each frame being image data; The rotational speed and position of the spindle are obtained by an optical encoder installed on the spindle. The rotational speed data is stored in the form of a time series of rotational speed values, and the position data is stored in the form of a time series of position values; The above data is stored as time series data in a structured format, where the timestamp is used as a key field corresponding to the data items of each sensor; the corresponding positions of each data item in the time series are used for subsequent data analysis, prediction, and feedback adjustment.
[0022] Step S2: Automatic control. Obtain the sequential cutting parameters in the machining template of the workpiece, and control the position of the cutting tool through a machining control system composed of single-chip microcomputers; adjust the cutting parameters of the cutting tool through real-time production data feedback; The position control includes: Obtain the sequential cutting parameters in the machining template of the workpiece. The cutting parameters include spindle rotational speed, spindle position, feed rate, and cutting depth, and the cutting parameters are arranged in chronological order according to the requirements of the machining path; The machining template also includes standard feedback data corresponding to the sequential cutting parameters. The standard feedback data includes the standard values of the frequency, amplitude, and waveform of the cutting tool vibration, and the pressures at the connections between the cutting tool and the workpiece and between the cutting tool and the fixture; Through a machining control system composed of single-chip microcomputers, according to the sequential cutting parameters and standard feedback data in the machining template, the position and movement trajectory of the cutting tool are controlled in real time to ensure that the cutting tool performs cutting according to the specified machining path; The position control system adjusts the position of the cutting tool according to the standard values of the spindle rotational speed and spindle position to achieve precise cutting operations.
[0023] In actual use, on the original lathe, a stepper motor is installed and connected to the motion control of the X, Y, and Z axes through a gear reduction device. The drive of the stepper motor can precisely control the motion in three directions, enabling the originally manually operated feed motion to achieve digital control. By installing a high-precision stepper motor and a reduction mechanism, a more precise longitudinal feed motion is achieved, improving the overall machining accuracy.
[0024] The ball screw is installed in the longitudinal feed part of the lathe and connected to the stepper motor through a coupling. The ball screw can provide low friction, smooth and efficient motion during the feed process, ensuring higher repeat accuracy and a smoother motion trajectory during machining. This transformation not only improves the feed accuracy but also enhances the dynamic response performance of the lathe.
[0025] To achieve high-precision thread machining, the spindle is equipped with an optical encoder. The optical encoder can precisely detect the rotation position and speed of the spindle and achieve digital control of the spindle speed through feedback signals. During thread machining, the optical encoder can provide accurate speed adjustment and position feedback, making the thread cutting more precise.
[0026] In the electric control box of the lathe, an interface conversion circuit and a strong electric control circuit are added. These transformations enable the original lathe to be connected to a new numerical control system. The interface conversion circuit converts the control signals of the numerical control system into control signals recognizable by the lathe, ensuring that the numerical control system can effectively drive devices such as stepper motors and automatic tool holders. The strong electric control circuit is responsible for controlling the power supply of key parts such as the main power supply and spindle of the lathe, ensuring the efficient operation of the lathe.
[0027] The feedback regulation includes: By comparing the real-time production data with the standard feedback data in the current corresponding machining template, it is judged whether the machining is in place; if the machining is not in place, the tool continues to cut at the original position until the standard is reached; By calculating the difference between the real-time production data and the standard feedback data and performing weighted summation, an anomaly score is calculated for anomaly assessment; The calculation method of the anomaly score is: taking the difference and performing weighted summation on the data items of the real-time production data with standard feedback data, and using the remaining data items in the real-time production data to obtain the deviation weight for calculating the comprehensive anomaly score , and the calculation formula is: , where is the total number of the remaining data items, is the total number of the data items of the real-time production data with standard feedback data, is the i th remaining data item, is the corresponding normal standard value; is the j data item of real-time production data with standard feedback data, and is the corresponding standard feedback data; If the comprehensive anomaly score exceeds the preset ladder threshold, it is judged as poor machining or abnormal machining, and the system makes corresponding adjustments; for poor machining, the cutting parameters are adjusted, and for abnormal machining, the machining is stopped and an alarm is given; The anomaly assessment also includes setting the anomaly extreme value for each item of data. If the deviation value of the corresponding data item exceeds the set single-item anomaly extreme value, it is also judged as abnormal machining.
[0028] Step S3: Tool analysis. The production data is input into the tool condition analysis model for calculation, and a tool health assessment report is output, including the estimated life, machining matching degree, and recommended tools, which is used to remind of tool replacement. The tool replacement is automatically carried out by a four-direction automatic tool turret; In actual use, by replacing the original manual tool turret with a four-direction automatic tool turret, the tool replacement becomes automated. The four-direction automatic tool turret has multiple tool mounting positions and automatically switches tools according to machining requirements, avoiding manual tool changing operations and improving machining efficiency. This transformation shortens the tool replacement time and reduces machining inaccuracies caused by errors during the tool change process.
[0029] The structure of the tool condition analysis model includes: Image analysis layer: It is used to process the image data of the tool. The convolutional neural network analyzes the surface image of the tool to identify the physical state of the tool. The processing of the image data includes image preprocessing, feature extraction, image classification, and defect detection, which is used to identify the appearance damage and deformation of the tool and provide a visual assessment of the tool health status; the physical state of the tool includes wear, damage, and cracks; Vibration and pressure data analysis layer: It is used to extract the vibration characteristics corresponding to the frequency, amplitude, and waveform of the tool vibration, and the pressure characteristics corresponding to the pressure data at the connections between the tool, workpiece, and fixture; the vibration characteristics are obtained through fast Fourier transform; the pressure data is obtained through data fluctuation analysis. This layer provides predictions of tool failures or excessive wear; Data fusion layer: It is used to fuse the results of the image analysis layer and the vibration and pressure data analysis layer, combine the analysis results of each item of data, and comprehensively evaluate the overall state of the tool; by weighted fusion of the results output by the two analysis layers, the tool state is quantified as a tool health score; Tool life prediction and matching degree analysis layer: Based on the fused tool health score, combined with historical data and the sequential cutting parameters of workpiece machining, regression analysis is used to calculate the predicted tool life; and evaluate the machining matching degree between the current tool and the workpiece, determine whether the tool is suitable for continuing the current machining task, and output the decision basis for recommending tool replacement. Decision output layer: Based on the results of tool life prediction and matching degree analysis, it outputs a tool health status evaluation report, including the predicted tool life, machining matching degree, and recommended tools for system control and operator reference. This layer will give suggestions for tool replacement based on the prediction results. Specifically, tool replacement is carried out through a four-direction automatic tool turret during implementation; the tool condition analysis model combines image data and other production data (such as vibration, pressure, etc.), and uses a hierarchical structure to analyze and process the data separately. Image analysis and data analysis are carried out independently at different levels, and the analysis results of different data sources are integrated through the data fusion layer to ensure accurate and efficient tool condition analysis. The hierarchical design of this model meets the functional requirements in practical applications, can provide accurate tool status evaluation, and make scientific predictions on the service life and replacement timing of tools.
[0030] The training of the tool condition analysis model includes: Dataset construction: Obtain historical production data, label the historical production data according to the actual condition of the tool, and construct a labeled training dataset; the training dataset includes input data and corresponding tool health status labels for supervised learning; the training dataset is divided into a training set, a validation set, and a test set before use. Data preprocessing and feature extraction: For image data, a convolutional neural network is used for image processing, including operations such as image enhancement, denoising, and normalization, to extract the surface features of the tool; for vibration and pressure data, frequency domain features are extracted through fast Fourier transform to analyze the fluctuations of vibration signals and pressure signals. Training process: A structure combining a deep convolutional neural network and a long short-term memory network is used to train with the training set. The deep convolutional neural network is used to process image data and extract the surface features of the tool from the images; the long short-term memory network is used to process the time series data of vibration and pressure to capture the dynamic features of the data changing over time. The loss function of the entire network is defined as: , where is the predicted value of the output, is the corresponding tool health status label, is the total number of samples is the parameter of the weight, is the regularization coefficient used to prevent overfitting. By minimizing the loss function, the parameters of the network are optimized. Model evaluation and adjustment: During the training process, the performance of the model is comprehensively evaluated by combining cross-validation on the validation set, considering accuracy and precision; based on the training results, the hyperparameters of the tool condition analysis model during the training process are adjusted to further optimize the network structure and performance; Model testing and validation: After training is completed, the trained model is validated using the test set; by comparing the prediction results with the actual labels, the prediction accuracy of the model is evaluated, and subsequent optimization is carried out for the errors; finally, a tool condition analysis model that can comprehensively evaluate the tool health status based on production data is obtained.
[0031] Through the complete process of dataset construction, data preprocessing, feature extraction, network training, model evaluation and validation, a network structure combining CNN and LSTM is adopted to ensure the joint analysis of image data and time series data, thereby optimizing the performance of the tool condition analysis model.
[0032] Step S4: Dynamic regulation, based on the workpiece processing task data, dynamically control the processing speed of the workpiece in combination with the historical wear data of the tool; The dynamic regulation includes: Processing speed control: The control of the processing speed is specifically achieved through a rotational speed stage table, which includes preset different rotational speed stages; by based on the workpiece processing task data and the historical wear data of the tool, the rotational speed stage is dynamically adjusted to ensure the best cutting efficiency and tool life during the processing; specifically, according to the processing type of the workpiece, material characteristics, and the wear condition of the tool, a matching rotational speed stage is selected and its adjustment within the dynamic range is maintained; Rotational speed stage adjustment: According to the processing requirements of the workpiece and the tool health assessment report, select the most suitable rotational speed range from the stage table and adjust the rotational speed stage to optimize the cutting process; in this way, the rotational speed stage changes dynamically during the processing without the need to adjust the overall processing speed, thereby maximizing the processing accuracy and extending the service life of the tool; Application of historical wear data: During the dynamic regulation process, the historical wear data of the tool is obtained in real time, including the wear curve and overcutting situation of the tool, and by comparing the historical wear data and the real-time processing conditions, the rotational speed stage is adjusted to adapt to the processing task requirements of the current tool and workpiece.
[0033] Step S5: Production regulation, according to the priority of the workpiece processing tasks and the production resource status, automatically schedule the processing tasks, update the production schedule in real time, optimize the production resource allocation, and improve the production efficiency.
[0034] The production regulation includes: Task priority judgment: Comprehensively evaluate the priority of each task according to the type, urgency, and production goals of the workpiece processing tasks; allocate resources according to the priority to ensure that critical or urgent tasks are processed first and avoid production bottlenecks caused by task delays; Production resource status monitoring: Real-time monitor the resource status on the production line, including the operating status of equipment, the health status of cutting tools, and the supply of workpieces; evaluate whether the production resources are sufficient and whether there are resource waste or shortages by collecting real-time data of various resources; Automatically schedule processing tasks: Automatically schedule processing tasks according to the priority of the workpiece processing tasks, the production resource status, and historical processing data; dynamically adjust the processing sequence and task allocation according to real-time data and task priority to optimize the utilization of resources in the production process; Real-time update the production schedule: Dynamically update the production schedule according to the completion progress of the processing tasks and the real-time status of the production line to ensure the accuracy and timeliness of the scheduling information; optimize the production plan by adjusting the start and completion times of the processing tasks to avoid conflicts between tasks and resource waste; Optimize the production resource allocation: Based on the real-time update of the production schedule, adjust the allocation plan of production resources to ensure the efficient allocation and utilization of resources such as equipment, cutting tools, and workpieces. By optimizing the resource allocation, reduce idle time and equipment idleness, improve the overall production efficiency, and reduce production costs.
[0035] Embodiment 2, a lathe automatic processing control system based on a numerical control device, see Figure 1 as shown, including the following modules: Data acquisition module: Used to obtain production data in the automatic processing process through sensors on the lathe; Automatic control module: Used to perform position control on the cutting tool through a processing control system composed of single-chip microcomputers in combination with cutting parameters; and adjust the cutting parameters of the cutting tool through real-time production data feedback; Tool analysis module: Used to input production data into the tool condition analysis model for calculation, and output a tool health assessment report, including estimated life, processing matching degree, and recommended tools, for reminding tool replacement, and the tool replacement is automatically performed by a four-position automatic tool rest; Dynamic regulation module: Dynamically control the processing speed of the workpiece based on the workpiece processing task data in combination with the historical wear data of the cutting tool; Production regulation module: Used to automatically schedule processing tasks according to the priority of the workpiece processing tasks and the production resource status, real-time update the production schedule, optimize the production resource allocation, and improve the production efficiency.
[0036] The specific embodiments described above have further elaborated on the object, technical solution and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A lathe automatic processing control method based on a numerical control device, characterized in that: The following steps are involved: Step S1: data acquisition, obtaining production data in the automated machining process through sensors on the lathe, the production data including the temperature of the tool, the frequency, amplitude and waveform of the tool vibration, the pressure at the connection between the tool and the workpiece and the connection between the tool and the fixture, the image of the tool, and the speed and position of the spindle; Step S2: automatic control, obtaining the cutting parameters of the workpiece in the processing template in time sequence, and controlling the position of the tool through the processing control system composed of a single chip microcomputer; adjusting the cutting parameters of the tool through real-time production data feedback; Step S3: Tool analysis, inputting production data into the tool condition analysis model for calculation, and outputting a tool health assessment report, including estimated life, processing matching degree and recommended tools, for reminding tool replacement, wherein the tool replacement is automatically performed by a four-position automatic tool holder; Step S4: Dynamically control the processing speed of the workpiece based on the workpiece processing task data and the historical wear data of the tool; Step S5: Production control, automatically scheduling processing tasks according to the priority of workpiece processing tasks and production resource conditions, updating the production schedule in real time, optimizing production resource allocation, and improving production efficiency.
2. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The production data includes: The temperature of the tool is obtained by the temperature sensor installed on the tool and stored in the form of real-time temperature value; The frequency, amplitude and waveform of the tool vibration are obtained by a vibration sensor installed on the tool and stored in the form of an array of vibration frequency, amplitude and waveform parameters; The pressure at the connection between the tool and the workpiece is obtained by a pressure sensor installed at the connection between the tool and the workpiece and stored in the form of a time series of pressure values; The pressure at the connection between the tool and the fixture is obtained by a pressure sensor installed at the connection between the tool and the fixture and stored in the form of a time series of pressure values; The image of the tool is acquired by an image acquisition sensor installed above or on the side of the lathe and stored in the form of image frames, each frame being image data; The speed and position of the spindle are obtained through the photoelectric encoder installed on the spindle. The speed data is stored in the form of a time series of speed values, and the position data is stored in the form of a time series of position values; The above data is stored as time series data in a structured format, with the timestamp as the key field corresponding to the data item of each sensor; the corresponding position of each data item in the time series is used for subsequent data analysis, prediction and feedback adjustment.
3. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The position control includes: Acquire the time-series cutting parameters in the machining template of the workpiece, wherein the cutting parameters include spindle speed, spindle position, feed speed and cutting depth, and the cutting parameters are arranged in time sequence according to the requirements of the machining path; The processing template also includes standard feedback data corresponding to the sequential cutting parameters, the standard feedback data including the frequency, amplitude and waveform of the tool vibration, and the standard values of the pressure at the connection between the tool and the workpiece and at the connection between the tool and the fixture; Through the processing control system composed of a single-chip microcomputer, the position and motion trajectory of the tool are controlled in real time according to the timing cutting parameters and standard feedback data in the processing template to ensure that the tool cuts according to the specified processing path; The position control system adjusts the position of the tool according to the standard values of the spindle speed and the spindle position to achieve precise cutting operations.
4. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The feedback regulation includes: By comparing the real-time production data with the standard feedback data in the current corresponding processing template, it is determined whether the processing is in place; if the processing is not in place, the tool continues to cut at the original position until it reaches the standard; By taking the difference between the real-time production data and the standard feedback data and performing weighted summation, the anomaly score is calculated for anomaly assessment; The calculation method of the anomaly score is: the data items of the real-time production data with standard feedback data are subtracted and weighted summed, and the remaining data items in the real-time production data are used to obtain the deviation weights for calculating the comprehensive anomaly score. , the calculation formula is: ,in is the total number of remaining data items, is the total number of data items of real-time production data for which standard feedback data exists, For the i The remaining data items, is the corresponding normal standard value; For the j There are data items of real-time production data with standard feedback data, Feedback data for the corresponding standards; If the comprehensive abnormality score exceeds the preset step threshold, it is judged as poor processing or abnormal processing, and the system makes corresponding adjustments; for poor processing, the cutting parameters are adjusted, and for abnormal processing, the processing is stopped and an alarm is issued; Abnormal evaluation also includes setting abnormal extreme values for each data item. If the deviation value of the corresponding data item exceeds the set single abnormal extreme value, it is also judged as abnormal processing.
5. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The structure of the tool condition analysis model includes: Image analysis layer: used to process the image data of the tool. The convolutional neural network analyzes the surface image of the tool and identifies the physical state of the tool. The image data processing includes image preprocessing, feature extraction, image classification and defect detection, which is used to identify the appearance damage and deformation of the tool and provide a visual assessment of the health of the tool. The physical state of the tool includes wear, damage and cracks. Vibration and pressure data analysis layer: used to extract the vibration characteristics corresponding to the frequency, amplitude and waveform of tool vibration, and the pressure characteristics corresponding to the pressure data at the connection between the tool and the workpiece and the fixture; the vibration characteristics are obtained through fast Fourier transform; the pressure data is obtained through data fluctuation analysis. This layer provides predictions of tool failure or excessive wear; Data fusion layer: used to fuse the results of the image analysis layer and the vibration and pressure data analysis layer, and combine the analysis results of various data to comprehensively evaluate the overall status of the tool; by weighted fusion of the output results of the two analysis layers, the tool status is quantified into a tool health score; Life prediction and matching analysis layer: It is used to calculate the estimated life of the tool based on the fused tool health score, combined with historical data and the time-series cutting parameters of the workpiece processing, using regression analysis; and evaluate the processing matching degree between the current tool and the workpiece, determine whether the tool is suitable for the current processing task, and output the decision basis for recommending tool replacement; Decision output layer: used to output tool health status assessment report based on life prediction and matching analysis results, including tool estimated life, processing matching and recommended tools for reference by system control and operators.
6. The method for controlling automatic machining of a lathe based on a numerical control device according to claim 5, characterized in that: The training of the tool condition analysis model includes: Dataset construction: historical production data is obtained, and the historical production data is labeled according to the actual condition of the tool to construct a labeled training data set; the training data set includes input data and corresponding tool health status labels for supervised learning; the training data set is divided into training set, validation set and test set before use; Data preprocessing and feature extraction: For image data, convolutional neural networks are used for image processing, including image enhancement, denoising, normalization and other operations to extract the surface features of the tool; for vibration and pressure data, frequency domain features are extracted through fast Fourier transform to analyze the fluctuations of vibration and pressure signals; Training process: A structure combining a deep convolutional neural network and a long short-term memory network is used for training using a training set. The deep convolutional neural network is used to process image data and extract the surface features of the tool from the image; the long short-term memory network is used to process the time series data of vibration and pressure and capture the dynamic features of the data changing over time. The loss function of the entire network is defined as: ,in is the predicted value of the output, is the corresponding tool health label, The total number of samples is the weight parameter, is the regularization coefficient, which is used to prevent overfitting and optimize the network parameters by minimizing the loss function; Model evaluation and adjustment: During the training process, the performance of the model is comprehensively evaluated by using cross-validation combined with accuracy and precision on the validation set; based on the training results, the hyperparameters of the tool condition analysis model during the training process are adjusted to further optimize the network structure and performance; Model testing and verification: After training is completed, the trained model is verified using the test set. The prediction accuracy of the model is evaluated by comparing the predicted results with the actual labels, and subsequent adjustments are made based on the errors. Finally, a tool condition analysis model is obtained that can comprehensively evaluate the health status of the tool based on production data.
7. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The dynamic control includes: Processing speed control: The control of processing speed is realized through a speed stage table, which includes different preset speed stages. The speed stage is dynamically adjusted based on the workpiece processing task data and the tool's historical wear data. Specifically, according to the workpiece processing type, material properties and tool wear, the matching speed stage is selected and maintained within the dynamic range. Speed stage adjustment: According to the workpiece processing requirements and tool health assessment report, select the most appropriate speed range from the stage table and adjust the speed stage to optimize the cutting process; Application of historical wear data: During the dynamic control process, the historical wear data of the tool is obtained in real time, including the tool wear curve and over-cutting conditions. By comparing the historical wear data with the real-time processing conditions, the speed stage is adjusted to adapt to the current processing task requirements of the tool and workpiece.
8. The lathe automatic machining control method based on a numerical control device according to claim 1, characterized in that: The production control includes: Task priority determination: Comprehensively evaluate the priority of each task based on the type, urgency and production target of the workpiece processing task; allocate resources based on priority to ensure that critical or urgent tasks are given priority and avoid production bottlenecks caused by task delays; Production resource status monitoring: Real-time monitoring of resource status on the production line, including the operating status of equipment, the health of tools and the supply of workpieces; by collecting real-time data on various resources, assess whether production resources are sufficient and whether there is any waste or shortage of resources; Automatic scheduling of processing tasks: Automatically schedule processing tasks based on the priority of workpiece processing tasks, production resource status and historical processing data; dynamically adjust processing sequence and task allocation based on real-time data and task priority; Real-time update of production schedule: Dynamically update the production schedule according to the completion progress of the processing tasks and the real-time status of the production line to ensure the accuracy and timeliness of the scheduling information; optimize the production plan by adjusting the start and completion time of the processing tasks to avoid conflicts between tasks and waste of resources; Optimize production resource allocation: Based on real-time updates of production scheduling, adjust the allocation plan of production resources to ensure efficient configuration and utilization of resources such as equipment, tools, and workpieces.
9. A lathe automatic processing control system based on a numerical control device, characterized in that: The system applies a lathe automatic machining control method based on a numerical control device as described in any one of claims 1 to 8, and comprises the following modules: Data acquisition module: used to obtain production data in the automated processing process through sensors on the lathe; Automatic control module: used to control the position of the tool through the processing control system composed of a single-chip microcomputer combined with the cutting parameters; and to adjust the cutting parameters of the tool through real-time production data feedback; Tool analysis module: used to input production data into the tool condition analysis model for calculation, and output a tool health assessment report, including estimated life, processing matching degree and recommended tools, which is used to remind tool replacement. The tool replacement is automatically performed through a four-position automatic tool holder; Dynamic control module: Based on the workpiece processing task data and the historical wear data of the tool, the processing speed of the workpiece is dynamically controlled; Production control module: used to automatically schedule processing tasks according to the priority of workpiece processing tasks and production resource conditions, update the production schedule in real time, optimize production resource allocation, and improve production efficiency.
Citation Information
Patent Citations
Big data-based equipment predictive maintenance method
CN112070264A
Tool state monitoring system and method based on machine tool vibration signals
CN113894617A
Digital twin-driven tool wear monitoring method and numerical control machine tool equipment
CN115509178A
Hobbing cutter wear trend prediction method based on DRSN and APF
CN118663999A
Numerical control machine tool working parameter monitoring method and system
CN118699877A
Cited By
Machine tool machining tool centralized management and control method and system
CN120779858A
Cutter life prediction method and device based on multi-source data, equipment and medium
CN120805317A
Tool life prediction method, device, equipment and medium based on multi-source data
CN120805317B