Prospective speed planning method and device based on continuous trajectory

By adopting a forward-looking speed planning method based on continuous trajectory in CNC machining, the equipment start-stop problem is solved, vibration is reduced, processing efficiency is improved and equipment service life is extended.

CN119472518AActive Publication Date: 2025-02-18GUANGZHOU XINT AUTOMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411609832.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

During the CNC machining process, the multi-stage continuity trajectory to be processed leads to serious problems in the start and stop of the equipment, causing equipment vibration, affecting processing efficiency and reducing the service life of the equipment.

Method used

Using a forward-looking velocity planning method based on continuous trajectories, by obtaining at least two continuous motion trajectories of the industrial controller, calculating the velocity vector data of each trajectory, determining the result of the directional change between the trajectories, and performing forward-looking velocity planning based on these parameters. Ensure that machining tools can quickly enter the equipment without pausing the equipment when plugging in the track.

Benefits of technology

It realizes the reduction of equipment start and stop, reduces vibration frequency, improves processing efficiency and extends the service life of the equipment during CNC machining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472518A_ABST
    Figure CN119472518A_ABST
Patent Text Reader

Abstract

The invention discloses a prospective speed planning method based on a continuous trajectory. The method comprises the following steps: obtaining at least two continuous motion trajectories of an industrial controller; acquiring a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; calculating first velocity vector data of the first target trajectory based on the coordinate information of the first space where the first target trajectory is located, and calculating second velocity vector data of the second target trajectory based on the coordinate information of the second space where the second target trajectory is located; based on the first velocity vector data and the second velocity vector data, determining a change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory; and based on the first trajectory parameter, the second trajectory parameter and the change result, performing prospective speed planning on the motion trajectory of the industrial controller. The machining efficiency can be improved, and meanwhile the service life of equipment is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of numerical control machining, and in particular to a forward-looking speed planning method based on a continuous trajectory and a device thereof. Background Art

[0002] With the upgrading of automation level of industrial equipment, the price of servo drive and other equipment is continuously decreasing, CNC machining accounts for an increasing proportion in industrial equipment, and many industrial products are increasingly inclined to use CNC methods to achieve contour machining. In the process of using CNC machining, the industrial products are mainly processed by industrial controllers to control the machining tools along the predetermined trajectory.

[0003] Since industrial products require a variety of trajectories, in some scenarios with high process requirements, the entire processing process is required to be as fast as possible and as free of jitter as possible. However, in the continuous trajectory to be processed, since the continuous trajectory is multi-segmented, it may be necessary for the equipment to pause after processing one trajectory and then restart the processing after determining the processing direction of the next trajectory. This makes the start and stop problem of the entire processing process more serious, which is easy to cause vibration of the entire equipment, thereby affecting the processing efficiency and reducing the service life of the equipment. Summary of the invention

[0004] The purpose of the present invention is to solve the problems in the prior art and to propose a forward-looking speed planning method based on continuous trajectory and a device thereof.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A forward-looking speed planning method based on continuous trajectory comprises the following steps:

[0007] Acquire at least two continuous motion trajectories of the industrial controller; the two continuous motion trajectories include a first target trajectory and a second target trajectory, the second target trajectory is an interpolation trajectory of the first target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory;

[0008] Acquire a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory;

[0009] Calculating first velocity vector data of the first target trajectory based on first spatial coordinate information of the first target trajectory, and calculating second velocity vector data of the second target trajectory based on second spatial coordinate information of the second target trajectory;

[0010] Based on the first velocity vector data and the second velocity vector data, determining a change result of a sub-direction of each axis of the second target trajectory relative to a sub-direction of each axis of the first target trajectory; the sub-direction of each axis includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction;

[0011] Based on the first trajectory parameter, the second trajectory parameter and the change result, forward speed planning is performed on the motion trajectory of the industrial controller.

[0012] According to a forward-looking speed planning method based on a continuous trajectory provided by the present invention, forward-looking speed planning is performed on the motion trajectory of the industrial controller based on the first trajectory parameter, the second trajectory parameter and the change result, including:

[0013] If the change result is that the sub-directions of the respective axes of the second target trajectory do not change relative to the sub-directions of the respective axes of the first target trajectory, then calculating the maximum allowable transition speed of the respective axes of the first target trajectory based on the first trajectory parameters and the second trajectory parameters;

[0014] Determine the transition speed with the smallest value among the maximum allowable transition speeds of each axis of the first target trajectory as the minimum step transition speed of the first target trajectory;

[0015] The minimum step transition speed of the first target trajectory is used as the maximum target speed when entering the second target trajectory, so that the machining tool controlled by the industrial controller directly enters the second target trajectory after reaching the maximum target speed in the first target trajectory.

[0016] According to a forward-looking speed planning method based on continuous trajectories provided by the present invention, the step of obtaining at least two continuous motion trajectories of an industrial controller includes:

[0017] Inputting the first target trajectory into a trajectory generation model to obtain the second target trajectory output by the trajectory generation model; the trajectory generation model is trained based on sample trajectory data and its corresponding annotated trajectory data;

[0018] Accordingly, the specific steps of training the trajectory generation model include:

[0019] Acquire historical trajectory data; the historical trajectory data includes first historical trajectory data corresponding to the first historical trajectory and second historical trajectory data corresponding to the second historical trajectory, wherein the second historical trajectory is an interpolated trajectory of the first historical trajectory;

