Control method of numerical control machine tool, numerical control machine tool and computer readable storage medium

By planning S-type velocity and triangular model mixed interpolation for accelerating segments, uniform acceleration segments and other time periods in CNC machine tools, combined with reinforcement learning model optimization, and generating control strategies, the vibration problem when the acceleration is large is solved and the acceleration is achieved The smooth changes extend the machine tool axis life and improve machining efficiency.

CN119002394BActive Publication Date: 2025-01-07HIGERMAN CNC TECH SHENZHEN
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411504462.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-26
Publication Date
2025-01-07
Estimated Expiration
2044-10-26

AI Technical Summary

Technical Problem

Existing CNC machine tools will cause severe vibration when the acceleration is large, shorten the machine axis life, and reduce acceleration in order to reduce vibration, the acceleration potential of the machine axis cannot be fully excavated, resulting in long processing time.

Method used

By obtaining the maximum acceleration limit, maximum acceleration limit, unit interpolation period, initial velocity, final velocity and total displacement of CNC machine tools, the acceleration section, uniform acceleration section, and reduction are planned using the S-type speed planning module and triangular model. The stage time of the acceleration section, uniform speed section, acceleration and deceleration section, and uniform speed section are combined with the optimization of the reinforcement learning model, and a hybrid interpolation control strategy is generated to limit the acceleration change rate, determine the maximum reachable speed, and ensure smooth changes in acceleration.

Benefits of technology

It realizes that the machine tool vibration is reduced, the machine tool axis life is extended, and the processing efficiency is improved without reducing acceleration. It is suitable for high-speed and high-precision processing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002394B_ABST
    Figure CN119002394B_ABST
Patent Text Reader

Abstract

The present application discloses a control method for a numerical control machine tool, a numerical control machine tool and a computer-readable storage medium. The method includes: obtaining the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement of the numerical control machine tool; using the S-type speed planning module to sequentially plan the stage times corresponding to the acceleration segment, the uniform acceleration segment, the deceleration segment, the uniform speed segment, the acceleration and deceleration segment, the uniform deceleration segment and the deceleration and deceleration segment; using the triangular model to compensate for the displacement difference caused by rounding up the total interpolation cycle corresponding to the stage time, and obtaining the maximum acceleration corresponding to the triangular model; respectively displacing the expression coefficients; using each stage time to perform S-type speed and triangular model mixed interpolation according to the corresponding displacement expression to obtain the first control strategy; using the first control strategy to generate the execution action of the numerical control machine tool, it is possible to reduce the calculation time and improve the processing efficiency without actively reducing the acceleration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine tool control technology, and in particular to a control method for a numerically controlled machine tool, a numerically controlled machine tool, and a computer-readable storage medium. Background Art

[0002] During the operation of a CNC machine tool, interpolation is required to control the execution of the CNC machine tool.

[0003] In the relevant interpolation method, the greater the acceleration, the more severe the machine vibration will be and the shorter the life of the machine axis. At the same time, in order to reduce vibration and reduce acceleration in actual situations, the acceleration potential of the machine axis has not been well tapped, and the processing time is long. Summary of the invention

[0004] The control method of the CNC machine tool, the CNC machine tool and the computer-readable storage medium provided in the present application can reduce the calculation time and improve the processing efficiency without actively reducing the acceleration.

[0005] In a first aspect, the present application provides a control method for a numerically controlled machine tool, the method comprising: obtaining a maximum acceleration limit, a maximum jerk limit, a unit interpolation cycle, an initial speed, a final speed, a maximum speed limit and a total displacement of the numerically controlled machine tool; using an S-type speed planning module to sequentially plan the stage times corresponding to an acceleration segment, a uniform acceleration segment, a deceleration segment, a uniform speed segment, an acceleration / deceleration segment, a uniform deceleration segment and a deceleration / deceleration segment according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement; using a triangular model to compensate for the displacement difference caused by rounding up the total interpolation cycle corresponding to the stage time, and obtaining the maximum acceleration corresponding to the triangular model; respectively calculating the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, the uniform acceleration segment, the deceleration segment, the uniform speed segment, the acceleration / deceleration segment, the uniform deceleration segment and the deceleration / deceleration segment; using each stage time to perform S-type speed and triangular model mixed interpolation according to the corresponding displacement expression to obtain a first control strategy; using the first control strategy to generate an execution action of the numerically controlled machine tool.

[0006] Among them, the S-type speed planning module is used to plan the stage times corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement, including: using the S-type speed planning module to plan the acceleration, deceleration, jerk, deceleration and maximum achievable speed and each stage time corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement.

