Excitation trajectory generation method and device for mechanical arm dynamics parameter identification

By using Fourier series to construct the excitation trajectory equation and collision constraint function in the identification of the dynamic parameters of the robotic arm, a complete trajectory with continuous velocity and acceleration is generated, which solves the problems of low excitation trajectory quality and collision in the existing technology and realizes high-precision and executable dynamic parameter identification.

CN123040091APending Publication Date: 2026-11-06ZHONGKE TIMES (SHENZHEN) COMPUTER SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611545445.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-08
Publication Date
2026-11-06

Smart Images

  • Figure CN123040091A_ABST
    Figure CN123040091A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of robot control, and provides a method and device for generating an excitation trajectory for mechanical arm dynamics parameter identification, the method comprising: obtaining a dynamics parameter identification model of a mechanical arm, and constructing an excitation trajectory equation using a Fourier series; setting a plurality of spherical obstacles at key links, calculating real-time spherical center positions of the spherical obstacles, and constructing a safety constraint function containing self-collision constraints and environmental collision constraints according to the real-time spherical center positions and a set radius; taking minimization of a condition number of a dynamics regression matrix corresponding to the excitation trajectory as an optimization objective, taking kinematic constraints of each joint of the mechanical arm and the safety constraint function as constraint conditions, constructing a constraint optimization problem, and numerically solving optimization variables to obtain optimization parameters of a main excitation trajectory; and splicing a front transition trajectory segment and a rear transition trajectory segment at a starting end and a terminal end of the main excitation trajectory respectively to obtain a complete excitation trajectory which is continuous in speed and acceleration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of robot control technology, and in particular to an excitation trajectory generation method and apparatus, electronic device and computer-readable storage medium for identifying dynamic parameters of a robotic arm. Background Technology

[0002] Identification of the dynamic parameters of a robotic arm is a crucial method for obtaining inertial parameters such as the mass of each link, the position of the center of mass, and the inertia matrix, as well as the frictional parameters of each joint. It forms the foundation for advanced applications such as high-precision force control, feedforward control, and dynamic simulation. One of the core steps in dynamic parameter identification is designing the excitation trajectory, the quality of which directly determines the accuracy of the dynamic parameter identification. A key indicator for evaluating the quality of the excitation trajectory is the condition number of its corresponding dynamic regression matrix.

[0003] In existing technologies, excitation trajectories are typically parameterized using Fourier series, with the condition number of the observation matrix reduced by optimizing the Fourier coefficients. However, these existing schemes usually fix the fundamental frequency of the Fourier series to a preset constant, using only the Fourier coefficients as optimization variables. This results in a limited feasible solution space, making it difficult to obtain excitation trajectories with a sufficiently low condition number. Furthermore, existing schemes often force the velocities and accelerations of the starting and ending points of the trajectory to be zero during trajectory optimization. This forced constraint further restricts the search space of optimization variables, hindering the reduction of the condition number of the observation matrix. On the other hand, existing schemes do not adequately consider the self-collision problem of the robotic arm and collisions with environmental objects when generating excitation trajectories, making the optimized trajectories prone to collisions when executed on a real robotic arm, lacking physical feasibility. Moreover, existing schemes typically do not employ systematic numerical methods when determining the minimum identifiable parameter set, resulting in redundant parameters in the dynamic regression matrix not being effectively eliminated, increasing the optimization solution scale.

[0004] In summary, how to accurately generate an excitation trajectory with low condition number, no collisions, and efficient parameter representation is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] In view of this, the present disclosure provides an excitation trajectory generation method, apparatus, electronic device, and computer-readable storage medium for identifying the dynamic parameters of a robotic arm, in order to solve the technical problems in the prior art where the low quality of the excitation trajectory leads to insufficient accuracy in identifying the dynamic parameters, and the optimized trajectory lacks physical feasibility.

[0006] A first aspect of this disclosure provides a method for generating excitation trajectories for identifying the dynamic parameters of a robotic arm, comprising: acquiring a dynamic parameter identification model of the robotic arm; constructing excitation trajectory equations for each joint using Fourier series, wherein the excitation trajectory equations include constant terms, sine coefficients, cosine coefficients, and a fundamental frequency, and using the fundamental frequency, sine coefficients, and cosine coefficients together as optimization variables, with the constant terms being fixed parameters; setting several spherical obstacles at key links based on the URDF geometric model of the robotic arm; calculating the real-time center position of each spherical obstacle in Cartesian space using the forward kinematics of the robotic arm based on the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and a set radius; and constructing a safety constraint function including self-collision constraints and environmental collision constraints based on the real-time center position of each spherical obstacle and a set radius; and generating an excitation trajectory for identifying the dynamic parameters of a robotic arm, comprising: acquiring a dynamic parameter identification model of the robotic arm; constructing an excitation trajectory equation for each joint using Fourier series, wherein the excitation trajectory equation includes constant terms, sine coefficients, cosine coefficients, and a fundamental frequency, and using the fundamental frequency, sine coefficients, and cosine coefficients as optimization variables, and constructing a safety constraint function including self-collision constraints and environmental collision constraints based on the real-time center position of each spherical obstacle and a set radius; .... The optimization objective is to minimize the condition number of the dynamic regression matrix corresponding to the excitation trajectory. A constrained optimization problem is constructed using the kinematic constraints and safety constraint functions of each joint of the robotic arm as constraints. The optimization variables are then numerically solved to obtain the optimized parameters of the main excitation trajectory. During the solution process, the initial and final endpoint states of the main excitation trajectory are not subject to zero-velocity or zero-acceleration constraints. After obtaining the optimized parameters of the main excitation trajectory, a front transition trajectory segment and a rear transition trajectory segment are spliced ​​at the initial and final endpoints of the main excitation trajectory, respectively, to obtain a complete excitation trajectory with continuous velocity and acceleration. The front transition trajectory segment is used to move the robotic arm from a preset initial stationary pose to the initial state of the main excitation trajectory, and the rear transition trajectory segment is used to move the robotic arm from the final state of the main excitation trajectory to a preset final stationary pose.