[0020] Classify the first historical trajectory data and the second historical trajectory data to obtain first classified trajectory data and second classified trajectory data respectively;

[0021] Model training is performed on a pre-trained LSTM neural network based on the first classified trajectory data and the second classified trajectory data to obtain the trajectory generation model.

[0022] According to a forward-looking speed planning method based on continuous trajectory provided by the present invention, the loss function of the trained trajectory generation model is:

[0023]

[0024] Among them, L represents the total loss function, represents the i-th trajectory position predicted by the model, T i represents the actual position of the ith trajectory, express With T i The distance between them, ω1 represents the weight coefficient of trajectory prediction; represents the predicted velocity when the model is at the i-th trajectory position, υ i represents the actual speed at the i-th trajectory position, ω2 represents the weight coefficient of speed prediction, express With i The relative error between represents the angle of the kth point on the arc predicted by the model, θ k represents the angle of the kth point on the actual arc, M represents the total number of points on the arc, and ω3 represents the weight coefficient of the arc angle prediction; represents the tool wear rate predicted by the model, d represents the actual tool wear rate, and ω4 represents the weight coefficient of tool wear rate prediction; represents the cutting parameter value predicted by the model, c represents the actual cutting parameter value, and ω5 represents the weight coefficient of cutting parameter prediction.

[0025] According to a forward-looking velocity planning method based on a continuous trajectory provided by the present invention, the first target trajectory includes, and the second target trajectory includes a straight line trajectory or an arc trajectory, wherein, when the first target trajectory is an arc trajectory, the first velocity vector data is calculated based on the tangent angle at the end of the first target trajectory; when the second target trajectory is an arc trajectory, the second velocity vector data is calculated based on the tangent angle at the beginning of the second target trajectory.

[0026] According to a forward-looking velocity planning method based on a continuous trajectory provided by the present invention, the first trajectory parameters include a step constant, a gear ratio of an axis of the first target trajectory, a pulse unit feed speed, and a velocity component ratio of the first target trajectory; the second trajectory parameters include the step constant, the gear ratio of an axis of the second target trajectory and a pulse unit feed speed, and a velocity component ratio of the second target trajectory.

[0027] According to a forward-looking velocity planning method based on a continuous trajectory provided by the present invention, the first velocity vector data of the first target trajectory is calculated based on the first spatial coordinate information of the first target trajectory, and the second velocity vector data of the second target trajectory is calculated based on the second spatial coordinate information of the second target trajectory, including:

[0028] Calculate the component of each axis in the coordinates of the first target trajectory relative to the vector and the feeding direction based on the spatial coordinate information of the first target trajectory, and calculate the direction of each axis of the first target trajectory based on the component of each axis in the coordinates of the first target trajectory relative to the vector and the feeding direction;

[0029] Based on the spatial coordinate information of the second target trajectory, the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction are calculated; based on the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction, the directions of each axis of the first target trajectory are calculated.

[0030] A forward-looking speed planning device based on continuous trajectory, comprising:

[0031] A first acquisition unit is used to acquire at least two continuous motion trajectories of the industrial controller, wherein the two continuous motion trajectories include a first target trajectory and a second target trajectory, wherein the motion time of the first target trajectory is before the motion time of the second target trajectory; a second acquisition unit is used to acquire a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; a calculation unit is used to calculate the first velocity vector data of the first target trajectory based on the first spatial coordinate information of the first target trajectory, and to calculate the second velocity vector data of the second target trajectory based on the second spatial coordinate information of the second target trajectory; a judgment processing unit is used to determine the change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory based on the first velocity vector data and the second velocity vector data; the sub-direction of each axis includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; an output unit is used to perform forward velocity planning on the motion trajectory of the industrial controller based on the first trajectory parameter, the second trajectory parameter and the change result.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a forward-looking speed planning method based on a continuous trajectory as described in any one of claims 1 to 7 are implemented.

[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a forward-looking velocity planning method based on a continuous trajectory as described in any one of claims 1 to 7.

[0034] Compared with the prior art, the present invention has the following advantages:

[0035] The present invention provides a forward-looking speed planning method based on continuous trajectories and a device thereof. By acquiring the continuous trajectory to be worked, the velocity vector data of the acquired trajectory is obtained, so as to quickly judge whether the continuous trajectory needs interpolation transition, and complete the forward-looking speed planning of the continuous trajectory movement after the judgment, so that the interpolation trajectory can transition at the highest target speed during the transition, so that the processing tool can quickly enter when processing the interpolation trajectory without pausing the equipment, thereby making the entire processing process as fast as possible, and transitioning without or with less stops as much as possible, and minimizing the vibration frequency caused to the entire equipment as much as possible, thereby reducing the impact on the overall performance of the industrial controller, improving the processing efficiency and increasing the service life of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of a forward-looking speed planning method based on a continuous trajectory provided by an embodiment of the present invention;

[0038] Figure 2 One of the schematic diagrams of two trajectories provided in an embodiment of the present invention;

[0039] Figure 3 The second schematic diagram of two trajectories provided in an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of the structure of a forward-looking speed planning device based on a continuous trajectory provided by an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of the structure of the electronic device proposed by the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] Combine the following Figure 1-Figure 5 The present invention describes a forward-looking speed planning method based on continuous trajectory and a device thereof.