[0007] The maximum achievable speed is determined by: selecting the larger one of the initial speed and the final speed as the maximum achievable speed; or, using a binary search method, determining the maximum achievable speed in determining the initial speed, the final speed and the maximum speed limit.

[0008] The triangular model is used to compensate for the displacement difference caused by rounding up the total interpolation period corresponding to the stage time, so as to obtain the maximum acceleration corresponding to the triangular model, including: constructing a triangular model with an initial velocity and a final velocity of 0 and an initial and final acceleration of 0, so that the displacement of the triangular model is the displacement difference; and using the displacement difference to calculate the maximum acceleration corresponding to the triangular model.

[0009] The method further includes: obtaining a second control strategy optimized by a reinforcement learning model; and using the first control strategy to generate an execution action of the CNC machine tool, including: fusing the first control strategy and the second control strategy to generate an execution action of the CNC machine tool.

[0010] Among them, obtaining a second control strategy optimized by a reinforcement learning model includes: obtaining proximity sensor data, position sensor data and gyro sensor data of a CNC machine tool; inputting the proximity sensor data into a long short-term memory recursive network of a reinforcement learning model to obtain a first output; converting the first output into a key vector and a value vector, respectively, and converting the position sensor data and the gyro sensor data into a query vector; inputting the key vector, the value vector and the query vector into an attention network of the reinforcement learning model to obtain a second output; obtaining a third output based on the first output and the second output; obtaining a linear velocity signal, an angular velocity signal and an evaluation function based on the third output, the position sensor data and the gyro sensor data, respectively; obtaining a second control strategy using the linear velocity signal and the angular velocity signal; and updating the reinforcement learning model using the evaluation function.

[0011] Among them, using the evaluation function to update the reinforcement learning model includes: updating the reinforcement learning model in combination with the reward function corresponding to the second control strategy, the proximity sensor data, the position sensor data, the gyroscope sensor data and the evaluation function.

[0012] The proximity sensor data, the position sensor data, the gyro sensor data and the second control strategy are input into the feedforward neural network to obtain the system state of the CNC machine tool.

[0013] In a second aspect, the present application provides a CNC machine tool, which includes a processor and a memory and an execution mechanism connected to the processor; the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the method provided in the first aspect.

[0014] In a third aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, is used to implement the method provided in the first aspect.

[0015] The beneficial effects of the present application are as follows: different from the prior art, the control method of a numerically controlled machine tool, the numerically controlled machine tool and the computer-readable storage medium provided by the present application obtain the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement of the numerically controlled machine tool; the S-shaped speed planning module is used to sequentially plan the stage times corresponding to the acceleration section, the uniform acceleration section, the deceleration section, the uniform speed section, the acceleration / deceleration section, the uniform deceleration section and the deceleration / deceleration section according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement; the triangular model is used to calculate the stage times corresponding to the acceleration section, the uniform acceleration section, the deceleration section, the uniform deceleration section and the deceleration / deceleration section. The displacement difference caused by rounding up the total interpolation period corresponding to the stage time is compensated by the type, and the maximum acceleration corresponding to the triangular model is obtained; the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment and the displacement expression coefficients of the triangular model are calculated respectively; the S-type speed and triangular model mixed interpolation are performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated by the first control strategy, that is, the rate of change of acceleration, that is, the jerk is limited to ensure that no matter how the acceleration limit is increased, there will be no severe vibration of the machine tool. And the maximum achievable speed is determined by dichotomy, so that the analytical solution of each time period, jerk value and acceleration value of the seven-segment S-type and triangular model can be obtained, which improves the calculation accuracy and greatly reduces the amount of calculation; at the same time, the simple polynomial displacement calculation during interpolation reduces the calculation time and is suitable for high-speed and high-precision processing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0017] Figure 1 It is a flow chart of an embodiment of a control method for a numerically controlled machine tool provided by the present application;

[0018] Figure 2 It is a flow chart of another embodiment of the control method of a numerically controlled machine tool provided by the present application;

[0019] Figure 3 This application provides Figure 2 A schematic diagram of a flow chart of an embodiment of step 26;

[0020] Figure 4 It is a structural schematic diagram of an embodiment of a CNC machine tool provided by the present application;

[0021] Figure 5 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] During the operation of a CNC machine tool, interpolation is required to control the execution of the CNC machine tool.

