Control method for dynamically adjusting drilling and reaming tool apron on Y axis of high-precision numerical control lathe

By constructing a motion prediction model based on LSTM and a dynamic adjustment decision model for Markov's decision-making process, the accuracy and efficiency problems of the traditional CNC lathe Y-axis motion control method in the face of workpiece material differences, tool wear and processing parameters changes, and high-precision and high-efficiency Y-axis motion control are achieved.

CN119806037AInactive Publication Date: 2025-04-11HANGZHOU FINE METAL MACHINING

Patent Information

Application Number
CN202510285918.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional CNC lathe Y-axis motion control methods face different workpiece materials, tool wear and changes in processing parameters, it is difficult to ensure machining accuracy and efficiency, and lack intelligent dynamic adjustment support.

Method used

By collecting and analyzing historical processing data, a motion prediction model based on LSTM algorithm is constructed, and a real-time processing state data is used to predict and deviations are discovered in a timely manner. At the same time, a dynamic adjustment decision model for Markov's decision-making process is constructed, and a reinforcement learning algorithm is used to make real-time adjustment decisions.

Benefits of technology

It significantly improves the accuracy and efficiency of Y-axis motion, enhances the flexibility and accuracy of dynamic adjustment, reduces processing waste and delays, reduces operational difficulty and improves overall processing quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806037A_ABST
    Figure CN119806037A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical control lathe control, discloses a high-precision numerical control lathe Y-axis dynamic adjustment drilling reamer holder control method, and aims to improve the precision and efficiency of Y-axis motion control. According to the method, Y-axis motion data, machining parameters, tool abrasion and workpiece material information in the historical machining process are collected, and a motion prediction model is constructed. And acquiring current processing state data in real time, and inputting the model to predict a Y-axis movement track. Meanwhile, Y-axis real-time motion data are obtained and compared with a predicted track, and deviation points are marked. And then, a Y-axis dynamic adjustment decision model is constructed, and the adjustment process is modeled as a Markov decision process. And performing real-time control based on the trained decision model, selecting an optimal adjustment action according to the current processing state and strategy, and automatically executing the optimal adjustment action. According to the method, multiple factors are comprehensively considered, the prediction accuracy and the adjustment flexibility are improved, and the machining quality and the production efficiency are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of CNC lathe control, in particular to a control method for a high-precision CNC lathe Y-axis dynamically adjusting a drill reamer seat. Background Art

[0002] With the rapid development of the manufacturing industry, high-precision CNC lathes play an increasingly important role in the field of mechanical processing. CNC lathes can achieve efficient and accurate processing of complex workpieces through precise control systems. However, in the processing of CNC lathes, the motion control of the Y-axis (usually refers to the feed axis perpendicular to the spindle) has a vital impact on the processing accuracy and efficiency. Especially in the control of key components such as drill reamer seats, the motion accuracy of the Y-axis is directly related to the processing quality and production efficiency of the workpiece.

[0003] Traditional CNC lathe Y-axis control methods mainly rely on preset machining programs and fixed control parameters. In the actual machining process, due to differences in workpiece materials, tool wear, and changes in machining parameters, the motion trajectory of the Y-axis often deviates, resulting in reduced machining accuracy. In order to compensate for these deviations, operators usually need to rely on experience and manual adjustments, which not only reduces machining efficiency, but also makes it difficult to ensure the consistency and accuracy of adjustments.

[0004] In recent years, with the continuous advancement of data analysis and machine learning technology, new ideas have been provided for the Y-axis control of CNC lathes. By collecting and analyzing data from historical processing processes, a prediction model can be constructed to estimate the future motion trajectory of the Y-axis. However, existing prediction models often only consider a single processing parameter or tool state, ignoring the influence of multiple factors such as workpiece material on the Y-axis motion, resulting in limited accuracy of the prediction results. In addition, in terms of dynamic adjustment of the Y-axis, traditional control methods lack intelligent decision support. When motion deviation is detected, usually only a fixed adjustment strategy can be adopted, and it is impossible to make the optimal adjustment decision based on the current processing status and environmental conditions. This not only limits the flexibility and accuracy of the Y-axis adjustment, but may also lead to unnecessary waste and delays in the processing process. Summary of the invention