[0044] Figure 1 FIG. 1 is a flow chart of a forward-looking speed planning method based on continuous trajectory provided by the present invention. Figure 1 As shown, the method includes:

[0045] Step 101: Acquire at least two continuous motion trajectories of an industrial controller.

[0046] The two continuous motion trajectories include a first target trajectory and a second target trajectory, the second target trajectory is an interpolation trajectory of the first target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory.

[0047] Specifically, the first target trajectory is the current processing trajectory of the processing tool, and the second target trajectory is the trajectory to be processed that the processing tool enters immediately afterwards. The first target trajectory includes a straight line trajectory or a circular arc trajectory, and the second target trajectory includes a straight line trajectory or a circular arc trajectory, so that four continuous motion trajectory states are formed between the first target trajectory and the second target trajectory. At the same time, when obtaining the corresponding first target trajectory and the second target trajectory, the position information of the coordinate system where the first target trajectory and the second target trajectory are located is also determined accordingly. The coordinate system is a three-dimensional space coordinate system including the x-axis, y-axis and z-axis, and the acquisition of the first target trajectory can be obtained in real time through the equipment operation plan or the sensor installed on the processing tool, and the second target trajectory can be obtained through the equipment operation plan, the sensor installed on the processing tool, and the trajectory generation model by inputting the first target trajectory.

[0048] Step 102 : obtaining first trajectory parameters of the first target trajectory and second trajectory parameters of the second target trajectory.

[0049] Specifically, the first trajectory parameters include the step constant, the gear ratio of the axis of the first target trajectory, and the pulse unit feed speed; the second trajectory parameters include the step constant, the gear ratio of the axis of the second target trajectory, and the pulse unit feed speed. The step constant is calculated by the difference between the transition speeds of the first target trajectory and the second target trajectory. Since the step of each axis needs to be limited, there is a maximum allowable step constant (generally 1) to facilitate the calculation of the subsequent maximum allowable transition speed. The gear ratio of the axis of the first target trajectory and the pulse unit feed speed, and the gear ratio of the axis of the second target trajectory and the pulse unit feed speed can be obtained by consulting the CNC equipment manual.

[0050] Step 103, calculating first velocity vector data of the first target trajectory based on first spatial coordinate information of the first target trajectory, and calculating second velocity vector data of the second target trajectory based on second spatial coordinate information of the second target trajectory;

[0051] Specifically, the first spatial coordinate information is the corresponding position information in the coordinate system of the first target trajectory, and the second spatial coordinate information is the corresponding position information in the coordinate system of the second target trajectory. The calculation process of the first velocity vector data is as follows: based on the spatial coordinate information of the first target trajectory, the component of each axis in the coordinates of the first target trajectory relative to the vector and the feed direction are calculated, and based on the component of each axis in the coordinates of the first target trajectory relative to the vector and the feed direction, the sub-directions of each axis of the first target trajectory are calculated; the calculation process of the second velocity vector data is as follows: based on the spatial coordinate information of the second target trajectory, the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction are calculated, and based on the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction, the sub-directions of each axis of the second target trajectory are calculated.

[0052] At the same time, after obtaining the first velocity vector data and the second velocity vector data, the first trajectory parameter also includes the velocity component ratio of the first target trajectory calculated from the first velocity vector data, and the second trajectory parameter also includes the velocity component ratio of the second target trajectory calculated from the second velocity vector data. Wherein, the velocity component in the circular arc trajectory is the projection of the tangent vector on each coordinate axis, and the velocity component on the straight line trajectory is the component of the velocity vector of the straight line trajectory corresponding to each coordinate axis, wherein the velocity vector is calculated based on the parameter equation of the straight line trajectory.

[0053] Step 104, based on the first velocity vector data and the second velocity vector data, determine the change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory; the sub-direction of each axis includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction.

[0054] Specifically, the sub-directions of each axis of the first target trajectory and the sub-directions of each axis of the second target trajectory are calculated in step 103. After the sub-directions of each axis of the first target trajectory and the sub-directions of each axis of the second target trajectory are determined in step 103, the sub-directions of each axis of the first target trajectory are compared with the sub-directions of each axis of the second target trajectory, that is, the change results of the sub-directions of the horizontal axis direction (x-axis), the vertical axis direction (y-axis), and the longitudinal axis direction (z-axis) are compared respectively.

[0055] Step 105 , based on the first trajectory parameter, the second trajectory parameter and the change result, forward speed planning is performed on the motion trajectory of the industrial controller.

[0056] Specifically, if the change result is that the sub-directions of the axes of the second target trajectory do not change relative to the sub-directions of the axes of the first target trajectory, the forward speed planning process for the motion trajectory of the industrial controller is as follows:

[0057] Based on the first trajectory parameters and the second trajectory parameters, the maximum allowable transition speed of each axis of the first target trajectory is calculated; among the maximum allowable transition speeds of each axis of the first target trajectory, the transition speed with the smallest value is determined as the minimum step transition speed of the first target trajectory; the minimum step transition speed of the first target trajectory is used as the highest target speed when entering the second target trajectory, so that the machining tool controlled by the industrial controller can directly enter the second target trajectory after accelerating or decelerating in the first target trajectory or decelerating to reach the minimum step transition speed.