[0007] A second aspect of this disclosure provides an excitation trajectory generation device for identifying the dynamic parameters of a robotic arm, comprising: an equation construction module for acquiring a dynamic parameter identification model of the robotic arm, constructing excitation trajectory equations for each joint using Fourier series, the excitation trajectory equations including constant terms, sine coefficients, cosine coefficients, and a fundamental frequency, and using the fundamental frequency, sine coefficients, and cosine coefficients as optimization variables, with the constant terms being fixed parameters; a position calculation module for setting several spherical obstacles at key links based on the URDF geometric model of the robotic arm, calculating the real-time center position of each spherical obstacle in Cartesian space using the forward kinematics of the robotic arm based on the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and the set radius, and constructing a safety constraint function including self-collision constraints and environmental collision constraints based on the real-time center position of each spherical obstacle and the set radius; variables The solution module is used to construct a constrained optimization problem with the objective of minimizing the condition number of the dynamic regression matrix corresponding to the excitation trajectory, and with the kinematic constraints and safety constraint functions of each joint of the robotic arm as constraints. It then numerically solves the optimization variables to obtain the optimization parameters of the main excitation trajectory. During the solution of the constrained optimization problem, the initial and final endpoint states of the main excitation trajectory are not subject to zero-velocity and zero-acceleration constraints. The trajectory acquisition module, after acquiring the optimization parameters of the main excitation trajectory, splices a front transition trajectory segment and a rear transition trajectory segment at the initial and final ends of the main excitation trajectory, respectively, to obtain a complete excitation trajectory with continuous velocity and acceleration. The front transition trajectory segment is used to move the robotic arm from a preset initial stationary pose to the initial state of the main excitation trajectory, and the rear transition trajectory segment is used to move the robotic arm from the final state of the main excitation trajectory to a preset final stationary pose.

[0008] A third aspect of this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.

[0009] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0010] The beneficial effects of this disclosure compared to the prior art are as follows: The technical solution of this disclosure expands the optimization search space by using the fundamental frequency and Fourier coefficients of the Fourier series as optimization variables, and minimizes the condition number of the dynamic regression matrix as the optimization objective. It allows the endpoints of the main trajectory to be free from zero-velocity and zero-acceleration constraints to release optimization degrees of freedom, thereby reducing the condition number of the observation matrix and suppressing the interference of measurement noise on parameter identification. By constructing a spherical obstacle safety constraint function based on the URDF geometric model to quantify collision avoidance conditions, it ensures that the optimized trajectory is free from self-collision and collisions with the environment, thus possessing physical feasibility. By splicing the optimized main trajectory into three segments to obtain a complete trajectory with continuous velocity and acceleration, it ensures that the velocity and acceleration of the entire trajectory are continuous and impact-free, thereby protecting the joint motor. In summary, this disclosure significantly improves the accuracy of dynamic parameter identification, ensures the trajectory is safe and executable on a real robotic arm, and has high optimization efficiency. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic flowchart of the excitation trajectory generation method for identifying the dynamic parameters of a robotic arm provided in this embodiment of the disclosure; Figure 2 This is a schematic diagram of a spherical obstacle according to an embodiment of this disclosure; Figure 3 This is a schematic diagram of an excitation trajectory according to an embodiment of this disclosure; Figure 4 This is a schematic diagram of another excitation trajectory according to an embodiment of this disclosure; Figure 5 This is a schematic diagram of the model and excitation trajectory according to an embodiment of this disclosure; Figure 6 This is a schematic diagram of the excitation trajectory generation device for identifying the dynamic parameters of a robotic arm provided in an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.

[0014] In related technologies, there are two main methods for obtaining the link inertia parameters of a robot: CAD model export and dynamic parameter identification. However, the link mass exported from the CAD model is often inaccurate, while dynamic parameter identification can deduce more accurate parameter values ​​through reverse engineering using actual operational data. The core step of dynamic parameter identification is to design an excitation trajectory—that is, a sequence of positions of each joint over time—and execute this trajectory on a real robotic arm. By collecting joint position, velocity, and torque data, parameter estimation algorithms such as the least squares method are used to reverse-calculate the inertia parameters and frictional parameters to be identified.

[0015] The generation of excitation trajectories must meet two core requirements: First, the trajectory must be within the kinematic limits of the robotic arm's position, velocity, and acceleration, and collisions with the robotic arm's links and environmental objects must be avoided to ensure the trajectory's physical feasibility on a real robotic arm. Second, the condition number of the dynamic regression matrix calculated from the excitation trajectory data should be as small as possible. This is because a smaller condition number results in a lower degree of "illness" in the regression matrix, a smaller amplification effect of measurement noise on the identification results, and more accurate identification of the parameters. Therefore, the core objective of excitation trajectory generation is to minimize the condition number of the regression matrix while satisfying physical constraints.

[0016] Furthermore, not all inertial parameters of a robotic arm can be independently identified. Due to coupling between the motions of various links, the effects of some standard inertial parameters on joint torques are superimposed, and what can actually be identified are the combined parameters. For example, when a cylinder accelerates around its axis, only specific combinations of inertial parameters affect the motor torque; individual parameters cannot be identified. Therefore, it is necessary to use systematic numerical methods to determine which parameters are identifiable and their combinations, in order to reduce the dimensionality of the parameters to be identified and decrease the scale of the optimization solution.

