Singularity avoidance control method and device for virtual seven-degree-of-freedom six-axis robot
By adding a virtual rotation axis to the end effector of a six-degree-of-freedom robotic arm, extending it to a virtual seven degrees of freedom, and combining adaptive weight adjustment and the Lagrange multiplier method, the stability and accuracy problems of the six-degree-of-freedom robotic arm at singular points are solved, achieving efficient singularity avoidance and attitude optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUERMAN INTELLIGENT TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2025-09-28
- Publication Date
- 2026-07-24
Smart Images

Figure CN121361081B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm control technology, and in particular to a singularity avoidance control method and device for a six-axis robotic arm based on virtual seven degrees of freedom. Background Technology
[0002] A six-DOF robotic arm will experience a wrist singularity when joints 4 and 6 are coaxial, causing high-speed rotation of joints 4 and 6. A shoulder singularity will occur when the wrist is located on the extension of the axis of joint 1, resulting in a significant abrupt change between joints 1 and 3. As the robotic arm configuration approaches the singularity point, its movement becomes unstable and unsafe.
[0003] Currently, there are two main categories of solutions for avoiding singularities in six-DOF robotic arms: passive avoidance methods and active avoidance methods. For example, these methods determine if the robotic arm is close to a singularity by calculating the minimum singular value of the Jacobian matrix or the determinant of the Jacobian matrix, and report an error if it is close. Active avoidance methods commonly include singularity point deceleration schemes achieved through forced deceleration and damped least squares methods that add damped perturbations to the kinematic differential mapping.
[0004] However, non-active avoidance methods affect the usability of the robotic arm, and in some scenarios, the robotic arm is prone to approaching singularities. Furthermore, the minimum singularity value and the minimum Jacobian determinant differ depending on the approach to the singular configuration, making it difficult to measure the degree of singularity. The forced deceleration scheme in active avoidance methods is suitable for robotic arm teaching, but in actual working scenarios, forced deceleration directly affects the robotic arm's motion planning. The damped least squares method is highly sensitive to parameters, and this method simultaneously sacrifices position and attitude accuracy to achieve singularity avoidance. The damped least squares method requires continuous generation of damping factors through a damping adaptive function during implementation, and the forced deceleration scheme also requires additional cycles. Summary of the Invention
[0005] The purpose of this invention is to provide a singularity avoidance control method and device for a six-axis robotic arm based on virtual seven degrees of freedom. By adding a virtual rotation axis to the end of the robotic arm, the six-degree-of-freedom robotic arm is extended into a virtual seven-degree-of-freedom robotic arm. By utilizing the characteristic that the seven-degree-of-freedom robotic arm does not have wrist or elbow singularities, singularity avoidance of the six-degree-of-freedom robotic arm can be indirectly achieved with only the loss of attitude accuracy.
[0006] To address the aforementioned technical problems, a first aspect of this invention provides a singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom. The robotic arm's end effector is provided with a virtual rotation axis that coincides with the origin of the end effector coordinate system and is perpendicular to the rotation axis of the end effector coordinate system. The control method includes the following steps:
[0007] Acquire the position and angle information of each joint of the robotic arm, as well as the actual and expected pose of the end effector during the current detection cycle;
[0008] Based on the position and angle information of each joint, the weight value of the virtual rotation axis is adjusted according to the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and the quadratic programming problem for avoiding singularities is reconstructed to obtain the joint angle increment vector to be executed.
[0009] Based on the joint angle increment vector to be executed, the angle values of each joint of the robotic arm in the next detection cycle are calculated, and the movement of the robotic arm is controlled based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm.
[0010] Furthermore, before adjusting the weight value of the corresponding virtual rotation axis, the method further includes:
[0011] When the wrist position of the robotic arm is located on the extended line of the axis of its joint 1, it is determined that the robotic arm is in a state of being close to or located at the shoulder singularity.
[0012] When joints 4 and 6 of the robotic arm are coaxial, it is determined that the robotic arm is in a state close to or located at a wrist singularity.
[0013] Furthermore, the calculation function for adjusting the weight value of the virtual rotation axis is:
[0014]
[0015] Among them, w 7_awayfrom_singularity w is the reference weight when far from the singular configuration. 7_near_singularity The singularity is used as a reference weight when approaching a singular configuration. wrist The angle value of joint 5 of the original six-axis robotic arm is the value. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the singularity region of the robotic arm's wrist. shoulder This is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the extended straight line along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity region of the robotic arm; r H Let z1 be the position vector of the wrist center point in the original six-axis robotic arm base coordinate system, z1 be the unit vector in the direction of the axis of joint 1, and θ5 be the angle value of joint 5.
[0016] Further, the step of calculating the angle increment vector of each joint by combining the actual pose, desired pose, and weight values of the robotic arm includes:
[0017] Based on the kinematic mapping of a virtual seven-degree-of-freedom robotic arm, a quadratic programming problem is constructed.
[0018] The quadratic programming problem is solved using the Lagrange multiplier method to obtain the angle increment vectors for each joint.
[0019] Furthermore, the quadratic programming problem is specifically as follows:
[0020]
[0021] Where, θ v =[θ1,θ2,θ3,θ4,θ5,θ6,θ7] T , J represents the error increment of the end-effector pose corresponding to the virtual seven degrees of freedom. v Let W be the Jacobian matrix of the virtual seven-DOF robotic arm end effector relative to the base coordinate system, and let W be the weight diagonal matrix, where w1…w7 correspond to Δθ respectively. v 1…Δθ v 7.
[0022] Accordingly, a second aspect of the present invention provides a singularity avoidance control device for a six-axis robotic arm based on virtual seven degrees of freedom. The robotic arm has a virtual rotation axis at its end point that coincides with the origin of the end-effector coordinate system and is perpendicular to the rotation axis of the end-effector coordinate system. The control device includes:
[0023] The data acquisition module is used to acquire the position information, angle information, and actual and expected pose of the end effector of each joint of the robotic arm during the current detection cycle.
[0024] The weight adjustment module is used to adjust the weight value of the virtual rotation axis based on the position and angle information of each joint, combined with the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and reconstruct the quadratic programming problem for avoiding singularities, and solve to obtain the joint angle increment vector to be executed.
[0025] The robotic arm control module is used to calculate the angle values of each joint of the robotic arm in the next detection cycle based on the joint angle increment vector to be executed, and control the movement of the robotic arm based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm.
[0026] Furthermore, the weight adjustment module includes:
[0027] A shoulder determination unit is used to determine that the robotic arm is in a state close to or located at a shoulder singularity when the wrist position point of the robotic arm is located on the extended line of the axis of its joint 1.
[0028] A wrist detection unit is used to determine that the robotic arm is in a state close to or located at a wrist singularity when joints 4 and 6 of the robotic arm are coaxial.
[0029] Furthermore, the calculation function for adjusting the weight value of the virtual rotation axis is:
[0030]
[0031] Among them, w 7_awayfrom_singularity w is the reference weight when far from the singular configuration. 7_near_singularity The singularity is used as a reference weight when approaching a singular configuration. wrist The angle value of joint 5 of the original six-axis robotic arm is the value. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the singularity region of the robotic arm's wrist. shoulder This is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the extended straight line along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity region of the robotic arm; r H Let z1 be the position vector of the wrist center point in the original six-axis robotic arm base coordinate system, z1 be the unit vector in the direction of the axis of joint 1, and θ5 be the angle value of joint 5.
[0032] Furthermore, the weight adjustment module includes:
[0033] The construction unit is used to construct a quadratic programming problem based on the kinematic mapping of a virtual seven-degree-of-freedom robotic arm.
[0034] The computational unit is used to solve quadratic programming problems based on the Lagrange multiplier method to obtain the angle increment vector of each joint.
[0035] Furthermore, the quadratic programming problem is specifically as follows:
[0036]
[0037] Where, θ v =[θ1,θ2,θ3,θ4,θ5,θ6,θ7] T , J represents the error increment of the end-effector pose corresponding to the virtual seven degrees of freedom. v Let W be the Jacobian matrix of the virtual seven-DOF robotic arm end effector relative to the base coordinate system, and let W be the weight diagonal matrix, where w1…w7 correspond to Δθ respectively. v 1…Δθ v 7.
[0038] Accordingly, a third aspect of the present invention provides a robotic arm, including any of the above-described singularity avoidance control devices for a six-axis robotic arm based on virtual seven degrees of freedom.
[0039] Accordingly, a fourth aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom.
[0040] Accordingly, a fifth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom.
[0041] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects:
[0042] 1. By introducing a virtual joint that coincides with the origin of the end-effector coordinate system and is perpendicular to the end-effector rotation axis, the six-DOF robotic arm is extended to a seven-DOF system at the control level, effectively utilizing the core characteristic of the seven-DOF robotic arm that has no wrist or elbow singularities. With the assistance of this virtual redundancy, this invention can effectively avoid shoulder and wrist singularities by only moderately sacrificing and optimizing the end-effector posture while strictly ensuring the end-effector position tracking accuracy. This overcomes the problem of losing pose accuracy in the traditional damped least squares method, and significantly improves the trajectory accuracy and practicality of the robotic arm when working near singular regions.
[0043] 2. By adopting an adaptive weight adjustment strategy based on dual singular source discrimination (shoulder singularity and wrist singularity), and dynamically fusing the two key indicators of shoulder singularity proximity and wrist singularity proximity based on a continuous and smooth exponential function, the weight coefficients of virtual joints in the optimization objective function are adjusted in real time. It can automatically and smoothly make the optimal trade-off between "high posture tracking accuracy" and "strong singularity avoidance capability" according to the actual configuration of the robotic arm and the distance to the singular region, avoiding abrupt changes in control parameters and ensuring motion stability. At the same time, it can handle multiple singularity types with a single virtual axis, improving the versatility and efficiency of the algorithm.
[0044] 3. An analytical solution strategy based on the Lagrange multiplier method was adopted to handle the quadratic programming problem constructed to avoid singularities. A closed-form analytical solution with the optimal increment of joint angles was obtained. This fundamentally avoids the shortcomings of common numerical iterative algorithms, such as slow convergence speed, strong sensitivity to initial values, and uncertain computation time. It ensures the real-time performance and reliability of the solution process, greatly improves the response speed and operating efficiency of the entire control system, and meets the stringent requirements of high-speed, high-precision real-time control of the robotic arm. Attached Figure Description
[0045] Figure 1 This is a flowchart of a singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom, provided in an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of the principle of a six-axis robotic arm based on virtual seven degrees of freedom provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of a singularity on the shoulder of a robotic arm provided in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the singularity of the robotic arm wrist provided in an embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the robotic arm passing through the wrist singularity zone provided in an embodiment of the present invention;
[0050] Figure 6a This is a schematic diagram of the movement positions of each joint of the robotic arm through the wrist singularity zone provided in an embodiment of the present invention;
[0051] Figure 6b This is a schematic diagram of the movement speed of each joint of the robotic arm passing through the wrist singularity zone provided in an embodiment of the present invention;
[0052] Figure 7 This is a schematic diagram of the robotic arm passing through the shoulder singularity zone provided in an embodiment of the present invention;
[0053] Figure 8a This is a schematic diagram of the movement positions of each joint of the robotic arm through the shoulder singularity area provided in an embodiment of the present invention;
[0054] Figure 8b This is a schematic diagram of the movement speed of each joint of the robotic arm passing through the shoulder singularity zone provided in an embodiment of the present invention;
[0055] Figure 9 This is a block diagram of a singularity avoidance control device module for a six-axis robotic arm based on virtual seven degrees of freedom, provided in an embodiment of the present invention.
[0056] Figure 10 This is a block diagram of the weight adjustment module provided in an embodiment of the present invention.
[0057] Figure label:
[0058] 1. Data acquisition module; 2. Weight adjustment module; 21. Shoulder judgment unit; 22. Wrist judgment unit; 23. Problem construction unit; 24. Vector calculation unit; 3. Robotic arm control module. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0060] Please refer to Figure 1 and Figure 2 The first aspect of this invention provides a singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom. The robotic arm has a virtual rotation axis at its end point that coincides with the origin of the end-point coordinate system and is perpendicular to the rotation axis of the end-point coordinate system. The control method includes the following steps:
[0061] Step S100: Obtain the position information, angle information, actual pose, and expected pose of each joint of the robotic arm in the current detection cycle.
[0062] Angular displacement data of the joints is acquired in real time by absolute encoders or rotary transformers installed at each joint of the robotic arm. Joint position information is further obtained using joint torque sensors or estimation methods based on joint models. After filtering, denoising, and coordinate transformation, the precise angles and positions of each joint in the robotic arm's base coordinate system are obtained.
[0063] Based on the joint information described above, the actual pose of the end effector relative to the base coordinate system in the current detection cycle is recursively solved through forward kinematics calculations and according to the MDH parameter model of the robotic arm. This pose includes three-dimensional position coordinates and attitude direction represented by a rotation matrix or Euler angles. Simultaneously, the desired pose command for the end effector within this detection cycle is received from the upper-level task planner or trajectory generation module. This command is typically given in the form of a homogeneous transformation matrix or pose vector. The actual pose and the desired pose together constitute the pose error input for the current control cycle, providing an accurate and real-time data foundation for subsequent singularity discrimination and motion correction.
[0064] Step S200: Based on the position and angle information of each joint, adjust the weight value of the virtual rotation axis according to the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and reconstruct the quadratic programming problem for avoiding singularities to obtain the joint angle increment vector to be executed.
[0065] First, a real-time singularity proximity assessment is performed. Shoulder singularity is determined by calculating the magnitude of the vector cross product. The closer this magnitude is to zero, the closer the wrist point is to the shoulder singularity line (i.e., the axis of joint 1), and the higher the risk of shoulder singularity. Wrist singularity is determined by directly monitoring the angle value θ_5 of joint 5. When its value approaches zero degrees, it means that joints 4 and 6 are approaching coaxiality, indicating entry into the wrist singularity region.
[0066] Based on the real-time calculation results of the two discriminant variables, the system calls a continuous adaptive weighting function to dynamically set the weight coefficients of the virtual joints. This function uses exponential smoothing, and its input is the sum of squares of the singular discriminant variables for the shoulder and wrist. The function presets two key reference weights: a larger weight when far from the singularity and a smaller weight when approaching the singularity. When the robotic arm configuration is far from the singularity, the function output value approaches the larger weight when far from the singularity, imposing a larger penalty on the movement of the virtual joint, thus strictly constraining its movement and prioritizing the tracking accuracy of the end effector posture. When the robotic arm approaches the singularity, the function output smoothly transitions to the smaller weight when approaching the singularity, significantly reducing the constraint penalty on the virtual joint, allowing it to undergo greater movement to provide redundancy, thereby actively avoiding the singularity. At this point, the system tolerates temporary and controllable posture errors.
[0067] Subsequently, using the constructed virtual seven-DOF robotic arm model (whose Jacobian matrix is formed by adding a column of differential motion vectors about the virtual joints to the right of the original six-axis Jacobian matrix), a quadratic programming (QP) problem with equality constraints is constructed. The optimization objective of this problem is to minimize the weighted joint angle increment, and the constraints are the kinematic relationships of the virtual seven-DOF system.
[0068] Finally, the analytical Lagrange multiplier method is employed to efficiently solve this convex quadratic programming problem. By constructing the Lagrange function and setting its partial derivatives to zero, a closed-form analytical solution is obtained. This solution process avoids the convergence problems and computational delays that may exist in numerical iterative algorithms, and directly outputs the optimal joint angle increment vector, including six real joints and one virtual joint, within the current control cycle, providing input for the final motion control.
[0069] Step S300: Based on the joint angle increment vector to be executed, calculate the angle values of each joint of the robotic arm in the next detection cycle, and control the movement of the robotic arm based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm.
[0070] The joint angle increment vector obtained from the previous solution step is superimposed with the joint angle of the current cycle, and numerical integration is performed to calculate the expected target angles of each joint of the robotic arm (including the six real joints) for the next control cycle. Before outputting the final control command, this set of target angles needs to be comprehensively verified: First, it is compared with the physical motion limits of each joint of the robotic arm (such as maximum and minimum angles, speed limits) to ensure that the command is within the safety tolerance range of the mechanical structure; second, feasibility is verified through inverse kinematics to ensure that this set of joint angles can uniquely and accurately achieve the required end pose, paying particular attention to the continuity and rationality of the solution near singular regions. After verification, the motion control module does not directly output the discrete angle value, but uses it as a setpoint, combined with the joint state of the previous cycle, and processes it through a smoothing filtering algorithm (such as a first-order low-pass filter or trajectory interpolation algorithm) to generate smooth, continuous, and abrupt joint position or velocity commands. This process effectively suppresses command jumps or jitters that may be caused by discrete control cycles and numerical calculations. Ultimately, these smoothed instructions are sent in real time to the servo drives of each joint, driving the motors to execute the corresponding movements. This ensures that even when the robotic arm traverses unusual areas such as the shoulder or wrist, each joint still exhibits continuous and stable motion characteristics, effectively avoiding traditional problems such as sudden speed changes, joint locking, or trajectory deviation. Thus, at the Cartesian space level, this guarantees the smoothness of the end effector's motion trajectory and the overall control accuracy.
[0071] This invention leverages the characteristic that a seven-axis robotic arm lacks the singularity points found in a six-axis robotic arm. During control, it monitors the position and angle information of each joint, as well as the actual and desired pose of the end effector, in real time, and determines whether it is approaching a singularity point. This allows the robotic arm to identify potential singularity risks in advance during movement. When approaching a singularity point, the weight values of the virtual rotation axes are adjusted, and the angle increment vectors of each joint are calculated to control the robotic arm's movement, effectively avoiding joint instability caused by singularities. For example, in a six-axis robotic arm, when joint 4 and joint 6 are coaxial (wrist singularity) or the wrist position is on the extended axis of joint 1 (shoulder singularity), the joint may experience high-speed rotation or significant abrupt changes. The control method of this invention avoids this situation, ensuring the smooth movement of the robotic arm throughout the workspace and improving the reliability and safety of the robotic arm's movement. It is particularly suitable for industrial production and precision operations where high positional accuracy and stability are required.
[0072] This invention achieves singularity avoidance by sacrificing only attitude accuracy, offering significant technical advantages. In practical applications, many tasks demand more stringent positional accuracy from the robotic arm's end effector. For example, in operations such as component assembly and welding, precise positional control is crucial for task success. By indirectly controlling the original six-axis robotic arm through the motion of a virtual seven-axis robotic arm, singularity avoidance can be achieved while maintaining positional accuracy, allowing for a degree of flexible adjustment to attitude accuracy. This is because the position vector of the virtual seven-DOF robotic arm's end effector relative to the base coordinate system is the same as that of the original six-axis robotic arm, while attitude avoidance can be achieved by appropriately adjusting the weights of the virtual rotation axes. This optimizes the overall motion performance of the robotic arm, improving the success rate and quality of task execution.
[0073] The MDH parameters of the robotic arm configuration in this invention are shown in the table below.
[0074]
[0075] The robotic arm linkage configuration diagram after adding virtual joint 7 is shown below. Figure 2 As shown, by adding a rotation axis passing through the origin of the end-joint coordinate system, the six-DOF robotic arm is extended into a virtual seven-DOF robotic arm. The virtual joint axis 7 is labeled as axis7, the rotation angle is labeled as θ7, joints 5 and 6 are labeled as axis5 and axis6 respectively, and axis7 is determined by the following formula.
[0076] axis7 = axis5 × axis6
[0077] At this point, the relationship between the attitude of the virtual seven-DOF end-effector coordinate system relative to the base coordinate system and the attitude of the original six-DOF manipulator end-effector coordinate system relative to the base coordinate system can be established using Rodrigues rotation, as shown in the following equation.
[0078]
[0079] Since the virtual joint axis 7 passes through the origin of the coordinate system of the original six-degree-of-freedom manipulator, the position vector of the virtual seven-degree-of-freedom manipulator relative to the base coordinate system is the same as that of the original six-axis manipulator. Therefore, in the process of avoiding singularities, some attitude accuracy can be sacrificed to avoid singularities while ensuring position accuracy.
[0080] The pose homogeneous transformation matrix of the virtual degree-of-freedom robotic arm's end-effector coordinate system relative to the base coordinate system can be expressed as follows:
[0081]
[0082] The kinematic mapping of the virtual seven-DOF robotic arm is established as follows:
[0083]
[0084] Where, θ v =[θ1,θ2,θ3,θ4,θ5,θ6,θ7] T J v Let be the Jacobian matrix of the virtual seven-DOF robotic arm's end effector relative to the base coordinate system. This represents the error increment of the end-effector pose of the virtual seven-DOF robotic arm.
[0085] Further, please refer to Figure 3 and Figure 4 Before adjusting the weight value of the corresponding virtual rotation axis in step S200, the method further includes:
[0086] Step S201: When the wrist position of the robotic arm is located on the extended line of the axis of its joint 1, it is determined that the robotic arm is in a state of being close to or located at the shoulder singularity.
[0087] The robotic arm's configuration is continuously monitored in real time to determine whether it is approaching or in a shoulder singularity state. The core basis for this judgment is calculating the positional relationship of the wrist center point relative to the axis of joint 1. Specifically, in the robotic arm's base coordinate system, a unit vector along the rotation axis of joint 1 is first obtained, and the vector of the current position of the robotic arm's wrist center point relative to the origin of the base is calculated. By calculating the cross product of the two vectors and obtaining the magnitude of the cross product vector, a scalar discriminant is obtained. This discriminant geometrically represents the perpendicular distance from the wrist center point to the extension line of the axis of joint 1. The system pre-sets a positive threshold close to zero. When the value of the discriminant is less than this threshold, it is determined that the wrist point is very close to or located on the axis of joint 1, indicating that the robotic arm is currently in a state approaching or has entered the shoulder singularity region, and this state flag is set to true, providing a key input signal for subsequent adaptive weight adjustment.
[0088] Step S202: When joints 4 and 6 of the robotic arm are coaxial, it is determined that the robotic arm is in a state close to or located at a wrist singularity.
[0089] Configurations that may lead to wrist anomalies are monitored and judged independently in parallel. Wrist anomalies occur when the rotation axes of joints 4 and 6 tend to be coaxial. The judgment is based on directly reading and monitoring the real-time angle value of joint 5. The basic principle is that in a standard six-axis robotic arm configuration, when the absolute value of the angle of joint 5 is zero, the axes of joints 4 and 6 will be completely coincident. Therefore, the magnitude of the absolute value of the angle of joint 5 directly reflects the degree to which these two axes are close to coaxial. A positive angle threshold close to zero is also preset, and judgment is made by continuously comparing the absolute value of the angle of joint 5 with this threshold. When the absolute value of the angle of joint 5 is detected to be less than the preset threshold, it is determined that the axes of joints 4 and 6 have approached or reached a coaxial state, and the robotic arm is approaching or has entered the wrist anomaly region. The corresponding status flag is then triggered, and this information is synchronously used for subsequent control decisions.
[0090] Through the continuous monitoring and threshold comparison process described in steps S201 and S202, it is possible to identify in real time, accurately, and independently whether the robotic arm is approaching or already in one of the two typical singular configurations: shoulder singularity and wrist singularity. This dual discrimination mechanism provides accurate and reliable logical input for the subsequent dynamic adaptive adjustment of virtual joint weights, ensuring the timeliness of the singularity avoidance strategy activation and the accuracy of the judgment. It is the premise and foundation for the entire control method to achieve effective singularity avoidance.
[0091] When a shoulder singularity occurs, the wrist position of the robotic arm is located on the extended line of the axis of joint 1, at which point it can be detected via singularity. shoulder The degree to which it approaches 0 is used to measure whether it is close to a shoulder anomaly, as illustrated in the diagram. Figure 3 As shown, the discriminant is as follows: singularity shoulder =||r H ×z1‖;When a wrist anomaly occurs, i.e., when joint 5 approaches 0, the axes of joints 4 and 6 become coaxial. In this case, the degree to which joint 5 approaches 0 can be used to measure whether a wrist anomaly is imminent, as illustrated in the diagram. Figure 4 As shown, the discriminant is as follows: singularity wrist =θ5.
[0092] Furthermore, the calculation function for adjusting the weight values of the virtual rotation axis in step 200 is:
[0093]
[0094] Among them, w 7_awayfrom_singularity w is the reference weight when far from the singular configuration. 7_near_singularity The singularity is used as a reference weight when approaching a singular configuration. wristThe angle value of joint 5 of the original six-axis robotic arm is the value. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the singularity region of the robotic arm's wrist. shoulder This is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the extended straight line along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity of the robotic arm. H Let z1 be the position vector of the wrist center point in the original six-axis robot's base coordinate system, z5 be the unit vector along the axis of joint 1, and θ5 be the angle value of joint 5. Optional, the reference weight w for moving away from the singular configuration. 7_awayfrom_singularity The value is 6.0, which is close to the reference weight w for the singular configuration. 7_near_singularity It is 1.5.
[0095] The dynamic adjustment of the virtual rotation axis weight coefficients is achieved through a continuous and smooth adaptive function, with the input variables being two singular proximity discriminants from steps S201 and S202: the shoulder singularity discriminant. shoulder (i.e., the vertical distance from the center point of the wrist to the axis of joint 1) and the wrist singularity discriminant wrist (That is, the current angle value of joint 5). The core structure of the function consists of two exponentially decaying terms, which are respectively related to the preset reference weight value w. 7_awayfrom_singularity and w 7_near_singularity Multiply and then sum. Where w 7_awayfrom_singularity is a large positive weight value, representing a stronger constraint on the motion of the virtual joints when the robotic arm configuration is far from all singularities, aiming to maximize the attitude tracking accuracy of the end effector. Conversely, w 7_near_singularity The weight is a small positive value, representing the system relaxing constraints on the virtual joints when the robotic arm is very close to or in a singular configuration, allowing them to move more freely to provide the motion redundancy needed to avoid singularities. The decay coefficient α in the exponential term is a positive adjustable parameter used to control the rate at which the weights change with the sum of squares of the singularity discriminant; its magnitude directly affects the system's sensitivity to singularity proximity and response speed. The output value of the entire function changes continuously with the robotic arm configuration; when the robotic arm is operating normally and moving away from the singularity, the function output value approaches w. 7_awayfrom_singularity When any singular discriminant is detected to approach zero, the function's output value smoothly and continuously moves towards w. 7_near_singularity Transition. This ensures that the weight adjustment is not a sudden switching process, but a gradual and shock-free optimization process, thus providing subsequent solutions with weight parameters that are both adaptable to the working conditions and numerically stable.
[0096] This weighted adaptive adjustment mechanism transforms the abstract singularity measure into specific control parameters through a carefully designed mathematical function, achieving an automatic trade-off between singularity avoidance strategies and motion accuracy maintenance. Its smoothness avoids abrupt changes in control commands, ensuring the stability of the robotic arm's motion. Furthermore, its simultaneous response to dual singular sources ensures an efficient and unified singularity avoidance scheme, which is a key technical aspect for improving the motion performance of a six-axis robotic arm in complex trajectory tasks.
[0097] Furthermore, the reconstruction in step S200 is used to avoid the quadratic programming problem of singularities, and the solution is used to obtain the joint angle increment vector to be executed, including:
[0098] Step S210: Construct a quadratic programming problem based on the kinematic mapping of the virtual seven-degree-of-freedom robotic arm.
[0099] Under the constraint of satisfying the end-effector motion requirements, an optimal set of joint angle increments is sought. Specifically, the mathematical objective function is set to minimize the L2 norm squared of the weighted joint angle increments, where the weight matrix is a diagonal matrix, and its diagonal elements are composed of the virtual joint weights adaptively calculated in step S203 and other fixed weights. This reflects the system's trade-off in the cost of joint space motion, that is, prioritizing virtual joint motion to avoid singularities while moderately constraining the motion range of real joints. The constraint condition of this optimization objective strictly follows the differential kinematics relationship of the virtual seven-degree-of-freedom system, that is, the product of the Jacobian matrix and the joint angle increment must be equal to the currently measured or calculated end-effector Cartesian pose error. In this way, the singularity avoidance problem of the robotic arm is transformed into a strict convex quadratic programming problem with linear equality constraints, ensuring the existence and uniqueness of the solution.
[0100] Step S220: Solve the quadratic programming problem based on the Lagrange multiplier method to obtain the angle increment vector of each joint.
[0101] Quadratic programming problems can also be called QP (Quadratic Programming) problems. There are numerical iteration methods for solving QP problems, as well as methods that use constrained function extrema such as the Lagrange multiplier method to find the analytical expression.
[0102] Objective function in quadratic programming problem The goal is to minimize the weighted joint angle increment vector Δθ under certain constraints. vThe norm squared. The elements on the diagonal of the weight matrix W (including those adaptively adjusted for singularities) distinguish the importance of different joint angle increments. By minimizing this objective function, the changes in joint angles can be reasonably adjusted while considering singularity avoidance, resulting in more optimized robotic arm movement. Without such optimization, joint angles may exhibit unreasonable and large changes near singularities, leading to unstable or inaccurate robotic arm movement. Minimizing the objective function makes the adjustment of joint angles smoother and more reasonable, avoiding violent movements of the robotic arm and improving the stability and safety of the movement.
[0103] First, we introduce Lagrange multiplier vectors to transform the constrained optimization problem into an unconstrained Lagrangian function. Then, we take the partial derivatives of this function with respect to the joint angle increment vector and the Lagrange multiplier vectors, and set them equal to zero, thus obtaining a system of linear equations, namely the Caro-Kuhn-Tucker conditions. By analytically solving this linear system, we can directly obtain a closed-form analytical solution for the joint angle increment vector, which simultaneously contains the optimal increments for the six real joints and one virtual joint. This analytical solution method completely avoids the convergence speed, initial value sensitivity, and real-time performance issues that numerical iterative algorithms may face, and can provide a deterministic and computationally efficient optimal solution for each control cycle.
[0104] Furthermore, the secondary planning problem specifically includes:
[0105]
[0106] Where, θ v =[θ1,θ2,θ3,θ4,θ5,θ6,θ7] T , J represents the error increment of the end-effector pose corresponding to the virtual seven degrees of freedom. v Let W be the Jacobian matrix of the virtual seven-DOF robotic arm end effector relative to the base coordinate system, and let W be the weight diagonal matrix, where w1…w7 correspond to Δθ respectively. v 1…Δθ v 7.
[0107] The function is half the square of the L2 norm of the weighted joint angle increment vector. The weight matrix is a 7th-order diagonal matrix, with its diagonal elements corresponding to the weight coefficients of the angle increments for the seven joints (six real joints and one virtual joint). These weight coefficients directly reflect the system's penalty for different joint movements; higher weights mean stronger constraints on the joint's movement, encouraging minimal movement, while lower weights allow for a wider range of motion to complete the main task. Specifically, the weight coefficients corresponding to the virtual joints are dynamically generated by the aforementioned adaptive function and are the core adjustment parameters for implementing the singularity avoidance strategy. The constraint of this optimization problem is a system of linear equations, strictly stipulating that the linear mapping from the seven-dimensional joint angle increment space to the six-dimensional Cartesian pose error space must be satisfied. That is, the end-effector motion calculated using the Jacobian matrix of the virtual seven-DOF manipulator must be exactly equal to the error between the actual pose detected in the current cycle and the desired pose. By solving this optimization problem, the smoothest or most economical motion path in the joint space can be found while strictly ensuring the accuracy of end-effector pose tracking, achieving optimized allocation of joint motion while avoiding singularities.
[0108] Constraints J v Δθ is the Jacobian matrix of the virtual seven-DOF robotic arm's end effector relative to the base coordinate system. The Jacobian matrix describes the linear mapping between the joint space velocity and the end effector's velocity in Cartesian space, reflecting the degree to which minute joint movements affect the end effector's pose change. v It is the joint angle increment vector, that is, the small change in the angle of each joint. Multiplying the Jacobian matrix with the joint angle increment vector means calculating the velocity component (velocity change in Cartesian space) of the corresponding pose change generated at the end effector based on the current joint angle change. It is the error increment of the end effector pose of the virtual seven-DOF robotic arm, representing the expected change in end effector pose (the difference compared to the target pose or the pose in the previous detection cycle).
[0109] The constraints are based on the kinematic mapping relationship of the virtual seven-DOF robotic arm, ensuring that the calculated joint angle increments accurately reflect the desired end-effector pose error increments. In other words, during joint angle optimization, the kinematic relationship of the robotic arm must be maintained, allowing the end-effector to move according to the predetermined trajectory and posture changes. If this constraint is not met, the actual movement of the robotic arm will deviate from the expected direction, failing to accurately complete the task. For example, during grasping operations, inaccurate position and posture of the end effector will prevent effective operation. By incorporating this constraint into a quadratic programming problem, the accuracy and effectiveness of the robotic arm's movement can be guaranteed while optimizing joint motion, enabling it to accurately track the desired trajectory and complete task requirements even under singularity avoidance conditions.
[0110] The elements in the weight matrix W are related to singularity detection, especially w7, which is determined by the degree of wrist and shoulder singularity. The elements in the weight matrix are used to distinguish and adjust the importance of different joint angle increments. During singularity avoidance, the weights will adaptively change according to the degree of singularity. For example, the weight corresponding to virtual axis 7 will be adjusted according to the situation of wrist and shoulder singularities.
[0111] When solving the quadratic programming problem, the weights of different joints are adjusted based on singularities, prioritizing the avoidance of singular configurations during optimization. For example, when approaching a singular point, the weights are adjusted to make the joint angles related to virtual axis 7 more reasonable, thus achieving singularity avoidance. The joint angle increments obtained from solving the quadratic programming problem are the result of comprehensively considering singularity avoidance, kinematic constraints, and optimization objectives. This makes the robotic arm more efficient during movement, avoiding unnecessary energy consumption and time waste. Compared to methods without the above optimization, the robotic arm can complete tasks faster and more stably, improving overall motion efficiency.
[0112] Specifically, the Lagrange multiplier method is used to analytically solve the above quadratic programming problem. First, based on the method of adding virtual joint 7, the Jacobian matrix J of the virtual seven-degree-of-freedom robotic arm is constructed as shown in the following equation.
[0113]
[0114] Where RODB(θ7,axis7)=sin(θ7)I+(1-cos(θ7))axis7,J xyz With J rp These are the Jacobian matrices for the position and attitude components of the original six-DOF robotic arm, respectively.
[0115] At this point, in the quadratic programming problem, besides the variable Δθ vThe remainder is to be determined; all other coefficient matrices have been obtained. The method of obtaining them using the Lagrange multiplier method is shown below.
[0116] First, we introduce the Lagrange multipliers. Then, the Lagrange equation is obtained as follows:
[0117]
[0118] The above equations apply to the variable Δθ respectively. v With the Take the derivative, and set the derivative to 0, as shown in the following equation:
[0119]
[0120] Combining the two equations above, we obtain the following solution:
[0121]
[0122] Finally, after obtaining Δθ v Then, the angle values of each joint of the robotic arm in the next detection cycle are calculated by integration. Based on the angle values of each joint, the movement of the robotic arm is controlled to avoid the shoulder singularity and / or wrist singularity. The above transforms the previously calculated discrete incremental information into continuous joint angle information, providing a basis for subsequent optimization and control.
[0123] Furthermore, after obtaining the angle values of each joint of the robotic arm for the next detection cycle, singularity assessment of the current robotic arm configuration can be performed, calculating the shoulder and wrist singularity discriminants to evaluate whether it is close to a singularity point. Based on the new singularity situation, the weights of virtual axis 7 are updated again using an adaptive adjustment weight function, thereby affecting subsequent kinematic calculations.
[0124] Secondly, the kinematic mapping of the virtual seven-DOF manipulator is re-established. The Jacobian matrix may change due to variations in joint angles, and the error increment of the manipulator's end-effector pose and the calculated joint angle increment vectors are also adjusted according to the new conditions. Then, based on the updated weight matrix (containing the updated weights of virtual axis 7) and the new kinematic mapping, the quadratic programming problem is reconstructed.
[0125] Next, the reconstructed quadratic programming problem is solved again using methods such as the Lagrange multiplier method to obtain a new joint angle increment vector. This process is an iterative optimization process, continuously adjusting the joint angle increment based on the actual motion and singularity state of the robotic arm, enabling the robotic arm to better avoid singularities during movement while ensuring the accuracy and stability of the motion.
[0126] Finally, the steps of singularity assessment, weight update, kinematic mapping reconstruction, and quadratic programming problem solving are repeated until the robotic arm completes the entire motion task or reaches the preset optimization stopping conditions, such as joint angle changes within a certain threshold or end effector errors within an acceptable range. Through iterative optimization, when the robotic arm executes an end effector Cartesian path containing singular regions, it ensures that joint speeds do not change abruptly, sacrificing only end effector posture accuracy. This allows the robotic arm to stably traverse singular regions, effectively improving its performance in complex tasks.
[0127] Please refer to Figure 5 Based on the above control method, the control process for the robotic arm to avoid wrist singularities is as follows: the initial joint angle is [30°, 60°, -30°, -10°, -30°, 10°], the end effector of the original six-degree-of-freedom robotic arm moves downwards along the z-axis by 0.3m, from... Figure 5 It can be observed that during the movement of the robotic arm, joint 5 passes through the zero position, and joints 4 and 6 are coaxial. For example... Figure 6a and Figure 6b As shown, during the unusual movement of the wrist, the joint position trajectory of the robotic arm is smooth and continuous, and the joint speed does not change abruptly.
[0128] Please refer to Figure 7 Based on the above control method, the control process for the robotic arm to avoid shoulder singularities is as follows: the initial joint angle is [-5°, 90°, 0°, 0°, 90°, 0°], the end effector of the original six-axis robotic arm moves 0.15m along the x-direction, from... Figure 7 It can be seen that during the movement of the robotic arm, the wrist position point passes through the extension line of the axis of joint 1. For example... Figure 8a and Figure 8b As shown, during the unusual movement of the robotic arm through the shoulder, the joint position trajectory is smooth and continuous, and the speed of the joint does not change abruptly.
[0129] Accordingly, please refer to Figure 9 A second aspect of the present invention provides a singularity avoidance control device for a six-axis robotic arm based on virtual seven degrees of freedom. The robotic arm has a virtual rotation axis at its end point that coincides with the origin of the end-point coordinate system and is perpendicular to the rotation axis of the end-point coordinate system. The control device includes:
[0130] Data acquisition module 1 is used to acquire the position information, angle information, and actual and expected pose of the end effector of each joint of the robotic arm in the current detection cycle.
[0131] The weight adjustment module 2 is used to adjust the weight value of the virtual rotation axis based on the position and angle information of each joint, combined with the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and to reconstruct the quadratic programming problem for avoiding singularities, and solve to obtain the joint angle increment vector to be executed.
[0132] The robotic arm control module 3 is used to calculate the angle values of each joint of the robotic arm in the next detection cycle based on the joint angle increment vector to be executed, and control the movement of the robotic arm based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm.
[0133] Further, please refer to Figure 10 The weight adjustment module 2 includes:
[0134] Shoulder determination unit 21, which is used to determine that the robotic arm is in a state close to or located at a shoulder singularity when the wrist position point of the robotic arm is located on the extended line of the axis of its joint 1.
[0135] The wrist determination unit 22 is used to determine that the robotic arm is in a state close to or located at a wrist singularity when the joints 4 and 6 of the robotic arm are coaxial.
[0136] Furthermore, the calculation function for adjusting the weight values of the virtual rotation axis is:
[0137]
[0138] Among them, w 7_awayfrom_singularity w is the reference weight when far from the singular configuration. 7_near_singularity The singularity is used as a reference weight when approaching a singular configuration. wrist The angle value of joint 5 of the original six-axis robotic arm is the value. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the singularity region of the robotic arm's wrist. shoulder This is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the extended straight line along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity region of the robotic arm; r H Let z1 be the position vector of the wrist center point in the original six-axis robotic arm base coordinate system, z1 be the unit vector in the direction of the axis of joint 1, and θ5 be the angle value of joint 5.
[0139] Further, please refer to Figure 10 The weight adjustment module includes:
[0140] Problem construction unit 23 is used to construct a quadratic programming problem based on the kinematic mapping of a virtual seven-degree-of-freedom robotic arm.
[0141] Vector calculation unit 24 is used to solve quadratic programming problems based on the Lagrange multiplier method to obtain the angle increment vector of each joint.
[0142] Furthermore, the secondary planning problem specifically includes:
[0143]
[0144] Where, θ v =[θ1,θ2,θ3,θ4,θ5,θ6,θ7] T , J represents the error increment of the end-effector pose corresponding to the virtual seven degrees of freedom. v Let W be the Jacobian matrix of the virtual seven-DOF robotic arm end effector relative to the base coordinate system, and let W be the weight diagonal matrix, where w1…w7 correspond to Δθ respectively. v 1…Δθ v 7.
[0145] Accordingly, a third aspect of the present invention provides a robotic arm, including any of the above-described singularity avoidance control devices for a six-axis robotic arm based on virtual seven degrees of freedom.
[0146] Accordingly, a fourth aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom.
[0147] Accordingly, a fifth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom.
[0148] The embodiments of this invention aim to protect a singularity avoidance control method and device for a six-axis robotic arm based on virtual seven degrees of freedom. The above technical solution has the following effects:
[0149] 1. By introducing a virtual joint that coincides with the origin of the end-effector coordinate system and is perpendicular to the end-effector rotation axis, the six-DOF robotic arm is extended to a seven-DOF system at the control level, effectively utilizing the core characteristic of the seven-DOF robotic arm that has no wrist or elbow singularities. With the assistance of this virtual redundancy, this invention can effectively avoid shoulder and wrist singularities by only moderately sacrificing and optimizing the end-effector posture while strictly ensuring the end-effector position tracking accuracy. This overcomes the problem of losing pose accuracy in the traditional damped least squares method, and significantly improves the trajectory accuracy and practicality of the robotic arm when working near singular regions.
[0150] 2. By adopting an adaptive weight adjustment strategy based on dual singular source discrimination (shoulder singularity and wrist singularity), and dynamically fusing the two key indicators of shoulder singularity proximity and wrist singularity proximity based on a continuous and smooth exponential function, the weight coefficients of virtual joints in the optimization objective function are adjusted in real time. It can automatically and smoothly make the optimal trade-off between "high posture tracking accuracy" and "strong singularity avoidance capability" according to the actual configuration of the robotic arm and the distance to the singular region, avoiding abrupt changes in control parameters and ensuring motion stability. At the same time, it can handle multiple singularity types with a single virtual axis, improving the versatility and efficiency of the algorithm.
[0151] 3. An analytical solution strategy based on the Lagrange multiplier method was adopted to handle the quadratic programming problem constructed to avoid singularities. A closed-form analytical solution with the optimal increment of joint angles was obtained. This fundamentally avoids the shortcomings of common numerical iterative algorithms, such as slow convergence speed, strong sensitivity to initial values, and uncertain computation time. It ensures the real-time performance and reliability of the solution process, greatly improves the response speed and operating efficiency of the entire control system, and meets the stringent requirements of high-speed, high-precision real-time control of the robotic arm.
[0152] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0153] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0154] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0155] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom, characterized in that, The robotic arm has a virtual rotation axis at its end point that coincides with the origin of the end-effector coordinate system and is perpendicular to the rotation axis of the end-effector coordinate system. The control method includes the following steps: Acquire the position and angle information of each joint of the robotic arm, as well as the actual and expected pose of the end effector during the current detection cycle; Based on the position and angle information of each joint, the weight value of the virtual rotation axis is adjusted according to the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and the quadratic programming problem for avoiding singularities is reconstructed to obtain the joint angle increment vector to be executed. Based on the joint angle increment vector to be executed, the angle values of each joint of the robotic arm in the next detection cycle are calculated, and the movement of the robotic arm is controlled based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm. Before adjusting the weight value of the corresponding virtual rotation axis, the method further includes: When the wrist position of the robotic arm is located on the extended line of the axis of its joint 1, it is determined that the robotic arm is in a state of being close to or located at the shoulder singularity. When joints 4 and 6 of the robotic arm are coaxial, it is determined that the robotic arm is in a state close to or located at a wrist singularity. The calculation function for adjusting the weight value of the virtual rotation axis is: in, As a reference weight when far from singular configurations, As a reference weight when approaching a singular configuration, The angle value of joint 5 of the original six-axis robotic arm is closer to 0. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the wrist singularity of the robotic arm. It is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the straight line extending along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity of the robotic arm. Let be the position vector of the wrist center point in the original six-axis robotic arm base coordinate system. Let be the unit vector along the axis of joint 1. The angle value of joint 5 is given. The attenuation coefficient α in the exponential term is a positive adjustable parameter used to control the rate at which the weight changes with the sum of squares of the singular discriminants.
2. The singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom according to claim 1, characterized in that, The reconstruction is a quadratic programming problem used to avoid singularities, and the solution yields the joint angle increment vector to be executed, including: Based on the kinematic mapping of a virtual seven-degree-of-freedom robotic arm, a quadratic programming problem is constructed. The quadratic programming problem is solved using the Lagrange multiplier method to obtain the angle increment vectors for each joint.
3. The singularity avoidance control method for a six-axis robotic arm based on virtual seven degrees of freedom according to claim 2, characterized in that, The quadratic programming problem is specifically as follows: in, , This represents the error increment of the robotic arm's end-effector pose corresponding to the virtual seven degrees of freedom. Let Jacobian matrix be the corresponding Jacobian matrix of the robotic arm's end effector relative to the base coordinate system for a virtual seven-degree-of-freedom robot. This is a weighted diagonal matrix. Corresponding to ; Based on the method of adding virtual joint 7, the Jacobian matrix of the virtual seven-DOF robotic arm is obtained. The construction of is shown in the following formula; ; in, , and These are the Jacobian matrices for the position and attitude components of the original six-DOF robotic arm, respectively. First, we introduce the Lagrange multipliers. Then, the Lagrange equation is obtained as follows: ) The above formulas respectively apply to the variables With the Take the derivative, and set the derivative to 0, as shown in the following equation: =0; =0; Combining the two equations above, we obtain the following solution: ; Finally, after obtaining Then, the angle values of each joint of the robotic arm in the next detection cycle are calculated by integration. Based on the angle values of each joint, the movement of the robotic arm is controlled to avoid the shoulder singularity and / or wrist singularity of the robotic arm.
4. A singularity avoidance control device for a six-axis robotic arm based on virtual seven degrees of freedom, characterized in that, The robotic arm has a virtual rotation axis at its end point that coincides with the origin of the end-effector coordinate system and is perpendicular to the rotation axis of the end-effector coordinate system. The control device includes: The data acquisition module is used to acquire the position information, angle information, and actual and expected pose of the end effector of each joint of the robotic arm during the current detection cycle. The weight adjustment module is used to adjust the weight value of the virtual rotation axis based on the position and angle information of each joint, combined with the state of the robotic arm approaching the shoulder singularity and / or wrist singularity, and reconstruct the quadratic programming problem for avoiding singularities, and solve to obtain the joint angle increment vector to be executed. The robotic arm control module is used to calculate the angle values of each joint of the robotic arm in the next detection cycle based on the joint angle increment vector to be executed, and control the movement of the robotic arm based on the angle values of each joint to avoid the shoulder singularity and / or wrist singularity of the robotic arm. The weight adjustment module includes: A shoulder determination unit is used to determine that the robotic arm is in a state close to or located at a shoulder singularity when the wrist position point of the robotic arm is located on the extended line of the axis of its joint 1. A wrist detection unit is used to determine that the robotic arm is in a state close to or located at a wrist singularity when joints 4 and 6 of the robotic arm are coaxial. The calculation function for adjusting the weight value of the virtual rotation axis is: in, As a reference weight when far from singular configurations, As a reference weight when approaching a singular configuration, The angle value of joint 5 of the original six-axis robotic arm is closer to 0. The closer the value is to 0, the higher the coaxiality of joints 4 and 6, and the closer it is to the wrist singularity of the robotic arm. It is the perpendicular distance between the center point of the wrist of the original six-axis robotic arm and the straight line extending along the axis of joint 1. The closer its value is to 0, the closer it is to the shoulder singularity of the robotic arm. Let be the position vector of the wrist center point in the original six-axis robotic arm base coordinate system. Let be the unit vector along the axis of joint 1. The angle value of joint 5 is given. The attenuation coefficient α in the exponential term is a positive adjustable parameter used to control the rate at which the weight changes with the sum of squares of the singular discriminants.
5. The singularity avoidance control device for a six-axis robotic arm based on virtual seven degrees of freedom according to claim 4, characterized in that, The weight adjustment module includes: Problem construction unit, which is used to construct quadratic programming problems based on the kinematic mapping of a virtual seven-degree-of-freedom robotic arm; The vector calculation unit is used to solve quadratic programming problems based on the Lagrange multiplier method to obtain the angle increment vector of each joint.
6. The singularity avoidance control device for a six-axis robotic arm based on virtual seven degrees of freedom according to claim 5, characterized in that, The quadratic programming problem is specifically as follows: in, , This represents the error increment of the robotic arm's end-effector pose corresponding to the virtual seven degrees of freedom. Let Jacobian matrix be the corresponding Jacobian matrix of the robotic arm's end effector relative to the base coordinate system for a virtual seven-degree-of-freedom robot. This is a weighted diagonal matrix. Corresponding to ; Based on the method of adding virtual joint 7, the Jacobian matrix of the virtual seven-DOF robotic arm is obtained. The construction of is shown in the following formula; ; in, , and These are the Jacobian matrices for the position and attitude components of the original six-DOF robotic arm, respectively. First, we introduce the Lagrange multipliers. Then, the Lagrange equation is obtained as follows: ) The above formulas respectively apply to the variables With the Take the derivative, and set the derivative to 0, as shown in the following equation: =0; =0; Combining the two equations above, we obtain the following solution: ; Finally, after obtaining Then, the angle values of each joint of the robotic arm in the next detection cycle are calculated by integration. Based on the angle values of each joint, the movement of the robotic arm is controlled to avoid the shoulder singularity and / or wrist singularity of the robotic arm.