[0058] The present invention relates to the fields of numerical control machining, motion trajectory and trajectory planning, and proposes a forward-looking speed planning method based on continuous trajectory. In the present invention, the forward-looking speed planning method proposed can enable the machining tool to quickly enter the machining interpolation trajectory without pausing the equipment, thereby making the entire machining process as fast as possible, with no or less stop transition, and minimizing the vibration frequency caused to the entire equipment, thereby reducing the impact on the overall performance of the industrial controller, improving machining efficiency and increasing the service life of the equipment.

[0059] Specifically, in step 101, when the acquired continuous motion trajectory is greater than 2, the position of the moving tool is followed, and the second target trajectory is always maintained as the next trajectory that the moving tool enters after passing the first target trajectory, so that the actual position of the second target trajectory is automatically adjusted according to the operating state and position of the moving tool. For example, when there are 3 continuous motion trajectories, when the machining tool moves to the second motion trajectory in the middle, the second motion trajectory is the first target trajectory, and the third motion trajectory is the second target trajectory.

[0060] Specifically, in step 103, when calculating the first velocity vector data and the second velocity vector data, when the first target trajectory is an arc trajectory, the first velocity vector data is calculated based on the tangent angle at the end of the first target trajectory; when the second target trajectory is an arc trajectory, the second velocity vector data is calculated based on the tangent angle at the beginning of the second target trajectory, and the steps are as follows:

[0061] If the first target trajectory or the second target trajectory is a straight line trajectory, in one embodiment, there is a given vector Then the parameter direction of the straight line trajectory in three-dimensional space is Velocity vector for a straight line trajectory

[0062] For the x-axis: the velocity component of the straight line trajectory in the x-direction

[0063] The x-axis is relative to the vector The weight is:

[0064] For the y-axis: the velocity component of the straight line trajectory in the y direction

[0065] The y-axis is relative to the vector The weight is:

[0066] For the z-axis: The velocity component of the straight line trajectory in the z-direction is

[0067] The z axis is relative to the vector The weight is:

[0068] where · represents the dot product operation, is a vector Model.

[0069] At the same time, when calculating the feed direction of the first target trajectory and the second target trajectory, according to the coordinates P1 (x1, y1, z1) and P2 (x2, y2, z2) of the two points in the corresponding coordinate system on the straight line trajectory, the feed direction vector is: Normalize it to get the unit feed direction vector in

[0070] After that, the sub-directions of each axis of the first target trajectory and the sub-directions of each axis of the second target trajectory are obtained as follows: The sub-direction of the x-axis is The axis directions are The axis directions are

[0071] Similarly, in one embodiment, if the first target trajectory or the second target trajectory is an arc trajectory, the feeding direction of the arc trajectory is also the direction of the tangent vector of the arc at a certain point. The coordinates of the center of the arc trajectory in three-dimensional space are (a, b, c), the radius is r, and its parametric equation is:

[0072] in, and θ are parameters, representing angles.

[0073] When calculating the tangent vector, first find the partial derivatives of the parametric equations:

[0074]

[0075]

[0076] At any angle The tangent vector at is:

[0077] and

[0078] The cross product is then calculated to get the tangent vector

[0079]

[0080] The direction of the x-axis is:

[0081] The direction of the y-axis is:

[0082] The sub-direction for the z-axis is:

[0083] In addition, after determining the first velocity vector of the first target trajectory and the second velocity vector of the second target trajectory, when calculating the first trajectory parameter of the first target trajectory and the second trajectory parameter of the second target trajectory, if it is a straight line trajectory, according to the velocity components corresponding to each axis obtained above: Comparing the velocity components of any two axes can get the velocity component ratio of the straight line trajectory. If it is a circular arc trajectory, the direction of the x-axis obtained above is: The directions of the y-axis are: And the directions of the z-axis are: So the component of velocity on the x-axis is The component on the y-axis is The component on the z-axis is Similarly, by comparing the velocity components of any two axes, the velocity component ratio of the arc trajectory can be obtained, and then the velocity component ratio of the first trajectory parameter corresponding to the straight trajectory or the arc trajectory and the velocity component ratio of the second trajectory parameter corresponding to the straight trajectory or the arc trajectory can be obtained.

[0084] In step 104, after the sub-directions of the axes of the first target trajectory and the second target trajectory are obtained through the above process, the sub-directions of the axes of the first target trajectory and the second target trajectory are compared, and finally the change results of the sub-directions of the axes of the second target trajectory relative to the sub-directions of the axes of the first target trajectory are obtained. Specifically, the change results include two situations: the sub-directions of the axes of the second target trajectory do not change relative to the sub-directions of the axes of the first target trajectory, or the sub-directions of the axes of the second target trajectory change relative to any direction of the axes of the first target trajectory. When the sub-directions of the axes of the second target trajectory change relative to any direction of the axes of the first target trajectory, at least 7 situations are included: the x-axis changes, the y-axis changes, the z-axis changes, the x-axis and the y-axis both change, the x-axis and the z-axis both change, the y-axis and the z-axis both change, and the x-axis, y-axis, and z-axis all change.