[0017] In existing technologies, excitation trajectories are typically parameterized using Fourier series. However, this approach suffers from several drawbacks: First, the fundamental frequency is usually fixed as a preset constant, with only Fourier coefficients used as optimization variables, severely limiting the feasible solution space. For example, for a six-DOF collaborative robot, using a fixed fundamental frequency optimization method often results in the condition number of the observation matrix being difficult to reduce below 100, leading to significant interference from measurement noise and severely impacting the accuracy of dynamic parameter identification. Second, existing solutions do not adequately consider collision issues when generating excitation trajectories. Since excitation trajectories require large-scale acceleration within joint limits, neglecting collision constraints can easily lead to self-link collisions or collisions with environmental objects such as mounting platforms when executed on a real robotic arm, rendering the trajectory impractical. Furthermore, existing solutions typically do not employ systematic numerical methods when determining the minimum identifiable parameter set, resulting in redundant parameters in the dynamic regression matrix not being effectively eliminated, increasing the optimization solution scale and reducing computational efficiency.

[0018] In view of this, embodiments of the present disclosure provide an excitation trajectory generation method, apparatus, electronic device, and computer-readable storage medium for identifying the dynamic parameters of a robotic arm.

[0019] The excitation trajectory generation scheme for identifying the dynamic parameters of a robotic arm according to embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings.

[0020] Figure 1 This is a flowchart illustrating an excitation trajectory generation method for identifying the dynamic parameters of a robotic arm, provided in an embodiment of this disclosure. Figure 1 As shown, the excitation trajectory generation method for identifying the dynamic parameters of a robotic arm according to embodiments of this disclosure includes: Step S101: Obtain the dynamic parameter identification model of the robotic arm, and construct the excitation trajectory equation of each joint using Fourier series. The excitation trajectory equation includes constant terms, sine coefficients, cosine coefficients and fundamental frequency. The fundamental frequency, sine coefficients and cosine coefficients are used as optimization variables, and the constant terms are fixed parameters.

[0021] Step S102: Based on the URDF (Unified Robotics Description Format) geometric model of the robotic arm, several spherical obstacles are set at the key links. According to the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and the set radius, the real-time center position of each spherical obstacle in Cartesian space is calculated using the forward kinematics of the robotic arm. Based on the real-time center position of each spherical obstacle and the set radius, a safety constraint function containing self-collision constraints and environmental collision constraints is constructed.

[0022] Step S103: With minimizing the condition number of the dynamic regression matrix corresponding to the excitation trajectory as the optimization objective, and using the kinematic constraints and safety constraint functions of each joint of the robotic arm as constraints, a constrained optimization problem is constructed, and the optimization variables are numerically solved to obtain the optimized parameters of the main excitation trajectory. Specifically, during the solution process, the initial and final endpoint states of the main excitation trajectory are not subject to zero-velocity or zero-acceleration constraints. Instead, the initial and final endpoint velocities and accelerations of the main excitation trajectory are not subject to zero-constraints; instead, their positions, velocities, and accelerations are allowed to take arbitrary values ​​within their respective kinematic limits. By treating the endpoint states as free variables, the feasible region of the constrained optimization problem can be expanded, allowing the optimization algorithm to search the solution space more flexibly, thus making it easier to obtain excitation trajectories with lower condition numbers and ultimately improving the accuracy of dynamic parameter identification.

[0023] Specifically, the kinematic constraints of each joint of the robotic arm include position constraints, maximum velocity constraints, and maximum acceleration constraints, which are used to constrain the position range, maximum velocity, and maximum acceleration of each joint on the excitation trajectory within limits.

[0024] Step S104: After obtaining the optimized parameters of the main excitation trajectory, a pre-transition trajectory segment is spliced ​​at the starting end of the main excitation trajectory, and a post-transition trajectory segment is spliced ​​at the ending end to obtain a complete excitation trajectory with continuous velocity and acceleration. The pre-transition trajectory segment is used to move the robotic arm from a preset starting stationary pose (the current stationary position) to the starting endpoint state of the main excitation trajectory. This starting endpoint state includes the starting position, starting velocity, and starting acceleration. The post-transition trajectory segment is used to move the robotic arm from the ending endpoint state of the main excitation trajectory, which includes the ending position, ending velocity, and ending acceleration, to a preset ending stationary pose. Through this three-segment splicing, the position, velocity, and acceleration of the entire motion process remain continuous, avoiding joint impact forces caused by abrupt changes in endpoint states and ensuring the smooth executability of the trajectory on a real robotic arm.

[0025] Specifically, step S101 uses Fourier series to parameterize the trajectory and creatively uses both the fundamental frequency and Fourier coefficients as optimization variables, breaking away from the traditional approach of fixing the fundamental frequency. Step S102 constructs a spherical obstacle collision constraint model based on the URDF geometric model, calculates the center position of the sphere in real time through forward kinematics, and constructs a safety constraint function, transforming the collision avoidance problem into a quantifiable distance constraint. Step S103 uses reducing the condition number of the dynamic regression matrix as the optimization objective, constructs a constraint optimization problem with kinematic constraints and safety constraints as constraints, and allows the endpoints of the main trajectory to be free from zero velocity and zero acceleration constraints, releasing optimization degrees of freedom. Step S104 achieves continuous velocity and acceleration of the entire trajectory through three-segment splicing, ensuring engineering feasibility.

[0026] By incorporating the fundamental frequency into the optimization variables and relaxing the endpoint constraints, the feasible solution space of the constrained optimization problem can be expanded, significantly reducing the condition number of the observation matrix. For example, the condition number of the observation matrix of a six-DOF collaborative robot can be reduced to below 20. Through the spherical obstacle safety constraint function, it can be ensured that the optimized trajectory is free from self-collision and collision with the environment, possessing the feasibility of a real robotic arm. Using spherical obstacles simplifies distance calculation and reduces optimization solution time. Through three-segment splicing, continuous velocity and acceleration without impact can be guaranteed, protecting the joint motors and improving trajectory quality and physical feasibility.

