A parallel robot trajectory planning method and system based on digital twinning and dynamic response butterfly algorithm
By constructing a digital twin model of a parallel robot and a dynamic response butterfly algorithm, combined with digital twin tracking control and NURBS curve smoothing, the problems of local optima, low virtual-real synchronization rate and vibration in the trajectory planning of parallel robots are solved, and efficient and stable trajectory planning and operation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINZHONG UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing parallel robot trajectory planning methods are prone to getting trapped in local optima when planning high-dimensional and nonlinear trajectories, making it difficult to meet real-time requirements. They also suffer from low synchronization rates between virtual and real mappings and poor smoothness of the planned trajectory, resulting in insufficient vibration and positioning accuracy.
A digital twin model of a parallel robot is constructed, and the dynamic response butterfly algorithm is used for time-optimal trajectory planning. Real-time compensation is performed through a digital twin tracking control model, and NURBS curve trajectory smoothing is adopted to suppress vibration and improve the virtual-real synchronization rate.
It achieves smooth trajectory operation of parallel robots with high precision, high synchronization rate, low vibration, and optimal timing, thus improving the quality and efficiency of trajectory planning.
Smart Images

Figure CN121657574B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, specifically to a method and system for parallel robot trajectory planning based on digital twin and dynamic response butterfly algorithm. Background Technology
[0002] Parallel robots, with their advantages of high structural rigidity, strong load-bearing capacity, and fast dynamic response, have been widely used in high-speed sorting, precision assembly, and other fields. Trajectory planning, as their core control technology, directly determines the working efficiency and motion performance of parallel robots.
[0003] However, existing parallel robot trajectory planning methods still have the following shortcomings: 1. In terms of trajectory optimization, traditional optimization algorithms are prone to getting trapped in local optima when solving high-dimensional, nonlinear trajectory planning problems, and their convergence speed is slow, making it difficult to meet the real-time requirements of industrial scenarios. 2. In terms of virtual-real mapping and tracking control, traditional digital twin models mostly rely on idealized kinematic models for driving. However, in actual operation, the actual motion trajectory of the parallel robot's physical entity will deviate from the theoretical model due to manufacturing and assembly errors, joint friction, and other factors, resulting in a decrease in the prediction accuracy of the constructed digital twin model and a low virtual-real synchronization rate. 3. In terms of trajectory smoothness, the planned trajectory key points are usually directly used for motion control, or only fixed smoothing algorithms are used for interpolation. However, this method is prone to causing high-frequency vibrations in the parallel robot when passing through nodes with large curvature changes, affecting the positioning accuracy of the end effector and the lifespan of the equipment. Existing smoothing strategies lack a dynamic response mechanism to actual operating errors, making it difficult to achieve a good balance between suppressing vibration and ensuring operating efficiency.
[0004] In summary, existing technologies suffer from three core problems: low trajectory planning quality and efficiency, insufficient accuracy of digital twin virtual-real synchronization, and poor smoothness of planned trajectories. Therefore, there is an urgent need for an integrated solution that deeply integrates high-precision virtual-real mapping, intelligent trajectory optimization, and dynamic smooth control to comprehensively improve the trajectory planning performance and operational efficiency of parallel robots. Summary of the Invention
[0005] In order to solve at least one of the above-mentioned technical problems in the prior art, the present invention provides a parallel robot trajectory planning method and system based on digital twin and dynamic response butterfly algorithm.
[0006] In a first aspect, the present invention provides a trajectory planning method for a parallel robot based on digital twin and dynamic response butterfly algorithm, the method comprising:
[0007] Construct a digital twin model of a parallel robot, consisting of a kinematic model and a digital twin tracking control model;
[0008] The dynamic response butterfly algorithm is used to plan the trajectory of the physical entity of the parallel robot and obtain the time-optimal trajectory key points.
[0009] Based on the key points of the trajectory, a smooth motion trajectory is obtained by performing trajectory smoothing processing.
[0010] The smooth motion trajectory is input into the digital twin model of the parallel robot, and the kinematic model drives the physical entity of the parallel robot to execute the smooth motion trajectory. At the same time, the digital twin tracking and control model performs real-time tracking and compensation of the smooth motion trajectory.
[0011] In one alternative implementation, the construction of the kinematic model includes:
[0012] Define the structure of the physical entity of the parallel robot, the structure including the static platform, the moving platform, the three driving arms and the three driven arms of the parallel robot;
[0013] A reference coordinate system is constructed with the center plane of the static platform as the horizontal and vertical coordinate planes and the center of the static platform as the origin. Based on the reference coordinate system, the spatial coordinates of the revolute joint, the first ball joint, and the second ball joint are determined. The revolute joint is the connection point between the static platform and the drive arm. The first ball joint is the connection point between the drive arm and the driven arm. The second ball joint is the connection point between the driven arm and the moving platform.
[0014] Based on the reference coordinate system and the centroid of the moving platform, the direction vector of the end space of the moving platform and the spatial coordinates of the end space of the moving platform are determined.
[0015] Based on the reference coordinate system, the direction vector of the end space of the moving platform, and the spatial coordinates of the end space of the moving platform, the forward and inverse kinematic relationships between the angle between the driving arm and the stationary platform and the spatial coordinates of the end space of the moving platform are established.
[0016] In one optional implementation, the construction of the digital twin tracking control model includes:
[0017] Based on the dynamic principle of the parallel robot, an ideal output torque model under ideal conditions is established. The ideal output torque model consists of a mass matrix, a centripetal force matrix, and a gravity vector. The inputs of the ideal output torque model are the ideal angle, ideal angular velocity, and ideal angular acceleration of the joint.
[0018] Based on the ideal output torque model, friction torque and disturbance torque are introduced to construct the actual output torque model; the friction torque is modeled as consisting of viscous friction component, Coulomb friction component and random ball joint error;
[0019] The error between the actual trajectory and the ideal trajectory caused by friction torque and disturbance torque is linearly represented by the Jacobian inverse matrix of the parallel robot under the ideal state and the Jacobian matrix of the parallel robot under the actual state, and the linear representation function is obtained.
[0020] An error observation state equation is established based on the linear representation function, and the digital twin tracking error in the digital twin tracking control model is observed and dynamically compensated in real time based on the error observation state equation.
[0021] In one alternative implementation, a dynamic response butterfly algorithm is used to plan the trajectory of the parallel robot physical entity, including:
[0022] Initialize the butterfly population, and evaluate the trajectory planning time and path length for each butterfly based on the preset time-optimal objective function and the preset trajectory-shortest objective function;
[0023] Based on the evaluation results, butterflies are classified into three levels: worst, second-best, and best. Different search strategies are assigned to butterflies of different levels. The worst butterfly performs global exploration and is forced to move towards the current global optimum. The best butterfly performs local exploration and conducts in-depth exploration at its current location. The second-best butterfly performs global or local exploration according to a preset random probability distribution.
[0024] When the worst, second-best, and best butterflies reach their respective preset thresholds, the trajectory planning results corresponding to the worst, second-best, and best butterflies are output to obtain the time-optimal trajectory key points; otherwise, the butterfly hierarchy is re-divided and the corresponding search strategy is executed.
[0025] In one alternative implementation, it further includes:
[0026] The worst-performing butterfly is randomly reset using dynamic positioning, forcing it to increase its flight exploration efforts.
[0027] In one optional implementation, trajectory smoothing is performed based on the trajectory key points to obtain a smooth motion trajectory, including:
[0028] Construct an initial NURBS curve trajectory based on the aforementioned trajectory key points;
[0029] A dynamic weight adjustment mechanism is introduced, using the error between the actual trajectory and the ideal trajectory as the main indicator, to dynamically adjust the weights of each key point in the initial NURBS curve.
[0030] Non-uniform node vector optimization is implemented. By analyzing the curvature change of the trajectory corresponding to each key point of the trajectory, the node density is adaptively increased in the section where the curvature change exceeds the preset threshold based on the analysis results, so as to obtain a smooth motion trajectory.
[0031] In one optional implementation, the introduction of a dynamic weight adjustment mechanism includes:
[0032] The error between the actual trajectory and the ideal trajectory is combined with the curvature change to form an adjustment signal, and the weights of the trajectory key points of the initial NURBS curve are scaled in real time according to the adjustment signal.
[0033] In one alternative implementation, the non-uniform node vector optimization includes:
[0034] Calculate the normalized product of the trajectory chord length and curvature change in the interval where each trajectory key point is located. Based on the product result, insert new nodes proportionally in the interval where the geometric change exceeds the preset change limit to form a non-uniform distribution of trajectory key points.
[0035] In a second aspect, the present invention provides a parallel robot trajectory planning system based on digital twin and dynamic response butterfly algorithm, which can execute a parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm as described in the first aspect and any optional embodiment, including: a twin layer and a functional layer.
[0036] The twin layer includes the physical entity of the parallel robot and the digital twin model of the parallel robot, which consists of a kinematic model and a digital twin tracking and control model.
[0037] The functional layer includes a dynamic response butterfly algorithm trajectory planning module for trajectory planning and a trajectory secondary smoothing module for trajectory optimization.
[0038] The parallel robot digital twin model in the twin layer interacts with the parallel robot physical entity in a virtual-real manner; a functional layer is built on the parallel robot digital twin model, which is used to optimize the trajectory. The optimized trajectory is executed through the parallel robot digital twin model, and the execution result is fed back to the parallel robot physical entity through the functional layer to drive the parallel robot physical entity to move.
[0039] Compared with the prior art, the beneficial effects of the present invention are:
[0040] By constructing a digital twin model of a parallel robot that integrates a kinematic model and a digital twin tracking control model, and combining the dynamic response butterfly algorithm for time-optimal trajectory planning and NURBS curve trajectory smoothing, the problems of large trajectory tracking error, significant running vibration, and low virtual-real synchronization rate caused by the idealization of the model and failure to consider actual friction disturbances in traditional methods are effectively overcome. This achieves high-precision, high-synchronization-rate, low-vibration, and time-optimal stable trajectory operation of the parallel robot. Attached Figure Description
[0041] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to an embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of the physical entity connection of the parallel robot provided in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the kinematic model of the parallel robot provided in an embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of the gantry trajectory operation results provided in an embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram comparing the virtual-real synchronization rate results before and after optimization by introducing a digital twin tracking control model, provided in an embodiment of the present invention.
[0047] Figure 6 This is a flowchart illustrating the original butterfly algorithm provided in an embodiment of the present invention;
[0048] Figure 7 This is a flowchart illustrating the dynamic response butterfly algorithm provided in an embodiment of the present invention;
[0049] Figure 8 This is a comparison diagram of the algorithm iterations of the original butterfly algorithm and the dynamic response butterfly algorithm provided in the embodiments of the present invention;
[0050] Figure 9 This is a schematic diagram of the non-uniform node vector before optimization provided in an embodiment of the present invention;
[0051] Figure 10This is a schematic diagram of the optimized non-uniform node vector provided in an embodiment of the present invention;
[0052] Figure 11 This is a block diagram of a parallel robot trajectory planning system based on digital twin and dynamic response butterfly algorithm provided in an embodiment of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] According to embodiments of the present invention, a method and system for parallel robot trajectory planning based on digital twin and dynamic response butterfly algorithm is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions.
[0055] In practical applications, firstly according to Figure 2 The diagram showing the physical connections of the parallel robot connects the robot body, servo motors, servo motor drivers, photoelectric encoder sensors, serial ports, motion controllers, and a host computer. The parallel robot body is driven by servo motors, with photoelectric encoder sensors attached to the ends of the servo motors to monitor motor speed. The servo motors are driven by servo motor drivers. Since the parallel robot body has multiple branches, a serial port connects the servo motor drivers to the motion controller. The host computer is connected to the motion controller via a serial port, and ultimately, the host computer controls the parallel robot body to perform corresponding operations by issuing operation commands.
[0056] Figure 1 This is a flowchart of a parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to an embodiment of the present invention, as shown below. Figure 1 As shown, the process includes the following steps:
[0057] S1: Construct a digital twin model of a parallel robot consisting of a kinematic model and a digital twin tracking control model.
[0058] Optionally, the construction of the kinematic model includes: defining the structure of the parallel robot physical entity, the structure including a static platform, a moving platform, three driving arms, and three driven arms; constructing a reference coordinate system with the center plane of the static platform as the horizontal and vertical coordinate planes and the center of the static platform as the origin; and determining the spatial coordinates of the revolute joint, the first ball joint, and the second ball joint based on the reference coordinate system, wherein the revolute joint is the connection point between the static platform and the driving arm, the first ball joint is the connection point between the driving arm and the driven arm, and the second ball joint is the connection point between the driven arm and the moving platform; determining the direction vector of the end effector space of the moving platform and the spatial coordinates of the end effector space of the moving platform based on the reference coordinate system and the center of mass of the moving platform; and establishing the forward and inverse kinematic relationships between the angle between the driving arm and the static platform and the spatial coordinates of the end effector space of the moving platform based on the reference coordinate system, the direction vector of the end effector space of the moving platform, and the spatial coordinates of the end effector space of the moving platform.
[0059] In this embodiment, as Figure 3 As shown, the parallel robot includes a static platform. Dynamic platform There are three drive arms, namely... , , Its length is There are three booms, namely... , , A reference coordinate system is constructed using the central plane of the static platform. The drive arm and the stationary platform are connected via three rotary joints. , , The connection is made between the moving boom and the driving boom via a first ball joint. , , The connection is made between the boom and the moving platform via a second ball joint. , , The connection allows the moving platform to execute actions and complete the corresponding movement task. The circumcircle radius of the stationary platform is... The circumcircle radius of the moving platform is In the reference coordinate system Shaft and rotary joint , , To the dynamic platform center The included angles of the connecting lines are respectively , , , extension line and drive arm The included angle is , extension line and drive arm The included angle is , extension line and drive arm The included angle is For ease of understanding, Figure 3 Chinese annotation , As an illustration.
[0060] In this embodiment, there are three rotary joints. , , In the reference coordinate system The spatial coordinates below are as follows:
[0061] .
[0062] First ball joint , , In the reference coordinate system The corresponding spatial coordinates are:
[0063] .
[0064] Dynamic platform The second ball joint under the reference , , The spatial coordinates are:
[0065]
[0066] by Based on the center of mass of the moving platform, let the direction vector of the end space of the moving platform be... , , Spatial coordinates of the end space of the moving platform The expression is:
[0067] .
[0068] In this embodiment, three driven arms , , After simplification, the following motion chains of the driven arm are obtained. The simplified driven arm motion chains have equal lengths and are spaced 60 degrees apart in direction. The expressions corresponding to the simplified driven arm motion chains are shown below:
[0069] .
[0070] Among them, regarding the length of the simplified follower arm kinematic chain The expression is:
[0071] .
[0072] In this embodiment, in the reference coordinate system middle, extension line and drive arm included angle The expression is:
[0073]
[0074] In the formula, , , Both represent algebra, and their corresponding expressions are shown below:
[0075]
[0076] Similarly, we can obtain and From the above formula, the spatial coordinates of the end-effector space of the moving platform with forward kinematics can be derived. Solve , , Inverse kinematics is through , , Solve Meanwhile, based on kinematics-driven parallel robot physical entities and parallel robot digital twin models, they can achieve simultaneous and consistent interaction at the same time and location.
[0077] Optionally, the construction of the digital twin tracking control model includes: establishing an ideal output torque model under ideal conditions based on the dynamic principles of the parallel robot. The ideal output torque model consists of a mass matrix, a centripetal force matrix, and a gravity vector. The inputs of the ideal output torque model are the ideal angle, ideal angular velocity, and ideal angular acceleration of the joints. Based on the ideal output torque model, friction torque and disturbance torque are introduced to construct an actual output torque model. The friction torque is modeled as consisting of viscous friction components, Coulomb friction components, and random ball joint errors. The error between the actual trajectory and the ideal trajectory caused by friction torque and disturbance torque is linearly represented by the Jacobian inverse matrix of the parallel robot under ideal conditions and the Jacobian matrix of the parallel robot under actual conditions to obtain a linear representation function. An error observation state equation is established based on the linear representation function. Based on the error observation state equation, the digital twin tracking error existing in the digital twin tracking control model is observed in real time and dynamically compensated.
[0078] In this embodiment, the ideal output torque model is:
[0079]
[0080] in, For the ideal angle of the joint, The ideal angular velocity of the joint, For the ideal angular acceleration of the joint, For ideal dynamic rotational torque, Represents the mass matrix, Represents the centripetal force matrix. This represents the gravity vector.
[0081] The actual output torque model that retains the error is:
[0082]
[0083] in, This is the actual output torque. This refers to the actual angle of the joint. The actual angular velocity of the joint. This is the actual angular acceleration of the joint. For frictional torque, This is the disturbance torque.
[0084] In this embodiment, the frictional torque of the parallel robot is constructed from viscous friction components, Coulomb friction components, and random ball joint errors. The expression is:
[0085]
[0086] in, The coefficient of viscous friction of the joint. The coefficient of friction is Coulomb. The ball joint error coefficient, Represents the step function. Represents the spatial normal distribution function. This represents the angular velocity error.
[0087] The frictional torque of all joints in a parallel robot can be transformed into a parameter error vector. It can reduce the error between the actual trajectory and the ideal trajectory caused by friction torque and disturbance torque. Linear representation, error The expression is:
[0088]
[0089] in, For the ideal parallel robot, the Jacobian inverse matrix is... For the Jacobian matrix of parallel robots in actual operation, To control tracking time.
[0090] The linear representation is transformed into the error observation state equation during the control tracking time, and the following definition is given. Position-state vector at time 1 , , for The actual position of the end space of the moving platform at any given moment. for The error coefficient to be identified at time t. Then the expression for the error observation state equation is:
[0091]
[0092] in, for The actual position of the end space of the moving platform at any given time. for The identification error coefficient at time step, This is process noise.
[0093] exist Friction torque at time for:
[0094]
[0095] in, Joint control errors affect friction torque, thus impacting the actual output torque. With ideal dynamic rotational torque The operation control remains consistent. The expression for the joint control error at time t is:
[0096]
[0097] in, for The frictional torque at time t is This represents the function to minimize when the disturbance torque... The larger the torque, the smaller the overall joint control error needs to be, thereby reducing the impact of friction torque on the digital twin tracking error. This ultimately yields the corrected output torque. for:
[0098]
[0099] in, This is the balance coefficient.
[0100] In this embodiment, to verify the reliability of the digital twin tracking control model, MATLAB software can be used to build the model and then evaluate it.
[0101] When evaluating the digital twin tracking control model, the key points of the ideal trajectory are first designed, as shown in Table 1, and a gantry trajectory with a running cycle of 1 second is set. The key points are connected, and the kinematic model drives the parallel robot to run, as shown in Table 1. Figure 4 The image shows the result of the gantry trajectory operation.
[0102] Table 1
[0103]
[0104] In this embodiment, the digital twin tracking control model is used as the result of optimizing the parallel robot's digital twin model. The synchronization rate between the end effector of the parallel robot's physical entity and the parallel robot's digital twin model is recorded before and after optimization. For example... Figure 5 The results show the virtual-real synchronization rate before and after optimization. Before optimization, the parallel robot digital twin model was mainly based on the kinematic model. Since the actual operation of the parallel robot was not taken into account, the final virtual-real synchronization rate reached 96%. By introducing the digital twin tracking and control model constructed in this application for optimization, the virtual-real synchronization rate between the moving platform of the parallel robot physical entity and the parallel robot digital twin model is higher. The virtual-real synchronization rate can reach 96% at the beginning of trajectory operation and eventually reaches 99% as the trajectory runs.
[0105] S2: The dynamic response butterfly algorithm is used to plan the trajectory of the parallel robot physical entity to obtain the time-optimal trajectory key points.
[0106] Optionally, a dynamic response butterfly algorithm is used to plan the trajectory of the parallel robot physical entity, including: initializing the butterfly population; evaluating the trajectory planning time and path length for each butterfly based on a preset time-optimal objective function and a preset trajectory-shortest objective function; classifying the butterflies into levels based on the evaluation results, determining the worst, second-best, and best butterflies, and assigning different search strategies to butterflies at different levels. The worst butterfly performs global exploration and is forced to move significantly towards the current global optimal solution; the best butterfly performs local exploration, conducting in-depth exploration at its current location; the second-best butterfly performs global or local exploration according to a preset random probability distribution; when the worst, second-best, and best butterflies reach their corresponding preset thresholds, the trajectory planning results for the worst, second-best, and best butterflies are output, obtaining the time-optimal trajectory key points; otherwise, the butterfly levels are reclassified, and the corresponding search strategies are executed.
[0107] In this embodiment, the butterfly algorithm is a swarm intelligence optimization algorithm inspired by the foraging behavior of butterflies in nature. It finds the optimal solution by simulating the olfactory perception and flight behavior of butterflies. To match the parallel robot motion of the current digital twin tracking control model, the original butterfly algorithm is improved by including adaptively updating the butterfly population, proposing a new butterfly penalty strategy, and a butterfly hierarchy partitioning method, forming a new dynamic response butterfly algorithm, such as... Figure 6 and Figure 7 The diagrams show the algorithm flow of the original butterfly algorithm and the dynamic response butterfly algorithm, respectively.
[0108] like Figure 6 The diagram shows the original butterfly algorithm flow. This flow involves randomly generating a population, determining the fragrance concentration in the environment, identifying the sensory morphological parameters and power index, and calculating the objective function. A random probability distribution is set; if the random probability distribution is less than the global flight probability... When the butterfly population chooses to explore globally, they will choose to explore locally; otherwise, they will choose to explore only locally. The value is typically a fixed value, such as 0.8. When the result reaches the threshold, the trajectory planning result is output; otherwise, the optimal butterfly is updated, and the objective function is calculated again until the optimal result is output.
[0109] In this embodiment, the optimal time and shortest path for parallel robot trajectory planning are used as the algorithm optimization criteria. The preset objective functions for optimal time and shortest path are as follows:
[0110]
[0111]
[0112] in, The objective function is the one that is optimal for the preset time. The objective function is to minimize the predefined trajectory. For the first The trajectory running time of each reference point For the total iteration time, For the first One reference point The length of the trajectory path at that time.
[0113] In this embodiment, as Figure 7 As shown, the number of randomly generated butterflies is initial population And determine the aroma concentration, the first The position of the butterfly is Perceptual form is The power index is .
[0114] Each butterfly needs to have its fitness value calculated for the current preset objective function, and the trajectory planning time and trajectory path length of the corresponding butterfly need to be evaluated.
[0115] The butterflies are hierarchically divided, and the initial population is randomly divided into the worst butterflies. Second-best butterfly The best butterfly .
[0116] Among them, the worst butterfly performs global flight exploration, number 1 Worst butterfly in the next iteration The update formula is:
[0117]
[0118] in, For the first The worst butterfly updated in the next iteration; A random number between 0 and 1; This is the current globally optimal solution; It follows the standard Cauchy distribution; This is the variation intensity coefficient, which decreases with the number of iterations; This represents the fitness value.
[0119] The optimal butterfly performs local flight exploration, the first The optimal butterfly in the next iteration The update formula is:
[0120]
[0121] in, For the first The optimal butterfly after the next iteration. To maximize fitness, This represents the average difference in fitness.
[0122] The suboptimal butterfly employs two strategies: global flight exploration and local flight exploration, using a pre-defined random probability distribution. The suboptimal butterfly in the next iteration The update formula is:
[0123]
[0124] In the formula, For the first The suboptimal butterfly is updated in the next iteration.
[0125] If the worst, second-best, and best butterflies meet the current preset threshold, the trajectory planning result, i.e., the location information of the key points of the trajectory, is output; otherwise, an adaptive butterfly population update is performed.
[0126] Nonlinear adaptive weights are introduced to dynamically adjust the flight search position. For the first... In the next iteration, the butterfly individual The update formula is:
[0127]
[0128] in, For maximum weight, For minimum weight, For average weight, This represents the maximum number of iterations.
[0129] Optionally, it also includes: randomly resetting the worst-performing butterfly's position to force it to increase its flight exploration efforts.
[0130] In this embodiment, to avoid the worst butterfly frequently getting trapped in local optima, a dynamic position reset is randomly applied to the worst butterfly individual, forcing it to increase its flight exploration efforts. The second update expression for the worst butterfly is:
[0131]
[0132] in, This is the worst butterfly after the second update. At that time, the worst-performing individual moves closer to the optimal position. The worst individual's position is updated to the new population center position. During the iteration process, the number of individuals in all butterfly populations increased with the overall iteration time. As the process progresses, the worst butterfly and the best butterfly are close in position, making it easier for the population to select the best individual. Once the iteration is complete, the location information of the key points of the trajectory is output.
[0133] In this embodiment, to verify the reliability of the dynamic response butterfly algorithm, the butterfly population size is set to 300, the maximum number of iterations is set to 100, and the morphological perception is set to... Power Index .
[0134] like Figure 8 The diagram shows a comparison of algorithm iterations. The fitness value of the original butterfly algorithm decreases slowly with the number of iterations. It converges at 72 iterations and finally converges to 26. In contrast, the dynamic response butterfly algorithm converges quickly, reaching convergence after the 38th iteration and finally converging to 22. This verifies the reliability and fast response of the improved algorithm in trajectory planning.
[0135] Statistical data from 30 runs show that the average time taken before and after optimization using the dynamic response butterfly algorithm is shown in Table 2.
[0136] Table 2
[0137]
[0138] S3: Perform trajectory smoothing processing based on the key points of the trajectory to obtain a smooth motion trajectory.
[0139] Optionally, an initial NURBS curve based on the trajectory key points is constructed; a dynamic weight adjustment mechanism is introduced, using the error between the actual trajectory and the ideal trajectory as the main indicator, to dynamically adjust the weight of each trajectory key point in the initial NURBS curve; non-uniform node vector optimization is implemented, the curvature change of the trajectory corresponding to each trajectory key point is analyzed, and the node density is adaptively increased in the section where the curvature change exceeds a preset threshold according to the analysis results, so as to obtain a smooth motion trajectory.
[0140] Optionally, the introduction of a dynamic weight adjustment mechanism includes: combining the error between the actual trajectory and the ideal trajectory with the curvature change as an adjustment signal, and scaling the weights of the trajectory key points of the initial NURBS curve in real time according to the adjustment signal.
[0141] Optionally, the implementation of non-uniform node vector optimization includes: calculating the normalized product of the trajectory chord length and curvature change in the interval where each trajectory key point is located, and proportionally inserting new nodes in the interval where the geometric change exceeds a preset change limit based on the product result, thereby forming a non-uniform distribution of trajectory key points.
[0142] In this embodiment, after calculating the optimal trajectory planning result using the dynamic response butterfly algorithm, the actual running trajectory is brought closer to the ideal running trajectory by using the parallel robot digital twin model. At the same time, in order to ensure the smooth and synchronous mapping between the parallel robot entity and the parallel robot digital twin model, a trajectory secondary smoothing method is introduced to suppress the vibration caused by factors such as motors and friction during the operation of the parallel robot and improve the virtual-real synchronization rate of the parallel robot digital twin.
[0143] In this embodiment, based on the trajectory secondary smoothing method of non-uniform rational B-splines (NURBS), a dynamic weight adjustment mechanism and non-uniform node vector optimization are introduced to achieve trajectory curvature smoothing and reduce the vibration frequency during operation.
[0144] The trajectory expression of the NURBS curve within a quadratic smoothing time. for:
[0145]
[0146] in, For addition functions, For the first Weights of each control point For the first Coordinates of control points for B-spline basis functions over time.
[0147] In this embodiment, a dynamic weight adjustment mechanism is introduced to adjust the error between the actual trajectory and the ideal trajectory. Using this as the primary indicator, the weight calculation formula for key points in the real-time trajectory is obtained. for:
[0148]
[0149] in, As the initial weights, Indicates time The points, for The first derivative, for The second derivative of .
[0150] In this embodiment, the non-uniform node vector optimization strategy of this application increases node density in regions with large curvature changes to ensure local smoothness of trajectory planning, while avoiding increased computational load due to node concentration. Figure 9 , Figure 10 The diagram shows the changes in curvature before and after non-uniform node vector optimization. It can be observed that the curvature change is significant over a period of time, specifically at trajectory bends. Parallel robots typically use circular arcs for smoothing, but relying solely on circular arcs can lead to severe motor losses and reduced control accuracy. Therefore, it is necessary to increase the number of nodes in areas with drastic curvature changes to gradually smooth the trajectory. In practical applications, a preset threshold is set based on the specific application scenario. When the rate of curvature change exceeds the preset threshold, it indicates a large curvature change, and the node density is increased to smooth the trajectory.
[0151] Before optimization, fixed nodes were used as key points for the running trajectory. During the process from the start point to the end point, circular smoothing was performed when the fixed nodes were reached. This method may increase the vibration frequency of the parallel robot's physical entity when the parallel robot moves at high speeds. To reduce the vibration frequency of the parallel robot's physical entity and decrease the occurrence of curvature abrupt changes, multiple smoothing processes were performed at nodes where the curvature change exceeded a preset threshold.
[0152] In this embodiment, in regions where the curvature change exceeds a preset threshold, the node density is increased, and the node vector changes as follows:
[0153]
[0154] in, For the updated node vector, The node vector before the update; Adjusting the step size for nodes requires adaptive adjustment based on node density.
[0155] The formula for adjusting the node step size is:
[0156]
[0157] in, The running time corresponding to the current trajectory is The trajectory of time, The running time corresponding to the current trajectory is The trajectory of time, The running time corresponding to the current trajectory is Curvature at time; The running time corresponding to the current trajectory is Curvature at time; The running time corresponding to the next running trajectory is The trajectory of time; The running time corresponding to the next running trajectory is The trajectory of time; The running time corresponding to the next running trajectory is Curvature at time; The running time corresponding to the next running trajectory is The curvature at that time.
[0158] In this embodiment, a secondary trajectory smoothing experiment was conducted based on the original dynamic response butterfly algorithm. The key points of the executed trajectory are shown in Table 1 above. Ten runs of the gate-shaped trajectory were performed, and the running time and the number of curvature abrupt changes before and after optimization were statistically analyzed. Table 3 below shows the comparison of running time before and after optimization. The execution time of the trajectory using the dynamic response butterfly algorithm was 0.62s. Due to the need to smooth the curve to reduce vibration, the number of controlled trajectory key points increased, which increased the average running time. After optimization using the original NURBS curve, the average running time increased by 0.32s. After optimization using the improved method of this application, the average running time increased by 0.15s. The impact on the periodic operation of the gate-shaped trajectory was small, verifying the reliability of the improved method.
[0159] Table 3
[0160]
[0161] Table 4 below shows the number of curvature abrupt changes before and after optimization. The original NURBS curve had 2 fewer curvature abrupt changes after optimization, while the improved method of this application had 4 fewer curvature abrupt changes after optimization.
[0162] Table 4
[0163]
[0164] S4: Input the smooth motion trajectory into the digital twin model of the parallel robot, and drive the physical entity of the parallel robot to execute the smooth motion trajectory by the kinematic model. At the same time, the smooth motion trajectory is tracked and compensated in real time by the digital twin tracking and control model.
[0165] This invention constructs a digital twin model of a parallel robot, incorporating a kinematic model and a digital twin tracking and control model. This enables precise modeling and real-time compensation of factors such as friction and disturbance experienced by the physical entity of the parallel robot during actual operation, thereby directly improving the tracking accuracy of the calculated smooth motion trajectory. Secondly, an improved dynamic response butterfly algorithm is used for trajectory planning. Through hierarchical partitioning, adaptive weights, and a dynamic reset mechanism, convergence is accelerated while ensuring global search capability, achieving time-optimal trajectory planning. Finally, a NURBS curve-based trajectory secondary smoothing method, combined with dynamic weight adjustment and non-uniform node optimization, effectively suppresses vibration during operation, ultimately achieving a synergistic optimization effect of high-precision trajectory tracking, high virtual-real synchronization rate, time-optimal operation, and low-vibration operation.
[0166] like Figure 11 As shown, this embodiment of the invention provides a parallel robot trajectory planning system based on digital twin and dynamic response butterfly algorithm, which can execute the above-mentioned parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm, including: a twin layer and a functional layer;
[0167] The twin layer includes the physical entity of the parallel robot and the digital twin model of the parallel robot, which consists of a kinematic model and a digital twin tracking and control model.
[0168] The functional layer includes a dynamic response butterfly algorithm trajectory planning module for trajectory planning and a trajectory secondary smoothing module for trajectory optimization.
[0169] The parallel robot digital twin model in the twin layer interacts with the parallel robot physical entity in a virtual-real manner; a functional layer is built on the parallel robot digital twin model, which is used to optimize the trajectory. The optimized trajectory is executed through the parallel robot digital twin model, and the execution result is fed back to the parallel robot physical entity through the functional layer to drive the parallel robot physical entity to move.
[0170] In this embodiment, the traditional parallel robot digital twin framework is driven by a kinematic model, which then interacts with the physical entity of the parallel robot. This results in low interaction efficiency, and the digital twin model does not provide trajectory feedback to the physical entity during trajectory execution. The parallel robot trajectory planning system constructed in this application, consisting of a twin layer and a functional layer, features a twin layer driven by a kinematic model and a digital twin tracking and control model working in tandem. The functional layer, built upon the parallel robot's digital twin model, includes a dynamic response butterfly algorithm trajectory planning module and a trajectory secondary smoothing module. The parallel robot's digital twin model executes the optimized trajectory, and the execution result is fed back to the physical entity of the parallel robot through the functional layer, driving the physical entity's actions and achieving high-quality, high-precision virtual-real interaction.
[0171] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A trajectory planning method for parallel robots based on digital twins and dynamic response butterfly algorithm, characterized in that, The method includes: Construct a digital twin model of a parallel robot, consisting of a kinematic model and a digital twin tracking control model; The dynamic response butterfly algorithm is used to plan the trajectory of the physical entity of the parallel robot and obtain the time-optimal trajectory key points. The dynamic response butterfly algorithm is used for trajectory planning of the physical entities of parallel robots, including: Initialize the butterfly population, and evaluate the trajectory planning time and path length for each butterfly based on the preset time-optimal objective function and the preset trajectory-shortest objective function; Based on the evaluation results, butterflies are classified into three levels: worst, second-best, and best. Different search strategies are assigned to butterflies of different levels. The worst butterfly performs global exploration and is forced to move towards the current global optimum. The best butterfly performs local exploration and conducts in-depth exploration at its current location. The second-best butterfly performs global or local exploration according to a preset random probability distribution. When the worst, second-best, and best butterflies reach their respective preset thresholds, the trajectory planning results corresponding to the worst, second-best, and best butterflies are output to obtain the time-optimal trajectory key points; otherwise, the butterfly hierarchy is re-divided and the corresponding search strategy is executed. Also includes: The worst-performing butterfly is randomly reset using dynamic positioning, forcing it to increase its flight exploration efforts. Based on the key points of the trajectory, a smooth motion trajectory is obtained by performing trajectory smoothing processing. The smooth motion trajectory is input into the digital twin model of the parallel robot, and the kinematic model drives the physical entity of the parallel robot to execute the smooth motion trajectory. At the same time, the digital twin tracking and control model performs real-time tracking and compensation of the smooth motion trajectory.
2. The parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to claim 1, characterized in that, The construction of the kinematic model includes: Define the structure of the physical entity of the parallel robot, the structure including the static platform, the moving platform, the three driving arms and the three driven arms of the parallel robot; A reference coordinate system is constructed with the center plane of the static platform as the horizontal and vertical coordinate planes and the center of the static platform as the origin. Based on the reference coordinate system, the spatial coordinates of the revolute joint, the first ball joint, and the second ball joint are determined. The revolute joint is the connection point between the static platform and the drive arm. The first ball joint is the connection point between the drive arm and the driven arm. The second ball joint is the connection point between the driven arm and the moving platform. Based on the reference coordinate system and the centroid of the moving platform, the direction vector of the end space of the moving platform and the spatial coordinates of the end space of the moving platform are determined. Based on the reference coordinate system, the direction vector of the end space of the moving platform, and the spatial coordinates of the end space of the moving platform, the forward and inverse kinematic relationships between the angle between the driving arm and the stationary platform and the spatial coordinates of the end space of the moving platform are established.
3. The parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to claim 1, characterized in that, The construction of the digital twin tracking and control model includes: Based on the dynamic principle of the parallel robot, an ideal output torque model under ideal conditions is established. The ideal output torque model consists of a mass matrix, a centripetal force matrix, and a gravity vector. The inputs of the ideal output torque model are the ideal angle, ideal angular velocity, and ideal angular acceleration of the joint. Based on the ideal output torque model, friction torque and disturbance torque are introduced to construct the actual output torque model; the friction torque is modeled as consisting of viscous friction component, Coulomb friction component and random ball joint error; The error between the actual trajectory and the ideal trajectory caused by friction torque and disturbance torque is linearly represented by the Jacobian inverse matrix of the parallel robot under the ideal state and the Jacobian matrix of the parallel robot under the actual state, and the linear representation function is obtained. An error observation state equation is established based on the linear representation function, and the digital twin tracking error in the digital twin tracking control model is observed and dynamically compensated in real time based on the error observation state equation.
4. The parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to claim 1, characterized in that, Based on the key points of the trajectory, trajectory smoothing processing is performed to obtain a smooth motion trajectory, including: Construct an initial NURBS curve based on the key points of the trajectory; A dynamic weight adjustment mechanism is introduced, using the error between the actual trajectory and the ideal trajectory as the main indicator, to dynamically adjust the weights of each key point in the initial NURBS curve. Non-uniform node vector optimization is implemented to analyze the curvature change of the trajectory corresponding to each key point. Based on the analysis results, the node density is adaptively increased in the section where the curvature change exceeds the preset threshold to obtain a smooth motion trajectory.
5. The parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to claim 4, characterized in that, The introduced dynamic weight adjustment mechanism includes: The error between the actual trajectory and the ideal trajectory is combined with the curvature change to form an adjustment signal, and the weights of the trajectory key points of the initial NURBS curve are scaled in real time according to the adjustment signal.
6. The parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm according to claim 4, characterized in that, The implementation of non-uniform node vector optimization includes: Calculate the normalized product of the trajectory chord length and curvature change in the interval where each trajectory key point is located. Based on the product result, insert new nodes proportionally in the interval where the geometric change exceeds the preset change limit to form a non-uniform distribution of trajectory key points.
7. A parallel robot trajectory planning system based on digital twin and dynamic response butterfly algorithm, characterized in that, A parallel robot trajectory planning method based on digital twin and dynamic response butterfly algorithm as described in any one of claims 1-6, comprising: a twin layer and a functional layer; The twin layer includes the physical entity of the parallel robot and the digital twin model of the parallel robot, which consists of a kinematic model and a digital twin tracking and control model. The functional layer includes a dynamic response butterfly algorithm trajectory planning module for trajectory planning and a trajectory secondary smoothing module for trajectory optimization. The parallel robot digital twin model in the twin layer interacts with the parallel robot physical entity in a virtual-real manner; a functional layer is built on the parallel robot digital twin model, which is used to optimize the trajectory. The optimized trajectory is executed through the parallel robot digital twin model, and the execution result is fed back to the parallel robot physical entity through the functional layer to drive the parallel robot physical entity to move.
Citation Information
Patent Citations
Parallel robot digital twin trajectory error dynamic compensation method
CN117021118A
Construction method of seven-degree-of-freedom mechanical arm digital twinborn body based on data driving
CN117798935A