[0085] Furthermore, in the actual interpolation process, in order to ensure that the two paths in the interpolation move at the target speed as much as possible, when the two paths in the interpolation may have any of the above 7 conditions, still directly transitioning to the next path (i.e., the second target trajectory) at the current target speed may cause an error in the front end of the second path (i.e., the second target trajectory), affecting the interpolation effect. Therefore, if there are two paths that transition as in the above seven conditions, the transition speed is zero.

[0086] The following is an example description of whether the transition speed is zero when two paths are transitioning.

[0087] Figure 2-Figure 3 2 are two example diagrams of paths provided by the present invention.

[0088] When both paths, i.e., the first target trajectory and the second target trajectory, are straight line trajectories, Figure 2 In (1), the vector directions of the two paths are basically the same. When decomposed into the coordinate system, the directions of the two axes do not change, which satisfies the speed transition. Figure 2 In (2), the vector directions of the two paths are decomposed into the X-axis direction in the coordinate system, which changes. Therefore, the X-axis involves a process of deceleration-stop-change-restart, making the transition speed zero.

[0089] like Figure 3As shown in , when one of the two paths, i.e., the first target trajectory and the second target trajectory, is a straight line trajectory and the other is an arc trajectory, Figure 3 In (3) and (5), the first target trajectory is a straight line trajectory and the second target trajectory is an arc trajectory. At this time, the tangent direction of the arc trajectory is basically the same as the direction of the straight line trajectory. The axis direction does not change when decomposed into the coordinate system, which satisfies the speed transition, and the transition speed is greater than zero. Figure 3 In (4), the first target trajectory is a straight line trajectory and the second target trajectory is an arc trajectory. When decomposed into the coordinate system, the x-axis and y-axis of the second target trajectory both change direction, so the transition speed is zero.

[0090] In summary, according to the above calculation, the directions of the straight line trajectory and the circular arc trajectory in the coordinate system are obtained. If the two paths allow non-zero speed transition, then the directions of all axes of the two trajectories in the coordinate system are not allowed to change. On the contrary, as long as the components of all axes do not change direction, the speed trend can be accelerated or decelerated to reach the target speed and directly enter the new path, so that there is no need to stop any servo, and the vibration caused by the trajectory change can be better suppressed. When the transition speed is zero, the moving speed of the machining tool in the first target trajectory should be accelerated first and then decelerated to achieve a speed of zero when reaching the second target trajectory, avoiding the problem of errors in the machining work caused by forced transition. Therefore, the forward-looking speed transition planning of the present application is to determine the maximum target speed allowed for transition between the two paths, excluding the opposite direction of any axis of the two paths, so that the trajectory processing process can be more stable and smooth.

[0091] Furthermore, the maximum target speed allowed for transition is calculated as follows:

[0092] According to step 105, in one embodiment, if Lmt is used to represent the step constant, S (unit is 0.01 mm / s) represents the target transition speed, P represents the gear ratio of the current axis, z0 represents the speed component ratio of the first target trajectory, z1 represents the speed component ratio of the second target trajectory, and n is the pulse unit feed speed of the current axis. Since the difference between the transition speeds of the first target trajectory and the second target trajectory is equal to the step constant, and since the step of each axis needs to be limited, there is a maximum allowable step constant (generally 1), so: S*z0*P=n=Lmt / ((z0-z1) / z0), where S*z0*P on the left represents the pulse unit feed speed of the current axis at the target transition speed after considering the speed component ratio and the gear ratio, and Lmt / ((z0-z1) / z0) on the right is obtained according to the definition of the step constant. Therefore, from S*z0*P=n, it can be obtained that S=n / z0 / P. Because n = Lmt / ((z0-z1) / z0), we finally get S = Lmt / (z0-z1) / P. Based on the maximum allowable step constant, we can get the maximum allowable transition speed of the current axis. Similarly, we can continue to calculate the maximum allowable transition speed of the gear ratios of the other two axes, compare the maximum allowable transition speeds of each axis, and take the transition speed with the smallest value as the minimum step transition speed of the first target trajectory. Finally, the machining tool controlled by the industrial controller can directly enter the second target trajectory after accelerating or decelerating in the first target trajectory or decelerating to the minimum step transition speed, thus completing the entire planning process.

[0093] In addition, during the forward speed planning process, the motion trajectory route and the actual working route may often be fine-tuned according to real-time conditions, such as the actual shape of the workpiece, the performance of the machine tool equipment, the wear condition of the tool during long-term use, and the cutting parameters of different tools themselves. These factors may cause a gap between the actual motion trajectory route and the planned route. Therefore, in the process of the machining tool passing through the first target trajectory and the second target trajectory, its trajectory itself may change. If the second target trajectory route can be accurately predicted, it can better serve the above-mentioned forward speed planning and improve its planning accuracy.

[0094] Specifically, in order to improve the accuracy of the routes of the first target trajectory and the second target trajectory in actual work, the present invention provides a trajectory generation model based on the prediction of the second target trajectory by the first target trajectory, so that the first target trajectory is input into the trajectory generation model to obtain the second target trajectory output by the trajectory generation model; the trajectory generation model is trained based on the sample trajectory data and its corresponding annotated trajectory data.

[0095] Accordingly, the specific steps of training the trajectory generation model include:

[0096] Acquire historical trajectory data; the historical trajectory data includes first historical trajectory data corresponding to the first historical trajectory and second historical trajectory data corresponding to the second historical trajectory, the second historical trajectory being an interpolated trajectory of the first historical trajectory;

