RNN Based Trajectory Control for Manipulators with Uncertain Kinematic Parameters

Among tracking control of redundant manipulators, potential limitations such as model uncertainties and physical limitations may exist. Conventional solutions may fail when model parameters differ from nominal ones. In this chapter, a novel kinematic controller with the capability of self-adaptation is proposed to address this challenging issue. Based on the coordinate feedback, a Jacobian adaption strategy is ﬁrstly built by updating kinematic parameters online. Using Karush–Kuhn–Tucker conditions, the redundancy solution problem is then turned into a quadratic optimization one, and a recurrent neural network based controller is designed to derive the optimal solution recurrently. Theoretical analysis demonstrates the global convergence of the tracking error. Compared with existing methods, kinematic model uncertainty of the robot is allowed in this chapter, and the pseudo-inverse of Jacobian matrix is avoided, with the consideration of physical limitation in a joint framework. Numerical experiments based on Kinova JACO 2 show the effectiveness of the proposed controller.


Introduction
With the development of mechanics, electronics and computer technology advance, using robot manipulators is becoming popular in modern manufacturing such as welding, painting, assembling, etc [1][2][3][4]. Among these applications, tracking control of manipulators, focusing on the calculation of control actions to drive the robot to move along the user-defined trajectory in Cartesian space, is always a core problem in robot control, and has been studied intensively by researchers in recent decades.
Redundant manipulators have more degrees of freedom (DOFs) than those required to accomplish a given task [5], and have shown great potentials in enhancing robot flexibility, dexterity, and versatility, avoiding obstacles [6][7][8][9], and optimizing energy consumption [10]. However, the nonlinear function description from the joint to Cartesian space, as well as the redundancy in DOFs, makes it a challenging problem to achieve precise tracking control of redundant manipulators.
In recent decades, some results on resolving the redundancy of manipulators have been reported. In most approaches, the problem is solved at the velocity or accelera-2.1 Introduction in fix-point control. As to the tracking control of manipulators, Hou proposes a neural network based control strategy, in which the position/orientation of the robot is described by a unit quaternion, and the network is used to learn the unknown nonlinear part of the system. One main contribution of the research is that singularities associated with three-parameter representation can be avoided. Cheah et al. propose several adaptive controllers for manipulators in different industrial applications, such as visual tracking, force tracking and trajectory tracking [30][31][32][33][34]. In [35], Chen and Zhang design a new adaptive controller in the acceleration level, the basic idea is that the Jacobian matrix is updated in realtime rather than kinematic parameters. One major drawback of the strategy is that the controller requires the actual values of end velocity and acceleration, which may contain noise in actual applications. In order to reduce the influence of noise in sensor feedback, Wang introduces a lowpass filter, and then an adaptive torque calculation controller is designed in the inner loop [36]. Xu develops a modified controller [37], in which the joint command is deigned at the acceleration level. It is verified that the controller does not require measurement of end velocity and joint acceleration. The influence of the control parameters on tracking errors and convergence rate is also discussed. The above methods mainly focus on the uncertain model parameters, and the redundancy of the manipulators is not considered. Despite the pseudo-inverse can be used instead of traditional inverse calculation of Jacobian matrix, the disadvantage of JMPI methods remains unresolved. In order to overcome the limitations based on the JMPI method, researches transform this problem into a quadratic programming problem, with the aim of obtaining an optimal solution with the specified evaluation index under the physical constraint. Physical constraints can be formulated into equation constraints or inequality constraints. Zhang et al. [38] develops a dual neural network to solve quadratic programming problems, and it is shown that this strategy is suitable for redundancy solutions. Based on the idea, a series of research is reported in eliminating the position error accumulation [39], nonconvex optimization [40], acceleration-level compliance [41], parallel robots [42] and multiple robot systems [43].
Inspired by the above literature, in this chapter, we focus on the adaptive tracking problem for redundant manipulators. The remained of this chapter is arranged as below. In Sect. 2.2, fundamental robot kinematics together with useful properties are given, we also show the control objective. In Sect. 2.3, an adaptive Jacobian method is designed by updating kinematic parameters online, and a RNN is used to achieve redundant resolution based on the estimated Jacobian matrix, convergence analysis of the tracking error in Cartesian space is also discussed. In Sect. 2.4, numerical results and comparisons are conducted on a 6DOF robot JACO 2 . Finally, conclusions are drawn in Sect. 2.5. Before ending the introductory section, we highlight the main contributions of this chapter as below: • As far as we know, for the first time, this chapter proposes an RNN based controller via kinematic regressing for redundant manipulator subject to model uncertainties. • Using the Lyapunov theory, the convergence of tracking error is proved in the case of uncertain parameters.
• In this chapter, there is no need to calculate the pseudo-inverse of the Jacobian matrix, which can avoid singularity problems effectively, and also reduce computational load. • The minimum velocity solution is derived by the proposed control scheme, thus the safety of both humans and robots can be also guaranteed.