[0005] The object of the present invention is to provide a control method for dynamically adjusting a drill bit holder on the Y-axis of a high-precision CNC lathe, so as to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a control method for dynamically adjusting a drill reamer seat on a Y-axis of a high-precision CNC lathe, the method comprising: F1: Collect the Y-axis motion data, processing parameters, tool wear and workpiece material information of the CNC lathe during the historical processing; pre-process the collected data to form a feature data set; F2: Build a motion prediction model for the Y-axis of a CNC lathe. This model is based on the feature data set and combines machining parameters, tool status, and workpiece material to predict the motion trajectory of the Y-axis in the future. F3: Obtain the current processing parameters, tool status and workpiece material data of the CNC lathe in real time, input the acquired data into the motion prediction model, and receive the predicted Y-axis motion trajectory output by the model; F4: Get the real-time motion data of the Y axis of the CNC lathe; align the timestamps of the real-time motion data and the predicted motion data output by the model, and compare them in the same coordinate system; set the trajectory deviation threshold to determine whether each corresponding point on the two sets of data has a deviation exceeding the threshold, and if so, mark it as a deviation point; F5: Construct a Y-axis dynamic adjustment decision model and model the Y-axis adjustment process as a Markov decision process; F6: Based on the trained Y-axis dynamic adjustment decision model, real-time control is performed. The processing parameters, tool status and workpiece material data of the CNC lathe are collected in real time as model input. The optimal adjustment action is selected according to the current status and strategy, and the decision result is automatically executed.

[0007] Preferably, the motion prediction model is constructed using a long short-term memory network LSTM algorithm, and its network structure includes: Input layer: used to receive feature data sets as input, wherein the feature data sets include time series motion data, processing parameters, tool status data, workpiece material data and time-related features; Hidden layer: contains at least one LSTM hidden layer. Each LSTM hidden layer contains several LSTM units. Each LSTM unit has an input gate, a forget gate, and an output gate to control the flow of information and state updates. Output layer: Receives the output of the hidden layer and maps the output of the LSTM network to the predicted Y-axis motion trajectory and position through a fully connected layer or regression layer.

[0008] Preferably, the Y-axis dynamic adjustment decision model construction method includes: Define the state space: It is defined as the combination of the real-time motion data of the Y axis of the CNC lathe, processing parameters, tool status and workpiece material; Define the action space: Define it as a set of executable Y-axis adjustment operations; Define the reward function: Design it based on the machining accuracy and efficiency optimization goals, including a reward mechanism for trajectory stability, machining accuracy maintenance, and efficiency improvement. At the same time, combined with the monitored trajectory deviation data, give additional rewards to operations that reduce deviations, and give additional penalties to operations that increase deviations; Define output strategy: Defined as a method to select the best adjustment action under the current state, and continuously optimize the generated adjustment actions through reinforcement learning algorithm.

[0009] Preferably, the Y-axis motion data includes position, speed, acceleration and vibration; the processing parameters include feed speed, spindle speed and cutting depth; the tool status includes tool wear degree, tool type and tool diameter; the workpiece material includes material type, hardness and thickness.

[0010] Preferably, the executable Y-axis adjustment operation set includes: adjusting feed speed, changing cutting depth, adjusting spindle speed, changing tool, adjusting tool compensation value, calibrating Y-axis sensor, and adjusting control system parameters.

[0011] Preferably, the reward function R is composed of multiple sub-reward items, and the total reward value is obtained by weighted summation. The specific formula is: R = w1 * R_stab + w2 * R_prec + w3 * R_eff + w4 * R_maint + w5 * R_dev Among them, R_stab represents the reward item for trajectory stability, which is calculated according to the degree of fluctuation of the Y-axis motion trajectory; R_prec represents the reward item for maintaining machining accuracy, which is calculated according to the maintenance of workpiece machining accuracy; R_eff represents the reward item for efficiency improvement, which is calculated according to the degree of improvement in machining efficiency; R_maint represents the reward item for preventive maintenance, which is calculated according to the execution and effect of preventive maintenance operations; R_dev represents the reward item or penalty item for trajectory deviation reduction. According to the monitored trajectory deviation data, positive rewards are given to operations that reduce deviations, and penalties are given to operations that increase deviations. Its value is set to a function that is inversely proportional or directly proportional to the change in deviation; w1, w2, w3, w4 and w5 are the weight coefficients of each sub-reward item, and w1+w2+w3+w4+w5=1.

[0012] Preferably, in step F5, a deep deterministic policy gradient DDPG algorithm is used to train the Y-axis dynamic adjustment decision model.