[0097] Classify the first historical trajectory data and the second historical trajectory data to obtain first classified trajectory data and second classified trajectory data respectively;

[0098] The pre-trained LSTM neural network is trained based on the first classification trajectory data and the second classification trajectory data to obtain a trajectory generation model.

[0099] In fact, the historical trajectory data is obtained from the device background work record, and can also be obtained from the data storage device. The historical trajectory data may be messy, and when there are more than 2 continuous motion trajectories, the motion trajectory in the middle part may be either the first historical trajectory data or the second historical trajectory data. Therefore, by classifying the historical trajectory data, the first classified trajectory data and the second classified trajectory data are obtained, so that the first classified trajectory data is a collection of the first historical trajectory data and the corresponding second historical trajectory data, and the second classified trajectory data is the labeled trajectory data corresponding to the first historical trajectory data and the second historical trajectory data, wherein the labeled trajectory data is labeled with information including the starting point, end point and key nodes of the trajectory, which can be used more specifically for the training of subsequent models. At the same time, in the classification process, irrelevant or poor quality data can be filtered out by screening to improve the accuracy of the data used for subsequent model training. If the user wishes to classify the historical trajectory data of the past month, in the classification process, first, the part of the historical trajectory data of the past month that is in a continuous trajectory is divided into several classes including the first target trajectory and the second target trajectory, each class has the first classification trajectory data and the second classification trajectory data, and the first classification trajectory data and the second classification trajectory data both include the position coordinates of the coordinate system in which the first target trajectory and the second target trajectory are located, the initial speed, the maximum speed, the wear condition of the tool, the cutting parameter value of the tool, and the transition speed and other data. At this time, the data with poor quality when the cutting error occurs, as well as the first classification trajectory data and the second classification trajectory data corresponding to the first target trajectory and the second target trajectory when the transition speed is zero are filtered out, and the set corresponding to the first classification trajectory data and the second classification trajectory data after the final classification processing is obtained.

[0100] In addition, before the classified first classification trajectory data and the second classification trajectory data are input into the trajectory generation model, the first classification trajectory data and the second classification trajectory data need to be converted so that the first classification trajectory data and the second classification trajectory data are converted into a format suitable for the input of the LSTM neural network, that is, the data needs to be converted into the form of time steps and features. More specifically, during the model training process, the classified first classification trajectory data and the second classification trajectory data are converted into a format and input into the input layer of the LSTM neural network, and the data is preliminarily processed into a form suitable for subsequent network layer processing in the input layer. Specifically, the data is arranged in the format of time steps and features, each time step corresponds to the data of a trajectory point, and each feature represents a different attribute of the trajectory point, such as position coordinates, speed, etc. Then, the data enters the LSTM unit layer. In this level, each LSTM unit processes the input data according to the mechanism of the forget gate, input gate and output gate. The forget gate decides to discard the information that is no longer important for the trajectory prediction at the current moment from the cell state at the previous moment, and the input gate decides to add the important influence on the development of the current trajectory to the cell state. Through these gating mechanisms, LSTM units can effectively capture long-term dependencies in time series and model dynamic changes in trajectory history data. The data is then further feature extracted and abstracted in the hidden layer. The hidden layer consists of multiple LSTM units and can learn more complex patterns and regularities. As training progresses, the weights and biases of the hidden layer are continuously adjusted to optimize the performance of the network. The output of the hidden layer is passed to the output layer as the input of the next layer.

[0101] In the process of inputting the first target trajectory into the trained trajectory generation model and outputting the second target trajectory. Specifically, when the first target trajectory is input into the trained trajectory generation model, in the output layer, the final prediction result is generated according to the output of the hidden layer. For the trajectory generation task, the output may be the position coordinates, speed, etc. of the next trajectory point, that is, the position coordinates, speed, etc. of the second target trajectory corresponding to the coordinate system.

[0102] According to the present invention, a forward-looking speed planning method based on continuous trajectory is provided, and the loss function of the trajectory generation model after training is obtained as follows:

[0103]

[0104] Among them, L represents the total loss function, represents the i-th trajectory position predicted by the model, T i represents the actual position of the ith trajectory, express With T i The distance between them, ω1 represents the weight coefficient of trajectory prediction; represents the predicted velocity when the model is at the i-th trajectory position, υ i represents the actual speed at the i-th trajectory position, ω2 represents the weight coefficient of speed prediction, express With i The relative error between represents the angle of the kth point on the arc predicted by the model, θ k represents the angle of the kth point on the actual arc, M represents the total number of points on the arc, and ω3 represents the weight coefficient of the arc angle prediction; represents the tool wear rate predicted by the model, d represents the actual tool wear rate, and ω4 represents the weight coefficient of tool wear rate prediction; represents the cutting parameter value predicted by the model, c represents the actual cutting parameter value, and ω5 represents the weight coefficient of cutting parameter prediction.

[0105] The loss function of the trained trajectory generation model comprehensively considers multiple aspects such as trajectory position, speed, arc angle of the trajectory, tool wear rate and cutting parameters, among which the cutting parameters include speed, feed rate, cutting depth, cutting width and cutting power, etc., so that after the input of the first target trajectory, the actual position of the subsequent second target trajectory can be quickly predicted to improve the accuracy of the prediction. At this time, the weight coefficients of different parts can also be adjusted to highlight the importance of different factors as needed.

