An Adaptive Time-Varying Impedance Controller for Manipulators

Aiming at the situation that the structural parameters of the general manipulators are uncertain, a time-varying impedance controller based on model reference adaptive control (MRAC) is proposed in this article. The proposed controller does not need to use acceleration-based feedback or to measure external loads and can tolerate considerable structure parameter errors. The global uniform asymptotic stability of the time-varying closed-loop system is analyzed, and a selection approach for control parameters is presented. It is demonstrated that, by using the proposed control parameter selection approach, the closed-loop system under the adaptive controller is equivalent to an existing result. The feasibility of the presented controller for the general manipulators is demonstrated by some numerical simulations.


INTRODUCTION
The control issues of a multi-degree-of-freedom (multi-DOF) mechanical system with force and motion task constraints are significant for many advanced practical applications, such as minimally invasive surgeries (Burgner-Kahrs et al., 2015), rehabilitation nursing (Jutinico et al., 2017;Ansari et al., 2018), in-situ inspection, and machining for the repair of aeroengine parts (Dong et al., 2017;Su et al., 2020), life rescues (McMahan et al., 2006), teleoperation based on haptic interfaces (Sharifi et al., 2016), etc. The operation tasks with force and motion constraint include force-position approximately decoupled operation tasks and more general force-position coupled operation tasks. With regard to the operation task with decoupling force and motion constraint, the closed-loop control system can be stabilized through hybrid force/motion control strategies (Yip and Camarillo, 2016). As to the task with coupling force and motion constraints, in general, an impedance controller has to be utilized to track the time-varying trajectories of the constraint task (Kronander and Billard, 2016). At present, most researches focus on the invariant impedance control of the robot system. The adjustment range of the manipulator's dynamic characteristics under the invariant impedance controller is limited, and it can only complete some rough humanmachine cooperation/coordination tasks. For mechanical assembly tasks, especially for those relatively precise assembly operations, such as bearing press-mounting and quantitative fastening of screws/nuts, it is necessary to accurately control the position and pose of the end-effector in the direction of force, as well as the force/torque during the operations. Therefore, the application of invariant impedance control is relatively limited, and the timevarying impedance control has important practical application requirements in engineering tasks. Since the time-varying impedance control has extensive and important application requirements in complex systems or high-level applications such as the universal operation of industrial robots, the interactive motion of rehabilitation robots, human-machine fusion control of exoskeleton robots, telepresence teleoperation robots, etc., in recent years, scholars have conducted related research on timevarying impedance control. The time-varying impedance closedloop system is a kind of time-varying dynamic system, and it is difficult to analyze its global or large range asymptotic stability. The integration of robotics and artificial intelligence promotes the development of controllers under time-varying operation tasks (Su et al., 2018;Wu et al., 2021a,b). The theoretical and practical research of artificial intelligence control methods based on fuzzy control, neural network and other theories have been carried out internationally for more than 30 years (Deng et al., 2021a,b;Wu et al., 2021c,e). Artificial intelligence control methods often use large-scale inference rule bases or network structures with a large number of nodes and layers in order to ensure their large-scale effectiveness. Due to their good learning ability, artificial intelligence methods are often used in the cognitive science of human-machine interaction systems (Wu et al., 2020b(Wu et al., , 2021d. In practical engineering applications, the control systems often encounter comprehensive characteristics such as strong non-linearity, uncertainty, and time-varying parameters (Liu et al., 2020;Liang et al., 2021b), which will affect the stability of the system. Because the accurate dynamic modeling of the robot system is rather hard, which brings difficulties to the control law design of the system and reduces the dynamic characteristics of the closed-loop system, it is difficult for the robot to achieve high-quality practical applications. Adaptive control and its improvement Liu et al., 2021b), sliding mode control and its improvement (Zhai and Xu, 2021), non-linear feedback control and its improvement, observers and its improvement (Liang et al., 2021a;Li et al., 2021;Liu et al., 2021a), and other methods (Yang et al., 2021) can be used to solve this problem. In literature (Li, 2021), a novel command filter adaptive tracking controller is designed to achieve asymptotic tracking for a class of uncertain nonlinear systems with time-varying parameters and uncertain disturbances by introducing a smooth function with positive integrable time-varying function to compensate the unknown time-varying parameters and uncertain disturbances. In this article, we study adaptive time-varying impedance controllers. In recent years, adaptive impedance control problems have attracted the attention of many scholars due to the wide and different application requirements (Xu et al., 2011;Jamwal et al., 2017), such as the relevant developments about haptic interfaces (Sharifi et al., 2016), upper/lower limb rehabilitation robots (Li et al., 2017;Liu et al., 2017), robotic exoskeleton systems (Hussain et al., 2013), and so on (Wu et al., 2020a;Deng et al., 2021b). At present, most research studies on adaptive impedance control are actually focused on online "impedance planning, " which means online searching for a target impedance profile for the purpose of improving the application effects of robots. The stability issues of the time-varying closed-loop systems with regard to the target impedance profile are not analyzed except few works (Ferraguti et al., 2013;Kronander and Billard, 2016). In some application-oriented research studies, experiments are always used to demonstrate the stability of the controlled plants (Hamedani et al., 2019;Pena et al., 2019;Perez-Ibarra et al., 2019). However, demonstrating the stability of an adaptive impedance control system by experiments is commonly task-depended, and different operating tasks require different experiments to verify the stability of the system. Therefore, an analysis or control method that can ensure the stability of the time-varying impedance control system is required. To this end, the literature (Kronander and Billard, 2016) and (Ferraguti et al., 2013) addressed this issue. Through an in-depth analysis of the method presented in Ferraguti et al. (2013), the literature (Kronander and Billard, 2016) presented the stability conditions for the variable damping and stiffness system, and the proposed stability conditions do not rely on the controlled plant's states. The benefit of the stability conditions is that they can be verified offline before performing a task. However, this approach has two main shortcomings: (1) accurate dynamics model of the controlled plant is needed in the controller; and (2) measurement of external loads or joint accelerations is required in the controller.
In this article, aiming at the above two problems, a globally uniform stability condition is proposed in which the variable damping and stiffness are independent of the state of the robot. As we all know, the closed-loop system under an adaptive impedance controller is actually a time-varying dynamic system, and it is also a complex non-linear system, which makes it difficult to design the controller. To be specific, the main contribution of this article is summarized as follows: 1) In this article, we use variable damping and stiffness control to adjust damping and stiffness parameters to improve compliant operation performance and use adaptive control to adjust the parameters to achieve the stability of the system when the system parameters are disturbed. 2) Under the frame of model reference adaptive control (MRAC), the rigorous canonical reduction form of the dynamics of the general robot system can be transformed into linear or special non-linear "recursive canonical form." By using the recursive canonical expression and the design method of the time-varying impedance controller of the linear system, the analytical expression of the parameter adaptive regulation law can be obtained, and the time-varying impedance controller with parameter adaptive characteristics can be designed. 3) The time-varying impedance controller is reconstructed under the frame of MRAC, and the stability condition given in Kronander and Billard (2016) remains unchanged. Therefore, the stability condition under the adaptive control frame is still state independent, while the above two shortcomings are eliminated.
The remainder of this article is organized as follows. Section 2 presents the stability condition provided by Kronander and Billard (2016), since it does not depend on any controllers. Section 3 presents our main contributions, the time-varying impedance controller based on MRAC and a control parameter selection approach. As an example, the method is tested through an uncertain planar 2R manipulator in section 4. Section 5 gives the conclusions.