Robot Kinematics
Without loss of generality, we consider serial robot manipulators in this chapter. The kinematic model for robot manipulators is described as follows: where θ(t) ∈ R n represents the vector of the joint angles at time t, and x(t) ∈ R m represents the Cartesian coordinate vector of the end effector. For a specific robot manipulator, f (•) : R n → R m is used to describe the forward kinematics from joint space to Cartesian space, which is a continuous nonlinear mapping containing kinematic parameters and structure information.
By differentiating x(t) with respect to time t, we can get the relationship between Cartesian velocityẋ(t) ∈ R m and joint velocity (or joint control signal)θ(t) ∈ R n as follows: with J (θ (t), a k ) = ∂ f (θ (t), a k )/∂θ (t) being the Jacobian matrix, and a k ∈ R l denotes the vector of kinematic parameters. Once the physical structure of manipulator is determined, its kinematic equation (2.2) satisfies the following linearization property [43], which describes the relationship between the robot's end velocity and its kinematic parameters: is the function of θ(t) andθ(t), and has no relation with a k .

Control Objective
In this chapter, we consider the task space tracking problem for redundant manipulators, where precise values of kinematic parameters are unavailable. The measurable states are joint angles θ(t) and the end coordinates x(t). The desired Cartesian path x d (t) ∈ R m and its time derivativeẋ d (t) are accessible, both x d (t) andẋ d (t) are bounded. The nominal value of the kinematic parameter vector is also available, which is denoted as a n k . The control objective is to generate joint velocity command in real-time, e.g., designingθ(t) to drive the end-effector of a redundant robot to track x d (t) , in the sense that f (θ (t)) = x(t) → x d (t). During the whole tracking process, velocity of every jointθ i (t) should not exceed its limitsθ i min ,θ i max .

Main Results
In this section, we will show the detailed process of the controller design. When controlling a redundant robot, one important problem is to make use of its flexibility, such as avoiding obstacles, optimizing energy consumption, and avoiding Singularities, etc. In this chapter, when the kinematic controller is designed to achieve task-space tracking in the presence of physical uncertainties, we consider the energy-saving problem at speed level. Therefore, the secondary task in set to minimize the velocity norm u T u. The control strategy consists of three parts: a position controller in the outer-loop, a Jacobian adaption part which is capable of handling kinematic uncertainties online, and an RNN which is used to solve the redundancy resolution problem. The stability of the closed-loop system will be also discussed.

Position Controller
Firstly, a precise measurement of actual coordinate x in real-time t is taken to build the closed-loop system. The difference between the desired path and the corresponding feedback can be defined as In order to make e(t) converge to 0, by using the zeroing dynamics [53], the derivative of e(t) is designed asė with k > 0 being a positive constant scaling the convergence rate of e(t). Combining (2.4) and (2.5) yieldsẋ Letθ(t) = u(t), according to (2.6), if u(t) is properly designed to make the robot's end-effector move at a speed ofẋ(t), in the sense thatẋ(t) = J (θ (t), a k )u(t), the tracking error e(t) in task-space would convergence to zero exponentially.
When a k is unknown, the precise Jacobian matrix described in (2.2) is unavailable. The redundancy solution can not be achieved by using J (θ, a k ). Therefore, we use the estimate Jacobian J (θ (t),â k ) by replacing the unknown parameters a k in J (θ (t), a k ) with its estimateâ k , and the initial value ofâ k is set asâ k (0) = a n k , the estimate error is defined asã k =â k − a k . Using J (θ (t),â k ) and the control signalθ(t), we can estimate the velocity of the end-effector aŝ (2.7) Remarkable that the linearization property described in (2.3) still holds for estimated a k : this property will be used in the following stability proof. The adaptive Jacobian method by updating its kinematic parametersâ k is thus developed aṡ where Γ 1 ∈ R l×l is a diagonal positive definite matrix, e(t) is the tracking error in Cartesian space as defined in (2.4), and u(t) is the bounded joint speed vector satisfying J (θ (t),â k )u(t) =ẋ(t), which will be designed later. Unless otherwise specified, J (θ (t),â k ) is simplified asĴ . with feedback x(t) are fed into the position controller (2.6). The tracking error e(t) and joint speedθ(t) are used to learn the kinematic parameters online by identifier (2.9). According to the output of the position controller, identified parameterâ k , feedback of the manipulator and physical limits, an RNN based controller is used to achieve the redundancy solution problem.