[0025] In the relevant interpolation method, the greater the acceleration, the more severe the machine vibration will be and the shorter the life of the machine axis. At the same time, in order to reduce vibration and reduce acceleration in actual situations, the acceleration potential of the machine axis has not been well tapped, and the processing time is long.

[0026] Based on this, the present application proposes to obtain the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool; use the S-type speed planning module to plan the stage times corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement; use the triangular model to compensate for the rounding up of the total interpolation cycle corresponding to the stage time. The displacement difference is used to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment and the displacement expression coefficients of the triangular model are calculated respectively; the S-type speed and triangular model mixed interpolation are performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated using the first control strategy, that is, the rate of change of acceleration, that is, the jerk is limited to ensure that no matter how the acceleration limit is increased, the machine tool will not vibrate violently. And the maximum achievable speed is determined by dichotomy, so that the analytical solutions of the seven-segment S-type and triangular model time periods, jerk values, and acceleration values ​​can be obtained, which improves the calculation accuracy and greatly reduces the amount of calculation; at the same time, simple polynomial displacement calculation during interpolation reduces the calculation time and is suitable for high-speed and high-precision processing scenarios. For details, please refer to any of the following embodiments or any combination of the embodiments.

[0027] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a control method for a numerically controlled machine tool provided by the present application. The method comprises:

[0028] Step 11: Obtain the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool.

[0029] In some embodiments, the technical solution of the present application is applied to the straight line segment interpolation scenario of CNC machine tools.

[0030] In some embodiments, the maximum acceleration limit, the maximum jerk limit, and the unit interpolation period can be obtained based on the corresponding axis parameters of the CNC machine tool. The initial speed, the final speed, the maximum speed limit, and the total displacement can be obtained based on the actual execution action of the CNC machine tool.

[0031] Among them, jerk is a physical quantity that describes how fast an object's acceleration changes. It represents the amount of change in acceleration per unit time.

[0032] Step 12: Use the S-type speed planning module to plan the corresponding stage times of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, maximum jerk limit, unit interpolation period, initial speed, final speed, maximum speed limit and total displacement.

[0033] In the S-type speed planning module, the straight line segment that the CNC machine tool needs to move is divided into seven motion segments, namely, the acceleration segment, the uniform acceleration segment, the deceleration segment, the uniform speed segment, the acceleration and deceleration segment, the uniform deceleration segment and the deceleration and deceleration segment.

[0034] Among them, when only the S-type model is considered, the acceleration changes in the acceleration section and the deceleration section are equal, and the acceleration changes in the acceleration and deceleration section are equal.

[0035] Among them, the acceleration segment refers to the displacement segment in which the acceleration increases according to the first change rate in the direction of movement during the movement process, the uniform acceleration segment refers to the displacement segment in which the acceleration remains unchanged during the movement process, the deceleration segment refers to the displacement segment in which the acceleration decreases according to the second change rate in the direction of movement during the movement process, the uniform speed segment refers to the displacement segment with the same speed during the movement process, the acceleration and deceleration segment refers to the displacement segment in which the acceleration increases according to the third change rate in the direction opposite to the movement direction during the movement process, the uniform deceleration segment refers to the displacement segment in which the acceleration is the same in the direction opposite to the movement direction during the movement process, and the deceleration segment refers to the displacement segment in which the acceleration decreases according to the fourth change rate in the direction opposite to the movement direction during the movement process. Among them, the first change rate is equal to the second change rate, and the third change rate is equal to the fourth change rate.

[0036] After determining the acceleration section, uniform acceleration section, deceleration section, uniform speed section, acceleration / deceleration section, uniform deceleration section and deceleration / deceleration section, the stage times corresponding to the acceleration section, uniform acceleration section, deceleration section, uniform speed section, acceleration / deceleration section, uniform deceleration section and deceleration / deceleration section can be planned.

[0037] In some embodiments, an S-shaped speed planning module is used to plan the acceleration, deceleration, jerk, deceleration and maximum achievable speed and the time of each stage corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, maximum jerk limit, unit interpolation period, initial speed, final speed, maximum speed limit and total displacement.

[0038] In some embodiments, the maximum achievable speed is determined by: selecting the larger one of the initial speed and the final speed as the maximum achievable speed; or, using a binary search method, determining the maximum achievable speed in determining the initial speed, the final speed and the maximum speed limit.

[0039] Step 13: Use the triangular model to compensate for the displacement difference caused by rounding up the total interpolation period corresponding to the stage time, and obtain the maximum acceleration corresponding to the triangular model.