[0027] In step S101, the equations for the excitation trajectory of each joint are constructed using Fourier series, and the resulting equations are as follows: The equations obtained by constructing the excitation trajectory equations of each joint using Fourier series are as follows: (1) (1) Where j is the joint number to be optimized. The fundamental frequency of the Fourier series. Where N is a multiple of the fundamental frequency, and N is the order of the Fourier series. These represent the constant term, ≠ sine term coefficient, and cosine term coefficient of the Fourier coefficients, respectively, where N is a positive integer and the multiples of the fundamental frequency are odd numbers. Generally, N=5, i.e., a 5-order series, so each joint has 2N+1=11 optimization parameters. The values ​​can be [1, 3, 5, 7, 9]. The optimization variables include the sine and cosine coefficients of the Fourier coefficients for each joint, as well as the fundamental frequency. The constant term of the Fourier coefficients, the order of the Fourier series, and the multiples of the fundamental frequency are fixed parameters. The equations obtained by constructing the excitation trajectory equations for each joint using the Fourier series can describe the trajectory to be optimized for each joint. Adding the fundamental frequency to the optimization variables can expand the optimization search space, which helps to reduce the condition number of the observation matrix, thereby improving the accuracy of dynamic parameter identification.

[0028] Fourier series, through the superposition of constant terms and sine and cosine terms, can generate smooth periodic motion, making it suitable as the excitation trajectory for robotic arm joints. This scheme transforms the abstract algorithm into a concrete mathematical form, providing a clear computational basis for engineering implementation. Even-order harmonics are prone to coupling with the Coulomb friction component in the joint friction torque, leading to ill-conditioned regression matrices and increased deviation in identification results. Limiting the fundamental frequency to only odd-numbered multiples can eliminate the interference of even-order harmonics on the accuracy of dynamic parameter identification, thus improving the identification accuracy.

[0029] In step S102, a safety constraint function containing self-collision constraints and environmental collision constraints is constructed based on the real-time center position of each spherical obstacle and the set radius. This function includes: a preset collision pair matrix, where each row of the collision pair matrix records the numbers of two spherical obstacles. During the optimization iteration process, only the spheres corresponding to the number pairs recorded in the collision pair matrix are subject to center distance constraints; and a preset platform safety number group, where, for the spherical obstacles in the platform safety number group, only their vertical coordinate components in the world coordinate system are constrained to be greater than the radius value of the spherical obstacle during the optimization iteration process. The remaining spherical obstacles are not subject to vertical constraints related to the installation platform.

[0030] Specifically, the collision pair matrix predefines the pairing relationships of the spheres to be detected in sparse matrix form. During optimization iteration, only the distances of these pairs are calculated, rather than calculating the distances for all pairs of spheres. The platform safety number group marks specific spheres that need to be detected to collide with the platform, such as spheres near the end, and only these spheres are subject to Z-axis constraints.

[0031] The sparse collision detection strategy provided by this scheme significantly reduces the number of calculations of constraint functions, reduces the scale of constraints in constraint optimization problems, improves the solution speed, and avoids the problem of solver convergence difficulties or excessive computation time caused by too many constraints.

[0032] In step S102, a spherical obstacle model of the robotic arm can be interactively built using visualization technologies such as MATLAB. The parameters of the spherical obstacle model include the joint coordinate system of each ball, the radius of the ball, and the three-dimensional coordinates relative to the joint coordinate system. The position of the ball in the three-dimensional space can be calculated through the forward kinematics of the robotic arm. The distance between the balls is calculated by sampling points on the excitation trajectory. The distance between any two balls in the constraint obstacle index set is greater than 0 as a constraint condition for the constraint optimization problem.

[0033] The safety constraint function in step S102 specifically includes self-collision constraints and environmental collision constraints. The self-collision constraints include: pre-defining pairs of spherical obstacles that are prone to collision, and constraining the Euclidean distance between the centers of the two spherical obstacles in any pair to be greater than the sum of their radii; the environmental collision constraints include: for specific spherical obstacles at the end of the robotic arm or near the installation platform, constraining the vertical coordinate component of the obstacle in the world coordinate system to be greater than the radius of the obstacle, so as to avoid interference with the installation platform.

[0034] Specifically, self-collision constraints transform the collision risk between the links of the robotic arm into sphere center distance constraints through a preset collision pair matrix; as long as the sphere center distance is greater than the sum of the radii, there is no collision. Environmental collision constraints ensure that the robotic arm always moves above the mounting platform by constraining the Z-axis component of a specific sphere in the world coordinate system to be greater than its radius.

[0035] This scheme transforms the complex collision detection problem of robotic arms into a simple calculation of sphere distance and comparison of coordinate components, which significantly reduces the computational complexity of constraint functions during optimization and improves the efficiency of optimization. By pre-setting the collision pair matrix for sparsification, only sphere pairs that may collide are calculated, avoiding redundancy in full calculation.

[0036] To avoid self-collision of the robotic arm, the technical solution of this disclosure constructs spherical obstacles on each component of the robotic arm and establishes a set of collision detection pairs, that is, filters out spherical pairs that may collide during movement; the distance between the centers of the two spherical enclosures in the collision pair is constrained to be greater than the sum of the radii of the two spheres. Figure 2 As shown, a total of 10 spherical obstacles, numbered 1 to 10, are constructed and set on the key components of the robotic arm and the mounting platform.

[0037] In such Figure 2 In the scenario shown, to avoid self-collision of the robotic arm during movement, a collision pair matrix `collision.pair` is constructed. This matrix is ​​11 rows and 2 columns, with each row specifying a pair of sphere numbers that need to be collided with, specifically: `collision.pair = [1, 9; 1, 10; 2, 9; 2, 10; 3, 9; 3, 10; 4, 9; 4, 10; 5, 9; 5, 10; 7, 10;]`. For each of the above collision pairs, the spatial distance between the two spheres is constrained to be greater than the sum of the radii of the two spheres, thereby ensuring that no self-collisions occur between the components of the robotic arm.