Redundant Solution Using RNN
In this subsection, we focus on redundancy resolution problem based on Jacobian adaption method introduced in Sect. 2.3.1. The main purpose of redundancy resolution is to find an optimal joint speed u(t) to make equation ) hold, at the same time, a secondary task can be also achieved. The redundancy resolution problem can be converted into a quadratic optimization one with specified constraints. To minimize the kinetic energy of the robot, we select velocity norm u T u =θ Tθ as an object function to be optimized, the joint range θ i min ≤ θ i ≤ θ i max and joint speed limitsθ i min ≤θ i ≤θ i max are regarded as inequality constrains. Because J (θ, a k ) is unavailable, we useĴ instead of J (θ, a k ), and rewriteẋ = b 0 . Then the redundancy resolution problem is reformulated as the following quadratic optimization formulations: The convex set ensures the boundedness of both joint angles and speed [44]. According to the Karush−Kuhn−Tucker condition [45], an equivalent description of the optimal solution to the quadratic optimization as shown in (2.10) is described as where λ ∈ R m is a Lagrange multiplier corresponding to the equality constraint. Note that the difference betweenĴ and J would lead to extra error, which will result in tracking failure. To resolve the quadratic optimization problem (2.11), we are ready to present the RNN based controller together with the updating kinematic parameters online:

Remark 2.2
It is worth pointing that although the proposed RNN in (2.12a) and (2.12b) looks similar to existing ones (e.g., [46,47]), the modification is very meaningful. The proposed RNN is capable of handling kinematic uncertainties. When the kinematic parameters a k in known,Ĵ is equal to J , (2.12a) and (2.12b) have the same expression with traditional ones, which shows that a known parameter case is only a special form of our control scheme, thus the proposed RNN is more general. The proposed control scheme offers an important expansion to model uncertainties, which is of universal significance in engineering applications.

Remark 2.3
Using the proposed RNN based controller, the control command u(t) can be derived according to (2.12a), which is capable of optimizing u T u, meanwhile, the projection operation P ω (•) handles inequality constraints. (2.12b) plays an important role in task-space tracking. By referring to (2.12c), we update the Jacobian indirectly by renewing its kinematic parameters online based on the property (2.3), which is different with other Jacobian adaption mathods (e.g., [48]), where joint acceleration is required. The necessary values of our updating law are joint angle θ , joint speed u and tracking error e, therefore, the proposed control strategy can be realized easily.

Convergence Analysis
In this part, we conduct theoretical analysis on the convergence of tracking error under the RNN based tracking controller (2.12a) and (2.12b) along with the kinematic parameter updating law described in (2.12c). Firstly, two Lemmas are offered as below, which will be used in the proof process of convergence analysis.

and the equality holds only if x ∈ [47].
Based on Lemma 1 and 2, we can obtain the following theorem about convergence of tracking error under the proposed redundancy resolution scheme (2.12).