[0040] In some embodiments, due to the rounding up of the total interpolation period corresponding to the stage time, a corresponding time difference will be caused. Since the time difference exists, it needs to be compensated. Therefore, a displacement difference will also be generated within the time difference. Therefore, the triangular model can be used to compensate for the displacement difference caused by the rounding up of the total interpolation period corresponding to the stage time.

[0041] Here, the displacement difference can be used to determine the maximum acceleration corresponding to the triangular model.

[0042] In some embodiments, a triangular model is constructed with an initial velocity and a final velocity of 0 and an initial and final acceleration of 0, so that the displacement of the triangular model is the displacement difference; and the maximum acceleration corresponding to the triangular model is calculated using the displacement difference.

[0043] Step 14: Calculate the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment respectively.

[0044] After determining the maximum acceleration corresponding to the triangular model and the stage times corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment, the above data can be used to calculate the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and the displacement expression coefficients of the triangular model.

[0045] After determining the coefficients of the displacement expression, the corresponding displacement expression can be obtained.

[0046] Step 15: Use each stage time to perform S-shaped velocity and triangular model mixed interpolation according to the corresponding displacement expression to obtain the first control strategy.

[0047] In some embodiments, the S-shaped velocity and triangular model calculations can be performed according to the corresponding displacement expression at each stage time to obtain the S-shaped displacement and the triangular model displacement, and the actual displacement is obtained by adding them together. Then, the corresponding first control strategy is generated according to the parameters corresponding to the displacement expression.

[0048] Step 16: Generate execution actions of the CNC machine tool using the first control strategy.

[0049] In some embodiments, after the first control strategy is generated, the first control strategy can be used to generate an execution action of a numerically controlled machine tool, so that the numerically controlled machine tool can control the movement of a corresponding actuator (axis) according to the execution action.

[0050] In one application scenario, the planning of the S-type speed planning module includes the following methods:

[0051] Get basic parameters, maximum acceleration limit , maximum jerk limit , unit interpolation period ; Initial velocity , Final speed , Maximum speed limit , the total displacement .

[0052] Considering the minimum time consumption, seven S-shaped motion time periods are planned, namely acceleration period, uniform acceleration period, deceleration period, uniform speed period, acceleration and deceleration period, and deceleration and deceleration period. , displacement Get acceleration , deceleration , jerk , reduce speed , corresponding to . Maximum achievable speed ,

[0053] There is a period of acceleration , deceleration time , total exercise time .

[0054] To minimize time consumption and simplify calculation, take the maximum jerk as the jerk of motion , Maximum deceleration stage , .

[0055] Get the target time point As a parameter, the displacement calculation formula for each time period is obtained.

[0056] In the acceleration phase, have

[0057] ;

[0058] ;

[0059] ;

[0060] In the uniform acceleration phase, have

[0061] ;

[0062] ;

[0063] ;

[0064] In the deceleration phase, have

[0065] ;

[0066] ;

[0067]

[0068] ;

[0069] The maximum achievable speed , acceleration stage displacement .

[0070] In the uniform speed section, have

[0071] ;

[0072] ;

[0073] ;

[0074] In the acceleration and deceleration stage, have

[0075] ;

[0076] ;

[0077] ;

[0078] ;

[0079] In the uniform deceleration phase, have

[0080] ;

[0081] ;

[0082] ;

[0083]

[0084] ;

[0085] In the deceleration stage, have

[0086] ;

[0087]

[0088] ;

[0089]

[0090] ;

[0091] so, ;

[0092] .

[0093] Determine the maximum achievable speed The value of , basically determines the seven-segment S-shaped motion model. In order to determine the value of the maximum achievable speed , consider the following scenario:

[0094] The minimum model requirement is ,

[0095] In the acceleration module, the maximum achievable speed satisfy .

[0096] when When , there is a uniform acceleration segment, and the maximum acceleration can be reached . Time calculation:

[0097] ;

[0098] Otherwise, there is no uniform acceleration segment, then and , can be obtained

[0099] ;

[0100] then, , the total displacement of the acceleration section is .

[0101] Similarly, for the deceleration module, there are two cases where the maximum achievable speed is ,

[0102] ;

[0103] when When , there is a uniform acceleration segment, and the maximum deceleration value can be reached . Calculation time:

[0104] ;

[0105] Otherwise, there is no uniform acceleration segment, then and , can be obtained

[0106] ;

[0107] then, , the total displacement of the deceleration section is .

[0108] when , the target displacement must be guaranteed , otherwise, this model requires a longer target displacement or higher axis parameters to execute.