[0013] Preferably, the step of training the Y-axis dynamic adjustment decision model includes: A1. Initialize the Actor network and the Critic network: The Actor network is used to generate action strategies, and the Critic network is used to evaluate the value of state-action pairs; A2. Initialize the experience playback buffer D: Set the buffer size N to store the state transition experience generated during the Y-axis adjustment process of the CNC lathe, including state s, action a, reward r, next state s' and whether the termination flag is done; A3. For each training round: A301: Initialize the state s at the beginning of the round; A302: Before the round ends, the following steps are executed in a loop: i) The Actor network selects action a according to the current state s and adds exploration noise; ii) Execute action a, observe the reward r and the next state s', and whether the termination flag is done; iii) Store the experience (s, a, r, s', done) in the experience replay buffer D; iv) Randomly sample a batch of experience from the experience replay buffer D; v) Use the sampled experience to update the parameters of the Critic network; vi) Use the sampled experience and the evaluation of the Critic network to update the parameters of the Actor network; vii) Update the current state s to the next state s'; A303: When the round ends, reset state s to the new round start state; A4: During the training process, the performance of the decision model for dynamic adjustment of the Y-axis is regularly evaluated, and the weight coefficient of the reward function, the learning rate of the model, and the size of the exploration noise are adjusted according to the evaluation results; A5: Repeat steps A3 and A4 until a satisfactory performance level is achieved.

[0014] Preferably, in step A4, mean square error (MSE) is used as the performance evaluation index of the current round of training, and the specific implementation steps include: A401: Based on the sampled experience tuples (s, a, r, s'), the target critic network is used to calculate the target Q value of each experience tuple; A402: Calculate the predicted Q value of the main critic network for each state-action pair (s, a) in the experience tuple; A403: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current iteration. The calculation formula of MSE is:

[0015] Where N is the number of sampled experience tuples, is the target Q value, The predicted Q value of the main critic network; A404: Based on the calculated MSE value, the parameters of the main critic network are updated using the gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main critic network; A405: Use the updated Critic network evaluation to update the parameters of the Actor network through the policy gradient method; A406: Repeat steps A401 to A405 until the end condition of the current training round is met, and then enter the next training round.

[0016] Preferably, the experience replay buffer D adopts a priority experience replay mechanism, wherein the storage and sampling probability of the experience tuple is proportional to the absolute value of the corresponding timing difference error.

[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention constructs a comprehensive motion prediction model by collecting and analyzing the Y-axis motion data, processing parameters, tool wear and workpiece material information in the historical processing process. The model can comprehensively consider multiple influencing factors and accurately predict the motion trajectory of the Y-axis in the future, thereby significantly improving the processing accuracy. The current processing state data is obtained in real time and compared with the motion trajectory output by the prediction model, and the deviation points are discovered and marked in time, providing an accurate basis for subsequent dynamic adjustments.

[0018] The present invention constructs a Y-axis dynamic adjustment decision model, models the adjustment process as a Markov decision process, and can make the optimal adjustment decision according to the current processing state and environmental conditions. This intelligent decision support method breaks the limitations of the traditional fixed adjustment strategy, enhances the flexibility and accuracy of the Y-axis adjustment, and ensures the consistency and effectiveness of the adjustment action. Through real-time prediction and dynamic adjustment, the present invention can timely detect and correct the deviation of the Y-axis motion trajectory, avoiding processing waste and delays caused by deviation. The intelligent adjustment decision model can automatically execute the optimal adjustment action, reduce the manual intervention of the operator, and significantly improve the processing efficiency.

[0019] The present invention can be applied to workpieces of different materials, different shapes and different processing requirements, and has strong adaptability. By continuously collecting and analyzing new processing data, the motion prediction model and the dynamic adjustment decision model can be continuously optimized, further improving the performance and effect of the control method. Intelligent control of Y-axis motion is achieved, reducing the operator's dependence on experience and skills, and reducing the difficulty of operation. By improving processing accuracy and efficiency, the cost increase caused by deviation and waste is reduced, and the overall processing cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a processing step diagram of the control method of the CNC lathe Y-axis dynamic adjustment drill and reamer seat according to the present invention; Figure 2 A diagram showing how the decision model works when the Y axis is dynamically adjusted; Figure 3 Flowchart for constructing a Y-axis dynamic adjustment decision model. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] See also Figure 1-Figure 3 The present invention provides a technical solution: a control method for dynamically adjusting a drill and reamer seat on a Y-axis of a high-precision CNC lathe, the method comprising: F1: Data collection and preprocessing, collect the Y-axis motion data of the CNC lathe during the historical processing, including but not limited to the Y-axis displacement, speed, acceleration and other time series data. At the same time, record the corresponding processing parameters (such as cutting speed, feed rate, spindle speed, etc.), tool wear (such as tool wear, number of times used, etc.) and workpiece material information (such as material type, hardness, etc.). Clean the collected raw data, remove outliers and noise, and then normalize or standardize it to form a feature data set, which provides a basis for subsequent model construction.

[0023] F2: Construct a motion prediction model. Based on the preprocessed feature data set, a motion prediction model for the Y axis of a CNC lathe is constructed. The model uses a machine learning algorithm and combines multi-dimensional features such as machining parameters, tool status, and workpiece material to train the model to predict the motion trajectory of the Y axis in the future. During the model training process, the model parameters are optimized through cross-validation and other methods to improve the prediction accuracy.

[0024] F3: Real-time prediction of Y-axis motion trajectory. During the actual machining process of the CNC lathe, the current machining parameters, tool status and workpiece material data are obtained in real time and passed as input to the trained motion prediction model. After receiving the input data, the model outputs the predicted Y-axis motion trajectory to provide a benchmark for subsequent real-time adjustments.

[0025] F4: Real-time motion data comparison and deviation detection. At the same time, obtain the real-time motion data of the Y axis of the CNC lathe, including the actual displacement, speed, etc. Align the timestamps of the real-time motion data with the predicted motion data output by the model to ensure that the two are comparable in the same time dimension. Draw two sets of data in the same coordinate system, set the trajectory deviation threshold, compare the two sets of data point by point, determine whether there are deviation points that exceed the threshold, and mark them.

[0026] F5: Construct a dynamic adjustment decision model for the Y axis. Based on the Markov decision process (MDP) theory, construct a dynamic adjustment decision model for the Y axis. Consider the adjustment process of the Y axis as a sequential decision problem, define the state space (including the current position, speed, processing parameters, etc. of the Y axis), action space (such as adjustment amount, adjustment direction, etc.), state transition probability, and reward function. Train the decision model through the reinforcement learning algorithm so that it can select the optimal adjustment action according to the current state.

[0027] F6: Real-time control and adjustment. In the actual processing process, real-time control is performed based on the trained Y-axis dynamic adjustment decision model. The processing parameters, tool status and workpiece material data of the CNC lathe are collected in real time as model input. According to the current state, the model selects the optimal adjustment action based on the learned strategy, such as adjusting the position or speed of the Y-axis to correct the prediction deviation or adapt to the processing change. The decision result is automatically executed through the interface of the CNC system to realize the dynamic adjustment of the Y-axis and ensure the processing accuracy and efficiency.

[0028] The present invention will be further described below in conjunction with Examples 1 to 3: Embodiment 1: The motion prediction model is constructed using the long short-term memory network (LSTM) algorithm. The following is a detailed implementation of the method: Collect relevant data of CNC lathes in the historical processing process, including time series Y-axis motion data (such as displacement, speed, acceleration, etc.), processing parameters (such as cutting speed, feed rate, spindle speed, etc.), tool status data (such as tool wear, tool type, number of times used, etc.), workpiece material data (such as material type, hardness, thickness, etc.) and time-related features (such as processing time period, date, etc.). Clean and preprocess these raw data, remove outliers and noise, and perform normalization or standardization to construct a feature data set.

[0029] Based on the preprocessed feature data set, an LSTM motion prediction model is constructed. The network structure of the model specifically includes: Input layer: Designed to receive feature data sets as input. The input layer integrates the time series motion data, machining parameters, tool status data, workpiece material data, and time-related features to form an input vector with fixed dimensions.

[0030] Hidden layer: contains at least one LSTM hidden layer. Each LSTM hidden layer consists of several LSTM units, each of which has an input gate, a forget gate, and an output gate. The input gate is responsible for controlling the inflow of new information, the forget gate determines the degree of discarding of old information, and the output gate is responsible for outputting the state of the current unit. This gating mechanism enables the LSTM network to effectively capture and memorize long-term dependencies in time series data, thereby more accurately predicting the future movement trajectory of the Y axis.

[0031] Output layer: Receives the output of the hidden layer and maps the output of the LSTM network to the predicted Y-axis motion trajectory and position through a fully connected layer or regression layer. The design of the output layer depends on the specific prediction task and can output the future displacement, velocity or acceleration of the Y-axis.

[0032] The LSTM motion prediction model is trained using the constructed feature dataset. During the training process, a suitable loss function (such as mean square error MSE) is used to evaluate the prediction performance of the model, and the weights and biases of the model are updated through the back propagation algorithm and optimizer (such as Adam optimizer) to minimize the loss function. Through multiple iterations of training, the model gradually converges to the optimal state.

[0033] In the actual processing of the CNC lathe, the current processing parameters, tool status and workpiece material data, as well as the Y-axis motion data of the time series are obtained in real time. These data are passed as input to the trained LSTM motion prediction model. After receiving the input data, the model outputs the predicted Y-axis motion trajectory and position through calculations in the input layer, hidden layer and output layer. The predicted Y-axis motion trajectory and position can be used as a benchmark for subsequent real-time adjustments. By comparing the real-time acquired Y-axis motion data and the predicted data, the existing deviation can be detected, and the Y-axis dynamic adjustment decision model can be triggered to make corresponding adjustments. In this way, it can be ensured that the CNC lathe always maintains high-precision Y-axis motion control during the processing process, thereby improving the processing quality and production efficiency of the workpiece.

[0034] Embodiment 2: The method for constructing the Y-axis dynamic adjustment decision model specifically includes the following steps: Define the state space: The state space is defined as the combination of the real-time motion data, processing parameters, tool status, and workpiece material of the Y-axis of the CNC lathe. The real-time motion data includes the current position, speed, acceleration, etc. of the Y-axis; the processing parameters include cutting speed, feed rate, spindle speed, etc.; the tool status includes tool wear, tool type, number of times used, etc.; the workpiece material includes material type, hardness, thickness, etc. These state variables together constitute the state space of the decision model, which is used to describe the complete state of the Y-axis of the CNC lathe at the current moment.

[0035] Define the action space: The action space is defined as a set of executable Y-axis adjustment operations. These adjustment operations can include Y-axis position adjustment, speed adjustment, acceleration adjustment, etc. The specific range of the action space is determined according to the actual situation of the CNC lathe and the processing requirements to ensure that the adjustment operation is physically feasible and can effectively improve the motion performance of the Y-axis.

[0036] Define the reward function: The reward function is designed based on the optimization goals of machining accuracy and efficiency, and contains multiple sub-reward items. The total reward value is obtained by weighted summation. The specific formula is: R = w1 * R_stab + w2 * R_prec + w3 * R_eff + w4 * R_maint + w5 * R_dev Among them, R_stab represents the reward item for trajectory stability, which is calculated according to the degree of fluctuation of the Y-axis motion trajectory. The smaller the degree of fluctuation, the greater the reward value; R_prec represents the reward item for maintaining machining accuracy, which is calculated according to the maintenance of the workpiece machining accuracy. The higher the machining accuracy, the greater the reward value; R_eff represents the reward item for efficiency improvement, which is calculated according to the degree of improvement in machining efficiency. The higher the machining efficiency, the greater the reward value; R_maint represents the reward item for preventive maintenance, which is calculated according to the execution and effect of preventive maintenance operations. The reward value increases when effective preventive maintenance operations are performed; R_dev represents the reward item or penalty item for reducing trajectory deviation, which is calculated based on the monitored trajectory deviation data. Positive rewards are given to operations that reduce deviations, and the reward value is proportional to the amount of deviation reduction; penalties are given to operations that increase deviations, and the penalty value is proportional to the amount of deviation increase.

[0037] w1, w2, w3, w4 and w5 are the weight coefficients of each sub-reward item, and they satisfy w1+w2+w3+w4+w5=1. The specific values ​​of the weight coefficients are determined according to the processing requirements and optimization goals to ensure that the reward function can accurately reflect the key elements in the processing process.

[0038] Defining the output strategy: The output strategy is defined as the method of selecting the optimal adjustment action in the current state. The generated adjustment actions are continuously optimized by the reinforcement learning algorithm. During the training process, the reinforcement learning algorithm selects actions based on the current state, observes the resulting state after executing the action and obtains the reward value, and then updates the strategy to maximize the expected value of future rewards. Through continuous iterative training, the strategy gradually converges to the optimal state and can select the optimal adjustment action in the current state.

[0039] Take the example of a CNC lathe machining a precision part. Assume that there is a slight fluctuation in the Y axis in the initial state, and the machining accuracy and efficiency are within an acceptable range. According to the defined state space, the current position, speed, acceleration and other motion data of the Y axis, as well as information such as machining parameters, tool status and workpiece material are obtained in real time. Then, according to the defined action space, possible adjustment operations are selected, such as fine-tuning the position or speed of the Y axis. After performing the adjustment operation, the reward value is calculated according to the defined reward function. If the adjustment operation reduces the fluctuation degree of the Y axis, improves the machining accuracy and efficiency, and performs effective preventive maintenance operations, then the reward value will be large. Conversely, if the adjustment operation increases the fluctuation degree of the Y axis or reduces the machining accuracy and efficiency, then the reward value will be small or negative.

[0040] The optimal adjustment action is selected according to the defined output strategy. During the training process, the reinforcement learning algorithm continuously tries different adjustment operations and updates the strategy based on the reward value. Eventually, the strategy can learn to select the optimal adjustment action in the current state to ensure the optimal motion performance of the Y axis of the CNC lathe.

[0041] Embodiment 3: This embodiment uses the deep deterministic policy gradient (DDPG) algorithm to train the Y-axis dynamic adjustment decision model. The following are the detailed implementation steps of the training process: A1. Initialize the Actor network and the Critic network Actor network: responsible for generating action strategies, that is, outputting a certain action based on the current state. The output layer of the actor network is usually a vector that matches the dimension of the action space, indicating the recommended action to be performed in each state.

[0042] Critic network: used to evaluate the value of state-action pairs. That is, given a state and an action, the Critic network outputs a Q value, which represents the expected benefit of performing the action in that state.

[0043] Both networks use a deep neural network structure and are initialized with randomly initialized weights.

[0044] A2. Initialize the experience playback buffer D and set the buffer size N to store the state transition experience generated during the Y-axis adjustment process of the CNC lathe. The experience tuple includes: state s, action a, reward r, next state s' and whether it is terminated.

[0045] The experience replay buffer D is used to store and reuse past experiences during training to improve sample efficiency and training stability.

[0046] A3. For each training round: A301: Initialize the state s at the beginning of the round according to the current working state and processing task of the CNC lathe.

[0047] A302: Before the round ends, the following steps are executed in a loop: i) The Actor network selects an action a based on the current state s and adds exploration noise to encourage exploration. The exploration noise can be Gaussian noise or other forms of random noise.

[0048] ii) Perform action a on the CNC lathe, observe the reward r and next state s', and whether the termination flag is done.

[0049] iii) Store the experience tuple (s, a, r, s', done) into the experience replay buffer D.

[0050] iv) Randomly sample a batch of experiences from the experience replay buffer D to update the network parameters.