Theorem 2.1
The control error e(t) defined in (2.4) for a redundant manipulator globally converges to 0, provided the RNN based redundancy resolution (2.12a) and (2.12b), along with the kinematic adaptation law (2.12c).
Proof: The convergence analysis includes two parts. Firstly, we will prove that the output u of proposed RNN (2.12a), (2.12b) would reach the optimal solution of (2.11). Secondly, we will show the convergence of tracking error e along with the adaptation law (2.12c). Note that the proof bears similarity to that with known parameters, but the extra dynamics on parameter adaptation makes it necessary to analyze the joint stability, which constructs the main difference of this proof from existing works.
Thus V 2 is a Lyapunov function candidate. Differentiating V 2 with respect to time and combining (2.13) yields: Remarkable that ξ * ∈Ω , according to Lemma 1, inequality According to mean value theorem, we have where ξ ∈ [ξ, ξ * ]. After some mathematical calculations on the following polynomials and substituting (2.23), we have Using the properties (2.14) and (2. Combining inequalities (2.16), (2.24) and (2.25) yieldsV 2 ≤ 0, Notable that ξ = ξ * is the solution of the above equations. Based on LaSalle's invariance principle, we arrive at a conclusion that ξ would gradually reach its equilibrium point ξ * , i.e., u(t) would converge to its optimal solution of redundancy resolution problem (2.10). Part II. Consider the Lyapunov function candidate Differentiating V 3 with respect to time and substituting (2.4), (2.8) and (2.9), we havė (2.27) As proved above, using the neural network (2.12), u T u will be minimized under the constraints b 0 =Ĵ u and u ∈ Ω. Notable thatã T k Y T k (θ, u)e is a scalar value, we havẽ a T k Y T k (θ, u)e = e T Y k (θ, u)ã k . Then (2.27) can be rewritten as (2.28) Then we have e = x d − x is bounded. Taking the time derivative ofV 3 , we have: Since J (θ, a k ) is composed of trigonometric functions of θ and kinematic parameters a k , J (θ, a k ) is bounded.ẋ d is also bounded. As illustrated in part I, u is bounded, thusV 3 is guaranteed to be bounded. Using Barbalat's lemma [52], we haveV 3 → 0 as t → ∞. Then e → 0 as t → ∞. This completes the Proof.

Remark 2.4
The convergence analysis shows the stability of the proposed control strategy. The tracking error would globally convergence to 0. The proof also illustrates that the control command u(t) is ensured u(t) ∈ Ω, ∀t ≥ 0, provided u(0) ∈ Ω, the boundedness of joint speed is thus guaranteed all the time.

Numerical Setup
We consider the position tracking problem in task space, then JACO 2 can thus be regarded as a functional redundant manipulator. The architecture of JACO 2 is shown in Fig. 2.2, and the DH parameters are shown in Table 2.1. Noticing that the last 3 joints of JACO 2 do not intersect at a single point, these joints cannot be simplified as spherical joint, therefore the configuration of JACO 2 is more general than other 6DOF manipulators, e.g., the PUMA 560. The initial state of joint position vector   f The second Cartesian velocity input b 0 (y-axis direction) described by (2.6) and the corresponding output J u (2). g The third Cartesian velocity input b 0 (z-axis direction) described by (2.6) and the corresponding output J u (3). h The Euclidean norm of the manipulator's joint velocity rad/s. The control gain k is set to be 8, and the gain matrix Γ 1 is selected as 0.5I , where I is a 6-dimensional identity matrix (Fig. 2.4).

Fixed-point Regulation
In order to verify the proposed tracking strategy, a set value adjustment experiment is carried out. Set the desired fixed position of the end-effector to [0.3, 0.4, 0.4] T m, select the zoom factor to be = 0.008. The simulation results are shown in Fig. 2.3. The adjustment error converges to zero, and the convergence time is about 0.5s, as shown in Fig. 2.3b. Therefore, the joint angle θ reaches a set of constant values, as shown in Fig. 2.3c. The combined velocity u(t)reaches the limit at the beginning of the simulation, making the end-effector move toward the target as fast as possible, and slowing down rapidly when the end-effector approaches the target. During the whole simulation process, u is guaranteed not to exceed its limit, as shown in Fig.  2.3d. Finally, as shown in Fig. 2.3a, the robot successfully reaches the fixed point under the proposed control scheme.

Circular Trajectory
In this section, tracking of a smooth circular trajectory using the control scheme is carried out. The end effector of JACO 2 is expected to move at an angular speed of 0.5rad/s along a circular trajectory. The desired circle is centered at [0.3, 0.3, 0.3] T with a radius of 0.1732m, and has a revolute angle of 45 • around the x-axis. The scaling coefficient is selected as = 0.008 The convergence time is about 0.5s, which is similar to the regulation case. As shown in Fig. 2.4d, when the simulation begins, the robot moves at the maximum speed when the tracking error is big (Fig. 2.3a), which makes the end effector move close to the desired circle. Then the robot moves at a low speed periodically, and correspondingly, the joint angle θ changes with the same frequency (Fig. 2.4b), meanwhile, the tracking error is already close to zero ( Fig. 2.4a), which means that the robot has successfully tracked the desired circular trajectory with time. According to (2.6), the reference speed vector of the end-effector b 0 can be derived, and its components along x−, y−, and z− directions are shown as blue lines in Fig. 2.4e-g, in which red lines represent the corresponding values ofĴ u. The red lines quickly converge to blue ones, demonstrating that the proposed control strategy is able to track the given trajectory under kinematic uncertainties. The joint velocity norm ||u|| 2 2 is shown in Fig. 2.4h.

Square Trajectory
In this section, the JACO 2 is used to track a square trajectory. The corners of the desired square in the Cartesian space are set to be  of end effectorẋ d (t) remains constant between two adjacent vertices, whileẋ d (t) changes discontinuously at the four corners. The scaling coefficient is selected as = 0.008. Numerical results are shown in Fig. 2.5. In the initial stage, the tracking error approaches zero over time after a short transient state, at the same time, the joint speed remains within the set Ω at all times ( Fig. 2.5d). The output of the position controller (2.6) and the resulting responses under the proposed control scheme along the x−, y−, and z− directions are shown in Fig. 2.5e-g. The red lines converge to blue ones quickly both at the beginning of simulation and after discontinuous change of the desired velocity, and the joint speed also switches at these moments, as shown in Fig.  2.5d. As a result, there exist vibration on the error curve at time t = 3.14, 6. 28, 9.24, 12.56, 15.7, 18.8 s, with the maximum value of [4 × 10 −3 , 2 × 10 −3 , 1.5 × 10 −3 ] T m. The joint velocity norm ||u|| 2 2 is shown in Fig. 2.5h (Table 2.2).

Comparison
In this section, we compare the proposed method with the performance of the existing redundant robot tracking controller as shown in Table 2.2. JMPI [28,35] and RNN policy-based tracking controller [39,40,61,62]. In the reference [28,35] and our study, the exact kinematic model of the robot is not needed, which can be used to solve the kinematic uncertainty problem.The controllers proposed [28,35,40,61] are calculated according to the speed level, while the controllers proposed [39,62] are designed according to the acceleration level.In this chapter, we develop a speed-level controller. The controller obtains the control command in [28,35] by computing the pseudo-inverse of the jacobian. These strategies cannot be used when the robot is in a singular configuration. Although DLS [22] and other improved methods are introduced, the convergence of tracking error of singular configuration cannot be guaranteed, and its physical limitations are not considered. In addition to referencing [62], the initial position of the end-effector can be set randomly in the controller, which needs to be on the desired path when referencing [62]. The controllers kin [39,40,62] based on RNN can guarantee the boundedness of the control command. The three controllers can track the time-varying trajectory, but the position adjustment fails in [62]. In summary, our controller can achieve stable tracking under both regulation and path tracking, and it does not need the accurate kinematic model and pseudo-inverse calculation of the Jacobian matrix, so it has good flexibility and adaptability to the uncertain environment.

Summary
This chapter studies the kinematic control of redundant robots with uncertain kinematics. A dynamic neural network is proposed to solve the redundancy problem by using an adaptive motion identifier to learn motion parameters online. The interaction between the adaptive online identifier and the neural controller makes it a nonlinear coupled system. The global convergence of tracking error is verified by the Lyapunov theory. Numerical experiments and comparisons based on JACO 2 robot arm demonstrate the effectiveness of the algorithm and its superiority over existing algorithms. This method is combined with RNN to realize static and dynamic task space tracking. The pseudo-inverse computation of the Jacobian matrix is avoided and the real-time performance of the controller is guaranteed. The boundedness of joint speed can also protect the robot and improve safety performance. Before concluding this chapter, it is worth pointing out that this is the first dynamic neural model of motion control for a manipulator with adaptive redundancy based on kinematic regression, with demonstrable convergence and guaranteed performance limits.

Appendix
According to (2.3), the analytical expression of JACO 2 s kinematic regressor matrix Y k ∈ R 3×6 is given as follows.  The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.