EXISTING TIME-VARYING IMPEDANCE CONTROLLER FOR MANIPULATORS
In general, the dynamic equation of the manipulators has the following form where ∈ ℜ n represents the generalized coordinates of the manipulator in configuration space, M( ) ∈ ℜ n×n represents the inertial matrix of the system, C( ,˙ )˙ ∈ ℜ n represents centrifugal and Coriolis torque vector, N( ) ∈ ℜ n represents the gravity and elastic force vector, τ e ∈ ℜ n represents an equivalent torque caused by the external forces, while τ a ∈ ℜ n represents the actuation torque.
For time-varying impedance control issues, the closed-loop target dynamic equation of a manipulator can be given as follows where¯ = − d is defined to be an error vector of the generalized coordinates and d denotes the desired position of the generalized coordinates, H denotes a positive definite and symmetric constant matrix, D(t) denotes a time-varying damping matrix, and K(t) denotes a time-varying stiffness matrix. Both of D(t) and K(t) are also positive definite and symmetric. Usually, K(t) should be determined by the designated operation tasks, and D(t) should be selected to ensure the global asymptotic stability at the origin (¯ ,˙ ) = (0, 0) of the closed-loop system (2) when the equivalent external torque satisfies τ e = 0. If the equivalent external torque τ e does not equal to zero, then the origin (¯ ,˙ ) = (0, 0) of the closed-loop system (2) should be globally stable in Lyapunov's sense. An elegant result of designing a time-varying impedance controller of the manipulator can be stated as Lemma 1, which is an adapted result that was first presented in the literature (Kronander and Billard, 2016). Lemma 1. For the dynamic systems (1) and the target system (2), suppose the stiffness matrix K(t) is continuous, thenK(t) is bounded, which means K (t) ≤ , where is a positive constant. Then there exists a positive constant α and a matrix D(t) satisfying the following set of inequalities which makes the following closed-loop system globally uniformly asymptotically stable at the origin (¯ ,˙ ) = (0, 0) when τ e = 0. When τ e = 0, then the origin (¯ ,˙ ) = (0, 0) is globally uniformly stable.

