Design method for space moving track of manipulator

Through the trajectory design method combining global and local optimization, the problem of unstable movement of the robot in the existing technology is solved, and high-precision and flexible trajectory planning are achieved, which is suitable for high-precision tasks of the robot.

CN120269565AActive Publication Date: 2025-07-08WUXI LINGZHANG ROBOT TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510596106.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-07-08
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

The existing trajectory design scheme relies on offline calculations and cannot respond to changes in the environment or mechanical state in a timely manner, resulting in insufficient movement of the robotic hand, which may cause damage, and insufficient consideration of the details of changes in posture angles and joint angles.

Method used

Multimodal data is collected to generate preliminary trajectories. By combining global optimization and local optimization, using technologies such as IMU sensors, Bezier curves, particle swarm optimization and generalized unit mapping, the trajectory is optimized to meet the requirements of attitude angles, path lengths and acceleration smoothness, combining visualization and encrypted storage.

Benefits of technology

It improves the stability and accuracy of the robot movement, avoids mechanical damage, enhances the flexibility and reliability of trajectory planning, and is suitable for high-precision tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120269565A_ABST
    Figure CN120269565A_ABST
Patent Text Reader

Abstract

The invention discloses a design method for a space movement track of a manipulator, and relates to the technical field of track planning, and the design method comprises the steps: collecting multi-modal data, then generating a preliminary track, and carrying out global optimization based on the preliminary track to obtain a global optimization track; performing further local optimization operation based on the global optimization trajectory to obtain a final trajectory; according to the method, global optimization and local optimization of the trajectory are combined, the defects in the aspects of path smoothness, acceleration smoothness and joint angle limitation in a traditional method are overcome, global optimization is achieved through a particle swarm optimization method, the weights of the path length, acceleration change and task completion time are comprehensively considered, and the optimal path length is obtained. The whole performance of the track can be effectively improved, local optimization further refines the speed and acceleration change of each time point on the basis, mutation is avoided, the joint angle change of the manipulator is controlled, and the whole movement process is more stable and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of trajectory planning, and particularly to a design method for the spatial movement trajectory of a manipulator. Background Art

[0002] With the development of automation technology, manipulators have been widely used in various industrial, medical, and scientific research fields. Especially when performing precise tasks, how to accurately plan and control the spatial movement trajectory of a manipulator has become an important technical challenge. In recent years, with the continuous progress of robot technology, especially the improvement of sensor technology and computing power, trajectory planning methods have emerged continuously, aiming to improve the accuracy and efficiency of manipulators in performing tasks.

[0003] However, most of the existing trajectory design schemes rely on offline calculations, making it impossible to respond in a timely manner to changes in the environment or mechanical state during the execution process, thus limiting their flexibility and reliability in practical applications. Moreover, due to insufficient consideration of the details of changes in attitude angles and joint angles, the movement of the manipulator is likely to be unstable, which may cause mechanical damage. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a design method for the spatial movement trajectory of a manipulator, which solves the problems that most of the existing trajectory design schemes rely on offline calculations, making it impossible to respond in a timely manner to changes in the environment or mechanical state during the execution process, thus limiting their flexibility and reliability in practical applications. Moreover, due to insufficient consideration of the details of changes in attitude angles and joint angles, the movement of the manipulator is likely to be unstable, which may cause mechanical damage.

[0006] To solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a design method for the spatial movement trajectory of a manipulator, which includes:

[0008] Collecting multi-modal data to generate a preliminary trajectory, and performing global optimization based on the preliminary trajectory to obtain a globally optimized trajectory;

[0009] Performing further local optimization operations based on the globally optimized trajectory to obtain a final trajectory;

[0010] Detecting based on the final trajectory and displaying it through a visualization interface;

[0011] Storing the detection results in a database and further performing an encryption operation.

[0012] As a preferred solution of the design method for the spatial movement trajectory of the manipulator according to the present invention, wherein: the generation of the preliminary trajectory after collecting multi-modal data includes:

[0013] Collect the speed, acceleration and attitude angle data of the manipulator through the IMU sensor, and record the starting position and target position of the manipulator;

[0014] Take the starting position and the target position as the fixed endpoints of the Bezier curve, and randomly generate z desired speeds and desired accelerations using the normal distribution method;