[0038] In addition, to avoid collisions between the robotic arm and the mounting platform, a platform collision set `collision.over_desk=[5, 8, 9, 10]` is constructed. This set indicates the numbers of the spheres whose collision risk with the platform needs to be detected. For each sphere in the set, the z-coordinate component of its center is constrained to be greater than the radius of the sphere, thereby ensuring that the robotic arm is positioned above the mounting platform and avoiding interference or collision with the platform.

[0039] In step S103, the optimization objective is to minimize the condition number of the dynamic regression matrix corresponding to the excitation trajectory. This includes: establishing a complete regression matrix of the inverse dynamics of the robotic arm with respect to the inertial parameters based on the Lagrange method; performing QR matrix decomposition with column permutation on the complete regression matrix; determining the numerical rank of the complete regression matrix based on the diagonal elements of the upper triangular matrix obtained by decomposition; selecting linearly independent column vectors; constructing a dimension-reduced observation matrix using the selected linearly independent column vectors; using the ratio of the maximum singular value to the minimum singular value of the observation matrix as the condition number; and using this condition number as the single objective function of the constrained optimization problem.

[0040] Specifically, the complete regression matrix is ​​the complete dynamical complete regression matrix. It is established through Lagrange rigid body dynamics and symbolic derivation techniques. Essentially, it applies nonlinear dynamic equations... Linearization is used, where each column corresponds to an inertial parameter to be identified, such as mass, center of mass position, and moment of inertia. However, due to the coupling between parameters, the column vectors of this matrix are linearly dependent and cannot be solved directly. Therefore, we can... Perform QR matrix decomposition with column permutations, i.e. P = QR, where P is a column permutation matrix used to rearrange the order of matrix columns to improve numerical stability, Q is an orthogonal matrix, and R is an upper triangular matrix. The absolute values ​​of the diagonal elements of R reflect the linear independence of the corresponding column vectors.

[0041] The column vector parameters with identifiable parameters are obtained through QR matrix factorization. Combinatorial relation matrix Sum of column permutation matrices Then you can get ,in, , .in, It is a complete regression matrix. These are the torques of each joint, and π is the robot's original inertial parameter vector. It is the minimum identifiable parameter set. It is the observation matrix after dimensionality reduction.

[0042] By examining the number of non-zero elements on the diagonal of R, the numerical rank r of the matrix can be determined, which is the number of linearly independent column vectors. These independent column vectors can then be selected and recombined into the dimension-reduced observation matrix. ,at this time A full-rank matrix ensures the uniqueness of parameter identification. This is for quantization. The numerical stability and sensitivity to noise are assessed by calculating the ratio of the maximum to the minimum singular value, defined as the condition number. A smaller condition number indicates better matrix behavior and more reliable identification results. Finally, minimizing this condition number is used as the objective function to optimize the excitation trajectory, thereby maximizing identification accuracy while ensuring parameter identifiability. (Combined relation matrix) It is a derived matrix, derived from the block operation of the upper triangular matrix R obtained by QR decomposition. It is used to describe the linear combination relationship between the removed redundant column vectors and the retained independent column vectors. Using this combination relationship matrix, the original parameters can be mapped to the minimum identifiable parameter set. .

[0043] This scheme retains only the parameter combinations that contribute independently to the joint torque, which can solve the problem of unidentifiable parameters caused by linear coupling between dynamic parameters. By systematically eliminating redundant parameters in the regression matrix through QR decomposition, the minimum identifiable parameter set can be obtained, reducing the dimensionality of the parameters to be identified and reducing the solution scale of the constrained optimization problem. Using the ratio of the maximum singular value to the minimum singular value as the condition number, a precise quantitative index of the "illness" of the regression matrix can be given, making the optimization objective clear and calculable, and providing a mathematical basis for subsequent excitation trajectory optimization.

[0044] In step S103, when numerically solving the optimization variables, the method for generating an initial feasible solution and iteratively optimizing is as follows: Several sets of candidate values ​​for optimization variables that satisfy the kinematic constraints of each joint are randomly generated. The condition number of the dynamic regression matrix corresponding to each set of candidate values ​​is calculated. The set with the smallest condition number is selected from all candidate sets as the initial iteration point. Initial values ​​for optimization variables with small condition numbers can be randomly obtained. For example, for a 6-DOF robotic arm, initial values ​​with condition numbers ranging from tens of thousands to hundreds of thousands can be randomly obtained. The interior-point method is used for iterative solving. At the initial iteration point, the collision constraint in the safety constraint function is allowed to be violated. In subsequent iterations, the collision distance constraint is gradually penalized and regressed to the feasible region by constructing an obstacle penalty function. Specifically, the constraint optimization problem can be solved using the interior-point method of the `fmincon` function in MATLAB to obtain the optimization variables of the excitation trajectory. Substituting these variables into the excitation trajectory and interpolating by time yields the trajectory of the joint movement.

[0045] This scheme proposes an initial solution generation strategy and an iterative optimization strategy for the optimization solution. In the initial solution generation strategy, multiple candidate solutions satisfying the kinematic constraints are generated through random sampling, and the optimal solution is selected as the initial iteration point after calculating the condition number of each. In the iterative optimization strategy, an interior-point method is used for iterative solution. During initialization, collision constraints are allowed to be violated, and during the iteration process, the collision distance constraint penalty is gradually reduced back to the feasible region through an obstacle penalty function.

[0046] The initial solution generation strategy, employing random generation and condition number pre-screening, provides directional guidance for the initial solution before formal optimization, avoiding slow convergence or getting trapped in local suboptimal solutions caused by starting from a high condition number initial point. The iterative optimization strategy, allowing collision violations and gradually pulling back using penalty functions, addresses the engineering challenge of a highly narrow feasible region for collision constraints, making it difficult to find initial feasible solutions. This ensures that the optimization solver can start normally and converge stably under various operating conditions.