REMARK 1. By applying a Lyapunov candidate function
it is not hard to show that the first two inequalities in (3) are used to ensure the positive definiteness of Lyapunov function V(˙ ,¯ , t), and the last two inequalities in (3) can ensure the negative definiteness ofV(˙ ,¯ , t). Furthermore, by proving the function V(˙ ,¯ , t) is also a decrescent function, then the global uniform asymptotic stability of the closed-loop system (2) can be concluded. For the purpose of simplifying control parameters selection, in He et al. (2020) the authors presented a simple stability condition where ε > 0 is a small constant and I denotes an identity matrix. Even though the damping matrix given in (5) shows certain conservatism for some applications, it is sufficient to show that the solution of the inequality group (3) exists.

REMARK 2.
Note that the torque controller τ a (t) in (4) uses acceleration feedbacks, and the dynamics model (1) is supposed to be accurate. In real world applications, these two points may not be easily achieved, since the acceleration sensors are not standard accessories for many manipulators and it is also rather difficult to accurately determine the dynamics parameters of a multi-DOF mechanical system. In the next section, it will be shown that these problems can be resolved by developing an MRAC based time-varying impedance controller.

A MRAC BASED TIME-VARYING IMPEDANCE CONTROLLER FOR MANIPULATORS
For a controlled system with an adaptive controller, in general, the uniformly asymptotical stability of the closed-loop system cannot be concluded by following the same method as that provided in Remark 1. The main reason is that a parameter estimation law is also included in the closed-loop system besides a control law, such that the Lyapunov candidate function cannot be constructed as that presented in Remark 1. On the contrary, the following lemma (Slotine and Li, 1991) can be utilized to analyze the uniformly asymptotical stability of a closed-loop system with an adaptive controller.
LEMMA 2. If a scalar function V(t) has the following properties, then lim t→∞V (t) → 0.
Now, we derive the adaptive time-varying impedance controller. First, we define a virtual velocity error vector where ∈ ℜ n×n is a symmetric and positive definite matrix, or more generally a matrix so that − is Hurwitz,¯ ∈ ℜ n , and the virtual reference velocity˙ r ∈ ℜ n in Equation (6) is defined aṡ It is well known that the dynamics of a mechanical system commonly satisfies the linearly parameterized property, that is, the left-hand side of the dynamic system (1) can be expressed as the following form where χ( ,˙ ,¨ ) denotes a matrix, ρ denotes an unknown parameter vector that describes the mass properties of a mechanical system. If we replace the differential variables˙ and of the system (1) with the virtual reference velocity˙ r and its differential variable¨ r , then the linearly parameterized property does not change, and the resulted virtual dynamic system can also be expressed as a similar form M( )¨ r + C( ,˙ )˙ r + N( ) − τ e = χ( ,˙ ,˙ r ,¨ r )ρ. (9) By applying the linearly parameterized form Equation (9), we can obtain the following result. THEOREM 1. For the dynamic systems (1), by applying the following controller and the following parameter estimatoṙ where K D in Equation (10) is a continuous positive definite matrix, i.e.,K D is bounded,ρ denotes the estimation of ρ, and the matrix Ŵ in Equation (11) is also positive definite, then the origin (¯ ,˙ ) = (0, 0) of the closed-loop system is globally uniformly asymptotically stable when the external loads τ e = 0. If the external loads τ e = 0, the origin (¯ ,˙ ) = (0, 0) of the system Equation (12) is globally uniformly stable in the Lyapunov's sense.
PROOF. Let us defineρ =ρ − ρ to be an error vector of the parameter estimatesρ and select a Lyapunov candidate function By using the definition of the virtual velocity error vector given by Equation (6), the time derivative of Equation (13) can be given aṡ (14) SinceṀ − 2C is a skew-symmetric matrix (Murray et al., 1994), which means that Ṁ − 2C T = − Ṁ − 2C , we havė and since M is a symmetric and positive definite (Murray et al., 1994), which means that M = M T , then from Equation (15) we can getṀ By using the equation above, Equation (14) can be written aṡ Referring to the dynamics Equation (1), it is easy to obtain and from (6) we can obtain˙ = s +˙ r .
Substituting Equations (20) into (19) and then bringing Equations (19) into (18), it can be shown thaṫ Due toρ =ρ −ρ and ρ is a constant for any manipulator system, we haveρ =ρ. Therefore, Equation (21) follows thaṫ By applying the linearly parameterized form Equation (9), Equation (22) can be expressed aṡ Frontiers in Neurorobotics | www.frontiersin.org If we adopt the controller Equation (10), it is straightforward that the Equation (23) can be rewritten aṡ (24) By using the parameter estimator Equation (11), which is given asρ = −Ŵ −1 χ T s, then we can obtaiṅ since K D is positive definite. This implies V(t) ≤ V(0), and therefore, both of the vectors s andρ are bounded [see Equation (13)]. To observe the uniform continuity of the functionV(t), we calculate the second order differential function of V(t), and it can be written asV See definition Equation (6), it shows the vector s is smooth. On the other hand, the differential matrixK D is supposed to be bounded. Then we can conclude thatV(t) is bounded. According to Lemma 2, we can get lim t→∞V (t) → 0, which means s → 0 as t → ∞. It is obvious thatṡ is bounded. On the surface s = 0, referring to the definition s =˙ + ¯ , we can conclude the origin (¯ ,˙ ) = (0, 0) of the closed-loop system Equation (12) is uniformly asymptotically stable since − is Hurwitz. In addition, the function V(t) is unbounded, thus the stability of the closed-loop system is globally effective.
REMARK 3. Theorem 1 shows that both the control law Equation (10) and the parameter estimator (11) only use state feedback s =˙ + ¯ . This is helpful for improving the feasibility of the controller in real world applications. In particular, the adaptive controller does not need an accurate dynamic model, thus better robust stability of the closed-loop system Equation (12) could be expected. REMARK 4. Even though Theorem 1 gives an adaptive controller for the dynamic system Equation (1), so far the adaptive controller is not related to the time-varying impedance control issues of the manipulators. By using the following result, we can get that the time-varying impedance control problems can be resolved under the adaptive control strategy. THEOREM 2. If the control parameters and K D of the adaptive controller Equation (10) are chosen as where γ > 0 is a constant, then the origin (¯ ,˙ ) = (0, 0) of the closed-loop system Equation (12) is globally uniformly stable in Lyapunov's sense.