[0015] Take the randomly generated z desired speeds and desired accelerations as boundary conditions;

[0016] Calculate the speed change of each control point based on the z desired speeds and then calculate the positions of control points P1 and P2;

[0017] Discretize all speed and acceleration data using a time step, and generate n discrete time point data, then calculate the speed and acceleration values corresponding to each discrete time point;

[0018] Based on the speed and acceleration values corresponding to each discrete time point, use the cubic spline interpolation method to construct the cubic spline functions S v (t) and S a (t):

[0019] S v (t) = a0 + a1t + a2t 2 + a3t 3 ,

[0020] S a (t) = b0 + b1t + b2t 2 + b3t 3 ,

[0021] In the formula, S v (t) represents the cubic spline function of speed, a0 represents the constant term of speed, a1 represents the linear term coefficient of speed, a2 represents the quadratic term coefficient of speed, a3 represents the cubic term coefficient of speed, t represents the time parameter, S a (t) represents the cubic spline function of acceleration, b0 represents the constant term of acceleration, b1 represents the linear term coefficient of acceleration, b2 represents the quadratic term coefficient of acceleration, b3 represents the cubic term coefficient of acceleration;

[0022] Set different attitude angle constraint ranges, and adjust the control point positions through an iterative method. In each iteration process, calculate the attitude angle of the current trajectory at each time point and compare it with the constraint range. If the constraint conditions are not met, adjust the positions of the control points until the attitude angle meets the conditions;

[0023] Substitute the positions of the control points that meet the conditions, the recorded starting position, and the target position into the Bezier curve formula for calculation to obtain r preliminary trajectories.

[0024] As a preferred solution of the design method for the spatial movement trajectory of the manipulator described in the present invention, wherein: the global optimization based on the preliminary trajectories to obtain the globally optimized trajectory includes:

[0025] Based on the r preliminary trajectories, use the Euclidean distance to calculate the total Euclidean distance between adjacent points in each preliminary trajectory to obtain the path length:

[0026]

[0027] In the formula, F1 represents the path length, n represents the total number of control points in the preliminary trajectory, i represents the index variable, A i and A i+1 represent the position coordinates of the i-th and (i + 1)-th control points in the preliminary trajectory, and ‖A i - A i+1 ‖ represents the Euclidean distance between adjacent points in the preliminary trajectory;

[0028] Based on the r preliminary trajectories, calculate the degree of acceleration change of each preliminary trajectory to obtain the acceleration smoothness:

[0029]

[0030] In the formula, F2 represents the acceleration smoothness, Δa i represents the acceleration change amount of the i-th control point in the preliminary trajectory, Δt represents the time interval between adjacent control points, represents the absolute value of the acceleration change rate;

[0031] Based on the speed in each preliminary trajectory, calculate the time required for the task to obtain the completion time:

[0032]

[0033] In the formula, F3 represents the completion time, v i represents the speed of the i-th control point in the preliminary trajectory;

[0034] Take each preliminary trajectory as a particle, and take the positions of the control points in each preliminary trajectory as the positions of each particle, and initialize the number, position, and speed of the particles;

[0035] By using the weighted sum method, combine the path length, acceleration smoothness, and completion time to obtain the global optimization objective function:

[0036] F4 = δ1F1 + δ2F2 + δ3F3

[0037] In the formula, F4 represents the global optimization objective function, δ1 represents the weight coefficient of the path length, δ2 represents the weight coefficient of the acceleration smoothness, and δ3 represents the weight coefficient of the completion time;

[0038] Update the position and velocity of the particle according to the position, velocity and best solution of the current particle, calculate the objective function value F4 of each particle during the iteration process. When the decrease value of the objective function value no longer decreases significantly, stop the iteration and output the global optimal trajectory.

[0039] As a preferred scheme of the design method for the spatial movement trajectory of the manipulator described in the present invention, wherein: the further local optimization operation based on the global optimization trajectory to obtain the final trajectory includes:

[0040] Based on the global optimal trajectory, use the time step for discretization to obtain m trajectory segments;

[0041] Correspond the discrete time points t of each small segment j with each trajectory control point to obtain the trajectory discrete point B(t j );

