Tool row clamp control method for CNC machining center
By building an exploration environment and reward return unit, and using machine learning technology to optimize the tooling clip control strategy of the CNC machining center, the problem of lack of flexibility and adaptability of control methods in the existing technology is solved, and higher automation and accuracy are achieved, and the dependence on operator experience is reduced.
Patent Information
- Application Number
- CN202411399237.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The tooling and shift clamp control method of the existing CNC machining center lacks flexibility and adaptability, and is difficult to cope with complex and changing processing environments. It relies on operator experience and skills, which limits the improvement of automation level and operation consistency.
By building exploration environment and reward return units, machine learning technology is used to optimize the control strategy of tooling mounts. Explore the actual processing environment of the environment, and the reward return unit feedbacks the reward signal based on real-time data to maximize the total reward optimization control law.
It improves the automation level and accuracy of the processing process, reduces the dependence on operator experience, reduces the possibility of human operation errors, and enhances the adaptability and robustness of the control system to complex processing conditions.
Smart Images

Figure CN119511933A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of automation control technology, and in particular to a tooling clamping control method for a CNC machining center. Background Art
[0002] In traditional CNC machining center operations, the control of tooling clamps usually relies on preset fixed programs and manual adjustments by operators. These methods often cannot adapt to dynamic changes in the machining process, such as slight deformation of the workpiece, tool wear and other factors, resulting in limited machining accuracy and efficiency. In addition, the adjustment of fixed programs requires professional knowledge and experience, and requires high skills from the operator, which is not conducive to the development of automation and intelligence. The technical principle is mainly based on mechanical engineering and control theory, and the control of tooling clamps is achieved through the design of mechanical structures and the configuration of electrical control systems.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: the existing control methods lack flexibility and adaptability, and are difficult to cope with complex and changeable processing environments; the adjustment process of fixed programs is cumbersome and inefficient, which is not conducive to rapid response to changes in production needs; at the same time, excessive reliance on the operator's experience and skills limits the improvement of the automation level and the consistency of operations. Summary of the invention
[0004] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0005] The purpose of the embodiment of the present invention is to provide a tool clamping control method for a CNC machining center, which can achieve rapid response and effective defense against network security threats and improve the overall security protection capability of the network through a series of innovative training methods and technical strategies.
[0006] The embodiment of the present invention relates to a tooling arrangement control method for a CNC machining center, comprising:
[0007] Construct the exploration environment required for learning the control law of tooling clamping;
[0008] According to the workpiece position, workpiece speed, and expected workpiece position command output by the exploration environment, construct an input signal required for learning the tooling clamping control law;
[0009] Inputting the clamping theory output instruction obtained from the tooling clamping control law into the clamping limiter unit, obtaining the output result of the clamping limiter unit, and inputting the output result into the exploration environment;
[0010] Constructing a reward return unit, wherein the reward return unit feeds back the current moment reward of the workpiece position of the exploration environment to the tooling clamp control law, and optimizes the learning of the tooling clamp control law by maximizing the total reward;
[0011] The tool clamping control law is learned to obtain a final tool clamping control law, and the tool clamping is controlled based on the tool clamping control law.
[0012] Furthermore, the exploration environment introduces random uncertainty influencing factors into the model coefficients of the machining center model; accordingly, the model coefficients include the resultant cutting force and the resultant moment of the cutting torque, and the resultant cutting force and the resultant moment of the cutting torque respectively include corresponding cutting force coefficients and cutting torque coefficients; the cutting force coefficients and cutting torque coefficients are obtained by the following interpolation calculation:
[0013] F=C F Δ f
[0014] M=C M Δ f
[0015] Among them, F is the cutting force, M is the cutting torque, C F and C M is the coefficient of cutting force and cutting torque, Δ is the contact area between the tool and the workpiece, and f is the feed speed. By injecting random uncertainty influencing factors into the feed speed, random uncertainty influencing factors are introduced into the model coefficients of the machining center model.
[0016] Furthermore, the machining center model is a six-degree-of-freedom model; accordingly, the exploration environment required for learning the control law of tooling arrangement includes:
[0017] The exploration environment is constructed according to the following expression:
[0018]
[0019] in, and are the total cutting force and total cutting torque, respectively. and are the force and moment generated by cutting, and are the force and torque due to gravity, and Forces and moments generated by other factors.
[0020] Furthermore, the output result of the clamping limiting unit includes the limiting result obtained by limiting the action amplitude and the change rate of the clamping theoretical output instruction; the clamping theoretical output instruction includes the theoretical clamping force, the theoretical clamping position, and the theoretical clamping speed; the limiting result is calculated according to the following formula:
[0021] For action amplitude limiting:
[0022] F clamp_limit =min(max(F clamp_theoretical , F clamp_min ), F clamp_max )
[0023] For rate of change limiting:
[0024] ΔF clamp_rate_limit
[0025] =min(max(ΔF clamp_theoretical , ΔF clamp_rate_min ), ΔF clamp_rate_max)
[0026] Among them, F clamp_theroetical is the theoretical clamping force, F clamp_min and F clamp_max are the minimum and maximum values of the clamping force, ΔF clamp_theoretical is the theoretical clamping force change rate, ΔF clamp_rate_min and ΔF clamp_rate_max are the minimum and maximum values of the clamping force change rate respectively.
[0027] Furthermore, the construction of the reward return unit includes:
[0028] The current moment reward is represented by the following quadratic form:
[0029]
[0030] And there is
[0031]
[0032]
[0033] Among them, r t is the current reward at time t, is the position error vector, is the current workpiece position, is the desired workpiece position, is the control quantity, i.e. the clamping force vector, Q and R are the weight matrices respectively.
[0034] Furthermore, the tooling arrangement control method for a CNC machining center also includes:
[0035] The current reward value output by the reward return unit can be changed by adjusting the Q matrix and the R matrix to ensure that the system state and control quantity meet the requirements;
[0036] When the preset number of control targets are completed consecutively, additional task completion rewards will be given to guide priority completion of tasks.
[0037] Furthermore, the learning of the tooling clamping control law includes:
[0038] Randomly initialize the evaluation neural network and the control neural network;
[0039] Initialize the experience replay pool, open a memory buffer, and set the size to n R ;
[0040] Initialize the exploration environment, initialize random noise, and then cycle through data sampling and neural network learning;
[0041] M independent experiments are carried out to learn the control law of the tooling arrangement.
[0042] Furthermore, the conducting of M independent experiments to learn the tooling clamping control law includes:
[0043] The steps for each test are as follows:
[0044] a) Extract the initialization input state s1;
[0045] b) If the current time t is less than or equal to the maximum learning time T, then execute step c), otherwise end this experiment and carry out the next experiment;
[0046] c) Based on the initial input state s1, the control neural network μ(s t |) produces action a at time t t =μ(s t |)+N t , N t is the random noise at time t used to increase the diversity of learning samples, denoted by N init is the noise size at the initial moment, and N t As the training process gradually becomes smaller, it satisfies:
[0047] N t =0.995·N t-1
[0048] d) The action instruction a is obtained t Perform action limiting and apply it to the exploration environment, and get the current moment reward r according to the model characteristic integral t and the state s at the next momentt+1 , and r t satisfy
[0049]
[0050] And if the control target is completed for the preset number of times continuously, let r t =r goal =100;
[0051] Notes t [0] is the state vector s t The first element of , then the control target completion flag is:
[0052]
[0053] e) The data pair (s t ,a t ,r t ,s t+1 ) is stored in the experience replay pool RP. If the experience replay pool RP is full, R If there are data pairs, execute step f) to start learning, otherwise jump back to step c);
[0054] f) Randomly sample N data pairs from the experience replay pool RP
[0055] g) Let the neural network loss for evaluation be calculated as follows:
[0056]
[0057] h) Use the Adam gradient descent optimization algorithm to update the evaluation neural network parameters θ Q , the optimization goal is to minimize the loss L, the learning rate of gradient descent is λ, is the discount factor of the learning algorithm, and N is the total number of data samples;
[0058] i) Calculate the gradient of the sampled data pair as follows:
[0059]
[0060] j) Update the control neural network parameter θ based on the calculated objective function gradient using the Adam gradient descent optimization algorithm μ ;
[0061] k) Use soft update to update the target network parameters, that is:
[0062]
[0063] Furthermore, the feed speed related components are obtained by the following formula:
[0064] f related =kf ·v
[0065] Among them, f related is the feed speed related component, k f is the feed speed influence coefficient, and v is the speed in the machine tool coordinate system.
[0066] Furthermore, the cutting depth d and cutting width w are calculated according to the following formulas:
[0067]
[0068] Where d is the cutting depth, w is the cutting width, and tan -1 It is the inverse tangent function whose range is defined between [-π,π].
[0069] The above-mentioned embodiments of the present disclosure have the following beneficial effects: The tooling clamping control method for CNC machining centers described in the present invention can improve the automation level and machining accuracy of the machining process. The exploration environment and reward reward unit constructed using machine learning technology enable the control system to self-learn and adjust according to real-time data, thereby optimizing the action amplitude and change rate of the clamping, ensuring the stability of the machining process and the machining quality of the workpiece. This method can reduce the dependence on operator experience and the possibility of human operation errors by simulating the actual machining environment, while improving machining efficiency and production safety.
[0070] In addition, this method can enhance the control system's adaptability to complex processing conditions by introducing random uncertainty factors. By injecting randomness into key parameters such as feed speed, the control system can maintain efficient and accurate working conditions under various uncertainties. This method can not only improve the control accuracy of the tooling clamping, but also enhance the flexibility and robustness of the entire CNC machining center in the face of changing machining requirements, which helps to improve overall production efficiency and reduce production costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0072] Figure 1 A schematic flow chart of a method for controlling a tooling arrangement for a CNC machining center provided in one embodiment of the present invention;
[0073] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0074] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0075] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0076] According to an embodiment of the present invention, a model training method for real-time image recognition is proposed.
[0077] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0078] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.
[0079] Reference below Figure 1 , Figure 1 This is a flow chart of a method for controlling a tooling arrangement for a CNC machining center provided in accordance with an embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to any applicable scenario.
[0080] Figure 1 The tooling arrangement control method for a CNC machining center provided by one embodiment of the present invention shown in the figure comprises:
[0081] Step 101, constructing an exploration environment required for learning the control law of tooling clamping arrangement;
[0082] Step 102, constructing an input signal required for learning the tooling clamping control law according to the workpiece position, workpiece speed, and expected workpiece position instruction output by the exploration environment;
[0083] Step 103, inputting the clamping theory output instruction obtained from the tooling clamping control law into the clamping clipping unit, obtaining the output result of the clamping clipping unit, and inputting the output result into the exploration environment;
[0084] Step 104, constructing a reward reporting unit, wherein the reward reporting unit feeds back the current moment reward of the workpiece position of the exploration environment to the tooling clamping control law, and optimizes the learning of the tooling clamping control law by maximizing the total reward;
[0085] Step 105 , learning the tool clamping control law to obtain a final tool clamping control law, and controlling the tool clamping based on the tool clamping control law.
[0086] It should be noted that the core of the tool clamping control method for CNC machining centers is to optimize the control strategy of tool clamping by building a learning environment and using machine learning technology. This method simulates the actual machining environment so that the control system can learn and adjust according to real-time data to achieve more precise control.
[0087] Specifically, the method involves building an exploration environment that can simulate the actual operation of a machining center. This environment can output corresponding control signals based on the input workpiece position, speed, and expected position instructions. The clamp limiter unit plays a key role in this process. It is responsible for limiting the movement amplitude and change rate of the clamp to ensure the safety and accuracy of the operation. At the same time, the reward return unit will feedback the reward signal based on the current workpiece position. This signal is used to guide the learning process of the control law and optimize the control strategy by maximizing the total reward.
[0088] Preferably, we can further refine this process. For example, when building the exploration environment, advanced physical models or digital twin technology can be used to more realistically simulate the actual processing conditions. The generation of input signals can be obtained in real time through high-precision sensors to ensure the accuracy of the data. The implementation of the clamping limiter unit can adopt advanced control algorithms such as PID control to achieve more precise control. The design of the reward reward unit can introduce a multi-objective optimization algorithm, while considering multiple factors such as workpiece processing quality, processing efficiency and equipment loss, to achieve a more comprehensive reward mechanism. Finally, the learning of the control law can adopt deep learning techniques such as neural networks to improve learning efficiency and control accuracy, while continuously optimizing the control strategy through online learning and adaptive adjustment. These refined steps and alternatives are all aimed at improving the performance and reliability of the entire control system.
[0089] In some embodiments, the exploration environment introduces a random uncertainty influencing factor into the model coefficient of the machining center model; accordingly, the model coefficient includes the resultant force of the cutting force and the resultant moment of the cutting torque, and the resultant force of the cutting force and the resultant moment of the cutting torque respectively include corresponding cutting force coefficients and cutting torque coefficients; the cutting force coefficients and cutting torque coefficients are obtained by the following interpolation calculation:
[0090] F=C F Δ f
[0091] M=C M Δ f
[0092] Among them, F is the cutting force, M is the cutting torque, C F and C M is the coefficient of cutting force and cutting torque, Δ is the contact area between the tool and the workpiece, and f is the feed speed. By injecting random uncertainty influencing factors into the feed speed, random uncertainty influencing factors are introduced into the model coefficients of the machining center model.
[0093] Specifically, the model coefficients include the resultant cutting force and the resultant cutting moment, and these coefficients include the corresponding cutting force coefficient and cutting moment coefficient respectively. These coefficients are obtained by interpolation calculation, and the variables involved include cutting force, cutting moment, contact area between tool and workpiece, and feed speed. By injecting random uncertainty influencing factors into the feed speed, random uncertainty influencing factors are introduced into the model coefficients of the machining center model.
[0094] Preferably, we can provide alternatives, for example, the determination of the model coefficients can be done by experimental measurement or using advanced simulation software to ensure that they can accurately reflect the actual machining process. The introduction of random uncertainty influencing factors can be achieved through Monte Carlo simulation or other random process simulation methods to increase the realism and predictive ability of the model. The calculation of cutting force and cutting torque coefficients can use multi-dimensional interpolation methods, such as three-dimensional or higher-dimensional interpolation, to more accurately calculate these coefficients, which may involve considering more process parameters. In addition, parameter optimization can be achieved through optimization algorithms, such as genetic algorithms or particle swarm optimization, to find the best model coefficients and random uncertainty influencing factors to improve the performance of the control system.
[0095] In some embodiments, the machining center model is a six-degree-of-freedom model; accordingly, the exploration environment required for learning the control law of tooling arrangement and clamping includes:
[0096] The exploration environment is constructed according to the following expression:
[0097]
[0098] in, and are the total cutting force and total cutting torque, respectively. and are the force and moment generated by cutting, and are the force and torque due to gravity, and Forces and moments generated by other factors.
[0099] It should be noted that the mathematical expressions involved in constructing the exploration environment in the six-degree-of-freedom model include the calculation of the total cutting force and the total cutting torque, as well as the consideration of the forces and torques generated by cutting, gravity and other factors. The setting of these parameters needs to be based on the actual mechanical design and processing conditions, including but not limited to the geometry of the tool, material properties, processing speed, etc. Through the comprehensive consideration of these parameters, the changes in forces and torques in the actual processing process can be more accurately simulated.
[0100] Preferably, we can further refine the operation steps. For example, when building the exploration environment, advanced numerical analysis methods, such as finite element analysis, can be used to more accurately simulate the distribution of forces and torques. In addition, a real-time data feedback mechanism can be introduced to monitor the changes in forces and torques during the processing process in real time through sensors, and dynamically adjust the model parameters to improve the accuracy of the simulation. For the setting of model coefficients, machine learning algorithms, such as neural networks, can be used to learn and predict the optimal model coefficients from historical data, thereby improving the adaptability and effectiveness of the control strategy. These refined steps and alternatives are all aimed at improving the performance and reliability of the entire control system.
[0101] In some embodiments, the output result of the clamping limiting unit includes the limiting result obtained by limiting the action amplitude and the change rate of the clamping theoretical output instruction; the clamping theoretical output instruction includes the theoretical clamping force, the theoretical clamping position, and the theoretical clamping speed; the limiting result is calculated according to the following formula:
[0102] For action amplitude limiting:
[0103] F clamp_limit =min(max(F clamp_theoretical , F clamp_min ), F clamp_max )
[0104] For rate of change limiting:
[0105] ΔF clamp_rate_limit
[0106] =min(max(ΔF clamp_theoretical , ΔF clamp_rate_min ),ΔF clamp_rate_max )
[0107] Among them, F clamp_theoretical is the theoretical clamping force, F clamp_min and F clamp_max are the minimum and maximum values of the clamping force, ΔF clamp_theoretical is the theoretical clamping force change rate, ΔF clamp_rate_min and ΔF clamp_rate_max are the minimum and maximum values of the clamping force change rate respectively.
[0108] It should be noted that the output result of the clamping limiting unit includes the action amplitude limiting and change rate limiting of the clamping theoretical output instruction, and the resulting limiting result. Among them, the action amplitude limiting refers to limiting the clamping force of the clamping theoretical output instruction to ensure that it does not exceed the tolerance range of the equipment and the workpiece. The change rate limiting limits the speed of the clamping force change to prevent equipment damage or workpiece deformation caused by excessive speed. The theoretical clamping force, theoretical clamping position and theoretical clamping speed are the key parameters that need to be considered in the clamping limiting unit, and the setting of these parameters depends on the specific process requirements and equipment performance.
[0109] Preferably, we can further refine the operation steps or provide alternatives. For example, in the specific implementation of action amplitude limiting, the minimum and maximum values of the clamping force can be set according to the actual process requirements and equipment characteristics to ensure the safety and efficiency of the processing process. The rate of change limit can also be dynamically adjusted according to the feedback in the actual operation to adapt to different processing conditions. In addition, advanced sensors and control systems can be used to monitor and adjust the clamping force and clamping speed in real time to achieve more precise limiting control. For complex processing tasks, it is also possible to consider introducing artificial intelligence algorithms to predict and optimize the setting of limiting parameters by learning historical data, thereby further improving the automation and intelligence level of the processing process.
[0110] In some embodiments, the constructing reward return unit includes:
[0111] The current moment reward is represented by the following quadratic form:
[0112]
[0113] And there is
[0114]
[0115] Among them, r t is the current reward at time t, is the position error vector, is the current workpiece position, is the desired workpiece position, is the control quantity, i.e. the clamping force vector, Q and R are the weight matrices respectively.
[0116] It should be noted that the construction of the reward return unit involves the following key concepts and parameter settings:
[0117] Current moment reward: This is a quantitative indicator used to measure the effectiveness of the control strategy at a specific moment.
[0118] Quadratic form: This refers to a mathematical formula, usually used to express the size of the reward or penalty, which is proportional to the sum of the squares of the control errors.
[0119] Position Error Vector: This is a vector that describes the difference between the actual workpiece position and the desired position.
[0120] Weight matrix: used to adjust the relative importance of position error and control amount in reward calculation.
[0121] Preferably, we can further refine the steps or provide alternatives:
[0122] 1. Calculation of the reward at the current moment: The position error vector can be calculated by real-time monitoring of the current position and expected position of the workpiece, and then substituted into the quadratic formula to calculate the reward value at the current moment.
[0123] 2. Setting of weight matrix: The parameters in the weight matrix can be adjusted according to the actual processing requirements and process characteristics to reflect the priority of different control objectives.
[0124] 3. Optimization of reward function: In addition to using the quadratic formula, you can also consider introducing other types of reward functions, such as exponential or logarithmic, to better adapt to different control scenarios.
[0125] 4. Selection of learning algorithms: Different machine learning algorithms can be used to optimize the learning process of the control law, such as reinforcement learning, deep learning, etc., to improve the efficiency and effectiveness of learning.
[0126] 5. Integration of reward return unit: Integrate the reward return unit with the control law learning system to ensure that the reward signal can be fed back to the learning process in a timely manner, thereby achieving dynamic adjustment of the control strategy.
[0127] In some embodiments, the tooling clamping control method for a CNC machining center further includes:
[0128] The current reward value output by the reward return unit can be changed by adjusting the Q matrix and the R matrix to ensure that the system state and control quantity meet the requirements;
[0129] When the preset number of control targets are completed consecutively, additional task completion rewards will be given to guide priority completion of tasks.
[0130] It should be noted that the above implementation involves the following key concepts and parameter settings:
[0131] Q matrix and R matrix: These are matrices used for weight regulation in control theory. The Q matrix is usually used to regulate the weights of state variables, while the R matrix is used to regulate the weights of control inputs.
[0132] Reward score at the current moment: This is a value output by the reward return unit, which is used to evaluate the effectiveness of the current control strategy.
[0133] Additional task completion reward: This is an incentive mechanism used to provide additional rewards after the system successfully completes the control target a certain number of times in a row to encourage the system to reach the target faster.
[0134] Preferably, we can further refine the steps or provide alternatives:
[0135] 1. Adjust the Q matrix and R matrix: The optimal values of the Q matrix and R matrix can be determined through experiments or simulations to ensure that the system state and control quantity meet the performance requirements. These values can be adjusted according to the specific needs of the system and the working environment.
[0136] 2. Calculation of the current moment reward score: An algorithm can be designed to dynamically adjust the current moment reward score based on the actual performance of the system and the preset performance indicators. For example, if the system performs well in a certain period of time, the reward score can be increased to encourage similar performance.
[0137] 3. Implementation of additional rewards for completing tasks: A counter can be set to record the number of times the system successfully completes tasks in succession. Once the preset number of times is reached, the system will receive additional rewards. This reward can be increased points, higher reward points, or other forms of incentives.
[0138] 4. Optimization of the reward mechanism: Machine learning algorithms can be used to optimize the reward mechanism so that it can dynamically adjust the reward strategy based on the system’s historical performance and current state to improve the system’s learning efficiency and control performance.
[0139] In some embodiments, the learning of the tooling clamping control law includes:
[0140] Randomly initialize the evaluation neural network and the control neural network;
[0141] Initialize the experience replay pool, open a memory buffer, and set the size to n R ;
[0142] Initialize the exploration environment, initialize random noise, and then cycle through data sampling and neural network learning;
[0143] M independent experiments are carried out to learn the control law of the tooling arrangement.
[0144] Specifically, the learning process includes the following key concepts and parameter settings:
[0145] Evaluation neural network and control neural network: These two neural networks are used to evaluate the effectiveness of the current control strategy and generate control instructions respectively.
[0146] Experience replay pool: This is a buffer for storing historical data, which is used to provide data support during training. Its size is set to nR and can be adjusted according to actual needs.
[0147] Random noise: Random noise is introduced when generating action commands to increase the diversity of learning samples, which is especially important for exploring new control strategies.
[0148] Learning duration: This is a parameter in the control law learning process that is used to limit the length of a single trial.
[0149] Preferably, we can further refine the steps or provide alternatives:
[0150] 1. Initialization of the neural network: You can choose different types of neural network architectures, such as deep convolutional networks or recurrent neural networks, based on the specific application scenario and data characteristics.
[0151] 2. Management of the experience replay pool: A priority replay strategy can be adopted to give a higher sampling probability to important or rare learning samples to improve learning efficiency.
[0152] 3. Adjustment of random noise: A noise strategy that decays over time can be designed, allowing a larger exploration space in the early stages of training, and gradually reducing the noise as training progresses to refine the control strategy.
[0153] 4. Setting of learning time: The learning time can be set according to the actual processing tasks and system performance requirements to ensure that the learning process has enough time for exploration but is not too time-consuming.
[0154] 5. Independence of experiments: Conducting M independent experiments can ensure the stability and reliability of the learning process. Each experiment can start from a different initial state to cover a wider range of operating conditions.
[0155] In some embodiments, the performing M independent experiments to learn the tooling clamping control law includes:
[0156] The steps for each test are as follows:
[0157] a) Extract the initialization input state s1;
[0158] b) If the current time t is less than or equal to the maximum learning time T, then execute step c), otherwise end this experiment and carry out the next experiment;
[0159] c) Based on the initial input state s1, the control neural network μ(s t |) produces action a at time t t =μ(s t |)+N t , N t is the random noise at time t used to increase the diversity of learning samples, denoted by N init is the noise size at the initial moment, and N t As the training process gradually becomes smaller, it satisfies:
[0160] N t =0.995·N t-1
[0161] d) The action instruction a is obtained t Perform action limiting and apply it to the exploration environment, and get the current moment reward r according to the model characteristic integral t and the state s at the next moment t+1 , and r t satisfy
[0162]
[0163] And if the control target is completed for the preset number of times continuously, let r t =r goal =100;
[0164] Notes t [0] is the state vector s t The first element of , then the control target completion flag is:
[0165]
[0166] e) The data pair (s t ,a t ,r t ,s t+1 ) is stored in the experience replay pool RP. If the experience replay pool RP is full, R If there are data pairs, execute step f) to start learning, otherwise jump back to step c);
[0167] f) Randomly sample N data pairs from the experience replay pool RP
[0168] g) Let the neural network loss for evaluation be calculated as follows:
[0169]
[0170] h) Use the Adam gradient descent optimization algorithm to update the evaluation neural network parameters θ Q, the optimization goal is to minimize the loss L, the learning rate of gradient descent is λ, is the discount factor of the learning algorithm, and N is the total number of data samples;
[0171] i) Calculate the gradient of the sampled data pair as follows:
[0172]
[0173] j) Update the control neural network parameter θ based on the calculated objective function gradient using the Adam gradient descent optimization algorithm μ ;
[0174] k) Use soft update to update the target network parameters, that is:
[0175]
[0176] It should be noted that the embodiment describes a process of learning the control law of tooling clamping through multiple independent experiments, which involves randomly initializing the evaluation neural network and the control neural network, and performing data sampling and learning through these networks to optimize the control performance of tooling clamping.
[0177] Specifically, the implementation method includes initializing the experience replay pool, opening up a memory buffer, and setting its size to nR. This means that before starting learning, a storage space large enough to save the data collected during the experiment needs to be prepared. At the same time, the exploration environment and random noise are initialized to increase the diversity of learning samples and improve learning efficiency. In each trial, starting from extracting the initialization input state, if the current moment is less than or equal to the maximum learning time, continue to execute, otherwise end this trial and start the next one. At each moment, a control neural network is used to generate an action, and the action is applied to the exploration environment to obtain the reward at the current moment and the state at the next moment. These data are then stored in the experience replay pool for subsequent learning processes.
[0178] Preferably, we can further refine or provide alternatives. For example, more complex neural network structures, such as deep convolutional networks or recurrent neural networks, can be used to better process spatial and temporal data. In addition, regularization techniques, such as dropout or weight decay, can be introduced to prevent neural networks from overfitting. In terms of data sampling, more advanced sampling strategies, such as importance sampling, can be used to improve learning efficiency. In the training process of neural networks, more advanced optimization algorithms, such as natural gradient descent or second-order optimization methods, can be used to further improve learning speed and performance. In addition, it is also possible to consider introducing multi-task learning or transfer learning strategies to leverage knowledge from related fields to accelerate the learning process.
[0179] In some embodiments, the feed speed related component is obtained by the following formula:
[0180] f related =k f ·v
[0181] Among them, f related is the feed speed related component, k f is the feed speed influence coefficient, and v is the speed in the machine tool coordinate system.
[0182] Specifically, the calculation of the feed speed related components involves the following key concepts and parameter settings:
[0183] Feed rate influence coefficient: This is a parameter used to quantify the effect of feed rate on cutting force and cutting torque, which can be adjusted according to material properties and cutting conditions.
[0184] Speed in machine tool coordinate system: This refers to the speed at which the workpiece or tool moves in the machine tool coordinate system, usually provided by the machine tool control system.
[0185] Preferably, we can further refine the operating steps in claim 9 or provide alternative solutions:
[0186] 1. Determination of feed rate influence coefficient: This coefficient can be determined through experimental testing or using a cutting force model to ensure that it accurately reflects the effect of feed rate on the cutting process.
[0187] 2. Speed measurement in the machine tool coordinate system: High-precision sensors or built-in measurement tools in the machine tool control system can be used to obtain this speed data to ensure the accuracy and real-time nature of the data.
[0188] 3. Optimization of calculation methods: More advanced numerical methods or algorithms can be used to calculate feed speed related components to improve the accuracy and efficiency of calculations.
[0189] More specifically, the implementation may include the following steps:
[0190] 1. Experimental determination: Through a series of cutting experiments, the actual cutting force and cutting torque at different feed speeds are measured to determine the feed speed influence coefficient.
[0191] 2. Data acquisition: Use the machine tool control system or external sensors to collect speed data in the machine tool coordinate system in real time.
[0192] 3. Parameter adjustment: According to the actual processing conditions and material properties, adjust the feed speed influence coefficient to optimize the cutting process.
[0193] 4. Real-time calculation: During the processing, the feed speed related components are calculated in real time and fed back to the tooling clamping control law to achieve dynamic adjustment and optimization.
[0194] In some embodiments, the cutting depth d and cutting width w are calculated according to the following formulas:
[0195]
[0196]
[0197] Where d is the cutting depth, w is the cutting width, and tan -1 It is the inverse tangent function whose range is defined between [-π,π].
[0198] Specifically, the key concepts and parameter settings involved in the implementation include:
[0199] Feed rate influence factor: This is a key parameter used to quantify the effect of feed rate on cutting forces and moments. This factor can be adjusted based on material properties, tool type and cutting conditions.
[0200] Speed in the machine tool coordinate system: This refers to the speed at which the tool moves in the machine tool coordinate system. It is usually provided by the machine tool control system and is the basic data for calculating cutting depth and width.
[0201] Preferably, the implementation mode may be further refined or alternative solutions may be provided:
[0202] 1. Dynamic adjustment of feed speed influence coefficient: The feed speed influence coefficient can be dynamically adjusted according to real-time processing feedback data to adapt to different processing stages and conditions.
[0203] 2. High-precision speed measurement: Using a high-precision laser speed meter or encoder can more accurately measure the speed in the machine tool coordinate system, thereby improving the accuracy of the calculation.
[0204] 3. Real-time calculation of cutting depth and width: By real-time monitoring of the contact between the tool and the workpiece, the cutting depth and width can be dynamically calculated to provide more accurate data for control.
[0205] 4. Application of optimization algorithms: Using optimization algorithms, such as genetic algorithms or simulated annealing algorithms, the best cutting parameters can be found to improve processing efficiency and quality.
[0206] 5. Integration of feedback control systems: Integrating the calculated cutting parameters into the feedback control system of the machine tool can achieve real-time optimization and adjustment of the machining process.
[0207] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the use of the tooling clamp control method for CNC machining centers described in the present invention can significantly improve the automation and intelligence level of the machining process. By constructing a learning environment and optimizing the control law, the method can make the tooling clamp respond to machining requirements more accurately, reduce the errors and dependence of human operation, and thus improve machining efficiency and product quality. In addition, the introduction of random uncertainty influencing factors and reward and return mechanisms can enhance the adaptability and robustness of the control system to complex machining conditions, ensuring that stable machining performance can be maintained under the influence of various uncertain factors.
[0208] Furthermore, the present invention can optimize cutting parameters, reduce tool wear and workpiece damage, and extend the service life of equipment by accurately controlling cutting depth and width and adjusting feed speed in real time. At the same time, through multiple independent tests and neural network learning, the control strategy can be continuously optimized, the self-learning ability and response speed of the system can be improved, so that the CNC machining center can quickly adapt to and provide high-quality machining results when facing variable machining tasks. The application of this method can not only improve production efficiency and reduce costs, but also enhance the market competitiveness of enterprises.
[0209] The storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0210] It should be noted that in some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0211] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0212] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0213] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0214] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The units described may also be provided in a processor, and the functions described above herein may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0215] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for controlling tooling arrangement for a CNC machining center, characterized in that: include: Construct the exploration environment required for learning the control law of tooling clamping; According to the workpiece position, workpiece speed, and expected workpiece position command output by the exploration environment, construct an input signal required for learning the tooling clamping control law; Inputting the clamping theory output instruction obtained from the tooling clamping control law into the clamping limiter unit, obtaining the output result of the clamping limiter unit, and inputting the output result into the exploration environment; Constructing a reward return unit, wherein the reward return unit feeds back the current moment reward of the workpiece position of the exploration environment to the tooling clamp control law, and optimizes the learning of the tooling clamp control law by maximizing the total reward; The tool clamping control law is learned to obtain a final tool clamping control law, and the tool clamping is controlled based on the tool clamping control law.
2. The tooling arrangement control method for a CNC machining center according to claim 1, characterized in that: The exploration environment introduces random uncertainty influencing factors into the model coefficients of the machining center model; accordingly, the model coefficients include the resultant cutting force and the resultant moment of the cutting torque, and the resultant cutting force and the resultant moment of the cutting torque respectively include corresponding cutting force coefficients and cutting torque coefficients; the cutting force coefficients and cutting torque coefficients are obtained by the following interpolation calculation: F=C F ·Δ·f M=C M ·Δ·f Among them, F is the cutting force, M is the cutting torque, C F and C M is the coefficient of cutting force and cutting torque, Δ is the contact area between the tool and the workpiece, and f is the feed speed. By injecting random uncertainty influencing factors into the feed speed, random uncertainty influencing factors are introduced into the model coefficients of the machining center model.
3. The tooling arrangement control method for a CNC machining center according to claim 2, characterized in that: The machining center model is a six-degree-of-freedom model; accordingly, the exploration environment required for learning the control law of tooling arrangement and clamping includes: The exploration environment is constructed according to the following expression: in, and are the total cutting force and total cutting torque, respectively. and are the force and moment generated by cutting, and are the force and torque due to gravity, and Forces and moments generated by other factors.
4. The tooling arrangement control method for a CNC machining center according to claim 1, characterized in that: The output result of the clamping limiting unit includes the limiting result obtained by limiting the action amplitude and the change rate of the clamping theoretical output instruction; the clamping theoretical output instruction includes the theoretical clamping force, the theoretical clamping position, and the theoretical clamping speed; the limiting result is calculated according to the following formula: For action amplitude limiting: F clamp_limit =min(max(F clamp_theoretical ,F clamp_min ),F clamp_max ) For rate of change limiting: ΔF clamp_rate_limit =min(max(ΔF clamp_theoretical ,ΔF clamp_rate_min ),ΔF clamp_rate_max ) Among them, F clamp_theoretical is the theoretical clamping force, F clamp_min and F clamp_max are the minimum and maximum values of the clamping force, ΔF clamp_theoretical is the theoretical clamping force change rate, ΔF clamprate_min and ΔF clamp_rate_max are the minimum and maximum values of the clamping force change rate respectively.
5. The tooling arrangement control method for a CNC machining center according to claim 1, characterized in that: Construct a reward return unit, including: The current moment reward is represented by the following quadratic form: And there is Among them, r t is the current reward at time t, is the position error vector, is the current workpiece position, is the desired workpiece position, is the control quantity, i.e. the clamping force vector, Q and R are the weight matrices respectively.
6. The tooling arrangement control method for a CNC machining center according to claim 5, characterized in that: The tooling clamping control method for a CNC machining center also includes: The current reward value output by the reward return unit can be changed by adjusting the Q matrix and the R matrix to ensure that the system state and control quantity meet the requirements; When the preset number of control targets are completed consecutively, additional task completion rewards will be given to guide priority completion of tasks.
7. The tooling arrangement control method for a CNC machining center according to claim 1, characterized in that: The tooling clamping control law is studied, including: Randomly initialize the evaluation neural network and the control neural network; Initialize the experience replay pool, open a memory buffer, and set the size to n R ; Initialize the exploration environment, initialize random noise, and then cycle through data sampling and neural network learning; M independent experiments are carried out to learn the control law of the tooling arrangement.
8. The tooling arrangement control method for a CNC machining center according to claim 7, characterized in that: Carry out M independent experiments to learn the control law of the tooling arrangement, including: The steps for each test are as follows: a) Extract the initialization input state s1; b) If the current time t is less than or equal to the maximum learning time T, then execute step c), otherwise end this experiment and carry out the next experiment; c) Based on the initial input state s1, the control neural network μ(s t |) produces action a at time t t =μ(s t |)+N t , N t is the random noise at time t used to increase the diversity of learning samples, denoted by N init is the noise size at the initial moment, and N t As the training process gradually becomes smaller, it satisfies: N t =0.995·N t-1 d) The action instruction a is obtained t Perform action limiting and apply it to the exploration environment, and get the current moment reward r according to the model characteristic integral t and the state s at the next moment t+1 , and r t satisfy And if the control target is completed for the preset number of times continuously, let r t =r goal =100; Notes t [0] is the state vector s t The first element of , then the control target completion flag is: e) The data pair (s t , a t , r t ,s t+1 ) is stored in the experience replay pool RP. If the experience replay pool RP is full, R If there are data pairs, execute step f) to start learning, otherwise jump back to step c); f) Randomly sample N data pairs from the experience replay pool RP g) Let the neural network loss for evaluation be calculated as follows: h) Use the Adam gradient descent optimization algorithm to update the evaluation neural network parameters θ Q , the optimization goal is to minimize the loss L, the learning rate of gradient descent is λ, is the discount factor of the learning algorithm, and N is the total number of data samples; i) Calculate the gradient of the sampled data pair as follows: j) Update the control neural network parameters θμ using the Adam gradient descent optimization algorithm based on the calculated objective function gradient; k) Use soft update to update the target network parameters, that is:
9. The tooling arrangement control method for a CNC machining center according to claim 2, characterized in that: The feed rate related components are obtained by the following formula: f related =k f ·v Among them, f related is the feed speed related component, k f is the feed speed influence coefficient, and v is the speed in the machine tool coordinate system.
10. The tooling arrangement control method for a CNC machining center according to claim 9, characterized in that: The cutting depth d and cutting width w are calculated according to the following formulas: Where d is the cutting depth, w is the cutting width, and tan -1 It is the inverse tangent function whose range is defined between [-π, π].