REMARK 5.
It is worth noting that, in Equation (2), the inertial matrix H is generally different from the inertial matrix M, so that the term (M − H)¨ is appeared in the controller Equation (4), and then an accelerated feedback or sensing the external loads τ e is necessary. If we select H = M, the closed-loop system Equation (4) is given by which is very similar to the adaptive control law based closedloop system Equation (31). However, if the dynamics model Equation (1) is not accurate, then the error terms M( )¨ , C( ,˙ )˙ , and N( ) will appear in the closed-loop system Equation (4), as well as in the system Equation (33), so that some more complex robust controllers have to be used to overcome the effects caused by the un-modeled errors for guaranteeing the stability of the closed-loop system Equation (4). On the contrary, the adaptive control law Equation (10) has considered the un-modeled error and updated the virtual reference model χ( ,˙ ,˙ r ,¨ r )ρ in the controller Equation (10) online by using the parameter estimator Equation (11). This makes the virtual velocity vectors s and the parameters errorsρ be bounded, and finally, the virtual velocity vectors s → 0 as t → ∞. On the surface s =˙ + ¯ = 0, the stability of the state (¯ ,˙ ) of the closed-loop system is ensured by the Hurwitz matrix − . Thus, the two problems mentioned in Remark 2 can be resolved or relaxed by using the MRAC based time-varying impedance controller. REMARK 6. It is also worth noting that, in general, the external loads τ e cannot be estimated by using the linearly parameterized form Equation (9). Thus, for some accurate force tracking control tasks, the linearly parameterized form Equation (9) should be changed as then under the control law Equation (10) and the parameter estimator Equation (11), the closed-loop system can be given as where the control parameter selection Equation (27) is considered. Since the right side of Equation (35) is bounded under control law Equation (10) with the parameter estimator Equation (11), the origin (¯ ,˙ ) = (0, 0) of the system Equation (35) is still globally uniformly stable in the Lyapunov's sense. However, the error term χρ on the right side of Equation (35) will cause certain force tracking errors. Thus, for accurate force tracking control tasks, measurement of external loads is required, and the MRAC based control law should be changed as then the closed-loop system Equation (35) will changed to that same as Equation (31).
According to the numerical simulation results, even though the physical parameters of the plant are supposed to be zero at the initial moment (see Figure 3 and Table 1), it shows that system Equation (35) is uniformly stable for the controlled planar 2R manipulator. From Figures 1, 2, it can be seen that the joint trajectory tracking errors are bounded and converge to zero    when the trajectory tracking task is switched to a stabilization task after the time is larger than 6s. Meanwhile, from Figure 3, it is observed that the parameter estimatesρ are changed to constant values, and from Figure 4, one sees that the actuation  torques converge to zero after the desired joint trajectories θ d i (t) are constants. When the time is falling in the interval t ∈ (10, 14](s), there are non-zero external loads τ e = 5 −5 T acting on the joints, and then the joint angles demonstrate large deviations (as shown in Figure 2) due to the small given closedloop stiffness K(t) (as shown in Table 2). Since the desired joint stiffness K(t) is time-varying, the joint position deviations are varying even though the external loads τ e are constant. Figure 5 shows a local enlarged drawing of the actuation torques during τ e = 0. It is observed that the average values of the actuation torques happen to be τ a ≈ 5 −5 T , since the planar 2R manipulator moves in the horizontal plane [see Equation (37) where the gravity of the manipulator is not considered here], then the actuation torques τ a should balance the external loads τ e . However, due to the desired time-varying stiffness K(t), the parameter estimatesρ show certain fluctuations (such thatρ = 0), then the error term χρ shown in Equation (35) causes the actuation torques τ a to show certain fluctuations. The selection of controller parameters γ and Ŵ affect the performance of the system. We make a performance analysis of the closed-loop control system with different parameters γ and Ŵ. We found  that with other conditions unchanged, when Ŵ increases within a certain range, the root-mean-square error (RMSE) of the joint position will increase, and the peak value of the error¯ will also increase, while the RMSE of control torque will decrease. When γ is too large or too small, the performance of the control system will deteriorate. Therefore, the state-independent property allows us to tune the controller parameters offline in advance through simulation, which lays a good foundation for ensuring the performance of the robot. In order to verify the effectiveness of the controller proposed in this article, we also compared it with the controller in He et al. (2020). Under the same initial conditions and parameters as the proposed controller, the simulation of the comparison controller is carried out, and the response results of the closedloop system under the comparison controller are shown in Figures 6-8. Comparing Figures 2, 7, we can get that the RMSE of the joint position under the proposed controller in Figure 2 is 0.416 and 0.494, while the RMSE of the joint position under the comparison controller in Figure 7 is 0.865 and 1.337. Then, it can be concluded that the controller proposed in this article can better realize the trajectory tracking control with higher accuracy. From the simulation results, we can also get that the proposed controller has a smaller peak error. All these simulation results verify the effectiveness of the controller proposed in this article.

CONCLUSION
Under the design frame of an MRAC based control system, a time-varying impedance controller is proposed for manipulators with uncertain structure parameters. We show that the proposed controller does not need to use acceleration-based feedback or measurement of the external loads, and the adaptive controller can tolerate considerable structure parameter errors. By employing a Lyapunov-like stability analysis approach, the globally uniform stability of the time-varying closed-loop system is analyzed, and a simple controller parameters selection approach is presented. Through a planar 2R manipulator, the feasibility of the proposed control method is verified by some numerical simulations. Our future work will focus on the antiinterference ability of the proposed controller.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.