[0042] Based on the m trajectory segments, calculate the acceleration of the current position at the discrete time point t in each segment j :

[0043]

[0044] In the formula, a(t j ) represents the acceleration at the discrete time point t j , v(t j ) represents the velocity at the discrete time point t j , v(t j+1 ) represents the velocity at the discrete time point t j+1 , and Δt represents the time step;

[0045] According to the acceleration of the current position at the discrete time point t j , further calculate the smoothness of the acceleration change:

[0046]

[0047] In the formula, C1 represents the smoothness of the acceleration change, e represents the total number of trajectory discrete points, j represents the index variable, and a(t j+1 ) represents the acceleration at the discrete time point t j+1 ;

[0048] Based on the trajectory discrete points, calculate the angular change amount between adjacent trajectory discrete points:

[0049]

[0050] In the formula, θ j represents the angular change of the trajectory of the j-th discrete point, B(t j ) represents the discrete point of the trajectory, ‖B(t j )‖ represents the norm of the vector B(t j ), and cos -1 represents the inverse cosine function;

[0051] Accumulate according to the obtained angular change to obtain the path smoothness:

[0052]

[0053] In the formula, C2 represents the path smoothness;

[0054] Based on the collected speed, use the integration method to perform integration to obtain the joint angles at the current and previous moments;

[0055] Subtract the current joint angle from the joint angle at the previous moment to obtain the joint angle change;

[0056] Based on the joint angle change, calculate the joint angle change of each joint between two adjacent discrete points to obtain the joint angle limit value:

[0057]

[0058] In the formula, C3 represents the joint angle limit value, represents the angular change of the j-th discrete point, represents the maximum limit of the angular change;

[0059] The range of the joint angle limit is:

[0060]

[0061] Combine the smoothness of the acceleration change, the path smoothness, and the joint angle limit value to obtain the local optimization objective function:

[0062]

[0063] In the formula, C4 represents the local optimization objective function, represents the weighting coefficient of the smoothness of the acceleration change, represents the weighting coefficient of the path smoothness, represents the weighting coefficient of the joint angle limit value;

[0064] Iterative optimization is performed using the generalized element mapping method. During the iteration process, the local optimization objective function value is calculated. When the decrease value of the local optimization objective function no longer significantly decreases, the iteration is stopped and the final trajectory is output.

[0065] As a preferred solution of the design method for the spatial movement trajectory of the manipulator according to the present invention, wherein: the detection based on the final trajectory includes:

[0066] Using the sliding window technique, calculate the mean value of each time period in the final trajectory;

[0067] Set the detection threshold as ψ, compare the mean value of each time period with the threshold ψ. When the mean value of each time period is greater than the threshold ψ, global and local optimization need to be performed again. When the mean value of each time period is less than or equal to the threshold ψ, the final trajectory is used as the execution basis.

[0068] As a preferred solution of the design method for the spatial movement trajectory of the manipulator according to the present invention, wherein: the display through the visualization interface means using Matplotlib to draw a trajectory diagram;

[0069] The trajectory diagram includes a position-time diagram, a velocity-time diagram, and an acceleration-time diagram.

[0070] As a preferred solution of the design method for the spatial movement trajectory of the manipulator according to the present invention, wherein: the storage of the detection results through the database means storing the final trajectory used as the execution basis as a two-dimensional array, with each row representing the trajectory state at a moment, using the Pandas library to store the data in CSV format, and saving all the data by column.

[0071] As a preferred solution of the design method for the spatial movement trajectory of the manipulator according to the present invention, wherein: the encryption operation means using a strong random number generation algorithm to generate a 256-bit key, and using the generated key to encrypt the trajectory data stored in the Pandas library.

[0072] In a second aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and wherein: when the computer program is executed by the processor, any step of the design method for the spatial movement trajectory of the manipulator as described in the first aspect of the present invention is implemented.

[0073] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and wherein: when the computer program is executed by the processor, any step of the design method for the spatial movement trajectory of the manipulator as described in the first aspect of the present invention is implemented.

