Methods, apparatuses, and media for controlling a robot
By designing the overall sliding surface and sliding mode controller using a recursive structure, the problem of low trajectory tracking accuracy of robots in complex environments was solved, and rapid convergence and high-precision control of robot trajectories were achieved.
Patent Information
- Application Number
- CN202410931218.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In complex working environments, robots struggle to accurately acquire dynamic models, resulting in low trajectory tracking control accuracy, increased system uncertainty and interference, and difficulty in achieving high-precision trajectory tracking.
A recursive structure is used to design the overall sliding surface, generate a dynamic model, determine the sliding mode controller, and control the robot's joints through a trajectory tracking error control model to achieve rapid convergence of the robot's trajectory.
It improves the accuracy and robustness of robot control, reduces the impact of system uncertainties and disturbances on control accuracy, and achieves rapid convergence of robot trajectory.
Smart Images

Figure CN118893621B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiments of the present disclosure relate to the field of robots, and in particular to a method, device and medium for controlling a robot BACKGROUND
[0002] At present, robots have been widely applied in various fields, such as intelligent manufacturing, medical and catering service fields, etc. Most of the tasks of the robots are completed by tracking a certain trajectory or multiple trajectories. The more complex the task of the robot is, the more complex the operation trajectory of the robot is. Moreover, the complex working environment causes the robot to be interfered by internal and external disturbances in the working process, which leads to the difficulty in accurately obtaining the dynamic model of the robot. Therefore, it is a problem worth paying attention to that how to achieve high-precision trajectory tracking of the robot under system uncertainty and disturbance. SUMMARY
[0003] The embodiments of the present disclosure provide a method, device and medium for controlling a robot.
[0004] In a first aspect, the embodiments of the present disclosure provide a method for controlling a robot, comprising: generating a dynamic model of the robot based on dynamic parameters of the robot; determining an error between an actual position of an end of the robot and a desired position, and establishing a trajectory tracking error control model based on the dynamic model and trajectory tracking; determining a total sliding mode surface with a recursive structure based on the trajectory tracking error; determining a sliding mode controller based on the trajectory tracking error control model and the total sliding mode surface; and controlling joints of the robot by using the sliding mode controller.
[0005] In a second aspect, the embodiments of the present disclosure provide a device for controlling a robot, comprising a processor and a memory storing a computer program, wherein the computer program is executed by the processor to implement the method for controlling a robot in the above embodiments.
[0006] In a third aspect, the embodiments of the present disclosure provide a non-transitory computer storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method for controlling a robot in the above embodiments.
[0007] The method for controlling a robot in the embodiments of the present disclosure adopts a recursive structure to design a total sliding mode surface, and determines a sliding mode controller based on the total sliding mode surface to control the joints of the robot, so that the actual trajectory of the end of the robot coincides with the desired trajectory, the rapid convergence of the trajectory of the robot can be achieved, the adverse effects of system uncertainty and disturbance on the control accuracy of the system are reduced, the robustness and anti-interference ability are stronger, and the control accuracy of the robot is improved.
[0008] Other features and advantages of the present disclosure will be set forth in the description that follows, and in part will be apparent from the description, or can be learned by practice of the present disclosure. Other advantages of the present disclosure will be realized and attained by the solution described in the specification, and will be particularly pointed out in the appended claims. BRIEF DESCRIPTION OF DRAWINGS
[0009] The accompanying drawings are included to provide a further understanding of the technical solution of the present disclosure, and constitute a part of the specification, and are used together with the embodiments of the present disclosure to explain the technical solution of the present disclosure, and do not constitute a limitation on the technical solution of the present disclosure.
[0010] Figure 1 Flowchart of an embodiment of the method for controlling a robot of the present disclosure;
[0011] Figure 2 Flowchart of determining a sliding mode controller in an embodiment of the method for controlling a robot of the present disclosure;
[0012] Figure 3 Flowchart of determining a related parameter of a sliding mode controller in an embodiment of the method for controlling a robot of the present disclosure;
[0013] Figure 4 Flowchart of determining a total sliding mode surface in an embodiment of the method for controlling a robot of the present disclosure. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the embodiments of the present disclosure will be described in detail below with reference to the drawings. It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other at will.
[0015] The embodiments of the present disclosure are not necessarily limited to the sizes shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the true proportions. In addition, the drawings schematically show ideal examples, and the embodiments of the present disclosure are not limited to the shapes or values shown in the drawings.
[0016] In the present disclosure, the ordinal numbers such as "first", "second", etc. are set in order to avoid confusion of the components, and do not represent any order, number or importance.
[0017] In the present disclosure, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood broadly. For example, it can be fixedly connected, or detachably connected, or integrally connected; it can be mechanically connected, or electrically connected; it can be directly connected, or indirectly connected through an intermediate piece, or the communication inside two elements. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to the specific circumstances.
[0018] Figure 1 A flowchart of one embodiment of a method of controlling a robot according to the present disclosure is shown in FIG. 1. Figure 1 As shown, the flow includes the following steps.
[0019] Step 110, generating a dynamics model of the robot based on dynamics parameters of the robot.
[0020] In this embodiment, the dynamics parameters of the robot refer to parameters required for establishing the dynamics model, which can include, for example, link lengths and equivalent masses, etc. Based on the dynamics parameters, the dynamics model of the robot can be determined by the Lagrange method, for example, the dynamics model can be expressed as the following equation (1).
[0021]
[0022] In the equation, represents a joint position vector of the robot, represents a joint velocity vector of the robot; represents a joint acceleration vector of the robot; represents a joint input torque of the robot; represents an inertia matrix of the robot; represents centrifugal force and Coriolis force received by the robot; represents gravity of the robot; represents a sum of system modeling errors and external disturbances existing in the robot.
[0023] Step 120, determining an error between an actual position and a desired position of an end of the robot, and establishing a trajectory tracking error control model based on the dynamics model and the trajectory tracking error.
[0024] In this embodiment, the difference between the desired position and the actual position of the end of the robot (i.e. each joint of the robot) can be taken as the trajectory tracking error. For example, the trajectory tracking error e, the first order derivative of the trajectory tracking error and the second order derivative of the trajectory tracking error can be expressed by the following equation (2).
[0025]
[0026] In the equation, represents a desired position vector of the end of the robot, is a desired joint velocity signal, is a desired joint acceleration.
[0027] Here, the equation (1) can be rewritten as the following equation (3).
[0028]
[0029] Then, combined with the equations (2), (3), a trajectory tracking error control model as shown in equation (4) can be established.
[0030]
[0031] Step 130, based on the trajectory tracking error, determine the total sliding mode surface with recursive structure.
[0032] In this embodiment, the total sliding mode surface can include a plurality of sub-sliding mode surfaces determined by the recursive algorithm, so as to ensure that the sliding mode controller has a faster convergence speed.
[0033] As an example, the first layer sub-sliding mode surface can be determined according to the trajectory tracking error, and then the second layer sub-sliding mode surface is determined based on the first layer sub-sliding mode surface using the recursive structure, and then the total sliding mode surface is determined based on the first layer sub-sliding mode surface and the second layer sub-sliding mode surface.
[0034] Step 140, based on the trajectory tracking error control model and the total sliding mode surface, determine the sliding mode controller.
[0035] As an example, the equivalent control law can be determined according to the trajectory tracking error and the total sliding mode surface, and the sliding mode reaching law (such as constant reaching law or exponential reaching law) is designed, and then the sliding mode controller is obtained by adding the equivalent control law and the sliding mode reaching law.
[0036] Step 150, control the joints of the robot using the sliding mode controller.
[0037] In this embodiment, the joints of the robot are controlled using the sliding mode controller to track and control the trajectory of the end of the robot, and to realize the convergence of the sliding mode surface and the error in two dimensions during the operation of the robot.
[0038] The method for controlling the robot in this embodiment uses recursive structure to design the total sliding mode surface and determines the sliding mode controller to control the joints of the robot, so that the actual trajectory of the end of the robot coincides with the expected trajectory, which can realize the rapid convergence of the robot trajectory, reduce the adverse effects of system uncertainty and disturbance on the control accuracy of the system, has stronger robustness and anti-interference ability, and helps to improve the control accuracy of the robot.
[0039] Generally, the constant reaching law or the exponential reaching law can only realize the stability and convergence of the control system, but the convergence time of the system is related to the initial value of the system, and such reaching law cannot realize global fast convergence. In view of this phenomenon, the above step 140 can adopt Figure 2 the flow shown in the figure to determine the sliding mode controller, Figure 2 shows a flowchart for determining the sliding mode controller in an embodiment of the method for controlling the robot of the present disclosure, asFigure 2 As shown in FIG. 10, the flow includes the following steps.
[0040] Step 210, determining an equivalent control law based on the trajectory tracking error and the total sliding surface.
[0041] Step 220, determining a sliding mode reaching law with a fixed convergence time based on the total sliding surface.
[0042] As an example, the sliding mode reaching law τ with a fixed convergence time can be obtained by the following equation (5). sw .
[0043]
[0044] In the equation, c1>0, c2>0, N1, M1, N2, and M2 are positive odd numbers, and have N1<M1 and N2>M2.
[0045] Step 230, determining a sliding mode controller based on the equivalent control law and the sliding mode reaching law.
[0046] As an example, the sliding mode controller can be obtained by adding the equivalent control law and the sliding mode reaching law.
[0047] In this embodiment, by designing the sliding mode reaching law with a fixed convergence time, the sliding mode controller can achieve global fast convergence within a fixed time when controlling the joints of the robot.
[0048] In some embodiments, the above step 150 can include: determining the related parameters of the sliding mode controller, so that the upper limit of the convergence time of the sliding mode controller is not greater than a preset threshold; and controlling the joints of the robot by using the sliding mode controller with the determined parameters.
[0049] In this embodiment, the related parameters of the sliding mode controller refer to the adjustable parameters related to the convergence time of the sliding mode controller, such as c1, c2, N1, M1, N2, and M2 in equation (3). By adjusting the values of one or more of the parameters, the convergence time of the robot can be increased or decreased. In this way, when the joints of the robot are controlled by the sliding mode controller, the related parameters of the sliding mode controller can be adjusted according to the demand to set the preset threshold, and then the convergence time of the robot can be adjusted, so that the robot can be controlled more flexibly.
[0050] In some optional implementations of this embodiment, the related parameters of the sliding mode controller can be determined by the flow as shown in FIG. 11, and the flow includes the following steps. Figure 3 As shown in FIG. 11, the flow includes the following steps. Figure 3
[0051] Step 310, determining an upper limit of a first time at which the end of the robot converges to 0 on the total sliding surface based on the current parameters in the sliding mode controller.
[0052] In the embodiment, the current parameter of the sliding mode controller refers to the value of the parameter related to the convergence time in the sliding mode controller (for example, each parameter in the sliding mode reaching law) at the current time.
[0053] Step 320, determining an upper limit of the second time for the trajectory tracking error to converge to 0 based on the current parameter in the sliding mode controller.
[0054] Step 330, determining the upper limit of the convergence time of the robot based on the first upper limit of the time and the second upper limit of the time.
[0055] As an example, the upper limit of the convergence time can be the sum of the first upper limit of the time and the second upper limit of the time.
[0056] Step 340, determining the current parameter as the related parameter in the sliding mode controller when the upper limit of the convergence time is not greater than the preset threshold.
[0057] In the embodiment, the related parameter of the sliding mode controller refers to the parameter related to the convergence time in the sliding mode controller when the convergence condition (i.e., the upper limit of the convergence time is not greater than the preset threshold) is met.
[0058] Step 350, adjusting the current parameter and re-determining the corresponding upper limit of the convergence time according to the adjusted parameter until the corresponding upper limit of the convergence time is not greater than the preset threshold when the upper limit of the convergence time is greater than the preset threshold.
[0059] As an example, the corresponding relationship between the first upper limit of the time T1, the second upper limit of the time T1 and the upper limit of the convergence time T1 can be determined by the following formulas (6), (7).
[0060] T1 = σT (6)
[0061] T2 = (1-σ)T (7)
[0062] In the formula, 0<σ<0.5 is an adjustable coefficient, the value of which is related to the convergence speed of the total sliding surface, for example, the smaller the value of σ, the shorter the time for the total sliding surface to converge to 0.
[0063] In the example, on the one hand, by adjusting the parameters in the sliding mode reaching law, the first upper limit of the time and the second upper limit of the time can be adjusted, and then the upper limit of the convergence time of the robot can be adjusted; on the other hand, by adjusting the value of σ, the proportion of the convergence time of the total sliding surface and the convergence time of the error in the total convergence time can be adjusted.
[0064] In Figure 3In the embodiment shown, the upper limit of the convergence time is determined based on the current parameters of the sliding mode controller, the sliding mode controller is determined to meet the convergence condition by comparing the upper limit of the convergence time with a preset threshold, and the parameters of the sliding mode controller are adjusted according to the comparison result to meet the convergence condition, so that the robot can converge rapidly within a fixed time.
[0065] In Figures 1 to 3 In any embodiment shown, when determining the total sliding surface, a fractional order differential operator can also be introduced to further improve the convergence speed, robustness and anti-interference ability of the controller. For example, the total sliding surface can be determined by Figure 4 The flow shown determines the total sliding surface, as shown in Figure 4 The flow shown includes the following steps.
[0066] Step 410, determine the first derivative of the trajectory tracking error.
[0067] Step 420, determine the first layer sub-sliding surface based on the trajectory tracking error, the first derivative and the fractional order differential operator.
[0068] As an example, the Caputo fractional order differential operator D μ Its calculation method is shown in equation (8).
[0069]
[0070] In the formula, μ represents the fractional order of differentiation and has 1>μ>0, p is a positive integer, and Γ(·) is the Gamma function.
[0071] Based on equation (8), the first layer sub-sliding surface s1 can be determined by the following equation (9).
[0072]
[0073] In the formula, k1>0, k2>0; α1, β1, α2, β2 are all positive odd numbers and satisfy α1>β1>0, β2>α2>0, D μ is a fractional order differential operator, e is a trajectory tracking error, is the first derivative determined in step 410.
[0074] Step 430, determine the second layer sub-sliding surface based on the first layer sub-sliding surface using a recursive structure.
[0075] As an example, the second layer sub-sliding surface s2 can be determined by the following equation (10).
[0076]
[0077] In the formula, sign(·) denotes a sign function, k4>0, 1>r>0.
[0078] Step 440, determining a total sliding mode surface based on the first layer sub-sliding mode surface and the second layer sub-sliding mode surface.
[0079] As an example, based on the formulas (8), (9), (10), the total sliding mode surface S can be determined by formula (11).
[0080]
[0081] In the formula, k3>0.
[0082] In Figure 4 In the example shown, the fractional differential operator and the recursive structure are combined, so that the total sliding mode surface has the characteristics of the fractional differential operator and the recursive structure at the same time, which helps to further improve the global convergence speed, robustness and anti-interference of robot control.
[0083] In Figure 4 Based on the implementation shown in the above step 210, the equivalent control law τ can be determined by formula (12). eq .
[0084]
[0085] In the formula, denotes the joint position vector of the robot, denotes the joint velocity vector of the robot; denotes the joint acceleration vector of the robot; denotes the joint input torque of the robot; denotes the inertia matrix of the robot; denotes the centrifugal force and Coriolis force received by the robot; denotes the gravity of the robot; denotes the sum of the system modeling error and external disturbance existing in the robot, ρ1=β1 / α1, ρ2=β2 / α2.
[0086] According to formula (12) and formula (5) in the above step 220, the sliding mode controller τ can be determined by formula (13).
[0087] τ=τ eq +τ sw (13)
[0088] In Figure 4On the basis of the illustrated implementation, the first time upper limit T1 can be determined by the following equation (14), the second time upper limit T2 can be determined by the following equation (15), and the convergence time upper limit T can be determined by equation (16).
[0089]
[0090] T=T1+T2 (16)
[0091] In the formula, c1, c2, N1, M1, N2, M2 are related parameters in the sliding mode controller.
[0092] The following is an exemplary description taken as an example of a double-joint robot. It is assumed that the dynamics parameters of the robot include: the equivalent mass of the connecting rod m1 is 1 kg, the length l1 is 1.2 m; the equivalent mass of the connecting rod m2 is 1 kg, and the length l2 is 1.1 m. The preset threshold is set to 0.35 s.
[0093] Based on the above dynamics parameters, the step 110 can obtain the dynamics model of the double-joint robot:
[0094] Where q=[q1q2] T ,
[0095] g is the acceleration of gravity, and the value is g=9.8 m / s 2 ; d represents the sum of the system modeling error and external disturbance of the robot.
[0096] The robot dynamics model is rewritten as follows: And set the desired position of the robot end as t represents time. And combined with the above robot dynamics model, the trajectory tracking error of the robot can be obtained:
[0097] The total sliding surface S is determined by equations (8), (8), (10) and (11), and the sliding mode controller τ is determined by equations (5), (12) and (13).
[0098] The convergence time upper limit T can be determined by the above equations (14), (15) and (16), and then Figure 3The flow shown adjusts the current parameters of the sliding mode controller, so that the upper limit of the convergence time is not greater than a preset threshold (0.35s), and the final sliding mode controller can be obtained. As an example, the values of the related parameters of the sliding mode controller are as follows: c1=10, c2=10, N1=5, M1=7, N2=13, M2=7, k1=10, k2=10, k3=10, k4=10, r=2, alpha1=11, beta1=9, alpha2=11, beta2=13, mu=0.1, rho1=alpha1 / beta1, rho2=alpha2 / beta2, and the upper limit of the convergence time T obtained at this time is 0.31s. That is, when the double-joint robot is controlled by using the sliding mode controller, convergence (including the convergence of the total sliding surface and the convergence of the error) can be achieved within 0.31s. Compared with the related art, the convergence speed is faster, and the anti-interference performance and the robustness are higher.
[0099] The embodiments of the present disclosure further provide a device for controlling a robot, which comprises a processor and a memory storing a computer program, and the computer program is executable by the processor to implement the method for controlling a robot in any of the above embodiments.
[0100] The embodiments of the present disclosure further provide a non-transitory computer storage medium, which stores a computer program executable by a processor to implement the method for controlling a robot in the above embodiments.
[0101] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, it is common and well understood by those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and can include any information delivery media.
Claims
1. A method of controlling a robot, characterized by, The method comprises: generating a dynamics model of the robot based on dynamics parameters of the robot; determining a trajectory tracking error between an actual position and a desired position of an end of the robot, and establishing a trajectory tracking error control model based on the dynamics model and the trajectory tracking error; determining a total sliding mode surface with a recursive structure based on the trajectory tracking error; determining a sliding mode controller based on the trajectory tracking error control model and the total sliding mode surface; controlling joints of the robot by using the sliding mode controller, so that an actual trajectory of the end of the robot coincides with a desired trajectory; wherein determining the total sliding mode surface based on the trajectory tracking error comprises: determining a first-order derivative of the trajectory tracking error; determining a first-layer sub-sliding mode surface based on the trajectory tracking error, the first-order derivative and a fractional-order differential operator; determining a second-layer sub-sliding mode surface based on the first-layer sub-sliding mode surface using a recursive structure; and determining the total sliding mode surface based on the first-layer sub-sliding mode surface and the second-layer sub-sliding mode surface.
2. The method of claim 1, wherein, determining a sliding mode controller based on the trajectory tracking error control model and the total sliding mode surface comprises: determining an equivalent control law based on the trajectory tracking error control model and the total sliding mode surface; determining a sliding mode reaching law with a fixed convergence time based on the total sliding mode surface; determining the sliding mode controller based on the equivalent control law and the sliding mode reaching law.
3. The method of claim 2, wherein, controlling the joints of the robot by using the sliding mode controller comprises: determining relevant parameters of the sliding mode controller, so that an upper limit of a convergence time of the sliding mode controller is not greater than a preset threshold; controlling the joints of the robot by using the sliding mode controller with the determined parameters.
4. The method of claim 3, wherein, determining the relevant parameters of the sliding mode controller comprises: determining an upper limit of a first time at which an end of the robot converges to 0 on the total sliding mode surface based on current parameters in the sliding mode controller; determining an upper limit of a second time at which the trajectory tracking error converges to 0 based on the current parameters; determining an upper limit of a convergence time of the robot based on the upper limit of the first time and the upper limit of the second time; in a case where the upper limit of the convergence time is not greater than the preset threshold, determining the current parameters as the relevant parameters in the sliding mode controller; in a case where the upper limit of the convergence time is greater than the preset threshold, adjusting the current parameters and re-determining a corresponding upper limit of a convergence time according to the adjusted parameters until the upper limit of the convergence time is not greater than the preset threshold.
5. The method of claim 4, wherein, The fractional differential operator The following formula is used: , wherein The computer program is executed by the processor to implement the method for controlling the robot according to any one of claims 1 to 7. denotes the fractional differentiation order and has 1 The computer program is executed by the processor to implement the method for controlling the robot according to any one of claims 1 to 7. > 0, p is a positive integer, is the Gamma function; the first layer sub-sliding surface using the following equation: , wherein k 1>0, k 2>0; α 1, β 1, α 2, β 2 are positive odd numbers and satisfy α 1> β 1>0, β 2> α 2>0, e is the trajectory tracking error, is the first derivative; The second layer sub-sliding surface Using the following formula: , wherein , denotes the sign function, k 4>0,1> r >0; the total slide surface S using the following equation: , In the formulae, , k 3>0.
6. The method of claim 5, wherein, The equivalent control law Using the following equation: , wherein denotes a joint position vector of the robot, denotes a joint velocity vector of the robot; denotes a joint acceleration vector of the robot; denotes a joint input torque of the robot; denotes an inertia matrix of the robot; denotes centrifugal and Coriolis forces received by the robot; denotes gravity of the robot; denotes a sum of system modeling errors and external disturbances present in the robot, , ; The sliding mode approach Using the following equation: , wherein c 1>0, c 2>0, N 1, M 1, N 2, M 2 is a positive odd number and has N 1 M 1, N 2 M 2; The sliding mode controller Using the following equation: 。 7. The method of claim 6, wherein, the first upper time limit using the following equation: wherein c 1, c 2, N 1, M 1, N 2, M 2 is a relevant parameter in the sliding mode controller; the upper limit of the second time using the following equation: , In the formulae, ; the upper bound on the convergence time T using the following equation: 。 8. An apparatus for controlling a robot, comprising a processor and a memory holding a computer program, characterized in that, 9. A non-transitory computer storage medium storing a computer program, the computer program comprising instructions that when executed by a computer cause the computer to perform:
Citation Information
Patent Citations
Wheeled robot trajectory tracking optimal control method
CN113721607A
A Trajectory Planning Method For Six Degree-of-Freedom Robots Taking Into Account of End Effector Motion Error
US20190184560A1