[0106] Figure 4 is a schematic diagram of the structure of a forward-looking speed planning device based on a continuous trajectory provided by the present invention, such as Figure 4 As shown, the device includes: a first acquisition unit 10, used to acquire at least two continuous motion trajectories of the industrial controller, the two continuous motion trajectories include a first target trajectory and a second target trajectory, and the motion time of the first target trajectory is located before the motion time of the second target trajectory; a second acquisition unit 20, used to acquire a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory, a calculation unit 30, used to calculate the first velocity vector data of the first target trajectory based on the first spatial coordinate information of the first target trajectory, and to calculate the second velocity vector data of the second target trajectory based on the second spatial coordinate information of the second target trajectory; a judgment processing unit 40, used to determine the change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory based on the first velocity vector data and the second velocity vector data; the axis direction includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; an output unit 50, used to perform forward velocity planning on the motion trajectory of the industrial controller based on the first trajectory parameter, the second trajectory parameter and the change result.

[0107] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (processor) 1010, a communication interface (CommunicationsInterface) 1020, a memory (memory) 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 can call the logic instructions in the memory 1030 to execute a forward-looking speed planning method based on continuous trajectories, the method comprising: obtaining at least two continuous motion trajectories of the industrial controller; the two continuous motion trajectories include a first target trajectory and a second target trajectory, the second target trajectory is an interpolated trajectory of the first target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory; obtaining a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; calculating the first velocity vector data of the first target trajectory based on the first spatial coordinate information of the first target trajectory, and calculating the second velocity vector data of the second target trajectory based on the second spatial coordinate information of the second target trajectory; determining the change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory based on the first velocity vector data and the second velocity vector data; the axis direction includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; based on the first trajectory parameter, the second trajectory parameter and the change result, forward-looking speed planning is performed on the motion trajectory of the industrial controller.

[0108] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0109] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute a forward-looking speed planning method based on continuous trajectories provided by the above methods, the method including: obtaining at least two continuous motion trajectories of an industrial controller; the two continuous motion trajectories include a first target trajectory and a second target trajectory, the second target trajectory is an interpolated trajectory of the first target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory; obtaining a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; calculating first velocity vector data of the first target trajectory based on the first spatial coordinate information of the first target trajectory, and calculating second velocity vector data of the second target trajectory based on the second spatial coordinate information of the second target trajectory; determining the change result of the sub-direction of each axis of the second target trajectory relative to the sub-direction of each axis of the first target trajectory based on the first velocity vector data and the second velocity vector data; the axis direction includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; based on the first trajectory parameter, the second trajectory parameter and the change result, forward-looking speed planning is performed on the motion trajectory of the industrial controller.

[0110] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the above-mentioned forward-looking speed planning method based on continuous trajectories, the method comprising: obtaining at least two continuous motion trajectories of an industrial controller, and obtaining a first trajectory parameter of a first target trajectory and a second trajectory parameter of a second target trajectory; the two continuous motion trajectories include a first target trajectory and a second target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory; based on the spatial coordinate information of the first target trajectory and the second target trajectory, calculating the first velocity vector data of the first target trajectory and the second velocity vector data of the second target trajectory; based on the first velocity vector data and the second velocity vector data, determining the change results of the sub-directions of each axis of the second target trajectory relative to the sub-directions of each axis of the first target trajectory; the axis direction includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; based on the first trajectory parameter, the second trajectory parameter and the change result, forward-looking speed planning is performed on the motion trajectory of the industrial controller.

[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0113] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A forward-looking speed planning method based on continuous trajectory, characterized in that: The following steps are involved: Acquire at least two continuous motion trajectories of the industrial controller; the two continuous motion trajectories include a first target trajectory and a second target trajectory, the second target trajectory is an interpolation trajectory of the first target trajectory, and the motion time of the first target trajectory is before the motion time of the second target trajectory; Acquire a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; Calculating first velocity vector data of the first target trajectory based on first spatial coordinate information of the first target trajectory, and calculating second velocity vector data of the second target trajectory based on second spatial coordinate information of the second target trajectory; Based on the first velocity vector data and the second velocity vector data, determining a change result of a sub-direction of each axis of the second target trajectory relative to a sub-direction of each axis of the first target trajectory; the sub-direction of each axis includes a horizontal axis direction, a vertical axis direction and a longitudinal axis direction; Based on the first trajectory parameter, the second trajectory parameter and the change result, forward speed planning is performed on the motion trajectory of the industrial controller.

2. The forward-looking velocity planning method based on continuous trajectory according to claim 1 is characterized in that: The performing forward speed planning on the motion trajectory of the industrial controller based on the first trajectory parameter, the second trajectory parameter and the change result includes: If the change result is that the sub-directions of the respective axes of the second target trajectory do not change relative to the sub-directions of the respective axes of the first target trajectory, then calculating the maximum allowable transition speed of the respective axes of the first target trajectory based on the first trajectory parameters and the second trajectory parameters; Determine the transition speed with the smallest value among the maximum allowable transition speeds of each axis of the first target trajectory as the minimum step transition speed of the first target trajectory; The minimum step transition speed of the first target trajectory is used as the maximum target speed when entering the second target trajectory, so that the machining tool controlled by the industrial controller directly enters the second target trajectory after reaching the maximum target speed in the first target trajectory.