[0051] v) Using the sampled experience, calculate the target Q value and update the parameters of the Critic network through the gradient descent algorithm to minimize the difference between the predicted Q value and the target Q value.

[0052] vi) Using the sampled experience and the updated Critic network evaluation, the parameters of the Actor network are updated through the policy gradient method to maximize the expected return.

[0053] vii) Update the current state s to the next state s' and continue with the next loop iteration.

[0054] A303: When the round ends (such as reaching the maximum number of steps or completing the processing task), reset the state s to the new round start state and prepare to start the next training round.

[0055] A4. During the training process, the performance of the Y-axis dynamic adjustment decision model is regularly evaluated. The mean square error (MSE) is used as the performance evaluation indicator for the current round of training.

[0056] A401: Based on the sampled experience tuples (s, a, r, s'), the target critic network is used to calculate the target Q value of each experience tuple. The target Q value is usually calculated based on the Bellman equation, taking into account the immediate reward r and the expected return of the next state.

[0057] A402: Calculate the predicted Q value of the main critic network for each state-action pair (s, a) in the experience tuple.

[0058] A403: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current iteration. The calculation formula of MSE is:

[0059] Where N is the number of sampled experience tuples, is the target Q value, The predicted Q value of the main critic network.

[0060] A404: Based on the calculated MSE value, the parameters of the main critic network are updated using the gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main critic network.

[0061] A405: Using the updated Critic network evaluation, update the parameters of the Actor network through the policy gradient method to maximize the expected return.

[0062] A406: Repeat steps A401 to A405 until the end condition of the current training round is reached (such as reaching the maximum number of iterations or the MSE value converges), and then enter the next training round.

[0063] Priority experience replay mechanism: The experience replay buffer D adopts a priority experience replay mechanism, in which the storage and sampling probability of the experience tuple is proportional to the absolute value of its corresponding temporal difference error (TD error). The TD error reflects the difference between the predicted Q value and the target Q value. The experience tuple with a larger error is considered to contribute more to learning, and therefore has a higher probability of being sampled. Through the priority experience replay mechanism, limited experience data can be used more effectively and the model training process can be accelerated.

[0064] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0065] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A control method for dynamically adjusting the drill bit holder on the Y-axis of a high-precision CNC lathe, characterized in that: The method comprises: F1: Collect the Y-axis motion data, processing parameters, tool wear and workpiece material information of the CNC lathe during the historical processing; pre-process the collected data to form a feature data set; F2: Build a motion prediction model for the Y-axis of a CNC lathe. This model is based on the feature data set and combines machining parameters, tool status, and workpiece material to predict the motion trajectory of the Y-axis in the future. F3: Obtain the current processing parameters, tool status and workpiece material data of the CNC lathe in real time, input the acquired data into the motion prediction model, and receive the predicted Y-axis motion trajectory output by the model; F4: Get the real-time motion data of the Y axis of the CNC lathe; align the timestamps of the real-time motion data and the predicted motion data output by the model, and compare them in the same coordinate system; set the trajectory deviation threshold to determine whether each corresponding point on the two sets of data has a deviation exceeding the threshold, and if so, mark it as a deviation point; F5: Construct a Y-axis dynamic adjustment decision model and model the Y-axis adjustment process as a Markov decision process; F6: Based on the trained Y-axis dynamic adjustment decision model, real-time control is performed. The processing parameters, tool status and workpiece material data of the CNC lathe are collected in real time as model input. The optimal adjustment action is selected according to the current status and strategy, and the decision result is automatically executed.