[0074] The beneficial effects of the present invention are as follows: By combining global optimization and local optimization of the trajectory, the present invention solves the deficiencies in path smoothness, acceleration smoothness, and joint angle limitation in traditional methods. Global optimization uses the particle swarm optimization method, comprehensively considering the weights of path length, acceleration change, and task completion time, which can effectively improve the overall performance of the trajectory. On this basis, local optimization further refines the speed and acceleration changes at each time point, avoids sudden changes, and controls the joint angle changes of the manipulator, making the entire movement process smoother and more accurate. Description of the Drawings

[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0076] Figure 1 It is a flowchart of the design method for the spatial movement trajectory of the manipulator in Embodiment 1. Detailed Embodiments

[0077] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the detailed embodiments of the present invention with reference to the drawings of the specification.

[0078] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0079] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that are mutually exclusive with other embodiments.

[0080] Embodiment 1, referring to Figure 1 , is the first embodiment of the present invention. This embodiment provides a design method for the spatial movement trajectory of a manipulator, including the following steps:

[0081] S1. After collecting multi-modal data, generate a preliminary trajectory, and perform global optimization based on the preliminary trajectory to obtain a globally optimized trajectory;

[0082] Specifically, generating a preliminary trajectory after collecting multi-modal data includes:

[0083] Collect the velocity, acceleration, and attitude angle data of the manipulator through the IMU sensor, and record the starting position and target position of the manipulator;

[0084] Use the starting position and target position as the fixed endpoints of the Bezier curve, and randomly generate z desired velocities and desired accelerations using the normal distribution method;

[0085] Use the randomly generated z desired velocities and desired accelerations as boundary conditions;

[0086] Calculate the position of control points P1 and P2 after calculating the velocity change of each control point based on z desired velocities;

[0087] Discretize all velocity and acceleration data using the time step, and generate n discrete time point data, then calculate the velocity and acceleration values corresponding to each discrete time point;

[0088] Based on the velocity and acceleration values corresponding to each discrete time point, use the cubic spline interpolation method to construct the cubic spline functions S v (t) and S a (t):

[0089] S v (t) = a0 + a1t + a2t 2 + a3t 3 ,

[0090] S a (t) = b0 + b1t + b2t 2 + b3t 3 ,

[0091] In the formula, S v (t) represents the cubic spline function of velocity, a0 represents the constant term of velocity, a1 represents the coefficient of the linear term of velocity, a2 represents the coefficient of the quadratic term of velocity, a3 represents the coefficient of the cubic term of velocity, t represents the time parameter, S a (t) represents the cubic spline function of acceleration, b0 represents the constant term of acceleration, b1 represents the coefficient of the linear term of acceleration, b2 represents the coefficient of the quadratic term of acceleration, b3 represents the coefficient of the cubic term of acceleration;

[0092] a and b can be calculated through the boundary conditions and the interpolation process;

[0093] Set different attitude angle constraint ranges according to the task requirements, and adjust the control point positions through the iterative method. In each iteration process, calculate the attitude angle of the current trajectory at each time point and compare it with the constraint range. If the constraint conditions are not met, adjust the positions of the control points until the attitude angle meets the conditions;

[0094] Substitute the positions of the control points that meet the conditions, the recorded starting position, and the target position into the Bezier curve formula for calculation to obtain r preliminary trajectories.

[0095] The velocity, acceleration, and attitude angle data provided by the IMU sensor provide accurate dynamic inputs for trajectory optimization. The cubic spline interpolation method ensures smooth transitions of the trajectory, avoiding drastic changes in acceleration and velocity, thereby improving the execution stability and accuracy of the manipulator, making the present invention more suitable for high-precision tasks. Secondly, through the iterative optimization method of attitude angle constraint, it effectively avoids execution failures caused by excessive changes in attitude angle. The use of Bezier curves makes trajectory planning more flexible, and the control points can be adjusted according to task requirements to generate smooth and accurate paths.

[0096] Furthermore, perform global optimization based on the preliminary trajectories to obtain the globally optimized trajectories, including:

[0097] Based on the r preliminary trajectories, use the Euclidean distance to calculate the sum of the Euclidean distances between adjacent points in each preliminary trajectory to obtain the path length:

[0098]

[0099] In the formula, F1 represents the path length, n represents the total number of control points in the preliminary trajectory, i represents the index variable, A i and A i+1 represent the position coordinates of the i-th and (i + 1)-th control points in the preliminary trajectory, and ‖A i -A i+1 ‖ represents the Euclidean distance between adjacent points in the preliminary trajectory;