3. The forward-looking velocity planning method based on continuous trajectory according to claim 1 is characterized in that: The obtaining of at least two continuous motion trajectories of the industrial controller includes: Inputting the first target trajectory into a trajectory generation model to obtain the second target trajectory output by the trajectory generation model; the trajectory generation model is trained based on sample trajectory data and its corresponding annotated trajectory data; Accordingly, the specific steps of training the trajectory generation model include: Acquire historical trajectory data; the historical trajectory data includes first historical trajectory data corresponding to the first historical trajectory and second historical trajectory data corresponding to the second historical trajectory, wherein the second historical trajectory is an interpolated trajectory of the first historical trajectory; Classify the first historical trajectory data and the second historical trajectory data to obtain first classified trajectory data and second classified trajectory data respectively; Model training is performed on a pre-trained LSTM neural network based on the first classified trajectory data and the second classified trajectory data to obtain the trajectory generation model.

4. The forward-looking velocity planning method based on continuous trajectory according to claim 3 is characterized in that: The loss function of the trajectory generation model is: Among them, L represents the total loss function, represents the i-th trajectory position predicted by the model, T i represents the actual position of the ith trajectory, express With T i The distance between them, ω1 represents the weight coefficient of trajectory prediction; represents the speed predicted by the model at the i-th trajectory position, υ i represents the actual speed at the i-th trajectory position, ω2 represents the weight coefficient of speed prediction, express With i The relative error between represents the angle of the kth point on the arc predicted by the model, θ k represents the angle of the kth point on the actual arc, M represents the total number of points on the arc, and ω3 represents the weight coefficient of the arc angle prediction; represents the tool wear rate predicted by the model, d represents the actual tool wear rate, ω4 represents the weight coefficient of tool wear rate prediction; c represents the cutting parameter value predicted by the model, c represents the actual cutting parameter value, and ω5 represents the weight coefficient of cutting parameter prediction.

5. The forward-looking velocity planning method based on continuous trajectory according to claim 1 is characterized in that: The first target trajectory includes a straight line trajectory or a circular arc trajectory, and the second target trajectory includes a straight line trajectory or a circular arc trajectory, wherein, when the first target trajectory is a circular arc trajectory, the first velocity vector data is calculated based on the tangent angle at the end of the first target trajectory; when the second target trajectory is a circular arc trajectory, the second velocity vector data is calculated based on the tangent angle at the beginning of the second target trajectory.

6. The forward-looking velocity planning method based on continuous trajectory according to claim 1 is characterized in that: The first trajectory parameters include a step constant, a gear ratio of an axis of the first target trajectory, a pulse unit feed speed, and a speed component ratio of the first target trajectory; the second trajectory parameters include the step constant, the gear ratio of an axis of the second target trajectory and a pulse unit feed speed, and a speed component ratio of the second target trajectory.

7. The method for forward-looking speed planning based on continuous trajectory according to claim 1, characterized in that: The calculating first velocity vector data of the first target trajectory based on first spatial coordinate information of the first target trajectory, and the calculating second velocity vector data of the second target trajectory based on second spatial coordinate information of the second target trajectory, include: Calculate the component of each axis in the coordinates of the first target trajectory relative to the vector and the feeding direction based on the spatial coordinate information of the first target trajectory, and calculate the direction of each axis in the coordinates of the first target trajectory relative to the vector and the feeding direction; Based on the spatial coordinate information of the second target trajectory, the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction are calculated; based on the component of each axis in the coordinates of the second target trajectory relative to the vector and the feed direction, the directions of each axis of the first target trajectory are calculated.

8. A forward-looking speed planning device based on continuous trajectory, characterized in that: include: A first acquisition unit is used to acquire at least two continuous motion trajectories of the industrial controller, wherein the two continuous motion trajectories include a first target trajectory and a second target trajectory, and a motion time of the first target trajectory is before a motion time of the second target trajectory; A second acquisition unit, configured to acquire a first trajectory parameter of the first target trajectory and a second trajectory parameter of the second target trajectory; a calculation unit, configured to calculate first velocity vector data of the first target trajectory based on first spatial coordinate information of the first target trajectory, and to calculate second velocity vector data of the second target trajectory based on second spatial coordinate information of the second target trajectory; a judgment processing unit, configured to determine, based on the first velocity vector data and the second velocity vector data, a change result of a sub-direction of each axis of the second target trajectory relative to a sub-direction of each axis of the first target trajectory; the sub-direction of each axis includes a horizontal axis direction, a vertical axis direction, and a longitudinal axis direction; The output unit is used to perform forward speed planning on the motion trajectory of the industrial controller based on the first trajectory parameter, the second trajectory parameter and the change result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the forward-looking velocity planning method based on continuous trajectory as described in any one of claims 1 to 7 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a forward-looking velocity planning method based on a continuous trajectory as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Speed look-ahead control method based on filter technique

    CN101470434A

  • Continuous trajectory planning transition method for robot tail end

    CN105710881A

  • Track planning method and device and computer readable storage medium

    CN113485250A

  • Industrial robot online prospective trajectory planning method, electronic equipment and storage medium

    CN117301063A

  • Motion control method, motion control device, and motion trajectory planning method

    US20180164772A1