[0047] In some embodiments of this disclosure, during the solution of the constrained optimization problem, the starting and ending positions of the main excitation trajectory are not treated as fixed constraints, but rather as free variables in the optimization process. That is, the starting and ending endpoint states of the main excitation trajectory—including position, velocity, and acceleration—are not subject to mandatory constraints of preset fixed values; they only need to satisfy the kinematic limits of each joint. By setting all starting and ending endpoint states as free variables, the feasible region of the constrained optimization problem can be maximized, allowing the optimization algorithm to search in a wider solution space, thereby obtaining a lower observation matrix condition number.

[0048] In step S104, after obtaining the complete excitation trajectory, the following steps can also be performed: according to the preset communication cycle of the robotic arm controller, the complete excitation trajectory is discretized and sampled at equal time intervals to generate the expected position sequence of each joint at discrete time nodes; high-order spline interpolation is performed on the expected position sequence to form a continuous command signal to drive the servo motor; during the operation of the robotic arm according to the continuous command signal, the joint torque sensor and position sensor are synchronously triggered to collect data, and the collected physical data is used for subsequent inertial parameter identification based on the least squares method.

[0049] In the actual execution and data acquisition process of the optimized excitation trajectory, the scheme performs equal-interval sampling discretization through the controller communication cycle to generate a discrete position sequence, and then uses high-order spline interpolation to form a smooth and continuous command to drive the motor. At the same time, it synchronously triggers the sensor to collect torque and position data for subsequent least-squares identification.

[0050] Transforming the excitation trajectory from theoretical optimization results into physically executable motor drive signals forms a complete closed loop of trajectory generation → discretization → interpolation execution → data acquisition → parameter identification. This ensures that the optimized low-condition-number trajectory can be accurately reproduced on a real robot and data acquisition can be completed, giving this solution complete industrial application capabilities.

[0051] In one embodiment, taking a certain robot as an example, the Matlab program block for the excitation trajectory generation method for identifying the dynamic parameters of the robotic arm includes the following: The first step is to import the robot's URDF model.

[0052] The second step is to build and visualize the obstacle model, resulting in, for example... Figure 2The visualization of the spherical obstacle shown is as follows. Specifically, this includes: defining the robot's visualization environment; confirming that the URDF zero point matches the actual robotic arm; determining the position and radius of each spherical obstacle through interactive adjustment, obtaining the spherical obstacle parameter variable bodySpnCln and the collision pair variable collision; verifying the envelope effect of the spherical obstacle under different poses by changing the positions of each joint, and confirming the joint range of motion.

[0053] The third step is to create a positive distance function based on bodySpnCln and collision, and then use this distance function to write the obstacle constraint function.

[0054] The fourth step is to generate the full regression matrix function fn_full_regressor_s590eco.m.

[0055] Fifth, based on the complete regression matrix generated in step four, perform QR matrix decomposition with column permutations, and calculate the combination relationship beta of the minimum set of inertia parameters. arrive The permutation matrix P.

[0056] The sixth step is to construct the excitation trajectory in the form of a Fourier series, separate the optimization variable opti_var and the fixed parameters from the trajectory expression, and calculate the sampling points of the excitation trajectory.

[0057] Step 7: Substitute the trajectory sampling points generated in step 6 into the minimum observation matrix obtained in step 5, calculate the condition number of the observation matrix, and use it as the optimization objective function.

[0058] Step 8: Set motion performance constraints such as joint position, velocity, and acceleration.

[0059] Step 9: Optimize the excitation trajectory using fmincon, including: setting the constraint function and objective function of fmincon, with the input parameters being only optimization variables; generating an initial feasible solution that satisfies the motion limit constraints but allows collision constraints to be violated; and performing the optimization solution.

[0060] Step 10: Calculate the trajectory sampling points based on the optimization results and visualize the motion of the sampling points.

[0061] The results of solving the optimization variables obtained in step 6 are shown in Table 1 below. The j-th column in the table represents the optimization variables of the j-th joint, the first row is the fundamental frequency, and the second to sixth rows are the coefficients of the sine terms. Rows 7-11 are the coefficients of the cosine terms. .

[0062] Table 1. Solution results for optimization variables The excitation trajectories of joints J1 to J6 are as follows: Figure 3 and Figure 4 As shown, where Figure 3 Corresponding joints J1, J2, J3 Figure 4 Corresponding joints J4, J5, and J6; the combination of the robotic arm model and the excitation trajectory is as follows: Figure 5 As shown.

[0063] If collision constraints are not considered, and the robotic arm structure is simple, the solution may result in a collision-free trajectory. However, for robots with 6 or 7 joints, without explicitly adding collision constraints, the optimization result has a very low probability of being a collision-free trajectory, making it impractical.

[0064] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0065] The excitation trajectory generation method for identifying dynamic parameters of a robotic arm according to embodiments of this disclosure expands the optimization search space by using the fundamental frequency and Fourier coefficients of the Fourier series as optimization variables. It also reduces the observation matrix condition number by minimizing the condition number of the dynamic regression matrix and allowing the endpoints of the main trajectory to be free from zero-velocity and zero-acceleration constraints to release optimization degrees of freedom. This suppresses the interference of measurement noise on parameter identification. Furthermore, by constructing a spherical obstacle safety constraint function based on the URDF geometric model to quantify collision avoidance conditions, it ensures that the optimized trajectory is free from self-collision and collisions with the environment, thus possessing physical feasibility. Finally, by splicing the optimized main trajectory into three segments to obtain a complete trajectory with continuous velocity and acceleration, it ensures that the velocity and acceleration of the entire trajectory are continuous and impact-free, thereby protecting the joint motors. In summary, this disclosure significantly improves the accuracy of dynamic parameter identification, ensures the safe execution of the trajectory on a real robotic arm, and has high optimization efficiency.