[0100] Based on the r preliminary trajectories, calculate the degree of acceleration change of each preliminary trajectory to obtain the acceleration smoothness:

[0101]

[0102] In the formula, F2 represents the acceleration smoothness, Δa i represents the acceleration change amount of the i-th control point in the preliminary trajectory, Δt represents the time interval between adjacent control points, represents the absolute value of the acceleration change rate;

[0103] Based on the velocity in each preliminary trajectory, calculate the time required for the task to obtain the completion time:

[0104]

[0105] In the formula, F3 represents the completion time, v i represents the velocity of the i-th control point in the preliminary trajectory;

[0106] Initialize the number, position, and velocity of particles by taking each preliminary trajectory as a particle and the position of the control points in each preliminary trajectory as the position of each particle.

[0107] Combine the path length, acceleration smoothness, and completion time using the weighted sum method to obtain the global optimization objective function:

[0108] F4 = δ1F1 + δ2F2 + δ3F3

[0109] In the formula, F4 represents the global optimization objective function, δ1 represents the weight coefficient of the path length, δ2 represents the weight coefficient of the acceleration smoothness, and δ3 represents the weight coefficient of the completion time.

[0110] δ1, δ2, and δ3 can be set based on engineering experience and expert knowledge.

[0111] Update the position and velocity of the particles according to the position, velocity, and best solution of the current particles, and calculate the objective function value F4 of each particle during the iteration process. When the decrease value of the objective function value no longer decreases significantly, stop the iteration and output the global optimal trajectory.

[0112] By comprehensively considering the three optimization objectives of path length, acceleration smoothness, and completion time, the present invention can effectively optimize the motion trajectory of the manipulator. In terms of path length, the Euclidean distance is used to calculate the distance between adjacent control points to ensure that the manipulator reduces unnecessary movements when performing tasks. In the optimization of acceleration smoothness, the execution accuracy and equipment stability are improved by calculating and controlling the acceleration change amount. The optimization of the completion time is achieved by calculating the velocity of each control point and minimizing the completion time of the task, which improves the work efficiency. And through the particle swarm optimization method, the path, acceleration smoothness, and completion time can be globally optimized, and the local optimum problem can be avoided. Secondly, the particle swarm optimization algorithm can effectively handle multi-objective optimization problems, ensuring that the trajectory planning reaches the best balance among multiple objectives. By fusing the optimization objectives through the weighted sum method, the weights can be flexibly adjusted according to the requirements of different tasks, so as to optimize the trajectory targeted and improve the overall performance. And through the iterative optimization process, the present invention can adjust the position and velocity of the particles in real time to ensure that the trajectory planning continuously approaches the global optimal solution. And by setting the stop criterion, the optimization process can avoid unnecessary calculations on the premise of ensuring accuracy, save time and resources, and make the obtained optimized trajectory not only meet the task requirements but also satisfy various constraints during the operation of the manipulator, ensuring its stable and efficient execution of tasks.

[0113] S2. Perform further local optimization operations based on the global optimization trajectory to obtain the final trajectory.

[0114] Specifically, further local optimization operations are performed based on the globally optimized trajectory to obtain the final trajectory, including:

[0115] Based on the globally optimal trajectory, it is discretized using the time step to obtain m small trajectory segments;

[0116] Correspond the discrete time points t j of each small segment with each trajectory control point to obtain the trajectory discrete points B(t j );

[0117] Based on the m small trajectory segments, calculate the acceleration at the current position of the discrete time point t j within each small segment:

[0118]

[0119] In the formula, a(t j ) represents the acceleration at the discrete time point t j , v(t j ) represents the velocity at the discrete time point t j , v(t j+1 ) represents the velocity at the discrete time point t j+1 , and Δt represents the time step;

[0120] According to the acceleration at the current position of the discrete time point t j , further calculate the smoothness of the acceleration change:

[0121]

[0122] In the formula, C1 represents the smoothness of the acceleration change, e represents the total number of trajectory discrete points, j represents the index variable, and a(t j+1 ) represents the acceleration at the discrete time point t j+1 ;

[0123] Based on the trajectory discrete points, calculate the angle change amount between adjacent trajectory discrete points:

[0124]

[0125] In the formula, θ j represents the angle change amount of the j-th discrete point trajectory, B(t j ) represents the trajectory discrete point, ‖B(t j )‖ represents the norm of the B(t j ) vector, and cos -1 represents the inverse cosine function;

[0126] Accumulate according to the obtained angle change amount to obtain the path smoothness:

[0127]

[0128] In the formula, C2 represents the path smoothness;

[0129] Based on the collected speed, the integral method is used for integration to obtain the joint angles at the current and previous moments;

[0130] Subtract the current joint angle from the joint angle at the previous moment to obtain the change in joint angle;

[0131] Based on the change in joint angle, calculate the change in joint angle between two adjacent discrete points for each joint to obtain the joint angle limit value:

[0132]

[0133] In the formula, C3 represents the joint angle limit value, represents the change in angle at the j-th discrete point, represents the maximum limit of the change in angle;

[0134] The range of joint angle limit is:

[0135]

[0136] Combine the smoothness of acceleration change, path smoothness, and joint angle limit value to obtain the local optimization objective function:

[0137]

[0138] In the formula, C4 represents the local optimization objective function, represents the weighting coefficient of the smoothness of acceleration change, represents the weighting coefficient of path smoothness, represents the weighting coefficient of joint angle limit value;

[0139] It can be set through experimental data;

[0140] Use the generalized element mapping method for iterative optimization, and during the iteration process, calculate the value of the local optimization objective function. When the decrease value of the local optimization objective function no longer decreases significantly, stop the iteration and output the final trajectory.

[0141] By combining the global optimization and local optimization methods, which not only ensure the overall optimality of the trajectory but also enable fine-tuning in details, the dual optimization framework of the present invention can comprehensively consider multiple objectives such as path length, acceleration smoothness, path smoothness, and joint angle limits, ensuring that the trajectory can achieve the optimal effect at each stage. Through the optimization of acceleration smoothness and path smoothness, it can effectively reduce the mutations caused by acceleration and deceleration in the trajectory, avoiding severe vibrations or discontinuous paths of the manipulator. The setting of joint angle change limits effectively avoids excessive rotation of the manipulator joints, thereby preventing structural damage or joint fatigue of the manipulator. And the introduction of the generalized element mapping method makes the trajectory optimization process more efficient and accurate. Under iterative optimization, the generalized element mapping method can continuously adjust the positions of the control points in each calculation, enabling the trajectory to meet various constraint conditions and tend to the optimal solution. This makes the present invention show higher adaptability and performance in practical applications, especially under complex tasks and high-precision requirements.

[0142] S3. Detect based on the final trajectory and display it through a visualization interface;

[0143] Specifically, detecting based on the final trajectory includes:

[0144] Use the sliding window technique to calculate the mean value of each time period in the final trajectory;

[0145] Set the detection threshold as ψ according to domain knowledge and relevant materials, compare the mean value of each time period with the threshold ψ. When the mean value of each time period is greater than the threshold ψ, global and local optimizations need to be carried out again. When the mean value of each time period is less than or equal to the threshold ψ, the final trajectory is used as the execution basis.

[0146] The sliding window technique enables the trajectory to be dynamically monitored and adjusted during execution, timely capturing trajectory deviations and avoiding error accumulation. Moreover, by comparing the mean value of each time period with the set threshold, global and local optimizations can be triggered when the trajectory deviates from the expectation, ensuring the accuracy and stability of the trajectory.

[0147] Furthermore, displaying through the visualization interface means using Matplotlib to draw the trajectory diagram;

[0148] The trajectory diagram includes a position-time diagram, a velocity-time diagram, and an acceleration-time diagram.

[0149] The position-time diagram can display the optimized position at each moment, the velocity-time diagram can display the change of the trajectory velocity over time, and the acceleration-time diagram can display the change of the trajectory acceleration over time.

[0150] The visualization graph can intuitively display the optimization progress of the trajectory, helping the designer to monitor and adjust the trajectory parameters in real time, ensuring the accuracy and stability of the manipulator when performing tasks. Moreover, the visualization interface makes the debugging process more convenient. Designers can quickly discover problems and make corrections, significantly improving the optimization efficiency.

[0151] S4. After storing the detection results in the database, further perform encryption operations;

