Milling robot machining trajectory optimization method, system, storage medium and device
By establishing a target optimization model in robotic milling and using joint loads and tool posture constraints for global optimization, the problems of instability and low efficiency in existing robotic milling technologies are solved, and more efficient milling results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2023-10-18
- Publication Date
- 2026-06-12
Smart Images

Figure CN117234084B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot joint trajectory planning technology, and in particular to a method, system, storage medium and device for optimizing the machining trajectory of a milling robot. Background Technology
[0002] Robotic machining technology, with its advantages of high automation, high flexibility, and large workspace, has been successfully applied in grinding, drilling, milling, and other fields. With the development of robotics technology, the requirements for the motion flexibility and performance of robot systems are constantly increasing. Among these, robot posture optimization has become a focus of attention. Currently, redundant degrees of freedom are used to optimize the robot's posture control and motion performance. When the number of robot joints exceeds the degrees of freedom required for milling, redundant degrees of freedom will cause uncertainty in the robot's posture during milling. Therefore, they can be used to optimize the robot's posture control and motion performance. By rationally utilizing redundant degrees of freedom, the robot can achieve more optimization goals while meeting task requirements.
[0003] Existing methods for optimizing redundant postures in robot milling only consider the optimal solution under the current state while neglecting global optimization. This can lead to instability and repeatability errors during milling. Joint loads are crucial factors in robot motion, directly impacting motion control stability. However, research on redundant posture optimization considering joint loads is limited, hindering effective reduction of motion in heavily loaded joints. Existing methods have limitations in handling joint limits and tool posture constraints, considering only one or the other without fully integrating them for optimization. This can prevent meeting the requirement of simultaneously considering multiple constraints in complex tasks. Furthermore, existing methods introduce instability and repeatability errors during milling, increasing the time required for milling tasks and failing to effectively reduce joint motion, resulting in low efficiency. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problems of lack of global optimization, lack of joint load consideration, insufficient combination of joint limits and tool posture constraints for optimization, inability to effectively reduce joint motion, and low efficiency in the prior art. The present invention provides a robot posture optimization method based on joint load, which uses joint limits, joint angles and tool posture as constraints, and the overall joint trajectory as the optimization target to optimize, reduce joint rotation, stabilize robot control, and improve milling efficiency.
[0005] To address the aforementioned technical problems, this invention provides a method, system, storage medium, and device for optimizing the machining trajectory of a milling robot, comprising:
[0006] In a first aspect, the present invention provides a method for optimizing the machining trajectory of a milling robot, comprising:
[0007] Acquire data information, including robot kinematic parameters, load mass of each robot joint, tool tip machining trajectory, initial tool attitude angle, and tool attitude angle limit; generate discrete trajectory points based on the tool tip machining trajectory, and inversely solve the initial joint motion trajectory by using the discrete trajectory points and the initial tool attitude angle; establish a target optimization model, and use the target optimization model to optimize the initial joint motion trajectory.
[0008] This invention optimizes the joint motion trajectories of each robot joint by assigning load weights to the trajectories of each joint, thereby reducing the motion trajectory of joints under heavy loads and ensuring the stability of milling. This invention also optimizes the joint limits, robot joint angles, and tool posture angles as constraints to ensure that the robot meets these three requirements simultaneously when performing tasks. This avoids joint motion range exceeding limits or tool posture deviation during robot milling, ensuring smooth milling and high-quality milling.
[0009] In one embodiment of the present invention, the step of establishing the target optimization model specifically includes: establishing a robot kinematic model based on the robot kinematic parameters; obtaining the posture transformation matrix, joint motion limit values, and joint angle variables through the robot kinematic model; establishing constraints through the joint motion limit values, the tool posture angle limit values, and the robot kinematic model; establishing an optimization target through the joint angle variables, the load mass of each joint of the robot, and the discrete trajectory points; and establishing a target optimization model based on the constraints and the optimization target.
[0010] In this invention, the URDF model is used. <joint>Kinematic modeling of the robot allows for direct use of relevant robot data to establish kinematic relationships. This invention studies a six-axis robot, therefore setting six joint angle variables. The robot's kinematic model describes the relationship between the robot's target motion and the motion of each joint, and is repeatedly invoked during control. Through kinematic modeling, the robot's motion trajectory can be accurately planned and predicted, resulting in more accurate and efficient task execution and improved robot efficiency and accuracy. This invention also uses the coordinates of the discretized trajectory points from the tool tip machining trajectory to perform coordinate transformation and inverse kinematics to obtain the initial motion trajectories of each joint of the robot that satisfy the desired pose, providing data for subsequent target optimization models.
[0011] In one embodiment of the present invention, before generating discrete trajectory points based on the tool tip machining trajectory, the method further includes: establishing a local coordinate system, a tool coordinate system, and a workpiece coordinate system for the trajectory points on the tool tip machining trajectory.
[0012] In this process, a tool coordinate system is established with the tool rotation axis as the z-axis. Since the x and y axes are not fixed, redundant degrees of freedom can be generated. Local coordinate systems are established with each trajectory point as the origin, the tangent direction on the trajectory (i.e., the machining direction) as the x-axis, and the direction perpendicular to the workpiece surface as the z-axis. The workpiece coordinate system is used to represent the position of each trajectory point on the workpiece.
[0013] In one embodiment of the present invention, the optimization objective is:
[0014]
[0015] Where n is the number of discrete trajectory points, and i is the discrete trajectory point number; θ j θ is the joint angle variable; j is the joint number, j∈{1,…,6}; j,i Let θ be the i-th discrete trajectory point. j,i+1 Let i be the (i+1)th discrete trajectory point;
[0016] w j For the joint angle variable θ j The joint load difference coefficient corresponding to the joint; the joint load difference coefficient w j For the joint angle variable θ j The joint load mass of the corresponding joint is 6 times the percentage of the total load mass of all joints added together.
[0017] Among these factors, larger joint loads in the robot require more energy consumption, and the increased inertia can affect the robot's accuracy and stability. Therefore, considering the varying loads on each joint, the trajectory of each joint is weighted in the optimization objective to optimize the overall trajectory of the joint motion; w j It is the load difference coefficient of the robot joint, which depends on the load mass of the robot end effector and the mass of the robot link.
[0018] In one embodiment of the present invention, the constraint conditions include:
[0019] The position components of the tool coordinate system relative to the workpiece coordinate system The coordinates of the discrete trajectory points in the workpiece coordinate system are equal;
[0020]
[0021] Where tool is the tool coordinate system, w is the workpiece coordinate system, P represents the position component in the attitude transformation matrix, and x i y i z i Let be the coordinates of the i-th discrete trajectory point in the workpiece coordinate system;
[0022] Critical range requirements for the angles of each joint of the robot:
[0023] minθ j ≤θ j ≤maxθ j
[0024] Where, minθ j The preset joint angle variable θ j The minimum value, maxθ j The preset joint angle variable θ j The maximum value;
[0025] The critical range requirement for the tool attitude angle is as follows:
[0026] α min ≤α(θ)≤α max
[0027] β min ≤β(θ)≤β max
[0028] Where α is the first tool attitude angle and β is the second tool attitude angle; α min The minimum value of the preset first tool attitude angle α, α max The maximum value of the preset first tool attitude angle α; β min The minimum value of the preset second tool attitude angle β, β max The maximum value of the preset second tool attitude angle β.
[0029] In this invention, milling and ball end mills are used. Since ball end mills do not affect the milling process when the tool posture angle changes slightly during the milling of free-form surfaces, the tool posture angle can usually be set in advance within a suitable range according to the requirements. In order to ensure the accuracy during milling, the position of the tool end must be consistent with the coordinates of the corresponding trajectory point, so that the tool can accurately land on the corresponding trajectory point in the machining trajectory each time.
[0030] In one embodiment of the present invention, generating discrete trajectory points based on the tool tip machining trajectory includes: converting the tool tip machining trajectory into a target curve; obtaining curve parameters through the target curve; and using the curve parameters, using a bisection method to progressively discretize the target curve into discrete trajectory points.
[0031] The target curve is a B-spline curve, which can accurately represent curves of arbitrary shape and can modify control points to change the shape of adjacent curves without affecting the shape of the entire curve. Compared with uniformly distributed trajectory points, the discretized tool tip trajectory significantly reduces the number of trajectory points while retaining the curve characteristics.
[0032] In this process, when the robot performs surface machining, the cutting tool is positioned at the end of the robot when it is powered off. The robot joints drive the cutting tool to move, and the tool tip trajectory is usually a parametric curve. When optimizing the tool axis vector along this curve, it is necessary to discretize it. The volume of the resulting discrete trajectory points will significantly affect the efficiency of the optimization method. This invention selects the tool tip machining trajectory, converts it into a B-spline curve, and discretizes the tool tip machining trajectory points according to the relationship between the chord length between two points on the curve and the curve.
[0033] In one embodiment of the present invention, the target optimization model includes:
[0034] min JT(θ)
[0035]
[0036] α min ≤α(θ)≤α max
[0037] β min ≤β(θ)≤β max
[0038] minθ j ≤θ j ≤maxθ j
[0039] Where minJT(θ) is the objective function in the sequential quadratic programming algorithm; α min ≤α(θ)≤α max β min ≤β(θ)≤β max minθ j ≤θ j ≤maxθ j This refers to the constraint function in the sequential quadratic programming algorithm.
[0040] The target optimization model of this invention adopts a sequential quadratic programming algorithm, taking the initial motion trajectory of each joint as the optimization target, using the critical range of tool posture angle, the critical range of robot joint angle, and tool posture as constraints, and assigning the load of each joint to the motion trajectory of each joint for global optimization, reducing the motion trajectory of the joints and ensuring the stability of milling.
[0041] Secondly, the present invention provides a milling robot machining trajectory optimization system, comprising: an information acquisition module for acquiring data information, the data information including robot kinematic parameters, load mass of each joint of the robot, tool tip machining trajectory, initial tool attitude angle and tool attitude angle limit value; an inverse kinematics module for generating discrete trajectory points based on the tool tip machining trajectory, and inversely solving the initial joint motion trajectory through the discrete trajectory points and the initial tool attitude angle; and an optimization module for establishing a target optimization model and using the target optimization model to optimize the initial joint motion trajectory.
[0042] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed, implements the milling robot machining trajectory optimization method described in any of the first aspects above.
[0043] Fourthly, the present invention provides a storage device, including a storage medium and a processor, wherein the storage medium stores a computer program, and when the program is executed by the processor, it implements the milling robot machining trajectory optimization method described in any of the first aspects above.
[0044] (III) Beneficial Effects
[0045] The beneficial effects of this invention are as follows: The milling robot machining trajectory optimization method of this invention utilizes the relationship between arc length and chord length to discretize the transformed curve, significantly reducing trajectory points while preserving curve characteristics, thus reducing machining time and improving milling efficiency. The critical range of tool posture angles, the critical range of robot joint angles, and tool posture are optimized as constraints, preventing joint motion range from exceeding limits or tool posture from deviating from requirements during robot milling, ensuring smooth milling and high-quality milling. Unlike the simplified load model of existing methods, this invention considers the load conditions of each joint, reducing the rotation of high-load joints, thereby ensuring the stability of robot motion control. This invention uses the total joint trajectory of each joint as the optimization target, enabling global optimization throughout the entire motion sequence, finding a better posture solution, effectively reducing the motion of each joint, and optimizing the robot's motion smoothness, posture stability, and accuracy. This allows the robot to achieve better performance in complex tasks and changing environments, contributing to improved robot work quality and efficiency, reduced motion vibration, and enhanced execution accuracy and effectiveness of the end effector. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the overall process of the milling robot machining trajectory optimization method according to a preferred embodiment of the present invention;
[0047] Figure 2 yes Figure 1 The preferred embodiment of the milling robot machining trajectory optimization method shown is a butterfly trajectory;
[0048] Figure 3 yes Figure 1 A schematic diagram of the tool coordinate system and local coordinate system of the milling robot machining trajectory optimization method of the preferred embodiment shown;
[0049] Figure 4 yes Figure 2 The discretized butterfly trajectory of the milling robot machining trajectory optimization method shown in the preferred embodiment;
[0050] Figure 5 yes Figure 1 The flowchart shown is a preferred embodiment of the milling robot machining trajectory optimization method for generating discrete trajectory points based on the tool tip machining trajectory.
[0051] Figure 6 yes Figure 1 A flowchart illustrating the establishment of the target optimization model for the milling robot machining trajectory optimization method of the preferred embodiment shown;
[0052] Figure 7 yes Figure 1 A front view of the robot kinematic model of the milling robot machining trajectory optimization method of the preferred embodiment shown;
[0053] Figure 8 yes Figure 1 A side view of the robot kinematic model of the milling robot machining trajectory optimization method of the preferred embodiment shown;
[0054] Figure 9 This is a block diagram of a milling robot machining trajectory optimization system provided in another embodiment of the present invention.
[0055] [Explanation of Labels in the Attached Image]
[0056] 600: Milling robot machining trajectory optimization method;
[0057] 601: Information Acquisition Module;
[0058] 602: Reverse engineering module;
[0059] 603: Optimization module. Detailed Implementation
[0060] To better explain and facilitate understanding of the present invention, it will be described in detail below with reference to the accompanying drawings and specific embodiments. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.
[0061] Firstly, referring to Figure 1 As shown, in a preferred embodiment of the present invention, a method for optimizing the machining trajectory of a milling robot is provided. For the milling process, a ball end mill is used for milling. The specific steps are as follows:
[0062] S1, acquire data information, including: robot kinematic parameters, load mass of each robot joint, tool tip machining trajectory, initial tool attitude angle and tool attitude angle limit value;
[0063] In this embodiment, the load mass of each joint is shown in Table 1;
[0064] Table 1
[0065] joint 1 2 3 4 5 6 Joint load / kg 15.24 10.17 8.5 5.97 5.2 4.12
[0066] In this embodiment, refer to Figure 2 As shown, the cutting edge machining trajectory adopts a butterfly trajectory. Due to its symmetry and complex shape, the butterfly trajectory is suitable for verifying whether the milling process of the robotic arm meets the design requirements.
[0067] The initial tool attitude angles include a first tool attitude angle α and a second tool attitude angle β. The range of the limit values of the tool attitude angles is preset as follows:
[0068] 4°≤α≤16°;
[0069] 0°≤β≤180°;
[0070] That is, α min =4°, α max =16°, β min =0°, β max =180°;
[0071] Before generating discrete trajectory points based on the tool tip machining trajectory, refer to Figure 3 As shown, establish the trajectory point P on the tool tip machining path. i The local coordinate system l, the tool coordinate system tool, and the workpiece coordinate system w;
[0072] The tool coordinate system (tool) is established with the tool rotation axis as the z-axis. Since the x and y axes are not fixed, redundant degrees of freedom can be generated. The local coordinate system (l) is established with each trajectory point P as the z-axis. i The x-axis is established with the origin as the tangent direction on the tool tip's machining trajectory, and the z-axis is established with the direction perpendicular to the workpiece surface as the z-axis; the workpiece coordinate system w is used to represent the trajectory point P. i Position on the workpiece.
[0073] S2, Generate discrete trajectory points based on the tool tip machining trajectory, and inversely solve the initial joint motion trajectory by using the discrete trajectory points and the initial tool posture angle;
[0074] Reference Figure 5 As shown, in this embodiment, the specific steps for generating discrete trajectory points based on the tool tip machining trajectory are as follows:
[0075] S21 converts the tool tip machining trajectory into the target curve;
[0076] The target curve is a B-spline curve, and the B-spline curve is as follows:
[0077] Where, N i,p (u) is a p-order B-spline basis function, where n is the number of trajectory points; 1≤i≤n;
[0078] S22, Set the node vector u of the B-spline curve. i The initial values of variable b and trajectory point number i, and the value of node vector step size Δu;
[0079] Among them, u i =0, Δu=0.0001, b=Δu, i=1;
[0080] S23, Obtain the current trajectory point P i The node vector u on the B-spline curve i Determine the node vector u i Scope:
[0081] If u i If u ≥ 1, then u i =1, output the last trajectory point P i coordinates (x) i ,y i ,z i If the process ends, proceed to step S24; otherwise, proceed to step S25.
[0082] Among them, the trajectory point P is obtained. i node vector u i The calculation formula is u i =u i-1 +Δu;x i y i z i Let P be the trajectory point i The coordinate values in the workpiece coordinate system w will be determined by manually measuring the relative positions of the workpiece coordinate system and the robot's first joint coordinate system during subsequent calculations.
[0083] S24, based on node vector u i Calculate the current trajectory point P i coordinates (x) i ,y i ,z i ); through the current trajectory point P i And the previous trajectory point P i-1 The coordinates of the current trajectory point P are obtained. i And the previous trajectory point P i-1 The straight-line distance L between them i-1 Distance S from the curve i-1 Determine whether the straight-line distance and the curved-line distance meet the first preset condition;
[0084] The first preset condition is: |L i-1 -S i-1 -a|<0.00000001; a is a preset value that needs to be set in advance according to the curve characteristics. The larger the value of a, the sparser the trajectory points after discretization, and vice versa.
[0085] If the straight-line distance and the curved-line distance satisfy the first preset condition, i.e., |L i-1 -S i-1 If -a| < 0.00000001, then save the current trajectory point P. i coordinates (x) i ,y i ,z i If i = i + 1, then execute S23; otherwise, execute S25.
[0086] S25, if the straight-line distance and the curved distance do not meet the first preset condition, i.e., |L i-1 -S i-1 If -a|≥0.00000001, then determine whether the straight-line distance and the curved-line distance satisfy the second preset condition, where the second preset condition is |L i-1 -S i-1 |≥a;
[0087] If the straight-line distance and the curved-line distance satisfy the second preset condition, i.e., |L i-1 -S i-1 If |≥a, then the value of the node vector step size is redistributed using the bisection method, and S23 is executed;
[0088] The specific steps for reallocating the node vector step size using the bisection method include:
[0089] Δu = Δu - b, i = i + 1;
[0090] If the straight-line distance and the curved-line distance do not meet the second preset condition, i.e., |L i-1 -S i-1 If | < a, then the value of the node vector step size is reallocated, and S23 is executed;
[0091] The specific steps for reallocating the node vector step size include:
[0092] Δu = Δu + b, i = i + 1;
[0093] Reference Figure 4 As shown, in this embodiment, the butterfly trajectory is converted into a B-spline curve and discretized, generating 257 trajectory points. Figure 4 As can be seen from the data, compared with uniformly distributed trajectory points, the discretized butterfly trajectory significantly reduces the number of trajectory points while retaining the curve characteristics, thereby reducing processing time and improving milling efficiency.
[0094] In this embodiment, the initial joint motion trajectory is obtained by inverse kinematics of discrete point trajectories. The specific steps are as follows:
[0095] Coordinate transformation is performed using the coordinates of discrete trajectory points. The transformed coordinates are then solved inversely using the fsolve function in MATLAB software to obtain the initial joint motion trajectories of each joint of the robot that conform to the desired pose.
[0096] S3. Establish a target optimization model and use the target optimization model to optimize the initial joint motion trajectory;
[0097] The specific steps include:
[0098] S31. Establish a robot kinematic model based on the robot's kinematic parameters;
[0099] In this embodiment, a six-axis robot is used, referring to... Figure 6-8 As shown, the kinematic relationships of the robot are established using the URDF model in the robot operating system, resulting in the robot's kinematic model.
[0100] S32, the posture transformation matrix, joint motion limit values and joint angle variables are obtained through the robot kinematic model;
[0101] In this embodiment, the posture transformation matrix T and joint angle variable θ of each joint coordinate system are obtained through the robot's kinematic model. j Joint motion limit value minθ j and maxθ j ;
[0102] Where j is the number of joints, j∈{1,…,6};
[0103] In this embodiment, the preset limit value of joint movement is:
[0104]
[0105] The attitude transformation matrix T includes:
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112] When the pose of each joint is known, the pose of the robot's end effector joints relative to the robot coordinate system can be obtained by sequential right multiplication:
[0113]
[0114] In this embodiment, the pose transformation matrix T of each joint includes:
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121] S33, through the joint motion limit value minθ j and maxθ j Tool attitude angle limit value α min α max β min β max Establish constraints on the robot's kinematic model;
[0122] In this embodiment, the constraints include:
[0123]
[0124] minθ j ≤θ j ≤maxθ j (2);
[0125] α min ≤α(θ)≤α max (3);
[0126] β min ≤β(θ)≤β max (4);
[0127] Where tool is the tool coordinate system, w is the workpiece coordinate system, P represents the position component in the attitude transformation matrix, and x i y i z i Let be the coordinates of the i-th discrete trajectory point in the workpiece coordinate system; minθ j The preset joint angle variable θ j The minimum value, maxθ j The preset joint angle variable θ j The maximum value; α is the first tool attitude angle, β is the second tool attitude angle; α min The minimum value of the preset first tool attitude angle α, α max The maximum value of the preset first tool attitude angle α; β min The minimum value of the preset second tool attitude angle β, β max The maximum value of the preset second tool attitude angle β; Equation (1) represents the position component of the tool coordinate system tool relative to the workpiece coordinate system w. Discrete trajectory point P in workpiece coordinate system w i The coordinates are equal; Equation (2) represents the critical range requirement of the angle of each joint of the robot; Equation (3) represents the critical range requirement of the tool posture angle.
[0128] In the robotic milling process, the robot joints are restricted from reaching areas exceeding their limits. Therefore, the limit range of joint movement is used as an optimization constraint. In this embodiment, a ball end mill is used for milling. Therefore, considering the characteristics of ball end mill machining, the first tool attitude angle α and the second tool attitude angle β are used as constraints: to ensure milling accuracy, the position of the tool tip must be aligned with the corresponding discrete trajectory point P. i The coordinates are consistent, ensuring that the tool can accurately land at the corresponding discrete trajectory point P after the tool machining trajectory is discretized each time. i Above, that is, the position components of the tool coordinate system relative to the workpiece coordinate system. It should correspond to each discrete trajectory point P in the workpiece coordinate system. i The coordinate quantities are equal; the tool attitude angles α(θ) and β(θ) can be expressed as the attitude of the tool coordinate system tool relative to the local coordinate system l. The components of the Z-axis of the tool coordinate system (tool) in the three directions of the local coordinate system (l) To indicate:
[0129]
[0130]
[0131] By substituting the tool attitude angle and the joint angles of the robot as variables, we obtain inequality constraints and equality constraints containing variables.
[0132] S34, via joint angle variable θ j The load mass of each joint of the robot and the discrete trajectory point P i Establish optimization goals;
[0133] The optimization objective is:
[0134]
[0135] Where n is the number of discrete trajectory points, and i is the discrete trajectory point number; θ j θ is the joint angle variable; j is the joint number, j∈{1,…,6}; j,i Let θ be the i-th discrete trajectory point. j,i+1 w is the (i+1)th discrete trajectory point; j For joint angle variable θ j Joint load difference coefficient corresponding to the joint; joint load difference coefficient w j For joint angle variable θ j The percentage of the joint load mass of the corresponding joint to the total load mass of all joints is 6 times.
[0136] Larger joint loads in a robot require more energy consumption, and the increased inertia can affect the robot's accuracy and stability. Therefore, considering the varying loads on each joint, the trajectory of each joint is weighted in the optimization objective to reduce the rotation of joints with high loads. In this embodiment, n = 257, and the joint load difference coefficient w for each joint is... j As shown in Table 2;
[0137] Table 2
[0138] joint Joint 1 Joint 2 Joint 3 Joint 4 Joint 5 Joint 6 Joint load / kg 15.24 10.17 8.5 5.97 5.2 4.12 <![CDATA[w j ]]> 1.86 1.26 1.02 0.72 0.66 0.64
[0139] S35, Establish a target optimization model based on constraints and optimization objectives;
[0140] The objective optimization model includes:
[0141] min JT(θ) (5);
[0142]
[0143] α min ≤α(θ)≤α max (7);
[0144] β min ≤β(θ)≤β max (8);
[0145] minθ j ≤θ j ≤maxθ j (9);
[0146] Equation (5) is the objective function in the sequential quadratic programming algorithm; Equations (6), (7), (8), and (9) are the constraint functions in the sequential quadratic programming algorithm. The sequential quadratic programming algorithm only requires a small amount of initial information to perform global optimization, and has strong global convergence, high computational efficiency, and strong boundary search capability.
[0147] This invention establishes a target optimization model and adopts a sequential quadratic programming algorithm. The initial joint motion trajectory of each joint of the robot is used as the optimization target. The load of each joint is assigned to the motion trajectory of each joint for global optimization. In this embodiment, the comparison between the optimized initial joint motion trajectory and the original initial joint motion trajectory is shown in Tables 3 and 4.
[0148] Table 3
[0149] JT Initial joint motion trajectory 5.708 Optimized joint motion trajectory 2.308 Optimization effect 59.6%
[0150] Table 4
[0151]
[0152] As shown in Tables 3 and 4, after optimization, the motion distance of each joint is significantly reduced under the influence of the joint load difference coefficient. Furthermore, under the influence of the load coefficient, the motion distance of joints with high loads decreases, while the motion distance of joints with low loads increases. This demonstrates the effectiveness of using the joint load coefficient to optimize joint trajectories and reduce redundant degrees of freedom in the robot. In summary, the method of this invention can reduce the motion of robot joints while simultaneously reducing the motion of high-load joints, thus optimizing the robot's posture during milling.
[0153] This invention utilizes the relationship between arc length and chord length to discretize the machining curve, reducing machining time while preserving trajectory characteristics. Taking advantage of the characteristics of ball end mill milling, it optimizes joint limits and tool attitude angles as constraints to ensure smooth milling and high-quality milling. Using the initial joint motion trajectory of each joint as the optimization objective, it reduces the motion of each joint, especially the motion of joints with high loads, improving the stability and efficiency of the robot during milling. This invention is applicable to most six-degree-of-freedom robots. Combining the characteristics of the objective optimization model, this invention selects the classic sequential quadratic programming algorithm for optimization. Experiments demonstrate that the optimization effect is significant, successfully improving milling efficiency.
[0154] Secondly, referring to Figure 9 As shown, in another embodiment of the present invention, a milling robot machining trajectory optimization system 600 is provided, comprising:
[0155] The information acquisition module 601 is used to acquire data information, including robot kinematic parameters, load mass of each joint of the robot, tool tip machining trajectory, initial tool attitude angle and tool attitude angle limit value;
[0156] Inverse kinematics module 602 is used to generate discrete trajectory points based on the tool tip machining trajectory, and to inversely solve the initial joint motion trajectory by using the discrete trajectory points and the initial tool posture angle;
[0157] The optimization module 603 is used to establish a target optimization model and to optimize the initial joint motion trajectory using the target optimization model.
[0158] The milling robot machining trajectory optimization system provided in this embodiment is used to implement the steps of the milling robot machining trajectory optimization method provided in the first aspect embodiment of the present invention. Therefore, the milling robot machining trajectory optimization system has all the technical effects of the milling robot machining trajectory optimization method, which will not be repeated here.
[0159] Thirdly, another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the milling robot machining trajectory optimization method described in any of the first aspects above.
[0160] Fourthly, embodiments of the present invention provide a storage device, including a storage medium and a processor, wherein the storage medium stores a computer program, and when the program is executed by the processor, it implements the milling robot machining trajectory optimization method described in any of the first aspects above.
[0161] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0162] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.
[0163] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of the present invention.< / joint>
Claims
1. A method for optimizing the machining trajectory of a milling robot, characterized in that, include: Acquire data information, including robot kinematic parameters, load mass of each robot joint, tool tip machining trajectory, initial tool attitude angle, and tool attitude angle limit value; Discrete trajectory points are generated based on the tool tip machining trajectory, and the initial joint motion trajectory is obtained by inversely solving the discrete trajectory points and the initial tool posture angle; Establish a target optimization model, and use the target optimization model to optimize the initial joint motion trajectory; The steps for establishing the target optimization model specifically include: Based on the robot's kinematic parameters, a robot kinematic model is established; the posture transformation matrix, joint motion limit values, and joint angle variables are obtained through the robot kinematic model. Constraints are established using the joint motion limit values, the tool attitude angle limit values, and the robot kinematic model; An optimization objective is established using the joint angle variables, the load mass of each joint of the robot, and the discrete trajectory points. Establish a target optimization model based on the constraints and the optimization objective; The optimization objective is: Where n is the number of discrete trajectory points, and i is the discrete trajectory point number; Joint angle variable; Number the joints. Let i be the i-th discrete trajectory point. Let i be the (i+1)th discrete trajectory point; For the joint angle variable The joint load difference coefficient corresponding to the joint; the joint load difference coefficient For the joint angle variable The joint load mass of the corresponding joint is 6 times the percentage of the total load mass of all joints added together.
2. The milling robot machining trajectory optimization method according to claim 1, characterized in that, Before generating discrete trajectory points based on the tool tip machining trajectory, the method further includes: Establish the local coordinate system, tool coordinate system, and workpiece coordinate system for the trajectory points on the tool tip machining path.
3. The milling robot machining trajectory optimization method according to claim 2, characterized in that: The constraints include: The position components of the tool coordinate system relative to the workpiece coordinate system The coordinates of the discrete trajectory points in the workpiece coordinate system are equal. Where tool is the tool coordinate system, w is the workpiece coordinate system, and P represents the position component in the attitude transformation matrix. Let be the coordinates of the i-th discrete trajectory point in the workpiece coordinate system; Critical range requirements for the angles of each joint of the robot: in, The preset joint angle variable The minimum value, The preset joint angle variable The maximum value; The critical range requirement for the tool attitude angle is as follows: in, The first tool attitude angle, The second tool attitude angle; The preset first tool attitude angle The minimum value, The preset first tool attitude angle The maximum value; The preset second tool attitude angle The minimum value, The preset second tool attitude angle The maximum value.
4. The milling robot machining trajectory optimization method according to claim 3, characterized in that, Generating discrete trajectory points based on the cutting edge machining trajectory includes: The tool tip machining trajectory is converted into a target curve; the curve parameters are obtained from the target curve. Based on the curve parameters, the target curve is discretized into discrete trajectory points by using a bisection method and progressively increasing the number of points.
5. The milling robot machining trajectory optimization method according to claim 4, characterized in that: The target optimization model includes: in, Let this be the objective function in the sequential quadratic programming algorithm; , , This refers to the constraint function in the sequential quadratic programming algorithm.
6. A milling robot machining trajectory optimization system, characterized in that, include: The information acquisition module is used to acquire data information, including robot kinematic parameters, load mass of each joint of the robot, tool tip machining trajectory, initial tool attitude angle and tool attitude angle limit value; The inverse kinematics module is used to generate discrete trajectory points based on the tool tip machining trajectory, and to inversely solve the initial joint motion trajectory by using the discrete trajectory points and the initial tool posture angle; An optimization module is used to establish a target optimization model and use the target optimization model to optimize the initial joint motion trajectory; The steps for establishing the target optimization model specifically include: Based on the robot's kinematic parameters, a robot kinematic model is established; the posture transformation matrix, joint motion limit values, and joint angle variables are obtained through the robot kinematic model. Constraints are established using the joint motion limit values, the tool attitude angle limit values, and the robot kinematic model; An optimization objective is established using the joint angle variables, the load mass of each joint of the robot, and the discrete trajectory points. Establish a target optimization model based on the constraints and the optimization objective; The optimization objective is: Where n is the number of discrete trajectory points, and i is the discrete trajectory point number; Joint angle variable; Number the joints. Let i be the i-th discrete trajectory point. Let i be the (i+1)th discrete trajectory point; For the joint angle variable The joint load difference coefficient corresponding to the joint; the joint load difference coefficient For the joint angle variable The joint load mass of the corresponding joint is 6 times the percentage of the total load mass of all joints added together.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the milling robot machining trajectory optimization method according to any one of claims 1 to 5.
8. A storage device comprising a storage medium and a processor, wherein the storage medium stores a computer program, characterized in that, When the processor executes the computer program, it implements the milling robot machining trajectory optimization method according to any one of claims 1 to 5.