Method, device, equipment, storage medium and program product for controlling mechanical arm
By constructing predictive control equations and optimizing joint velocities, precise position and attitude synchronization control of the redundant robotic arm end effector is achieved, solving the tracking accuracy problem in complex tasks and improving the applicability and robustness of the robotic arm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LANZHOU UNIV
- Filing Date
- 2022-05-25
- Publication Date
- 2026-06-26
AI Technical Summary
The end effector of a redundant robotic arm lacks sufficient accuracy in following complex and challenging tasks, and existing technologies struggle to achieve precise position and attitude synchronization control.
By constructing predictive control equations for the end effector and obtaining predicted joint velocities, the end effector of the robotic arm is controlled to follow the desired pose at the current moment. The control process is optimized using model predictive control methods, and combined with joint velocity and posture error optimization, synchronous changes in position and posture are achieved.
It improves the tracking accuracy and robustness of the end effector, enabling it to handle complex tasks, expand the applicability of the robotic arm, and reduce the impact of cumulative errors.
Smart Images

Figure CN117162080B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology using artificial intelligence technology, and particularly to a control method, device, equipment, storage medium, and program product for a robotic arm. Background Technology
[0002] In recent years, with the development of robotic arm control technology, robotic arms have found a wider range of applications, such as in homes, services, industries, and laboratories.
[0003] Redundant robotic arms possess more degrees of freedom than conventional robotic arms, enabling them to perform more complex tasks. By replacing the end effector with different ones, redundant robotic arms can accomplish various tasks, such as installation, handling, grinding, painting, drawing, and inspection. However, redundant robotic arms require more complex control methods. To address this, related technologies employ position-following control of the end effector's position, allowing it to move to the desired location.
[0004] However, for complex and challenging tasks, the tracking accuracy of end effectors in related technologies is not high enough. Summary of the Invention
[0005] This application provides a control method, device, equipment, storage medium, and program product for a robotic arm, which can control the end effector of the robotic arm to perform synchronous changes in position and posture (i.e., pose), thereby improving the following accuracy of the end effector and enabling the robotic arm to handle complex and difficult tasks. The technical solution is as follows:
[0006] According to one aspect of the embodiments of this application, a control method for a robotic arm is provided, the method comprising:
[0007] Obtain the desired pose sequence and the predicted pose sequence of the end effector of the robotic arm during the prediction period; wherein, the desired pose sequence includes the desired pose at each sampling time during the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time during the prediction period, the prediction period includes multiple sampling times after the current time, and the sampling time is obtained according to the sampling interval duration.
[0008] Based on the desired pose sequence and the predicted pose sequence, a predictive control equation for the end effector at the current moment is constructed; wherein, the predictive control equation is used to predict the pose following error accumulated by the end effector during the movement of the desired pose in the predicted time period, and the pose following error is used to characterize the difference between the desired pose and the predicted pose.
[0009] Solving the predictive control equations yields the predicted joint velocity of the end effector at the current moment.
[0010] Based on the predicted joint velocity of the end effector at the current moment, the end effector is controlled to follow the desired pose at the current moment.
[0011] According to one aspect of the embodiments of this application, a control device for a robotic arm is provided, the device comprising:
[0012] The pose data acquisition module is used to acquire the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm during the prediction period; wherein, the expected pose sequence includes the expected pose at each sampling time during the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time during the prediction period, the prediction period includes multiple sampling times after the current time, and the sampling time is acquired according to the sampling interval duration.
[0013] The prediction equation construction module is used to construct the predictive control equation of the end effector at the current time based on the expected pose sequence and the predicted pose sequence; wherein, the predictive control equation is used to predict the pose following error accumulated by the end effector during the movement of the expected pose in the prediction period, and the pose following error is used to characterize the difference between the expected pose and the predicted pose.
[0014] The prediction equation solving module is used to solve the prediction control equation to obtain the predicted joint velocity of the end effector at the current moment;
[0015] The robotic arm control module is used to control the end effector to follow the desired pose at the current moment based on the predicted joint velocity of the end effector at the current moment.
[0016] According to one aspect of the embodiments of this application, an apparatus is provided, the apparatus including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described control method for a robotic arm.
[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, the computer program being loaded and executed by a processor to implement the above-described control method for a robotic arm.
[0018] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the device to perform the aforementioned robotic arm control method.
[0019] The technical solutions provided in this application have at least the following beneficial effects:
[0020] By constructing the predictive control equations for the end effector at the current moment based on its desired and predicted poses during the prediction period, and solving for the predicted joint velocity at the current moment, the end effector can follow the desired pose. Compared to simply using the end effector's position for tracking, the technical solution provided in this application improves the tracking accuracy of the end effector. Furthermore, because it can control the robotic arm's end effector to synchronously change its position and orientation, the robotic arm can handle complex and challenging tasks, not just simple ones, thus expanding its applicability and task performance capabilities.
[0021] Furthermore, since a predicted joint velocity needs to be re-determined at each current moment, even if the end effector deviates from the desired pose due to external environmental factors (such as external forces), the embodiments of this application can enable the end effector to quickly return to the desired pose, thereby improving the following robustness of the end effector. At the same time, it avoids the impact of accumulated errors on the following control, further improving the following accuracy of the end effector. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in one embodiment of this application;
[0024] Figure 2 This is a schematic diagram of the structure of a 7-DOF robotic arm provided in one embodiment of this application;
[0025] Figure 3 This is a flowchart of a robotic arm control method provided in one embodiment of this application;
[0026] Figure 4 This is a flowchart of a robotic arm control method provided in another embodiment of this application;
[0027] Figure 5 This is a schematic diagram of a 7-DOF robotic arm performing a drawing task according to an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of the pose following trajectory of a 7-DOF robotic arm provided in one embodiment of this application;
[0029] Figure 7 This is a schematic diagram of the position error change trajectory of a 7-DOF robotic arm during pose following, according to one embodiment of this application.
[0030] Figure 8 This is a schematic diagram of the joint angle change trajectory of a 7-DOF robotic arm during pose following, according to one embodiment of this application.
[0031] Figure 9 This is a schematic diagram of the joint velocity change trajectory of a 7-DOF robotic arm during pose following, according to one embodiment of this application.
[0032] Figure 10 This is a schematic diagram of the joint acceleration change trajectory of a 7-DOF robotic arm during pose following, according to one embodiment of this application.
[0033] Figure 11 This is a schematic diagram of the expected posture change curve and the actual posture change curve of a 7-DOF robotic arm provided in one embodiment of this application;
[0034] Figure 12 This is a schematic diagram of the attitude following error variation curve of a 7-DOF robotic arm provided in one embodiment of this application;
[0035] Figure 13 This is a block diagram of a control device for a robotic arm provided in one embodiment of this application;
[0036] Figure 14 This is a block diagram of a control device for a robotic arm provided in another embodiment of this application;
[0037] Figure 15 This is a structural block diagram of a device provided in one embodiment of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0039] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0040] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0041] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0042] This application's technical solution primarily relates to robotics within artificial intelligence, specifically intelligent robot control. A robot is a mechatronic electronic device that combines mechanical transmission and modern microelectronics technology to mimic certain human skills. Robots have evolved based on electronic, mechanical, and information technologies. A robot doesn't necessarily have to resemble a human; as long as it can autonomously complete tasks and commands assigned by humans, it belongs to the robot family. A robot is an automated machine possessing some intelligent abilities similar to humans or other living organisms, such as perception, planning, movement, and coordination. It is a highly flexible automated machine. With the development of computer and artificial intelligence technologies, robots have seen significant improvements in both functionality and technology. Mobile robots and technologies such as robot vision and touch are typical examples.
[0043] The method provided in this application can be executed by a device, which refers to an electronic device with data computing, processing, and storage capabilities. This device can be a computer device, such as a PC (Personal Computer), tablet computer, smartphone, desktop computer, wearable device, intelligent robot, robotic arm, or other terminal; or it can be a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0044] The technical solutions provided in this application are applicable to any scenario requiring robotic arm control, such as manufacturing, laboratory, home, and medical settings. The robotic arm control method provided in this application can improve the tracking accuracy of the end effector.
[0045] In one example, such as Figure 1 As shown, the robotic arm control system may include a robotic arm 10 and a computer device 20.
[0046] The robotic arm 10 can refer to a multi-degree-of-freedom robotic arm, such as a 6-degree-of-freedom robotic arm, a 7-degree-of-freedom robotic arm, an 8-degree-of-freedom robotic arm, and so on. Regarding the dimensions (i.e., degrees of freedom) required for the operational task, the robotic arm can also possess redundancy, meaning that from both a kinematic and dynamic perspective, there are infinitely many feasible solutions to satisfy an operational task. For example, for an operational task requiring 6 degrees of freedom, a 7-degree-of-freedom robotic arm can be used; this 7-degree-of-freedom robotic arm possesses redundancy.
[0047] The computer device 20 can be a terminal such as a PC, tablet, smartphone, desktop computer, wearable device, or intelligent robot; it can also be a server. The computer device 20 can be used to control the robotic arm 10. The computer device 20 can also be used to store measurement data from the robotic arm 10 (such as joint angles, joint velocities, joint accelerations, etc.), and the computer device 20 can also be used to provide data to the robotic arm 10 (such as desired trajectory, desired pose, etc.).
[0048] The robotic arm 10 and the computer device 20 can communicate via a network, such as a wireless network or a wired network.
[0049] For example, the computer device 20 obtains the predicted joint velocity of the end effector at the current moment based on the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm 10 during the prediction period, and sends the predicted joint velocity at the current moment to the robotic arm 10. The robotic arm 10 then controls the end effector to move according to the predicted joint velocity at the current moment to follow the expected pose at the current moment.
[0050] In other examples, the robotic arm control system may consist only of robotic arm 10, which has the ability to compute, process, and store data. For example, based on the desired pose sequence and the predicted pose sequence of the end effector of robotic arm 10 during the prediction period, robotic arm 10 obtains the predicted joint velocity of the end effector at the current moment, and then controls the end effector to follow the desired pose at the current moment according to the predicted joint velocity at the current moment.
[0051] Please refer to Figure 2 The diagram illustrates a structural schematic of a 7-DOF robotic arm according to an embodiment of this application. The robotic arm 200 includes a robotic arm 201 and an end effector 202.
[0052] The robotic arm 201 includes seven joint axes, such as three shoulder joint axes, one elbow joint axis, and three wrist joint axes. The end effector 202 can be moved by adjusting these seven joint axes. The robotic arm 201 is a 7-DOF redundant robotic arm (i.e., one more degree of freedom than spatial degrees of freedom). Each joint axis of the robotic arm 201 is equipped with sensors, such as position sensors, velocity sensors, and torque sensors. These sensors allow for real-time acquisition of the state of each joint axis (e.g., joint posture, joint force conditions). For example, the robotic arm 201 can employ a modular joint design, with each joint axis equipped with a torque sensor, Hall effect current sensor, and position encoder. These sensors can be used to acquire real-time state information of the joint axis, such as joint angle, joint velocity, joint torque, and joint current (facilitating active compliance, object impedance control, and internal force impedance control of the robotic arm). Each of the seven joint axes of the robotic arm 201 is driven by its corresponding joint drive motor.
[0053] In some examples, artificial tactile skin can be applied to the body of the robotic arm 201, which can be used to acquire information acting on the body of the robotic arm 201 (facilitating full-body compliant control of the robotic arm). Optionally, a vision camera can also be installed on the body of the robotic arm 201, which can be used to acquire visual information in the operation task space.
[0054] The end effector 202 is used to perform operational tasks such as installation, handling, grinding, spraying, drawing, and inspection. Different end effectors can be configured for the robotic arm 200 depending on the operational task. For example, the end effector 202 can be configured as a two-finger gripper, which can be used to perform tasks such as object grasping and handling. The end effector 202 can also be equipped with sensors to acquire its status in real time.
[0055] Optionally, the robotic arm 200 is also provided with an external port for connecting to a computer device. Exemplarily, the computer device may be a NUC (Next Unit of Computing) minicomputer, used to provide control signals for each joint axis of the robotic arm 200 to control the robotic arm 200 to move in a desired posture. These control signals may include predicted joint velocities, predicted joint accelerations, predicted drive currents, etc., for each joint axis at different times. For example, the computer device constructs predictive control equations based on the desired pose sequence and predicted pose sequence of the robotic arm 200 during a prediction period, solves these equations to obtain the predicted joint velocities of the robotic arm 200, and sends these predicted joint velocities to the robotic arm 200. The robotic arm 200 then controls each joint axis based on these predicted joint velocities, thereby controlling the robotic arm 200 to move in the desired posture. In some examples, the robotic arm 200 may have its own control device, which determines the control signals for each joint axis to achieve the same effect.
[0056] Please refer to Figure 3 The diagram illustrates a flowchart of a robotic arm control method according to an embodiment of this application. The execution entity for each step of this method can be... Figure 1 The illustrated solution utilizes a robotic arm 10 or a computer device 20 within its implementation environment. The method may include the following steps (301-304):
[0057] Step 301: Obtain the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm during the prediction period; wherein, the expected pose sequence includes the expected pose at each sampling time during the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time during the prediction period, the prediction period includes multiple sampling times after the current time, and the sampling time is obtained according to the sampling interval duration.
[0058] In this embodiment, the robotic arm can refer to a multi-degree-of-freedom robotic arm, such as a 6-degree-of-freedom robotic arm, a 7-degree-of-freedom robotic arm, an 8-degree-of-freedom robotic arm, etc. The end effector can be used to perform operational tasks, such as installation, handling, grinding, spraying, drawing, and inspection. Different end effectors can be configured for the robotic arm depending on the specific operational task. The robotic arm and end effector are described in the same way as in the above embodiments, and will not be repeated here.
[0059] The desired pose sequence is a sequence obtained by arranging desired poses in a temporal order. The desired pose refers to the pose that the end effector is expected to be in during the operation task. Pose can be used to indicate position and orientation. For example, the pose of the end effector can be used to indicate its position and orientation. The predicted pose sequence is a sequence obtained by arranging predicted poses in a temporal order. The predicted pose refers to the possible poses of the end effector during the operation task. The predicted pose is predicted data (belonging to unknown data). Optionally, the predicted pose at a certain moment can be predicted based on the predicted pose at the previous moment. This process can be represented by the following equation:
[0060] f(σ(k+i))=f(σ(k))+J(σ(k))[σ(k+i)-σ(k)];
[0061] Where i = 1, 2, ..., N, and N is the number of sampling times included in the prediction period. f(σ(k+i)) is the predicted pose of the end effector at the i-th sampling time, σ(k+i) is the predicted joint angle of the robot arm at the i-th sampling time, and k is the current time. f(σ(k)) is the predicted pose of the end effector at the current time, σ(k) is the predicted joint angle of the robot arm at the current time, and J(σ(k)) is the Jacobian matrix of the robot arm.
[0062] The prediction period refers to a specific time period in the future, which can be set and adjusted according to actual usage needs. For example, the prediction period could be the time period starting from the next sampling time of the current time. The sampling time refers to the point in time determined according to the sampling interval, which can also be set and adjusted according to actual usage needs.
[0063] For example, this application embodiment uses the MPC (Model Predictive Control) method to control the robotic arm. The MPC method is a method that uses a model (such as a mathematical equation) to predict the performance of a system (such as a robotic arm) within a certain future time period in order to perform optimized control. In this application embodiment, the prediction time period is that certain future time period, and the predicted pose is the predicted performance of the end effector at each sampling time within that certain future time period.
[0064] For example, taking a prediction period of 10 seconds and a sampling interval of 0.01 seconds as an example, the expected pose sequence includes the expected pose every 0.01 seconds within the next 10 seconds, and the predicted pose sequence includes the predicted pose every 0.01 seconds within the next 10 seconds.
[0065] In one example, the pose corresponding to a position can be represented by a rotation vector, and the position corresponding to the pose can be represented by simple three-dimensional coordinates. For example, the pose corresponding to a position can be represented as follows:
[0066]
[0067] in, Represents the attitude (i.e., the rotation vector). This represents the unit axis of rotation, whose direction is determined by the right-hand rule. This represents the angle of counterclockwise rotation of the end effector around the rotation axis. The superscript T indicates the transpose of the vector or matrix. In the case of e(t) = (x, y, z), This corresponds to (x*θ, y*θ, z*θ). Furthermore... and
[0068] The position corresponding to the pose can be represented in three-dimensional coordinates based on the base of the robotic arm.
[0069] Step 302: Based on the desired pose sequence and the predicted pose sequence, construct the predictive control equation for the end effector at the current time. The predictive control equation is used to predict the pose following error accumulated by the end effector during the desired pose movement in the prediction period. The pose following error is used to characterize the difference between the desired pose and the predicted pose.
[0070] The predictive control equation is used to obtain the predicted joint velocity of the end effector at the current moment, so as to enable the end effector to follow the desired pose at the current moment. For example, the MPC method can be used to construct the predictive control equation of the end effector at the current moment based on each desired pose in the desired pose sequence and each predicted pose in the predicted pose sequence at the current moment. This predictive control equation is the predictive control model of the robotic arm at the current moment. Optionally, a predictive control equation needs to be recalculated at each current moment to achieve the following task of the robotic arm at each current moment.
[0071] Optionally, the predictive control equations may include the sum of pose following errors at each sampling time within the prediction period. The pose following error can refer to the difference between the desired pose and the predicted pose. Minimizing the predictive control equations of the end effector at the current time yields the predicted joint velocity of the end effector at the current time.
[0072] In one example, based on the pose following error in the future time period, the predicted joint velocities (i.e., predicted joint angular velocities) and predicted joint velocity increments of the robotic arm in the future time period can be combined to construct the predictive control equations for the end effector at the current moment, thereby achieving energy consumption control of the robotic arm, such as minimizing its energy consumption. The specific process can be as follows:
[0073] 1. Obtain the predicted joint velocity sequence and the predicted joint velocity increment sequence of the end effector during the control period; wherein, the predicted joint velocity sequence includes the predicted joint velocity at each sampling time during the control period, and the predicted joint acceleration set includes the predicted joint velocity increment at each sampling time during the control period, and the control period is a sub-period of the prediction period.
[0074] The control period can refer to part or all of the prediction period. The starting point of the control period is the same as the starting point of the prediction period, and the sampling interval of the control period is the same as the sampling interval of the prediction period. In other words, the time length corresponding to the control period is less than or equal to the time length corresponding to the prediction period.
[0075] A predicted joint velocity sequence is a sequence obtained by arranging predicted joint velocities in chronological order. Predicted joint velocities refer to the possible joint velocities corresponding to each joint axis of the robotic arm during the operation task. Predicted joint velocity is a predicted data (belonging to unknown data). A predicted joint velocity increment sequence is a sequence obtained by arranging predicted joint velocity increments in chronological order. Predicted joint velocity increments refer to the possible joint velocity increments corresponding to each joint axis of the robotic arm during the operation task. Predicted joint velocity increments are predicted data (belonging to unknown data). Optionally, the predicted joint velocity at a certain moment can be predicted based on the predicted joint velocity at the previous moment. This process can be represented by the following equation:
[0076] u(k+i)=Δu(k+i)+Δu(k+i-1)+...+Δu(k)+u(k-1);
[0077] Where i = 0, 1, 2, ..., N u -1, N u To control the number of sampling times included in the time period, u(k+i) is the predicted joint velocity of the robotic arm at the i-th sampling time, Δu(k+i) is the predicted joint velocity increment of the robotic arm at the i-th sampling time, Δu(k) is the predicted joint velocity increment of the robotic arm at the current time, and u(k-1) is the predicted joint velocity of the robotic arm at the time before the current time. Optionally, the process of obtaining the predicted joint velocity increment can be expressed as follows: Δu(k+i) = u(k+i) - u(k+i-1).
[0078] 2. Based on the desired pose sequence, predicted pose sequence, predicted joint velocity sequence, and predicted joint velocity increment sequence, construct the predictive control equations for the end effector at the current moment.
[0079] Optionally, the predictive control equation can be divided into three parts: the first part corresponds to the predicted joint velocity sequence, the second part corresponds to the predicted joint velocity increment sequence, and the third part corresponds to the desired pose sequence and the predicted pose sequence.
[0080] The process of obtaining the first part can be as follows:
[0081] The predicted joint velocities of the end effector at the current time are obtained. Based on the predicted joint velocities of the end effector at the current time and the predicted joint velocity sequence after removing the last predicted joint velocity corresponding to the control period, the joint velocity optimization equation of the end effector at the current time is constructed. The joint velocity optimization equation is used to characterize each predicted joint velocity from the current time to the penultimate sampling time corresponding to the control period.
[0082] For example, the joint velocity optimization equation of the end effector at the current moment can be expressed as follows:
[0083]
[0084] Where, N u To control the number of sampling times included in the time period, k is used to characterize the current time, and u(k+i) is the predicted joint velocity of the robotic arm at the i-th sampling time. For the Euclidean norm, R1 is the weight matrix for predicting joint velocities. n is the number of joints in the robotic arm.
[0085] The process of obtaining the second part can be as follows:
[0086] The predicted joint velocity increment of the end effector at the current time is obtained. Based on the predicted joint velocity increment of the end effector at the current time and the predicted joint velocity increment sequence after removing the last predicted joint velocity increment corresponding to the control period, the joint velocity increment optimization equation of the end effector at the current time is constructed. The joint velocity increment optimization equation is used to characterize each predicted joint velocity increment from the current time to the penultimate sampling time corresponding to the control period.
[0087] For example, the optimization equation for the joint velocity increment of the end effector at the current moment can be expressed as follows:
[0088]
[0089] Where Δu(k+i) is the predicted joint velocity increment at the i-th sampling time, Δu(k+i) = u(k+i) - u(k+i-1), For the Euclidean norm, R2 is the weight matrix for predicting joint velocity increments.
[0090] The process of obtaining the third part can be as follows:
[0091] Based on the desired pose sequence and the predicted pose sequence, an optimization equation for the pose error of the end effector at the current time is constructed. The pose error optimization equation is used to characterize the pose following error from the next sampling time from the current time to the last sampling time corresponding to the prediction period.
[0092] For example, the pose error optimization equation of the end effector at the current moment can be expressed as follows:
[0093]
[0094] Where N is the number of sampling times included in the prediction period, σ(k+i) is the predicted joint angle of the robotic arm at the i-th sampling time, f(σ(k+i)) is the predicted pose of the end effector at the i-th sampling time, and Ω g (k+i) represents the desired pose of the end effector at the i-th sampling time. This represents the desired position of the end effector at the i-th sampling time. Denotes the desired pose of the end effector at the i-th sampling time, ||·|| Q For the Euclidean norm, Q is the weight matrix for the pose following error.
[0095] f(.): This represents a mapping relationship between the pose of the end effector of a robotic arm and the joint angles of the robotic arm, namely Ω(k)=f(σ(k)).
[0096] Finally, based on the joint velocity optimization equation, the joint velocity increment optimization equation, and the pose error optimization equation, the predictive control equation of the end effector at the current moment is constructed.
[0097] Optionally, the sum of the joint velocity optimization equation, the joint velocity increment optimization equation, and the pose error optimization equation can be determined as the predictive control equation of the end effector at the current moment. For example, the predictive control equation of the end effector at the current moment can be expressed as follows:
[0098]
[0099] in, The equation for pose error optimization is as follows: For the joint velocity optimization equation, The equation for joint velocity increment optimization is given, where N is the number of sampling times included in the prediction period. u To control the number of sampling times included in the time period, k is used to characterize the current time, σ(k+i) is the predicted joint angle of the robotic arm at the i-th sampling time, f(σ(k+i)) is the predicted pose of the end effector at the i-th sampling time, and Ω g (k+i) represents the desired pose of the end effector at the i-th sampling time. This represents the desired position of the end effector at the i-th sampling time. Let u(k+i) represent the desired pose of the end effector at the i-th sampling time, u(k+i) be the predicted joint velocity at the i-th sampling time, and Δu(k+i) be the predicted joint velocity increment at the i-th sampling time, where Δu(k+i) = u(k+i) - u(k+i-1), ||·|| Q , and For the Euclidean norm, Q, R1, and R2 are weight matrices for pose following error, predicted joint velocity, and predicted joint velocity increment, respectively. n is the number of joints in the robotic arm.
[0100] Step 303: Solve the predictive control equations to obtain the predicted joint velocity of the end effector at the current moment.
[0101] The predicted joint velocity of the end effector at the current moment is the control signal (i.e., control quantity) of the robotic arm at the current moment. This predicted joint velocity can include the predicted joint velocities of each joint axis of the robotic arm, so as to control each joint axis of the robotic arm and make the end effector of the robotic arm move according to the desired pose at the current moment.
[0102] In one example, the process of solving the predictive governing equations can be as follows:
[0103] 1. Obtain the joint constraints corresponding to the robotic arm; among which, the joint constraints include joint angle constraints, joint speed constraints, and joint speed increment constraints. The joint angle constraints are used to constrain the joint angles of the robotic arm at each sampling time. The joint speed constraints are used to constrain the joint speeds of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period. The joint speed increment constraints are used to constrain the speed increments of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period.
[0104] For example, the joint angle constraint can be expressed as: σ min ≤σ(k+i)≤σ max , i=1, 2,...,N; where, σ min Let σ be the lower limit sequence of joint angles for each joint axis of the robotic arm. max Let N be the upper limit sequence of joint angles for each joint axis of the robotic arm, N be the number of sampling times included in the prediction period, σ(k+i) be the predicted joint angle of the robotic arm at the i-th sampling time, and k be used to characterize the current time.
[0105] The joint velocity constraint can be expressed as: i = 0, 1, ..., N u -1; where, This is the lower limit sequence of joint velocities for each joint axis of the robotic arm. N is the sequence of upper limits of joint velocities for each joint axis of the robotic arm. u To control the number of sampling times included in the time period, u(k+i) is the predicted joint velocity of the robotic arm at the i-th sampling time.
[0106] The joint velocity increment constraint can be expressed as: i = 0, 1, ..., N u -1; where, This is a sequence of lower limits for joint accelerations along the axes of the robotic arm. Let be the upper limit sequence of joint accelerations for each joint axis of the robotic arm, and Δu(k+i) be the predicted joint velocity increment of the robotic arm at the i-th sampling time. Let τ be the predicted joint acceleration of the robotic arm at the i-th sampling time, and τ be the sampling interval.
[0107] Predicting joint velocity and joint acceleration are control variables, so constraints need to be applied starting from the current moment. However, the joint angles at the current moment are already fixed and do not require further constraints.
[0108] Optionally, for the portion where the control period and the forecast period do not overlap, i.e., k+N u From +1 to k+N, we set Δu(k+i)=0.
[0109] 2. Under joint constraints, the predictive control equations are solved to obtain the predicted joint velocity of the end effector at the current moment.
[0110] Optionally, under joint constraints, minimizing the predictive control equations of the end effector at the current moment yields the predicted joint velocity of the end effector at the current moment. The predicted joint velocity obtained under joint constraints ensures that the robotic arm can safely perform its operational tasks.
[0111] Step 304: Based on the predicted joint velocity of the end effector at the current moment, control the end effector to follow the desired pose at the current moment.
[0112] Optionally, at each current moment, the MPC method needs to be used to re-acquire a predicted joint velocity, and based on the predicted joint velocity at each current moment, the end effector is controlled to follow the desired posture at each current moment to complete the operation task.
[0113] In summary, the technical solution provided in this application constructs the predictive control equations for the end effector at the current moment based on its desired pose and predicted pose during the prediction period, and solves for the predicted joint velocity at the current moment. This predicted joint velocity enables the end effector to follow the desired pose at the current moment. Compared to relying solely on the end effector's position for tracking, the technical solution provided in this application improves the tracking accuracy of the end effector. Furthermore, because it can control the robotic arm's end effector to synchronously change its position and orientation (i.e., pose), the robotic arm can handle complex and challenging tasks, not just simple ones, thereby increasing its applicability and task performance capabilities.
[0114] Furthermore, since a predicted joint velocity needs to be re-determined at each current moment, even if the end effector deviates from the desired pose due to external environmental factors (such as external forces), the embodiments of this application can enable the end effector to quickly return to the desired pose, thereby improving the following robustness of the end effector. At the same time, it avoids the impact of accumulated errors on the following control, further improving the following accuracy of the end effector.
[0115] In addition, by using the MPC method to construct and solve predictive control equations based on pose following error, predicted joint velocity, predicted joint velocity increment, and joint constraints (i.e., joint angle constraints, joint velocity constraints, and joint velocity increase constraints), the following safety of the end effector can be improved and the following energy consumption of the end effector can be reduced.
[0116] In an exemplary embodiment, the solution process of the MPC method can be replaced by a standard quadratic programming problem for solution, that is, the predictive control equations obtained in the above embodiments can be converted into standard quadratic programming equations for solution.
[0117] Please refer to Figure 4 The diagram illustrates a flowchart of a robotic arm control method according to another embodiment of this application. The execution entity for each step of this method can be... Figure 1 The illustrated scheme is implemented in an environment with a robotic arm 10 or a computer device 20. The method may include the following steps (401-406):
[0118] Step 401: Obtain the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm during the prediction period; wherein, the expected pose sequence includes the expected pose at each sampling time during the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time during the prediction period, the prediction period includes multiple sampling times after the current time, and the sampling time is obtained according to the sampling interval duration.
[0119] Step 402: Based on the desired pose sequence and the predicted pose sequence, construct the predictive control equation for the end effector at the current time. The predictive control equation is used to predict the pose following error accumulated by the end effector during the desired pose movement in the prediction period. The pose following error is used to characterize the difference between the desired pose and the predicted pose.
[0120] Step 403: Obtain the joint constraints corresponding to the robotic arm.
[0121] Steps 401 to 403 are the same as those described in the above embodiments. For any content not described in the embodiments of this application, please refer to the above embodiments, and they will not be repeated here.
[0122] Step 404: Transform the joint constraints and predictive control equations to obtain the standard quadratic programming equations corresponding to the predictive control equations and the standard quadratic programming constraints corresponding to the joint constraints.
[0123] Optionally, a first transformation matrix is constructed, wherein the elements of the first transformation matrix are the expected poses at each sampling time within the prediction period.
[0124] For example, the first transformation matrix can be represented as follows:
[0125]
[0126] Among them, Ω k Let Ω(k+N) represent the first transformation matrix at the current time, and let Ω(k+N) represent the desired pose of the end effector at the Nth sampling time.
[0127] Construct a second transformation matrix, the elements of which are the predicted joint angles at each sampling time within the prediction period.
[0128] For example, the second transformation matrix can be represented as follows:
[0129]
[0130] in, Let σ(k+N) represent the second transformation matrix at the current time, and let σ(k+N) represent the predicted joint angle of the robotic arm at the Nth sampling time.
[0131] Construct a third transformation matrix, in which the elements are the predicted joint velocities from the current time to the penultimate sampling time corresponding to the control period.
[0132] For example, the third transformation matrix can be represented as follows:
[0133]
[0134] in, Let u(k+N) represent the third transformation matrix at the current time. u -1) represents the predicted joint velocity of the robotic arm at the penultimate sampling time corresponding to the control period.
[0135] Construct a fourth transformation matrix, in which the elements are the predicted joint velocity increments from the current time to the penultimate sampling time corresponding to the control period.
[0136] For example, the fourth transformation matrix can be represented as follows:
[0137]
[0138] in, This represents the fourth transformation matrix at the current time, Δu(k+N). u -1) represents the predicted joint velocity increment of the robotic arm at the penultimate sampling time corresponding to the control period.
[0139] Construct a fifth transformation matrix, in which the elements are the predicted joint velocities of the previous time step at the current time step.
[0140] For example, the fifth transformation matrix can be represented as follows:
[0141]
[0142] Among them, I u Let u(k-1) represent the fifth transformation matrix at the current moment, and u(k-1) represent the predicted joint velocity of the robotic arm at the previous moment.
[0143] Construct a sixth transformation matrix, the elements of which are the predicted joint angles at the current time.
[0144] For example, the sixth transformation matrix can be represented as follows:
[0145]
[0146] Among them, I σ Let σ(k) represent the sixth transformation matrix at the current moment, and let σ(k) represent the predicted joint angle of the robotic arm at the current moment.
[0147] Construct a seventh transformation matrix, the elements of which represent the predicted pose at the current time.
[0148] For example, the seventh transformation matrix can be represented as follows:
[0149]
[0150] Among them, I f Let f(σ(k)) represent the seventh transformation matrix at the current moment, and let f(σ(k)) represent the predicted posture of the robotic arm at the current moment.
[0151] Construct an eighth transformation matrix, in which each element is the product of the time length corresponding to each sampling moment and the predicted joint velocity at the previous moment.
[0152] For example, the eighth transformation matrix can be represented as follows:
[0153]
[0154] Where V represents the eighth transformation matrix at the current time, and Nτu(k-1) represents the time length corresponding to the Nth sampling time, which is the product of the predicted joint velocity of the robotic arm at the previous time.
[0155] Construct the ninth transformation matrix, which consists of the time length corresponding to each sampling time.
[0156] For example, the ninth transformation matrix can be represented as follows:
[0157]
[0158] Where S represents the ninth transformation matrix at the current time, and Nτ represents the time length corresponding to the Nth sampling time.
[0159] Based on the first, second, third, fourth, fifth, sixth, seventh, eighth, and ninth transformation matrices, the joint constraints and predictive control equations are transformed to obtain the standard quadratic programming equations and standard quadratic programming constraints.
[0160] For example, based on the ninth matrix, a first intermediate matrix is constructed, which can be represented as follows:
[0161] Where I is the identity matrix,
[0162] Based on the fifth, sixth, and eighth matrices, a second intermediate matrix is constructed, which can be represented as follows:
[0163] in,
[0164] make h = vec(h′); where, represents the Kronin product, and vec(·) represents the vectorization operation.
[0165] Thus, the standard quadratic programming equation can be obtained: Standard quadratic programming constraint: Hv≥h.
[0166] Step 405: Under the constraints of standard quadratic programming, the standard quadratic programming equation is solved using a finite-time convergence algorithm to obtain the predicted joint velocity of the end effector at the current moment.
[0167] First, by introducing the slack variable ρ, the standard quadratic programming equation can be rewritten in the following form: The standard quadratic programming constraint can be rewritten as follows: Hv-h+ρ=0.
[0168] By adding another penalty term, the constrained optimization problem above can be transformed into an unconstrained optimization problem:
[0169]
[0170] Where μ > 0 is the penalty factor. Since this standard quadratic programming problem is a convex optimization problem, there exists a globally optimal solution that satisfies the following condition:
[0171]
[0172] Therefore, we can obtain the following equation: Gy + b = 0;
[0173] in,
[0174] Then, by establishing the error function ε=Gy+b, a solver for Gy+b=0 can be designed as follows:
[0175]
[0176] Where ξ>0 is the convergence coefficient, and Φ(·) is derived from Φ i (·) constitutes Φ i (·) is designed in the following form:
[0177]
[0178] Where γ∈(0,1) are design parameters, ε i Let be the i-th element of ε, where α and β are positive parameters, and
[0179] Obtain the solution obtained through the solver, namely the fourth transformation matrix at the current time. The various elements in will The first element Δu(k) is used as the solution result at the current time. Δu(k) = u(k) - u(k-1). Given u(k-1), the predicted joint velocity u(k) of the end effector at the current time can be obtained.
[0180] Step 406: Based on the predicted joint velocity of the end effector at the current moment, control the end effector to follow the desired pose at the current moment.
[0181] Optionally, based on the predicted joint velocity u(k) at the current moment, the corresponding joint axes of the robotic arm are controlled to enable the end effector to follow the desired pose at the current moment.
[0182] In summary, the technical solution provided in this application constructs the predictive control equations for the end effector at the current moment based on its desired pose and predicted pose during the prediction period, and solves for the predicted joint velocity at the current moment. This predicted joint velocity enables the end effector to follow the desired pose at the current moment. Compared to relying solely on the end effector's position for tracking, the technical solution provided in this application improves the tracking accuracy of the end effector. Furthermore, because it can control the robotic arm's end effector to synchronously change its position and orientation (i.e., pose), the robotic arm can handle complex and challenging tasks, not just simple ones, thereby increasing its applicability and task performance capabilities.
[0183] Furthermore, since a predicted joint velocity needs to be re-determined at each current moment, even if the end effector deviates from the desired pose due to external environmental factors (such as external forces), the embodiments of this application can enable the end effector to quickly return to the desired pose, thereby improving the following robustness of the end effector. At the same time, it avoids the impact of accumulated errors on the following control, further improving the following accuracy of the end effector.
[0184] In an exemplary embodiment, taking a 7-DOF robotic arm performing a drawing task as an example, the control method of the robotic arm provided in this application embodiment is described, and its specific content is as follows:
[0185] Obtain the drawing task and the corresponding desired pose. This drawing task refers to drawing a shape on paper by controlling the end effector of the 7-DOF robotic arm. For example, refer to... Figure 5 Based on the desired pose corresponding to the drawing task (such as the desired pose at each sampling moment on the desired trajectory), the end effector of the 7-DOF robotic arm 501 is controlled so that the end effector follows the desired pose and draws the graphic 502.
[0186] Based on the sampling times corresponding to the prediction period, the desired pose at each sampling time is obtained, generating the desired pose sequence of the end effector of the 7-DOF robotic arm within the prediction period. Additionally, the predicted pose at each sampling time is obtained, generating the predicted pose sequence of the end effector of the 7-DOF robotic arm within the prediction period. For example, the prediction period is set to 10 seconds, and the sampling interval is set to 0.01 seconds. Optionally, each sampling time can be set to the current time, or the calculation interval for the predicted joint velocity can be set to be greater than the sampling interval; this embodiment does not limit this.
[0187] Obtain the predicted joint velocity sequence and predicted joint velocity increment sequence of the end effector of the 7-DOF robotic arm during the control period; wherein, the predicted joint velocity sequence includes the predicted joint velocities corresponding to the 7 joint axes at each sampling time during the control period, and the predicted joint acceleration sequence includes the predicted joint velocity increments corresponding to the 7 joint axes at each sampling time during the control period, and the time length corresponding to the control period is less than or equal to the time length corresponding to the prediction period.
[0188] Obtain the joint constraints corresponding to the seven joint axes of the 7-DOF robotic arm. These constraints include joint angle constraints, joint velocity constraints, and joint velocity increment constraints. Joint angle constraints are used to constrain and predict joint angles, joint velocity constraints are used to predict and constrain joint velocities, and joint velocity increment constraints (i.e., joint acceleration constraints) are used to constrain and predict joint velocity increments. For example, the joint angle constraints corresponding to the seven joint axes can be set as follows: σ max = [2.89, 1.76, 2.89, -0.07, 2.89, 3.75, 2.89] T radians, σ min = [-2, 89, -1.76, -2.89, -3.07, -2.89, -0.02, -2.89] T Radius. The joint velocity constraints corresponding to these 7 joint axes can be set as follows: Radius per second. The joint velocity increment constraints for these 7 joint axes can be set as follows: radians / second 2 .
[0189] Using the MPC method, based on the expected pose sequence and predicted pose sequence of the end effector of the 7-DOF manipulator during the prediction period, and the predicted joint velocity sequence and predicted joint velocity increment sequence of the end effector of the 7-DOF manipulator during the control period, the predictive control equation of the end effector of the 7-DOF manipulator at the current moment is constructed.
[0190] The predictive control equations of the end effector of the 7-DOF robot at the current moment are transformed into standard quadratic programming equations of the end effector of the 7-DOF robot at the current moment, and the joint constraints corresponding to the 7 joint axes of the 7-DOF robot are transformed into standard quadratic programming constraints.
[0191] Under the standard quadratic programming constraints corresponding to the 7-DOF manipulator, the standard quadratic programming equation of the end effector of the 7-DOF manipulator at the current time is solved using a finite-time convergence algorithm, and the predicted joint velocities of the 7 joint axes of the 7-DOF manipulator at the current time are obtained.
[0192] Based on the predicted joint velocities of the seven joint axes of the seven-DOF robotic arm at the current moment, the seven joint axes of the seven-DOF robotic arm are controlled so that the end effector of the seven-DOF robotic arm moves with the desired pose at the current moment to draw the graphic.
[0193] The implementation effects of the embodiments of this application are described below.
[0194] refer to Figure 6 This illustration shows a schematic diagram of the pose-following trajectory of a 7-DOF robotic arm provided in one embodiment of this application. The actual trajectory 602 of the end effector of the 7-DOF robotic arm and the desired trajectory (i.e., the predetermined trajectory) 601 of the end effector are in good agreement, and the trajectory change of the end effector of the 7-DOF robotic arm is in a smooth and continuous state, which can well complete the given pose-following task.
[0195] refer to Figure 7 This diagram illustrates the position error trajectory of a 7-DOF robotic arm provided in one embodiment of this application during pose following. Based on the X-direction position error trajectory 701, the Y-direction position error trajectory 702, and the Z-direction position error trajectory 703, it can be seen that the position following error of the end effector of the 7-DOF robotic arm in three-dimensional space is less than 5 × 10⁻⁶. -4 The meter reflects the effectiveness and accuracy of the end effector in tracking position under the technical solution provided in the embodiments of this application.
[0196] refer to Figure 8 This diagram illustrates the joint angle change trajectory of a 7-DOF robotic arm provided in an embodiment of this application during pose following. Based on the joint angle change curves 801 (first joint axis), 802 (second joint axis), 803 (third joint axis), 804 (fourth joint axis), 805 (fifth joint axis), 806 (sixth joint axis), and 807 (seventh joint axis), it can be seen that during pose following, the joint angles of all seven joint axes of the 7-DOF robotic arm do not exceed the joint angle constraint conditions.
[0197] refer to Figure 9 This diagram illustrates the joint velocity change trajectory of a 7-DOF robotic arm provided in an embodiment of this application during pose following. Based on the joint velocity change curves 901, 902, 903, 904, 905, 906, and 907 of the first, second, third, fourth, fifth, sixth, and seventh joint axes, it can be seen that during pose following, the joint velocities of all seven joint axes of the 7-DOF robotic arm do not exceed the joint velocity constraint conditions.
[0198] refer to Figure 10This diagram illustrates the joint acceleration change trajectory of a 7-DOF robotic arm provided in an embodiment of this application during pose following. Based on the joint acceleration change curves 1001, 1002, 1003, 1004, 1005, 1006, and 1007 of the first, second, third, fourth, fifth, sixth, and seventh joint axes, it can be seen that during pose following, the joint acceleration of all seven axes does not exceed the joint acceleration constraint conditions.
[0199] refer to Figure 11 The diagram illustrates the desired posture change curve and the actual posture change curve of a 7-DOF robotic arm provided in one embodiment of this application. The actual rotation vector 1101 in the X direction matches the desired rotation vector 1104 in the X direction, the actual rotation vector 1102 in the Y direction matches the desired rotation vector 1105 in the Y direction, and the actual rotation vector 1103 in the Z direction matches the desired rotation vector 1106 in the Z direction.
[0200] refer to Figure 12 The diagram illustrates the attitude following error variation curves of a 7-DOF robotic arm according to an embodiment of this application. Based on the X-direction attitude following error variation curve 1201, the Y-direction attitude following error variation curve 1202, and the Z-direction attitude following error variation curve 1203, it can be seen that the attitude following error of the end effector of this 7-DOF robotic arm in three-dimensional space is less than 7 × 10⁻⁵ meters, demonstrating the effectiveness and accuracy of the end effector in attitude following the technical solution provided in this embodiment.
[0201] based on Figures 5 to 12 It can be seen that the technical solution provided by the embodiments of this application can effectively improve the following accuracy and safety of the end effector.
[0202] In summary, the technical solution provided in this application constructs the predictive control equations for the end effector at the current moment based on its desired pose and predicted pose during the prediction period, and solves for the predicted joint velocity at the current moment. This predicted joint velocity enables the end effector to follow the desired pose at the current moment. Compared to relying solely on the end effector's position for tracking, the technical solution provided in this application improves the tracking accuracy of the end effector. Furthermore, because it can control the robotic arm's end effector to synchronously change its position and orientation (i.e., pose), the robotic arm can handle complex and challenging tasks, not just simple ones, thereby increasing its applicability and task performance capabilities.
[0203] Furthermore, since a predicted joint velocity needs to be re-determined at each current moment, even if the end effector deviates from the desired pose due to external environmental factors (such as external forces), the embodiments of this application can enable the end effector to quickly return to the desired pose, thereby improving the following robustness of the end effector. At the same time, it avoids the impact of accumulated errors on the following control, further improving the following accuracy of the end effector.
[0204] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0205] Please refer to Figure 13 This diagram illustrates a block diagram of a control device for a robotic arm according to an embodiment of this application. The device has the function of implementing the aforementioned control method for the robotic arm. This function can be implemented in hardware or by hardware executing corresponding software. The device can be the aforementioned equipment or can be installed within an equipment. The device 1300 may include: a pose data acquisition module 1301, a prediction equation construction module 1302, a prediction equation solving module 1303, and a robotic arm control module 1304.
[0206] The pose data acquisition module 1301 is used to acquire the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm during a prediction period; wherein, the expected pose sequence includes the expected pose at each sampling time during the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time during the prediction period, the prediction period includes multiple sampling times after the current time, and the sampling time is acquired according to the sampling interval duration.
[0207] The prediction equation construction module 1302 is used to construct the predictive control equation of the end effector at the current time based on the expected pose sequence and the predicted pose sequence; wherein, the predictive control equation is used to predict the pose following error accumulated by the end effector during the movement of the expected pose in the predicted time period, and the pose following error is used to characterize the difference between the expected pose and the predicted pose.
[0208] The prediction equation solving module 1303 is used to solve the prediction control equation to obtain the predicted joint velocity of the end effector at the current moment.
[0209] The robotic arm control module 1304 is used to control the end effector to follow the desired pose at the current moment based on the predicted joint speed of the end effector at the current moment.
[0210] In one exemplary embodiment, such as Figure 14 As shown, the prediction equation construction module 1302 includes: a velocity data acquisition submodule 1302a and a prediction equation construction submodule 1302b.
[0211] The velocity data acquisition submodule 1302a is used to acquire the predicted joint velocity sequence and the predicted joint velocity increment sequence of the end effector during the control period; wherein, the predicted joint velocity sequence includes the predicted joint velocity at each sampling time during the control period, the predicted joint acceleration set includes the predicted joint velocity increment at each sampling time during the control period, and the control period is a sub-period of the predicted period.
[0212] The prediction equation construction submodule 1302b is used to construct the predictive control equation of the end effector at the current moment based on the expected pose sequence, the predicted pose sequence, the predicted joint velocity sequence, and the predicted joint velocity increment sequence.
[0213] In one exemplary embodiment, the prediction equation construction submodule 1302b is used for:
[0214] Obtain the predicted joint velocity and the predicted joint velocity increment of the end effector at the current moment;
[0215] Based on the predicted joint velocities of the end effector at the current moment, and the predicted joint velocity sequence after removing the last predicted joint velocity corresponding to the control period, an optimization equation for the joint velocity of the end effector at the current moment is constructed; wherein, the joint velocity optimization equation is used to characterize each predicted joint velocity from the current moment to the penultimate sampling moment corresponding to the control period.
[0216] Based on the predicted joint velocity increment of the end effector at the current moment, and the predicted joint velocity increment sequence after removing the last predicted joint velocity increment corresponding to the control period, an optimization equation for the joint velocity increment of the end effector at the current moment is constructed; wherein, the optimization equation for the joint velocity increment is used to characterize each predicted joint velocity increment from the current moment to the penultimate sampling moment corresponding to the control period.
[0217] Based on the desired pose sequence and the predicted pose sequence, an optimization equation for the pose error of the end effector at the current moment is constructed; wherein, the pose error optimization equation is used to characterize the pose following error from the next sampling moment of the current moment to the last sampling moment corresponding to the prediction period.
[0218] Based on the joint velocity optimization equation, the joint velocity increment optimization equation, and the pose error optimization equation, the predictive control equation of the end effector at the current moment is constructed.
[0219] In one exemplary embodiment, such as Figure 14 As shown, the prediction equation solving module 1303 includes: a joint constraint acquisition submodule 1303a and a prediction equation solving submodule 1303b.
[0220] The joint constraint acquisition submodule 1303a is used to acquire the joint constraint conditions corresponding to the robotic arm; wherein, the joint constraint conditions include joint angle constraint conditions, joint speed constraint conditions, and joint speed increment constraint conditions. The joint angle constraint conditions are used to constrain the joint angles of the robotic arm at each sampling time. The joint speed constraint conditions are used to constrain the joint speeds of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period. The joint speed increment constraint conditions are used to constrain the joint speed increments of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period.
[0221] The prediction equation solving submodule 1303b is used to solve the prediction control equation under the joint constraint conditions to obtain the predicted joint velocity of the end effector at the current moment.
[0222] In an exemplary embodiment, the joint angle constraint condition is expressed as: σ min ≤σ(k+i)≤σ max , i=1, 2,...,N; where, σ min Let σ be the lower limit sequence of joint angles for each joint axis of the robotic arm. maxσ(k+i) represents the upper limit sequence of joint angles for each joint axis of the robotic arm, N represents the number of sampling times included in the prediction period, σ(k+i) represents the predicted joint angle of the robotic arm at the i-th sampling time, and k represents the current time.
[0223] The joint velocity constraint condition is expressed as follows: i = 0, 1, ..., N u -1; where, This is the lower limit sequence of joint velocities for each joint axis of the robotic arm. N is the sequence of upper limit joint velocities for each joint axis of the robotic arm. u The number of sampling times included in the control period, u(k+i) is the predicted joint velocity of the robotic arm at the i-th sampling time;
[0224] The joint velocity increment constraint condition is expressed as follows: i = 0, 1, ..., N u -1; where, This is the lower limit sequence of joint accelerations for each joint axis of the robotic arm. Let be the upper limit sequence of joint accelerations for each joint axis of the robotic arm, and Δu(k+i) be the predicted joint velocity increment of the robotic arm at the i-th sampling time. Let τ be the predicted joint acceleration of the robotic arm at the i-th sampling time, and τ be the sampling interval duration.
[0225] In one exemplary embodiment, the prediction equation solving submodule 1303b is used for:
[0226] The joint constraints and the predictive control equations are transformed to obtain the standard quadratic programming equations corresponding to the predictive control equations and the standard quadratic programming constraints corresponding to the joint constraints.
[0227] Under the constraints of the standard quadratic programming, the standard quadratic programming equation is solved using a finite-time convergence algorithm to obtain the predicted joint velocity of the end effector at the current moment.
[0228] In one exemplary embodiment, the prediction equation solving submodule 1303b is further configured to:
[0229] Construct a first transformation matrix, wherein the elements of the first transformation matrix are the expected poses at each sampling time within the prediction period;
[0230] Construct a second transformation matrix, the elements of which are the predicted joint angles at each sampling time within the prediction period;
[0231] Construct a third transformation matrix, the elements of which are the predicted joint velocities from the current time to the penultimate sampling time corresponding to the control period;
[0232] Construct a fourth transformation matrix, the elements of which are the predicted joint velocity increments from the current time to the penultimate sampling time corresponding to the control period;
[0233] Construct a fifth transformation matrix, the elements of which are the predicted joint velocities at the previous time step at the current time step;
[0234] Construct a sixth transformation matrix, the elements of which are the predicted joint angles at the current moment;
[0235] Construct a seventh transformation matrix, the elements of which are the predicted pose at the current time.
[0236] Construct an eighth transformation matrix, wherein the elements of the eighth transformation matrix are the product of the time length corresponding to each sampling time and the predicted joint velocity at the previous time of the current time;
[0237] Construct a ninth transformation matrix, which is composed of the time lengths corresponding to each sampling time.
[0238] Based on the first transformation matrix, the second transformation matrix, the third transformation matrix, the fourth transformation matrix, the fifth transformation matrix, the sixth transformation matrix, the seventh transformation matrix, the eighth transformation matrix, and the ninth transformation matrix, the joint constraints and the predictive control equations are transformed to obtain the standard quadratic programming equations and the standard quadratic programming constraints.
[0239] In summary, the technical solution provided in this application constructs the predictive control equations for the end effector at the current moment based on its desired pose and predicted pose during the prediction period, and solves for the predicted joint velocity at the current moment. This predicted joint velocity enables the end effector to follow the desired pose at the current moment. Compared to relying solely on the end effector's position for tracking, the technical solution provided in this application improves the tracking accuracy of the end effector. Furthermore, because it can control the robotic arm's end effector to synchronously change its position and orientation (i.e., pose), the robotic arm can handle complex and challenging tasks, not just simple ones, thereby increasing its applicability and task performance capabilities.
[0240] Furthermore, since a predicted joint velocity needs to be re-determined at each current moment, even if the end effector deviates from the desired pose due to external environmental factors (such as external forces), the embodiments of this application can enable the end effector to quickly return to the desired pose, thereby improving the following robustness of the end effector. At the same time, it avoids the impact of accumulated errors on the following control, further improving the following accuracy of the end effector.
[0241] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0242] Please refer to Figure 15 The diagram illustrates a structural block diagram of a device provided in one embodiment of this application. This device may be a computer device, a robotic arm, a robot, or a computing device within a robotic arm, etc., and this application does not limit the scope of the embodiment.
[0243] Optionally, such as Figure 15 As shown, the robot includes a processor 1501 and a memory 1502. The processor 1501 includes, but is not limited to, any of the following: CPU (Central Processing Unit), GPU (Graphics Processing Unit), and FPGA (Field Programmable Gate Array). The memory 1502 may include storage devices such as RAM (Random-Access Memory) and ROM (Read-Only Memory). The processor 1501 and the memory 1502 can be connected via a system bus.
[0244] In an exemplary embodiment, the memory 1502 stores a computer program, which is loaded and executed by the processor 1501 to implement the above-described control method for the robotic arm.
[0245] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein a computer program is stored therein, which, when executed by a processor of a device, implements the above-described control method for the robotic arm.
[0246] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0247] In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of the device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the device to perform the aforementioned control method for the robotic arm.
[0248] It should be noted that all information (including but not limited to object device information, object personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the object or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the robotic arm, predictive control equations, and desired attitude involved in this application were all obtained with full authorization.
[0249] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0250] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A control method for a robotic arm, characterized in that, The method includes: The expected pose sequence and predicted pose sequence of the end effector of the robotic arm are obtained during a prediction period. The expected pose sequence includes the expected pose at each sampling time within the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time within the prediction period. The prediction period includes multiple sampling times after the current time. The sampling time is obtained according to the sampling interval. The pose of the end effector is used to indicate the position and orientation of the end effector. The position and orientation of the end effector change synchronously. The orientation is represented by a rotation vector. Based on the desired pose sequence and the predicted pose sequence, an optimization equation for the pose error of the end effector at the current moment is constructed; wherein, the pose error optimization equation is used to characterize the pose following error from the next sampling moment of the current moment to the last sampling moment corresponding to the prediction period. Based on the pose error optimization equation, a predictive control equation for the end effector at the current moment is constructed; wherein, the predictive control equation is used to predict the pose following error accumulated by the end effector during the process of following the desired pose movement within the predicted time period, and the pose following error is used to characterize the difference between the desired pose and the predicted pose. Obtain the joint constraint conditions corresponding to the robotic arm; The joint constraints and the predictive control equations are transformed to obtain the standard quadratic programming equations corresponding to the predictive control equations and the standard quadratic programming constraints corresponding to the joint constraints. Based on the slack variables, adjust the form of the standard quadratic programming equation and the standard quadratic programming constraints to obtain the standard quadratic programming constraints and the standard quadratic programming equation with adjusted form. Based on the penalty term, the standard quadratic programming constraints after form adjustment, and the standard quadratic programming equation after form adjustment, establish the error function; The error function is solved to obtain the predicted joint velocity of the end effector at the current moment; Based on the predicted joint velocity of the end effector at the current moment, the end effector is controlled to follow the desired pose at the current moment.
2. The method according to claim 1, characterized in that, The step of constructing the predictive control equation for the end effector at the current moment based on the pose error optimization equation includes: Obtain the predicted joint velocity sequence and the predicted joint velocity increment sequence of the end effector during a control period; wherein, the predicted joint velocity sequence includes the predicted joint velocity at each sampling time during the control period, and the predicted joint velocity increment sequence includes the predicted joint velocity increment at each sampling time during the control period, and the control period is a sub-period of the predicted period; Based on the pose error optimization equation, the predicted joint velocity sequence, and the predicted joint velocity increment sequence, the predictive control equation for the end effector at the current moment is constructed.
3. The method according to claim 2, characterized in that, The process of constructing the predictive control equations for the end effector at the current moment based on the pose error optimization equation, the predicted joint velocity sequence, and the predicted joint velocity increment sequence includes: Obtain the predicted joint velocity and the predicted joint velocity increment of the end effector at the current moment; Based on the predicted joint velocities of the end effector at the current moment, and the predicted joint velocity sequence after removing the last predicted joint velocity corresponding to the control period, an optimization equation for the joint velocity of the end effector at the current moment is constructed; wherein, the joint velocity optimization equation is used to characterize each predicted joint velocity from the current moment to the penultimate sampling moment corresponding to the control period. Based on the predicted joint velocity increment of the end effector at the current moment, and the predicted joint velocity increment sequence after removing the last predicted joint velocity increment corresponding to the control period, an optimization equation for the joint velocity increment of the end effector at the current moment is constructed; wherein, the optimization equation for the joint velocity increment is used to characterize each predicted joint velocity increment from the current moment to the penultimate sampling moment corresponding to the control period. Based on the joint velocity optimization equation, the joint velocity increment optimization equation, and the pose error optimization equation, the predictive control equation of the end effector at the current moment is constructed.
4. The method according to claim 1, characterized in that, The joint constraints include joint angle constraints, joint velocity constraints, and joint velocity increment constraints. The joint angle constraints are used to constrain the joint angles of the robotic arm at each sampling time. The joint velocity constraints are used to constrain the joint velocities of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period. The joint velocity increment constraints are used to constrain the joint velocity increments of the robotic arm at each sampling time from the current time to the penultimate sampling time corresponding to the control period.
5. The method according to claim 4, characterized in that, The joint angle constraint condition is expressed as follows: ;in, This is the lower limit sequence of joint angles for each joint axis of the robotic arm. Let N be the sequence of upper limit joint angles for each joint axis of the robotic arm, and N be the number of sampling times included in the prediction time period. Let k be the predicted joint angle of the robotic arm at the i-th sampling time, and k be used to characterize the current time. The joint velocity constraint condition is expressed as follows: ;in, This is the lower limit sequence of joint velocities for each joint axis of the robotic arm. N is the sequence of upper limit joint velocities for each joint axis of the robotic arm. u The number of sampling times included in the control period. The predicted joint velocity of the robotic arm at the i-th sampling time; The joint velocity increment constraint condition is expressed as follows: ;in, This is the lower limit sequence of joint accelerations for each joint axis of the robotic arm. This is a sequence of upper limits for joint acceleration along each joint axis of the robotic arm. This represents the predicted joint velocity increment of the robotic arm at the i-th sampling time. Let be the predicted joint acceleration of the robotic arm at the i-th sampling time. The sampling interval duration is denoted as .
6. The method according to claim 1, characterized in that, The transformation of the joint constraints and the predictive control equations to obtain the standard quadratic programming equations corresponding to the predictive control equations and the standard quadratic programming constraints corresponding to the joint constraints includes: Construct a first transformation matrix, wherein the elements of the first transformation matrix are the expected poses at each sampling time within the prediction period; Construct a second transformation matrix, the elements of which are the predicted joint angles at each sampling time within the prediction period; Construct a third transformation matrix, the elements of which are the predicted joint velocities from the current time to the penultimate sampling time corresponding to the control period; Construct a fourth transformation matrix, the elements of which are the predicted joint velocity increments from the current time to the penultimate sampling time corresponding to the control period; Construct a fifth transformation matrix, the elements of which are the predicted joint velocities at the previous time step at the current time step; Construct a sixth transformation matrix, the elements of which are the predicted joint angles at the current moment; Construct a seventh transformation matrix, the elements of which are the predicted pose at the current time. Construct an eighth transformation matrix, wherein the elements of the eighth transformation matrix are the product of the time length corresponding to each sampling time and the predicted joint velocity at the previous time of the current time; Construct a ninth transformation matrix, which is composed of the time lengths corresponding to each sampling time. Based on the first transformation matrix, the second transformation matrix, the third transformation matrix, the fourth transformation matrix, the fifth transformation matrix, the sixth transformation matrix, the seventh transformation matrix, the eighth transformation matrix, and the ninth transformation matrix, the joint constraints and the predictive control equations are transformed to obtain the standard quadratic programming equations and the standard quadratic programming constraints.
7. A control device for a robotic arm, characterized in that, The device includes: The pose data acquisition module is used to acquire the expected pose sequence and the predicted pose sequence of the end effector of the robotic arm during a prediction period. The expected pose sequence includes the expected pose at each sampling time within the prediction period, and the predicted pose sequence includes the predicted pose at each sampling time within the prediction period. The prediction period includes multiple sampling times after the current time. The sampling time is acquired according to the sampling interval. The pose of the end effector is used to indicate the position and orientation of the end effector. The position and orientation of the end effector change synchronously, and the orientation is represented by a rotation vector. A prediction equation construction module is used to construct a pose error optimization equation for the end effector at the current time based on the desired pose sequence and the predicted pose sequence; wherein, the pose error optimization equation is used to characterize each pose following error from the next sampling time of the current time to the last sampling time corresponding to the prediction period; and based on the pose error optimization equation, a prediction control equation for the end effector at the current time is constructed; wherein, the prediction control equation is used to predict the pose following error accumulated by the end effector during the movement of the desired pose within the prediction period, and the pose following error is used to characterize the difference between the desired pose and the predicted pose; The prediction equation solving module is used to obtain the joint constraints corresponding to the robotic arm; transform the joint constraints and the predictive control equation to obtain the standard quadratic programming equation corresponding to the predictive control equation and the standard quadratic programming constraints corresponding to the joint constraints; adjust the form of the standard quadratic programming equation and the standard quadratic programming constraints according to the slack variables to obtain the form-adjusted standard quadratic programming constraints and the form-adjusted standard quadratic programming equation; establish an error function according to the penalty term, the form-adjusted standard quadratic programming constraints, and the form-adjusted standard quadratic programming equation; solve the error function to obtain the predicted joint velocity of the end effector at the current moment; The robotic arm control module is used to control the end effector to follow the desired pose at the current moment based on the predicted joint velocity of the end effector at the current moment.
8. A device, characterized in that, The device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the control method of the robotic arm as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the control method of the robotic arm as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor reads from and executes the computer instructions to implement the control method of the robotic arm as described in any one of claims 1 to 6.