[0152] Specifically, storing the detection results in the database means storing the final trajectory used as the execution basis as a two-dimensional array, with each row representing the trajectory state at a certain moment. Use the Pandas library to store the data in CSV format and save all the data column by column.

[0153] By storing the manipulator trajectory data as a two-dimensional array and using the Pandas library to convert the data into CSV format, efficient data storage and management are achieved. The present invention ensures the persistence, timeliness, and easy traceability of the trajectory data, facilitating real-time monitoring and adjustment of the trajectory. Moreover, through the standardized storage in CSV format, the data can be conveniently analyzed, optimized, and shared across platforms, enhancing the compatibility and scalability of the system.

[0154] Furthermore, the encryption operation means using a strong random number generation algorithm to generate a 256-bit key and using the generated key to encrypt the trajectory data stored in the Pandas library.

[0155] By adopting the combination of a strong random number generation algorithm and a 256-bit key with AES encryption technology to encrypt the trajectory data stored in the Pandas library, it ensures that the data maintains a high level of security during storage, transmission, and access. Moreover, the strong random number generation algorithm guarantees the unpredictability of the key, and the 256-bit key provides strong encryption intensity, enabling the data to have extremely high anti-attack capabilities when facing attacks such as brute-force cracking. The AES encryption algorithm ensures that the encryption process is efficient and secure, and also supports fast decryption to meet the real-time requirements.

[0156] This embodiment also provides a computer device applicable to the situation of the design method of the manipulator spatial movement trajectory, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the design method of the manipulator spatial movement trajectory proposed in the above embodiment.

[0157] The computer device may be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads provided on the outer shell of the computer device. It can also be an external keyboard, touchpad, or mouse, etc.

[0158] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the design method for realizing the spatial movement trajectory of the manipulator as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM for short), Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read-Only Memory (EPROM for short), Programmable Read-Only Memory (PROM for short), Read-Only Memory (ROM for short), magnetic memory, flash memory, a magnetic disk, or an optical disc.

[0159] In summary, the present invention combines global optimization and local optimization of the trajectory, solves the deficiencies in path smoothness, acceleration smoothness, and joint angle limitation in the traditional method. Global optimization uses the particle swarm optimization method, comprehensively considering the weights of path length, acceleration change, and task completion time, which can effectively improve the overall performance of the trajectory. On this basis, local optimization further refines the speed and acceleration changes at each time point, avoids sudden changes, and controls the joint angle changes of the manipulator, making the entire movement process more stable and accurate.