[0109] Under the above conditions, in order to minimize the time consumption, the maximum achievable speed should be increased as much as possible. ,Pick ,calculate , ,like , then the maximum achievable speed is determined as ;

[0110] Otherwise, use binary search to let In the interval Search in, get Approximately equal to , determine the maximum achievable speed.

[0111] according to Calculation time , uniform speed period , a seven-segment S-type continuous model was determined, and the total displacement .

[0112] Since the total interpolation cycle It is not necessarily an integer multiple of the unit interpolation period. Round up to integer multiples of the unit interpolation period , the extra time Put it in the uniform speed section ,renew , , there will be a displacement difference that needs to be compensated .

[0113] Construct a triangular model with initial and final velocities of 0 and initial and final accelerations of 0, so that the total interpolation time is , displacement of the triangular model .

[0114] Divide the triangular model into five sections and construct the acceleration, velocity, and displacement formulas of the triangular model:

[0115] ;

[0116] ;

[0117]

[0118] According to the total displacement of the triangular model , calculate the maximum acceleration of the triangular model ,

[0119] ;

[0120] Therefore, the displacement expression of the triangular model can be calculated.

[0121] Obtain the coefficients of the displacement expressions for the seven-segment S-type and triangular models, respectively.

[0122] The displacement at a specific time point is .

[0123] The advantages of this application are: a continuous model is constructed through seven-segment S-shaped speed planning to ensure axis stability, and the calculation time and motion time are reduced through dichotomy. Discretization is achieved through triangular model mixed speed planning to make the motion trajectory smoother. In practical applications, it can better meet processing requirements and adapt to high-speed and high-precision processing environments.

[0124] That is, the control method of the CNC machine tool provided in this embodiment obtains the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement of the CNC machine tool; uses the S-type speed planning module to sequentially plan the stage times corresponding to the acceleration section, the uniform acceleration section, the deceleration section, the uniform speed section, the acceleration and deceleration section, the uniform deceleration section and the deceleration and deceleration section according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement; and uses the triangular model to compensate for the total interpolation cycle corresponding to the stage time. The displacement difference caused by rounding up is used to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment and the displacement expression coefficients of the triangular model are calculated respectively; the S-type speed and triangular model mixed interpolation are performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the first control strategy is used to generate the execution mode of the CNC machine tool, and the rate of change of acceleration, that is, the jerk, is limited to ensure that no matter how the acceleration limit is increased, the machine tool will not vibrate violently. And the maximum achievable speed is determined by dichotomy, so that the analytical solutions of the seven-segment S-type and triangular model time periods, jerk values, and acceleration values ​​can be obtained, which improves the calculation accuracy and greatly reduces the amount of calculation; at the same time, the simple polynomial displacement calculation during interpolation reduces the calculation time, which is suitable for high-speed and high-precision processing scenarios.

[0125] See also Figure 2 , Figure 2 1 is a flow chart of another embodiment of the control method of a CNC machine tool provided by the present application. The method comprises:

[0126] Step 21: Obtain the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool.

[0127] Step 22: Use the S-type speed planning module to plan the corresponding stage times of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment in sequence according to the maximum acceleration limit, maximum jerk limit, unit interpolation period, initial speed, final speed, maximum speed limit and total displacement.

[0128] Step 23: Use the triangular model to compensate for the displacement difference caused by rounding up the total interpolation period corresponding to the stage time, and obtain the maximum acceleration corresponding to the triangular model.

[0129] Step 24: Calculate the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment respectively.

[0130] Step 25: Use each stage time to perform S-shaped velocity and triangular model mixed interpolation according to the corresponding displacement expression to obtain the first control strategy.

[0131] Steps 21 to 25 have the same or similar technical solutions as any embodiment of the present application and will not be described in detail here.

[0132] Step 26: Obtain the second control strategy optimized by the reinforcement learning model.

[0133] In some embodiments, see Figure 3 , step 26 may be the following process:

[0134] Step 261: Acquire proximity sensor data, position sensor data, and gyro sensor data of the CNC machine tool.

[0135] Among them, the proximity sensor data can represent the movement information of the CNC machine tool actuator. The position sensor data can represent the positional relationship between the CNC machine tool actuator and the target. The gyroscope sensor data can represent the speed information of the CNC machine tool actuator, such as angular velocity and / or linear velocity.

[0136] Step 262: Input the proximity sensor data into the long short-term memory recurrent network of the reinforcement learning model to obtain a first output.