2. The high-precision CNC lathe Y-axis dynamic adjustment drill and reamer toolholder control method according to claim 1 is characterized in that: The motion prediction model is constructed using the long short-term memory network LSTM algorithm, and its network structure includes: Input layer: used to receive feature data sets as input, wherein the feature data sets include time series motion data, processing parameters, tool status data, workpiece material data and time-related features; Hidden layer: contains at least one LSTM hidden layer. Each LSTM hidden layer contains several LSTM units. Each LSTM unit has an input gate, a forget gate, and an output gate to control the flow of information and state updates. Output layer: Receives the output of the hidden layer and maps the output of the LSTM network to the predicted Y-axis motion trajectory and position through a fully connected layer or regression layer.

3. The high-precision CNC lathe Y-axis dynamic adjustment drill and reamer toolholder control method according to claim 1 is characterized in that: The Y-axis dynamic adjustment decision model construction method includes: Define the state space: It is defined as the combination of the real-time motion data of the Y axis of the CNC lathe, processing parameters, tool status and workpiece material; Define the action space: Define it as a set of executable Y-axis adjustment operations; Define the reward function: Design it based on the machining accuracy and efficiency optimization goals, including a reward mechanism for trajectory stability, machining accuracy maintenance, and efficiency improvement. At the same time, combined with the monitored trajectory deviation data, give additional rewards to operations that reduce deviations, and give additional penalties to operations that increase deviations; Define output strategy: Defined as a method to select the best adjustment action under the current state, and continuously optimize the generated adjustment actions through reinforcement learning algorithm.