[0066] The following are embodiments of the apparatus disclosed herein, which can execute the method embodiments of this disclosure. The methods provided in the embodiments of this disclosure can be executed by any electronic device with computer processing capabilities, such as an industrial control computer. The excitation trajectory generation apparatus for identifying the dynamic parameters of a robotic arm described below and the excitation trajectory generation method for identifying the dynamic parameters of a robotic arm described above can be referred to in correspondence with each other. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the method embodiments of this disclosure.

[0067] Figure 6 This is a schematic diagram of an excitation trajectory generation device for identifying the dynamic parameters of a robotic arm, provided in an embodiment of this disclosure. Figure 6 As shown, the excitation trajectory generation device for identifying the dynamic parameters of a robotic arm includes: The equation construction module 601 is used to obtain the dynamic parameter identification model of the robotic arm. It uses Fourier series to construct the excitation trajectory equations of each joint. The excitation trajectory equations include constant terms, sine coefficients, cosine coefficients and fundamental frequency. The fundamental frequency, sine coefficients and cosine coefficients are used as optimization variables, and the constant terms are fixed parameters.

[0068] The position calculation module 602 is used to set several spherical obstacles at key links based on the URDF geometric model of the robotic arm. According to the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and the set radius, the module uses the forward kinematics of the robotic arm to calculate the real-time center position of each spherical obstacle in Cartesian space. Based on the real-time center position of each spherical obstacle and the set radius, a safety constraint function containing self-collision constraints and environmental collision constraints is constructed.

[0069] The variable solving module 603 is used to construct a constrained optimization problem with the condition number of the dynamic regression matrix corresponding to the excitation trajectory as the optimization objective and the kinematic constraints and safety constraint functions of each joint of the robotic arm as the constraint conditions, and to numerically solve the optimization variables to obtain the optimization parameters of the main excitation trajectory. In the process of solving the constrained optimization problem, the starting endpoint state and the ending endpoint state of the main excitation trajectory are not subject to zero speed and zero acceleration constraints.

[0070] The trajectory acquisition module 604 is used to, after acquiring the optimized parameters of the main excitation trajectory, splice the front transition trajectory segment and the back transition trajectory segment at the start end and the end end of the main excitation trajectory respectively to obtain a complete excitation trajectory with continuous velocity and continuous acceleration; wherein, the front transition trajectory segment is used to move the robot arm from the preset starting static pose to the starting state of the main excitation trajectory, and the back transition trajectory segment is used to move the robot arm from the ending state of the main excitation trajectory to the preset ending static pose.

[0071] The excitation trajectory generation device for identifying the dynamic parameters of a robotic arm according to embodiments of this disclosure expands the optimization search space by using the fundamental frequency and Fourier coefficients of the Fourier series as optimization variables. It also reduces the observation matrix condition number by minimizing the condition number of the dynamic regression matrix and allowing the endpoints of the main trajectory to be free from zero-velocity and zero-acceleration constraints to release optimization degrees of freedom. This suppresses the interference of measurement noise on parameter identification. Furthermore, by constructing a spherical obstacle safety constraint function based on the URDF geometric model to quantify collision avoidance conditions, it ensures that the optimized trajectory is free from self-collision and collisions with the environment, thus possessing physical feasibility. Finally, by splicing the optimized main trajectory into three segments to obtain a complete trajectory with continuous velocity and acceleration, it ensures that the velocity and acceleration of the entire trajectory are continuous and impact-free, thereby protecting the joint motors. In summary, this disclosure significantly improves the accuracy of dynamic parameter identification, ensures the safe execution of the trajectory on a real robotic arm, and has high optimization efficiency.

[0072] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.

[0073] Figure 7 This is a schematic diagram of the electronic device 7 provided in an embodiment of this disclosure. Figure 7 As shown, the electronic device 7 of this embodiment includes a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program 703, it implements the steps in the various method embodiments described above. Alternatively, when the processor 701 executes the computer program 703, it implements the functions of each module in the various device embodiments described above.

[0074] Electronic device 7 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 7 may include, but is not limited to, processor 701 and memory 702. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 7 and does not constitute a limitation on electronic device 7. It may include more or fewer components than shown, or different components.

[0075] The processor 701 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0076] The memory 702 can be an internal storage unit of the electronic device 7, such as a hard disk or RAM of the electronic device 7. The memory 702 can also be an external storage device of the electronic device 7, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 7. The memory 702 can also include both internal and external storage units of the electronic device 7. The memory 702 is used to store computer programs and other programs and data required by the electronic device.

[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If the integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0079] The above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.

Claims

1. A method for generating excitation trajectories for mechanical arm dynamics parameter identification, characterized in that, include: A dynamic parameter identification model of the robotic arm is obtained, and the excitation trajectory equations of each joint are constructed using Fourier series. The excitation trajectory equations include constant terms, sine coefficients, cosine coefficients and fundamental frequency. The fundamental frequency, sine coefficients and cosine coefficients are used as optimization variables, and the constant terms are fixed parameters. The Unified Robot Description Format (URDF) geometric model based on a robotic arm sets several spherical obstacles at key links. Based on the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and the set radius, the forward kinematics of the robotic arm is used to calculate the real-time center position of each spherical obstacle in Cartesian space. Based on the real-time center position of each spherical obstacle and the set radius, a safety constraint function containing self-collision constraints and environmental collision constraints is constructed. The optimization objective is to minimize the condition number of the dynamic regression matrix corresponding to the excitation trajectory. The kinematic constraints of each joint of the robotic arm and the safety constraint function are used as constraints. A constraint optimization problem is constructed and the optimization variables are numerically solved to obtain the optimization parameters of the main excitation trajectory. In the process of solving the constraint optimization problem, the starting endpoint state and the ending endpoint state of the main excitation trajectory are not subject to zero speed and zero acceleration constraints. After obtaining the optimized parameters of the main excitation trajectory, a front transition trajectory segment and a rear transition trajectory segment are spliced ​​at the beginning and end of the main excitation trajectory, respectively, to obtain a complete excitation trajectory with continuous velocity and continuous acceleration. The front transition trajectory segment is used to move the robotic arm from a preset initial stationary pose to the initial state of the main excitation trajectory, and the rear transition trajectory segment is used to move the robotic arm from the end state of the main excitation trajectory to a preset final stationary pose.