[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A design method for the spatial movement trajectory of a manipulator, characterized in that: Including, After collecting multi-modal data, generating a preliminary trajectory, and performing global optimization based on the preliminary trajectory to obtain a globally optimized trajectory; Performing further local optimization operations based on the globally optimized trajectory to obtain a final trajectory; Performing detection based on the final trajectory and displaying it through a visualization interface; Storing the detection results in a database and further performing an encryption operation.

2. The design method of the spatial movement trajectory of the manipulator according to claim 1, characterized in that: The generating of the preliminary trajectory after collecting multi-modal data includes: Collecting the speed, acceleration, and attitude angle data of the manipulator through an IMU sensor, and recording the starting position and target position of the manipulator; Taking the starting position and target position as the fixed endpoints of the Bezier curve, and randomly generating z desired speeds and desired accelerations using the normal distribution method; Taking the randomly generated z desired speeds and desired accelerations as boundary conditions; Calculating the velocity change of each control point based on the z desired speeds and then calculating the positions of control points P1 and P2; Discretizing all speed and acceleration data using a time step, generating n discrete time point data, and then calculating the corresponding speed and acceleration values at each discrete time point; Based on the velocity and acceleration values corresponding to each discrete time point, the cubic spline functions S v (t) and S a (t) are constructed using the cubic spline interpolation method; Setting different attitude angle constraint ranges, and adjusting the control point positions through an iterative method. In each iteration process, calculating the attitude angle of the current trajectory at each time point and comparing it with the constraint range. If the constraint conditions are not met, adjusting the positions of the control points until the attitude angle meets the conditions; Substituting the control point positions that meet the conditions, the recorded starting position, and the target position into the Bezier curve formula for calculation to obtain r preliminary trajectories.

3. The design method of the spatial movement trajectory of the manipulator according to claim 2, characterized in that: The performing of global optimization based on the preliminary trajectory to obtain a globally optimized trajectory includes: Based on the r preliminary trajectories, using the Euclidean distance to calculate the sum of the Euclidean distances between adjacent points in each preliminary trajectory to obtain the path length; Based on the r preliminary trajectories, calculating the degree of acceleration change of each preliminary trajectory to obtain the acceleration smoothness; Based on the speed in each preliminary trajectory, calculating the time required for the task to obtain the completion time; Taking each preliminary trajectory as a particle, and taking the control point positions in each preliminary trajectory as the positions of each particle, and initializing the number, position, and speed of the particles; By using the weighted sum method, combining the path length, acceleration smoothness, and completion time to obtain a global optimization objective function; Updating the positions and speeds of the particles according to the positions, speeds, and best solutions of the current particles, and calculating the objective function value F4 of each particle during the iteration process. When the decrease value of the objective function value no longer decreases significantly, stop the iteration and output the globally optimal trajectory.

4. The design method of the spatial movement trajectory of the manipulator according to claim 3, characterized in that: The performing of further local optimization operations based on the globally optimized trajectory to obtain a final trajectory includes: Based on the globally optimal trajectory, performing discretization using a time step to obtain m trajectory segments; Correspond the discrete time points t of each small segment j with each trajectory control point to obtain the trajectory discrete points B(t j ); Based on m small trajectory segments, calculate the discrete time points t within each segment j The acceleration at the current position; Based on discrete time points t j The acceleration at the current position is further used to calculate the smoothness of the acceleration change; Calculating the angle change amount between adjacent trajectory discrete points based on the trajectory discrete points; Accumulating according to the obtained angle change amount to obtain the path smoothness; Based on the collected speed, performing integration using the integration method to obtain the joint angles at the current and previous moments; Subtracting the current joint angle from the previous joint angle to obtain the joint angle change amount; Based on the joint angle change amount, calculate the joint angle change amount of each joint between two adjacent discrete points to obtain the joint angle limit value; Combine the smoothness of acceleration change, path smoothness and joint angle limit value to obtain a local optimization objective function; Use the generalized element mapping method for iterative optimization, and calculate the local optimization objective function value during the iteration process. When the decrease value of the local optimization objective function no longer decreases significantly, stop the iteration and output the final trajectory.

5. The design method of the spatial movement trajectory of the manipulator according to claim 4, characterized in that: The detection based on the final trajectory includes: Use the sliding window technique to calculate the mean value of each time period in the final trajectory; Set the detection threshold as ψ, compare the mean value of each time period with the threshold ψ. When the mean value of each time period is greater than the threshold ψ, global and local optimizations need to be performed again. When the mean value of each time period is less than or equal to the threshold ψ, use the final trajectory as the execution basis.

6. The design method of the spatial movement trajectory of the manipulator according to claim 5, characterized in that: The display through the visualization interface means using Matplotlib to draw a trajectory graph; The trajectory graph includes a position-time graph, a velocity-time graph and an acceleration-time graph.

7. The design method of the spatial movement trajectory of the manipulator according to claim 6, characterized in that: The storage of the detection results through the database means storing the final trajectory used as the execution basis as a two-dimensional array, with each row representing the trajectory state at a moment, using the Pandas library to store the data in CSV format and saving all data by column.

8. The design method of the spatial movement trajectory of the manipulator according to claim 7, characterized in that: The encryption operation means using a strong random number generation algorithm to generate a 256-bit key, and using the generated key to encrypt the trajectory data stored in the Pandas library.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the design method of the robotic arm spatial movement trajectory described in any one of claims 1 to 8.

10. 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 steps of the design method of the robotic arm spatial movement trajectory described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Mechanical arm space trajectory optimization method for optimal time under multiple constraint conditions

    CN108656117A

  • Intelligent vehicle global optimal trajectory planning method and system based on dynamic planning

    CN116185014A

  • Industrial robot trajectory optimization control method based on intelligent algorithm

    CN116901086A

  • Robot trajectory optimization method, device and equipment

    CN119347784A

  • Spawning cage for black soldier fly

    KR1020230015560A