4. The high-precision CNC lathe Y-axis dynamic adjustment drill and reamer toolholder control method according to claim 3 is characterized in that: The Y-axis motion data includes position, speed, acceleration and vibration; the processing parameters include feed speed, spindle speed and cutting depth; the tool status includes tool wear degree, tool type and tool diameter; the workpiece material includes material type, hardness and thickness.

5. The method for controlling the Y-axis dynamic adjustment drill and reamer seat of a high-precision CNC lathe according to claim 3 is characterized in that: The executable Y-axis adjustment operation set includes: adjusting feed speed, changing cutting depth, adjusting spindle speed, changing tool, adjusting tool compensation value, calibrating Y-axis sensor, and adjusting control system parameters.

6. The method for controlling the Y-axis dynamic adjustment drill and reamer seat of a high-precision CNC lathe according to claim 3, characterized in that: The reward function R is composed of multiple sub-reward items, and the total reward value is obtained by weighted summation. The specific formula is: R = w1 * R_stab + w2 * R_prec + w3 * R_eff + w4 * R_maint + w5 * R_dev Among them, R_stab represents the reward item for trajectory stability, which is calculated according to the degree of fluctuation of the Y-axis motion trajectory; R_prec represents the reward item for maintaining machining accuracy, which is calculated according to the maintenance of workpiece machining accuracy; R_eff represents the reward item for efficiency improvement, which is calculated according to the degree of improvement in machining efficiency; R_maint represents the reward item for preventive maintenance, which is calculated according to the execution and effect of preventive maintenance operations; R_dev represents the reward item or penalty item for trajectory deviation reduction. According to the monitored trajectory deviation data, positive rewards are given to operations that reduce deviations, and penalties are given to operations that increase deviations. Its value is set to a function that is inversely proportional or directly proportional to the change in deviation; w1, w2, w3, w4 and w5 are the weight coefficients of each sub-reward item, and w1+w2+w3+w4+w5=1.