2. The method of claim 1, wherein, The optimization objective is to minimize the condition number of the dynamic regression matrix corresponding to the excitation trajectory. This includes: establishing a complete regression matrix of the robotic arm's inverse dynamics with respect to inertial parameters based on the Lagrange method; performing QR matrix decomposition with column permutations on the complete regression matrix; determining the numerical rank of the matrix based on the diagonal elements of the resulting upper triangular matrix; selecting linearly independent column vectors; constructing a dimension-reduced observation matrix using the selected linearly independent column vectors; using the ratio of the maximum to the minimum singular value of the observation matrix as the condition number; and using this condition number as the single objective function of the constrained optimization problem.

3. The method of claim 1, wherein, The safety constraint function specifically includes self-collision constraints and environmental collision constraints, wherein: The self-collision constraint includes: pre-defining pairs of spherical obstacles that are prone to collision, and constraining the Euclidean distance between the centers of the two spherical obstacles in any pair to be greater than the sum of their radii; The environmental collision constraints include: for a specific spherical obstacle at the end of the robotic arm or near the installation platform, constraining its vertical coordinate component in the world coordinate system to be greater than the radius of the spherical obstacle.

4. The method according to claim 3, characterized in that, Based on the real-time center position of each spherical obstacle and the set radius, a safety constraint function is constructed, including self-collision constraints and environmental collision constraints, including: A collision pair matrix is ​​preset, and each row of the collision pair matrix records the numbers of two spherical obstacles. During the optimization iteration process, the center-to-center distance constraint is only applied to the spheres corresponding to the numbers recorded in the collision pair matrix. A preset platform safety number group is defined. For spherical obstacles in the platform safety number group, during the optimization iteration process, only the vertical coordinate component in the world coordinate system is constrained to be greater than the radius value of the spherical obstacle. The other spherical obstacles are not subject to vertical constraints related to the installation platform.

5. The method according to claim 1, characterized in that, When numerically solving the optimization variables, the method for generating an initial feasible solution and iteratively optimizing is as follows: Several sets of candidate values ​​for optimization variables that satisfy the kinematic constraints of each joint are randomly generated. The condition number of the dynamic regression matrix corresponding to each set of candidate values ​​is calculated. The set with the smallest condition number among all candidate sets is selected as the initial iteration point. An interior-point method is used for iterative solution. At the initial iteration point, the collision constraint in the safety constraint function is allowed to be in a violated state. In subsequent iterations, the collision distance constraint is gradually penalized and returned to the feasible region by constructing an obstacle penalty function.

6. The method according to claim 1, characterized in that, After obtaining the complete excitation trajectory, the method further includes: According to the preset communication cycle of the robotic arm controller, the complete excitation trajectory is discretized and sampled at equal time intervals to generate the expected position sequence of each joint at discrete time nodes. The desired position sequence is subjected to high-order spline interpolation to form a continuous command signal that drives the servo motor. During the operation of the robotic arm according to the continuous command signals, the joint torque sensor and position sensor are synchronously triggered to collect data, and the collected physical data is used for subsequent inertial parameter identification based on the least squares method.

7. The method according to claim 1, characterized in that, The equations obtained by constructing the excitation trajectory equations for each joint using Fourier series are as follows: Where j is the joint number to be optimized. The fundamental frequency of the Fourier series. Where N is a multiple of the fundamental frequency, and N is the order of the Fourier series. These are the constant term, sine term coefficient, and cosine term coefficient of the Fourier coefficients, respectively. The optimization variables include the sine term coefficient, cosine term coefficient, and fundamental frequency of the Fourier coefficients corresponding to each joint, where N is a positive integer and the multiples of the fundamental frequency are odd numbers.

8. An excitation trajectory generation device for identifying the dynamic parameters of a robotic arm, characterized in that, include: The equation construction module is used to obtain the dynamic parameter identification model of the robotic arm. It uses Fourier series to construct the excitation trajectory equations of each joint. The excitation trajectory equations include constant terms, sine coefficients, cosine coefficients and fundamental frequency. The fundamental frequency, sine coefficients and cosine coefficients are used as optimization variables. The constant terms are fixed parameters. The position calculation module is used to set several spherical obstacles at key links based on the URDF geometric model of the robotic arm. According to the three-dimensional coordinates of the joint coordinate system where each spherical obstacle is located and the set radius, the module uses the forward kinematics of the robotic arm to calculate the real-time center position of each spherical obstacle in Cartesian space. Based on the real-time center position of each spherical obstacle and the set radius, a safety constraint function containing self-collision constraints and environmental collision constraints is constructed. The variable solving module is used to construct a constraint optimization problem with the condition number of the dynamic regression matrix corresponding to the excitation trajectory as the optimization objective, and the kinematic constraints of each joint of the robotic arm and the safety constraint function as the constraint conditions, and to numerically solve the optimization variables to obtain the optimization parameters of the main excitation trajectory. In the process of solving the constraint optimization problem, the starting endpoint state and the ending endpoint state of the main excitation trajectory are not subject to zero speed and zero acceleration constraints. The trajectory acquisition module is used to, after acquiring the optimized parameters of the main excitation trajectory, splice a front transition trajectory segment and a rear transition trajectory segment at the start and end of the main excitation trajectory, respectively, to obtain a complete excitation trajectory with continuous velocity and continuous acceleration. The front transition trajectory segment is used to move the robotic arm from a preset starting stationary pose to the starting state of the main excitation trajectory, and the rear transition trajectory segment is used to move the robotic arm from the ending state of the main excitation trajectory to a preset ending stationary pose.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.