[0137] Step 263: Convert the first output into a key vector and a value vector respectively, and convert the position sensor data and the gyro sensor data into a query vector.

[0138] In some embodiments, the first output is input into a first fully connected layer to output a key vector. The first output is input into a second fully connected layer to output a value vector. The position sensor data and the gyro sensor data are input into a third fully connected layer to output a query vector.

[0139] Step 264: Input the key vector, the value vector, and the query vector into the attention network of the reinforcement learning model to obtain a second output.

[0140] Step 265: Obtain a third output according to the first output and the second output.

[0141] In some embodiments, the first output and the second output may be weighted to obtain a third output.

[0142] In some embodiments, the third output may be obtained using the following formula:

[0143] aX+(1-a)S.

[0144] Wherein, X: the second output from the attention network; S: the output from the long short-term memory recurrent network; a: a weight parameter, usually in the range of 0 to 1;

[0145] When a = 0, the output depends entirely on S (the output of the long short-term memory recurrent network)

[0146] When a = 1, the output depends entirely on X (the output of the attention network)

[0147] When 0 < a < 1, the output is a weighted average of X and S.

[0148] Step 266: Obtain a linear velocity signal, an angular velocity signal, and an evaluation function based on the third output, the position sensor data, and the gyro sensor data respectively.

[0149] In some embodiments, the third output, the position sensor data, and the gyro sensor data are serially connected, and the serially connected data is respectively input into a fourth fully connected layer and a fifth fully connected layer connected in sequence to obtain a linear velocity signal and an angular velocity signal. And the serially connected data is input into a sixth fully connected layer and a seventh fully connected layer connected in sequence to obtain an evaluation function.

[0150] Step 267: Obtain a second control strategy using the linear velocity signal and the angular velocity signal; and update the reinforcement learning model using the evaluation function.

[0151] In some embodiments, the reinforcement learning model is updated in combination with the reward function corresponding to the second control strategy, the proximity sensor data, the position sensor data, the gyro sensor data, and the evaluation function.

[0152] In some embodiments, after the numerical control machine tool performs corresponding actions, the reward function corresponding to the second control strategy can be obtained, and then the reinforcement learning model is updated in combination with the reward function corresponding to the second control strategy, the proximity sensor data, the position sensor data, the gyro sensor data, and the evaluation function. For example, the model parameters in the reinforcement learning model are updated.

[0153] Furthermore, the proximity sensor data, the position sensor data, the gyro sensor data, and the second control strategy can be input into a feedforward neural network to obtain the system state of the numerical control machine tool.

[0154] In some embodiments, the feedforward neural network can predict the system state in combination with the proximity sensor data, the position sensor data, the gyro sensor data, and the second control strategy, and then obtain the system prediction state.

[0155] In some embodiments, the feedforward neural network can combine the proximity sensor data, position sensor data, gyroscope sensor data and the second control strategy output intermediate value, substitute the intermediate value and the data synchronization time into the system incremental function to obtain the output value of the system incremental function, and fuse the output value of the system incremental function with the real-time proximity sensor data, position sensor data, and gyroscope sensor data to obtain the system status of the CNC machine tool.

[0156] In some embodiments, the feedforward neural network is trained in the following manner:

[0157] The real-time state data collected by the sensors of the CNC machine tool and the real-time control data of the CNC machine tool are input into the feedforward neural network, and the intermediate value is output by the feedforward neural network. The intermediate value and the data synchronization time are substituted into the system increment function to obtain the output value of the system increment function. The output value represents the state increment of the CNC machine tool.

[0158] The output value is fused with the real-time state data collected by the sensor of the CNC machine tool to obtain the predicted system state. The mean square error is calculated using the real-time state data collected by the sensor of the CNC machine tool and the predicted system state, and the data loss is obtained based on the mean square error.

[0159] The system increment function also outputs a closed-form gradient, and substitutes the data synchronization moment and the real-time control data of the CNC machine tool into the interpolation excitation vector function to obtain the excitation vector.

[0160] The system state space model is obtained by combining the excitation vector and the predicted system state.

[0161] The system state space model and closed form gradient are combined to calculate the mean square error, and the physical loss is obtained based on the mean square error.

[0162] The data loss and physical loss are integrated to obtain the total loss, and the network parameters of the feedforward neural network are adjusted based on the total loss until the training of the feedforward neural network is completed.

[0163] Step 27: The first control strategy and the second control strategy are integrated to generate an execution action of the CNC machine tool.