7. The method for controlling the Y-axis dynamic adjustment drill and reamer seat of a high-precision CNC lathe according to claim 3 is characterized in that: In step F5, a deep deterministic policy gradient DDPG algorithm is used to train the Y-axis dynamic adjustment decision model.

8. The method for controlling the Y-axis dynamic adjustment drill and reamer seat of a high-precision CNC lathe according to claim 7 is characterized in that: The steps for training the Y-axis dynamic adjustment decision model include: A1. Initialize the Actor network and the Critic network: The Actor network is used to generate action strategies, and the Critic network is used to evaluate the value of state-action pairs; A2. Initialize the experience playback buffer D: Set the buffer size N to store the state transition experience generated during the Y-axis adjustment process of the CNC lathe, including state s, action a, reward r, next state s' and whether the termination flag is done; A3. For each training round: A301: Initialize the state s at the beginning of the round; A302: Before the round ends, the following steps are executed in a loop: i) The Actor network selects action a according to the current state s and adds exploration noise; ii) Execute action a, observe the reward r and the next state s', and whether the termination flag is done; iii) Store the experience (s, a, r, s', done) in the experience replay buffer D; iv) Randomly sample a batch of experience from the experience replay buffer D; v) Use the sampled experience to update the parameters of the Critic network; vi) Use the sampled experience and the evaluation of the Critic network to update the parameters of the Actor network; vii) Update the current state s to the next state s'; A303: When the round ends, reset state s to the new round start state; A4: During the training process, the performance of the decision model for dynamic adjustment of the Y-axis is regularly evaluated, and the weight coefficient of the reward function, the learning rate of the model, and the size of the exploration noise are adjusted according to the evaluation results; A5: Repeat steps A3 and A4 until a satisfactory performance level is achieved.

9. The high-precision CNC lathe Y-axis dynamic adjustment drill and reamer toolholder control method according to claim 8, characterized in that: In step A4, mean square error (MSE) is used as the performance evaluation index of the current round of training, and the specific implementation steps include: A401: Based on the sampled experience tuples (s, a, r, s'), the target critic network is used to calculate the target Q value of each experience tuple; A402: Calculate the predicted Q value of the main critic network for each state-action pair (s, a) in the experience tuple; A403: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current iteration. The calculation formula of MSE is: Where N is the number of sampled experience tuples, is the target Q value, The predicted Q value of the main critic network; A404: Based on the calculated MSE value, the parameters of the main critic network are updated using the gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main critic network; A405: Use the updated Critic network evaluation to update the parameters of the Actor network through the policy gradient method; A406: Repeat steps A401 to A405 until the end condition of the current training round is met, and then enter the next training round.

10. The method for controlling the Y-axis dynamic adjustment drill and reamer seat of a high-precision CNC lathe according to claim 8, characterized in that: The experience replay buffer D adopts a priority experience replay mechanism, in which the storage and sampling probability of the experience tuple is proportional to the absolute value of the corresponding timing difference error.

Citation Information

Patent Citations

  • Using divergence to conduct log-based simulations

    CN112740188A

  • Deviation reporting method and device and related equipment

    CN114726875A

  • Numerical control machine tool optimization algorithm based on artificial intelligence and machine learning

    CN117826599A

  • Real-time fusion online monitoring method and system for test and simulation data

    CN118886276A

  • Path generation method, device and equipment for multi-axis linkage machining and storage medium

    CN119126670A

Cited By

  • Precise positioning electrical control system for die of roll forging machine

    CN120382120A

  • Pipe fitting joint turning precision control method and system

    CN120734370A

  • Pipe joint turning machining precision control method and system

    CN120734370B

  • Cutter structure data prediction method and device, equipment and storage medium

    CN121389809A

  • Tool structure data prediction method, device, equipment and storage medium

    CN121389809B