[0164] In some embodiments, the time-optimal straight line segment interpolation method of the hybrid S-type and triangular models is integrated with the machine tool execution action optimized by the reinforcement learning model to obtain a further optimized control effect and form the execution action of the CNC machine tool.

[0165] The control method of the numerical control machine tool provided in the present embodiment obtains the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement of the numerical control machine tool; uses the S-type speed planning module to sequentially plan the stage times corresponding to the acceleration section, the uniform acceleration section, the deceleration section, the uniform speed section, the acceleration and deceleration section, the uniform deceleration section and the deceleration and deceleration section according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement; uses the triangular model to compensate for the total interpolation cycle corresponding to the stage time. The displacement difference caused by rounding up is used to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment and the displacement expression coefficients of the triangular model are calculated respectively; the S-type speed and triangular model mixed interpolation are performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated by the first control strategy, and the rate of change of acceleration, that is, the jerk, is limited to ensure that no matter how the acceleration limit is increased, the machine tool will not vibrate violently. And the maximum achievable speed is determined by dichotomy, so that the analytical solutions of the seven-segment S-type and triangular model time periods, jerk values, and acceleration values ​​can be obtained, which improves the calculation accuracy and greatly reduces the amount of calculation; at the same time, the simple polynomial displacement calculation during interpolation reduces the calculation time, which is suitable for high-speed and high-precision processing scenarios.

[0166] Furthermore, the time-optimal straight line segment interpolation method that mixes the S-type and triangular models is integrated with the machine tool execution action optimized by the reinforcement learning model to obtain a further optimized control effect, which can further improve the calculation accuracy and greatly reduce the amount of calculation.

[0167] See also Figure 4 , Figure 4 4 is a schematic diagram of the structure of an embodiment of a CNC machine tool provided by the present application. The CNC machine tool 40 includes a processor 41, a memory 42 and an actuator 43 connected to the processor 41; the memory 42 is used to store a computer program, and when the computer program is executed by the processor 414, it is used to implement the following method:

[0168] The maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool are obtained; the stage times corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment are planned in sequence by using the S-type speed planning module according to the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement; the displacement difference caused by rounding up the total interpolation cycle corresponding to the stage time is compensated by using the triangular model to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment are calculated respectively; the S-type speed and triangular model mixed interpolation is performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated by using the first control strategy.

[0169] It can be understood that when the computer program is executed by the processor 41, it is also used to implement the method of any of the above embodiments.

[0170] See also Figure 5 , Figure 5 1 is a schematic diagram of a computer readable storage medium according to an embodiment of the present application. The computer readable storage medium 50 is used to store a computer program 51. When the computer program 51 is executed by a processor, it is used to implement the following method:

[0171] The maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool are obtained; the stage times corresponding to the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment are planned in sequence by using the S-type speed planning module according to the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement; the displacement difference caused by rounding up the total interpolation cycle corresponding to the stage time is compensated by using the triangular model to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration / deceleration segment, uniform deceleration segment and deceleration / deceleration segment are calculated respectively; the S-type speed and triangular model mixed interpolation is performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated by using the first control strategy.

[0172] It can be understood that when the computer program 51 is executed by the processor, it is also used to implement the method of any of the above embodiments.

[0173] In summary, the control method of the CNC machine tool, the CNC machine tool and the computer-readable storage medium provided by the present application obtain the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement of the CNC machine tool; use the S-shaped speed planning module to plan the stage times corresponding to the acceleration section, the uniform acceleration section, the deceleration section, the uniform speed section, the acceleration and deceleration section, the uniform deceleration section and the deceleration and deceleration section in sequence according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement; use the triangular model to compensate for the stage time The displacement difference caused by rounding up the corresponding total interpolation cycle is used to obtain the maximum acceleration corresponding to the triangular model; the displacement expression coefficients of the acceleration segment, uniform acceleration segment, deceleration segment, uniform speed segment, acceleration and deceleration segment, uniform deceleration segment and deceleration and deceleration segment and the displacement expression coefficients of the triangular model are calculated respectively; the S-type speed and triangular model mixed interpolation are performed according to the corresponding displacement expression in each stage time to obtain the first control strategy; the execution action of the CNC machine tool is generated using the first control strategy, that is, the rate of change of acceleration, that is, the jerk is limited to ensure that no matter how the acceleration limit is increased, there will be no severe vibration of the machine tool. And the maximum achievable speed is determined by dichotomy, so that the analytical solutions of the seven-segment S-type and triangular model time periods, jerk values, and acceleration values ​​can be obtained, which improves the calculation accuracy and greatly reduces the amount of calculation; at the same time, the simple polynomial displacement calculation during interpolation reduces the calculation time and is suitable for high-speed and high-precision processing scenarios.

[0174] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0175] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable 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 method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.

[0176] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A control method for a numerically controlled machine tool, characterized in that: The method comprises: Obtaining the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement of the CNC machine tool; Using the S-type speed planning module, according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation period, the initial speed, the final speed, the maximum speed limit and the total displacement, the corresponding stage times of the acceleration section, the uniform acceleration section, the deceleration section, the uniform speed section, the acceleration and deceleration section, the uniform deceleration section and the deceleration and deceleration section are planned in sequence; Using a triangular model to compensate for the displacement difference caused by rounding up the total interpolation period corresponding to the stage time, the maximum acceleration corresponding to the triangular model is obtained; Calculate the displacement expression coefficients and triangular model displacement expression coefficients of the acceleration segment, the uniform acceleration segment, the deceleration segment, the uniform speed segment, the acceleration / deceleration segment, the uniform deceleration segment, and the deceleration / deceleration segment respectively; Using each stage time according to the corresponding displacement expression, S-shaped velocity and triangular model mixed interpolation is performed to obtain the first control strategy; generating an execution action of the CNC machine tool by using the first control strategy; The S-type speed planning module is used to plan the stage times corresponding to the acceleration segment, the uniform acceleration segment, the deceleration segment, the uniform speed segment, the acceleration and deceleration segment, the uniform deceleration segment and the deceleration and deceleration segment in sequence according to the maximum acceleration limit, the maximum jerk limit, the unit interpolation cycle, the initial speed, the final speed, the maximum speed limit and the total displacement, including: The S-shaped speed planning module is used to plan the acceleration, deceleration, jerk, deceleration and maximum achievable speed and time of each stage of the acceleration section, uniform acceleration section, deceleration section, uniform speed section, acceleration and deceleration section, uniform deceleration section and deceleration and deceleration section in sequence according to the maximum acceleration limit, maximum jerk limit, unit interpolation cycle, initial speed, final speed, maximum speed limit and total displacement; The maximum achievable speed is determined in the following manner: Selecting the larger one of the initial speed and the final speed as the maximum achievable speed; Alternatively, the maximum achievable speed is determined by using a binary search method in determining the initial speed, the final speed and the maximum speed limit; The method of using the triangular model to compensate for the displacement difference caused by rounding up the total interpolation period corresponding to the stage time to obtain the maximum acceleration corresponding to the triangular model includes: Constructing a triangular model with an initial velocity and a final velocity of 0 and an initial and final acceleration of 0, so that the displacement of the triangular model is the displacement difference; The maximum acceleration corresponding to the triangular model is calculated using the displacement difference.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a second control strategy optimized by a reinforcement learning model; Generating the execution action of the CNC machine tool by using the first control strategy includes: The first control strategy and the second control strategy are integrated to generate an execution action of the CNC machine tool.

3. The method according to claim 2, characterized in that The step of obtaining the second control strategy optimized by the reinforcement learning model includes: Acquiring proximity sensor data, position sensor data and gyro sensor data of the CNC machine tool; Inputting the proximity sensor data into the long short-term memory recurrent network of the reinforcement learning model to obtain a first output; converting the first output into a key vector and a value vector, respectively, and converting the position sensor data and the gyro sensor data into a query vector; Inputting the key vector, the value vector, and the query vector into an attention network of the reinforcement learning model to obtain a second output; Obtaining a third output according to the first output and the second output; Obtaining a linear velocity signal, an angular velocity signal and an evaluation function respectively according to the third output, the position sensor data and the gyro sensor data; Obtaining the second control strategy using the linear velocity signal and the angular velocity signal; And updating the reinforcement learning model using the evaluation function.

4. The method according to claim 3, characterized in that The step of updating the reinforcement learning model by using an evaluation function comprises: The reinforcement learning model is updated in combination with the reward function corresponding to the second control strategy, the proximity sensor data, the position sensor data, the gyro sensor data, and the evaluation function.

5. The method according to claim 3, characterized in that: The proximity sensor data, the position sensor data, the gyro sensor data and the second control strategy are input into a feedforward neural network to obtain the system state of the CNC machine tool.

6. A CNC machine tool, characterized in that: The CNC machine tool comprises a processor, a memory connected to the processor, and an execution mechanism; the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • S-shaped acceleration and deceleration control method for changing speed and position of object on line

    CN106168790A